:root {
  --bg: #f5f5f7;
  --bg-2: #f2f2f7;
  --card: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #515154;
  --ink-3: #86868b;
  --line: #e5e5ea;
  --line-2: #d2d2d7;
  --main: #0071e3;
  --accent: #0071e3;
  --accent-ink: #ffffff;
  --up: #ff3b30;
  --down: #34c759;
  --up-bg: rgba(255, 59, 48, .1);
  --down-bg: rgba(52, 199, 89, .12);
  --eq: #ff9500;
  --bd: #007aff;
  --gd: #b88a00;
  --cm: #ff2d55;
  --cash: #aeaeb2;
  --bench: #aeaeb2;
  --warn: #9a5b00;
  --warn-bg: #fff4db;
  --tab: rgba(255, 255, 255, .8);
  --g-brand: linear-gradient(160deg, #2997ff 0%, #0071e3 60%, #0058b8 100%);
  --g-green: linear-gradient(160deg, #2bb673 0%, #0e7c56 100%);
  --g-graphite: linear-gradient(160deg, #3a3a3c 0%, #1d1d1f 100%);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px -14px rgba(0, 0, 0, .14);
  --radius: 24px;
  --radius-s: 16px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  --num: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-2: #2c2c2e;
    --card: #1c1c1e;
    --ink: #f5f5f7;
    --ink-2: #a1a1a6;
    --ink-3: #8e8e93;
    --line: #2c2c2e;
    --line-2: #3a3a3c;
    --main: #0a84ff;
    --accent: #0a84ff;
    --up: #ff453a;
    --down: #30d158;
    --up-bg: rgba(255, 69, 58, .16);
    --down-bg: rgba(48, 209, 88, .16);
    --eq: #ff9f0a;
    --bd: #0a84ff;
    --gd: #ffd60a;
    --cm: #ff375f;
    --cash: #636366;
    --bench: #636366;
    --warn: #ffb340;
    --warn-bg: rgba(255, 159, 10, .12);
    --tab: rgba(28, 28, 30, .8);
    --g-brand: linear-gradient(160deg, #1e6fd9 0%, #0a4fa8 100%);
    --g-green: linear-gradient(160deg, #1f7a46 0%, #0e4f30 100%);
    --g-graphite: linear-gradient(160deg, #3a3a3c 0%, #1c1c1e 100%);
    --shadow: 0 0 0 .5px rgba(255, 255, 255, .06) inset, 0 12px 30px -16px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(100px + env(safe-area-inset-bottom));
}
main { flex: 1; width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.num, .mono { font-family: var(--num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.up { color: var(--up); }
.down { color: var(--down); }
.muted { color: var(--ink-3); }
.hide { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------------ top bar + tab bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--tab);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  padding-top: env(safe-area-inset-top);
}
.topbar-in {
  max-width: 1120px; margin: 0 auto; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(16px, env(safe-area-inset-left));
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; font-size: 17px; letter-spacing: .01em; }
.brand svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; gap: 4px; background: var(--bg-2); border-radius: 999px; padding: 3px; }
.nav a {
  text-decoration: none; color: var(--ink-2); font-size: 14px; font-weight: 600;
  padding: 6px 16px; border-radius: 999px; transition: background .15s, color .15s;
}
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.tabbar {
  display: none;
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
  height: 66px; border-radius: 26px; background: var(--tab);
  backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: 0 14px 36px -12px rgba(0, 0, 0, .28), 0 0 0 1px color-mix(in srgb, var(--line) 80%, transparent) inset;
  grid-template-columns: repeat(3, 1fr); padding: 6px; z-index: 30;
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 20px; color: var(--ink-3); text-decoration: none; font-size: 11.5px; font-weight: 600;
}
.tabbar a i { width: 46px; height: 28px; border-radius: 14px; display: grid; place-items: center; transition: background .2s; }
.tabbar a i svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--accent); }
.tabbar a.on i { background: color-mix(in srgb, var(--accent) 14%, transparent); }

@media (max-width: 759px) {
  .topbar-in { height: 54px; }
  .nav { display: none; }
  .tabbar { display: grid; }
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.foot { max-width: 1120px; margin: 56px auto 0; padding: 22px 16px 28px; color: var(--ink-3); font-size: 12.5px; border-top: 1px solid var(--line); width: 100%; }

/* ------------------------------------------------------------ building blocks */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; min-width: 0;
}
@media (max-width: 640px) { .card { padding: 20px 18px; border-radius: 22px; } }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-h h3 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.card-h .aside { font-size: 12.5px; color: var(--ink-3); }

.eyebrow { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.section { padding: 56px 0 0; }
.section > .wrap > h2, .section-title { font-size: clamp(24px, 3.4vw, 32px); font-weight: 750; letter-spacing: -.02em; margin: 6px 0 8px; }
.section-lead { color: var(--ink-2); max-width: 620px; margin-bottom: 22px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 24px; border-radius: 999px; border: 0;
  font-weight: 650; font-size: 15.5px; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, background .15s, opacity .15s, box-shadow .15s;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: var(--bg-2); color: var(--ink); }
.btn-ghost:hover { background: var(--line); }
.btn-soft { background: var(--bg-2); color: var(--ink); }
.btn-soft:hover { background: var(--line); }
.btn-danger { background: transparent; color: var(--up); }
.btn-s { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 650; padding: 2px 9px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.buy { background: var(--up-bg); color: var(--up); }
.chip.sell { background: var(--down-bg); color: var(--down); }
.dot { width: 10px; height: 10px; border-radius: 4px; display: inline-block; flex: none; }

.seg { display: inline-flex; background: var(--bg-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .14); }

.field { display: block; }
.field label, .field .lbl { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.input {
  width: 100%; height: 50px; border-radius: 16px; border: 1px solid transparent; background: var(--bg-2);
  padding: 0 16px; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.input:focus { border-color: var(--accent); background: var(--card); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.money-input { position: relative; }
.money-input .input { font-family: var(--num); font-size: 30px; font-weight: 700; height: 70px; padding-left: 44px; letter-spacing: -.02em; border-radius: 20px; }
.money-input::before { content: "¥"; position: absolute; left: 18px; top: 50%; transform: translateY(-52%); font-size: 24px; color: var(--ink-3); font-weight: 600; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.quick button { border: 0; background: var(--bg-2); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); font-family: var(--num); }
.quick button:hover { color: var(--ink); background: var(--line); }
.hint { font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.hint.err { color: var(--up); }

/* ------------------------------------------------------------ hero */
.hero { padding: 16px 0 8px; position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: center;
  background: var(--g-brand); color: #fff; border-radius: 32px; padding: 44px 44px 40px; position: relative; overflow: hidden;
  box-shadow: 0 26px 46px -26px color-mix(in srgb, var(--accent) 70%, transparent);
}
.hero-grid::after {
  content: ""; position: absolute; right: -120px; top: -140px; width: 420px; height: 420px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 0 0 60px rgba(255, 255, 255, .04), 0 0 0 120px rgba(255, 255, 255, .03);
  pointer-events: none;
}
.hero .eyebrow { color: rgba(255, 255, 255, .75); }
.hero h1 { font-size: clamp(36px, 5.6vw, 58px); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; margin: 12px 0 16px; position: relative; }
.hero h1 em { font-style: normal; opacity: .92; }
.hero .lead { font-size: 17px; color: rgba(255, 255, 255, .88); max-width: 520px; position: relative; }
.hero-cta { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; position: relative; }
.hero .btn-primary { background: #fff; color: #0064d2; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .4); }
.hero .btn-ghost { background: rgba(255, 255, 255, .16); color: #fff; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .24); }
.hero-art { position: relative; max-width: 360px; justify-self: center; width: 100%; background: rgba(255, 255, 255, .12); border-radius: 28px; padding: 22px; }
.hero-art .donut { position: relative; aspect-ratio: 1; }
.hero-art .muted { color: rgba(255, 255, 255, .75) !important; }
.hero-art .alloc-legend { color: rgba(255, 255, 255, .9); }
.hero-art .alloc-legend b { color: #fff; }
@media (max-width: 860px) {
  .hero { padding-top: 8px; }
  .hero-grid { grid-template-columns: 1fr; gap: 6px; padding: 30px 24px 26px; border-radius: 28px; }
  .hero-art { max-width: 280px; margin: 14px auto 0; }
}

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.kpi { background: var(--card); border-radius: var(--radius-s); padding: 18px 18px 16px; box-shadow: var(--shadow); }
.kpi .k { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.kpi .v { font-family: var(--num); font-size: clamp(24px, 3.4vw, 32px); font-weight: 750; letter-spacing: -.02em; line-height: 1.2; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; } .kpi { padding: 15px; border-radius: 20px; } }

/* ------------------------------------------------------------ charts */
.chart { position: relative; width: 100%; touch-action: pan-y; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis text { font-size: 11px; fill: var(--ink-3); font-family: var(--num); }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .zero { stroke: var(--line-2); }
.chart .cross { stroke: var(--ink-3); stroke-dasharray: 3 3; }
.chart .draw { stroke-dasharray: 1; animation: draw 1.2s cubic-bezier(.3, .6, .2, 1) both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.tip {
  position: absolute; pointer-events: none; z-index: 3; background: var(--ink); color: var(--bg);
  border-radius: 14px; padding: 9px 12px; font-size: 12.5px; line-height: 1.55; white-space: nowrap;
  box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .4); transform: translate(-50%, -100%); opacity: 0; transition: opacity .12s;
}
.tip.on { opacity: 1; }
.tip b { font-family: var(--num); font-weight: 650; }
.tip .row { display: flex; align-items: center; gap: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 4px; border-radius: 4px; display: inline-block; }

.chart-card .card-h { flex-wrap: wrap; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 16px; }

/* heatmap */
.heat { display: grid; grid-template-columns: 44px repeat(12, 1fr) 58px; gap: 4px; font-family: var(--num); font-size: 11.5px; }
.heat .h { color: var(--ink-3); text-align: center; padding: 2px 0; font-weight: 500; }
.heat .y { color: var(--ink-2); font-weight: 650; display: flex; align-items: center; }
.heat .c { border-radius: 8px; text-align: center; padding: 8px 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.heat .t { text-align: right; font-weight: 700; display: flex; align-items: center; justify-content: flex-end; }
@media (max-width: 640px) {
  .heat { grid-template-columns: 34px repeat(12, 1fr) 44px; gap: 3px; font-size: 9.5px; }
  .heat .c { padding: 6px 0; border-radius: 5px; }
  .heat .c span, .heat .h small { display: none; }
}

/* sleeves */
.sleeves { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 960px) { .sleeves { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .sleeves { grid-template-columns: 1fr; } }
.sleeve { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.sleeve::before { content: ""; position: absolute; left: 20px; right: 20px; top: 0; height: 4px; border-radius: 0 0 4px 4px; background: var(--c); }
.sleeve h4 { margin: 6px 0 2px; font-size: 17px; display: flex; justify-content: space-between; align-items: baseline; }
.sleeve h4 .num { font-size: 22px; color: var(--c); font-weight: 750; }
.sleeve .role { color: var(--ink-2); font-size: 13.5px; margin-bottom: 12px; }
.sleeve ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sleeve li { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; border-top: 1px solid var(--line); padding-top: 8px; }
.sleeve li .n { font-weight: 650; }
.sleeve li .d { color: var(--ink-3); font-size: 12.5px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: s; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 750; font-family: var(--num); margin-bottom: 14px; }
.step h4 { margin: 0 0 4px; font-size: 16px; font-weight: 650; }
.step p { color: var(--ink-2); font-size: 14px; }

.notes { display: grid; gap: 10px; }
.note { display: flex; gap: 12px; padding: 16px 18px; background: var(--card); border-radius: var(--radius-s); box-shadow: var(--shadow); font-size: 14px; color: var(--ink-2); }
.note b { color: var(--ink); }
.note .ic { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--warn-bg); color: var(--warn); font-weight: 800; font-size: 13px; }

/* ------------------------------------------------------------ start / calculator */
.calc { display: grid; grid-template-columns: 380px 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }
.orders { display: grid; }
.order {
  display: grid; grid-template-columns: 42px 1fr auto; gap: 14px; align-items: center;
  padding: 14px 4px; border-top: 1px solid var(--line); min-height: 76px;
}
.order:first-child { border-top: 0; }
.order .side { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.order .side.buy { background: var(--up-bg); color: var(--up); }
.order .side.sell { background: var(--down-bg); color: var(--down); }
.order .nm { font-weight: 650; font-size: 15.5px; line-height: 1.3; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.order .sub { font-size: 12.5px; color: var(--ink-3); font-family: var(--num); margin-top: 3px; }
.order .qty { text-align: right; }
.order .qty .s { font-family: var(--num); font-weight: 750; font-size: 18px; font-variant-numeric: tabular-nums; }
.order .qty .a { font-size: 12.5px; color: var(--ink-3); font-family: var(--num); }
.order.done > div { opacity: .5; }
.order.done .nm { text-decoration: line-through; text-decoration-color: var(--ink-3); }
.summary-line { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0; color: var(--ink-2); }
.summary-line b { color: var(--ink); font-family: var(--num); }
.alloc-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--bg-2); gap: 2px; }
.alloc-bar > i { display: block; height: 100%; }
.alloc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.alloc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.alloc-legend b { font-family: var(--num); color: var(--ink); font-weight: 650; }

/* ------------------------------------------------------------ dashboard */
.dash { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; padding-top: 14px; }
@media (max-width: 960px) { .dash { grid-template-columns: 1fr; } .dash > .col { display: contents; } }
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 22px; }
.dash-head h1 { font-size: 26px; font-weight: 750; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 14px; border: 0; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--ink); }
.icon-btn:hover { color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.value-card { background: var(--g-green); color: #fff; box-shadow: 0 26px 44px -26px rgba(14, 124, 86, .7); position: relative; overflow: hidden; }
.value-card::after {
  content: ""; position: absolute; right: -110px; top: -120px; width: 320px; height: 320px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 0 0 60px rgba(255, 255, 255, .04); pointer-events: none;
}
.value-card > * { position: relative; }
.value-card .muted { color: rgba(255, 255, 255, .78) !important; }
.value-card .total { font-family: var(--num); font-size: clamp(38px, 6vw, 50px); font-weight: 780; letter-spacing: -.035em; line-height: 1.1; font-variant-numeric: tabular-nums; margin: 6px 0 2px; }
.value-card .total small { font-size: .5em; opacity: .85; margin-right: 4px; font-weight: 650; }
.value-card .up, .value-card .down { color: #fff !important; }
.value-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.value-row > div { background: rgba(255, 255, 255, .15); border-radius: 18px; padding: 12px 13px; min-width: 0; }
.value-row .k { font-size: 12.5px; color: rgba(255, 255, 255, .8); }
.value-row .v { font-family: var(--num); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.value-row .v small { font-size: 12.5px; font-weight: 600; margin-left: 3px; }
@media (max-width: 420px) { .value-row .v { font-size: 14.5px; } }

.status-card { position: relative; overflow: hidden; }
.status-card .badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; padding: 5px 11px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.status-card.hot .badge { background: var(--up-bg); color: var(--up); }
.status-card.hot .badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.status-card h2 { font-size: 22px; font-weight: 750; letter-spacing: -.02em; margin: 12px 0 4px; }
.status-card .desc { color: var(--ink-2); font-size: 14px; }
.status-card:not(.hot) { background: var(--g-graphite); color: #fff; box-shadow: 0 26px 44px -26px rgba(0, 0, 0, .5); }
.status-card:not(.hot) .desc, .status-card:not(.hot) .muted { color: rgba(255, 255, 255, .78); }
.status-card:not(.hot) .badge { background: rgba(255, 255, 255, .16); color: #fff; }
.status-card:not(.hot) .linkish { color: rgba(255, 255, 255, .8); }
.status-card:not(.hot) .btn-ghost { background: rgba(255, 255, 255, .16); color: #fff; }
.countdown { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 2px; }
.countdown .n { font-family: var(--num); font-size: 88px; font-weight: 800; letter-spacing: -.05em; line-height: .95; }
.countdown .muted { font-size: 17px; font-weight: 600; }
.progress { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; margin: 14px 0 6px; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .35s cubic-bezier(.2,.8,.2,1); }
.check {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line-2); background: transparent;
  display: grid; place-items: center; color: transparent; transition: background .2s, border-color .2s, color .2s; flex: none;
}
.check svg { width: 16px; height: 16px; }
.check.on { background: var(--accent); border-color: transparent; color: #fff; }
.order .acts { display: flex; align-items: center; gap: 8px; }
.linkish { background: none; border: 0; padding: 0; color: var(--ink-3); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--ink); }
.plan-tips { font-size: 13px; color: var(--ink-2); background: var(--bg-2); border-radius: 16px; padding: 12px 14px; margin: 16px 0; display: grid; gap: 4px; }
.status-card:not(.hot) .plan-tips { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .85); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

.holdings { width: 100%; border-collapse: collapse; font-size: 14px; }
.holdings th { text-align: right; font-weight: 600; font-size: 12px; color: var(--ink-3); padding: 0 0 8px; }
.holdings th:first-child, .holdings td:first-child { text-align: left; }
.holdings td { text-align: right; padding: 12px 0; border-top: 1px solid var(--line); font-family: var(--num); font-variant-numeric: tabular-nums; vertical-align: middle; }
.holdings td:first-child { font-family: var(--font); }
.holdings .nm { font-weight: 650; display: flex; align-items: center; gap: 8px; }
.holdings .cd { font-size: 12px; color: var(--ink-3); font-family: var(--num); padding-left: 18px; }
.wbar { position: relative; height: 6px; background: var(--bg-2); border-radius: 999px; margin-top: 6px; width: 72px; margin-left: auto; }
.wbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.wbar b { position: absolute; top: -4px; width: 2px; height: 14px; background: var(--ink); border-radius: 1px; opacity: .7; }
@media (max-width: 520px) { .holdings .hide-s { display: none; } }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.timeline li:first-child { border-top: 0; }
.timeline .d { color: var(--ink-3); font-family: var(--num); font-size: 12.5px; }
.timeline .r { font-family: var(--num); text-align: right; font-weight: 650; }

.empty { text-align: center; padding: 26px 10px; color: var(--ink-3); font-size: 14px; }
.empty svg { width: 42px; height: 42px; margin-bottom: 8px; opacity: .6; }

.me-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.me-item { display: block; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.me-item:hover { transform: translateY(-2px); }
.me-item .nm { font-weight: 700; font-size: 16px; }
.me-item .v { font-family: var(--num); font-size: 26px; font-weight: 750; margin-top: 6px; }

/* ------------------------------------------------------------ sheet / dialog */
.sheet-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .34); z-index: 50; opacity: 0; transition: opacity .2s; }
.sheet-mask.on { opacity: 1; }
.sheet {
  position: fixed; z-index: 51; left: 50%; bottom: 0; width: min(520px, 100%);
  transform: translate(-50%, 100%); background: var(--card); border-radius: 28px 28px 0 0;
  padding: 10px 22px calc(22px + env(safe-area-inset-bottom)); max-height: 92vh; overflow: auto;
  transition: transform .3s cubic-bezier(.2,.8,.2,1); box-shadow: 0 -10px 40px -10px rgba(0,0,0,.3);
}
.sheet.on { transform: translate(-50%, 0); }
.sheet .grab { width: 38px; height: 5px; background: var(--line-2); border-radius: 3px; margin: 0 auto 14px; }
.sheet h3 { font-size: 20px; font-weight: 750; margin-bottom: 4px; }
.sheet .desc { color: var(--ink-2); font-size: 14px; margin-bottom: 16px; }
.sheet .acts { display: flex; gap: 10px; margin-top: 18px; }
.sheet .acts .btn { flex: 1; }
@media (min-width: 700px) {
  .sheet { bottom: auto; top: 50%; border-radius: 28px; transform: translate(-50%, -46%) scale(.98); opacity: 0; transition: transform .22s cubic-bezier(.2,.8,.2,1), opacity .18s; padding-bottom: 22px; }
  .sheet.on { transform: translate(-50%, -50%); opacity: 1; }
  .sheet .grab { display: none; }
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cal-row { display: grid; grid-template-columns: 1fr 120px; gap: 10px; align-items: center; padding: 6px 0; }
.cal-row .nm { font-size: 14px; font-weight: 650; }
.cal-row .cd { font-size: 12px; color: var(--ink-3); font-family: var(--num); }
.cal-row .input { height: 44px; text-align: right; font-family: var(--num); }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--bg-2); border-radius: 16px; padding: 6px 6px 6px 14px; font-family: var(--num); font-size: 13.5px; }
.linkbox span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--ink); color: var(--bg); padding: 11px 20px; border-radius: 999px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100% - 32px); text-align: center;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .4);
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 759px) { #toast { bottom: calc(96px + env(safe-area-inset-bottom)); } }

.skeleton { background: linear-gradient(90deg, var(--bg-2), var(--line), var(--bg-2)); background-size: 200% 100%; animation: sk 1.2s ease-in-out infinite; border-radius: 12px; }
@keyframes sk { to { background-position: -200% 0; } }

.fade-in { animation: fin .35s cubic-bezier(.2,.8,.2,1) both; }
@keyframes fin { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
