/* 青迹演示 · 样式（无外部依赖；可信度视觉语言贯穿全站） */
:root {
  --color-bg: #FFFFFF; --color-canvas-gray: #F5F7F8; --color-surface: #FFFFFF;
  --color-surface-secondary: rgba(255,255,255,.78); --color-line: #E6E8EB;
  --color-text: #202124; --color-text-secondary: #6B7280; --color-text-muted: #9CA3AF;
  --color-text-disabled: #C7CBD1; --color-green: #8EDB43; --color-blue: #20C1F0;
  --color-coral: #FF6B67; --color-yellow: #FCC959;
  --color-green-soft: #EEF7E7; --color-blue-soft: #EAF7FD;
  --color-coral-soft: #FFF0F1; --color-yellow-soft: #FFF8E4;
  --shadow-card: 0 8px 28px rgba(30,41,59,.06);
  --shadow-float: 0 12px 30px rgba(30,41,59,.10);
  --duration-fast: 180ms; --duration-normal: 240ms;
  --ease-ios: cubic-bezier(.22,1,.36,1);
  --paper: var(--color-canvas-gray); --card: var(--color-surface);
  --ink: var(--color-text); --sub: var(--color-text-secondary); --line: var(--color-line);
  --green: #5EAD72; --green-deep: #3E8B5B; --green-soft: var(--color-green-soft);
  --amber: #A57920; --amber-bg: var(--color-yellow-soft);
  --orange: #D96832; --blue: #4189C9; --purple: #8069B8; --gray: #88919B; --red: #D95E69;
  --r: 22px; --shadow: var(--shadow-card);
}

/* Bundled fonts: Roboto for Latin/numbers, Noto Sans SC for Chinese. */
@font-face { font-family: 'Noto Sans SC'; src: url('../assets/fonts/noto-sans-sc-chinese-simplified-400-normal.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'Noto Sans SC'; src: url('../assets/fonts/noto-sans-sc-chinese-simplified-500-normal.woff2') format('woff2'); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: 'Noto Sans SC'; src: url('../assets/fonts/noto-sans-sc-chinese-simplified-600-normal.woff2') format('woff2'); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: 'Noto Sans SC'; src: url('../assets/fonts/noto-sans-sc-chinese-simplified-700-normal.woff2') format('woff2'); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: 'Noto Sans SC'; src: url('../assets/fonts/noto-sans-sc-chinese-simplified-800-normal.woff2') format('woff2'); font-style: normal; font-weight: 800; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('../assets/fonts/roboto-latin-400-normal.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('../assets/fonts/roboto-latin-500-normal.woff2') format('woff2'); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('../assets/fonts/roboto-latin-600-normal.woff2') format('woff2'); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('../assets/fonts/roboto-latin-700-normal.woff2') format('woff2'); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('../assets/fonts/roboto-latin-800-normal.woff2') format('woff2'); font-style: normal; font-weight: 800; font-display: swap; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f1f4ef;
  color: var(--ink); display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 28px 16px;
}
.ic { width: 20px; height: 20px; flex: none; }
.ic-xs { width: 14px; height: 14px; }
b { font-weight: 650; }

/* ================= 舞台布局 ================= */
.stage { display: flex; gap: 28px; align-items: flex-start; justify-content: center; }
.phone-col { display: flex; flex-direction: column; gap: 14px; }
.console { width: 340px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.09); border-radius: 20px; padding: 18px; color: #D9E5DC; position: sticky; top: 28px; }
.cs-h { display: flex; gap: 8px; align-items: center; font-size: 17px; font-weight: 700; color: #fff; }
.cs-h .ic { color: #6FD59A; }
.cs-note { font-size: 11.5px; color: #9DB3A4; margin: 6px 0 2px; line-height: 1.5; }
.cs-sec { font-size: 12px; color: #8FA79A; margin: 16px 0 8px; letter-spacing: .05em; }
.console .btn { background: rgba(255,255,255,.08); color: #E8F2EA; border: 1px solid rgba(255,255,255,.14); }
.console .btn.pri { background: var(--green); border-color: var(--green); color: #fff; }
.console .btn:disabled { opacity: .4; }
.task { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 10px; font-size: 12.5px; margin-bottom: 4px; background: rgba(255,255,255,.03); }
.task.done { background: rgba(47,158,99,.14); }
.task.done .tk-t { color: #9FDcB8; text-decoration: line-through; text-decoration-color: rgba(159,220,184,.5); }
.tk-ck { color: #6FD59A; font-weight: 700; }
.task.st .tk-t { color: #C7D6CB; }
.console .chips { margin-bottom: 10px; }
.console .chip { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #D9E5DC; }
.console .chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.console .mini-btn { background: rgba(255,255,255,.1); color: #CFE0D3; border: none; }

/* 引导条 */
.storybar { width: 392px; background: #10201A; border: 1px solid rgba(111,213,154,.25); border-radius: 16px; padding: 12px 14px; color: #D9E9DD; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.storybar.idle { text-align: center; font-size: 12.5px; color: #7E968A; border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.03); }
.sb-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sb-step { font-size: 13px; font-weight: 700; color: #9FDcB8; }
.sb-desc { font-size: 12.5px; line-height: 1.55; color: #C3D4C7; margin: 7px 0 9px; }
.sb-need { font-size: 12px; color: #F2C879; background: rgba(242,200,121,.1); border-radius: 8px; padding: 6px 9px; margin-bottom: 9px; }
.sb-acts { display: flex; gap: 8px; justify-content: flex-end; }

/* ================= 手机框 ================= */
.phone { width: 392px; height: 836px; background: var(--paper); border-radius: 46px; border: 11px solid #0B0F12; box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 0 0 2px #2A343A; position: relative; overflow: hidden; }
.phone-app { height: 100%; display: flex; flex-direction: column; position: relative; }
.onboarding-stage { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #0B0F12; cursor: pointer; }
.onboarding-image { width: 100%; height: 100%; display: block; object-fit: fill; user-select: none; -webkit-user-drag: none; }
.onboarding-enter { position: absolute; left: 50%; top: 64%; transform: translate(-50%, -50%); min-width: 132px; padding: 12px 26px; border: 1px solid rgba(255,255,255,.92); border-radius: 999px; background: var(--green); color: #FFFFFF; box-shadow: 0 8px 18px rgba(47,158,99,.24); font-size: 15px; font-weight: 800; cursor: pointer; }
.onboarding-enter:active { transform: translate(-50%, -50%) scale(.96); }
.statusbar { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 12px 24px 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.statusbar::after { content: ''; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 110px; height: 24px; background: #0B0F12; border-radius: 14px; }
.sb-icons { display: flex; gap: 5px; align-items: center; font-size: 10.5px; color: var(--sub); font-weight: 500; }
.app-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 10px; }
.ah-l { display: flex; gap: 10px; align-items: center; }
.ah-av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: var(--green-soft); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.ah-l b { font-size: 16px; display: block; }
.demo-tag { font-size: 10.5px; color: #9A7B2E; background: var(--amber-bg); border: 1px dashed #E3C98F; padding: 3px 8px; border-radius: 999px; display: inline-flex; gap: 3px; align-items: center; white-space: nowrap; }
.screen { flex: 1; overflow-y: auto; padding: 2px 14px 20px; scrollbar-width: none; }
.screen::-webkit-scrollbar { display: none; }

/* 底部导航 */
.tabbar { display: flex; border-top: 1px solid var(--line); background: #fff; padding: 7px 6px 16px; }
.tb { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: none; color: #93A29A; font-size: 10.5px; cursor: pointer; padding: 4px 0; }
.tb .ic { width: 22px; height: 22px; }
.tb.on { color: var(--green-deep); font-weight: 650; }

/* ================= 通用组件 ================= */
.card { background: var(--card); border-radius: var(--r); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 13.5px; font-weight: 650; }
.hero .card-h { margin-bottom: 5px; font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.hero .card-h .link { color: #8B9A91; }
.card-h .ic { width: 17px; height: 17px; color: var(--green-deep); vertical-align: -3px; margin-right: 4px; }
.link { background: none; border: none; color: var(--green-deep); font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; }
.btn { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 12px; padding: 9px 16px; font-size: 13.5px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.btn.pri { background: var(--green); border-color: var(--green); color: #fff; font-weight: 650; box-shadow: 0 4px 12px rgba(47,158,99,.3); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--sub); }
.btn.danger { color: var(--red); border-color: #F2CDD5; background: #FFF7F8; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.mini-btn { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 4px 10px; font-size: 11.5px; cursor: pointer; color: var(--ink); white-space: nowrap; }
.mini-btn.pri { background: var(--green); border-color: var(--green); color: #fff; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; border: none; background: #EDF3EE; color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn.danger { color: var(--red); background: #FBEDEF; }
.icon-btn.xs { width: 26px; height: 26px; }
.icon-btn.xs .ic { width: 13px; height: 13px; }

/* 徽章 */
.badge { font-size: 10.5px; padding: 2.5px 8px; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.b-ok { background: var(--green-soft); color: var(--green-deep); }
.b-pending { background: var(--amber-bg); color: var(--amber); }
.b-record { background: #EDF0F2; color: #5E6B75; }
.b-partial { background: #FDF0E6; color: #B4530A; }
.b-est { background: #EEF2FB; color: #3355A8; border: 1px dashed #B9C8EC; }
.b-train { background: #F1EBFA; color: #6B3FB0; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.src-tag { font-size: 10.5px; color: var(--sub); display: inline-flex; gap: 3px; align-items: center; }
.approx { border-bottom: 2px wavy #C9B48A; text-decoration: none; }
.range { color: var(--sub); font-size: .85em; }
.hint { font-size: 11.5px; color: #7C8B82; background: #F0F5F0; border-radius: 10px; padding: 8px 10px; line-height: 1.5; margin-top: 10px; display: flex; gap: 6px; }
.hint .ic-xs { flex: none; margin-top: 2px; color: #8AA093; }

/* chips / stepper / toggle */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 12.5px; cursor: pointer; color: var(--ink); }
.chip.on { background: var(--green-soft); border-color: var(--green); color: var(--green-deep); font-weight: 650; }
.chip.add { color: var(--green-deep); border-style: dashed; }
.stepper { display: inline-flex; align-items: center; gap: 12px; background: #F2F6F2; border-radius: 12px; padding: 5px; }
.st-btn { width: 34px; height: 32px; border-radius: 9px; border: none; background: #fff; color: var(--ink); font-size: 17px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.st-val { min-width: 70px; text-align: center; font-size: 15px; font-weight: 650; }
.st-val i { font-style: normal; font-size: 11px; color: var(--sub); margin-left: 3px; }
.toggle { width: 46px; height: 27px; border-radius: 999px; border: none; background: #D5DEd6; position: relative; cursor: pointer; transition: background .15s; }
.toggle i { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle.on { background: var(--green); }
.toggle.on i { left: 22px; }
.toggle.disabled { opacity: .45; cursor: not-allowed; }

/* kv / 明细 */
.kv { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv span { color: var(--sub); }
.hist { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.hist > div { font-size: 11.5px; color: var(--sub); padding: 3px 0; display: flex; gap: 5px; align-items: center; }
.plain { font-size: 13px; line-height: 1.65; }
.plain.small { font-size: 12.5px; color: #3D4A43; }
.plain.dim, .mini.dim { color: #8B9A91; }
.mini { font-size: 11.5px; color: var(--sub); }
.sec-h { display: flex; justify-content: space-between; align-items: center; margin: 14px 4px 9px; font-size: 13px; font-weight: 650; color: #42504A; }
.today-record-head { margin-top: 18px; font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: -.25px; }
.empty { text-align: center; color: var(--sub); padding: 60px 0; font-size: 13px; }

/* ================= 首页 ================= */
.hello { display: flex; align-items: center; gap: 12px; margin: 7px 2px 15px; }
.hello-avatar { width: 50px; height: 50px; flex: 0 0 50px; overflow: hidden; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(222,244,225,.88)); border: 1px solid rgba(255,255,255,.96); box-shadow: 0 5px 14px rgba(55,126,78,.13), inset 0 1px 0 rgba(255,255,255,.96); font-size: 21px; }
.hello-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.hello .head-settings { margin-left: auto; flex: 0 0 42px; }
.hello-hi { font-size: 13px; line-height: 1.35; font-weight: 450; color: #77837C; letter-spacing: .05px; }
.hello-name { margin-top: 2px; font-size: 21px; line-height: 1.22; font-weight: 700; color: #34413A; letter-spacing: -.3px; }
.hello-sub { font-size: 11.5px; color: var(--sub); margin-top: 2px; }

.ask-card { border: 1.5px solid #E8CD96; background: linear-gradient(180deg, #FFFCF4, #FFFDF8); }
.ask-card.pulse, [data-pulse].pulse { animation: pulse 1.6s ease 2; }
@keyframes pulse { 0%,100% { box-shadow: var(--shadow); } 50% { box-shadow: 0 0 0 6px rgba(242,200,121,.28); } }
.ask-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ask-src { font-size: 11px; color: var(--sub); }
.ask-q { font-size: 15px; font-weight: 650; line-height: 1.45; }
.ask-cands { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0 2px; }
.cand { font-size: 11.5px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.cand i { font-style: normal; color: var(--green-deep); margin-left: 4px; font-weight: 650; }
.ask-acts { display: flex; gap: 8px; margin-top: 11px; }
.ask-acts.wrap { flex-wrap: wrap; }
.ask-acts .btn { padding: 8px 14px; font-size: 12.5px; }
.fill-card { border: 1.5px dashed #E4B98C; background: #FFFBF5; }

/* 表盘 */
.hero { background: linear-gradient(180deg, #FFFFFF 0%, #FBFDFB 100%); }
.gauge-wrap { position: relative; width: 220px; margin: 2px auto -60px; }
.gauge { width: 100%; display: block; }
.g-track { fill: none; stroke: #EDF2ED; stroke-width: 13; stroke-linecap: round; }
.g-track.t2 { stroke-width: 11; }
.g-arc { fill: none; stroke-width: 13; stroke-linecap: round; transition: stroke-dasharray .5s; }
.g-act { stroke: #8EDB43; }
.g-in { stroke: #FF6B67; stroke-width: 11; }
.g-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -58%); text-align: center; }
.g-bal { font-size: 31px; font-weight: 800; letter-spacing: -1px; }
.g-bal.hot { color: var(--orange); }
.g-bal.low { color: var(--blue); }
.g-sub { font-size: 10.5px; color: var(--sub); margin-top: 2px; }
.hero-leg { margin-top: 1px; }
.hl { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 650; padding: 3px 2px; flex-wrap: wrap; }
.hl b { margin-left: auto; color: var(--sub); font-weight: 800; font-size: 13.5px; }
.hl em { font-style: normal; color: var(--sub); font-size: 12px; font-weight: 500; }
.hl.dim { color: #8B9A91; font-size: 11px; font-weight: 400; }
.hero > .mini.dim { color: #8B9A91; font-weight: 400; }
.sw { width: 9px; height: 9px; border-radius: 3px; }
.sw.in { background: linear-gradient(135deg, #E84C62, #FFB05F); }
.sw.out { background: linear-gradient(135deg, #5FBF3F, #C8F05A); }

.duo { display: flex; gap: 10px; }
.duo-c { flex: 1; margin-bottom: 12px; cursor: pointer; }
.big { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.big-u { font-size: 11px; font-weight: 600; color: var(--sub); margin-left: 4px; font-style: normal; }
.ribbon { display: flex; height: 10px; border-radius: 999px; overflow: hidden; margin: 9px 0 6px; background: #EDF1ED; }
.rb-seg { height: 100%; }
.rb-leg { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 10px; color: var(--sub); }
.rb-leg i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 3px; }

.sg-card { border-top: 3px solid var(--green); }
.sg-t { font-size: 14.5px; font-weight: 700; }
.sg-b { font-size: 12.5px; color: #42504A; line-height: 1.6; margin: 5px 0 2px; }

/* ================= 记录页 ================= */
.filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 5px; margin: 2px 0 12px; }
.filter-nav { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; border: none; background: transparent; color: #5F6864; cursor: pointer; }
.filter-orb { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #FFFFFF; color: #A5ADA8; transition: background var(--duration-fast), color var(--duration-fast), box-shadow var(--duration-fast), transform var(--duration-fast); }
.filter-icon { width: 23px; height: 23px; color: currentColor; }
.filter-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; line-height: 1.25; color: #9AA39E; transition: color var(--duration-fast), font-weight var(--duration-fast); }
.filter-nav.on .filter-orb { background: var(--filter-accent); color: #FFFFFF; box-shadow: 0 5px 12px color-mix(in srgb, var(--filter-accent) 30%, transparent); transform: translateY(-1px); }
.filter-nav.on .filter-label { color: var(--filter-accent); font-weight: 700; }
.filter-nav:active .filter-orb { transform: scale(.94); }
.cov-strip { font-size: 11px; color: var(--sub); background: #EDF3EE; border-radius: 9px; padding: 7px 10px; margin-bottom: 12px; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.day-h { display: flex; justify-content: space-between; align-items: center; margin: 13px 4px 8px; font-size: 13px; }
.day-h span { font-size: 11px; color: var(--sub); display: flex; gap: 6px; align-items: center; }
.day-h .badge.b-ok { background: #FFFFFF; }
.list-card { margin: 0 0 14px; padding: 6px 14px; background: #FFFFFF; border: 1px solid rgba(255,255,255,.96); border-radius: 22px; box-shadow: 0 8px 20px rgba(54,116,83,.08), 0 1px 3px rgba(40,76,58,.05); }
.ev-row { display: flex; gap: 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid #F0F4F0; cursor: pointer; }
.ev-row:last-child { border-bottom: none; }
.ev-row.is-pending { background: linear-gradient(90deg, #FFF9EC, transparent); border-radius: 10px; }
.ev-ic { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.ev-ic .ic { width: 18px; height: 18px; }
.s-travel { background: #F1EBFA; color: var(--purple); }
.s-consume { background: #FDEFE6; color: var(--orange); }
.s-office { background: #EBF1FC; color: var(--blue); }
.s-dorm { background: var(--green-soft); color: var(--green-deep); }
.ev-main { flex: 1; min-width: 0; }
.ev-t { font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-m { font-size: 10.5px; color: var(--sub); margin-top: 2px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.ev-v { text-align: right; display: flex; flex-direction: column; gap: 2px; font-size: 11px; }
.v-k { color: var(--orange); font-weight: 650; }
.v-k.out { color: var(--green-deep); }
.v-y { color: #3355A8; font-size: 13.5px; line-height: 1.15; font-weight: 800; letter-spacing: .05px; }
.v-c { color: #4E5A66; font-weight: 600; }
.v-miss { color: #B4530A; font-size: 10.5px; border-bottom: 1px dashed #E4B98C; }
.ev-quick { display: flex; flex-direction: column; gap: 4px; }

/* ================= 详情页 ================= */
.dt-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.dt-head .icon-btn { width: 42px; height: 42px; min-width: 42px; min-height: 42px; padding: 0; border: 1px solid rgba(255,255,255,.92); background: rgba(255,255,255,.58); color: rgba(73,85,78,.76); box-shadow: 0 7px 18px rgba(54,116,83,.10), inset 0 1px 0 rgba(255,255,255,.86); backdrop-filter: blur(16px) saturate(125%); -webkit-backdrop-filter: blur(16px) saturate(125%); }
.dt-head .icon-btn.danger { background: #FBEDEF; border-color: rgba(255,255,255,.92); color: #D6455D; }
.dt-title { flex: 1; min-width: 0; }
.dt-title b { font-size: 16px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-title span { font-size: 11.5px; color: var(--sub); }
.dt-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.trio { display: flex; gap: 9px; }
.trio-c { flex: 1; margin-bottom: 12px; padding: 12px; }
.trio-c .t-lab { font-size: 14px; font-weight: 800; margin-bottom: 8px; }
.trio-c:nth-child(1) .t-lab { color: #E84C62; }
.trio-c:nth-child(2) .t-lab { color: #238FEA; }
.trio-c:nth-child(3) .t-lab { color: #5FBF3F; }
.detail-section .card-h > span:first-child { font-size: 16px; font-weight: 800; }
.weekly-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, auto)); gap: 7px; }
.weekly-stats .trio-c { min-width: 0; height: 100%; margin-bottom: 0; padding: 12px 14px; border: 1px solid rgba(255,255,255,.86); border-radius: 18px; box-shadow: 0 8px 20px rgba(30,41,59,.07); }
.weekly-stats .stat-spend { grid-column: 1; grid-row: 1; }
.weekly-stats .stat-activity { grid-column: 1; grid-row: 2; }
.weekly-stats .stat-emissions { grid-column: 2; grid-row: 1 / span 2; }
.weekly-stats .stat-emissions { display: flex; flex-direction: column; justify-content: flex-start; }
.weekly-stats .stat-emissions .t-val { margin-top: auto; font-size: 27px; letter-spacing: -.75px; }
.weekly-stats .stat-emissions .t-val i { font-size: 11px; }
.weekly-stats .stat-emissions .t-sub { margin-top: 6px; margin-bottom: auto; font-size: 11.5px; }
.weekly-stats .stat-spend, .weekly-stats .stat-activity, .weekly-stats .stat-emissions { background: #FFFFFF; border-color: rgba(230,232,235,.82); }
.weekly-stats .t-lab { color: #69746F; font-size: 12.5px; font-weight: 750; margin-bottom: 7px; display: flex; align-items: center; gap: 6px; }
.weekly-stats .stat-spend .t-lab { color: #238FEA; }
.weekly-stats .stat-activity .t-lab { color: #E84C62; }
.weekly-stats .stat-emissions .t-lab { color: #5FBF3F; }
.weekly-stats .t-val { color: #202124; font-size: 23px; letter-spacing: -.55px; line-height: 1.05; }
.weekly-stats .t-sub { color: #74807A; font-size: 10.5px; margin-top: 6px; }
.t-lab { font-size: 11px; color: var(--sub); display: flex; gap: 4px; align-items: center; margin-bottom: 6px; }
.t-val { font-size: 19px; font-weight: 800; letter-spacing: -.4px; }
.t-val i { font-style: normal; font-size: 10.5px; color: var(--sub); margin-left: 2px; font-weight: 600; }
.t-val .rb { display: block; font-size: 9.5px; color: #3355A8; background: #EEF2FB; border-radius: 5px; padding: 1px 5px; width: fit-content; margin-bottom: 2px; font-weight: 600; }
.t-sub { font-size: 10.5px; color: var(--sub); margin-top: 4px; line-height: 1.4; }
.edit-card { border: 1.5px solid var(--green); }
.delta { font-size: 11.5px; font-weight: 700; }
.delta.up { color: var(--red); }
.delta.down { color: var(--green-deep); }
.e-lab { font-size: 12px; color: var(--sub); margin: 12px 0 7px; }
.food-rows { display: flex; flex-direction: column; gap: 6px; }
.food-row { display: flex; align-items: center; gap: 8px; background: #F7FAF7; border-radius: 10px; padding: 7px 10px; }
.f-name { flex: 1; font-size: 13px; }
.f-name .conf { font-style: normal; font-size: 10px; color: var(--green-deep); margin-left: 6px; }
.st-inline { display: flex; align-items: center; gap: 8px; }
.st-inline b { font-size: 13px; min-width: 52px; text-align: center; }
.st-inline .st-btn { width: 28px; height: 26px; font-size: 14px; }
table.chain { width: 100%; border-collapse: collapse; font-size: 11px; }
.chain th { text-align: left; color: var(--sub); font-weight: 600; padding: 4px 4px; border-bottom: 1px solid var(--line); }
.chain td { padding: 6px 4px; border-bottom: 1px dashed #EAF0EA; vertical-align: top; line-height: 1.45; }
.fac { display: block; max-width: 130px; }
.bd-tag { display: block; font-style: normal; font-size: 9.5px; color: #8B9A91; }
.formula { margin-top: 9px; font-size: 11.5px; color: #42504A; background: #F4F8F4; border-radius: 9px; padding: 8px 10px; }
.bl-card .bl-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.bl-i { font-size: 13px; font-weight: 650; }
.bl-i small { display: block; font-weight: 400; color: var(--sub); font-size: 11px; margin-top: 1px; }
.bl-row b { font-size: 15px; }
.bl-row.alt b { color: var(--blue); }
.bl-row b.good { color: var(--green-deep); }
.bl-row b.warn { color: var(--amber); }
.baseline-card .card-h { margin-bottom: 12px; }
.baseline-card .card-h > span:first-child { font-size: 17px; font-weight: 800; }
.baseline-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.baseline-card .bl-row { position: relative; display: block; min-height: 61px; padding: 9px 10px; border: 1px solid #E7EEE8; border-radius: 10px; background: #F7FAF7; }
.baseline-card .bl-i { font-size: 13.5px; font-weight: 700; }
.baseline-card .bl-i small { position: static; display: block; min-height: 26px; max-width: none; margin: 4px 0 0; color: #D96A4A; font-size: 10.5px; font-weight: 400; line-height: 1.25; text-align: left; }
.baseline-card .bl-row b { display: block; margin-top: 10px; font-size: 20px; font-weight: 850; }
.weekly-title-card .card-h > span:first-child,
.emissions-hero .card-h > span:first-child,
.points-card .card-h > span:first-child,
.cal-card .card-h > span:first-child { font-size: 17px; font-weight: 800; letter-spacing: -.2px; }
.bl-save { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--green-deep); background: var(--green-soft); border-radius: 10px; padding: 9px 11px; }
.bl-save span { display: block; font-weight: 400; font-size: 10.5px; color: #5F8471; margin-top: 2px; }

/* ================= 周报 ================= */
.wk-head { display: flex; justify-content: space-between; align-items: center; margin: 2px 2px 11px; }
.wk-head b { font-size: 15.5px; }
.cov-banner { font-size: 11.5px; color: #77827C; background: rgba(239,242,240,.92); border: 1px solid rgba(224,229,225,.8); border-radius: 11px; padding: 9px 11px; margin: 10px 0 12px; line-height: 1.5; display: flex; align-items: flex-start; gap: 6px; }
.cov-banner > .ic-xs { flex: none; margin-top: 2px; }
.cov-banner > span { flex: 1; min-width: 0; }
.cov-banner > .ic-xs { color: #7C8781; }
.chart-lab { font-size: 11px; color: var(--sub); margin: 10px 0 6px; }
.bars { display: flex; gap: 6px; height: 120px; align-items: stretch; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; }
.bar-val { font-size: 9px; color: var(--sub); }
.bar { width: 100%; max-width: 26px; background: linear-gradient(180deg, #C8F05A 0%, #5FBF3F 100%); border-radius: 6px 6px 3px 3px; }
.gap-bar { background: none; border: 1.5px dashed #CBD6CE; width: 100%; max-width: 26px; }
.bar-col.gap .bar-val { color: #B3BFB6; }
.bar-wd { font-size: 10px; color: var(--sub); margin-top: 2px; }
.seg-ctl { display: flex; gap: 5px; }
.seg-ctl .chip { padding: 4px 10px; font-size: 11px; }
.donut-flex { display: flex; gap: 14px; align-items: center; }
.donut-wrap { position: relative; width: 120px; flex: none; }
.donut { width: 100%; display: block; transform: rotate(-90deg); }
.d-track { fill: none; stroke: #EDF2ED; stroke-width: 14; }
.d-seg { fill: none; stroke-width: 14; stroke-linecap: butt; }
.d-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; font-size: 14px; font-weight: 800; }
.d-center i { display: block; font-style: normal; font-size: 8.5px; color: var(--sub); font-weight: 600; }
.d-leg { flex: 1; }
.d-leg > div { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 3.5px 0; }
.d-leg i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.d-leg b { margin-left: auto; }
.d-leg em { font-style: normal; color: var(--sub); font-size: 10.5px; width: 32px; text-align: right; }
.finance-hero .fin-top > div:first-child { margin: 4px 0 0 3px; }
.finance-hero .fin-top { align-items: center; }
.finance-hero .big { font-size: 28px; }
.finance-hero .donut-flex { gap: 18px; }
.finance-hero .donut-wrap { width: 100px; }
.finance-hero .d-leg > div { font-size: 14px; font-weight: 650; padding: 4px 0; }
.finance-hero .d-leg b { font-size: 13.5px; font-weight: 800; }
.finance-hero .d-leg em { font-size: 12px; }
.finance-hero .seg-ctl { gap: 2px; padding: 3px; border: 1px solid #E5E9E6; border-radius: 999px; background: #F3F5F4; }
.finance-hero .seg-ctl .chip { border: none; background: transparent; border-radius: 999px; padding: 6px 12px; color: var(--ink); font-size: 12.5px; }
.finance-hero .seg-ctl .chip.on { background: #FFFFFF; color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(34, 61, 45, .08); }
.emissions-hero .seg-ctl { gap: 2px; padding: 3px; border: 1px solid #E5E9E6; border-radius: 999px; background: #F3F5F4; }
.emissions-hero .seg-ctl .chip { border: none; background: transparent; border-radius: 999px; padding: 5px 10px; color: var(--ink); font-size: 11.5px; }
.emissions-hero .seg-ctl .chip.on { background: #FFFFFF; color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(34, 61, 45, .08); }
.emissions-hero .donut-wrap { width: 108px; }
.emissions-hero .d-center { font-size: 18px; }
.emissions-hero .d-center i { font-size: 10px; }
.emissions-hero .d-leg > div { white-space: nowrap; gap: 4px; }
.emissions-hero .d-leg b, .emissions-hero .d-leg em { white-space: nowrap; }
.cal-card .seg-ctl { gap: 2px; padding: 3px; border: 1px solid #E5E9E6; border-radius: 999px; background: #F3F5F4; }
.cal-card .seg-ctl .chip { border: none; background: transparent; border-radius: 999px; padding: 5px 10px; color: var(--ink); font-size: 11.5px; }
.cal-card .seg-ctl .chip.on { background: #FFFFFF; color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(34, 61, 45, .08); }
.carbon-hero .fin-top > div:first-child { margin: 4px 0 0 10px; }
.carbon-hero .big { font-size: 30px; }
.carbon-hero .wk-delta { font-size: 24px; }
.carbon-hero .wk-delta span { font-size: 11.5px; }
.pts { display: flex; align-items: baseline; gap: 8px; }
.points-card .pts { gap: 4px; }
.pts-coin { display: inline-block; width: 22px; font-size: 26px; line-height: 1; transform: translateY(2px) scale(1.55); transform-origin: center bottom; margin-right: 0; }
.pts b { font-size: 26px; font-weight: 800; }
.pts span { font-size: 11.5px; color: var(--sub); }
.pts.big { justify-content: center; margin: 6px 0 10px; }
.prog { height: 8px; background: #EDF2ED; border-radius: 999px; margin: 9px 0 7px; overflow: hidden; }
.prog-bar { height: 100%; background: linear-gradient(90deg, #5FBF3F, #C8F05A); border-radius: 999px; }
.calendar { margin-top: 4px; }
.cal-hd { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px; }
.cal-hd span { text-align: center; font-size: 10px; color: var(--sub); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: min-content; align-content: start; height: max-content; gap: 4px; }
.cal-cell { aspect-ratio: 1 / 1; height: auto; min-height: 0; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 10.5px; color: var(--ink); }
.cal-cell.empty { background: transparent; padding: 0; font-size: 10.5px; }
.cal-cell.none { background: #EEF2EE; color: #AEB9B1; }
.cal-cell.lv1 { background: #D9EDDF; } .cal-cell.lv2 { background: #A8D8BB; }
.cal-cell.lv3 { background: #6FC492; } .cal-cell.lv4 { background: #2F9E63; color: #fff; }
.cal-cell.today { outline: 2px solid var(--orange); outline-offset: 1px; font-weight: 800; }
.cal-leg { display: flex; gap: 8px; align-items: center; font-size: 10.5px; color: var(--sub); margin-top: 8px; }
.cal-leg .cal-cell { width: 14px; height: 14px; aspect-ratio: auto; }
.next-card { border-left: 3px solid var(--green); }

/* ================= 我的 ================= */
.me-card { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.me-av { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: var(--green-soft); display: flex; align-items: center; justify-content: center; font-size: 26px; flex: none; }
.me-av.sm { width: 38px; height: 38px; font-size: 20px; }
.avatar-img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: inherit; }
.me-main { flex: 1; min-width: 0; }
.me-main b { font-size: 15px; }
.row-card { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.row-card .ic { color: var(--green-deep); }
.row-card > div { flex: 1; }
.row-card b { font-size: 13.5px; display: block; }
.pref-rows { display: flex; flex-direction: column; }
.pref-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.pref-row:last-child { border-bottom: none; }
.pref-row.dim > span { color: #8B9A91; }
.vision { display: block; font-size: 10px; color: #A3B0A8; font-style: normal; }
.p-row { display: flex; gap: 11px; align-items: center; padding: 11px 6px; border-radius: 12px; cursor: pointer; }
.p-row:hover { background: #F4F8F4; }
.p-row.on { background: var(--green-soft); }
.p-row > div { flex: 1; min-width: 0; }
.st-row { display: flex; flex-direction: column; gap: 3px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.st-row:last-child { border-bottom: none; }
.st-row b { font-size: 13px; }
.st-row span { font-size: 11px; color: var(--sub); }
.st-row.pass b { color: var(--green-deep); }
.st-row.fail b { color: var(--red); }
.rw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.rw { border: 1px solid var(--line); border-radius: 12px; padding: 11px; display: flex; flex-direction: column; gap: 4px; }
.rw .ic { color: var(--green-deep); }
.rw b { font-size: 12.5px; }
.rw i { font-style: normal; font-size: 12px; color: var(--orange); font-weight: 700; }
.rw em { font-style: normal; font-size: 9.5px; color: #A3B0A8; }
.sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.sum-grid > div { background: #F4F8F4; border-radius: 12px; padding: 11px; }
.sum-grid span { font-size: 11px; color: var(--sub); display: block; }
.sum-grid b { font-size: 19px; font-weight: 800; }

/* ================= 弹层 ================= */
.ov { position: absolute; inset: 0; background: rgba(14,22,18,.45); z-index: 30; display: flex; align-items: flex-end; animation: fade .18s; }
.ov.center { align-items: center; justify-content: center; padding: 24px; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: #fff; width: 100%; max-height: 86%; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 6px 16px 18px; animation: up .22s ease; }
@keyframes up { from { transform: translateY(40px); opacity: .6; } }
.sheet-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 0 8px; position: sticky; top: 0; background: #fff; }
.sheet-h b { font-size: 15.5px; }
.tabs { display: flex; gap: 6px; margin-bottom: 6px; }
.tab { flex: 1; border: none; background: #F0F4F0; border-radius: 10px; padding: 9px 0; font-size: 12.5px; cursor: pointer; color: var(--sub); }
.tab.on { background: var(--green-soft); color: var(--green-deep); font-weight: 700; }
.sheet-fab { position: sticky; bottom: 0; background: linear-gradient(180deg, transparent, #fff 30%); padding-top: 10px; }
.photo-sim .ph-frame, .ph-frame { border: 1.5px dashed #B9CDBE; border-radius: 14px; padding: 26px 14px; text-align: center; color: var(--sub); font-size: 12.5px; display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: pointer; background: #F8FBF8; }
.ph-frame .ic { width: 26px; height: 26px; color: #8FAE9B; }
.ph-frame.big { cursor: default; padding: 30px; }
.ocr-banner { font-size: 11px; color: #5F5130; background: #FBF4E2; border-radius: 9px; padding: 7px 10px; margin-bottom: 10px; display: flex; gap: 5px; align-items: center; line-height: 1.4; }
.bill-frame { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 13px; }
.bill-frame .ic { width: 26px; height: 26px; color: var(--green-deep); }
.bill-frame > div { flex: 1; }
.bill-amt { font-size: 20px; font-weight: 800; }
.modal { background: #fff; width: 100%; max-width: 330px; border-radius: 20px; padding: 18px; animation: up .2s ease; max-height: 80%; overflow-y: auto; }
.m-title { font-size: 16px; font-weight: 750; margin-bottom: 10px; }
.m-body { margin-bottom: 6px; }
.m-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }

.toast { position: absolute; bottom: 86px; left: 50%; transform: translateX(-50%); background: rgba(20,32,25,.92); color: #EAF4EC; font-size: 12px; border-radius: 999px; padding: 9px 16px; z-index: 50; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; animation: up .2s; }

/* 响应式 */
@media (max-width: 980px) {
  body { padding: 12px; }
  .stage { flex-direction: column; align-items: center; }
  .console { width: 100%; max-width: 392px; position: static; order: 2; }
  .storybar { max-width: 392px; }
}

/* ================= 第一批改版：1+3 首页 / 抽屉 / 轨迹地图 / AI 小字 ================= */
.ah-btn { display: flex; gap: 10px; align-items: center; background: none; border: none; cursor: pointer; padding: 0; text-align: left; }
.ah-btn b { font-size: 18px; display: block; line-height: 1.2; }
.cs-brand { font-size: 11.5px; color: #9FDcB8; margin: 5px 0 2px; letter-spacing: .02em; }
.cs-sec.side { margin-top: 14px; }

/* AI 小字行 */
.ai-line { font-size: 11.5px; color: #2E7D52; background: linear-gradient(90deg, #E9F7EE, #F4FBF6); border-radius: 10px; padding: 7px 10px; margin-bottom: 12px; display: flex; gap: 6px; align-items: center; }
.ai-line .ic-xs { color: #2F9E63; }

/* 大窗与成果面板 */
.hero-big { margin-bottom: 10px; }
.hero-big .card { margin-bottom: 0; }
.result-hero { border-top: 3px solid var(--green); }
.rb-row { display: flex; gap: 14px; align-items: center; }
.rb-hero { font-size: 40px; font-weight: 800; letter-spacing: -1.5px; line-height: 1; }
.rb-hero i { font-style: normal; font-size: 12px; font-weight: 600; color: var(--sub); margin-left: 5px; }
.rb-hero.good { color: var(--green-deep); }
.rb-hero.warn { color: var(--amber); }
.rb-sub { flex: 1; font-size: 11.5px; color: var(--sub); }
.rb-stats { display: flex; gap: 6px; margin-top: 8px; }
.rb-st { flex: 1; background: #F4F8F4; border-radius: 10px; padding: 7px 9px; }
.rb-st span { display: block; font-size: 10px; color: var(--sub); }
.rb-st b { font-size: 13.5px; font-weight: 750; }
.rb-st.good b { color: var(--green-deep); }
.rb-st.warn b { color: var(--amber); }
.sg-inline { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 11px; }
.sg-inline.done { font-size: 12px; color: var(--sub); text-align: center; }
.wk-delta { text-align: right; font-size: 17px; font-weight: 800; line-height: 1.2; }
.wk-delta span { display: block; font-size: 10px; color: var(--sub); font-weight: 500; }
.wk-delta.good { color: var(--green-deep); }
.wk-delta.warn { color: var(--amber); }

/* 三小窗 */
.smalls { display: flex; gap: 9px; margin-bottom: 12px; }
.sw-card { flex: 1; background: var(--card); border-radius: 14px; padding: 11px 10px; box-shadow: var(--shadow); cursor: pointer; border: 1.5px solid transparent; min-width: 0; }
.sw-card.on { border-color: var(--green); background: #FBFDFB; }
.sw-h { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--sub); font-weight: 650; }
.sw-h .ic-xs { color: var(--green-deep); }
.sw-h .ic-xs.rst { margin-left: auto; }
.sw-h .ic-xs:not(.rst) { }
.sw-h .ic-xs:last-child { margin-left: auto; }
.sw-viz { height: 46px; display: flex; align-items: center; justify-content: center; margin: 5px 0 3px; overflow: hidden; }
.mini-ring { width: 46px; height: 46px; }
.mini-ring .g-track { stroke-width: 10; }
.mini-ring .g-track.t2 { stroke-width: 8; }
.mini-ring .g-arc { stroke-width: 10; }
.mini-ring .g-in { stroke-width: 8; }
.spark { width: 100%; height: 30px; }
.spark.empty { height: 30px; background: #F0F4F0; border-radius: 6px; }
.mini-ribbon { display: flex; width: 100%; height: 12px; border-radius: 999px; overflow: hidden; background: #EDF1ED; }
.mini-ribbon i { height: 100%; }
.sw-val { font-size: 20px; font-weight: 800; letter-spacing: -.45px; white-space: nowrap; }
.sw-val i { font-style: normal; font-size: 11px; color: var(--sub); margin-left: 2px; }
.sw-sub { font-size: 9.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

/* 健康多维格 */
.dims { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
.dim-cell { background: #F6FAF6; border-radius: 11px; padding: 8px 10px; min-width: 0; }
.dc-top { display: flex; justify-content: space-between; font-size: 11.5px; }
.dc-top span { color: var(--sub); }
.dc-top b { font-size: 16px; font-weight: 900; color: #202522; letter-spacing: -.3px; }
.dim-cell .spark { height: 26px; margin: 3px 0 1px; }
.fin-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; }

/* 计算过程折叠（details） */
.chain-box { background: var(--card); border-radius: var(--r); padding: 12px 14px; margin-bottom: 12px; box-shadow: var(--shadow); font-size: 12.5px; }
.chain-box summary { cursor: pointer; color: var(--sub); font-weight: 600; list-style: none; display: flex; align-items: center; gap: 6px; }
.chain-box summary::-webkit-details-marker { display: none; }
.chain-box[open] summary { margin-bottom: 8px; }
.chain-box .chain, .chain-box .formula, .chain-box .hint { margin-top: 8px; }

/* 轨迹地图 */
.trackmap { background: var(--card); border-radius: var(--r); padding: 14px 14px 12px; margin-bottom: 12px; box-shadow: var(--shadow); }
.trackmap-title { margin: 2px 8px 14px; color: var(--ink); font-size: 17px; line-height: 1.2; font-weight: 800; letter-spacing: -.2px; }
.trackmap svg { width: 100%; display: block; }
.tm-bg { fill: #F1F6F1; }
.tm-map-base { pointer-events: none; }
.tm-water { fill: none; stroke: #D5E9E2; stroke-width: 15; stroke-linecap: round; opacity: .92; }
.tm-water-edge { fill: none; stroke: #C2DED4; stroke-width: 1.4; stroke-linecap: round; opacity: .9; }
.tm-major-road { fill: none; stroke: #DCE8DF; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.tm-road-thin { fill: none; stroke: #C9D9CD; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: .95; }
.tm-lane { fill: none; stroke: #B8CDBD; stroke-width: 1.1; stroke-dasharray: 5 5; stroke-linecap: round; opacity: .9; }
.tm-blocks path { fill: #E4EEE5; stroke: #C6D9C9; stroke-width: 1.1; stroke-linejoin: round; }
.tm-buildings rect { fill: #D5E5D7; stroke: #BFD3C2; stroke-width: .8; rx: 1.5; }
.tm-green path { fill: #DCEDE0; stroke: #C4DECA; stroke-width: 1; opacity: .9; }
.tm-area-label { fill: #9DAFA2; font-size: 7px; letter-spacing: .4px; }
.tm-seg { cursor: pointer; transition: stroke-width .12s; }
.tm-seg:hover { stroke-width: 5; }
.tm-dot { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.tm-dot.end { fill: var(--green); stroke: #fff; }
.tm-lab { font-size: 8.5px; fill: #7C8B82; text-anchor: middle; }
.tm-leg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; align-items: center; font-size: 11px; color: var(--sub); margin-top: 6px; }
.tm-leg span { display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }
.tm-leg i { width: 10px; height: 3.5px; border-radius: 2px; display: inline-block; }
.tm-leg em { grid-column: 1 / -1; justify-self: end; font-style: normal; margin: 1px 0 0; color: #A3B0A8; font-size: 10px; white-space: nowrap; text-align: right; }
.tm-empty { text-align: center; color: var(--sub); font-size: 12px; padding: 34px 0; }

/* 抽屉 */
.drawer-ov { align-items: stretch; justify-content: flex-start; }
.drawer { width: 318px; height: 100%; background: var(--paper); display: flex; flex-direction: column; animation: slidein .2s ease; border-radius: 0 22px 22px 0; box-shadow: 8px 0 40px rgba(10,20,14,.25); }
@keyframes slidein { from { transform: translateX(-60px); opacity: .5; } }
.drawer-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 10px; }
.drawer-h b { font-size: 15px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 0 13px 24px; }
.drawer-body .card { padding: 12px; }
.brand-block { display: flex; gap: 11px; align-items: center; padding: 6px 6px 14px; }
.brand-logo { width: 44px; height: 44px; border-radius: 13px; background: var(--green-soft); color: var(--green-deep); display: flex; align-items: center; justify-content: center; flex: none; }
.brand-block b { font-size: 18px; display: block; letter-spacing: .02em; }
.brand-block span { font-size: 10.5px; color: var(--sub); display: block; line-height: 1.45; margin-top: 2px; }

/* ================= 第二批：三环大窗 / 新分类 / 折叠 / FAB / 基线柱 / 日历 / 对话 / AI 设置 ================= */
.tri-ring-wrap { position: relative; width: 220px; margin: 4px auto 0; }
.tri-ring { width: 100%; display: block; }
.tri-ring .g-track { fill: none; stroke: #E8EFEB; stroke-linecap: round; }
.tri-ring .g-arc { fill: none; stroke-linecap: round; }
.tri-ring .g-arc { filter: drop-shadow(0 2px 2px rgba(34, 113, 87, .12)); }
.tri-center { position: absolute; top: 47%; left: 50%; transform: translate(-50%, -50%); text-align: center; width: 120px; }
.tri-big { font-size: 40px; font-weight: 900; letter-spacing: -1.3px; line-height: 1.05; color: var(--green-deep); text-shadow: 0 1px 1px rgba(255,255,255,.72); }
.tri-big i { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--sub); margin-left: 3px; letter-spacing: -.2px; }
.tri-big.good { color: var(--green-deep); }
.tri-sub { font-size: 10.5px; color: var(--sub); margin-top: 3px; }
.tri-leg { display: flex; justify-content: center; gap: 14px; font-size: 11.5px; color: #42504A; margin-top: 10px; flex-wrap: wrap; }
.tri-leg span { display: inline-flex; align-items: center; gap: 5px; }
.tri-leg i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.sg-line { flex: 1; min-width: 0; font-size: 11.5px; color: var(--sub); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-h > div { display: flex; gap: 6px; align-items: center; }
.result-hero .card-h > div { display: flex; gap: 6px; padding: 0; background: transparent; border: none; }
.result-hero .card-h > div .link { padding: 5px 9px; border: 1px solid #D7E7DA; border-radius: 999px; background: #FFFFFF; color: var(--ink); }
.result-hero .card-h > div .link:last-child { padding: 5px 2px; border: none; background: transparent; color: #8B9A91; font-weight: 500; }
.result-title { font-size: 18px; font-weight: 800; letter-spacing: -.35px; }
.tri-panel { margin: 1px -3px 8px; padding: 1px 8px 4px; border: 1px solid rgba(255,255,255,.94); border-radius: 24px; background: rgba(255,255,255,.68); -webkit-backdrop-filter: blur(16px) saturate(125%); backdrop-filter: blur(16px) saturate(125%); box-shadow: 0 10px 24px rgba(54,116,83,.08), inset 0 1px 0 rgba(255,255,255,.92); }
.tri-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 0 -3px 9px; }
.tri-stat { min-width: 0; padding: 12px 9px 13px; border: 1px solid rgba(255,255,255,.96); border-radius: 17px; background: #FFFFFF; box-shadow: 0 7px 16px rgba(54,116,83,.07), 0 1px 3px rgba(40,76,58,.04); }
.tri-stat span { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #65716B; font-weight: 700; }
.stat-dot { display: inline-block; width: 12px; height: 12px; flex: 0 0 12px; border-radius: 3px; background: currentColor; }
.tri-stat b { display: block; margin-top: 8px; color: #202124; font-size: 21px; line-height: 1.05; font-weight: 850; letter-spacing: -.55px; white-space: nowrap; }
.tri-stat b i { font-style: normal; margin-left: 3px; color: #5E6963; font-size: 9.5px; font-weight: 700; letter-spacing: 0; }
.tri-stat.stat-env span { color: #5FBF3F; }
.tri-stat.stat-econ span { color: #238FEA; }
.tri-stat.stat-act span { color: #E84C62; }

/* White glass panels: translucent surface, soft blur, edge light and diagonal glare. */
.result-hero,
.sw-card,
.list-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(132deg, rgba(255,255,255,.90) 0%, rgba(255,255,255,.66) 46%, rgba(250,255,252,.76) 100%);
  border: 1px solid rgba(255,255,255,.96);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  backdrop-filter: blur(22px) saturate(145%);
  box-shadow:
    0 18px 38px rgba(43, 105, 76, .13),
    0 3px 10px rgba(30,41,59,.06),
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(189, 232, 201, .38);
}
.result-hero::before,
.sw-card::before,
.list-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, rgba(255,255,255,.90) 0%, rgba(255,255,255,.30) 22%, transparent 42%, rgba(255,255,255,.24) 68%, transparent 100%);
  opacity: .96;
}
.result-hero > *,
.sw-card > *,
.list-card > * { position: relative; z-index: 1; }

/* 记录分类 chips 与三账摘要行 */
.filters .chip.rc { display: inline-flex; align-items: center; gap: 4px; padding: 6px 11px; }
.cat-sum { display: flex; gap: 8px; align-items: center; background: #fff; border: 1.5px solid; border-radius: 12px; padding: 8px 10px; margin-bottom: 12px; overflow-x: auto; }
.cs-name { font-size: 11px; color: #fff; border-radius: 999px; padding: 3px 9px; white-space: nowrap; font-weight: 650; }
.cs-item { font-size: 12px; font-weight: 700; display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.cs-item .ic-xs { color: var(--sub); }
.day-toggle { display: inline-flex; gap: 6px; align-items: center; background: none; border: none; cursor: pointer; padding: 0; font-size: 13px; color: var(--ink); }
.day-toggle .ic-xs { color: #9DB3A4; }
.day-toggle.open .ic-xs { transform: rotate(90deg); }

/* FAB */
.fab { position: absolute; right: 16px; bottom: 96px; width: 58px; height: 58px; border-radius: 50%; border: none; background: #49C878; color: #fff; box-shadow: 0 11px 24px rgba(38,147,85,.28), 0 3px 8px rgba(38,80,55,.14); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 12; overflow: hidden; }
.fab::before { display: none; }
.fab .ic { width: 32px; height: 32px; position: relative; z-index: 1; filter: none; }
.fab:active { transform: scale(.94); box-shadow: 0 5px 12px rgba(38,147,85,.22); }

/* 基线对比双向柱 */
.bars-delta { margin-top: 4px; }
.bd-grid { display: flex; gap: 6px; height: 128px; align-items: stretch; }
.bd-col { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.bd-bar-zone { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; position: relative; }
.bd-zone { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; position: relative; }
.bd-zone.down-zone { justify-content: flex-start; }
.bd-zone.up-zone::before, .bd-zone.down-zone::before { content: ''; position: absolute; top: 0; bottom: 0; width: 100%; max-width: 24px; box-sizing: border-box; border: 1.5px dashed #CBD6CE; border-radius: 5px; pointer-events: none; }
.bd-bar { width: 100%; max-width: 24px; border-radius: 5px; }
.bd-bar.up { background: linear-gradient(180deg, #FFB05F, #E84C62); }
.bd-bar.down { background: linear-gradient(180deg, #C8F05A, #5FBF3F); }
.bd-zero { width: 82%; height: 2px; background: #D5DED6; border-radius: 2px; margin: 1px 0; }
.bd-gap { width: 100%; max-width: 24px; height: 100%; box-sizing: border-box; border: 1.5px dashed #CBD6CE; border-radius: 5px; align-self: center; margin: 0; }
.bd-bar { position: relative; z-index: 1; }

/* 日历防溢出（修复只显示左半） */
.cal-card { min-width: 0; }
.calendar { width: 100%; min-width: 0; }
.cal-hd, .cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); width: 100%; }
.cal-cell { min-width: 0; overflow: hidden; }
.screen { overflow-x: hidden; }

/* 对话弹层 */
.sheet.chat { height: 78%; display: flex; flex-direction: column; }
.chat-list { flex: 1; overflow-y: auto; padding: 6px 2px; display: flex; flex-direction: column; gap: 9px; }
.msg { max-width: 84%; border-radius: 14px; padding: 9px 12px; font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: #F1F6F1; border-bottom-left-radius: 4px; }
.msg.typing { color: var(--sub); }
.chat-input { display: flex; gap: 8px; padding: 10px 0 4px; align-items: center; }
.chat-input input { flex: 1; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 13px; font-size: 13px; outline: none; background: #fff; }
.chat-input input:focus { border-color: var(--green); }
.icon-btn.pri-bg { background: var(--green); color: #fff; }
.icon-btn.pri-bg .ic { transform: rotate(180deg); }
.sheet-h .icon-btn, .chat-input .icon-btn { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; border-radius: 50%; flex: 0 0 44px; }

/* AI 设置 */
.ai-key-row { display: flex; gap: 8px; align-items: center; }
.ai-key-row input { flex: 1; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 12px; outline: none; background: #fff; min-width: 0; }
.ph-frame.mock { border-style: dashed; background: #FAFBF9; }
.ph-frame.loading { border-style: solid; }
.ph-frame.loading .ic { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.plain code { background: #EEF3EE; border-radius: 5px; padding: 1px 6px; font-size: 11.5px; font-family: Consolas, monospace; }

/* ================= iOS calm visual layer ================= */
body { font-family: 'Roboto', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
.phone-app { isolation: isolate; overflow: hidden; background: rgba(255,255,255,.68); }
.phone-app::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .78; background: url('../assets/qingji-bg.png') center / cover no-repeat; }
.app-head { padding: 10px 18px 12px; }
.demo-tag { display: none; }
.screen { padding: 2px 16px 28px; }
.tabbar { border-top-color: rgba(230,232,235,.82); background: rgba(255,255,255,.94); padding: 9px 10px 18px; box-shadow: 0 -8px 24px rgba(30,41,59,.04); }
.tb.on { color: var(--green-deep); font-weight: 700; }
.card { background: rgba(255,255,255,.94); border: 1px solid rgba(230,232,235,.82); border-radius: var(--r); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow-card); }
.btn { border-radius: 999px; padding: 10px 16px; transition: transform var(--duration-fast) var(--ease-ios), opacity var(--duration-fast) ease, box-shadow var(--duration-fast) ease; }
.icon-btn { width: 36px; height: 36px; background: #F1F5F0; transition: transform var(--duration-fast) var(--ease-ios), opacity var(--duration-fast) ease; }
.chip { background: rgba(255,255,255,.84); padding: 7px 13px; transition: transform var(--duration-fast) var(--ease-ios), background var(--duration-fast) ease; }
.hero { background: rgba(255,255,255,.96); border-top-color: var(--color-blue); }
.result-hero { border-top-color: var(--color-green); }
.ask-card { border: 1px solid rgba(252,201,89,.7); background: rgba(255,248,228,.82); }
.fill-card { border-color: rgba(238,106,116,.55); background: rgba(255,240,241,.64); }
.sw-card { background: rgba(255,255,255,.94); border: 1px solid rgba(230,232,235,.82); border-radius: 18px; padding: 12px 10px; box-shadow: var(--shadow-card); transition: transform var(--duration-fast) var(--ease-ios), border-color var(--duration-fast) ease; }
.ai-line, .cov-strip, .hint { border: 1px solid rgba(230,232,235,.7); }
.s-travel { background: #F0ECFA; color: #7966AA; }
.s-consume { background: var(--color-coral-soft); color: #C45963; }
.s-office { background: var(--color-blue-soft); color: #3985B5; }
.s-dorm { background: var(--color-green-soft); color: var(--green-deep); }
.ov { background: rgba(32,33,36,.28); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation-duration: var(--duration-fast); }
.sheet { border-radius: 26px 26px 0 0; padding: 8px 18px 22px; box-shadow: 0 -12px 30px rgba(30,41,59,.12); animation: up var(--duration-normal) var(--ease-ios); }
.modal { border: 1px solid rgba(230,232,235,.85); border-radius: 24px; padding: 20px; box-shadow: var(--shadow-float); animation: up var(--duration-normal) var(--ease-ios); }
.drawer { background: rgba(247,249,248,.98); box-shadow: 8px 0 40px rgba(30,41,59,.16); }
.drawer-body .card { background: rgba(255,255,255,.94); }
[data-act], button, .duo-c, .sw-card, .ev-row, .row-card, .me-card { -webkit-user-select: none; user-select: none; }
button:active, [data-act]:active, .duo-c:active, .sw-card:active, .ev-row:active, .row-card:active, .me-card:active { transform: scale(.985); opacity: .86; }

/* White panels should sit clearly above the pastel background. */
.card,
.sw-card,
.trackmap,
.chain-box,
.list-card,
.cat-sum,
.drawer-body .card,
.sheet,
.modal {
  box-shadow: 0 12px 30px rgba(30,41,59,.10), 0 2px 8px rgba(30,41,59,.045);
}
.sw-card.on,
.result-hero,
.hero-big .card {
  box-shadow: 0 14px 34px rgba(30,41,59,.12), 0 3px 10px rgba(30,41,59,.05);
}

@media (max-width: 420px) {
  body { padding: 0; align-items: flex-start; }
  .phone { width: min(100vw, 392px); height: 100dvh; min-height: 640px; border-width: 0; border-radius: 0; box-shadow: none; }
  .stage, .phone-col { width: 100%; }
  .screen { padding-left: 14px; padding-right: 14px; }
  .storybar { width: calc(100% - 24px); }
}
@media (max-width: 340px) {
  .screen { padding-left: 12px; padding-right: 12px; }
  .smalls { gap: 6px; }
  .sw-card { padding-left: 8px; padding-right: 8px; }
  .sw-val { font-size: 18px; }
  .trio { gap: 6px; }
.trio-c { padding: 10px; }
}

/* The profile header opens the left drawer; give it a quiet frosted-glass affordance. */
.app-head {
  margin: 0;
  padding: 10px 18px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.app-head .ah-btn { flex: initial; min-height: 0; }
.app-head .ah-av { background: var(--green-soft); }
.home-head { justify-content: flex-end; padding: 7px 18px 3px; }
.head-settings { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.92); border-radius: 50%; background: rgba(255,255,255,.58); color: rgba(73,85,78,.76); box-shadow: 0 7px 18px rgba(54,116,83,.10), inset 0 1px 0 rgba(255,255,255,.86); backdrop-filter: blur(16px) saturate(125%); -webkit-backdrop-filter: blur(16px) saturate(125%); cursor: pointer; }
.head-settings .ic { width: 21px; height: 21px; }
.head-settings:active { transform: scale(.94); }

/* The three benefit arcs are the visual focus; keep the value below the artwork. */
.tri-ring-wrap {
  width: 278px;
  padding-bottom: 0;
  margin: 0 auto;
}
.tri-center {
  position: absolute;
  top: 72%;
  left: 50%;
  width: 170px;
  margin: 0;
  transform: translate(-50%, -50%);
}
.tri-big { font-size: 29px; }
.tri-sub { margin-top: 4px; }
.tri-leg { margin-top: 3px; }
@media (max-width: 340px) {
  .tri-ring-wrap { width: 248px; }
  .tri-center { width: 164px; }
  .tri-big { font-size: 26px; }
}

/* ================= Apple HIG visual rules =================
   Reference: Apple Human Interface Guidelines — Foundations, Layout,
   Color, Materials, Typography, Sheets, Motion, Accessibility.
   These are visual rules only; state and navigation remain unchanged. */
:root {
  --ios-space-1: 4px;
  --ios-space-2: 8px;
  --ios-space-3: 12px;
  --ios-space-4: 16px;
  --ios-space-5: 20px;
  --ios-space-6: 24px;
  --ios-radius-control: 12px;
  --ios-radius-card: 20px;
  --ios-label-primary: #202124;
  --ios-label-secondary: #6B7280;
  --ios-separator: rgba(60,60,67,.18);
  --ios-accent: #49C878;
}

/* Typography: one system family, readable weights, explicit hierarchy. */
body { color: var(--ios-label-primary); -webkit-font-smoothing: antialiased; }
.card-h, .sec-h, .wk-head b, .dt-title b, .m-title { font-weight: 650; }
.mini, .src-tag, .ev-m, .t-sub, .sw-sub, .g-sub { color: var(--ios-label-secondary); }

/* Layout: grouped content, consistent leading/trailing margins, no clipped rows. */
.screen { padding-inline: var(--ios-space-4); padding-bottom: 32px; }
.card, .trackmap, .chain-box, .list-card { border-radius: var(--ios-radius-card); }
.card-h, .sec-h { min-height: 24px; }
.ev-row, .pref-row, .kv { min-height: 44px; }

/* Controls: clear affordance and comfortable hit areas. */
.btn, .mini-btn, .chip, .tab, .tb, .icon-btn, .st-btn, .toggle { touch-action: manipulation; }
.btn, .icon-btn, .st-btn { min-height: 40px; }
.btn.pri { background: var(--ios-accent); border-color: var(--ios-accent); box-shadow: 0 7px 16px rgba(73,200,120,.28); }
.btn.ghost { background: #fff; border: 1px solid rgba(230,232,235,.95); color: #4B5A52; }
.mini-btn, .tab, .st-btn { border-radius: 999px; }
.link, .tb.on { color: var(--ios-accent); }
.btn:focus-visible, .chip:focus-visible, .tb:focus-visible, .icon-btn:focus-visible,
.link:focus-visible, .mini-btn:focus-visible, .tab:focus-visible {
  outline: 3px solid rgba(75,180,234,.55);
  outline-offset: 2px;
}

/* Materials: use translucency for functional layers, opaque surfaces for content. */
.tabbar { margin: 0; border: 1px solid rgba(255,255,255,.96); border-bottom: 0; border-radius: 30px 30px 0 0; background: rgba(255,255,255,.88); backdrop-filter: blur(18px) saturate(1.12); -webkit-backdrop-filter: blur(18px) saturate(1.12); box-shadow: 0 -10px 26px rgba(53,116,82,.10), inset 0 1px 0 rgba(255,255,255,.98); position: relative; z-index: 2; }
.drawer-h, .sheet-h { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.card, .sw-card, .list-card, .trackmap, .chain-box { background: rgba(255,255,255,.94); }
.ov.center .modal, .sheet { isolation: isolate; }

/* Final glass pass: keep the panel visibly translucent over the pastel background. */
.phone-app { background: rgba(255,255,255,.44); }
.result-hero,
.sw-card,
.sw-card.on,
.list-card {
  background:
    linear-gradient(135deg, rgba(255,255,255,.76) 0%, rgba(255,255,255,.50) 48%, rgba(244,255,248,.64) 100%);
  -webkit-backdrop-filter: blur(28px) saturate(175%);
  backdrop-filter: blur(28px) saturate(175%);
  border-color: rgba(255,255,255,.98);
  box-shadow:
    0 18px 42px rgba(43,105,76,.16),
    0 4px 12px rgba(30,41,59,.06),
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(147,214,166,.36);
}

/* Sheets and overlays: preserve context while creating a clear layer. */
.ov { background: rgba(32,33,36,.26); }
.sheet { border-top: 1px solid rgba(255,255,255,.75); }
.modal { max-width: min(330px, calc(100% - 32px)); }

/* Motion: calm by default and fully removable for reduced-motion users. */
@keyframes screenEnter {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes cardEnter {
  from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.992); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
.screen {
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  scroll-padding-top: 10px;
  animation: screenEnter .34s var(--ease-ios) both;
}
.screen > .card,
.screen > .hero,
.screen > .trackmap,
.screen > .list-card,
.screen > .chain-box {
  animation: cardEnter .42s var(--ease-ios) both;
}
.screen > :nth-child(2) { animation-delay: .035s; }
.screen > :nth-child(3) { animation-delay: .07s; }
.screen > :nth-child(4) { animation-delay: .105s; }
.screen > :nth-child(5) { animation-delay: .14s; }
.tabbar { transition: box-shadow .25s ease, background-color .25s ease; }
.tb { transition: color .22s ease, transform .22s var(--ease-ios), opacity .22s ease; }
.tb .ic { transition: transform .22s var(--ease-ios); }
.tb.on .ic { transform: translateY(-1px) scale(1.06); }
button, [data-act] { -webkit-tap-highlight-color: transparent; }

/* Demo presentation: calm gray-green canvas with a readable control panel. */
body { background: #dfe6e0; }
.console {
  background: rgba(62, 92, 75, .12);
  border-color: rgba(62, 92, 75, .24);
  color: #405b4c;
}
.cs-h { color: #2f4d3d; }
.cs-h { margin-bottom: 14px; }
.cs-h .ic { color: #4f9c6e; }
.cs-brand, .cs-note { display: none; }
.cs-sec { color: #527060; }
.console .btn { background: rgba(255,255,255,.45); color: #405b4c; border-color: rgba(62,92,75,.20); }
.console .btn.pri { background: var(--green); border-color: var(--green); color: #fff; }
.console .chip { background: rgba(255,255,255,.38); border-color: rgba(62,92,75,.18); color: #405b4c; }
.console .chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.console .mini-btn { background: rgba(255,255,255,.42); color: #405b4c; }
.task, .task.st .tk-t { color: #527060; }
.task { background: rgba(255,255,255,.24); }
.task.done { background: rgba(47,158,99,.13); }

/* Keep the bottom navigation inside the phone silhouette on every viewport. */
.phone-app { border-radius: inherit; overflow: hidden; }
.tabbar { width: 100%; max-width: 100%; min-width: 0; overflow: hidden; border-radius: 24px 24px 0 0; flex: 0 0 auto; }
.tb { min-width: 0; }

/* Inset the navigation so its lower corners remain inside the black phone frame. */
.tabbar {
  width: calc(100% - 12px);
  margin: 0 6px 6px;
  border-radius: 24px 24px 22px 22px;
  border-bottom: 1px solid rgba(255,255,255,.96);
}

/* Keep every task action aligned to the same right edge. */
.task .tk-t { flex: 1 1 auto; min-width: 0; }
.task .mini-btn { flex: 0 0 auto; margin-left: auto; }
/* Completed tasks keep the same row format; only the check mark indicates status. */
.task.done { background: rgba(255,255,255,.24); }
.task.done .tk-t { color: #527060; text-decoration: none; }

/* Phone-only presentation: the console and story controls are intentionally omitted. */
body { min-height: 100vh; }
.stage { width: 100%; min-height: calc(100vh - 56px); align-items: center; justify-content: center; }
.phone-col { margin: 0 auto; }

/* Mobile presentation: put the controls first and keep the demo phone framed. */
@media (max-width: 640px) {
  html, body { height: auto; min-height: 100%; }
  body { display: block; min-height: 100svh; padding: 12px; }
  .stage { width: 100%; max-width: 560px; min-height: 0; margin: 0 auto; flex-direction: column; align-items: center; gap: 0; }
  .phone-col { width: 100%; align-items: center; gap: 0; }
  .phone { width: min(100%, 392px); height: min(820px, calc(100svh - 28px)); min-height: 640px; border-width: 8px; border-radius: 36px; box-shadow: 0 18px 48px rgba(0,0,0,.22), inset 0 0 0 2px #2A343A; }
  .storybar { width: min(100%, 392px); max-width: none; }
}

@media (max-width: 360px) {
  body { padding: 8px; }
  .console { padding: 13px; }
  .phone { min-height: 600px; border-radius: 28px; }
  .task { align-items: flex-start; }
  .task .tk-ck { padding-top: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
