:root {
  --bg: #07070a;
  --panel: #131318;
  --panel-2: #1a1a21;
  --line: rgba(214, 180, 108, .22);
  --line-strong: rgba(214, 180, 108, .5);
  --gold: #d6b46c;
  --gold-hi: #f6dc98;
  --gold-lo: #9c7631;
  --gold-grad: linear-gradient(135deg, #f8e2a6 0%, #d9b264 38%, #a8792d 72%, #e8c77e 100%);
  --text: #f2ead8;
  --muted: #9a917f;
  --dim: #6c665a;
  --ok: #4fc27c;
  --warn: #e8a93c;
  --bad: #e2574c;
  --info: #5aa2e6;
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --serif: "Cinzel", "Times New Roman", serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------------- App shell */
.device {
  position: relative;
  width: 100vw; height: 100vh; height: 100dvh;
  background: var(--bg);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.sidebar { display: none; }
.screen { flex: 1; min-width: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; position: relative; padding-top: env(safe-area-inset-top); -webkit-overflow-scrolling: touch; }
.screen::-webkit-scrollbar { display: none; }
.page { padding: 4px max(18px, env(safe-area-inset-left)) 28px max(18px, env(safe-area-inset-right)); animation: pageIn .28s ease; max-width: 680px; margin: 0 auto; }
.page.with-tabs { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
@keyframes pageIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.page.back-anim { animation-name: pageBack; }
@keyframes pageBack { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
.splash { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.splash .card svg { width: 30px; height: 30px; color: var(--gold); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(214,180,108,.2); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- Tab bar */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 6px max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(12,12,15,.82), rgba(8,8,10,.97));
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10.5px; color: var(--dim); padding: 4px 0; }
.tabbar button svg { width: 23px; height: 23px; }
.tabbar button.active { color: var(--gold); }
.tabbar button.active svg { filter: drop-shadow(0 0 6px rgba(214,180,108,.5)); }
.tabbar button.center { color: var(--gold-hi); }
.tabbar .fab { width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-grad); color: #20180a; box-shadow: 0 0 0 4px #0a0a0d, 0 8px 22px rgba(214,180,108,.45); }
.tabbar .fab svg { width: 26px; height: 26px; filter: none !important; }
.tabbar[hidden] { display: none; }

/* ---------------------------------------------------------------- Headers */
.navbar { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; height: 48px; margin: 0 -6px 6px; }
.navbar h1 { margin: 0; text-align: center; font-size: 18px; font-weight: 600; letter-spacing: 1px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--gold); position: relative; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:active { background: rgba(214,180,108,.1); }
.dot { position: absolute; top: 8px; right: 8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }

.brandbar { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .mark { width: 34px; height: 34px; }
.brand .word { font-family: var(--serif); font-size: 19px; letter-spacing: 1.5px; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }

/* ---------------------------------------------------------------- Cards */
.card { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.card + .card, .stack > * + * { margin-top: 12px; }
.card.tight { padding: 12px; }
.card.press { transition: transform .12s, border-color .2s; cursor: pointer; text-align: left; width: 100%; display: block; }
.card.press:active { transform: scale(.985); border-color: var(--line-strong); }
.gold-card {
  position: relative; overflow: hidden; border-radius: 18px; padding: 16px;
  background: var(--gold-grad); color: #1d1608;
  box-shadow: 0 10px 30px rgba(214,180,108,.25), inset 0 1px 0 rgba(255,255,255,.5);
}
.gold-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.35) 45%, transparent 60%); transform: translateX(-100%); animation: sheen 5s ease-in-out infinite 1s; }
@keyframes sheen { 0%, 70% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.gold-card .lbl { font-size: 13px; font-weight: 600; opacity: .85; }
.gold-card .big { font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.gold-card .sub { font-size: 12px; opacity: .75; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 14px; padding: 12px; min-width: 0; }
.kpi .k { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.kpi .v { font-size: 19px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; color: var(--gold-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .d { font-size: 11.5px; margin-top: 4px; color: var(--muted); }
.kpi.center { text-align: center; }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 10px; }
.section-title h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--gold-hi); letter-spacing: .5px; }
.section-title .more { font-size: 12.5px; color: var(--gold); display: flex; align-items: center; gap: 2px; }
.section-title .more svg { width: 14px; height: 14px; }

.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 12px; }
.xs { font-size: 11px; }
.gold { color: var(--gold-hi); }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.num { font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.right { text-align: right; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.ok { color: var(--ok); background: rgba(79,194,124,.12); }
.badge.warn { color: var(--warn); background: rgba(232,169,60,.12); }
.badge.info { color: var(--info); background: rgba(90,162,230,.12); }
.badge.bad { color: var(--bad); background: rgba(226,87,76,.12); }
.badge.gold { color: var(--gold-hi); background: rgba(214,180,108,.14); }
.badge.demo { color: #c9a0ff; background: rgba(160,110,255,.14); }

/* ---------------------------------------------------------------- Buttons & chips */
.btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 48px; border-radius: 14px; font-weight: 700; font-size: 15.5px; letter-spacing: 1px; }
.btn svg { width: 16px; height: 16px; }
.btn.gold { background: var(--gold-grad); color: #20180a; box-shadow: 0 8px 24px rgba(214,180,108,.25); }
.btn.outline { border: 1px solid var(--line-strong); color: var(--gold-hi); background: rgba(214,180,108,.05); }
.btn.sm { height: 38px; font-size: 13.5px; letter-spacing: .5px; border-radius: 12px; }
.btn.danger { border: 1px solid rgba(226,87,76,.5); color: var(--bad); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 14px; border-radius: 999px; font-size: 13px; color: var(--muted); border: 1px solid var(--line); background: rgba(255,255,255,.02); white-space: nowrap; }
.chip.active { background: var(--gold-grad); color: #20180a; font-weight: 700; border-color: transparent; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { padding: 8px 4px; border-radius: 9px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 4px; }
.seg button svg { width: 12px; height: 12px; }
.seg button.active { background: rgba(214,180,108,.16); color: var(--gold-hi); font-weight: 700; }

/* ---------------------------------------------------------------- Progress / bars */
.bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--gold-grad); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.bar.thin { height: 5px; }
.bar.green > i { background: linear-gradient(90deg, #2f9e5d, #6ad597); }
.bar.slate > i { background: linear-gradient(90deg, #4b5566, #7b8799); }

/* ---------------------------------------------------------------- Lists */
.list { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list > .li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; }
.list > .li + .li { border-top: 1px solid rgba(214,180,108,.1); }
.list > button.li:active { background: rgba(214,180,108,.06); }
.li .ico { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: rgba(214,180,108,.1); color: var(--gold); }
.li .ico svg { width: 19px; height: 19px; }
.li .chev { color: var(--dim); width: 16px; height: 16px; flex: none; }
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; font-size: 14px; }
.kv + .kv { border-top: 1px solid rgba(214,180,108,.09); }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Business art */
.art { position: relative; overflow: hidden; background-size: cover; background-position: center; background-color: #15120c; }
.art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.6)); pointer-events: none; }
.art.palace { background-image: url(../img/million.webp), linear-gradient(160deg, #1d2a4a 0%, #3a2a18 60%, #0d0b08 100%); }
.art.ktv { background-image: url(../img/ktv.webp), linear-gradient(160deg, #1a0d33, #0b0716); }
.art.club { background-image: url(../img/club.webp), linear-gradient(160deg, #3b2412, #120b06); }
.art.spa { background-image: url(../img/spa.webp), linear-gradient(160deg, #3a2d22, #15100b); }
.art.car { background-image: url(../img/car.webp), linear-gradient(160deg, #10141f, #05070b); }
.art.skyline { background-image: url(../img/skyline.webp), linear-gradient(160deg, #10162a, #07080c); }

.card.biz-card { display: grid; grid-template-columns: 112px 1fr 16px; gap: 12px; align-items: center; padding: 8px; }
.chev { width: 16px; height: 16px; color: var(--dim); flex: none; transition: transform .2s; }
.chev.flip { transform: rotate(180deg); }
.biz-card .art { height: 92px; border-radius: 12px; }
.biz-card .art::after { background: linear-gradient(90deg, transparent 60%, rgba(0,0,0,.35)); }
.biz-card h3 { margin: 0; font-size: 15.5px; color: var(--gold-hi); }
.biz-card .metric { font-size: 17px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }

.hero-art { height: 190px; border-radius: 18px; margin: 0 0 14px; border: 1px solid var(--line); }
.hero-art .cap { position: absolute; left: 14px; bottom: 12px; z-index: 2; }
.hero-art .cap h2 { margin: 0; font-size: 22px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.hero-art .cap p { margin: 2px 0 0; font-size: 12.5px; color: rgba(255,255,255,.8); }
.hero-art .badge { position: absolute; right: 12px; top: 12px; z-index: 2; backdrop-filter: blur(6px); }

/* ---------------------------------------------------------------- Login */
.login { min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(7,7,10,.92) 0%, rgba(7,7,10,.25) 26%, rgba(7,7,10,.05) 42%, rgba(7,7,10,.85) 62%, #07070a 76%), url(../img/login-hero.webp) center 30% / cover no-repeat, #07070a; }
.login-brand { padding: 18px 24px 0; text-align: center; }
.login-form { padding: 0 24px 30px; }
.login .crest { width: 74px; height: 74px; margin: 6px auto 6px; display: block; filter: drop-shadow(0 0 22px rgba(214,180,108,.55)); }
.login .title { text-align: center; font-family: var(--serif); font-size: 31px; letter-spacing: 3px; font-weight: 700; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 8px rgba(0,0,0,.8)); }
.login .subtitle { text-align: center; font-size: 12px; letter-spacing: 4px; color: var(--gold); margin-top: 4px; }
.login .slogan { text-align: center; font-style: italic; color: var(--gold-hi); margin: 14px 0 0; font-family: Georgia, serif; font-size: 16px; text-shadow: 0 2px 8px #000; }
.field { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(10,10,12,.72); backdrop-filter: blur(8px); }
.field + .field { margin-top: 12px; }
.field svg { width: 19px; height: 19px; color: var(--gold); flex: none; }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 15px; }
.field input::placeholder { color: var(--dim); }
.login .err { color: var(--bad); font-size: 13px; text-align: center; min-height: 18px; margin: 8px 0; }

/* ---------------------------------------------------------------- Welcome */
.welcome { display: flex; align-items: center; gap: 12px; margin: 8px 0 14px; }
.avatar { width: 54px; height: 54px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 19px; color: #20180a; background: var(--gold-grad); box-shadow: 0 0 0 2px #0b0b0d, 0 0 0 3px var(--gold); }
.welcome .hello { font-size: 13px; color: var(--muted); }
.welcome .name { font-size: 18px; font-weight: 700; }
.idchip { display: inline-flex; gap: 6px; align-items: center; margin-top: 4px; padding: 2px 8px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 11px; color: var(--gold-hi); }

/* ---------------------------------------------------------------- Share class card */
.class-card { border-radius: 18px; padding: 18px; position: relative; overflow: hidden; border: 1px solid var(--line-strong); }
.class-card.A { background: linear-gradient(140deg, #2b2312 0%, #17130b 60%, #0f0d09 100%); }
.class-card.B { background: linear-gradient(140deg, #232733 0%, #14161d 60%, #0d0e12 100%); border-color: rgba(190,200,220,.35); }
.class-card.C { background: linear-gradient(140deg, #2a2a2c 0%, #18181a 70%); border-color: rgba(160,160,170,.3); }
.class-card .ctitle { position: absolute; right: 18px; top: 14px; font-size: 22px; font-weight: 800; letter-spacing: 1px; }
.class-card.A .ctitle, .class-card.A .camt { color: #f0d28c; }
.class-card.B .ctitle, .class-card.B .camt { color: #d6deef; }
.class-card.C .ctitle, .class-card.C .camt { color: #e4e4e8; }
.class-card .camt { font-size: 30px; font-weight: 800; margin: 14px 0 4px; }
.class-card ul { margin: 12px 0 0; padding: 12px 0 0 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13.5px; line-height: 1.85; }

.vip-card { height: 190px; border-radius: 16px; position: relative; overflow: hidden; background: radial-gradient(circle at 20% 20%, #3a3326 0%, #121110 60%), #121110; border: 1px solid #5b4a2b; box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.vip-card::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(125deg, transparent 0 22px, rgba(214,180,108,.06) 22px 23px), linear-gradient(115deg, transparent 40%, rgba(255,230,170,.12) 50%, transparent 60%); }
.vip-card .v { position: absolute; left: 0; right: 0; top: 34px; text-align: center; font-family: var(--serif); font-size: 54px; letter-spacing: 6px; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vip-card .m { position: absolute; left: 0; right: 0; top: 104px; text-align: center; letter-spacing: 5px; font-size: 11px; color: var(--gold); }
.vip-card .no { position: absolute; right: 16px; bottom: 14px; font-size: 13px; letter-spacing: 2px; color: var(--gold-hi); font-family: ui-monospace, Menlo, monospace; }
.vip-card .holder { position: absolute; left: 16px; bottom: 14px; font-size: 12px; color: var(--muted); letter-spacing: 1px; }

/* ---------------------------------------------------------------- Tables */
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th, .table td { padding: 9px 6px; border-bottom: 1px solid rgba(214,180,108,.1); text-align: right; font-variant-numeric: tabular-nums; }
.table th { color: var(--muted); font-weight: 600; font-size: 11.5px; }
.table th:first-child, .table td:first-child { text-align: left; }
.table tr:last-child td { border-bottom: 0; }
.table tfoot td { color: var(--gold-hi); font-weight: 700; border-top: 1px solid var(--line-strong); }
.scroll-x { overflow-x: auto; }

/* ---------------------------------------------------------------- Charts */
.chart { width: 100%; display: block; }
.chart text { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.legend { display: flex; gap: 14px; justify-content: center; font-size: 11.5px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.donut-wrap { display: flex; align-items: center; gap: 14px; }
.donut-wrap svg { flex: none; }

/* ---------------------------------------------------------------- Misc */
.lock { text-align: center; padding: 26px 18px; }
.lock svg { width: 34px; height: 34px; color: var(--gold); }
.lock h3 { margin: 10px 0 4px; color: var(--gold-hi); font-size: 16px; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; font-size: 13px; }
.note { font-size: 11.5px; color: var(--dim); line-height: 1.6; margin-top: 10px; }
.callout { border: 1px solid rgba(232,169,60,.35); background: rgba(232,169,60,.07); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; line-height: 1.55; color: #f1d7a6; }
.callout + .callout { margin-top: 8px; }
.callout.info { border-color: rgba(90,162,230,.35); background: rgba(90,162,230,.07); color: #bfd9f3; }
.check { display: flex; gap: 6px; align-items: center; font-size: 12px; padding: 3px 0; }
.check svg { width: 14px; height: 14px; flex: none; }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.search svg { width: 16px; height: 16px; color: var(--muted); }
.search input { flex: 1; background: none; border: 0; outline: none; font-size: 14px; min-width: 0; }
select.select { width: 100%; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: #15151a; padding: 0 10px; }
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: 16px; padding: 26px 16px; text-align: center; background: rgba(214,180,108,.04); cursor: pointer; display: block; }
.dropzone.drag { background: rgba(214,180,108,.12); }
.dropzone svg { width: 36px; height: 36px; color: var(--gold); }
.dropzone input { display: none; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line-strong); color: var(--gold-hi); font-size: 18px; }
.stepper b { min-width: 46px; text-align: center; }
.toast { position: absolute; left: 50%; bottom: 112px; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 80; padding: 10px 16px; border-radius: 12px; background: rgba(30,28,22,.95); border: 1px solid var(--line-strong); color: var(--gold-hi); font-size: 13px; transition: .25s; pointer-events: none; max-width: 86%; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); z-index: 70; animation: fade .2s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 71; max-height: 82%; overflow-y: auto; background: #121216; border-top: 1px solid var(--line-strong); border-radius: 22px 22px 0 0; padding: 10px 18px 34px; animation: up .25s ease; }
.sheet .grip { width: 40px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.2); margin: 0 auto 12px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40%); opacity: .4; } }
.ring-text { font-size: 15px; font-weight: 800; fill: var(--gold-hi) !important; }
.pill-tabs { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 4px 0 10px; }

/* ---------------------------------------------------------------- Image-backed gold cards */
.gold-card.with-img { padding-right: 132px; min-height: 128px; }
.gold-card .gc-img { position: absolute; right: -6px; bottom: -10px; width: 140px; height: 140px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(60,40,5,.45)); pointer-events: none; }

/* ---------------------------------------------------------------- Promo banners */
.promo { display: block; width: 100%; text-align: left; border-radius: 20px; min-height: 230px; border: 1px solid var(--line-strong); box-shadow: 0 14px 34px rgba(0,0,0,.5); }
.promo::after { background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.88) 100%); }
.promo.tall { min-height: 270px; }
.promo.slim { min-height: 0; }
.promo.slim::after { background: linear-gradient(90deg, rgba(5,5,8,.92) 0%, rgba(5,5,8,.6) 60%, rgba(5,5,8,.2) 100%); }
.promo-body { position: relative; z-index: 2; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; min-height: inherit; }
.promo-body > .btn { align-self: flex-start; }
.promo.slim .promo-body { padding: 16px; }
.promo h2 { margin: 10px 0 4px; font-size: 25px; line-height: 1.25; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.7); }
.promo p { margin: 0; font-size: 13px; color: rgba(255,255,255,.82); }
.promo .badge { align-self: flex-start; backdrop-filter: blur(8px); background: rgba(20,16,8,.55); border: 1px solid var(--line-strong); }

/* ---------------------------------------------------------------- Horizontal photo tiles */
.hscroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px 4px; scroll-snap-type: x mandatory; }
.hscroll::-webkit-scrollbar { display: none; }
.tile { flex: none; width: 150px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); text-align: left; scroll-snap-align: start; }
.tile-img { height: 100px; }
.tile-cap { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }

/* ---------------------------------------------------------------- Tier cards (Concepts style) */
.tier { border-radius: 18px; padding: 18px; border: 1px solid rgba(214,180,108,.35); position: relative; overflow: hidden; }
.tier::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 55%, rgba(255,255,255,.05) 62%, transparent 70%); }
.tier-A { background: linear-gradient(150deg, #2c2414 0%, #1c180f 55%, #120f0a 100%); box-shadow: inset 0 1px 0 rgba(255,220,150,.15), 0 12px 30px rgba(0,0,0,.45); }
.tier-B { background: linear-gradient(150deg, #22262f 0%, #171a21 60%, #101216 100%); border-color: rgba(170,180,210,.35); }
.tier-C { background: linear-gradient(150deg, #2b2b2d 0%, #202022 100%); border-color: rgba(160,160,170,.28); }
.tier-tag { font-size: 12.5px; padding: 4px 11px; border-radius: 999px; font-weight: 600; }
.tier-A .tier-tag { color: #49c97a; background: rgba(40,140,80,.18); }
.tier-B .tier-tag { color: #c9d3ea; background: rgba(150,165,200,.16); }
.tier-C .tier-tag { color: #d9d9dd; background: rgba(255,255,255,.1); }
.tier-title { font-size: 22px; font-weight: 800; letter-spacing: .5px; }
.tier-A .tier-title, .tier-A .tier-price { color: #f0d28c; }
.tier-B .tier-title, .tier-B .tier-price { color: #d6deef; }
.tier-C .tier-title, .tier-C .tier-price { color: #ececf0; }
.tier-price { font-size: 34px; font-weight: 800; margin: 12px 0 4px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.tier-role { font-size: 16px; font-weight: 600; color: #f2ead8; padding-bottom: 12px; border-bottom: 1px solid rgba(214,180,108,.3); }
.tier-B .tier-role, .tier-C .tier-role { border-bottom-color: rgba(150,150,180,.35); }
.tier ul { margin: 12px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.9; }
.tier-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(255,255,255,.12); }

/* ---------------------------------------------------------------- Investor widgets */
.center-text { text-align: center; }
.proof { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.proof > div { padding: 12px 6px; text-align: center; display: flex; flex-direction: column; gap: 3px; }
.proof > div + div { border-left: 1px solid rgba(214,180,108,.12); }
.proof b { color: var(--gold-hi); font-size: 17px; font-variant-numeric: tabular-nums; }
.proof span { font-size: 11px; color: var(--muted); }
.inline-ic { width: 12px; height: 12px; vertical-align: -2px; color: var(--ok); }
.gold-ic { width: 26px; height: 26px; color: var(--gold); }
.why { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); display: flex; flex-direction: column; gap: 6px; }
.why svg { width: 26px; height: 26px; color: var(--gold); }
.why b { font-size: 14px; color: var(--gold-hi); }
.why span { font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.step { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; position: relative; }
.step + .step::before { content: ""; position: absolute; left: 13px; top: -10px; height: 18px; border-left: 1px dashed var(--line-strong); }
.step-no { width: 27px; height: 27px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; border: 1px solid var(--line-strong); color: var(--gold-hi); }
.step.done .step-no { background: var(--ok); border-color: var(--ok); color: #062; }
.step b { font-size: 14px; }
.scen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.scen button { border: 1px solid var(--line); border-radius: 12px; padding: 8px 6px; text-align: center; display: flex; flex-direction: column; gap: 2px; background: rgba(255,255,255,.02); }
.scen button b { font-size: 12px; color: var(--muted); }
.scen button span { font-size: 15px; font-weight: 800; color: var(--text); }
.scen button i { font-style: normal; font-size: 10px; color: var(--dim); }
.scen button.active { border-color: var(--gold); background: rgba(214,180,108,.12); }
.scen button.active b, .scen button.active span { color: var(--gold-hi); }
.range { width: 100%; accent-color: var(--gold); }
.kpi.hl { border-color: rgba(79,194,124,.45); background: linear-gradient(180deg, rgba(79,194,124,.12), var(--panel)); }
.kpi.hl .v { color: #6ad597; }
.rank { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; font-weight: 800; color: #20180a; background: var(--gold-grad); }
.rank.r2 { background: linear-gradient(135deg, #eef1f6, #9aa3b2); }
.rank.r3 { background: linear-gradient(135deg, #f0c39a, #9c5f2f); }
.ntile { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; color: #fff; }
.ntile svg { width: 20px; height: 20px; }
.ntile.lg { width: 48px; height: 48px; border-radius: 13px; }
.ntile.lg svg { width: 26px; height: 26px; }
.ntile.red { background: linear-gradient(145deg, #ff6b5e, #b3221a); box-shadow: 0 4px 14px rgba(226,87,76,.35); }
.ntile.blue { background: linear-gradient(145deg, #6fb2f2, #1f5fae); box-shadow: 0 4px 14px rgba(90,162,230,.3); }
.ntile.gold { background: var(--gold-grad); color: #2a1f08; box-shadow: 0 4px 14px rgba(214,180,108,.3); }

/* ---------------------------------------------------------------- Subscription flow */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.steps > div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: var(--dim); position: relative; }
.steps span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); font-weight: 700; font-size: 12px; }
.steps .on { color: var(--gold-hi); }
.steps .on span { background: var(--gold-grad); color: #20180a; border-color: transparent; }
.steps .done { color: var(--ok); }
.steps .done span { border-color: var(--ok); color: var(--ok); }
.pick { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel-2), var(--panel)); text-align: left; }
.pick .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--dim); flex: none; }
.pick.active { border-color: var(--gold); background: linear-gradient(180deg, rgba(214,180,108,.14), var(--panel)); }
.pick.active .radio { border-color: var(--gold); background: radial-gradient(circle, var(--gold) 45%, transparent 50%); }
.pick[disabled] { opacity: .4; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.6; color: var(--muted); }
.agree input { width: 18px; height: 18px; accent-color: var(--gold); flex: none; margin-top: 2px; }
.success { text-align: center; padding: 18px 0 4px; }
.success-ic { width: 76px; height: 76px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(79,194,124,.3), rgba(79,194,124,.05)); color: var(--ok); }
.success-ic svg { width: 46px; height: 46px; }
.success h2 { margin: 0 0 6px; font-size: 21px; color: var(--gold-hi); }

/* ---------------------------------------------------------------- Layout helpers (phone defaults) */
.cols > .col + .col { margin-top: 12px; }
.cols > .col + .col > .section-title:first-child { margin-top: 18px; }
.cols + .card, .card + .cols, .cols + .cols { margin-top: 12px; }
.chart { max-height: 300px; }
.login-panel { display: contents; }
.install-ic { width: 40px; height: 40px; flex: none; }
.install-ic svg { width: 100%; height: 100%; }
.side-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------------------------------------------------------------- Desktop website (≥1024px) */
@media (min-width: 1024px) {
  .mobile-only { display: none !important; }
  .device { flex-direction: row; }
  .tabbar, .tabbar:not([hidden]) { display: none; }
  body { background: radial-gradient(1400px 800px at 70% -20%, #1f1a10 0%, var(--bg) 60%); }
  .device { background: transparent; }
  .screen { scrollbar-width: thin; scrollbar-color: rgba(214,180,108,.3) transparent; }
  .screen::-webkit-scrollbar { display: block; width: 10px; }
  .screen::-webkit-scrollbar-thumb { background: rgba(214,180,108,.25); border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; }

  .sidebar:not([hidden]) {
    display: flex; flex-direction: column; flex: none; width: 260px; height: 100%;
    padding: 22px 14px 16px; gap: 18px;
    background: linear-gradient(180deg, #0f0f13, #0a0a0d); border-right: 1px solid var(--line);
    overflow-y: auto;
  }
  .side-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
  .side-brand .mark { width: 40px; height: 40px; flex: none; }
  .side-brand .word { font-family: var(--serif); font-size: 15px; letter-spacing: 1.2px; white-space: nowrap; font-weight: 700; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .side-title { font-size: 11px; letter-spacing: 2px; color: var(--dim); padding: 16px 12px 6px; text-transform: uppercase; }
  .side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--muted); font-size: 14px; text-align: left; transition: background .15s, color .15s; }
  .side-link svg { width: 19px; height: 19px; flex: none; }
  .side-link:hover { background: rgba(214,180,108,.07); color: var(--text); }
  .side-link.active { background: linear-gradient(90deg, rgba(214,180,108,.2), rgba(214,180,108,.04)); color: var(--gold-hi); font-weight: 600; box-shadow: inset 3px 0 0 var(--gold); }
  .side-user { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
  .side-user .avatar { width: 38px; height: 38px; font-size: 14px; }
  .side-cta { border: 1px solid var(--line-strong); border-radius: 14px; padding: 14px; background: rgba(214,180,108,.05); }

  .page { max-width: 1200px; padding: 26px 40px 60px; }
  .page.with-tabs { padding-bottom: 60px; }
  .page.narrow { max-width: 820px; }
  .navbar { grid-template-columns: auto 1fr auto; gap: 8px; height: 56px; margin: 0 0 12px; }
  .navbar h1 { text-align: left; font-size: 24px; letter-spacing: .5px; }
  .brandbar .brand { visibility: hidden; }
  .section-title { margin-top: 28px; }
  .section-title h2 { font-size: 18px; }

  .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
  .promo + .cols, .hero-art + .cols, .chips + .cols { margin-top: 26px; }
  .cols > .col + .col { margin-top: 0; }
  .cols > .col > :first-child, .cols > .col > .section-title:first-child, .cols > .col + .col > .section-title:first-child { margin-top: 0; }
  .dgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .dgrid > * + * { margin-top: 0 !important; }
  .tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
  .tiers > * + * { margin-top: 0 !important; }
  .tiers .tier { display: flex; flex-direction: column; }
  .tiers .tier ul { flex: 1; }
  .grid2.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .btn.cta { max-width: 420px; margin-left: auto; margin-right: auto; }
  .promo.hero { min-height: 380px; }
  .promo.hero h2 { font-size: 40px; }
  .promo.hero p { font-size: 16px; }
  .promo.tall { min-height: 340px; }
  .promo.tall h2 { font-size: 38px; }
  .promo-body { padding: 32px; }
  .hero-art { height: 300px; }
  .hero-art .cap h2 { font-size: 30px; }
  .hscroll { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin: 0; padding: 0; overflow: visible; }
  .tile { width: auto; transition: transform .15s, border-color .15s; }
  .tile:hover, .card.press:hover { border-color: var(--line-strong); transform: translateY(-2px); }
  .tile-img { height: 130px; }
  .card.biz-card { grid-template-columns: 150px 1fr 16px; }
  .biz-card .art { height: 110px; }
  .list > button.li:hover { background: rgba(214,180,108,.05); }
  .btn { cursor: pointer; }
  .btn.gold:hover { filter: brightness(1.06); }
  .pill-tabs { top: -26px; padding-top: 14px; }
  .toast { position: fixed; bottom: 36px; }
  body.authed .toast { left: calc(50% + 130px); }

  /* Bottom sheet becomes a centred dialog. */
  .sheet-backdrop { position: fixed; }
  .sheet { position: fixed; left: 50%; top: 50%; bottom: auto; right: auto; width: min(520px, 92vw); transform: translate(-50%, -50%); border-radius: 20px; border: 1px solid var(--line-strong); padding: 22px 26px 26px; animation: fade .2s; }
  .sheet .grip { display: none; }

  /* Login: full-bleed photo with a glass panel on the right. */
  .login { flex-direction: row; align-items: center; justify-content: flex-end; padding: 40px 8vw;
    background: linear-gradient(90deg, rgba(7,7,10,.15) 0%, rgba(7,7,10,.55) 55%, rgba(7,7,10,.92) 100%), url(../img/login-hero.webp) center 35% / cover no-repeat, #07070a; }
  .login-panel { display: block; width: 420px; padding: 34px 34px 28px; border-radius: 24px; border: 1px solid var(--line-strong);
    background: rgba(10,10,13,.72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
  .login-brand { padding: 0 0 20px; }
  .login-form { padding: 0; }
}
