/* ───────── tokens ───────── */
:root {
  --bg: #06080c;
  --bg-2: #0a0d13;
  --card: #0f131b;
  --card-2: #151a24;
  --card-3: #1b212d;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --tx: #eef2f8;
  --tx-2: #9ba6b7;
  --tx-3: #687385;
  --pos: #3ddc97;
  --neg: #ff6b81;
  --warn: #ffb020;
  --acc: #4c8dff;
  --acc-2: #2dd4bf;
  --glass: rgba(14, 18, 26, .72);
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --r: 22px;
  --r-s: 16px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
[data-theme="light"] {
  --bg: #f1f3f8;
  --bg-2: #e9ecf3;
  --card: #ffffff;
  --card-2: #f5f7fb;
  --card-3: #ebeef5;
  --line: rgba(13, 20, 32, .07);
  --line-2: rgba(13, 20, 32, .13);
  --tx: #0d1420;
  --tx-2: #566176;
  --tx-3: #8893a6;
  --pos: #0fa968;
  --neg: #e5384f;
  --warn: #d98a00;
  --glass: rgba(255, 255, 255, .78);
  --shadow: 0 10px 34px rgba(30, 41, 70, .14);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--tx); font-family: var(--font); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
body { overflow-x: hidden; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
b, strong { font-weight: 650; }
.num, .tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

#app { max-width: 560px; margin: 0 auto; min-height: 100%; position: relative; }

/* ───────── premium emoji ───────── */
.em { display: inline-block; width: var(--s, 22px); height: var(--s, 22px); flex: none; vertical-align: middle; position: relative; }
.em svg { display: block; width: 100% !important; height: 100% !important; }
[data-theme="light"] .em { filter: invert(1) brightness(.18); }
[data-theme="light"] .tb .em, [data-theme="light"] .tb.on .em { filter: invert(1) brightness(.18); }

/* ───────── header ───────── */
#top {
  position: sticky; top: 0; z-index: 30;
  padding: calc(var(--safe-t) + 10px) 16px 10px;
  background: linear-gradient(var(--bg) 78%, transparent);
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.logo { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(145deg, color-mix(in srgb, var(--acc) 30%, var(--card)), var(--card)); border: 1px solid var(--line-2);
  box-shadow: 0 6px 22px color-mix(in srgb, var(--acc) 25%, transparent); }
.logo .em { --s: 26px; }
.brand-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.brand-t b { font-size: 19px; letter-spacing: -.02em; }
.brand-t small { color: var(--tx-3); font-size: 12px; margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.brand-t small::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 0 var(--pos); animation: pulse 2.4s infinite; }
.brand-t small.stale::before { background: var(--warn); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pos) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.icon-btn { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); transition: transform .2s var(--ease), background .2s; }
.icon-btn:active { transform: scale(.92); }
.icon-btn .em { --s: 22px; }
.icon-btn.spin .em { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* segmented control */
.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.seg button { position: relative; z-index: 1; padding: 9px 2px; font-size: 13px; font-weight: 600; color: var(--tx-2); border-radius: 12px; transition: color .25s; white-space: nowrap; }
.seg button.on { color: var(--tx); }
.seg .thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 12px; background: var(--card-3);
  box-shadow: 0 1px 0 var(--line-2) inset, 0 4px 14px rgba(0, 0, 0, .25); transition: transform .35s var(--ease), width .35s var(--ease); }
body[data-tab="charts"] #seg-main, body[data-tab="feed"] #seg-main, body[data-tab="more"] #seg-main { display: none; }

/* ───────── views ───────── */
#views { padding: 4px 16px calc(var(--safe-b) + 110px); }
.view { display: none; }
.view.on { display: block; animation: viewIn .45s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

h2.sec { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 26px 4px 12px; font-size: 13px; font-weight: 650; color: var(--tx-2); text-transform: uppercase; letter-spacing: .07em; }
h2.sec small { font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--tx-3); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; position: relative; }
.muted { color: var(--tx-2); }
.pos { color: var(--pos); } .neg { color: var(--neg); }

/* ───────── hero ───────── */
.hero { position: relative; overflow: hidden; padding: 22px 20px 0; border-radius: 28px; border: 1px solid var(--line-2);
  background: linear-gradient(165deg, color-mix(in srgb, var(--hc, var(--acc)) 20%, var(--card)) 0%, var(--card) 62%); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(46px); opacity: .55; pointer-events: none; }
.hero::before { width: 220px; height: 220px; right: -70px; top: -90px; background: var(--hc, var(--acc)); animation: drift 14s ease-in-out infinite alternate; }
.hero::after { width: 180px; height: 180px; left: -60px; bottom: -40px; background: var(--acc-2); opacity: .22; animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(-26px, 18px) scale(1.12); } }
.hero > * { position: relative; z-index: 1; }
.hero-l { display: flex; align-items: center; gap: 8px; color: var(--tx-2); font-size: 13.5px; font-weight: 600; }
.hero-l .em { --s: 20px; }
.hero-v { font-size: 50px; line-height: 1.06; font-weight: 780; letter-spacing: -.035em; margin: 8px 0 12px; }
.hero-v .cur { font-size: .56em; font-weight: 650; color: var(--tx-2); margin-left: 2px; letter-spacing: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: var(--tx-2); backdrop-filter: blur(8px); }
[data-theme="light"] .chip { background: rgba(13, 20, 32, .05); }
.chip.up { color: var(--pos); background: color-mix(in srgb, var(--pos) 14%, transparent); border-color: color-mix(in srgb, var(--pos) 30%, transparent); }
.chip.down { color: var(--neg); background: color-mix(in srgb, var(--neg) 14%, transparent); border-color: color-mix(in srgb, var(--neg) 30%, transparent); }
.chip svg { width: 11px; height: 11px; }
.hero-spark { margin: 14px -20px 0; height: 92px; display: block; }
.hero-spark svg { width: 100%; height: 100%; display: block; }

/* ───────── kpi ───────── */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.kpi { padding: 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; transition: transform .2s var(--ease); }
.kpi:active { transform: scale(.98); }
.kpi-h { display: flex; align-items: center; gap: 7px; color: var(--tx-2); font-size: 12.5px; font-weight: 600; }
.kpi-h .em { --s: 20px; }
.kpi-v { font-size: 23px; font-weight: 720; letter-spacing: -.025em; margin-top: 4px; white-space: nowrap; }
.kpi-s { font-size: 12px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ───────── share bar ───────── */
.sharebar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--card-2); gap: 3px; }
.sharebar i { display: block; height: 100%; border-radius: 99px; transform-origin: left; animation: grow .9s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: none; } }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--tx-2); }
.legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.legend b { color: var(--tx); }

/* ───────── project cards ───────── */
.plist { display: flex; flex-direction: column; gap: 10px; }
.pc { position: relative; padding: 16px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); overflow: hidden; text-align: left; width: 100%;
  transition: transform .25s var(--ease), border-color .25s; animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.pc::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--c) 18%, transparent), transparent 60%); pointer-events: none; }
.pc:active { transform: scale(.985); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pc-h { display: flex; align-items: center; gap: 12px; position: relative; }
.pc-ic { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--c) 20%, var(--card-2)); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.pc-ic .em { --s: 28px; }
.pc-n { flex: 1; min-width: 0; }
.pc-n b { display: block; font-size: 16.5px; letter-spacing: -.01em; }
.pc-n small { color: var(--tx-3); font-size: 12.5px; }
.pc-p { text-align: right; }
.pc-p b { display: block; font-size: 19px; letter-spacing: -.02em; font-weight: 740; }
.pc-p small { font-size: 12px; font-weight: 600; }
.pc-mid { display: flex; align-items: flex-end; gap: 12px; margin-top: 14px; position: relative; }
.pc-stats { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pc-stats div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pc-stats small { color: var(--tx-3); font-size: 11.5px; }
.pc-stats b { font-size: 14.5px; letter-spacing: -.01em; white-space: nowrap; }
.pc-spark { width: 92px; height: 38px; flex: none; }
.pc-bar { height: 5px; border-radius: 9px; background: var(--card-2); margin-top: 14px; overflow: hidden; position: relative; }
.pc-bar i { display: block; height: 100%; border-radius: 9px; background: var(--c); transform-origin: left; animation: grow 1s var(--ease) both; }
.pc.err .pc-p b { color: var(--warn); font-size: 14px; }

/* ───────── notices ───────── */
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; font-size: 13px; line-height: 1.4; color: var(--tx-2);
  background: color-mix(in srgb, var(--warn) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent); margin-top: 10px; }
.note .em { --s: 20px; margin-top: 1px; }
.note.info { background: var(--card); border-color: var(--line); }

/* ───────── lists / events ───────── */
.day { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 6px 8px; font-size: 13px; font-weight: 650; color: var(--tx-2); }
.day small { font-weight: 600; font-size: 12.5px; }
.evs { display: flex; flex-direction: column; border-radius: 22px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.ev { position: relative; padding: 0; border-bottom: 1px solid var(--line); }
.ev:last-child { border-bottom: 0; }
.ev.new { animation: flash 2.2s ease-out; }
@keyframes flash { 0% { background: color-mix(in srgb, var(--acc) 26%, transparent); } 100% { background: transparent; } }
.ev-r { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; }
.ev-i { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; flex: none; position: relative;
  background: color-mix(in srgb, var(--c) 18%, var(--card-2)); border: 1px solid color-mix(in srgb, var(--c) 32%, transparent); }
.ev-i .em { --s: 24px; }
.ev-i u { position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; background: var(--card); display: grid; place-items: center; text-decoration: none; }
.ev-i u .em { --s: 11px; }
.ev-t { flex: 1; min-width: 0; }
.ev-t b { display: block; font-size: 14.5px; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.005em; }
.ev-t small { display: block; color: var(--tx-3); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-a { text-align: right; flex: none; }
.ev-a b { display: block; font-size: 15px; font-weight: 700; letter-spacing: -.015em; }
.ev-a small { display: block; color: var(--tx-3); font-size: 12px; margin-top: 2px; }
.ev-d { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.ev.open .ev-d { grid-template-rows: 1fr; }
.ev-d > div { overflow: hidden; }
.ev-d-in { margin: 0 14px 14px 64px; padding: 12px 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.ev-d-in > div { display: flex; justify-content: space-between; gap: 12px; color: var(--tx-2); }
.ev-d-in > div b { color: var(--tx); font-weight: 620; }
.ev-d-in .tot { padding-top: 8px; border-top: 1px dashed var(--line-2); color: var(--tx); font-weight: 650; }
.ev-d-in .nt { color: var(--tx-3); font-size: 12px; }

.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 6px; margin: 0 -16px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.fchip { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 620; color: var(--tx-2);
  background: var(--card); border: 1px solid var(--line); transition: all .25s var(--ease); }
.fchip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--acc)); }
.fchip.on { color: var(--tx); background: var(--card-3); border-color: var(--line-2); box-shadow: 0 4px 16px rgba(0, 0, 0, .22); }
.more-btn { display: block; width: 100%; margin-top: 14px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); font-weight: 620; color: var(--tx-2); }

/* ───────── charts ───────── */
.chart-card { padding: 16px 14px 14px; border-radius: 26px; }
.chart-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin: 0 4px 12px; }
.chart-h b { font-size: 16px; letter-spacing: -.01em; display: block; }
.chart-h small { color: var(--tx-3); font-size: 12.5px; }
.chart-h .big { text-align: right; }
.chart-h .big b { font-size: 20px; font-weight: 740; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--tx-3); font-size: 10.5px; font-family: var(--font); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .bar { transform-box: fill-box; transform-origin: 50% 100%; animation: barUp .8s var(--ease) both; animation-delay: calc(var(--i) * 28ms); }
@keyframes barUp { from { transform: scaleY(0); } to { transform: none; } }
.chart .bar-hit { fill: transparent; cursor: pointer; }
.chart .sel { fill: var(--tx); fill-opacity: .07; }
.chart .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.4s var(--ease) .1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .fadein { opacity: 0; animation: fade .9s ease .5s forwards; }
@keyframes fade { to { opacity: 1; } }
.tip { position: absolute; z-index: 5; pointer-events: none; min-width: 148px; padding: 10px 12px; border-radius: 14px; background: var(--glass); backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 12.5px; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.tip.on { opacity: 1; transform: none; }
.tip b.d { display: block; margin-bottom: 6px; font-size: 12px; color: var(--tx-2); font-weight: 650; }
.tip div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 1.5px 0; color: var(--tx-2); }
.tip div i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); margin-right: 7px; display: inline-block; }
.tip div b { color: var(--tx); font-weight: 650; }
.tip .tot { margin-top: 5px; padding-top: 6px; border-top: 1px solid var(--line-2); color: var(--tx); font-weight: 700; }
.range { display: flex; gap: 6px; margin: 2px 0 14px; }
.range button { flex: 1; padding: 10px 0; border-radius: 14px; font-weight: 650; font-size: 13.5px; color: var(--tx-2); background: var(--card); border: 1px solid var(--line); transition: all .25s var(--ease); }
.range button.on { color: var(--tx); background: var(--card-3); border-color: var(--line-2); }
.lg { display: flex; gap: 16px; font-size: 12.5px; color: var(--tx-2); margin: 10px 4px 0; }
.lg span { display: inline-flex; align-items: center; gap: 7px; }
.lg i { width: 18px; height: 4px; border-radius: 4px; background: var(--c); }

.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { position: relative; width: 150px; flex: none; }
.donut svg { width: 100%; display: block; transform: rotate(-90deg); }
.donut circle.seg-arc { fill: none; stroke-width: 15; stroke-linecap: round; stroke-dasharray: var(--d) 1000; animation: arc 1.1s var(--ease) both; }
@keyframes arc { from { stroke-dasharray: 0 1000; } }
.donut-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-c b { font-size: 21px; font-weight: 760; letter-spacing: -.03em; }
.donut-c small { color: var(--tx-3); font-size: 11.5px; }
.dl { flex: 1; display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.dl div { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.dl i { width: 10px; height: 10px; border-radius: 4px; background: var(--c); flex: none; }
.dl span { flex: 1; color: var(--tx-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl b { font-weight: 680; }

.hb { display: flex; flex-direction: column; gap: 14px; }
.hb-r { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; font-size: 13.5px; }
.hb-r span { color: var(--tx); font-weight: 600; display: flex; align-items: center; gap: 8px; min-width: 0; }
.hb-r span i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); flex: none; }
.hb-r b { font-weight: 700; }
.hb-r small { grid-column: 1 / -1; display: block; height: 7px; border-radius: 9px; background: var(--card-2); overflow: hidden; }
.hb-r small i { display: block; height: 100%; width: var(--w); border-radius: 9px; background: var(--c); transform-origin: left; animation: grow 1s var(--ease) both; }
.hb-r em { grid-column: 1 / -1; font-style: normal; font-size: 12px; color: var(--tx-3); margin-top: -2px; }

/* ───────── detail overlay ───────── */
#detail { position: fixed; inset: 0; z-index: 60; background: var(--bg); transform: translateX(100%); transition: transform .42s var(--ease); display: flex; flex-direction: column; visibility: hidden; max-width: 560px; margin: 0 auto; }
#detail.on { transform: none; visibility: visible; }
.d-top { padding: calc(var(--safe-t) + 10px) 16px 10px; display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center; background: linear-gradient(var(--bg) 75%, transparent); }
.d-top .seg { grid-column: 1 / -1; }
.d-title { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 720; letter-spacing: -.02em; min-width: 0; }
.d-title .em { --s: 28px; }
.d-body { flex: 1; overflow-y: auto; padding: 4px 16px calc(var(--safe-b) + 40px); -webkit-overflow-scrolling: touch; }
.icon-btn.back svg { width: 20px; height: 20px; }

.wf { display: flex; flex-direction: column; gap: 13px; }
.wf-r { display: grid; grid-template-columns: 1fr auto; gap: 7px 10px; align-items: center; font-size: 13.5px; }
.wf-r span { color: var(--tx-2); display: flex; align-items: center; gap: 8px; }
.wf-r span .em { --s: 18px; }
.wf-r b { font-weight: 700; letter-spacing: -.01em; }
.wf-t { grid-column: 1 / -1; position: relative; height: 10px; border-radius: 99px; background: var(--card-2); }
.wf-t i { position: absolute; top: 0; bottom: 0; border-radius: 99px; left: var(--l); width: var(--w); background: var(--c); transform-origin: left; animation: grow .9s var(--ease) both; animation-delay: calc(var(--i) * 90ms); }
.wf-r.tot { padding-top: 13px; border-top: 1px dashed var(--line-2); }
.wf-r.tot span { color: var(--tx); font-weight: 650; font-size: 14.5px; }
.wf-r.tot b { font-size: 17px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.split .kpi { background: linear-gradient(160deg, color-mix(in srgb, var(--acc-2) 12%, var(--card)), var(--card)); }

.ring-row { display: flex; align-items: center; gap: 18px; }
.ring { position: relative; width: 104px; height: 104px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring .bg { stroke: var(--card-3); }
.ring .fg { stroke: var(--c); stroke-linecap: round; animation: ringIn 1.2s var(--ease) both; }
@keyframes ringIn { from { stroke-dashoffset: var(--full); } }
.ring-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-c b { font-size: 20px; font-weight: 760; letter-spacing: -.03em; }
.ring-c small { font-size: 10.5px; color: var(--tx-3); }
.funnel { flex: 1; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.funnel div { display: flex; justify-content: space-between; gap: 10px; color: var(--tx-2); }
.funnel div b { color: var(--tx); font-weight: 700; }

.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 70px; }
.hours i { display: block; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--c) 85%, transparent); min-height: 3px; transform-origin: bottom; animation: barUp .8s var(--ease) both; animation-delay: calc(var(--i) * 18ms); }
.hours i.z { background: var(--card-3); }
.hours-l { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--tx-3); }

/* ───────── settings ───────── */
.rows { border-radius: 22px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.row { display: flex; align-items: center; gap: 13px; padding: 14px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.row:last-child { border-bottom: 0; }
.row .ri { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--line); flex: none; }
.row .ri .em { --s: 24px; }
.row .rt { flex: 1; min-width: 0; }
.row .rt b { display: block; font-size: 15px; font-weight: 620; }
.row .rt small { color: var(--tx-3); font-size: 12.5px; }
.sw { position: relative; width: 52px; height: 31px; border-radius: 99px; background: var(--card-3); border: 1px solid var(--line-2); transition: background .3s; flex: none; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 25px; height: 25px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); transition: transform .35s var(--ease); }
.sw.on { background: var(--pos); border-color: transparent; }
.sw.on::after { transform: translateX(21px); }
.how { padding: 0; overflow: hidden; }
.how-h { display: flex; align-items: center; gap: 12px; padding: 14px; width: 100%; text-align: left; }
.how-h .em { --s: 26px; }
.how-h b { flex: 1; font-size: 15px; }
.how-h svg { width: 16px; height: 16px; color: var(--tx-3); transition: transform .3s var(--ease); }
.how.open .how-h svg { transform: rotate(180deg); }
.how-b { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.how.open .how-b { grid-template-rows: 1fr; }
.how-b > div { overflow: hidden; }
.how-b p { margin: 0; padding: 0 16px 16px; color: var(--tx-2); font-size: 13.5px; line-height: 1.55; }
.how-b p b { color: var(--tx); }
.how-b p + p { margin-top: -6px; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* ───────── tab bar ───────── */
#tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 12px); z-index: 40; width: min(calc(100% - 24px), 536px);
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px; border-radius: 28px; background: var(--glass);
  backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.tb { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; border-radius: 22px; color: var(--tx-3); font-size: 10.5px; font-weight: 620; transition: color .25s, background .3s, transform .2s var(--ease); }
.tb:active { transform: scale(.93); }
.tb .em { --s: 26px; opacity: .55; filter: saturate(.7); transition: opacity .25s, filter .25s, transform .35s var(--ease); }
.tb.on { color: var(--tx); background: var(--card-3); }
.tb.on .em { opacity: 1; filter: none; transform: translateY(-1px) scale(1.06); }

/* ───────── skeleton / gate ───────── */
.sk { border-radius: var(--r); background: linear-gradient(100deg, var(--card) 30%, var(--card-3) 50%, var(--card) 70%); background-size: 220% 100%; animation: sh 1.4s linear infinite; }
@keyframes sh { to { background-position: -220% 0; } }
#gate[hidden] { display: none; }
#gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); padding: 24px; }
.gate-card { text-align: center; max-width: 320px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gate-card b { font-size: 21px; letter-spacing: -.02em; }
.gate-card p { margin: 0; color: var(--tx-2); line-height: 1.5; font-size: 14.5px; }
.gate-ic { width: 76px; height: 76px; border-radius: 26px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line-2); }
.gate-ic .em { --s: 46px; }
.empty { text-align: center; color: var(--tx-3); padding: 34px 12px; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .em { --s: 44px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; } }
