:root{--primary:#2542C8;--ink:#121A33;--muted:#5B6479;--line:#E3E7F0;--bg:#F3F5FA;--green:#17703F;--amber:#8A5A00;--red:#A6261C;--purple:#4B2A9B}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;background:var(--bg);color:var(--ink);font-family:'DM Sans',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;font-size:16px}
body{overscroll-behavior:none}
#app{height:100dvh;max-width:560px;margin:0 auto;display:flex;flex-direction:column;position:relative;background:var(--bg);overflow:hidden}
button{font-family:inherit;cursor:pointer}
input,select{font-family:inherit}
.num{font-variant-numeric:tabular-nums}
.hdr{flex:0 0 auto;background:#fff;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line)}
.hdr h1{margin:0;font-size:20px}
.badge{font-size:12px;font-weight:600;padding:4px 10px;border-radius:999px;white-space:nowrap}
.b-ok{background:#E4F4EA;color:var(--green)}.b-warn{background:#FFF1D6;color:var(--amber)}.b-off{background:#E3E7F0;color:var(--muted)}.b-red{background:#FDE7E4;color:var(--red)}.b-blue{background:#E6ECFF;color:#1B2F8F}.b-purple{background:#EDE6FA;color:var(--purple)}
.body{flex:1 1 auto;min-height:0;overflow-y:auto;padding:12px 16px 24px;display:flex;flex-direction:column;gap:12px}
.card{background:#fff;border-radius:14px;padding:16px;box-shadow:0 1px 2px rgba(18,26,51,.08);display:flex;flex-direction:column;gap:12px}
.card-t{font-size:13px;font-weight:700;color:var(--primary);letter-spacing:.02em;text-transform:uppercase}
.nav{flex:0 0 auto;display:grid;grid-template-columns:repeat(4,1fr);background:#fff;border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}
.nav button{border:0;background:none;height:60px;font-size:13px;font-weight:600;color:var(--muted);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
.nav button.on{color:var(--primary)}
.nav svg{width:24px;height:24px}
.btn{height:52px;border-radius:12px;border:0;background:var(--primary);color:#fff;font-size:16px;font-weight:600;padding:0 16px}
.btn.sec{background:#fff;color:var(--primary);border:1px solid var(--primary)}
.btn.ghost{background:transparent;color:var(--muted);border:1px dashed #CBD2E1}
.btn.dark{background:var(--ink)}
.btn.sm{height:44px;font-size:14px}
.btn:disabled{background:var(--line);color:#8A93A8;border-color:var(--line)}
.field{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:600}
.field input,.field select{height:48px;border-radius:12px;border:1px solid #CBD2E1;padding:0 14px;font-size:16px;color:var(--ink);background:#F8F9FC}
.search{display:flex;align-items:center;gap:8px;height:44px;border:1px solid #CBD2E1;border-radius:12px;padding:0 12px;background:#F8F9FC;color:var(--muted)}
.search input{flex:1;min-width:0;border:0;outline:0;background:transparent;font-size:15px;color:var(--ink)}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{height:40px;padding:0 14px;border-radius:999px;border:1px solid #CBD2E1;background:#fff;color:var(--ink);font-size:14px;font-weight:600}
.chip.on{background:var(--primary);border-color:var(--primary);color:#fff}
.bar{height:10px;border-radius:5px;background:var(--line);overflow:hidden}.bar>i{display:block;height:100%;background:var(--primary);border-radius:5px}
.row{display:grid;grid-template-columns:40px 1fr auto;align-items:center;gap:12px;width:100%;padding:12px;border:1px solid var(--line);border-radius:14px;background:#fff;text-align:left;color:var(--ink)}
.row .n{width:40px;height:40px;border-radius:20px;background:#E6ECFF;color:#1B2F8F;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px}
.row .t{min-width:0;display:flex;flex-direction:column;gap:3px}.row .t b{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row .t span{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row .r{display:flex;flex-direction:column;align-items:flex-end;gap:6px}.row .r b{font-size:18px}
.kv{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:10px 0;border-top:1px solid var(--line);font-size:15px}.kv:first-child{border-top:0}
.kv span:first-child{color:var(--muted)}.kv b{font-weight:700}
.muted{color:var(--muted);font-size:14px;line-height:1.45}
.sheet-bg{position:absolute;inset:0;background:rgba(18,26,51,.45);z-index:20;display:flex;align-items:flex-end}
.sheet{background:#fff;width:100%;max-height:92%;overflow-y:auto;border-radius:20px 20px 0 0;padding:18px 16px calc(18px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:14px}
.sheet h2{margin:0;font-size:20px}
.x{border:0;background:var(--line);width:36px;height:36px;border-radius:18px;font-size:18px;color:var(--ink)}
#toast{position:fixed;left:16px;right:16px;bottom:84px;z-index:50;background:var(--ink);color:#fff;border-radius:12px;padding:14px 16px;font-size:15px;font-weight:500;text-align:center;display:none;max-width:528px;margin:0 auto}
#toast.on{display:block}
.login{flex:1;display:flex;flex-direction:column;justify-content:center;gap:20px;padding:24px}
.login img{width:84px;height:84px;border-radius:22px}
.login h1{margin:0;font-size:32px}
.warn{background:#FFF1D6;color:#5C3B00;border-radius:12px;padding:12px 14px;font-size:14px;line-height:1.4;font-weight:600}
.err{background:#FDE7E4;color:var(--red);border-radius:12px;padding:12px 14px;font-size:14px;line-height:1.4;font-weight:600}
a.btn{display:flex;align-items:center;justify-content:center;text-decoration:none}
.menu{width:100%;display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;padding:14px 16px;border:0;border-bottom:1px solid var(--line);background:#fff;text-align:left;color:var(--ink)}
.menu b{font-size:16px}.menu span.s{display:block;font-size:13px;color:var(--muted);margin-top:2px}

.thumb{height:110px;border-radius:12px;background:#E9ECF4;display:flex;align-items:center;justify-content:center;overflow:hidden;color:var(--muted);font-size:13px}
.thumb img{width:100%;height:100%;object-fit:cover}
.pick{display:flex;align-items:center;justify-content:center;cursor:pointer}
.dots{display:flex;gap:14px}.dots i{width:16px;height:16px;border-radius:8px;border:2px solid var(--primary)}.dots i.on{background:var(--primary)}
.keys{display:grid;grid-template-columns:repeat(3,72px);gap:12px}.keys button{height:72px;border-radius:36px;border:1px solid #CBD2E1;background:#fff;font-size:26px;font-weight:600;color:var(--ink)}
html.z1 #app{zoom:1.15;height:calc(100dvh / 1.15)}html.z2 #app{zoom:1.3;height:calc(100dvh / 1.3)}
html.hc{--muted:#222B40;--line:#6B7488;--bg:#fff;--primary:#1530A8}
html.hc .card,html.hc .row,html.hc .chip,html.hc .btn.sec,html.hc .field input{border:2px solid #121A33}
html.hc .badge{border:1.5px solid currentColor;font-weight:700}
html.hc .nav button{font-weight:700;color:#121A33}html.hc .nav button.on{color:var(--primary);text-decoration:underline}
