:root {
  color-scheme: dark;
  --bg: #090b0a;
  --surface: #111512;
  --surface-2: #171c18;
  --line: #2b332c;
  --text: #f4f0e6;
  --muted: #9ba49c;
  --gold: #d7ad56;
  --gold-2: #f0d690;
  --red: #b83b32;
  --jade: #4ba88a;
  --danger: #e16b62;
  --nav-h: 68px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Microsoft YaHei", "Noto Sans SC", sans-serif; letter-spacing: 0; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hidden { display: none !important; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.wallet-network-select { min-height: 38px; max-width: 104px; padding: 7px 5px; border: 1px solid #547565; border-radius: 8px; background: #18261e; color: #d1eadb; font-size: 12px; cursor: pointer; }
.wallet-network-select:disabled { opacity: .55; cursor: wait; }
.wallet-connect-button { min-height: 38px; max-width: 150px; padding: 7px 10px; border: 1px solid #a78c52; border-radius: 8px; background: #292315; color: #f0d690; cursor: pointer; font-size: 12px; overflow-wrap: anywhere; }
.wallet-connect-button.connected { border-color: #579d82; background: #183127; color: #c7ecd9; }
.wallet-overlay { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 16px; }
.wallet-backdrop { position: absolute; inset: 0; background: #050806df; border: 0; }
.wallet-panel { position: relative; width: min(100%, 500px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 20px; background: #141b16; border: 1px solid #766442; border-radius: 14px; box-shadow: 0 20px 70px #0008; }
.wallet-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wallet-panel h2 { margin: 0; font-family: serif; color: var(--gold-2); }
.wallet-safety, .wallet-compatibility, .wallet-mobile-note p { font-size: 12px; line-height: 1.7; color: #b2beb3; }
.wallet-networks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 16px; }
.wallet-panel button:disabled { cursor: not-allowed; opacity: .5; }
.wallet-networks button, .wallet-provider-row button { min-height: 42px; padding: 8px; border: 1px solid #496151; border-radius: 7px; background: #1e2c22; color: #d2dfd4; cursor: pointer; font-size: 12px; }
.wallet-networks button.active { border-color: #a6d6b8; background: #305d42; color: #fff; }
.wallet-current-network, .wallet-status { font-size: 12px; line-height: 1.6; color: var(--gold-2); }
.wallet-panel label { font-size: 12px; color: var(--muted); }
.wallet-brands { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 14px 0; }
.wallet-brand { min-width: 0; min-height: 96px; display: grid; gap: 5px; padding: 12px; text-align: left; border: 1px solid #4c554e; border-radius: 9px; background: #1b231d; cursor: pointer; }
.wallet-brand strong { font-size: 16px; }
.wallet-brand span { font-size: 11px; color: #ccd4cd; }
.wallet-brand small { font-size: 11px; color: var(--muted); line-height: 1.5; }
.wallet-brand.binance { border-color: #887238; background: linear-gradient(135deg,#332c16,#211e13); }
.wallet-brand.binance strong { color: #f4d16a; }
.wallet-brand.okx strong { color: #f4f7f3; }
.wallet-brand.detected small { color: #b2e3c7; }
.wallet-brand:hover:not(:disabled) { border-color: var(--gold-2); }
.wallet-provider-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin: 8px 0; }
.wallet-provider-row select { min-width: 0; padding: 9px; background: #0c120f; color: var(--text); border: 1px solid var(--line); border-radius: 7px; }
.wallet-account { padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.wallet-account small { display: block; color: var(--muted); line-height: 1.5; }
.wallet-account code { display: block; margin: 8px 0; overflow-wrap: anywhere; color: #d7eddf; font-size: 13px; user-select: all; }
.wallet-mobile-note { padding-top: 12px; border-top: 1px solid var(--line); }
.wallet-mobile-note strong { color: var(--gold-2); font-size: 12px; }

.locale-toolbar { width: min(100%, 1180px); margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.locale-toolbar label { color: var(--muted); font-size: 11px; }
.locale-toolbar select, .locale-toolbar button { min-height: 36px; max-width: 100%; color: var(--gold-2); border: 1px solid var(--line); background: var(--surface); border-radius: 5px; padding: 6px 10px; font-size: 12px; }
.locale-toolbar select { flex: 1; min-width: 180px; }
.locale-toolbar button { cursor: pointer; }
.locale-toolbar button[aria-pressed="true"] { border-color: var(--gold); background: #2a2418; }
.locale-toolbar small { flex-basis: 100%; color: var(--muted); font-size: 11px; line-height: 1.5; }
.pack-tab { flex-basis: auto; min-width: 106px; }
.pack-tab strong { max-width: 220px; }
.bottom-nav small { padding: 0 4px; }
html:not([lang^="zh"]) .pack-copy h1 { font-size: clamp(21px, 4vw, 30px); }
html:not([lang^="zh"]) .brand-lockup strong { font-size: 14px; }
@media (max-width: 440px) {
  .locale-toolbar label { flex-basis: 100%; }
  .locale-toolbar select { min-width: 140px; }
  .locale-toolbar button { padding-inline: 7px; }
  .pack-tab strong { max-width: 160px; }
}

.app-shell { min-height: 100vh; padding-bottom: calc(var(--nav-h) + 96px + env(safe-area-inset-bottom)); background: radial-gradient(circle at 50% -10%, rgba(75,168,138,.12), transparent 31%), var(--bg); }
.topbar { min-height: 64px; position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 6px; align-items: center; padding: 8px 14px; background: rgba(9,11,10,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.brand-lockup { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; }
.brand-lockup strong { display: block; font-family: Georgia, "Microsoft YaHei", serif; font-size: 16px; }
.brand-lockup small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.brand-seal, .note-mark { display: grid; place-items: center; width: 30px; height: 30px; background: var(--red); border: 1px solid #e47c6f; color: #fff4df; font-family: serif; font-weight: 800; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; font-size: 23px; cursor: pointer; }

main { width: min(100%, 1180px); margin: 0 auto; }
.view { display: none; padding: 18px 16px 28px; }
.view.active { display: block; }
.pack-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 14px; scrollbar-width: none; }
.pack-tabs::-webkit-scrollbar { display: none; }
.pack-tab { flex: 0 0 106px; height: 62px; display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 8px; padding: 8px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.pack-tab.active { border-color: var(--gold); background: #211c12; }
.pack-tab i { width: 30px; height: 42px; display: grid; place-items: center; font-style: normal; background: var(--pack-color); color: #fff; border: 1px solid rgba(255,255,255,.35); font-family: serif; font-weight: 800; }
.pack-tab strong, .pack-tab small { display: block; }
.pack-tab strong { font-size: 12px; white-space: nowrap; }
.pack-tab small { color: var(--gold-2); font-size: 11px; margin-top: 3px; }

.summon-stage { position: relative; min-height: 360px; display: grid; place-items: center; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)); }
.mist-pattern { position: absolute; inset: 0; opacity: .35; background: repeating-radial-gradient(ellipse at 30% 60%, transparent 0 38px, rgba(215,173,86,.13) 40px 41px, transparent 43px 66px); }
.pack-art { position: relative; z-index: 2; width: 174px; aspect-ratio: .67; display: grid; place-items: center; border: 2px solid var(--pack-color); background: linear-gradient(145deg, #252b27, var(--pack-color) 72%, #090b0a); box-shadow: 0 22px 60px rgba(0,0,0,.5), 0 0 34px color-mix(in srgb, var(--pack-color) 35%, transparent); transform: rotate(-3deg); transition: .3s ease; }
.pack-art::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255,255,255,.4); }
.pack-art::after { content: "灵\A契"; white-space: pre; display: grid; place-items: center; width: 76px; height: 76px; border: 3px double var(--gold-2); border-radius: 50%; color: var(--gold-2); font-family: serif; font-size: 25px; line-height: .95; text-align: center; text-shadow: 0 3px 15px #000; }
.pack-art.has-image { aspect-ratio: .8; overflow: hidden; border-radius: 10px; }
.pack-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.pack-art.has-image::before, .pack-art.has-image::after { display: none; }
.pack-copy { position: absolute; z-index: 3; left: 18px; bottom: 17px; width: min(58%, 360px); }
.pack-copy h1, .page-intro h1 { margin: 3px 0 5px; font-family: Georgia, "Microsoft YaHei", serif; font-size: 28px; }
.pack-copy p, .page-intro p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.eyebrow { color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }

.metrics { display: grid; grid-template-columns: repeat(3,1fr); border-bottom: 1px solid var(--line); }
.metrics div { padding: 16px 6px; text-align: center; border-right: 1px solid var(--line); }
.metrics div:last-child { border-right: 0; }
.metrics span, .metrics small { display: block; }
.metrics span { color: var(--gold-2); font-size: 19px; font-weight: 800; }
.metrics small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.currency-note { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; }
.currency-note strong { color: var(--gold-2); }
.currency-note span { color: var(--muted); }
.currency-note small { flex-basis: 100%; color: var(--muted); line-height: 1.6; }
.section-block { margin-top: 26px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 12px; }
.section-heading h2 { margin: 2px 0 0; font-size: 20px; font-family: serif; }
.text-button { padding: 7px 0; color: var(--gold); background: none; border: 0; cursor: pointer; }
.lucky-note { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #6d5933; background: #211b10; }
.lucky-note p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }

.tier-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.tier-button { flex: 0 0 auto; min-width: 108px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); text-align: left; cursor: pointer; }
.tier-button.active { border-color: var(--tier-color); box-shadow: inset 3px 0 var(--tier-color); }
.tier-button strong, .tier-button small { display: block; }
.tier-button small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.beast-card { min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); text-align: left; cursor: pointer; }
.beast-art { position: relative; aspect-ratio: .78; display: grid; place-items: center; overflow: hidden; background: var(--art-bg); }
.beast-art::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(255,255,255,.28); }
.beast-art::after { content: attr(data-glyph); font-family: serif; font-size: 76px; color: rgba(255,255,255,.92); text-shadow: 0 8px 20px rgba(0,0,0,.55); transform: rotate(-6deg); }
.beast-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; transition: transform .35s ease; }
.beast-art.has-image::before { z-index: 1; pointer-events: none; border-color: rgba(255,238,196,.16); }
.beast-card { transition: border-color .2s ease, box-shadow .2s ease; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .beast-card:hover { border-color: var(--tier-color, var(--gold)); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
  .beast-card:hover .beast-art img { transform: scale(1.025); }
}
.beast-art.has-image::after { display: none; }
.beast-art .moon { position: absolute; width: 92px; height: 92px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; box-shadow: 0 0 0 18px rgba(255,255,255,.03), 0 0 0 36px rgba(255,255,255,.02); }
.tier-badge { position: absolute; top: 9px; left: 9px; z-index: 2; padding: 3px 6px; background: rgba(5,7,6,.78); border: 1px solid var(--tier-color); color: var(--tier-color); font-size: 10px; font-weight: 800; }
.card-info { padding: 9px; }
.card-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.card-info div { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 10px; }
.card-info em { color: var(--gold-2); font-style: normal; }
.wide-button { width: 100%; margin-top: 12px; height: 42px; border-radius: 5px; border: 1px solid var(--line); cursor: pointer; }
.wide-button.ghost { background: var(--surface); }
.wide-button.danger { border-color: #6b3431; background: #281514; color: #ffaaa2; }

.page-intro { padding: 18px 0 24px; border-bottom: 1px solid var(--line); }
.vault-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; padding: 16px 0; }
.vault-summary div { padding: 12px; background: var(--surface); border: 1px solid var(--line); }
.vault-summary small { display: block; color: var(--muted); font-size: 10px; }
.vault-summary strong { display: block; margin-top: 7px; font-size: 16px; color: var(--gold-2); }
.segmented { display: grid; grid-template-columns: repeat(3,1fr); padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.segmented button { min-height: 36px; background: transparent; border: 0; border-radius: 4px; color: var(--muted); cursor: pointer; }
.segmented button.active { background: #2a2418; color: var(--gold-2); }
.record-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.record-row small { color: var(--muted); display: block; margin-top: 4px; }
.market-tools { display: grid; gap: 10px; margin: 15px 0; }
.market-tools label { color: var(--muted); font-size: 12px; }
.market-tools select { width: 100%; min-height: 42px; padding: 0 12px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 5px; }
.compact { grid-template-columns: repeat(4,1fr); }
input { width: 100%; height: 42px; padding: 0 12px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 5px; }
.market-grid { padding-bottom: 20px; }

.vault-summary { grid-template-columns: 1fr 1fr; }
.vault-summary strong { font-size: 22px; }
.vault-toolbar { display: flex; gap: 8px; margin: 14px 0 10px; }
.vault-toolbar button { flex: 1; min-height: 38px; border: 1px solid var(--line); background: var(--surface); border-radius: 5px; cursor: pointer; }
.empty-state { padding: 58px 20px; color: var(--muted); text-align: center; border: 1px dashed var(--line); margin-top: 16px; }
.progress-track { height: 7px; margin: 11px 0 8px; background: #272c28; overflow: hidden; }
.progress-track i { display: block; height: 100%; background: linear-gradient(90deg,var(--jade),var(--gold)); }

.partner-hero { min-height: 160px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px; margin: 16px 0; border: 1px solid #68572f; background: linear-gradient(135deg,#282013,#151a16); }
.partner-hero small, .partner-hero p { color: var(--muted); }
.partner-hero strong { display: block; margin: 5px 0; color: var(--gold-2); font-family: Georgia, serif; font-size: 48px; }
.partner-hero p { margin: 0; font-size: 12px; line-height: 1.6; }
.partner-seal { flex: 0 0 68px; width: 68px; height: 68px; display: grid; place-items: center; border: 2px solid var(--gold); color: var(--gold-2); font-family: serif; font-size: 30px; transform: rotate(5deg); }
.referral-link { padding: 14px; background: var(--surface); border: 1px solid var(--line); }
.referral-link label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.referral-link div { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.referral-link button, .claim-button { border: 1px solid var(--gold); background: #332713; color: var(--gold-2); border-radius: 5px; cursor: pointer; }
.referral-link button { padding: 0 14px; white-space: nowrap; }
.partner-kpis { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin: 12px 0; }
.partner-kpis div { min-width: 0; padding: 14px; border: 1px solid var(--line); background: var(--surface); }
.partner-kpis small, .partner-kpis strong { display: block; }
.partner-kpis small { color: var(--muted); font-size: 10px; }
.partner-kpis strong { margin-top: 7px; color: var(--gold-2); font-size: 16px; overflow-wrap: anywhere; }
.claim-button { width: 100%; height: 48px; font-weight: 800; }
.claim-button:disabled { color: var(--muted); border-color: var(--line); background: var(--surface); cursor: not-allowed; }
.partner-policy { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.settlement-row { display: grid; grid-template-columns: 62px 1fr; gap: 12px; align-items: center; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.settlement-row > span { color: var(--gold); font-size: 11px; }
.settlement-row strong, .settlement-row small { display: block; }
.settlement-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }

.summon-dock { position: fixed; z-index: 25; left: 50%; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); width: min(calc(100% - 22px), 720px); transform: translateX(-50%); display: grid; grid-template-columns: 92px minmax(150px,1fr) minmax(0,1.4fr) 72px; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(17,21,18,.97); border: 1px solid #3a443c; box-shadow: 0 12px 45px #000; backdrop-filter: blur(16px); }
.balance { border: 0; background: transparent; text-align: left; cursor: pointer; }
.balance span, .balance strong { display: block; }
.balance span { color: var(--muted); font-size: 10px; }
.balance strong { margin-top: 3px; color: var(--gold-2); }
.draw-modes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); min-width: 0; gap: 6px; }
.draw-modes button { min-width: 0; min-height: 36px; padding: 6px; border: 1px solid #53584b; border-radius: 7px; background: #1a201b; color: #d9dfd6; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
.draw-modes button.active { color: #ffe5a3; border-color: #e0b65c; background: linear-gradient(135deg,#4b391b,#302615); box-shadow: inset 0 0 0 1px #e0b65c33; }
#drawTen { color: #bde9dd; border-color: #427667; background: #172e27; }
#drawTen.active { color: #effff7; border-color: #8ccdb5; background: linear-gradient(135deg,#326a55,#244c3e); box-shadow: inset 0 0 0 1px #a5e4c833; }
.draw-modes button:hover:not(:disabled) { border-color: #f0d690; }
.draw-modes button:disabled { cursor: not-allowed; opacity: .55; }
.summon-button { min-width: 0; min-height: 66px; padding: 9px 12px; border: 2px solid #bd8aff; border-radius: 9px; background: linear-gradient(135deg,#792c25,#a6392e); text-align: center; cursor: pointer; box-shadow: 0 0 12px #a66aff28,inset 0 1px 0 #ffe2aa22; }
.summon-button span, .summon-button strong { display: block; }
.summon-button span { font-family: serif; font-size: 20px; font-weight: 700; line-height: 1.4; }
.summon-button strong { margin-top: 5px; color: #ffe4a8; font-size: 13px; line-height: 1.4; }
.summon-button:hover:not(:disabled) { border-color: #dcc0ff; box-shadow: 0 0 16px #a66aff4d; background: linear-gradient(135deg,#89352c,#b64637); }
.summon-button:focus-visible { outline-color: #d5afff; }
.summon-button:disabled { filter: grayscale(.8); opacity: .55; cursor: not-allowed; }
.fusion-dock-button { min-width: 0; min-height: 52px; padding: 8px; border: 1px solid #e0baff; border-radius: 9px; background: linear-gradient(140deg,#165a73 0%,#543291 48%,#94385d 100%); color: #fff5ff; font-family: serif; font-size: 15px; font-weight: 700; text-shadow: 0 1px 3px #190e36; box-shadow: inset 0 1px 0 #ffffff30,0 0 12px #b36aff30; cursor: pointer; overflow-wrap: anywhere; transition: filter .18s ease,box-shadow .18s ease; }
.fusion-dock-button:hover:not(:disabled) { filter: brightness(1.18); box-shadow: inset 0 1px 0 #ffffff40,0 0 18px #c58aff60; }
.server-account-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.referral-link .auto-invite-notice { color: #dbc88f; line-height: 1.8; overflow-wrap: anywhere; margin: 0 0 16px; }
.referral-link .server-account-actions { display: flex; align-items: center; gap: 8px; }
.referral-link .server-account-actions button { min-height: 40px; padding: 8px 18px; flex: 0 0 auto; }
.referral-link .server-consent { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; line-height: 1.7; }
.server-consent input { width: 18px; flex: 0 0 18px; margin-top: 5px; }
#serverAccountStatus,#serverInviter,#partnerRecords { overflow-wrap: anywhere; }
.server-game { padding: 18px; border: 1px solid #65517e; border-radius: 10px; background: #14121b; margin-top: 24px; }
.server-game > p { font-size: 13px; line-height: 1.8; color: #c6becf; }
.server-game-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.server-game-toolbar button,.server-game-toolbar select { min-height: 40px; padding: 8px 12px; border: 1px solid #8c6bb3; border-radius: 7px; color: #f0e3ff; background: #292035; cursor: pointer; }
.server-game button:disabled { opacity: .45; cursor: not-allowed; }
.server-game-cards { display: grid; grid-template-columns: repeat(auto-fill,minmax(135px,1fr)); gap: 12px; }
.server-game-card { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid #44354f; border-radius: 8px; font-size: 12px; }
.server-game-card img { display: block; width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 5px; }
.server-game-card label { display: flex; align-items: center; gap: 8px; }
.server-game-card input { width: 18px; height: 18px; }
#serverGameLedger { font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
#serverGameStatus { overflow-wrap: anywhere; }
[hidden] { display: none !important; }
.fusion-dock-button:focus-visible { outline: 2px solid #f7e1ff; outline-offset: 3px; }
.fusion-dock-button:active:not(:disabled) { filter: brightness(.94); }

.bottom-nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); padding-bottom: env(safe-area-inset-bottom); background: #0c0f0d; border-top: 1px solid var(--line); }
.bottom-nav button { position: relative; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.bottom-nav span, .bottom-nav small { display: block; }
.bottom-nav span { width: 27px; height: 27px; margin: 0 auto 2px; display: grid; place-items: center; border: 1px solid currentColor; font-family: serif; }
.bottom-nav small { font-size: 10px; }
.bottom-nav button.active { color: var(--gold-2); }
.bottom-nav b { position: absolute; top: 6px; left: calc(50% + 10px); min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border-radius: 9px; background: var(--red); font-size: 9px; }

.modal { position: fixed; z-index: 80; inset: 0; display: grid; place-items: end center; }
.modal-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(4px); }
.modal-sheet { position: relative; width: min(100%, 720px); max-height: 88vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px 8px 0 0; box-shadow: 0 -20px 60px #000; }
.modal-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-family: serif; font-size: 19px; }
.modal-body { padding: 16px; }
.rule-step { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.rule-step b { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold); }
.rule-step p { margin: 5px 0 0; color: var(--muted); line-height: 1.65; font-size: 12px; }
.detail-card { max-width: 250px; margin: 0 auto 16px; }
.detail-list { display: grid; gap: 9px; padding: 12px 0; }
.detail-list div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.detail-list strong { color: var(--text); text-align: right; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.action-grid button { min-height: 42px; border: 1px solid var(--line); background: #202720; border-radius: 5px; cursor: pointer; }
.action-grid .primary { border-color: var(--gold); background: #322712; color: var(--gold-2); }
.proof-box { padding: 12px; background: #0b0e0c; border: 1px solid var(--line); font-family: Consolas, monospace; font-size: 10px; line-height: 1.65; overflow-wrap: anywhere; }

.trading-intro { background: radial-gradient(ellipse at right top, #45351b66, transparent 70%); }
.trading-status { display: inline-block; margin-top: 14px; padding: 5px 9px; border: 1px solid #6d5933; border-radius: 4px; color: var(--gold-2); font-size: 11px; }
.trading-notice { color: var(--muted); font-size: 12px; line-height: 1.8; }
.trading-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 16px 0; }
.trading-stats div { padding: 14px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; }
.trading-stats small { display: block; color: var(--muted); font-size: 11px; }
.trading-stats strong { display: block; margin-top: 6px; color: var(--gold-2); font-size: 21px; }
.trading-toolbar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 16px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; }
.trading-toolbar label { display: grid; gap: 7px; min-width: 0; color: var(--muted); font-size: 12px; }
.trading-toolbar label:first-child { grid-column: 1 / -1; }
.trading-toolbar input, .trading-toolbar select { width: 100%; min-width: 0; min-height: 42px; padding: 8px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; }
.trading-results { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 14px 0; }
.trading-results p { flex: 1 1 180px; margin: 0; font-size: 12px; color: var(--muted); }
.trading-results button { min-height: 40px; font-size: 12px; }
.trading-grid .empty-state { grid-column: 1 / -1; }
.trading-grid .card-info div { flex-wrap: wrap; }
.listing-caption { display: block; color: var(--muted); margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 10px; }
.wide-button:disabled { opacity: .55; cursor: not-allowed; }
#vaultTabs { grid-template-columns: repeat(3,minmax(0,1fr)); }
#vaultTabs button { font-size: 12px; padding: 6px 3px; }
.vault-toolbar { flex-wrap: wrap; }
.fusion-hero { margin: 18px 0 12px; padding: 22px 16px; text-align: center; border: 1px solid #6d5933; background: radial-gradient(ellipse at top, #45351b88, transparent 75%), var(--surface); border-radius: 8px; }
.fusion-hero h2 { margin: 8px 0; color: var(--gold-2); font-family: serif; }
.fusion-hero p { font-size: 13px; line-height: 1.7; }
.fusion-hero small { color: var(--muted); font-size: 11px; }
.fusion-slots { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 16px 0; }
.fusion-slots > div { min-width: 0; min-height: 86px; padding: 12px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px dashed var(--line); border-radius: 5px; text-align: center; }
.fusion-slots .filled { border-style: solid; border-color: var(--gold); background: #292213; }
.fusion-slots strong { font-size: 12px; overflow-wrap: anywhere; }
.fusion-slots small { color: var(--muted); font-size: 10px; }
.fusion-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.fusion-actions button { padding: 12px 5px; min-height: 44px; border: 1px solid var(--gold); background: #292213; color: var(--gold-2); border-radius: 5px; cursor: pointer; font-size: 12px; }
.fusion-actions button:disabled { opacity: .45; cursor: not-allowed; }
.fusion-material { min-width: 0; padding: 5px; border: 1px solid transparent; border-radius: 7px; background: var(--surface); }
.fusion-material.selected { border-color: var(--gold); }
.fusion-material .beast-card { width: 100%; }
.fusion-material label { min-height: 44px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 4px; font-size: 11px; cursor: pointer; }
.fusion-material label small { margin-left: auto; color: var(--muted); font-size: 9px; }
.fusion-material input, .fusion-consent input { accent-color: var(--gold); width: 18px; height: 18px; flex-shrink: 0; }
.fusion-confirm-list { padding-left: 20px; font-size: 13px; line-height: 1.9; }
.fusion-warning { color: var(--gold-2); font-size: 13px; line-height: 1.8; }
.fusion-consent { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 13px; line-height: 1.7; }
.fusion-odds { padding: 12px; border: 1px solid var(--line); font-size: 12px; }
.fusion-odds summary { cursor: pointer; color: var(--gold-2); line-height: 1.7; }
.fusion-odds p { color: var(--muted); line-height: 1.8; }
.fusion-odds table { width: 100%; border-collapse: collapse; text-align: left; }
.fusion-odds td, .fusion-odds th { padding: 9px 3px; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) {
  .trading-toolbar { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .trading-toolbar label:first-child { grid-column: auto; }
}
.verify-ok { padding: 10px; margin-bottom: 10px; border: 1px solid #2f8065; color: #82d6ba; background: #11251e; }

.reveal-overlay { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; overflow: hidden; padding-top: calc(60px + env(safe-area-inset-top)); padding-bottom: 12px; background: rgba(5,7,6,.96); }
.reveal-dismiss { position: absolute; z-index: 4; top: calc(10px + env(safe-area-inset-top)); right: max(14px,calc((100vw - 560px)/2)); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--gold); border-radius: 50%; background: #251e12; color: var(--gold-2); font-size: 30px; line-height: 1; cursor: pointer; }
.reveal-dismiss:hover, .reveal-dismiss:focus-visible { background: #463619; outline: 2px solid var(--gold-2); outline-offset: 3px; }
.reveal-light { position: absolute; width: 70vmin; height: 70vmin; border-radius: 50%; background: radial-gradient(circle, rgba(240,214,144,.34), transparent 65%); animation: pulse 1.2s infinite alternate; }
.reveal-content { position: relative; z-index: 2; width: min(calc(100vw - 32px), 560px); max-height: calc(100dvh - 84px - env(safe-area-inset-top)); overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; padding: 10px 4px 18px; text-align: center; }
.reveal-content::-webkit-scrollbar { display: none; width: 0; height: 0; }
.reveal-content .beast-card { width: 100%; animation: rise .55s ease-out both; }
.reveal-content h2 { margin: 16px 0 4px; font-family: serif; }
.reveal-content p { color: var(--muted); margin: 0 0 14px; }
.reveal-content > .beast-card { display: block; width: min(100%, 260px); margin: 0 auto; }
.reveal-content > #revealClose { width: 100%; min-height: 44px; margin-top: 16px; border: 1px solid var(--gold); background: #2a2112; color: var(--gold-2); border-radius: 5px; cursor: pointer; }
.reveal-buyback { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); text-align: left; }
.reveal-buyback > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.reveal-buyback strong { color: var(--gold-2); font-size: 24px; font-variant-numeric: tabular-nums; }
.reveal-buyback strong small { font-size: 12px; }
.reveal-buyback > button { width: 100%; min-height: 46px; border: 1px solid var(--gold); border-radius: 5px; background: #3b2d13; color: var(--gold-2); font: inherit; font-weight: 700; cursor: pointer; }
.reveal-buyback > small { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.reveal-grid { margin-top: 16px; grid-template-columns: repeat(2,minmax(0,1fr)); text-align: left; }
.reveal-grid .beast-card { height: auto; }
.card-context { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.preview-disclaimer { color: var(--muted); font-size: 12px; line-height: 1.7; }
.verify-failed { padding: 10px; margin-bottom: 10px; border: 1px solid var(--danger); color: #ffaaa2; background: #281514; }
.toast { position: fixed; z-index: 120; left: 50%; top: 78px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 10px 14px; background: #e8d39d; color: #1b160c; border-radius: 5px; box-shadow: 0 8px 30px #000; font-size: 12px; }

@keyframes pulse { to { transform: scale(1.12); opacity: .65; } }
.pack-art.has-image { aspect-ratio: .75; }
.beast-art.has-image { aspect-ratio: .75; }
html:not([lang^="zh"]) .pack-tab { flex: 0 0 auto; }
html:not([lang^="zh"]) .summon-button span { font-size: 16px; }
@keyframes rise { from { transform: translateY(30px) scale(.84); opacity: 0; } }

@media (min-width: 760px) {
  .view { padding-left: 24px; padding-right: 24px; }
  .summon-stage { min-height: 500px; }
  .pack-art { width: 224px; }
  .pack-copy { left: 48px; bottom: 36px; }
  .pack-copy h1 { font-size: 36px; }
  .card-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .market-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .modal-sheet { border-radius: 8px; margin-bottom: 5vh; }
}

@media (max-width: 480px) {
  .topbar { padding-inline: 8px; grid-template-columns: 32px minmax(0,1fr) auto; }
  .topbar .icon-button { width: 32px; height: 36px; }
  .header-actions { gap: 4px; }
  .wallet-network-select { max-width: 82px; font-size: 11px; }
  .brand-lockup { gap: 5px; }
  .brand-lockup strong { font-size: 14px; }
  .brand-seal { display: none; }
  .wallet-connect-button { max-width: 92px; padding-inline: 6px; font-size: 11px; }
  .summon-dock { grid-template-columns: 58px 72px minmax(0,1fr) 50px; gap: 6px; padding: 8px; }
  .draw-modes { grid-template-columns: minmax(0,1fr); grid-template-rows: repeat(2,minmax(0,1fr)); }
  .summon-button { padding-inline: 6px; }
  .summon-button span { font-size: 17px; }
  .fusion-dock-button { font-size: 13px; }
}
