:root {
  --paper: #e9ede7;
  --card: #f7f9f5;
  --card2: #eef2ec;
  --ink: #15201a;
  --ink2: #46564b;
  --ink3: #6f7e74;
  --line: #d3dbd0;
  --line2: #bfc9bc;
  --red: #c92a22;
  --red-h: #b0221b;
  --on-red: #ffffff;
  --green: #1c7448;
  --green-bg: #dcefe3;
  --amber: #8f5f0a;
  --amber-bg: #f5e8c9;
  --err: #b3261e;
  --err-bg: #f7dcd9;
  --info-bg: #e0e8e2;
  --side: #15201a;
  --side-ink: #e7eee8;
  --shadow: 0 1px 0 rgba(21, 32, 26, .04), 0 8px 24px -12px rgba(21, 32, 26, .25);
  --r: 14px;
  --r-s: 9px;
  --font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Bricolage Grotesque", "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #0e1511;
  --card: #16201a;
  --card2: #1c2821;
  --ink: #e8efe9;
  --ink2: #b0beb4;
  --ink3: #84948a;
  --line: #26342b;
  --line2: #33443a;
  --red: #d9362d;
  --red-h: #e4463d;
  --green: #5fc68e;
  --green-bg: #17301f;
  --amber: #e2b052;
  --amber-bg: #33280f;
  --err: #f19088;
  --err-bg: #3a1a17;
  --info-bg: #1b2a22;
  --side: #0a100d;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.55 var(--font); min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.15; margin: 0; font-weight: 650; }
h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink2); }
.faint { color: var(--ink3); }
.small { font-size: .875rem; }
.xs { font-size: .8rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hide { display: none !important; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: 0 1.1rem; border-radius: var(--r-s); border: 1px solid var(--line2);
  background: var(--card); color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { background: var(--card2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--red); color: var(--on-red); border-color: var(--red); }
.btn-primary:hover { background: var(--red-h); }
.btn-ok { background: var(--green); color: #fff; border-color: var(--green); }
:root[data-theme="dark"] .btn-ok { color: #0a1a10; }
.btn-ok:hover { filter: brightness(1.08); background: var(--green); }
.btn-danger { color: var(--err); border-color: var(--err); background: transparent; }
.btn-danger:hover { background: var(--err-bg); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { min-height: 36px; padding: 0 .8rem; font-size: .9rem; }
.btn-block { width: 100%; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: grid; gap: .35rem; margin-bottom: .95rem; }
.field > label, .lbl { font-size: .875rem; font-weight: 600; color: var(--ink2); }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: .6rem .8rem; border-radius: var(--r-s);
  border: 1px solid var(--line2); background: var(--card); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 14%, transparent); }
.field.has-err .input { border-color: var(--err); }
.err-t { color: var(--err); font-size: .82rem; min-height: 0; }
.hint { color: var(--ink3); font-size: .82rem; }
.pw { position: relative; }
.pw .input { padding-right: 4.2rem; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--ink2); font-weight: 600; font-size: .82rem; padding: .4rem .55rem; cursor: pointer; border-radius: 6px; }
.grid2 { display: grid; gap: 0 .9rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

.alert { padding: .75rem .9rem; border-radius: var(--r-s); font-size: .92rem; border: 1px solid transparent; margin-bottom: 1rem; }
.alert.err { background: var(--err-bg); color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, transparent); }
.alert.warn { background: var(--amber-bg); color: var(--amber); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.alert.ok { background: var(--green-bg); color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.alert.info { background: var(--info-bg); color: var(--ink2); }

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-hero {
  background: var(--side); color: var(--side-ink); padding: clamp(1.5rem, 4vw, 3.5rem);
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; position: relative; overflow: hidden;
}
.auth-hero h1 { font-size: clamp(1.9rem, 3.6vw, 3rem); max-width: 14ch; font-weight: 700; }
.auth-hero p { color: #a9b8ad; max-width: 34ch; margin-top: 1rem; }
.qrart { width: min(360px, 74%); aspect-ratio: 1; align-self: flex-start; }
.qrart rect { fill: #e7eee8; }
.qrart .fx { fill: var(--red); }
.qrart rect.m { opacity: 0; animation: modin .5s ease forwards; }
@keyframes modin { from { opacity: 0; } to { opacity: .92; } }
.scanline { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); box-shadow: 0 0 18px var(--red); opacity: 0; animation: scan 2.4s .5s ease-in-out 1 both; pointer-events: none; }
@keyframes scan { 0% { opacity: 1; top: 12%; } 100% { opacity: 0; top: 78%; } }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.auth-main { display: grid; place-items: center; padding: clamp(1rem, 4vw, 3rem); }
.auth-card { width: min(460px, 100%); }
.auth-card h2 { font-size: 1.6rem; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--card2); border: 1px solid var(--line); border-radius: 11px; margin: 1.1rem 0 1.4rem; }
.seg a, .seg button { text-align: center; padding: .55rem .5rem; border-radius: 8px; font-weight: 600; text-decoration: none; color: var(--ink2); border: 0; background: transparent; cursor: pointer; font-size: .95rem; white-space: nowrap; }
.seg .on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.or { display: flex; align-items: center; gap: .8rem; color: var(--ink3); font-size: .85rem; margin: 1.1rem 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-google { gap: .7rem; }
.btn-google svg { width: 18px; height: 18px; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 1.1rem 1.25rem 1.4rem; gap: 1rem; }
  .auth-hero .qrart, .auth-hero p, .auth-hero h1, .auth-hero .tag, .scanline { display: none; }
}
.auth-hero .tag { font-size: .9rem; color: #a9b8ad; }

.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .6rem; height: 58px; padding: 0 .8rem;
  background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.burger { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 10px; cursor: pointer; }
.burger:hover { background: var(--card2); }
.burger span, .burger span::before, .burger span::after { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; content: ""; position: relative; }
.burger span::before { position: absolute; top: -6px; }
.burger span::after { position: absolute; top: 6px; }
.top .brand { font-size: 1.1rem; }
.top .brand svg { width: 24px; height: 24px; }
.top .sp { flex: 1; }
.chip-saldo { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border: 1px solid var(--line2); border-radius: 99px; background: var(--card); font-weight: 650; font-size: .92rem; text-decoration: none; }
.chip-saldo small { color: var(--ink3); font-weight: 500; }
@media (max-width: 380px) { .chip-saldo small { display: none; } }

.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(8, 14, 10, .55); opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; width: min(300px, 86vw); background: var(--side); color: var(--side-ink);
  transform: translateX(-102%); transition: transform .24s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; padding: 1rem .8rem;
  visibility: hidden;
}
.drawer.on { transform: none; visibility: visible; }
.drawer .brand { padding: .3rem .6rem 1rem; }
.drawer nav { display: grid; gap: 2px; overflow-y: auto; flex: 1; }
.drawer nav a { display: flex; align-items: center; gap: .75rem; padding: .7rem .75rem; border-radius: 10px; text-decoration: none; color: #b9c7bd; font-weight: 550; }
.drawer nav a svg { width: 20px; height: 20px; flex: none; opacity: .9; }
.drawer nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.drawer nav a.on { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 3px 0 0 var(--red); }
.drawer .sec { margin: .9rem .75rem .3rem; font-size: .78rem; color: #7f9086; }
.drawer .me { border-top: 1px solid rgba(255, 255, 255, .1); padding: .8rem .6rem 0; margin-top: .6rem; display: flex; gap: .7rem; align-items: center; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.drawer .me div { min-width: 0; }
.drawer .me b, .drawer .me span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer .me span { font-size: .8rem; color: #8ea096; }

.page { min-width: 0; max-width: 980px; margin: 0 auto; padding: 1.2rem 1rem 4rem; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: .4rem 0 1.2rem; flex-wrap: wrap; }
.page-h p { color: var(--ink2); margin-top: .25rem; }
.banner { padding: .65rem 1rem; text-align: center; font-size: .9rem; background: var(--amber-bg); color: var(--amber); border-bottom: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); }
.banner.info { background: var(--info-bg); color: var(--ink2); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem; box-shadow: var(--shadow); }
.card { min-width: 0; }
.card + .card { margin-top: 1rem; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .8rem; flex-wrap: wrap; }
.cols { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.cols > .card + .card { margin-top: 0; }
.card + .cols, .stats + .cols, .cols + .card { margin-top: 1rem; }
@media (max-width: 760px) { .cols { grid-template-columns: minmax(0, 1fr); } .cols > .card + .card { margin-top: 0; } }

.receipt-wrap { filter: drop-shadow(0 10px 14px rgba(21, 32, 26, .16)); }
.receipt {
  background: var(--card); border: 0; padding: 1.3rem 1.3rem 2rem; position: relative;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 18px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 18px 100%;
}
.receipt .tag { display: flex; justify-content: space-between; align-items: center; color: var(--ink2); font-size: .9rem; gap: .5rem; flex-wrap: wrap; }
.receipt .big { font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 7vw, 3.4rem); letter-spacing: -.03em; line-height: 1.05; margin: .35rem 0 .2rem; }
.receipt .big small { font-size: .45em; font-weight: 600; color: var(--ink3); margin-right: .25rem; letter-spacing: 0; }
.receipt .dash { border-top: 2px dashed var(--line2); margin: 1rem 0 .9rem; }
.receipt .acts { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.kv div b { display: block; font-size: 1.05rem; font-weight: 650; }
.kv div span { font-size: .82rem; color: var(--ink2); }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr 1fr; } .kv div:last-child { grid-column: 1 / -1; } }

.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--ink3); font: 500 11px var(--font); }
.chart .b-in { fill: var(--green); }
.chart .b-out { fill: var(--red); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.legend { display: flex; gap: 1rem; font-size: .85rem; color: var(--ink2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }

.list { display: grid; grid-template-columns: minmax(0, 1fr); }
.row { display: flex; align-items: center; gap: .8rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--card2); }
.row .ic svg { width: 19px; height: 19px; }
.row .ic.in { background: var(--green-bg); color: var(--green); }
.row .ic.out { background: var(--err-bg); color: var(--err); }
.row .mid { flex: 1; min-width: 0; }
.row .mid b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .mid span { font-size: .82rem; color: var(--ink3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .end { text-align: right; flex: none; }
.row .end b { display: block; font-weight: 650; }
a.row { text-decoration: none; color: inherit; }
a.row:hover { background: var(--card2); }
.badge { display: inline-block; padding: .12rem .55rem; border-radius: 99px; font-size: .75rem; font-weight: 650; background: var(--info-bg); color: var(--ink2); }
.badge.ok { background: var(--green-bg); color: var(--green); }
.badge.warn { background: var(--amber-bg); color: var(--amber); }
.badge.err { background: var(--err-bg); color: var(--err); }
.empty { text-align: center; padding: 2rem 1rem; color: var(--ink2); }
.empty b { display: block; color: var(--ink); margin-bottom: .2rem; font-family: var(--display); font-size: 1.05rem; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chip { padding: .55rem .9rem; border: 1px solid var(--line2); background: var(--card); border-radius: 99px; cursor: pointer; font-weight: 600; min-height: 42px; }
.chip:hover { background: var(--card2); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.methods { display: grid; gap: .6rem; }
.method { display: flex; gap: .8rem; align-items: center; padding: .8rem; border: 1px solid var(--line2); border-radius: var(--r-s); background: var(--card); cursor: pointer; text-align: left; width: 100%; }
.method.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.method .mid b { display: block; }
.method .mid span { font-size: .85rem; color: var(--ink3); }
.sum { display: grid; gap: .4rem; padding: .9rem 1rem; border-radius: var(--r-s); background: var(--card2); border: 1px dashed var(--line2); margin-bottom: 1rem; }
.sum div { display: flex; justify-content: space-between; gap: 1rem; }
.sum div:last-child { font-weight: 700; border-top: 1px solid var(--line2); padding-top: .45rem; margin-top: .1rem; }

.pay { max-width: 440px; margin: 0 auto; }
.pay .receipt { padding-bottom: 2.2rem; }
.qrbox { background: #fff; border-radius: 12px; padding: 10px; width: min(300px, 100%); margin: .9rem auto 0; border: 1px solid var(--line); }
.qrbox img { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.pay .total { text-align: center; font-family: var(--display); font-weight: 700; font-size: 2rem; letter-spacing: -.02em; }
.pay .meta { text-align: center; color: var(--ink2); font-size: .9rem; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; }
.done { text-align: center; padding: 1rem 0; }
.done .ring { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto .8rem; display: grid; place-items: center; background: var(--green-bg); color: var(--green); }
.done .ring svg { width: 38px; height: 38px; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .1s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done.bad .ring { background: var(--err-bg); color: var(--err); }

.tabs { display: flex; gap: .3rem; overflow-x: auto; padding-bottom: .3rem; margin-bottom: 1rem; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { padding: .5rem .9rem; border-radius: 99px; border: 1px solid var(--line2); background: var(--card); text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap; cursor: pointer; color: var(--ink2); }
.tabs .on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-s); padding: .8rem .9rem; }
.stat span { font-size: .82rem; color: var(--ink2); display: block; }
.stat b { font-family: var(--display); font-size: 1.35rem; letter-spacing: -.02em; display: block; margin-top: .15rem; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; font-weight: 600; color: var(--ink3); font-size: .82rem; padding: .5rem .6rem; border-bottom: 1px solid var(--line2); }
.tbl td { padding: .65rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl-wrap { overflow-x: auto; margin: 0 -.2rem; }
.row-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.pager { display: flex; justify-content: center; align-items: center; gap: .8rem; margin-top: 1rem; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; background: var(--card2); padding: .15rem .4rem; border-radius: 5px; word-break: break-all; }
.copyline { display: flex; gap: .5rem; align-items: center; }
.copyline .code { flex: 1; padding: .7rem .8rem; }
.steps { margin: .4rem 0 0; padding-left: 1.2rem; color: var(--ink2); font-size: .92rem; }
.steps li { margin: .3rem 0; }

dialog.dlg { border: 1px solid var(--line2); background: var(--card); color: var(--ink); border-radius: var(--r); padding: 1.2rem; width: min(440px, calc(100vw - 2rem)); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .5); }
dialog.dlg::backdrop { background: rgba(8, 14, 10, .55); }
dialog.dlg h3 { margin-bottom: .4rem; }
dialog.dlg .acts { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1rem; }
.toasts { position: fixed; z-index: 90; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom, 0)); transform: translateX(-50%); display: grid; gap: .5rem; width: min(420px, calc(100vw - 2rem)); pointer-events: none; }
.toast { background: var(--ink); color: var(--paper); padding: .7rem 1rem; border-radius: 10px; box-shadow: var(--shadow); font-size: .92rem; animation: tin .2s ease; pointer-events: auto; }
.toast.err { background: var(--err); color: #fff; }
:root[data-theme="dark"] .toast.err { color: #1a0a08; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

.skel { background: linear-gradient(90deg, var(--card2), var(--line), var(--card2)); background-size: 200% 100%; animation: sk 1.2s infinite linear; border-radius: 8px; height: 1rem; }
@keyframes sk { to { background-position: -200% 0; } }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot svg { width: 44px; height: 44px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .qrart rect.m { opacity: .92; }
  .scanline { display: none; }
}

* { -webkit-tap-highlight-color: transparent; }
a, button, .btn, .drawer nav a, summary, [role="button"] { outline: none; -webkit-tap-highlight-color: transparent; }
a:focus, button:focus, .drawer nav a:focus { outline: none; box-shadow: none; }
a:focus-visible, button:focus-visible { outline: none; }
.drawer nav a:active { background: rgba(255, 255, 255, .06); color: #fff; }
.drawer nav a.on { background: rgba(255, 255, 255, .08); box-shadow: none; }
::selection { background: rgba(120, 140, 128, .35); }

.auth2 { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.auth2 .top { position: static; justify-content: flex-start; padding: 0 1rem; }
.auth2-main { flex: 1; display: flex; flex-direction: column; align-items: center; padding: clamp(1rem, 5vh, 3rem) 1rem 1.5rem; }
.auth2 .auth-card { width: min(440px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 1.5rem 1.35rem 1.4rem; }
.auth2 .auth-head h2 { font-size: 1.45rem; }
.auth2 .auth-head p { margin-top: .25rem; }
.auth2 .seg { margin: 1.1rem 0 1.2rem; }
.auth2-foot { margin-top: auto; padding-top: 1.4rem; text-align: center; }
@media (max-width: 480px) {
  .auth2-main { padding: 1rem .85rem 1.2rem; }
  .auth2 .auth-card { padding: 1.25rem 1.05rem 1.2rem; border-radius: 16px; }
}

.lg-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.lg-page .top { position: sticky; }
.lg-wrap { flex: 1; width: min(1080px, 100%); margin: 0 auto; padding: clamp(1rem, 4vw, 2.5rem) 1rem 2rem; }
.lg-in { max-width: 1080px; }
.lg-hero { max-width: 760px; margin: 0 auto 1.4rem; text-align: center; padding-top: .4rem; }
.lg-eyebrow { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); background: var(--card); border: 1px solid var(--line); padding: .3rem .75rem; border-radius: 99px; }
.lg-eyebrow svg { width: 15px; height: 15px; color: var(--red); }
.lg-hero h1 { font-size: clamp(1.8rem, 5vw, 2.7rem); margin: .8rem 0 .5rem; letter-spacing: -.025em; }
.lg-lead { color: var(--ink2); font-size: 1.04rem; line-height: 1.65; }
.lg-meta { margin-top: .7rem; font-size: .86rem; color: var(--ink3); }
.lg-hl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 0 auto 1.6rem; max-width: 900px; }
.lg-hl > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: .95rem 1rem; display: grid; gap: .25rem; box-shadow: var(--shadow); }
.lg-hl b { font-family: var(--display); font-size: 1rem; }
.lg-hl span { color: var(--ink2); font-size: .88rem; line-height: 1.5; }
.lg-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 2rem; align-items: start; }
.lg-toc { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; }
.lg-det { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: .7rem .5rem; }
.lg-det summary { cursor: pointer; font-weight: 650; padding: .2rem .6rem .5rem; list-style: none; }
.lg-det summary::-webkit-details-marker { display: none; }
.lg-tl { display: grid; gap: 1px; }
.lg-tl a { display: flex; gap: .6rem; align-items: baseline; padding: .38rem .6rem; border-radius: 8px; text-decoration: none; color: var(--ink2); font-size: .88rem; line-height: 1.35; }
.lg-tl a i { font-style: normal; font-size: .75rem; color: var(--ink3); min-width: 1.3em; font-variant-numeric: tabular-nums; }
.lg-tl a:hover { background: var(--card2); color: var(--ink); }
.lg-tl a.on { background: var(--card2); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--red); }
.lg-body { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: clamp(1.1rem, 3vw, 2.2rem); box-shadow: var(--shadow); min-width: 0; }
.lg-sec { scroll-margin-top: 76px; padding: 1.2rem 0; border-top: 1px solid var(--line); }
.lg-sec:first-child { border-top: 0; padding-top: 0; }
.lg-sec h2 { display: flex; gap: .7rem; align-items: baseline; font-size: 1.2rem; margin-bottom: .6rem; line-height: 1.3; }
.lg-n { flex: none; min-width: 1.9rem; height: 1.9rem; display: inline-grid; place-items: center; border-radius: 8px; background: var(--ink); color: var(--card); font-size: .85rem; font-family: var(--font); font-weight: 650; transform: translateY(-1px); }
.lg-sec p, .lg-sec li { line-height: 1.7; color: var(--ink2); }
.lg-sec p { margin: .55rem 0; }
.lg-sec ul, .lg-sec ol { margin: .5rem 0 .6rem; padding-left: 1.3rem; display: grid; gap: .35rem; }
.lg-sec b { color: var(--ink); }
.lg-sec a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.lg-note { margin: .8rem 0; padding: .8rem 1rem; border-radius: var(--r-s); background: var(--amber-bg); color: var(--ink); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); line-height: 1.6; font-size: .94rem; }
.lg-tw { overflow-x: auto; margin: .8rem 0; border: 1px solid var(--line); border-radius: var(--r-s); }
.lg-tw table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 460px; }
.lg-tw th, .lg-tw td { text-align: left; padding: .6rem .75rem; vertical-align: top; border-bottom: 1px solid var(--line); line-height: 1.5; }
.lg-tw th { background: var(--card2); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink2); }
.lg-tw tr:last-child td { border-bottom: 0; }
.lg-tw td[data-first] { font-weight: 600; color: var(--ink); white-space: nowrap; }
.lg-more { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.lg-more span { color: var(--ink3); font-size: .9rem; }
.lg-more a { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; border: 1px solid var(--line2); padding: .55rem .9rem; border-radius: 10px; background: var(--card); }
.lg-more a:hover { background: var(--card2); }
.lg-more svg { width: 16px; height: 16px; }
.lg-foot { border-top: 1px solid var(--line); padding: 1.4rem 1rem 1.8rem; display: grid; gap: .9rem; justify-items: center; text-align: center; color: var(--ink2); font-size: .9rem; }
.lg-foot > div { display: grid; gap: .15rem; }
.lg-foot > div b { color: var(--ink); font-family: var(--display); font-size: 1.05rem; }
.lg-foot nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; justify-content: center; }
.lg-foot nav a { color: var(--ink2); text-underline-offset: 3px; }
.lg-foot nav a:hover { color: var(--ink); }
.lg-foot small { color: var(--ink3); }
@media (max-width: 899px) {
  .lg-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .lg-toc { position: static; max-height: none; }
  .lg-hl { grid-template-columns: minmax(0, 1fr); }
  .lg-hero { text-align: left; }
}
@media (max-width: 480px) {
  .lg-wrap { padding: .8rem .75rem 1.5rem; }
  .lg-body { border-radius: 16px; padding: 1rem .95rem; }
  .lg-sec h2 { font-size: 1.08rem; }
}
@media print { .top, .lg-toc, .lg-foot, .lg-more, .scrim, .drawer { display: none !important; } .lg-grid { display: block; } .lg-body { border: 0; box-shadow: none; padding: 0; } }

.agree { display: flex; gap: .6rem; align-items: flex-start; margin: .2rem 0 1rem; font-size: .88rem; color: var(--ink2); line-height: 1.45; cursor: pointer; }
.agree input { width: 18px; height: 18px; margin: .1rem 0 0; flex: none; accent-color: var(--red); cursor: pointer; }
.agree a { color: var(--ink); font-weight: 600; }
.auth2-links { display: inline-flex; gap: .4rem .9rem; flex-wrap: wrap; justify-content: center; margin-top: .35rem; }
.auth2-links a { color: var(--ink2); text-underline-offset: 3px; }
.auth2-links a:hover { color: var(--ink); }
.hint a { color: var(--ink2); }

.receipt.rc { --st: var(--green); --st-bg: var(--green-bg); padding: 0 1.3rem 2.4rem; }
.rc[data-st="bad"] { --st: var(--err); --st-bg: var(--err-bg); }
.rc[data-st="exp"] { --st: var(--amber); --st-bg: var(--amber-bg); }
.rc::before { content: ""; display: block; height: 6px; background: var(--st); margin: 0 -1.3rem 1.1rem; }
.rc-top { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.rc-brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--display); font-size: 1.05rem; }
.rc-brand svg { width: 24px; height: 24px; color: var(--ink); --logo-hole: var(--card); }
.rc-doc { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); text-align: right; }
.rc-hero { text-align: center; padding: 1.1rem 0 .3rem; }
.rc-ring { position: relative; width: 72px; height: 72px; border-radius: 50%; margin: 0 auto .8rem; display: grid; place-items: center; background: var(--st-bg); color: var(--st); }
.rc-ring svg { width: 36px; height: 36px; stroke-width: 2.2; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .15s ease forwards; }
.rc-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--st); opacity: 0; animation: rcpulse .9s .2s ease-out 1; }
@keyframes rcpulse { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.7); opacity: 0; } }
.rc-hero h2 { font-family: var(--display); font-size: 1.35rem; letter-spacing: -.01em; }
.rc-hero p { color: var(--ink2); font-size: .9rem; margin: .25rem auto 0; max-width: 32ch; }
.rc-amt { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 9vw, 2.6rem); letter-spacing: -.03em; margin-top: .8rem; line-height: 1.1; color: var(--st); }
.rc[data-strike="1"] .rc-amt { color: var(--ink3); text-decoration: line-through; text-decoration-thickness: 2px; }
.rc-note { color: var(--ink2); font-size: .85rem; font-weight: 600; margin-top: .25rem; }
.rc-date { color: var(--ink3); font-size: .85rem; margin-top: .3rem; }
.rc-stamp { position: absolute; top: 3.6rem; right: .8rem; transform: rotate(-12deg); border: 3px double var(--st); color: var(--st); border-radius: 6px; padding: .12rem .5rem; font-weight: 800; font-size: .74rem; letter-spacing: .14em; opacity: .9; pointer-events: none; animation: rcstamp .5s .35s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes rcstamp { from { transform: rotate(-20deg) scale(2.4); opacity: 0; } to { transform: rotate(-12deg) scale(1); opacity: .9; } }
.rc-h { font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink3); margin-bottom: .4rem; font-family: var(--font); }
.rc-rows { display: grid; margin: 0 0 .4rem; }
.rc-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .3rem 0; }
.rc-rows dt { color: var(--ink2); font-size: .9rem; flex: none; }
.rc-rows dd { margin: 0; text-align: right; font-weight: 600; font-size: .92rem; min-width: 0; overflow-wrap: anywhere; display: inline-flex; align-items: center; justify-content: flex-end; gap: .3rem; }
.rc-rows dd.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; font-weight: 550; }
.rc-rows dd.ok { color: var(--green); }
.rc-rows .st { border-top: 1px dashed var(--line2); margin-top: .25rem; padding-top: .5rem; }
.rc-rows .st dt, .rc-rows .st dd { font-size: 1.02rem; font-weight: 700; color: var(--ink); }
.rc-rows .st dd.ok { color: var(--green); }
.rc-cp { all: unset; box-sizing: border-box; cursor: pointer; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; color: var(--ink3); flex: none; }
.rc-cp:hover { background: var(--card2); color: var(--ink); }
.rc-cp:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.rc-cp svg { width: 14px; height: 14px; }
.rc-tl { list-style: none; margin: .2rem 0 .3rem; padding: 0; }
.rc-tl li { position: relative; display: flex; gap: .8rem; padding-bottom: 1rem; }
.rc-tl li:last-child { padding-bottom: 0; }
.rc-tl li::before { content: ""; position: absolute; left: 6px; top: 18px; bottom: -3px; width: 2px; background: var(--line2); }
.rc-tl li:last-child::before { display: none; }
.rc-tl li i { width: 14px; height: 14px; border-radius: 50%; flex: none; margin-top: .2rem; position: relative; background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.rc-tl li.bad i { background: var(--st); box-shadow: 0 0 0 3px var(--st-bg); }
.rc-tl li.neutral i { background: var(--ink3); box-shadow: 0 0 0 3px var(--info-bg); }
.rc-tl li.wait i { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-bg); }
.rc-tl li.ghost i { background: var(--line2); box-shadow: none; }
.rc-tl li.ghost b { color: var(--ink3); font-weight: 550; }
.rc-tl b { display: block; font-size: .92rem; }
.rc-tl time { display: block; font-size: .82rem; color: var(--ink2); }
.rc-tl span { display: block; font-size: .8rem; color: var(--ink3); }
.rc-bar { color: var(--ink); text-align: center; }
.rc-bar svg { width: 100%; height: 42px; display: block; fill: currentColor; opacity: .85; }
.rc-bar code { display: block; margin-top: .45rem; font-size: .72rem; letter-spacing: .1em; color: var(--ink3); overflow-wrap: anywhere; }
.rc-foot { text-align: center; font-size: .72rem; line-height: 1.5; color: var(--ink3); margin: .8rem .4rem 0; }
.rc-acts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1rem; }
.rc-acts .btn { width: 100%; white-space: nowrap; padding: 0 .6rem; }
.rc-acts .rc-back { grid-column: 1 / -1; }
@media (max-width: 440px) { .rc-stamp { font-size: .62rem; letter-spacing: .1em; border-width: 2px; right: .4rem; } }
@media (prefers-reduced-motion: reduce) {
  .rc-stamp, .rc-ring svg, .rc-ring::after { animation: none !important; }
  .rc-ring svg { stroke-dashoffset: 0; }
  .rc-stamp { transform: rotate(-12deg); }
}
@media print { .rc-acts { display: none !important; } }

.drawer { width: min(236px, 78vw); padding: .85rem .6rem; font-size: .9rem; }
.drawer .brand { padding: .2rem .55rem .8rem; font-size: .95rem; }
.drawer .brand svg { width: 22px; height: 22px; }
.drawer nav { gap: 1px; align-content: start; }
.drawer nav a { gap: .6rem; padding: .5rem .65rem; border-radius: 8px; font-size: .88rem; font-weight: 500; line-height: 1.3; }
.drawer nav a svg { width: 17px; height: 17px; }
.drawer .sec { margin: .75rem .65rem .25rem; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.drawer .me { padding: .65rem .5rem 0; margin-top: .45rem; gap: .55rem; }
.drawer .me b { font-size: .85rem; }
.drawer .me span { font-size: .74rem; }
.drawer .me .avatar { width: 32px; height: 32px; font-size: .82rem; }

.drawer { width: min(260px, 80vw); font-size: .94rem; }
.drawer nav a { padding: .6rem .75rem; font-size: .93rem; gap: .65rem; }
.drawer nav a svg { width: 18px; height: 18px; }
.drawer .sec { font-size: .68rem; margin-top: .95rem; }
.drawer .sec + a { margin-top: 1px; }

.receipt .acts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.receipt .acts .btn { width: 100%; justify-content: center; white-space: nowrap; }

.is-leaving #view, .is-leaving .top { transition: opacity .6s ease, transform .6s ease, filter .6s ease; opacity: .25; transform: translateY(6px) scale(.992); filter: blur(2px); }
.bye { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1rem; background: rgba(8, 14, 10, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: byeIn .35s ease both; }
.bye.out { opacity: 0; transition: opacity .4s ease; pointer-events: none; }
.bye-card { width: min(320px, 100%); text-align: center; background: var(--card); color: var(--ink); border: 1px solid var(--line2); border-radius: 18px; padding: 1.7rem 1.4rem 1.5rem; box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .6); animation: byeCard .5s cubic-bezier(.2, .9, .25, 1.1) both; }
.bye-ring { width: 62px; height: 62px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 35%, transparent); animation: byePulse 1.6s ease-out infinite; }
.bye-ring svg { width: 28px; height: 28px; }
.bye-ring path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: byeDraw .8s .25s ease forwards; }
.bye-card h3 { font-size: 1.1rem; margin: 0 0 .25rem; }
.bye-card p { margin: 0; color: var(--ink2); font-size: .88rem; }
.bye-bar { height: 4px; border-radius: 99px; background: var(--line); margin-top: 1.2rem; overflow: hidden; }
.bye-bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--red); transform-origin: left; animation: byeBar 1.5s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes byeIn { from { opacity: 0; } }
@keyframes byeCard { from { opacity: 0; transform: translateY(14px) scale(.94); } }
@keyframes byeDraw { to { stroke-dashoffset: 0; } }
@keyframes byeBar { from { transform: scaleX(0); } }
@keyframes byePulse { 70% { box-shadow: 0 0 0 16px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .bye, .bye-card, .bye-ring, .bye-ring path, .bye-bar i { animation-duration: .01s !important; animation-delay: 0s !important; } .is-leaving #view, .is-leaving .top { transition: none; } }

#kp-bar { position: fixed; z-index: 120; top: 0; left: 0; right: 0; height: 3px; pointer-events: none; opacity: 0; transition: opacity .25s ease; }
#kp-bar.on { opacity: 1; }
#kp-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--red), color-mix(in srgb, var(--red) 55%, #ffb199)); transform-origin: left; transform: scaleX(0); transition: transform .3s ease-out; box-shadow: 0 0 10px color-mix(in srgb, var(--red) 60%, transparent); border-radius: 0 3px 3px 0; }
#view > .page:not(.is-loading) { animation: pageIn .42s cubic-bezier(.2, .8, .2, 1) both; }
#view > .page:not(.is-loading) > * { animation: itemIn .45s cubic-bezier(.2, .8, .2, 1) both; }
#view > .page:not(.is-loading) > *:nth-child(2) { animation-delay: .04s; }
#view > .page:not(.is-loading) > *:nth-child(3) { animation-delay: .08s; }
#view > .page:not(.is-loading) > *:nth-child(4) { animation-delay: .12s; }
#view > .page:not(.is-loading) > *:nth-child(n+5) { animation-delay: .16s; }
.page.is-loading { animation: none; }
@keyframes pageIn { from { opacity: 0; } }
@keyframes itemIn { from { opacity: 0; transform: translateY(10px); } }

.fx { position: fixed; inset: 0; z-index: 180; display: grid; place-items: center; padding: 1rem; background: rgba(8, 14, 10, .6); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); animation: byeIn .25s ease both; cursor: pointer; --c: var(--green); --cb: var(--green-bg); }
.fx.out { opacity: 0; transition: opacity .24s ease; pointer-events: none; }
.fx-bad { --c: var(--err); --cb: var(--err-bg); }
.fx-wait { --c: var(--amber); --cb: var(--amber-bg); }
.fx-card { width: min(310px, 100%); text-align: center; background: var(--card); color: var(--ink); border: 1px solid var(--line2); border-radius: 20px; padding: 1.8rem 1.4rem 1.5rem; box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .65); animation: byeCard .5s cubic-bezier(.2, .9, .25, 1.15) both; }
.fx-ring { position: relative; width: 78px; height: 78px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; color: var(--c); background: var(--cb); }
.fx-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--c); opacity: 0; animation: rcpulse .9s .25s ease-out 1; }
.fx-ring svg { width: 40px; height: 40px; }
.fx-ring path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: byeDraw .6s .2s ease forwards; }
.fx-bad .fx-ring { animation: fxShake .5s .55s ease; }
.fx-wait .fx-ring svg { animation: spin 2.4s linear infinite; }
.fx-wait .fx-ring path { stroke-dashoffset: 0; animation: none; }
.fx-p { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: var(--c); opacity: 0; transform: rotate(var(--a)) translateY(0); animation: fxBurst .8s .35s ease-out forwards; }
.fx-p:nth-child(3n) { background: var(--red); width: 5px; height: 5px; }
.fx-p:nth-child(3n+1) { background: var(--amber); }
@keyframes fxBurst { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--d) * -1)) scale(.4); } }
@keyframes fxShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.fx-card h3 { font-size: 1.15rem; margin-bottom: .25rem; }
.fx-card p { color: var(--ink2); font-size: .9rem; }

.ibtn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; flex: none; color: var(--ink2); border: 1px solid var(--line2); background: var(--card); transition: background .15s, color .15s, border-color .15s; }
.ibtn:hover { background: var(--card2); color: var(--ink); }
.ibtn svg { width: 18px; height: 18px; }
.ibtn.copied { color: var(--green); border-color: var(--green); background: var(--green-bg); }

.dev { max-width: 720px; }
.dev-key { position: relative; overflow: hidden; }
.dev-key.on::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--green) 20%, transparent), transparent); pointer-events: none; }
.dev-key-h { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .8rem; }
.dev-pill { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 650; padding: .25rem .7rem; border-radius: 99px; }
.dev-pill b { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dev-pill.on { color: var(--green); background: var(--green-bg); }
.dev-pill.on b { animation: pulse 1.8s infinite; }
.dev-pill.off { color: var(--amber); background: var(--amber-bg); }
.dev-keybox { display: flex; align-items: flex-start; gap: .65rem; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: .35rem .35rem .35rem .75rem; min-width: 0; }
.dev-keybox code { flex: 1; min-width: 0; align-self: center; font: 500 .84rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .01em; overflow-wrap: anywhere; padding: .45rem 0; user-select: all; }
.dev-ic { color: var(--green); background: var(--green-bg); width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; margin: .05rem 0; }
.dev-ic svg { width: 19px; height: 19px; }
.dev-keybox .ibtn { flex: none; }
.dev-eps { display: grid; gap: .5rem; }
.dev-ep { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .15rem .7rem; align-items: center; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 11px; background: var(--card2); }
.dev-ep code { font: 600 .84rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.dev-ep small { grid-column: 2; color: var(--ink3); font-size: .8rem; }
.mth { font: 700 .66rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: .3rem .42rem; border-radius: 6px; letter-spacing: .04em; }
.mth.post { background: var(--green-bg); color: var(--green); }
.mth.get { background: #dde9f5; color: #1d5fa8; }
:root[data-theme="dark"] .mth.get { background: #16283b; color: #8cb8ee; }
.dev-code { background: #101a14; border-radius: 12px; overflow: hidden; border: 1px solid #ffffff14; }
.dev-code-h { display: flex; align-items: center; gap: .25rem; padding: .35rem .4rem .35rem .5rem; border-bottom: 1px solid #ffffff14; overflow-x: auto; scrollbar-width: none; }
.dev-code-h::-webkit-scrollbar { display: none; }
.dev-code-h .sp { flex: 1; }
.dev-code .ibtn { background: #ffffff0d; border-color: transparent; color: #dfe9e1; width: 32px; height: 32px; }
.dev-code .ibtn:hover { background: #ffffff1c; }
.dev-code .ibtn.copied { color: #8fd3a9; background: #ffffff14; }
.dtab { all: unset; cursor: pointer; padding: .32rem .65rem; border-radius: 7px; font-size: .8rem; color: #7f9385; white-space: nowrap; }
.dtab.on { background: #ffffff1c; color: #fff; }
pre.hl { margin: 0; padding: .9rem 1rem; overflow-x: auto; color: #dfe9e1; font: 400 .8rem/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; }
.t-k { color: #c4a7ff; } .t-s { color: #f3c97a; } .t-n { color: #9ec5f5; } .t-c { color: #7f9385; font-style: italic; }
.t-f { color: #8fd3a9; } .t-p { color: #7fd1e8; } .t-v { color: #ffa27a; } .t-o { color: #ff8fa3; } .t-u { color: #8cb8ee; }

.vf-line { display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; }
.vf-line span { overflow-wrap: anywhere; }
.vf { width: 19px; height: 19px; flex: none; filter: drop-shadow(0 1px 2px rgba(29, 155, 240, .35)); animation: vfPop .5s .15s cubic-bezier(.2, .9, .3, 1.4) both; }
@keyframes vfPop { from { transform: scale(.3) rotate(-30deg); opacity: 0; } }

.lockf { position: relative; }
.lockf .input { padding-right: 2.6rem; }
.input:disabled { background: var(--card2); color: var(--ink2); -webkit-text-fill-color: var(--ink2); opacity: 1; cursor: not-allowed; border-style: dashed; }
.lockf svg { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink3); pointer-events: none; }

.sup-ic { width: 30px; height: 30px; border-radius: 50%; background: var(--c); display: grid; place-items: center; flex: none; font-style: normal; }
.sup-ic svg { width: 17px !important; height: 17px !important; fill: #fff; stroke: none; opacity: 1 !important; }
.drawer nav a.sup-link { padding: .5rem .75rem; gap: .7rem; }
.sup-link span b, .sup-link span small { display: block; line-height: 1.25; }
.sup-link span b { font-weight: 600; font-size: .94rem; }
.sup-link span small { font-size: .78rem; color: #8ea096; font-weight: 450; }
.sup-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr 1fr; }
.sup-h { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; }
@media (max-width: 640px) { .sup-grid { grid-template-columns: 1fr; } }

.closed-card { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 1.1rem; margin-bottom: 1rem; border-radius: var(--r); background: var(--err-bg); color: var(--err); border: 1px solid color-mix(in srgb, var(--err) 30%, transparent); }
.closed-card b { display: block; font-size: 1.02rem; }
.closed-card p { margin: .15rem 0 0; font-size: .92rem; color: var(--ink2); }
.closed-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--err) 14%, transparent); flex: none; }
.closed-ic svg { width: 22px; height: 22px; }

dialog.status-dlg { text-align: center; padding: 1.6rem 1.4rem 1.2rem; width: min(340px, calc(100vw - 2rem)); }
dialog.status-dlg[open] { animation: sdPop .3s cubic-bezier(.2, .9, .25, 1.15); }
.sd-ring { width: 66px; height: 66px; border-radius: 50%; margin: 0 auto .9rem; display: grid; place-items: center; background: var(--amber-bg); color: var(--amber); }
.sd-ring svg { width: 32px; height: 32px; }
.status-dlg[data-tone="ok"] .sd-ring { background: var(--green-bg); color: var(--green); }
.status-dlg[data-tone="bad"] .sd-ring { background: var(--err-bg); color: var(--err); }
.status-dlg p { margin: 0; color: var(--ink2); font-size: .92rem; }
.sd-meta { margin-top: .8rem; font-size: .8rem; color: var(--ink3); }
.status-dlg .acts { margin-top: 1.1rem; }
@keyframes sdPop { from { transform: translateY(10px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

.quick { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.quick > div { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--card2); }
.quick > div > span:first-child { font-weight: 600; min-width: 4.8rem; }
.quick > div > a, .quick > div > button { margin-left: auto; font-size: .85rem; font-weight: 600; }
.fee-rows { display: grid; gap: .6rem; }
.fee-row { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr 1fr auto; align-items: end; }
.fee-row .input[readonly] { background: var(--card2); color: var(--ink3); }
@media (max-width: 560px) { .fee-row { grid-template-columns: 1fr 1fr; } .fee-row .btn { grid-column: 1 / -1; } }
.check { display: flex; gap: .65rem; align-items: flex-start; padding: .45rem 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: .15rem; accent-color: var(--red); flex: none; }
.check span b { display: block; font-weight: 600; font-size: .93rem; }
.check span small { display: block; color: var(--ink3); font-size: .8rem; }
.bk { border-bottom: 1px solid var(--line); padding-bottom: .7rem; margin-bottom: .3rem; }
.bk:last-child { border-bottom: 0; }
.bk .row { border-bottom: 0; padding-bottom: .4rem; }
.bk .mid b { overflow-wrap: anywhere; white-space: normal; }
.bk-act { padding-left: calc(38px + .8rem); }
.bk-files { margin: .6rem 0 0 calc(38px + .8rem); padding: .6rem .8rem; background: var(--card2); border: 1px solid var(--line); border-radius: var(--r-s); font-size: .85rem; max-height: 260px; overflow: auto; }
.bk-sum { color: var(--ink2); margin-bottom: .4rem; font-weight: 600; }
.bk-file { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; }
.bk-file .code { overflow-wrap: anywhere; }
@media (max-width: 560px) { .bk-act, .bk-files { padding-left: 0; margin-left: 0; } .bk-files { padding: .6rem .8rem; } }

#view.still > .page, #view.still > .page > * { animation: none !important; }

.receipt .acts.pay-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: 1.1rem; }
.receipt .acts.pay-acts .btn { width: 100%; min-width: 0; white-space: nowrap; padding: 0 .6rem; }
.receipt .acts.pay-acts .btn-wide { grid-column: 1 / -1; }

html { max-width: 100%; overflow-x: hidden; overscroll-behavior-x: none; touch-action: pan-y; }
body { max-width: 100%; touch-action: pan-y; }
@supports (overflow: clip) { body { overflow-x: clip; } }
#app, #view, .page { max-width: 100%; }
img, svg, video, canvas { max-width: 100%; }
input, select, textarea { font-size: max(16px, 1em); }
.tabs, .tbl-wrap, .lg-tw, pre.hl, .dev-code-h { touch-action: pan-x pan-y; overscroll-behavior-x: contain; }

.wallet {
  --mx: 80%; --my: 6%;
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: 22px; padding: 1.25rem 1.25rem 1.1rem; color: #eef5ef;
  background: linear-gradient(135deg, #0e1a14 0%, #143427 52%, #1b6a45 135%);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 26px 42px -24px rgba(10, 30, 20, .7), inset 0 1px 0 rgba(255, 255, 255, .08);
  animation: wlIn .55s cubic-bezier(.2, .8, .2, 1) both;
}
.wallet::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, .13), transparent 60%); }
.wl-orb { position: absolute; z-index: -1; border-radius: 50%; filter: blur(42px); pointer-events: none; }
.wl-orb.a { width: 230px; height: 230px; right: -80px; top: -100px; background: rgba(201, 42, 34, .45); }
.wl-orb.b { width: 210px; height: 210px; left: -90px; bottom: -120px; background: rgba(95, 198, 142, .28); }
.wl-shine { position: absolute; z-index: -1; top: 0; bottom: 0; width: 38%; left: -60%; transform: skewX(-18deg); background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .13), transparent); animation: wlShine 1.7s .45s ease-out 1 both; pointer-events: none; }
.wl-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.wl-brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--display); font-weight: 650; letter-spacing: -.01em; min-width: 0; }
.wl-brand svg { width: 24px; height: 24px; flex: none; color: #fff; --logo-hole: #12241b; }
.wl-badge { font-size: .74rem; font-weight: 650; letter-spacing: .04em; padding: .22rem .7rem; border-radius: 99px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); white-space: nowrap; }
.wl-label { display: flex; align-items: center; gap: .45rem; margin-top: 1.15rem; color: rgba(238, 245, 239, .72); font-size: .88rem; }
.wl-eye { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 0; padding: 0; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; transition: background .2s; }
.wl-eye svg { width: 17px; height: 17px; }
.wl-eye:hover { background: rgba(255, 255, 255, .22); }
.wl-bal { font-family: var(--display); font-weight: 700; font-size: clamp(2.3rem, 9vw, 3.4rem); letter-spacing: -.03em; line-height: 1.08; margin: .15rem 0 0; overflow-wrap: anywhere; }
.wl-bal small { font-size: .42em; font-weight: 600; color: rgba(238, 245, 239, .65); margin-right: .3rem; letter-spacing: 0; }
.wl-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-top: 1.4rem; }
.wl-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 70px; border-radius: 16px; text-decoration: none; color: #fff; font-weight: 600; font-size: .88rem; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); transition: transform .15s, background .2s, box-shadow .2s; -webkit-tap-highlight-color: transparent; }
.wl-btn i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.wl-btn svg { width: 19px; height: 19px; }
.wl-btn:hover { background: rgba(255, 255, 255, .19); transform: translateY(-2px); }
.wl-btn:active { transform: translateY(0) scale(.97); }
.wl-btn.primary { background: linear-gradient(180deg, #dc3a31, #bf261e); border-color: rgba(255, 255, 255, .22); box-shadow: 0 12px 22px -12px rgba(201, 42, 34, .95); }
.wl-btn.primary i { background: rgba(255, 255, 255, .2); }
.wl-btn.primary:hover { background: linear-gradient(180deg, #e8473d, #cb2b23); }
.wl-btn:focus-visible, .wl-eye:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 420px) { .wallet { padding: 1.1rem 1rem 1rem; border-radius: 20px; } }
@keyframes wlIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes wlShine { from { left: -60%; opacity: 1; } to { left: 130%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wallet, .wl-shine { animation: none; } .wl-btn { transition: none; } .wl-shine { display: none; } }

.limit-card { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 1.1rem; margin-bottom: 1rem; border-radius: var(--r); background: var(--amber-bg); color: var(--amber); border: 1px solid color-mix(in srgb, var(--amber) 32%, transparent); }
.limit-card b { display: block; font-size: 1.02rem; }
.limit-card p { margin: .15rem 0 0; font-size: .92rem; color: var(--ink2); }
.closed-ic.lim { background: color-mix(in srgb, var(--amber) 20%, transparent); }
dialog.limit-dlg { width: min(360px, calc(100vw - 2rem)); }
.ld-hero { position: relative; width: 80px; height: 80px; margin: 0 auto .8rem; display: grid; place-items: center; }
.ld-hero .sd-ring { margin: 0; position: relative; z-index: 1; }
.limit-dlg[data-tone="limit"] .sd-ring { background: var(--amber-bg); color: var(--amber); }
.ld-pulse { position: absolute; inset: 7px; border-radius: 50%; border: 2px solid var(--amber); opacity: 0; animation: ldPulse 2.2s ease-out infinite; }
.ld-pulse.b { animation-delay: 1.1s; }
.limit-dlg .sd-ring svg { animation: ldTurn 3.4s ease-in-out infinite; }
.ld-slots { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; margin: 1.1rem 0 .55rem; }
.ld-slots i { width: 26px; height: 10px; border-radius: 99px; background: var(--line2); opacity: .75; }
.ld-slots i.on { background: var(--amber); opacity: 1; animation: ldFill .45s calc(var(--i) * .09s + .25s) cubic-bezier(.2, .9, .3, 1.3) both; }
.ld-count { color: var(--ink2); font-size: .86rem; }
.ld-count b { color: var(--ink); font-size: 1.05rem; }
dialog.limit-dlg .acts { display: grid; gap: .5rem; justify-content: stretch; margin-top: 1.1rem; }
dialog.limit-dlg .acts .btn { width: 100%; }
@keyframes ldPulse { 0% { transform: scale(.85); opacity: .55; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes ldTurn { 0%, 35% { transform: rotate(0); } 60%, 100% { transform: rotate(180deg); } }
@keyframes ldFill { from { transform: scaleX(.2); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ld-pulse, .limit-dlg .sd-ring svg, .ld-slots i.on { animation: none; } }

.qno { display: inline-block; min-width: 2.2rem; text-align: center; padding: .1rem .55rem; border-radius: 99px; background: var(--ink); color: var(--paper); font-weight: 700; font-size: .85rem; margin-right: .35rem; vertical-align: middle; }
.card.q-first { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green), var(--shadow); }
.card.q-first .qno { background: var(--green); color: #fff; }
:root[data-theme="dark"] .card.q-first .qno { color: #0a1a10; }
.check.check-full { padding: .7rem .8rem; margin-bottom: .6rem; border: 1px solid var(--line2); border-radius: var(--r-s); background: var(--card2); }
.bk-opts.is-full .check { opacity: .55; cursor: not-allowed; }
.bk-opts.is-full .check input { cursor: not-allowed; }

.wl-bal { letter-spacing: -.02em; }
.wallet.is-hidden .wl-bal span { letter-spacing: .08em; }

.dana { overflow: hidden; }
.dana-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.dana-t { position: relative; display: flex; flex-direction: column; gap: .15rem; min-width: 0; padding: .8rem .8rem .75rem; border-radius: 14px; background: var(--card2); border: 1px solid var(--line); }
.dana-t i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; margin-bottom: .35rem; }
.dana-t i svg { width: 18px; height: 18px; }
.dana-t.in i { background: var(--green-bg); color: var(--green); }
.dana-t.out i { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.dana-t.wait i { background: var(--amber-bg); color: var(--amber); }
.dana-t span { font-size: .78rem; color: var(--ink2); font-weight: 600; }
.dana-t b { font-family: var(--display); font-size: 1.02rem; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; line-height: 1.2; }
.dana-t small { font-size: .72rem; color: var(--ink3); line-height: 1.3; }
.dana-bar { height: 8px; border-radius: 99px; background: var(--line); margin-top: 1rem; overflow: hidden; }
.dana-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--red)); animation: danaFill .8s .15s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
.dana-leg { display: flex; justify-content: space-between; gap: .6rem; margin-top: .5rem; font-size: .82rem; color: var(--ink2); }
@keyframes danaFill { from { transform: scaleX(0); } to { transform: none; } }
@media (max-width: 520px) { .dana-grid { grid-template-columns: 1fr; } .dana-t { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: .7rem; } .dana-t i { margin: 0; } .dana-t span { flex: 1; } .dana-t b { order: 3; margin-left: auto; } .dana-t small { order: 4; flex-basis: 100%; padding-left: calc(32px + .7rem); margin-top: -.2rem; } }
@media (prefers-reduced-motion: reduce) { .dana-bar i { animation: none; } }

.drop { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; padding: 1.4rem 1rem; border: 2px dashed var(--line2); border-radius: var(--r); background: var(--card2); cursor: pointer; transition: border-color .2s, background .2s, transform .15s; }
.drop b { font-size: 1rem; }
.drop span { font-size: .85rem; color: var(--ink2); max-width: 36ch; }
.drop:hover, .drop:focus-visible, .drop.over { border-color: var(--green); background: var(--green-bg); outline: none; }
.drop.over { transform: scale(1.01); }
