
/* SECTION: tokens */
:root{
  --ink:#0B1220; --ink-2:#1B2A4A; --ink-3:#475569; --ink-4:#7C8AA0;
  --teal:#0E7C7B; --teal-2:#14B8A6; --teal-soft:#E6F6F4;
  --amber:#F59E0B; --amber-soft:#FEF3E2;
  --rose:#E11D48; --rose-soft:#FFE9EE;
  --green:#10B981; --green-soft:#E7F8F1;
  --blue:#3B82F6; --blue-soft:#E8F1FE;
  --violet:#7C3AED; --violet-soft:#F1EBFE;
  --warm:#FAF7F2; --surface:#FFFFFF; --surface-2:#F4F7FA; --line:#E2E8F0;
  --r-s:10px; --r-m:16px; --r-l:22px;
  --sh-s:0 1px 2px rgba(11,18,32,.06),0 2px 8px rgba(11,18,32,.04);
  --sh-m:0 4px 14px rgba(11,18,32,.08),0 12px 32px rgba(11,18,32,.06);
  --sh-l:0 10px 30px rgba(14,124,123,.22);
  --nav-h:64px;
}
/* SECTION: base */
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  background:var(--warm); color:var(--ink); font-size:16px; line-height:1.6;
  min-height:100vh; overflow-x:hidden;
}
body::before{
  content:""; position:fixed; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(20,184,166,.16), transparent 62%),
    radial-gradient(760px 460px at 96% 4%, rgba(124,58,237,.10), transparent 60%),
    radial-gradient(700px 520px at 50% 108%, rgba(245,158,11,.10), transparent 62%);
}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;border:none;background:none}
img,svg{max-width:100%;display:block}
::-webkit-scrollbar{width:9px;height:9px}
::-webkit-scrollbar-track{background:var(--surface-2);border-radius:99px}
::-webkit-scrollbar-thumb{background:linear-gradient(180deg,var(--teal-2),var(--teal));border-radius:99px;border:2px solid var(--surface-2)}
::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,var(--teal),var(--ink-2))}
*{scrollbar-width:thin;scrollbar-color:var(--teal) var(--surface-2)}

/* SECTION: shell */
.app{position:relative;z-index:1;max-width:520px;margin:0 auto;min-height:100vh;padding-bottom:calc(var(--nav-h) + 26px)}
.topbar{
  position:sticky;top:0;z-index:40;
  background:rgba(250,247,242,.92);backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
  padding:12px 16px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;
}
.brand{display:flex;align-items:center;gap:9px;min-width:0;flex:1}
.brand-mark{
  width:34px;height:34px;border-radius:11px;flex:none;
  background:linear-gradient(140deg,var(--teal-2),var(--teal) 62%,var(--ink-2));
  display:grid;place-items:center;box-shadow:var(--sh-l);
}
.brand-mark svg{width:19px;height:19px}
.brand-txt{min-width:0}
.brand-txt b{display:block;font-size:15px;letter-spacing:.2px;line-height:1.25}
.brand-txt span{display:block;font-size:11.5px;color:var(--ink-4);line-height:1.3}
.demo-tag{
  flex:none;font-size:11px;font-weight:700;letter-spacing:.4px;
  color:var(--violet);background:var(--violet-soft);
  border:1px solid rgba(124,58,237,.22);padding:4px 9px;border-radius:99px;
}
.pts-top{
  flex:none;font-size:12px;font-weight:800;color:#6D28D9;background:var(--violet-soft);
  border:1px solid rgba(124,58,237,.22);padding:5px 11px;border-radius:99px;
  font-variant-numeric:tabular-nums;transition:transform .15s;
}
.pts-top:active{transform:scale(.95)}
.view{display:none;padding:16px 16px 8px;animation:rise .34s cubic-bezier(.22,.9,.3,1)}
.view.on{display:block}
@keyframes rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

/* SECTION: nav */
.tabbar{
  position:fixed;bottom:0;left:50%;transform:translateX(-50%);
  width:100%;max-width:520px;height:var(--nav-h);z-index:45;
  background:rgba(255,255,255,.95);backdrop-filter:blur(16px);
  border-top:1px solid var(--line);display:flex;
  padding-bottom:env(safe-area-inset-bottom);
}
.tab{
  flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  color:var(--ink-4);font-size:11px;font-weight:600;min-height:44px;position:relative;transition:color .2s;
}
.tab svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.tab.on{color:var(--teal)}
.tab.on::before{content:"";position:absolute;top:0;left:50%;transform:translateX(-50%);width:26px;height:3px;border-radius:0 0 4px 4px;background:linear-gradient(90deg,var(--teal-2),var(--teal))}
.tab:active{transform:scale(.94)}

/* SECTION: cards */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-m);padding:16px;box-shadow:var(--sh-s);margin-bottom:14px}
.card-h{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:13px;flex-wrap:wrap}
.card-h h3{margin:0;font-size:14.5px;letter-spacing:.2px;display:flex;align-items:center;gap:7px}
.dot{width:7px;height:7px;border-radius:99px;flex:none}
.sec-title{font-size:12px;font-weight:800;color:var(--ink-4);letter-spacing:1.4px;margin:22px 2px 10px;text-transform:uppercase;display:flex;align-items:center;justify-content:space-between;gap:8px}
.sec-title:first-child{margin-top:4px}
.muted{color:var(--ink-4);font-size:12.5px}
.pill{font-size:11.5px;font-weight:700;padding:4px 10px;border-radius:99px;white-space:nowrap}
.p-ok{color:var(--green);background:var(--green-soft)}
.p-warn{color:#B45309;background:var(--amber-soft)}
.p-lock{color:var(--rose);background:var(--rose-soft)}
.p-off{color:var(--ink-4);background:var(--surface-2)}
.p-info{color:var(--blue);background:var(--blue-soft)}
.p-pts{color:#6D28D9;background:var(--violet-soft)}

/* SECTION: hero */
.hero{
  border-radius:var(--r-l);padding:18px;margin-bottom:14px;color:#fff;position:relative;overflow:hidden;
  background:linear-gradient(145deg,#123B47 0%,var(--teal) 46%,#0B6E63 100%);
  box-shadow:var(--sh-m);
}
.hero::after{content:"";position:absolute;width:230px;height:230px;right:-84px;top:-104px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.20),transparent 68%)}
.hero-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;position:relative;z-index:1;flex-wrap:wrap}
.hero-dev{min-width:0}
.hero-dev b{font-size:17px;display:block;line-height:1.3}
.hero-dev span{font-size:12px;opacity:.82}
.hero-connect .hero-control{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:116px;height:40px;flex:none;font-family:inherit;font-size:13px;line-height:1;font-weight:700;color:#fff;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.26);padding:0 8px;border-radius:99px;white-space:nowrap}
.hero-control svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.blip{width:7px;height:7px;border-radius:99px;background:#6EE7B7;box-shadow:0 0 0 0 rgba(110,231,183,.75);animation:blip 2s infinite}
.blip.off{background:#CBD5E1;animation:none;box-shadow:none}
@keyframes blip{70%{box-shadow:0 0 0 8px rgba(110,231,183,0)}100%{box-shadow:0 0 0 0 rgba(110,231,183,0)}}
.hero-body{display:flex;align-items:center;gap:18px;margin-top:16px;position:relative;z-index:1;flex-wrap:wrap}
.ring{width:112px;height:112px;flex:none;position:relative}
.ring svg{transform:rotate(-90deg)}
.ring-c{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.15}
.ring-c b{font-size:25px;font-variant-numeric:tabular-nums}
.ring-c span{font-size:10.5px;opacity:.82}
.hero-stats{flex:1;min-width:150px;display:grid;gap:9px}
.hstat{display:flex;align-items:baseline;justify-content:space-between;gap:8px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.16);border-radius:11px;padding:8px 11px}
.hstat span{font-size:12px;opacity:.86}
.hstat b{font-size:15px;font-variant-numeric:tabular-nums}
.hero-note{margin-top:14px;font-size:12px;background:rgba(0,0,0,.20);border-radius:11px;padding:9px 12px;position:relative;z-index:1;display:flex;gap:8px;align-items:flex-start}
.hero-note svg{width:15px;height:15px;flex:none;margin-top:2px;stroke:#FDE68A;fill:none;stroke-width:2}

/* SECTION: points hero */
.pts-hero{
  border-radius:var(--r-l);padding:18px;margin-bottom:14px;color:#fff;position:relative;overflow:hidden;
  background:linear-gradient(145deg,#2E1065 0%,var(--violet) 52%,#5B21B6 100%);
  box-shadow:0 10px 30px rgba(124,58,237,.25);
}
.pts-hero::after{content:"";position:absolute;width:240px;height:240px;right:-90px;top:-110px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.18),transparent 68%)}
.pts-hero .ph-label{font-size:12.5px;opacity:.85;position:relative;z-index:1}
.pts-hero .ph-val{font-size:40px;font-weight:800;line-height:1.15;margin:2px 0 12px;font-variant-numeric:tabular-nums;position:relative;z-index:1}
.pts-hero .ph-val small{font-size:14px;font-weight:600;opacity:.85;margin-left:5px}
.pts-hero .hero-stats{position:relative;z-index:1}
.pts-hint{font-size:11.5px;color:var(--ink-4);margin:-6px 2px 14px;line-height:1.6}

/* SECTION: quick */
.quick{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}
.qbtn{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-m);
  padding:14px 8px;display:flex;flex-direction:column;align-items:center;gap:8px;
  min-height:44px;box-shadow:var(--sh-s);transition:transform .16s,box-shadow .16s,border-color .16s;
}
.qbtn:active{transform:scale(.96)}
.qbtn:hover{box-shadow:var(--sh-m);border-color:#CBD5E1}
.qi{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;flex:none}
.qi svg{width:19px;height:19px;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
.qbtn span{font-size:12px;font-weight:700;color:var(--ink-2);text-align:center;line-height:1.3}
.qi-a{background:var(--green-soft)} .qi-a svg{stroke:var(--green)}
.qi-b{background:var(--rose-soft)} .qi-b svg{stroke:var(--rose)}
.qi-c{background:var(--amber-soft)} .qi-c svg{stroke:#B45309}

/* SECTION: stats */
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.mini{background:var(--surface-2);border-radius:13px;padding:12px 10px;text-align:center;border:1px solid var(--line)}
.mini b{display:block;font-size:21px;font-variant-numeric:tabular-nums;line-height:1.2}
.mini span{display:block;font-size:11px;color:var(--ink-4);margin-top:3px}
.mini.t b{color:var(--teal)} .mini.v b{color:var(--violet)} .mini.a b{color:#B45309}
.mini.g b{color:#047857} .mini.r b{color:#BE123C}

/* SECTION: chart */
.bars{display:flex;align-items:flex-end;gap:8px;height:132px;padding-top:8px}
.bar-col{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:6px;height:100%;justify-content:flex-end}
.bar-v{font-size:10.5px;color:var(--ink-4);font-variant-numeric:tabular-nums}
.bar{width:100%;max-width:30px;border-radius:7px 7px 3px 3px;background:linear-gradient(180deg,var(--teal-2),var(--teal));transition:height .5s cubic-bezier(.22,.9,.3,1);min-height:4px}
.bar.hi{background:linear-gradient(180deg,var(--amber),#D97706)}
.bar-l{font-size:10.5px;color:var(--ink-4)}
.bar-duo{display:flex;gap:3px;width:100%;max-width:34px;flex:1;align-items:flex-end;justify-content:center;min-height:0}
.bar-duo .bar{flex:1;max-width:14px}
.bar.earn{background:linear-gradient(180deg,var(--teal-2),var(--teal))}
.bar.spend{background:linear-gradient(180deg,#FB7185,var(--rose))}
.legend{display:flex;gap:14px;flex-wrap:wrap;margin-top:12px;font-size:11.5px;color:var(--ink-3)}
.legend i{width:9px;height:9px;border-radius:3px;display:inline-block;margin-right:5px}

/* SECTION: records */
.rec{border:1px solid var(--line);border-radius:13px;margin-bottom:9px;overflow:hidden;background:var(--surface)}
.rec-h{display:flex;align-items:center;gap:11px;padding:12px 13px;width:100%;text-align:left;min-height:44px}
.rec-ic{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;flex:none;font-size:13px;font-weight:800}
.rec-m{flex:1;min-width:0}
.rec-m b{display:block;font-size:13.5px;line-height:1.35}
.rec-m span{display:block;font-size:11.5px;color:var(--ink-4)}
.chev{width:17px;height:17px;stroke:var(--ink-4);fill:none;stroke-width:2.2;flex:none;transition:transform .26s}
.rec.open .chev{transform:rotate(180deg)}
.rec-b{display:none;padding:0 13px 13px;border-top:1px dashed var(--line)}
.rec.open .rec-b{display:block;animation:rise .26s ease}
.q{padding:11px 0;border-bottom:1px dashed var(--line)}
.q:last-child{border-bottom:none;padding-bottom:0}
.q-t{display:flex;gap:8px;align-items:flex-start;font-size:13.5px;line-height:1.5}
.q-n{width:20px;height:20px;border-radius:6px;background:var(--surface-2);color:var(--ink-3);font-size:11px;font-weight:800;display:grid;place-items:center;flex:none;margin-top:2px}
.q-a{display:flex;gap:8px;flex-wrap:wrap;margin:7px 0 0 28px;font-size:12px}
.tag{padding:3px 9px;border-radius:7px;font-weight:600}
.tag-r{background:var(--green-soft);color:#047857}
.tag-w{background:var(--rose-soft);color:#BE123C}
.tag-k{background:var(--violet-soft);color:#6D28D9}
.q-e{margin:7px 0 0 28px;font-size:12px;color:var(--ink-3);background:var(--surface-2);border-radius:9px;padding:8px 10px;line-height:1.55}

/* SECTION: weak */
.weak{display:flex;align-items:center;gap:11px;padding:10px 0;border-bottom:1px dashed var(--line)}
.weak:last-child{border-bottom:none}
.weak-n{flex:1;min-width:0;font-size:13.5px;font-weight:600}
.weak-bar{width:88px;height:7px;border-radius:99px;background:var(--surface-2);overflow:hidden;flex:none}
.weak-fill{height:100%;border-radius:99px;transition:width .5s}
.weak-v{font-size:11.5px;color:var(--ink-4);width:52px;text-align:right;flex:none;font-variant-numeric:tabular-nums}

/* SECTION: settings */
.row{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px dashed var(--line);flex-wrap:wrap}
.row:last-child{border-bottom:none}
.row-l{flex:1;min-width:130px}
.row-l b{display:block;font-size:14px;line-height:1.35}
.row-l span{display:block;font-size:11.5px;color:var(--ink-4);margin-top:2px}
.stepper{display:flex;align-items:center;gap:0;border:1px solid var(--line);border-radius:11px;overflow:hidden;flex:none;background:var(--surface-2)}
.stepper button{width:44px;height:44px;font-size:19px;font-weight:700;color:var(--teal);display:grid;place-items:center;transition:background .15s}
.stepper button:hover{background:var(--teal-soft)}
.stepper button:active{background:#CDEDE9}
.stepper button:disabled{color:#CBD5E1;cursor:not-allowed;background:transparent}
.stepper output{min-width:58px;text-align:center;font-size:15px;font-weight:800;font-variant-numeric:tabular-nums;background:var(--surface);height:44px;line-height:44px;border-left:1px solid var(--line);border-right:1px solid var(--line)}
.slider-wrap{width:100%;max-width:22rem;display:flex;align-items:center;gap:12px;margin-top:4px}
input[type=range]{
  -webkit-appearance:none;appearance:none;flex:1;min-width:0;height:6px;border-radius:99px;outline:none;
  background:linear-gradient(90deg,var(--teal-2),var(--teal));
}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:26px;height:26px;border-radius:50%;background:var(--surface);border:3px solid var(--teal);box-shadow:var(--sh-s);cursor:pointer}
input[type=range]::-moz-range-thumb{width:22px;height:22px;border-radius:50%;background:var(--surface);border:3px solid var(--teal);box-shadow:var(--sh-s);cursor:pointer}
.slider-v{font-size:15px;font-weight:800;color:var(--teal);min-width:66px;text-align:right;font-variant-numeric:tabular-nums;flex:none}
select{
  border:1px solid var(--line);background:var(--surface);border-radius:11px;
  padding:0 12px;height:44px;font-size:16px;min-width:118px;max-width:100%;flex:none;
  appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--ink-4) 50%),linear-gradient(135deg,var(--ink-4) 50%,transparent 50%);
  background-position:calc(100% - 17px) 19px,calc(100% - 12px) 19px;background-size:5px 5px,5px 5px;background-repeat:no-repeat;padding-right:34px;
}
select:focus{border-color:var(--teal);outline:none;box-shadow:0 0 0 3px var(--teal-soft)}
.chips{display:flex;gap:8px;flex-wrap:wrap;width:100%;margin-top:4px}
.chip{
  padding:9px 15px;border-radius:99px;border:1px solid var(--line);background:var(--surface);
  font-size:13px;font-weight:600;color:var(--ink-3);min-height:44px;display:inline-flex;align-items:center;transition:all .16s;
}
.chip.on{background:var(--teal);border-color:var(--teal);color:#fff;box-shadow:var(--sh-l)}
.chip:active{transform:scale(.95)}
.fchips{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:10px}
.fchip{
  padding:6px 13px;border-radius:99px;border:1px solid var(--line);background:var(--surface);
  font-size:12px;font-weight:700;color:var(--ink-3);min-height:36px;display:inline-flex;align-items:center;transition:all .16s;
}
.fchip.on{background:var(--ink-2);border-color:var(--ink-2);color:#fff}
.fchip:active{transform:scale(.95)}
.sw{width:52px;height:30px;border-radius:99px;background:#CBD5E1;position:relative;flex:none;transition:background .22s;border:none}
.sw::after{content:"";position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:var(--sh-s);transition:transform .22s}
.sw.on{background:var(--teal)}
.sw.on::after{transform:translateX(22px)}
.sw-hit{min-width:44px;min-height:44px;display:grid;place-items:center;flex:none}

/* SECTION: devices */
.dev{display:flex;align-items:center;gap:12px;padding:13px;border:1px solid var(--line);border-radius:14px;margin-bottom:10px;background:var(--surface);flex-wrap:wrap}
.dev.active{border-color:var(--teal);box-shadow:0 0 0 3px var(--teal-soft)}
.dev-ic{width:42px;height:42px;border-radius:12px;background:linear-gradient(140deg,var(--ink-2),var(--teal));display:grid;place-items:center;flex:none}
.dev-ic svg{width:21px;height:21px;stroke:#fff;fill:none;stroke-width:1.8}
.dev-m{flex:1;min-width:120px}
.dev-m b{display:block;font-size:14.5px}
.dev-m span{display:block;font-size:11.5px;color:var(--ink-4)}
.dev-acts{display:flex;gap:7px;flex:none}
.ibtn{width:44px;height:44px;border-radius:11px;border:1px solid var(--line);display:grid;place-items:center;background:var(--surface-2);transition:all .16s}
.ibtn svg{width:17px;height:17px;stroke:var(--ink-3);fill:none;stroke-width:2}
.ibtn:hover{border-color:var(--teal);background:var(--teal-soft)}
.ibtn:hover svg{stroke:var(--teal)}
.ibtn.danger:hover{border-color:var(--rose);background:var(--rose-soft)}
.ibtn.danger:hover svg{stroke:var(--rose)}
.ibtn:disabled{opacity:.4;cursor:not-allowed}

/* SECTION: buttons */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;width:100%;
  min-height:50px;border-radius:14px;font-size:15.5px;font-weight:700;padding:0 18px;transition:transform .15s,box-shadow .15s,opacity .15s;
}
.btn:active{transform:scale(.985)}
.btn-p{background:linear-gradient(135deg,var(--teal-2),var(--teal));color:#fff;box-shadow:var(--sh-l)}
.btn-p:disabled{background:#CBD5E1;box-shadow:none;cursor:not-allowed;color:#F8FAFC}
.btn-g{background:var(--surface);border:1px solid var(--line);color:var(--ink-2)}
.btn-d{background:var(--rose-soft);color:#BE123C;border:1px solid rgba(225,29,72,.2)}
.btn-v{background:linear-gradient(135deg,#8B5CF6,var(--violet));color:#fff;box-shadow:0 10px 30px rgba(124,58,237,.25)}
.btn-v:disabled{background:#CBD5E1;box-shadow:none;cursor:not-allowed;color:#F8FAFC}
.btn-row{display:flex;gap:10px;margin-top:6px}
.link{color:var(--teal);font-size:12.5px;font-weight:700;text-decoration:underline;text-underline-offset:3px;min-height:44px;display:inline-flex;align-items:center}
.back-link{color:var(--teal);font-size:13px;font-weight:700;display:inline-flex;align-items:center;gap:5px;min-height:40px;margin-bottom:8px}
.back-link svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}

/* SECTION: points / projects / redeem */
.cat-card{
  display:flex;width:100%;align-items:center;gap:12px;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--r-m);padding:14px;margin-bottom:10px;
  box-shadow:var(--sh-s);text-align:left;transition:transform .15s,box-shadow .15s;
}
.cat-card:hover{box-shadow:var(--sh-m)}
.cat-card:active{transform:scale(.98)}
.cat-ic{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;flex:none;font-size:14px;font-weight:800}
.cat-m{flex:1;min-width:0}
.cat-m b{display:block;font-size:14.5px;line-height:1.3}
.cat-m span{display:block;font-size:11.5px;color:var(--ink-4)}
.cat-card .chev{width:16px;height:16px}
.item-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-m);padding:14px;margin-bottom:10px;box-shadow:var(--sh-s)}
.item-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.item-m{flex:1;min-width:0}
.item-m b{display:block;font-size:14.5px;line-height:1.35}
.item-sub{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:11.5px;color:var(--ink-4);margin-top:3px}
.item-note{font-size:12px;color:var(--ink-3);background:var(--surface-2);border-radius:9px;padding:7px 10px;margin-top:8px;line-height:1.55}
.item-acts{display:flex;gap:8px;margin-top:11px}
.item-acts .btn{min-height:40px;font-size:13px;border-radius:11px;flex:1;padding:0 8px}
.val-pos{color:#047857;background:var(--green-soft)}
.val-neg{color:#BE123C;background:var(--rose-soft)}
.cost-tag{font-size:13px;font-weight:800;color:#6D28D9;font-variant-numeric:tabular-nums;white-space:nowrap}
.led{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid var(--line);border-radius:13px;margin-bottom:8px;background:var(--surface)}
.led-ic{width:32px;height:32px;border-radius:9px;display:grid;place-items:center;font-size:12px;font-weight:800;flex:none}
.led-m{flex:1;min-width:0}
.led-m b{display:block;font-size:13px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.led-m span{display:block;font-size:11px;color:var(--ink-4);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.led-amt{font-weight:800;font-size:14.5px;font-variant-numeric:tabular-nums;flex:none}
.led-amt.pos{color:#047857}
.led-amt.neg{color:#BE123C}
.led-undo{font-size:11.5px;font-weight:700;color:var(--ink-4);border:1px solid var(--line);border-radius:8px;padding:5px 10px;min-height:32px;flex:none;transition:all .15s}
.led-undo:hover{color:var(--teal);border-color:var(--teal);background:var(--teal-soft)}
.search{
  width:100%;border:1px solid var(--line);border-radius:11px;background:var(--surface);
  padding:10px 13px;font-size:14px;min-height:44px;margin-bottom:10px;
}
.search:focus{border-color:var(--teal);outline:none;box-shadow:0 0 0 3px var(--teal-soft)}
.rule-line{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px dashed var(--line);font-size:13px}
.rule-line:last-child{border-bottom:none}
.rule-line span{color:var(--ink-3)}
.rule-line b{font-variant-numeric:tabular-nums;color:#6D28D9}

/* SECTION: forms */
.sheet-form{margin-bottom:6px}
.field{margin-bottom:13px}
.field label{display:block;font-size:12.5px;font-weight:700;color:var(--ink-3);margin-bottom:6px}
.field input,.field textarea{
  width:100%;border:1px solid var(--line);border-radius:11px;padding:11px 12px;
  font-size:15px;background:var(--surface);min-height:44px;
}
.field textarea{resize:vertical;min-height:64px;line-height:1.5}
.field input:focus,.field textarea:focus{border-color:var(--teal);outline:none;box-shadow:0 0 0 3px var(--teal-soft)}
.field select{width:100%}
.field .hint{font-size:11.5px;color:var(--ink-4);margin-top:4px;line-height:1.5}
.field-row{display:flex;gap:10px}
.field-row .field{flex:1;min-width:0}

/* SECTION: pairing */
.gate{position:fixed;inset:0;z-index:80;background:var(--warm);overflow-y:auto;display:none}
.gate.on{display:block}
.gate-in{max-width:520px;margin:0 auto;padding:26px 18px 40px}
.gate-hero{text-align:center;margin-bottom:22px}
.gate-badge{width:66px;height:66px;border-radius:20px;margin:0 auto 14px;background:linear-gradient(140deg,var(--teal-2),var(--teal) 60%,var(--ink-2));display:grid;place-items:center;box-shadow:var(--sh-l)}
.gate-badge svg{width:32px;height:32px;stroke:#fff;fill:none;stroke-width:1.8}
.gate-hero h1{margin:0 0 6px;font-size:22px;letter-spacing:.3px}
.gate-hero p{margin:0;font-size:13.5px;color:var(--ink-3)}
.scanbox{
  border:2px dashed var(--teal);border-radius:var(--r-l);background:var(--teal-soft);
  padding:18px;text-align:center;margin-bottom:16px;
}
.scanbox .code{font-size:27px;font-weight:800;letter-spacing:5px;color:var(--teal);font-variant-numeric:tabular-nums;margin:6px 0}
.pair-dev{display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:13px;margin-bottom:16px}
.consent{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-m);padding:15px;margin-bottom:14px}
.consent h4{margin:0 0 9px;font-size:14px;display:flex;align-items:center;gap:7px}
.consent-body{max-height:168px;overflow-y:auto;font-size:12.5px;color:var(--ink-3);line-height:1.75;background:var(--surface-2);border-radius:11px;padding:12px;border:1px solid var(--line)}
.consent-body p{margin:0 0 9px}
.consent-body p:last-child{margin:0}
.consent-body b{color:var(--ink-2)}
.check{display:flex;gap:11px;align-items:flex-start;margin-top:13px;min-height:44px;cursor:pointer;padding:4px 0}
.cbox{width:23px;height:23px;border-radius:7px;border:2px solid #CBD5E1;flex:none;display:grid;place-items:center;transition:all .18s;margin-top:1px;background:var(--surface)}
.check.on .cbox{background:var(--teal);border-color:var(--teal)}
.cbox svg{width:14px;height:14px;stroke:#fff;fill:none;stroke-width:3.2;opacity:0;transition:opacity .18s}
.check.on .cbox svg{opacity:1}
.check span{font-size:13px;line-height:1.55;color:var(--ink-2)}

/* SECTION: modal + toast */
.scrim{position:fixed;inset:0;z-index:90;background:rgba(11,18,32,.5);backdrop-filter:blur(3px);display:none;align-items:flex-end;justify-content:center;padding:0}
.scrim.on{display:flex;animation:fade .2s}
@keyframes fade{from{opacity:0}to{opacity:1}}
.sheet{
  background:var(--surface);width:100%;max-width:520px;border-radius:22px 22px 0 0;
  padding:22px 18px calc(22px + env(safe-area-inset-bottom));animation:up .3s cubic-bezier(.22,.9,.3,1);
  max-height:88vh;overflow-y:auto;
}
@keyframes up{from{transform:translateY(100%)}to{transform:none}}
.sheet h3{margin:0 0 8px;font-size:17px}
.sheet p{margin:0 0 18px;font-size:13.5px;color:var(--ink-3);line-height:1.65}
.toasts{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(var(--nav-h) + 18px);z-index:95;width:calc(100% - 32px);max-width:400px;display:flex;flex-direction:column;gap:8px;pointer-events:none}
.toast{
  background:var(--ink-2);color:#fff;border-radius:13px;padding:12px 15px;font-size:13.5px;font-weight:600;
  box-shadow:var(--sh-m);display:flex;align-items:center;gap:9px;animation:tin .3s cubic-bezier(.22,.9,.3,1);
}
.toast svg{width:17px;height:17px;flex:none;stroke-width:2.4;fill:none;stroke-linecap:round}
.toast.ok svg{stroke:#6EE7B7} .toast.warn svg{stroke:#FCD34D} .toast.err svg{stroke:#FDA4AF}
.toast button{
  margin-left:auto;pointer-events:auto;color:#6EE7B7;font-weight:800;font-size:12.5px;
  border:1px solid rgba(110,231,183,.45);border-radius:8px;padding:4px 11px;flex:none;
}
@keyframes tin{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.empty{text-align:center;padding:28px 14px;color:var(--ink-4)}
.empty svg{width:42px;height:42px;stroke:#CBD5E1;fill:none;stroke-width:1.6;margin:0 auto 10px}
.empty p{margin:0;font-size:13px}
.foot-note{text-align:center;font-size:11.5px;color:var(--ink-4);padding:14px 10px 4px;line-height:1.7}

/* SECTION: tv prompt */
.tv-scrim{position:fixed;inset:0;z-index:92;background:rgba(5,10,20,.82);backdrop-filter:blur(6px);display:none;align-items:center;justify-content:center;padding:20px}
.tv-scrim.on{display:flex;animation:fade .25s}
.tv-card{
  width:100%;max-width:460px;border-radius:24px;padding:26px 22px;color:#fff;position:relative;overflow:hidden;
  background:linear-gradient(150deg,#0F2027 0%,#123B47 45%,#0E7C7B 130%);
  box-shadow:0 24px 60px rgba(0,0,0,.5);border:1px solid rgba(255,255,255,.14);
  animation:up .32s cubic-bezier(.22,.9,.3,1);
}
.tv-card::after{content:"";position:absolute;width:260px;height:260px;right:-100px;top:-120px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.14),transparent 68%);pointer-events:none}
.tv-tag{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700;letter-spacing:.6px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.22);padding:4px 11px;border-radius:99px;margin-bottom:14px;position:relative;z-index:1}
.tv-card h3{margin:0 0 8px;font-size:20px;line-height:1.4;position:relative;z-index:1}
.tv-card .tv-desc{margin:0 0 16px;font-size:13.5px;opacity:.85;line-height:1.65;position:relative;z-index:1}
.tv-math{background:rgba(0,0,0,.28);border:1px solid rgba(255,255,255,.14);border-radius:14px;padding:14px;margin-bottom:16px;position:relative;z-index:1}
.tv-math .tm-line{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:13px;padding:3px 0}
.tv-math .tm-line span{opacity:.8}
.tv-math .tm-line b{font-size:15px;font-variant-numeric:tabular-nums}
.tv-math .tm-big{font-size:17px;font-weight:800;color:#FDE68A;text-align:center;padding:6px 0 8px}
.tv-card .btn-row{position:relative;z-index:1}
.tv-card .btn-g{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.28);color:#fff}
.tv-note{margin:12px 0 0;font-size:11.5px;opacity:.7;text-align:center;line-height:1.6;position:relative;z-index:1}
.tv-wait{display:flex;flex-direction:column;align-items:center;gap:10px;padding:10px 0 4px;position:relative;z-index:1}
.tv-wait .spin{width:34px;height:34px;border-radius:50%;border:3px solid rgba(255,255,255,.25);border-top-color:#FDE68A;animation:tvspin 1s linear infinite}
@keyframes tvspin{to{transform:rotate(360deg)}}
.tv-result{display:flex;flex-direction:column;align-items:center;gap:8px;padding:8px 0 2px;position:relative;z-index:1;text-align:center}
.tv-result .tr-ic{width:52px;height:52px;border-radius:50%;display:grid;place-items:center;font-size:24px;font-weight:800}
.tv-result .tr-ic.ok{background:rgba(110,231,183,.2);color:#6EE7B7;border:2px solid rgba(110,231,183,.5)}
.tv-result .tr-ic.no{background:rgba(253,164,175,.18);color:#FDA4AF;border:2px solid rgba(253,164,175,.5)}
.tv-result b{font-size:16px}
.tv-result span{font-size:12.5px;opacity:.8}

/* SECTION: approvals & tasks */
.appr{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid rgba(245,158,11,.4);background:var(--amber-soft);border-radius:13px;margin-bottom:8px;flex-wrap:wrap}
.appr:last-child{margin-bottom:0}
.appr-m{flex:1;min-width:140px}
.appr-m b{display:block;font-size:13.5px;line-height:1.35}
.appr-m span{display:block;font-size:11.5px;color:#92600A}
.appr-acts{display:flex;gap:7px;flex:none}
.appr-acts .btn{width:auto;min-height:38px;font-size:12.5px;border-radius:10px;padding:0 14px}
.task-rule{border:1px solid var(--line);border-radius:13px;padding:12px 13px;margin-bottom:9px;background:var(--surface)}
.task-rule:last-child{margin-bottom:0}
.task-top{display:flex;align-items:flex-start;gap:10px}
.task-m{flex:1;min-width:0}
.task-m b{display:block;font-size:14px;line-height:1.35}
.task-m span{display:block;font-size:11.5px;color:var(--ink-4);margin-top:2px}
.task-prog{display:flex;align-items:center;gap:9px;margin-top:9px}
.task-prog .weak-bar{flex:1;width:auto}
.task-prog .tv-txt{font-size:11.5px;color:var(--ink-3);font-variant-numeric:tabular-nums;flex:none}
.task-acts{display:flex;gap:7px;margin-top:10px;flex-wrap:wrap}
.task-acts .btn{width:auto;min-height:38px;font-size:12.5px;border-radius:10px;padding:0 13px;flex:none}
.task-home{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px dashed var(--line)}
.task-home:last-child{border-bottom:none}
.task-home .th-m{flex:1;min-width:0}
.task-home .th-m b{display:block;font-size:13px;line-height:1.3}
.task-home .th-m span{display:block;font-size:11px;color:var(--ink-4)}
.task-home .weak-bar{width:70px;flex:none}

/* SECTION: responsive */
@media (min-width:560px){
  .app{padding-top:8px}
  .topbar{border-radius:0 0 var(--r-m) var(--r-m)}
  .quick{gap:12px}
}
@media (max-width:359px){
  .grid3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hero-body{gap:14px}
  .ring{width:96px;height:96px}
  .tab{font-size:10px}
}
@media (prefers-reduced-motion:reduce){
  *{animation-duration:.01ms !important;transition-duration:.01ms !important}
}
