@layer tokens, base, components, utilities;
@layer tokens {
  :root { color-scheme: dark; --ink-950: #050a14; --ink-900: #07111f; --ink-800: #0a1020; --ink-700: #111a2e; --ink-600: #1a2540; --gold-100: #fff3d6; --gold-200: #ffe2a3; --gold-300: #ffcf7a; --gold-400: #ffb84d; --gold-500: #e89a2e; --gold-700: #7a5a1e; --cyan-200: #fff1cf; --cyan-300: #ffe2a3; --cyan-400: #ffb84d; --cyan-500: #ff9f3a; --violet-200: #ffe9c2; --violet-300: #ffcf8a; --violet-400: #ffa24d; --violet-500: #ff8a3d; --violet-600: #e0702a; --jade-300: var(--cyan-300); --jade-400: var(--cyan-400); --jade-500: var(--cyan-500); --jade-600: #c9821f; --indigo-400: #8fa6d8; --indigo-500: #6b83c4; --cinnabar-400: #ff7a7a; --cinnabar-500: #ee5252; --cinnabar-700: #8f2626; --azure-400: #8fb8ff; --mint-400: #5ff0c0; --text: #eef0f6; --text-hi: #fffaf0; --text-soft: #cfd5e4; --text-mute: #9aa5be; --text-faint: #6f7b96; --glass-1: rgb(12 18 32 / .5); --glass-2: rgb(16 24 42 / .58); --glass-3: rgb(20 30 52 / .72); --glass-solid: rgb(9 14 26 / .95); --glass-border: rgb(255 184 77 / .3); --glass-border-hi: rgb(255 184 77 / .6); --glass-blur: 0px; --glass-blur-hi: 8px; --glass-shadow: 0 18px 50px rgb(0 0 0 / .42), 0 0 0 1px rgb(255 184 77 / .04) inset, 0 1px 0 rgb(255 226 163 / .12) inset; --glow-cyan: 0 0 26px rgb(255 138 61 / .2); --glow-violet: 0 0 30px rgb(255 138 61 / .24); --r-sm: 10px; --r-md: 16px; --r-lg: 20px; --r-xl: 22px; --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 56px; --font-display: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif; --font-body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif; --font-serif: 'Playfair Display', 'Times New Roman', serif; --font-seal: 'Ma Shan Zheng', 'STKaiti', 'KaiTi', serif; --fw-display: 600; --grad-accent: linear-gradient(135deg, #ffe2a3 0%, #ffb84d 48%, #ff8a3d 100%); --ease: cubic-bezier(.4, 0, .2, 1); --focus: 0 0 0 3px rgb(255 184 77 / .45); --rail-w: 276px; --sidebar-w: 256px; --topbar-h: 64px; --tabbar-h: 64px; }
}
@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; font-size: 15px; }
  body { margin: 0; min-height: 100dvh; background: var(--ink-950); color: var(--text); font-family: var(--font-body); font-weight: 400; font-size: 1rem; line-height: 1.6; font-variant-numeric: lining-nums; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
  h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0 0 var(--s-3); line-height: 1.25; color: var(--text-hi); letter-spacing: .01em; }
  h1 { font-family: var(--font-serif); font-weight: 700; font-size: clamp(2rem, 4.2vw, 3rem); letter-spacing: -.005em; }
  h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
  h3 { font-size: 1.3rem; }
  h4 { font-size: 1.1rem; }
  p { margin: 0 0 var(--s-3); color: var(--text-soft); }
  a { color: var(--cyan-300); text-decoration: none; transition: color .15s var(--ease); }
  a:hover { color: var(--violet-200); }
  img, svg { max-width: 100%; }
  :focus-visible { outline: 2px solid var(--cyan-400); outline-offset: 2px; border-radius: 4px; }
  ::selection { background: rgb(255 138 61 / .5); }
  hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, rgb(255 184 77 / .3), transparent); margin: var(--s-6) 0; }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-thumb { background: rgb(210 163 93 / .35); border-radius: 8px; border: 2px solid var(--ink-900); }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .skip-link { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--cyan-400); color: var(--ink-950); padding: 8px 14px; border-radius: 8px; }
  .skip-link:focus { left: 8px; }
}
@layer components {
  .scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #07111f url('/ui/img/bg/bg-1920.webp') center bottom / cover no-repeat; }
  @media (min-width: 1921px) {
    .scene { background-image: url('/ui/img/bg/bg-2560.webp'); }
  }
  @media (max-width: 720px) {
    .scene { background-image: url('/ui/img/bg/bg-mobile.webp'); }
  }
  .scene::before { content: ''; position: absolute; inset: 0; background:
    linear-gradient(180deg, rgb(7 17 31 / .34) 0%, rgb(7 17 31 / .1) 40%, rgb(7 17 31 / .18) 72%, rgb(7 17 31 / .55) 100%),
    radial-gradient(60% 45% at 50% 42%, rgb(7 17 31 / .45), transparent 70%),
    radial-gradient(90% 70% at 62% 78%, rgb(255 138 61 / .1), transparent 60%); }
  .scene .orb, .scene .moon, .scene .cloud { display: none; }
  .scene .particles { display: none; }
  .container { width: min(1200px, 100% - 32px); margin-inline: auto; }
  .stack { display: flex; flex-direction: column; gap: var(--s-4); }
  .stack-lg { display: flex; flex-direction: column; gap: var(--s-8); }
  .row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
  .row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
  .grid { display: grid; gap: var(--s-5); }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  @media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 600px) {
    .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
    .grid { gap: var(--s-4); }
  }
  .center { text-align: center; }
  .muted { color: var(--text-mute); }
  .gold { color: var(--gold-300); }
  .jade { color: var(--cyan-300); }
  .danger { color: var(--cinnabar-400); }
  .num { font-family: var(--font-display); font-weight: var(--fw-display); font-variant-numeric: lining-nums tabular-nums; letter-spacing: .02em; }
  .glass { position: relative; isolation: isolate; border-radius: var(--r-lg); padding: var(--s-6); background: linear-gradient(145deg, rgb(255 226 163 / .07), rgb(255 226 163 / .01) 48%, rgb(255 138 61 / .04)), var(--glass-1); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%); backdrop-filter: blur(var(--glass-blur)) saturate(150%); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); }
  .glass::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1px; pointer-events: none; background: linear-gradient(140deg, rgb(255 226 163 / .7), rgb(255 184 77 / .08) 32%, rgb(255 184 77 / 0) 62%, rgb(255 138 61 / .5)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
  .glass::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; background: radial-gradient(70% 55% at 6% 0%, rgb(255 184 77 / .1), transparent 60%), radial-gradient(70% 60% at 100% 100%, rgb(255 138 61 / .1), transparent 62%); }
  .glass--raised { background: linear-gradient(145deg, rgb(255 226 163 / .09), rgb(255 226 163 / .015) 50%, rgb(255 138 61 / .05)), var(--glass-2); }
  .glass--overlay { background: linear-gradient(145deg, rgb(255 255 255 / .18), rgb(255 255 255 / .05)), var(--glass-3); -webkit-backdrop-filter: blur(var(--glass-blur-hi)) saturate(190%); backdrop-filter: blur(var(--glass-blur-hi)) saturate(190%); }
  .glass--flat { background: rgb(12 18 32 / .42); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); box-shadow: none; border-color: rgb(255 184 77 / .16); border-radius: var(--r-md); }
  .glass--flat::before, .glass--flat::after { display: none; }
  .glass--tight { padding: var(--s-4); }
  .glass--hover { transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease); }
  .glass--hover:hover { transform: translateY(-4px); border-color: rgb(255 184 77 / .6); box-shadow: 0 26px 60px rgb(0 0 0 / .5), var(--glow-cyan), 0 1px 0 rgb(255 226 163 / .2) inset; }
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass, .glass--raised, .glass--overlay { background: var(--glass-solid); }
  }
  @media (prefers-reduced-transparency: reduce) {
    .glass, .glass--raised, .glass--overlay, .glass--flat { background: var(--glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
  }
  @media (prefers-contrast: more) {
    .glass { background: var(--glass-solid); border-color: var(--glass-border-hi); }
  }
  .perf-lite .glass, .perf-lite .glass--raised, .perf-lite .glass--flat, .perf-lite .topbar, .perf-lite .sidebar, .perf-lite .appbar, .perf-lite .tabbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-solid); }
  .page-head { margin-bottom: var(--s-6); }
  .page-head .eyebrow { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: var(--fw-display); font-size: .82rem; letter-spacing: .3em; text-transform: uppercase; color: var(--cyan-300); margin-bottom: 8px; }
  .page-head .eyebrow::before { content: ''; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan-300)); box-shadow: 0 0 10px var(--cyan-400); }
  .page-head p { max-width: 70ch; }
  .seal { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; flex: none; color: #081a32; font-family: var(--font-seal); font-size: 1.7rem; line-height: 1; background: var(--grad-accent); box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), 0 6px 20px rgb(86 160 255 / .35), 0 0 0 1px rgb(255 255 255 / .18); }
  .chip-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; flex: none; color: var(--cyan-200); background: linear-gradient(145deg, rgb(255 184 77 / .22), rgb(255 138 61 / .18)); border: 1px solid rgb(255 220 161 / .28); box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), var(--glow-cyan); }
  .chip-ico--violet { color: var(--violet-200); background: linear-gradient(145deg, rgb(255 138 61 / .28), rgb(91 108 240 / .16)); border-color: rgb(190 170 255 / .32); box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), var(--glow-violet); }
  .chip-ico--gold { color: var(--gold-200); background: linear-gradient(145deg, rgb(221 193 255 / .24), rgb(255 138 61 / .12)); border-color: rgb(221 193 255 / .34); box-shadow: inset 0 1px 0 rgb(255 255 255 / .16); }
  .chip-ico--rose { color: #ffc4cf; background: linear-gradient(145deg, rgb(255 122 144 / .24), rgb(156 37 64 / .16)); border-color: rgb(255 122 144 / .36); }
  .icon { display: block; }
  .btn { --_bg: linear-gradient(180deg, rgb(255 255 255 / .12), rgb(255 255 255 / .04)); --_fg: var(--text-hi); --_bd: rgb(255 184 77 / .34); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 var(--s-6); border-radius: 14px; cursor: pointer; font-family: var(--font-display); font-weight: var(--fw-display); font-size: 1rem; letter-spacing: .03em; text-decoration: none; white-space: nowrap; user-select: none; color: var(--_fg); background: var(--_bg); border: 1px solid var(--_bd); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), 0 6px 18px rgb(0 0 0 / .35); transition: transform .18s var(--ease), box-shadow .22s var(--ease), filter .2s var(--ease), border-color .2s var(--ease); }
  .btn:hover { transform: translateY(-2px); color: var(--_fg); border-color: var(--glass-border-hi); box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), 0 12px 28px rgb(0 0 0 / .45), var(--glow-cyan); }
  .btn:active { transform: translateY(0); filter: brightness(.94); }
  .btn[disabled], .btn[aria-disabled='true'] { opacity: .5; cursor: not-allowed; transform: none; filter: grayscale(.35); box-shadow: none; }
  .btn--primary { --_bg: var(--grad-accent); --_fg: #081a32; --_bd: rgb(255 255 255 / .45); box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), 0 8px 26px rgb(255 184 77 / .38); }
  .btn--primary:hover { box-shadow: inset 0 1px 0 rgb(255 255 255 / .7), 0 14px 34px rgb(255 184 77 / .55), 0 0 30px rgb(164 139 255 / .45); border-color: #fff; }
  .btn--jade { --_bg: linear-gradient(135deg, #5ff0c0, #3bc7d8); --_fg: #03201d; --_bd: rgb(255 255 255 / .4); }
  .btn--danger { --_bg: linear-gradient(135deg, #ff7a90, #d13a63); --_fg: #fff; --_bd: rgb(255 190 200 / .5); }
  .btn--ghost { --_bg: transparent; --_bd: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .btn--ghost:hover { --_bg: rgb(255 255 255 / .07); box-shadow: none; }
  .btn--sm { min-height: 38px; padding: 0 var(--s-4); font-size: .9rem; border-radius: 12px; }
  .btn--lg { min-height: 58px; padding: 0 var(--s-8); font-size: 1.15rem; border-radius: 16px; }
  .btn--block { width: 100%; }
  @keyframes spin {to { transform: rotate(360deg); }}
  .field { display: flex; flex-direction: column; gap: 7px; }
  .field > label, .label { font-family: var(--font-display); font-weight: var(--fw-display); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--violet-200); }
  .input, .select, .textarea { width: 100%; min-height: 50px; padding: 8px 16px; border-radius: 14px; color: var(--text-hi); font: inherit; font-size: 1.2rem; background: rgb(8 12 24 / .55); border: 1px solid rgb(255 184 77 / .26); box-shadow: inset 0 2px 10px rgb(0 0 0 / .35); transition: border-color .15s, box-shadow .15s, background .15s; }
  .textarea { min-height: 110px; resize: vertical; }
  .select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23ffda91' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; }
  .select option { background: var(--ink-800); }
  .input::placeholder, .textarea::placeholder { color: var(--text-faint); }
  .input:hover, .select:hover, .textarea:hover { border-color: rgb(255 184 77 / .5); }
  .input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--cyan-400); background-color: rgb(8 12 24 / .7); box-shadow: var(--focus), inset 0 2px 10px rgb(0 0 0 / .3); }
  .input[aria-invalid='true'] { border-color: var(--cinnabar-400); }
  .hint { font-size: 1rem; color: var(--text-mute); }
  .error-text { font-size: 1.02rem; color: var(--cinnabar-400); }
  .check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
  .check input { width: 20px; height: 20px; accent-color: var(--violet-500); margin-top: 3px; }
  .badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 13px; border-radius: 999px; font-family: var(--font-display); font-weight: var(--fw-display); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--violet-200); background: rgb(255 138 61 / .16); border: 1px solid rgb(255 138 61 / .42); white-space: nowrap; }
  .badge--jade { color: var(--cyan-200); background: rgb(255 184 77 / .13); border-color: rgb(255 184 77 / .45); }
  .badge--danger { color: #ffc0cb; background: rgb(255 122 144 / .15); border-color: rgb(255 122 144 / .5); }
  .badge--azure { color: var(--azure-400); background: rgb(124 196 255 / .13); border-color: rgb(124 196 255 / .42); }
  .badge--mute { color: var(--text-mute); background: rgb(255 255 255 / .06); border-color: rgb(255 255 255 / .16); }
  .stat { display: flex; flex-direction: column; gap: 4px; }
  .stat .stat-label { font-family: var(--font-display); font-weight: var(--fw-display); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-mute); }
  .stat .stat-value { font-family: var(--font-display); font-weight: var(--fw-display); font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.1; color: var(--text-hi); font-variant-numeric: tabular-nums; text-shadow: 0 0 24px rgb(255 184 77 / .28); }
  .stat .stat-sub { font-size: 1rem; color: var(--text-mute); }
  .coin { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: var(--fw-display); color: var(--cyan-200); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .coin svg { width: 1.1em; height: 1.1em; flex: none; filter: drop-shadow(0 0 8px rgb(255 184 77 / .5)); }
  .slot { --rc: #a5b4d8; position: relative; display: grid; place-items: center; width: 64px; height: 64px; flex: none; border-radius: 16px; background: radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--rc) 30%, transparent), rgb(8 12 24 / .72) 74%); border: 1.5px solid color-mix(in srgb, var(--rc) 80%, transparent); box-shadow: inset 0 0 16px color-mix(in srgb, var(--rc) 32%, transparent), 0 0 20px color-mix(in srgb, var(--rc) 20%, transparent); }
  .slot .glyph { font-family: var(--font-seal); font-size: 2rem; color: color-mix(in srgb, var(--rc) 65%, #fff); text-shadow: 0 0 12px var(--rc); line-height: 1; }
  .slot .qty { position: absolute; right: 5px; bottom: 2px; font-family: var(--font-display); font-weight: var(--fw-display); font-size: .8rem; color: #fff; text-shadow: 0 1px 3px #000; }
  .slot .slot-img { width: 78%; height: 78%; object-fit: contain; image-rendering: auto; filter: drop-shadow(0 2px 6px rgb(0 0 0 / .5)); }
  .slot--sm { width: 44px; height: 44px; border-radius: 12px; }
  .slot--sm .glyph { font-size: 1.4rem; }
  .slot--lg { width: 88px; height: 88px; border-radius: 20px; }
  .slot--lg .glyph { font-size: 2.8rem; }
  .rarity-common { --rc: #a5b4d8; }
  .rarity-uncommon { --rc: #5ff0c0; }
  .rarity-rare { --rc: #6cb8ff; }
  .rarity-epic { --rc: #c58cff; }
  .rarity-legendary { --rc: #f58bcf; }
  .rarity-legendary { box-shadow: inset 0 0 18px rgb(245 139 207 / .25), 0 0 14px rgb(245 139 207 / .18); }
  .table-wrap { overflow-x: auto; border-radius: var(--r-md); }
  .table { width: 100%; border-collapse: collapse; font-size: 1.08rem; }
  .table th { position: sticky; top: 0; text-align: left; padding: 13px 16px; font-family: var(--font-display); font-weight: 400; font-size: .76rem; letter-spacing: .15em; text-transform: uppercase; color: var(--violet-200); background: rgb(12 18 32 / .8); border-bottom: 1px solid var(--glass-border); white-space: nowrap; }
  .table td { padding: 13px 16px; border-bottom: 1px solid rgb(255 184 77 / .1); vertical-align: middle; }
  .table tbody tr { transition: background .15s; }
  .table tbody tr:hover td { background: rgb(255 184 77 / .07); }
  .table td.num, .table th.num { text-align: right; }
  .empty { display: grid; place-items: center; gap: 8px; padding: var(--s-10) var(--s-4); text-align: center; color: var(--text-mute); }
  .empty .seal { opacity: .75; }
  .progress { height: 12px; border-radius: 99px; background: rgb(6 10 20 / .55); border: 1px solid rgb(255 184 77 / .22); overflow: hidden; box-shadow: inset 0 2px 6px rgb(0 0 0 / .4); }
  .progress > i { display: block; height: 100%; border-radius: inherit; background: var(--grad-accent); box-shadow: 0 0 16px rgb(120 180 255 / .6); transition: width .6s var(--ease); }
  .tabs { display: flex; gap: 6px; overflow-x: auto; padding: 5px; border-radius: 999px; width: fit-content; max-width: 100%; background: rgb(8 12 24 / .45); border: 1px solid rgb(255 184 77 / .16); }
  .tab { padding: 8px 20px; border-radius: 999px; border: 1px solid transparent; font-family: var(--font-display); font-weight: var(--fw-display); font-size: .92rem; color: var(--text-soft); background: transparent; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .18s, color .18s; }
  .tab:hover { color: var(--text-hi); background: rgb(255 255 255 / .07); }
  .tab[aria-selected='true'], .tab.active { color: #081a32; background: var(--grad-accent); box-shadow: 0 4px 16px rgb(255 184 77 / .35); }
  .topbar { position: sticky; top: 0; z-index: 50; height: var(--topbar-h); display: flex; align-items: center; background: linear-gradient(180deg, rgb(8 14 26 / .62), rgb(8 14 26 / .38)); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); border-bottom: 1px solid rgb(255 255 255 / .14); }
  .topbar-inner { display: flex; align-items: center; gap: var(--s-4); width: min(1360px, 100% - 32px); margin-inline: auto; }
  .brand { display: flex; align-items: center; gap: 12px; color: var(--text-hi); font-family: var(--font-display); font-weight: var(--fw-display); font-size: 1.32rem; letter-spacing: .05em; }
  .brand:hover { color: #fff; }
  .brand small { display: block; font-size: .6rem; letter-spacing: .36em; color: var(--cyan-300); margin-top: -2px; }
  .nav { display: flex; gap: 4px; margin-left: var(--s-6); }
  .nav a { padding: 8px 15px; border-radius: 12px; font-family: var(--font-display); font-weight: var(--fw-display); font-size: .93rem; color: var(--text-soft); transition: background .18s, color .18s; }
  .nav a:hover { color: var(--text-hi); background: rgb(255 255 255 / .08); }
  .nav a[aria-current='page'] { color: var(--text-hi); background: rgb(255 255 255 / .14); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .28); }
  .spacer { flex: 1; }
  @media (max-width: 860px) {
    .nav { display: none; }
  }
  @media (max-width: 600px) {
    .brand { font-size: 1.05rem; white-space: nowrap; }
    .brand small { display: none; }
    .brand .seal { width: 38px; height: 38px; font-size: 1.4rem; }
    .topbar-inner { gap: var(--s-2); }
    .topbar-inner .btn--sm { padding: 0 var(--s-3); }
    .topbar-inner .only-desktop { display: none !important; }
  }
  .app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); gap: 24px; padding: 22px; min-height: 100dvh; align-items: start; }
  .sidebar { position: sticky; top: 22px; height: calc(100dvh - 44px); display: flex; flex-direction: column; padding: 20px 14px 16px; border-radius: 30px; overflow: hidden; }
  .sidebar .brand { padding: 4px 8px 2px; font-size: 1.3rem; white-space: nowrap; }
  .sidebar .brand .seal { width: 44px; height: 44px; }
  .sidebar .tagline { padding: 4px 10px 8px; font-size: 1rem; line-height: 1.25; color: var(--text-soft); }
  .sidebar nav { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
  .rail-title { font-family: var(--font-display); font-weight: var(--fw-display); font-size: .64rem; letter-spacing: .32em; text-transform: uppercase; color: var(--text-mute); padding: 10px 12px 4px; }
  .sidebar nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 4px 8px; margin: 1px 0; border-radius: 14px; color: var(--text-soft); font-family: var(--font-display); font-weight: var(--fw-display); font-size: .86rem; border: 1px solid transparent; transition: background .18s, color .18s, border-color .18s; }
  .sidebar nav a .ico { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; color: var(--cyan-200); flex: none; transition: background .18s, color .18s, box-shadow .18s; }
  .sidebar nav a:hover { background: rgb(255 255 255 / .08); color: #fff; }
  .sidebar nav a:hover .ico { background: rgb(255 255 255 / .1); }
  .sidebar nav a[aria-current='page'] { background: linear-gradient(90deg, rgb(255 255 255 / .2), rgb(255 255 255 / .07)); border-color: rgb(255 255 255 / .32); color: #fff; box-shadow: inset 0 1px 0 rgb(255 255 255 / .2), 0 6px 22px rgb(255 138 61 / .25); }
  .sidebar nav a[aria-current='page'] .ico { background: var(--grad-accent); color: #081a32; box-shadow: 0 4px 16px rgb(255 184 77 / .5); }
  .sidebar .tag { margin-left: auto; font-size: .56rem; padding: 1px 7px; border-radius: 99px; background: linear-gradient(135deg, #ffb84d, #ff8a3d); color: #081a32; letter-spacing: .08em; }
  .lb-xu { display: flex; align-items: center; gap: 12px; margin: 10px 4px 8px; padding: 12px 14px; border-radius: 18px; background: linear-gradient(145deg, rgb(255 255 255 / .14), rgb(255 255 255 / .04)); border: 1px solid rgb(255 255 255 / .22); box-shadow: inset 0 1px 0 rgb(255 255 255 / .2); }
  .lb-xu .chip-ico { width: 44px; height: 44px; border-radius: 14px; }
  .lb-xu-label { font-family: var(--font-display); font-weight: var(--fw-display); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-mute); }
  .lb-xu-val { font-size: 1.3rem; }
  .sidebar nav a .nm { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
  .sidebar nav a .nm-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidebar nav a .nm-row { display: flex; align-items: center; gap: 8px; }
  .sidebar nav a .nm small { font-family: var(--font-body); font-weight: 400; font-size: .8rem; color: var(--text-mute); letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }
  .sidebar-links { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgb(255 255 255 / .12); display: flex; flex-direction: column; }
  .sidebar-links a { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 12px; color: var(--text-soft); font-family: var(--font-display); font-weight: var(--fw-display); font-size: .86rem; }
  .sidebar-links a .ico { display: grid; place-items: center; width: 26px; color: var(--cyan-300); }
  .sidebar-links a:hover, .sidebar-links a[aria-current='page'] { background: rgb(255 255 255 / .1); color: #fff; }
  .pill-btn { cursor: pointer; font: inherit; font-family: var(--font-display); font-weight: var(--fw-display); }
  .promo { margin-top: 10px; padding: 16px 16px 14px; border-radius: 22px; overflow: hidden; position: relative; isolation: isolate; background: linear-gradient(180deg, rgb(8 14 26 / .18), rgb(8 14 26 / .78)), url('/ui/img/bg/bg-1920.webp') 30% 40% / 320% no-repeat; border: 1px solid rgb(255 255 255 / .28); box-shadow: inset 0 1px 0 rgb(255 255 255 / .2); }
  .promo b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; line-height: 1.15; color: #fff; margin-bottom: 4px; }
  .promo p { font-size: .95rem; margin: 0 0 12px; color: var(--text-soft); }
  .appbar { display: flex; align-items: center; gap: 14px; margin-bottom: var(--s-6); }
  .search { position: relative; flex: 0 1 440px; min-width: 0; }
  @media (max-height: 980px) {
    .sidebar .promo { display: none; }
  }
  @media (max-width: 1560px) {
    .pill.date { display: none; }
  }
  .search input { width: 100%; height: 48px; padding: 0 16px 0 46px; border-radius: 16px; color: var(--text-hi); font: inherit; font-size: 1.12rem; background: rgb(255 255 255 / .1); border: 1px solid rgb(255 184 77 / .28); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); box-shadow: inset 0 1px 0 rgb(255 255 255 / .15); }
  .search input::placeholder { color: var(--text-mute); }
  .search input:focus { outline: none; border-color: var(--cyan-300); box-shadow: var(--focus); }
  .search .icon { position: absolute; left: 15px; top: 14px; color: var(--text-soft); pointer-events: none; }
  .search-results { position: absolute; top: 54px; left: 0; right: 0; z-index: 70; padding: 8px; max-height: 340px; overflow: auto; }
  .search-results a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: var(--text-hi); font-family: var(--font-display); font-weight: var(--fw-display); font-size: .95rem; }
  .search-results a:hover, .search-results a[data-active='true'] { background: rgb(255 255 255 / .14); }
  .search-results .muted { padding: 10px 12px; }
  .pill { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 16px; color: var(--text-hi); font-family: var(--font-display); font-weight: var(--fw-display); font-size: .9rem; white-space: nowrap; background: rgb(255 255 255 / .1); border: 1px solid rgb(255 184 77 / .28); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); box-shadow: inset 0 1px 0 rgb(255 255 255 / .15); }
  a.pill:hover { background: rgb(255 255 255 / .18); color: #fff; }
  .icon-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; cursor: pointer; color: var(--text-hi); position: relative; background: rgb(255 255 255 / .1); border: 1px solid rgb(255 184 77 / .28); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); }
  .icon-btn:hover { background: rgb(255 255 255 / .18); }
  .icon-btn .dot { position: absolute; top: 11px; right: 12px; width: 9px; height: 9px; border-radius: 50%; background: #ffb84d; box-shadow: 0 0 10px #ffb84d; }
  .user-chip { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px 0 6px; border-radius: 18px; color: var(--text-hi); background: rgb(255 255 255 / .1); border: 1px solid rgb(255 184 77 / .28); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); }
  .user-chip:hover { background: rgb(255 255 255 / .18); color: #fff; }
  .avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none; color: #081a32; font-family: var(--font-display); font-weight: var(--fw-display); font-size: 1.1rem; background: var(--grad-accent); box-shadow: 0 0 0 2px rgb(255 255 255 / .35); }
  .user-chip { flex: none; white-space: nowrap; }
  .user-chip .who { line-height: 1.1; }
  .user-chip .who b { display: block; font-family: var(--font-display); font-weight: 400; font-size: .95rem; }
  .user-chip .who span { font-size: .85rem; color: var(--text-mute); }
  .app-brand { display: none; }
  .main-col { min-width: 0; }
  .content { max-width: 1560px; }
  .tabbar { display: none; }
  @media (max-width: 1100px) {
    .search { flex-basis: 260px; }
    .pill.date { display: none; }
  }
  @media (max-width: 980px) {
    .app { grid-template-columns: minmax(0, 1fr); padding: 14px 14px calc(var(--tabbar-h) + 34px); gap: 0; }
    .sidebar { display: none; }
    .appbar { gap: 8px; margin-bottom: var(--s-4); }
    .appbar .app-brand { display: flex; }
    .user-chip .who { display: none; }
    .user-chip { padding: 0 6px; }
    .pill.date { display: none; }
    .tabbar { position: fixed; z-index: 60; left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); height: var(--tabbar-h); display: grid; grid-template-columns: repeat(5, 1fr); border-radius: 22px; background: rgb(14 22 84 / .62); -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%); border: 1px solid rgb(255 184 77 / .28); box-shadow: 0 16px 44px rgb(0 0 0 / .5), inset 0 1px 0 rgb(255 255 255 / .2); }
    .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-mute); font-family: var(--font-display); font-weight: var(--fw-display); font-size: .66rem; letter-spacing: .03em; border-radius: 18px; }
    .tabbar a .ico { display: grid; place-items: center; width: 34px; height: 26px; border-radius: 10px; color: var(--text-mute); transition: background .18s, color .18s; }
    .tabbar a[aria-current='page'] { color: var(--text-hi); }
    .tabbar a[aria-current='page'] .ico { color: #081a32; background: var(--grad-accent); box-shadow: 0 4px 14px rgb(255 184 77 / .5); }
  }
  @media (max-width: 600px) {
    .search { display: none; }
  }
  .footer { border-top: 1px solid rgb(255 255 255 / .14); background: linear-gradient(180deg, rgb(8 14 26 / .4), rgb(5 9 18 / .8)); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); padding: var(--s-8) 0 calc(var(--s-8) + 8px); margin-top: var(--s-12); color: var(--text-mute); }
  .footer a { color: var(--text-soft); }
  .footer a:hover { color: var(--cyan-300); }
  .footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s-8); }
  @media (max-width: 760px) {
    .footer .cols { grid-template-columns: 1fr 1fr; }
  }
  .quote { justify-self: end; text-align: right; max-width: 260px; color: #fff3d6; font-size: 1.15rem; font-style: italic; text-shadow: 0 2px 14px rgb(4 8 50 / .9); }
  .kpi { display: flex; align-items: center; gap: var(--s-3); padding: 16px 16px; }
  .kpi .chip-ico { width: 52px; height: 52px; border-radius: 16px; }
  .kpi .meta { min-width: 0; flex: 1; }
  .kpi .k-label { font-size: 1.02rem; color: var(--text-soft); }
  .kpi .val { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--font-display); font-weight: var(--fw-display); font-size: clamp(1.35rem, 1.7vw, 1.8rem); color: #fff; line-height: 1.15; font-variant-numeric: tabular-nums; }
  .kpi .note { font-size: .95rem; color: var(--text-mute); }
  .delta { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; font-family: var(--font-display); font-weight: var(--fw-display); font-size: .78rem; letter-spacing: .02em; color: #5dffc4; background: rgb(60 240 180 / .16); border: 1px solid rgb(60 240 180 / .35); }
  .delta--down { color: #ff9db3; background: rgb(255 120 150 / .16); border-color: rgb(255 120 150 / .38); }
  .delta--flat { color: var(--text-soft); background: rgb(255 255 255 / .1); border-color: rgb(255 255 255 / .22); }
  .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--s-4); flex-wrap: wrap; }
  .panel-head h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.15rem; }
  .panel-head .icon { color: var(--cyan-300); }
  .big-num { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
  .big-num b { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 3vw, 2.5rem); color: #fff; }
  .legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .95rem; color: var(--text-soft); }
  .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
  .chart { width: 100%; height: auto; display: block; overflow: visible; }
  .chart text { font-family: var(--font-body); font-weight: 600; font-size: 15px; fill: var(--text-mute); }
  .chart .grid-line { stroke: rgb(255 255 255 / .12); stroke-dasharray: 3 5; }
  .chart .dot { fill: #ffe2a3; stroke: #ffb84d; stroke-width: 2; filter: drop-shadow(0 0 6px rgb(255 184 77 / .8)); }
  .chart .bar { transition: opacity .2s; }
  .chart .bar:hover { opacity: .8; }
  .donut-wrap { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; }
  .donut-wrap svg { width: 168px; height: 168px; flex: none; }
  .donut-legend { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 10px; font-size: 1rem; }
  .donut-legend div { display: flex; align-items: center; gap: 8px; color: var(--text-soft); }
  .donut-legend b { margin-left: auto; font-family: var(--font-display); font-weight: 400; color: #fff; }
  .donut-legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
  .activity { display: flex; flex-direction: column; }
  .activity .item { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
  .activity .item + .item { border-top: 1px solid rgb(255 255 255 / .1); }
  .activity .chip-ico { width: 40px; height: 40px; border-radius: 13px; }
  .activity .txt { flex: 1; min-width: 0; line-height: 1.25; }
  .activity .txt b { display: block; font-family: var(--font-display); font-weight: 400; font-size: .95rem; color: #fff; }
  .activity .txt span { font-size: .95rem; color: var(--text-mute); }
  .activity time { font-size: .9rem; color: var(--text-mute); white-space: nowrap; }
  .modal-back { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgb(4 8 16 / .66); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fade .18s var(--ease); }
  .modal { width: min(560px, 100%); max-height: 90dvh; overflow: auto; animation: pop .22s var(--ease); }
  @keyframes fade {from { opacity: 0; }}
  @keyframes pop {from { opacity: 0; transform: translateY(10px) scale(.98); }}
  .toasts { position: fixed; z-index: 200; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100% - 32px)); }
  @media (max-width: 980px) {
    .toasts { bottom: calc(var(--tabbar-h) + 22px); }
  }
  .toast { padding: 14px 18px; border-radius: 16px; border: 1px solid var(--glass-border-hi); background: rgb(14 20 68 / .9); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 16px 40px rgb(0 0 0 / .6), var(--glow-cyan); animation: pop .22s var(--ease); }
  .toast.ok { border-color: var(--cyan-400); }
  .toast.err { border-color: var(--cinnabar-400); box-shadow: 0 16px 40px rgb(0 0 0 / .6), 0 0 26px rgb(255 122 144 / .25); }
  .toast b { font-family: var(--font-display); font-weight: 400; color: var(--text-hi); display: block; }
  .hero { padding: clamp(48px, 9vw, 120px) 0 var(--s-10); text-align: center; }
  .hero h1 { font-family: var(--font-serif); font-weight: 800; font-size: clamp(2.6rem, 8vw, 5.4rem); line-height: 1.02; margin-bottom: var(--s-4); background: linear-gradient(180deg, #fff3d6 0%, #ffcf7a 48%, #ff9a45 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 30px rgb(255 184 77 / .45)); }
  .dl-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: var(--s-5); }
  .dl-card .dl-name { font-family: var(--font-display); font-size: 1.15rem; color: var(--text-hi); }
  .dl-card.featured { border-color: rgb(255 184 77 / .5); }
  .auth-card { width: min(460px, 100%); margin: var(--s-10) auto; }
  .countdown { display: flex; gap: 6px; max-width: 100%; }
  .countdown .cd { flex: 1 1 0; min-width: 0; max-width: 64px; padding: 7px 4px; text-align: center; border-radius: 14px; background: rgb(6 10 20 / .55); border: 1px solid rgb(255 184 77 / .22); box-shadow: inset 0 1px 0 rgb(255 255 255 / .08); }
  .countdown .cd b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.32rem; color: var(--text-hi); text-shadow: 0 0 14px rgb(255 184 77 / .5); }
  .countdown .cd span { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mute); }
  .wheel-wrap { position: relative; width: min(440px, 100%); aspect-ratio: 1; margin-inline: auto; }
  .wheel { width: 100%; height: 100%; transition: transform 4.2s cubic-bezier(.12, .7, .1, 1); filter: drop-shadow(0 12px 34px rgb(0 0 0 / .6)) drop-shadow(0 0 30px rgb(255 184 77 / .25)); }
  .wheel-pointer { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); z-index: 2; width: 34px; height: 46px; filter: drop-shadow(0 4px 8px rgb(0 0 0 / .6)); }
}
@layer utilities {
  .mt-2 { margin-top: var(--s-2); }
  .mt-4 { margin-top: var(--s-4); }
  .mt-6 { margin-top: var(--s-6); }
  .mb-0 { margin-bottom: 0; }
  .mb-4 { margin-bottom: var(--s-4); }
  .only-mobile { display: none; }
  .only-mobile-flex { display: none; }
  @media (max-width: 980px) {
    .only-mobile-flex { display: inline-flex; }
  }
  @media (max-width: 760px) {
    .hide-mobile { display: none !important; }
    .only-mobile { display: initial; }
  }
  .fade-up { animation: fadeUp .3s var(--ease) backwards; }
  .fade-up.d1 { animation-delay: .06s; }
  .fade-up.d2 { animation-delay: .12s; }
  .fade-up.d3 { animation-delay: .18s; }
  @keyframes fadeUp {from { opacity: 0; transform: translateY(14px); }}
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .scene .cloud { animation: none; }
  }
}
:root body .kpi .meta { min-width: 0; }
:root body .kpi .val { overflow-wrap: normal; word-break: keep-all; }
:root body[data-shell="admin"] .kpi .val { font-size: clamp(.95rem, 1.15vw, 1.25rem) !important; }
:root body[data-shell="admin"] .kpi .chip-ico { width: 44px !important; height: 44px !important; flex: 0 0 44px !important; }
:root body[data-shell="admin"] .kpi { gap: 10px; padding-inline: 14px; }
:root body[data-shell="admin"] .kpi .val .coin { gap: 5px; white-space: nowrap; }
:root body[data-shell="admin"] .kpi .val .coin span { font-size: inherit; }
:root body[data-shell="admin"] .kpi .val .coin svg { width: 1em; height: 1em; flex: none; }
