/* ============ Tokens ============ */
:root {
  color-scheme: dark;
  --bg: #000000;
  --text: #f5f7fc;
  --muted: rgba(226, 232, 255, 0.66);
  --faint: rgba(226, 232, 255, 0.42);
  --hair: rgba(255, 255, 255, 0.12);
  --hair-strong: rgba(255, 255, 255, 0.22);
  --glass-a: rgba(255, 255, 255, 0.105);
  --glass-b: rgba(255, 255, 255, 0.035);
  --accent-1: #7dd3fc;
  --accent-2: #a5b4fc;
  --accent-3: #f0abfc;
  --good: #86efac;
  --warn: #fcd34d;
  --bad: #fda4af;
  --radius-xl: 36px;
  --radius-lg: 26px;
  --radius-md: 16px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: #071223; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
  overflow-x: hidden;
}

svg { width: 1em; height: 1em; flex: none; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }

/* ============ Backdrop ============ */
.backdrop { position: fixed; inset: 0; z-index: 0;
  background: radial-gradient(120% 70% at 50% 14%, #2a6ee0 0%, #17427f 32%, #071223 62%, #000000 84%); }

.topbar, main, .footer { position: relative; z-index: 1; }

/* ============ Glass ============ */
.glass {
  position: relative;
  background: linear-gradient(150deg, var(--glass-a), var(--glass-b));
  border: 1px solid var(--hair);
  border-radius: var(--radius-xl);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 16px 38px -24px rgba(0, 0, 0, 0.7);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: linear-gradient(150deg, rgba(26, 29, 37, 0.94), rgba(13, 15, 20, 0.94)); }
}

/* ============ Layout ============ */
.topbar {
  width: min(1080px, 100%); margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 20px 6px;
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; letter-spacing: -0.01em; font-size: 16px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(125, 211, 252, 0.28), rgba(167, 139, 250, 0.28));
  border: 1px solid var(--hair-strong); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  font-size: 17px; color: #e0e7ff;
}

main { width: min(1080px, 100%); margin: 0 auto; padding: 8px 20px 24px; }
.view { animation: rise 0.6s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.pill-btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--hair); border-radius: 999px; padding: 8px 14px;
  background: rgba(255, 255, 255, 0.08); font-size: 14px; cursor: pointer;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  transition: background 0.2s, transform 0.2s var(--ease);
}
.pill-btn:hover { background: rgba(255, 255, 255, 0.14); }
.pill-btn:active { transform: scale(0.97); }
.pill-btn.subtle { color: var(--muted); }

.eyebrow { margin: 0; color: var(--faint); font-size: 12.5px; letter-spacing: 0.06em; }
.label { margin: 0; color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }
.sub { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.note { text-align: center; color: var(--faint); font-size: 13px; margin: 18px 0 0; }
.grad { color: #ffffff; }

/* ============ Intro ============ */
.intro { max-width: 560px; margin: 0 auto; }
.hero { padding: 26px 0 22px; }
.hero h1 { margin: 12px 0 14px; font-size: clamp(34px, 9vw, 52px); line-height: 1.08; letter-spacing: -0.035em; font-weight: 720; }
.lead { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.privacy {
  display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0;
  padding: 7px 12px 7px 10px; border-radius: 999px; font-size: 13px; color: #d9f99d;
  background: rgba(134, 239, 172, 0.08); border: 1px solid rgba(134, 239, 172, 0.2);
}
.privacy-badge {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; border-radius: 5px;
  background: linear-gradient(180deg, #4a86f7, #2f6bea);
  color: #ffffff;
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.35);
}
.privacy-badge svg { width: 11.5px; height: 11.5px; display: block; }
.privacy-text b { font-weight: 650; }

.drop {
  display: flex; align-items: center; gap: 16px; padding: 18px 18px 18px 18px;
  border-radius: var(--radius-xl); cursor: pointer; overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.drop:hover { transform: translateY(-2px); border-color: var(--hair-strong); }
.drop:active { transform: scale(0.99); }
.drop.over { border-color: rgba(165, 180, 252, 0.7); box-shadow: 0 0 0 4px rgba(165, 180, 252, 0.16), 0 24px 60px -28px rgba(0, 0, 0, 0.75); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop-icon {
  width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, #f8fafc, #c7d2fe); color: #111836; font-size: 24px;
  box-shadow: 0 10px 24px -10px rgba(165, 180, 252, 0.8), inset 0 1px 0 #fff;
}
.drop-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.drop-title { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.drop-sub { color: var(--muted); font-size: 13.5px; }
.drop-chev { color: var(--faint); font-size: 20px; }
.desktop-only { display: none; }
@media (hover: hover) and (pointer: fine) { .desktop-only { display: inline; } }

.alert {
  margin-top: 12px; padding: 14px 16px; border-radius: var(--radius-md);
  background: rgba(244, 63, 94, 0.12); border: 1px solid rgba(253, 164, 175, 0.3);
  display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.55;
}
.alert b { color: #fecdd3; font-size: 15px; }
.alert span { color: rgba(255, 228, 230, 0.82); }

.steps { list-style: none; margin: 14px 0 0; padding: 6px 18px; border-radius: var(--radius-xl); }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; }
.steps li + li { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.steps .num {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #e0e7ff;
  background: rgba(165, 180, 252, 0.16); border: 1px solid rgba(165, 180, 252, 0.3);
}
.steps div { display: flex; flex-direction: column; gap: 3px; padding-top: 3px; }
.steps b { font-weight: 600; font-size: 15.5px; line-height: 1.45; }
.steps div span { color: var(--faint); font-size: 13.5px; line-height: 1.5; }

.faq { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.faq details { border-radius: var(--radius-lg); padding: 0 18px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 15px 0; font-size: 15px; font-weight: 550;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-size: 20px; font-weight: 300; transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.65; }

/* ============ Busy ============ */
.busy { max-width: 420px; margin: 0 auto; padding-top: 7vh; }
.busy-card { padding: 34px 26px 26px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.ring { position: relative; width: 148px; height: 148px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring-track { stroke: rgba(255, 255, 255, 0.08); }
.ring-fill { stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 0.4s var(--ease); filter: drop-shadow(0 0 8px rgba(165, 180, 252, 0.55)); }
.ring-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 2px; }
.ring-label b { font-size: 38px; font-weight: 680; letter-spacing: -0.04em; }
.ring-label span { color: var(--muted); font-size: 16px; margin-top: 10px; }
.busy-card h2 { margin: 22px 0 6px; font-size: 20px; font-weight: 650; letter-spacing: -0.01em; }
.busy-card p { margin: 0 0 20px; font-size: 14px; min-height: 1.5em; }

/* ============ Dashboard ============ */
.dev-toggle {
  flex: none; border: 0; background: none; padding: 0; margin: 0;
  font: inherit; font-size: 12.5px; font-weight: 500; line-height: 1.2;
  color: var(--accent-1); cursor: pointer; white-space: nowrap;
  opacity: 0.9; transition: opacity 0.2s;
}
.dev-toggle:hover { opacity: 1; }
.dev-toggle:active { opacity: 0.6; }

.dev-menu {
  position: fixed; z-index: 100;
  padding: 6px; border-radius: var(--radius-lg);
  display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.85);
}
.dev-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 11px; border: 0; border-radius: 14px; cursor: pointer;
  background: none; color: var(--text); text-align: left; font: inherit;
  transition: background 0.2s;
}
.dev-item:hover, .dev-item[aria-selected="true"] { background: rgba(255, 255, 255, 0.09); }
.dev-item .dot { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; background: rgba(255, 255, 255, 0.1); color: var(--muted); }
.dev-item b { display: block; font-size: 14.5px; font-weight: 600; }
.dev-item small { display: block; color: var(--faint); font-size: 12px; margin-top: 1px; }
.dev-item .check { margin-left: auto; flex: none; color: var(--accent-1); font-size: 15px; opacity: 0; transition: opacity 0.2s; }
.dev-item[aria-selected="true"] .check { opacity: 1; }

.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin: 0 -2px;
  scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
  mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px;
  border-radius: 999px; border: 1px solid var(--hair); cursor: pointer; text-align: left;
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  transition: background 0.25s, border-color 0.25s, transform 0.2s var(--ease);
}
.chip:active { transform: scale(0.97); }
.chip .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; background: rgba(255, 255, 255, 0.1); color: var(--muted); }
.chip b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.chip small { display: block; color: var(--faint); font-size: 12px; margin-top: 1px; }
.chip[aria-pressed="true"] { background: rgba(255, 255, 255, 0.92); border-color: transparent; color: #0d1328; }
.chip[aria-pressed="true"] small { color: rgba(13, 19, 40, 0.6); }
.chip[aria-pressed="true"] .dot { background: linear-gradient(145deg, #bae6fd, #c4b5fd); color: #0d1328; }

.dash-grid { display: grid; gap: 14px; }
.side { display: grid; gap: 14px; align-content: start; }

.hero-card { padding: 20px 18px 18px; overflow: hidden; }
.device-row { position: relative; display: flex; align-items: center; gap: 10px; }
.device-row .eyebrow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-row .tag { margin-left: auto; }
.device-head h2 { margin: 10px 0 0; font-size: 24px; letter-spacing: -0.02em; font-weight: 680; line-height: 1.2; word-break: break-word; }
.title-row { position: relative; display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.title-row h2 { margin: 0; min-width: 0; flex: 0 1 auto; }
.tag {
  flex: none; font-size: 12px; padding: 5px 10px; border-radius: 999px; white-space: nowrap;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--hair); color: var(--muted);
}
.tag.good { color: var(--good); border-color: rgba(134, 239, 172, 0.3); background: rgba(134, 239, 172, 0.08); }
.tag.warn { color: var(--warn); border-color: rgba(252, 211, 77, 0.3); background: rgba(252, 211, 77, 0.08); }
.tag.bad { color: var(--bad); border-color: rgba(253, 164, 175, 0.32); background: rgba(253, 164, 175, 0.09); }

.art { position: relative; margin: 10px -18px 6px; height: 200px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.art img {
  display: block; height: 100%; max-height: 100%; width: auto; max-width: 100%; object-fit: contain;
  -webkit-mask-image: radial-gradient(ellipse 46% 50% at 50% 52%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 46% 50% at 50% 52%, #000 58%, transparent 100%);
  filter: saturate(1.05) contrast(1.04);
}
.art::after {
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 6px; height: 26px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.45), transparent); z-index: -1;
}
.art .glyph {
  width: 132px; height: 132px; border-radius: 40px; display: grid; place-items: center; font-size: 62px; color: #e0e7ff;
  background: linear-gradient(145deg, rgba(125, 211, 252, 0.22), rgba(167, 139, 250, 0.22));
  border: 1px solid var(--hair-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 30px 60px -24px rgba(99, 102, 241, 0.6);
}

.segmented {
  position: relative; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 4px; border-radius: 999px; margin-top: 10px;
  background: rgba(0, 0, 0, 0.24); border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}
.segmented button {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer;
  padding: 8px 0; border-radius: 999px; font-size: 14px; color: var(--muted);
  transition: color 0.3s var(--ease);
}
.segmented button[aria-selected="true"] { color: #0d1328; font-weight: 600; }
.segmented .thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 5);
  border-radius: 999px; background: linear-gradient(180deg, #ffffff, #e6e9f5);
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.5), inset 0 1px 0 #fff;
  transition: transform 0.4s var(--ease), opacity 0.25s;
}
.segmented.custom .thumb { opacity: 0; }

.range { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--faint); font-size: 13px; }
.range input {
  flex: 1; min-width: 0; appearance: none; -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.05); color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px;
  padding: 9px 12px; font: inherit; font-size: 14px; text-align: center;
}
.range input::-webkit-calendar-picker-indicator { filter: invert(0.8); opacity: 0.6; }
.range input::-webkit-date-and-time-value { text-align: center; }

.period { margin-top: 20px; }
.figure { display: flex; align-items: baseline; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.figure b { font-size: 54px; line-height: 1; font-weight: 700; letter-spacing: -0.045em; }
.figure span { font-size: 17px; color: var(--muted); font-weight: 550; margin-right: 8px; }
.period .figure b { color: #fff; text-shadow: 0 0 28px rgba(165, 180, 252, 0.45); }
.figure.small b { font-size: 36px; }
.figure.small span { font-size: 15px; }
.up { color: var(--good); }
.down { color: var(--bad); }

.chart { position: relative; margin-top: 18px; padding-top: 4px; }
.chart-top { display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; margin-bottom: 8px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 128px; touch-action: pan-y; }
.bars i {
  flex: 1; min-width: 2px; display: block; border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(165, 180, 252, 0.5));
  transform-origin: bottom; animation: grow 0.6s var(--ease) both;
  transition: opacity 0.2s, filter 0.2s;
}
.bars i.zero { background: rgba(255, 255, 255, 0.1); }
.bars.active i:not(.on) { opacity: 0.38; }
.bars i.on { filter: drop-shadow(0 0 10px rgba(165, 180, 252, 0.8)); }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.axis { display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; margin-top: 8px; }
.tip {
  position: absolute; top: 14px; transform: translateX(-50%); pointer-events: none; white-space: nowrap;
  padding: 7px 11px; border-radius: 12px; font-size: 12.5px; line-height: 1.4; text-align: center;
  background: rgba(15, 20, 40, 0.78); border: 1px solid var(--hair-strong);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.8);
}
.tip b { display: block; font-size: 14px; }
.tip span { color: var(--muted); }

.life { padding: 20px 18px; }
.life .figure b { font-size: 46px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { padding: 15px 15px 13px; border-radius: var(--radius-lg); }
.tile .k { color: var(--muted); font-size: 13px; }
.tile .v { margin-top: 10px; font-size: 24px; font-weight: 680; letter-spacing: -0.03em; line-height: 1.1; }
.tile .v small { font-size: 14px; color: var(--muted); font-weight: 550; margin: 0 3px 0 1px; letter-spacing: 0; }
.tile .s { margin-top: 5px; color: var(--faint); font-size: 12px; }

.volume { padding: 18px 18px 16px; }
.volume-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.meter { position: relative; height: 10px; margin: 18px 4px 0; }
.meter-track {
  position: absolute; inset: 0; border-radius: 999px;
  background: linear-gradient(90deg, #5eead4, #86efac 38%, #fde68a 64%, #fdba74 78%, #fb7185);
  opacity: 0.85; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}
.meter-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 2px; background: rgba(255, 255, 255, 0.55); }
.meter-dot {
  position: absolute; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18), 0 4px 12px rgba(0, 0, 0, 0.5);
  left: 0; transition: left 0.6s var(--ease);
}
.meter-scale { position: relative; height: 16px; margin: 10px 4px 0; color: var(--faint); font-size: 11.5px; }
.meter-scale span { position: absolute; top: 0; }
.meter-scale span:nth-child(1) { left: 0; }
.meter-scale span:nth-child(2) { left: 66.67%; transform: translateX(-50%); white-space: nowrap; }
.meter-scale span:nth-child(3) { right: 0; }

.footer { width: min(1080px, 100%); margin: 0 auto; padding: 8px 20px max(28px, env(safe-area-inset-bottom)); text-align: center; color: var(--faint); font-size: 12px; line-height: 1.7; }
.footer p { margin: 0; }

/* ============ 卡密解锁 ============ */
.lock-body { transition: filter 0.45s var(--ease); }
[data-locked="true"] .lock-body {
  filter: blur(16px) saturate(0.85);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.lock-face {
  position: absolute; inset: 0; z-index: 2; display: none;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 22px; text-align: center;
}
[data-locked="true"] .lock-face { display: flex; }
.lock-ico { width: 26px; height: 26px; color: #ffffff; opacity: 0.92; }
.lock-title { margin: 0; font-size: 18px; font-weight: 680; letter-spacing: -0.01em; }
.lock-sub { margin: 0; color: var(--muted); font-size: 12.5px; }
.lock-form { display: flex; gap: 8px; margin-top: 14px; width: min(320px, 100%); }
.lock-code {
  flex: 1; min-width: 0; font: inherit; font-size: 14px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text);
  background: rgba(0, 0, 0, 0.42); border: 1px solid var(--hair-strong);
  border-radius: 12px; padding: 11px 13px;
}
.lock-code::placeholder { letter-spacing: 0.04em; color: var(--faint); }
.lock-code:focus { outline: 2px solid rgba(125, 211, 252, 0.45); border-color: transparent; }
.lock-btn {
  flex: none; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 12px; padding: 11px 18px;
  background: #000000; color: #ffffff;
  font: inherit; font-size: 14px; font-weight: 650; cursor: pointer;
  transition: transform 0.18s var(--ease);
}
.lock-btn:active { transform: scale(0.97); }
.lock-btn:disabled { opacity: 0.6; cursor: default; }
.lock-msg { margin: 4px 0 0; min-height: 17px; font-size: 12.5px; color: var(--faint); }
.lock-msg.err { color: var(--bad); }
.lock-msg.ok { color: var(--good); }
