/* GoinBill - white studio, sky-blue journal. The brand blue is set in config.js. */
@font-face { font-family: Inter; src: url(../fonts/inter-latin-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; src: url(../fonts/inter-latin-ext-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --brand: #36B9FD; --brand-deep: #0B74B8; --brand-soft: #E6F5FF; --on-brand: #06283D;
  --night: #FFFFFF; --leather: var(--brand); --gold: var(--brand); --gold-2: var(--on-brand); --sky: var(--brand-deep);
  --paper: #FFFFFF; --paper-2: #F1F6FA; --paper-3: #F7FAFC; --ink: #0F2233; --ink-2: #51606E; --rule: rgba(15, 34, 51, .14);
  --blue: var(--brand-deep); --red: #C0323C; --green: #1E7F58; --accent: var(--brand); --on-accent: var(--on-brand);
  --serif: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --sans: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --hand: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { background: var(--night); color: var(--ink); font: 400 16px/1.5 var(--sans); overflow: hidden; overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; }
h2 { font-size: 1.4rem; } h3 { font-size: .98rem; font-weight: 700; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--brand-deep); outline-offset: 2px; border-radius: 6px; }
.ic { display: block; } .icw { display: inline-flex; flex: none; }
.sub { color: var(--ink-2); font-size: .92rem; } .good { color: var(--green); font-weight: 600; } .warn { color: var(--red); font-size: .92rem; font-weight: 500; }
.credit a { color: var(--blue); }
.credit { text-align: center; color: var(--ink-2); font-size: .82rem; padding: 18px 0 4px; }

/* ---------- book screen ---------- */
#stage { position: fixed; inset: 0; touch-action: none; }
.book-canvas { width: 100%; height: 100%; display: block; touch-action: none; }
#stage { background: #fff; }
#hud { position: fixed; inset: 0; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; color: var(--ink); transition: opacity .35s; }
#hud > * { pointer-events: auto; }
body.in-view #hud { opacity: 0; pointer-events: none; } body.in-view #hud > * { pointer-events: none; }
.hud-top { display: flex; justify-content: space-between; align-items: center; padding: calc(12px + var(--safe-t)) 16px 0; }
.brand { font: 800 1.35rem/1 var(--serif); letter-spacing: -.02em; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.brand img { width: 38px; height: 38px; display: block; } .brand span { display: flex; flex-direction: column; gap: 4px; }
.brand small { font: 600 .68rem var(--sans); letter-spacing: 0; color: var(--brand-deep); }
.hud-actions { display: flex; gap: 6px; }
.hud-mid { flex: 1; pointer-events: none !important; }
#nudge { display: flex; justify-content: center; padding: 0 16px 8px; }
.nudge { display: flex; gap: 8px; align-items: center; text-align: left; max-width: 460px; background: #fff; border: 1.5px solid var(--brand); color: var(--ink); border-radius: 14px; padding: 9px 13px; font-size: .86rem; line-height: 1.3; box-shadow: 0 6px 20px rgba(15, 34, 51, .12); }
.nudge .ic { color: var(--brand-deep); }
.hud-bottom { display: grid; grid-template-columns: 56px 1fr 56px; align-items: end; padding: 0 12px calc(14px + var(--safe-b)); background: linear-gradient(rgba(255, 255, 255, 0), #fff 60%); }
.hud-center { display: flex; flex-direction: column; align-items: center; gap: 7px; }
#cap { font: 600 .92rem var(--sans); color: var(--ink-2); min-height: 1.4em; }
#scan { width: 78px; height: 78px; border-radius: 50%; border: 0; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; box-shadow: 0 10px 26px color-mix(in srgb, var(--brand) 45%, transparent), 0 0 0 6px color-mix(in srgb, var(--brand) 18%, transparent); transition: transform .15s; }
#scan:active { transform: scale(.93); }
#scan-label { font-size: .82rem; font-weight: 600; color: var(--ink); }
.navb { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--rule); background: #fff; color: var(--ink); display: grid; place-items: center; margin-bottom: 30px; box-shadow: 0 4px 14px rgba(15, 34, 51, .08); }
.navb:disabled { opacity: .25; }
#splash { position: fixed; inset: 0; background: var(--night); display: grid; place-content: center; text-align: center; gap: 10px; z-index: 90; transition: opacity .8s .1s; }
#splash img { width: 104px; height: 104px; margin: 0 auto 6px; display: block; }
#splash b { font: 800 2.6rem var(--serif); letter-spacing: -.03em; color: var(--ink); } #splash p { color: var(--brand-deep); font-size: .85rem; font-weight: 600; }
body.ready #splash { opacity: 0; pointer-events: none; }
#stage.flat { overflow: auto; padding: 80px 20px 220px; } #stage.flat::after { display: none; }
.flat-list { max-width: 520px; margin: 0 auto; display: grid; gap: 12px; } .flat-list h1 { color: var(--ink); }
.flat-card { text-align: left; background: var(--paper); border: 0; border-radius: 10px; padding: 16px; display: grid; } .flat-card { border: 1.5px solid var(--rule) !important; } .flat-card b { font: 700 1.3rem var(--serif); }

/* ---------- buttons, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 16px; border-radius: 12px; border: 1.5px solid var(--rule); background: #fff; color: var(--ink); font-weight: 600; font-size: .95rem; line-height: 1.2; text-align: center; transition: transform .12s, background .15s; }
a.btn { text-decoration: none; }
.btn:active { transform: scale(.97); } .btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; } .btn.danger { color: var(--red); }
.btn.round { width: 44px; padding: 0; border-radius: 50%; } .btn.small { min-height: 36px; padding: 6px 12px; font-size: .86rem; } .btn.round.small { width: 36px; }
.btn.big { min-height: 54px; font-size: 1.05rem; width: 100%; border-radius: 14px; }
.btn.light { color: #F2EBDB; background: rgba(20, 28, 38, .55); border-color: rgba(242, 235, 219, .25); backdrop-filter: blur(6px); } .btn.ghost.light { border-color: transparent; }
.field { display: grid; gap: 5px; min-width: 0; } .lab { font-size: .82rem; font-weight: 600; color: var(--ink-2); } .hint { font-size: .8rem; color: var(--blue); }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input:not([type]), select { width: 100%; min-width: 0; min-height: 46px; padding: 9px 12px; border-radius: 10px; border: 1.5px solid var(--rule); background: #fff; color: var(--ink); font-size: 1rem; }
input:focus, select:focus { outline: 2.5px solid var(--brand); outline-offset: 0; border-color: transparent; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.amt { display: grid; grid-template-columns: 1fr auto; gap: 6px; } .amt select { width: auto; padding-right: 6px; }
.stack { display: grid; gap: 13px; }
.row { display: flex; gap: 8px; align-items: center; } .row.center { justify-content: center; padding: 14px 0; } .row.between { justify-content: space-between; } .row.wraps { flex-wrap: wrap; }
.check { display: flex; gap: 10px; align-items: center; padding: 8px 0; font-size: .95rem; } .check.tall { align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--rule); } .check small { display: block; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 13px; border-radius: 999px; border: 1.5px solid var(--rule); background: transparent; font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.chip.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dot, var(--ink-2)); display: inline-block; flex: none; }
.empty { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 34px 8px; } .empty h3 { font: 700 1.35rem/1.2 var(--serif); letter-spacing: -.02em; } .empty p { color: var(--ink-2); max-width: 34ch; }
.badge { position: absolute; top: 6px; left: 6px; background: var(--brand); color: var(--on-brand); font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; } .badge.ok { background: var(--green); color: #fff; }

/* ---------- layer: toast, sheet, progress ---------- */
#layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; } #layer > * { pointer-events: auto; }
.toast { position: absolute; left: 50%; top: calc(64px + var(--safe-t)); transform: translate(-50%, -20px); opacity: 0; transition: .3s; background: #17202B; color: #F2EBDB; padding: 12px 16px; border-radius: 14px; max-width: min(92vw, 460px); width: max-content; display: flex; gap: 12px; align-items: center; font-size: .92rem; line-height: 1.35; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); border-left: 4px solid var(--brand); z-index: 80; }
.toast.in { transform: translate(-50%, 0); opacity: 1; } .toast.good { border-left-color: #58C08F; } .toast.bad { border-left-color: #E06A6A; }
.toast button { background: none; border: 0; color: var(--brand); font-weight: 700; }
.sheet-wrap { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.scrim { position: absolute; inset: 0; background: rgba(15, 34, 51, .45); opacity: 0; transition: opacity .3s; }
.sheet { position: relative; width: min(100%, 520px); max-height: 92dvh; display: flex; flex-direction: column; background: var(--paper); border-radius: 22px 22px 0 0; transform: translateY(100%); transition: transform .34s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 -12px 50px rgba(0, 0, 0, .5); }
.sheet.wide { width: min(100%, 640px); }
.sheet-wrap.in .scrim { opacity: 1; } .sheet-wrap.in .sheet { transform: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 14px 8px 20px; } .sheet-head h2 { font-size: 1.5rem; } .sheet-head .sub { margin-top: 5px; }
.sheet-body { overflow: auto; padding: 8px 20px calc(22px + var(--safe-b)); display: grid; gap: 13px; align-content: start; } .sheet-body h3 { margin-top: 10px; }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 22px; transform: translateY(40px); opacity: 0; transition: .3s; } .sheet-wrap.in .sheet { opacity: 1; } }
.choices { display: grid; gap: 9px; }
.choice { display: flex; gap: 13px; align-items: center; text-align: left; padding: 13px 15px; min-height: 58px; border-radius: 14px; border: 1.5px solid var(--rule); background: var(--paper-3); color: var(--ink); }
.choice.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; } .choice.danger { color: var(--red); }
.choice b { display: block; font-weight: 650; } .choice small { display: block; opacity: .78; font-size: .84rem; line-height: 1.3; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; border-top: 1px solid var(--rule); margin-top: 6px; }
.progress { position: absolute; inset: 0; background: rgba(4, 7, 11, .7); display: grid; place-items: center; opacity: 0; transition: opacity .25s; z-index: 85; } .progress.in { opacity: 1; }
.progress-box { background: var(--paper); border-radius: 18px; padding: 24px 26px; width: min(86vw, 330px); display: grid; gap: 14px; justify-items: center; text-align: center; font-weight: 600; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3.5px solid var(--rule); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.bar { width: 100%; height: 6px; border-radius: 3px; background: var(--rule); overflow: hidden; } .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- chapter view ---------- */
#view { position: fixed; inset: 0; z-index: 20; pointer-events: none; } #view.open { pointer-events: auto; }
.chapter { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--paper); opacity: 0; transform: scale(1.06); transition: opacity .38s, transform .45s cubic-bezier(.2, .8, .2, 1); }
.chapter.in { opacity: 1; transform: none; }
.ch-head { position: relative; flex: none; height: clamp(170px, 30dvh, 260px); overflow: hidden; background: var(--brand); }
.ch-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ch-shade { position: absolute; inset: 0; background: linear-gradient(rgba(6, 12, 18, .5), rgba(6, 12, 18, 0) 38%, rgba(6, 12, 18, .82)); }
.ch-bar { position: absolute; top: calc(8px + var(--safe-t)); left: 8px; right: 8px; display: flex; justify-content: space-between; }
.ch-title { position: absolute; left: 20px; right: 20px; bottom: 14px; color: #fff; } .ch-title h1 { font-size: clamp(2rem, 9vw, 3rem); text-shadow: 0 2px 14px rgba(0, 0, 0, .5); } .ch-title p { font-size: .88rem; opacity: .9; }
.ch-credit { position: absolute; right: 10px; bottom: 6px; font-size: .68rem; color: rgba(255, 255, 255, .8); text-decoration: none; }
.ch-main { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; }
.tabbox { max-width: 720px; margin: 0 auto; padding: 18px 16px 130px; display: grid; gap: 14px; align-content: start; } .tabbox h2 { margin-top: 10px; }
.tabs { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr 84px 1fr 1fr; align-items: end; padding: 6px 6px calc(6px + var(--safe-b)); background: #fff; border-top: 1px solid var(--rule); box-shadow: 0 -8px 24px rgba(0, 0, 0, .12); }
.tab { display: grid; justify-items: center; gap: 2px; padding: 7px 2px; min-height: 52px; border: 0; background: none; color: var(--ink-2); font-size: .74rem; font-weight: 600; border-radius: 10px; }
.tab.on { color: var(--ink); } .tab.on .icw { background: var(--brand); color: var(--on-brand); border-radius: 999px; padding: 2px 12px; }
.scan-fab { justify-self: center; width: 70px; height: 70px; margin-top: -30px; border-radius: 50%; border: 5px solid #fff; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; align-content: center; font-size: .68rem; font-weight: 700; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.yr-head { display: flex; align-items: center; gap: 8px; padding: calc(10px + var(--safe-t)) 10px 6px; } .yr-head h1 { font-size: 1.6rem; }
.review-year .tabbox { padding-bottom: 40px; }
.yr-big { text-align: center; } .yr-big b { font: 800 clamp(4.5rem, 24vw, 8rem)/1 var(--serif); letter-spacing: -.05em; } .yr-big p { color: var(--ink-2); max-width: 40ch; margin: 4px auto 0; }
canvas.stamps { width: 100%; height: auto; background: var(--paper-2); border-radius: 12px; }

.notice { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--red) 10%, var(--paper)); border: 1.5px solid color-mix(in srgb, var(--red) 35%, transparent); }
.notice .ic { color: var(--red); } .notice p { font-size: .86rem; color: var(--ink-2); } .notice b { line-height: 1.25; display: block; }
.notice.good { background: color-mix(in srgb, var(--green) 10%, var(--paper)); border-color: color-mix(in srgb, var(--green) 35%, transparent); } .notice.good .ic { color: var(--green); }
.group { display: grid; gap: 8px; }
.group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 2px solid var(--ink); padding-bottom: 5px; margin-top: 8px; }
.group-head h3 { font: 700 1.15rem/1.2 var(--serif); letter-spacing: -.01em; } .group-head span { font-size: .84rem; color: var(--ink-2); white-space: nowrap; }
.exp { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: var(--paper-3); border: 1px solid var(--rule); cursor: pointer; }
.pair { display: flex; }
.slot { position: relative; width: 58px; height: 76px; border-radius: 4px; overflow: hidden; background: #fff; box-shadow: 0 2px 7px rgba(0, 0, 0, .28); display: grid; padding: 0; border: 0; transform: rotate(-3deg); }
.slot + .slot { margin-left: -12px; transform: rotate(3deg) translateY(3px); }
.slot img { width: 100%; height: 100%; object-fit: cover; grid-area: 1/1; }
.slot small { grid-area: 1/1; align-self: end; background: rgba(12, 20, 28, .72); color: #fff; font-size: .58rem; font-weight: 600; text-align: center; padding: 1px 0; }
.slot.missing { background: color-mix(in srgb, var(--red) 8%, var(--paper)); border: 2px dashed var(--red); color: var(--red); place-items: center; align-content: center; box-shadow: none; }
.slot.missing small { background: none; color: var(--red); grid-area: auto; font-size: .6rem; line-height: 1.1; padding: 0 2px; }
.exp-mid { display: grid; gap: 3px; min-width: 0; } .exp-mid b { font-size: 1rem; }
.cat { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--ink-2); }
.exp-amt { text-align: right; display: grid; } .exp-amt b { font: 700 1.02rem var(--serif); font-variant-numeric: tabular-nums; white-space: nowrap; } .exp-amt small { font-size: .78rem; color: var(--ink-2); white-space: nowrap; } .exp-amt .fee { color: var(--blue); }
.exp-sheet { display: grid; gap: 13px; }
.docs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.doc { position: relative; aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; border: 0; padding: 0; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); display: grid; color: var(--ink-2); place-items: center; }
.doc img { width: 100%; height: 100%; object-fit: cover; grid-area: 1/1; } .doc small { grid-area: 1/1; align-self: end; justify-self: stretch; background: rgba(12, 20, 28, .75); color: #fff; font-size: .78rem; font-weight: 600; padding: 4px; }
.doc.missing { background: color-mix(in srgb, var(--red) 7%, var(--paper)); border: 2px dashed var(--red); color: var(--red); box-shadow: none; align-content: center; gap: 6px; padding: 10px; } .doc.missing small { all: unset; font-size: .8rem; }
.claim { font: 600 1rem var(--sans); color: var(--blue); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { padding: 13px 14px; border-radius: 14px; background: var(--paper-3); border: 1px solid var(--rule); display: grid; gap: 2px; } .tile span { font-size: .82rem; color: var(--ink-2); font-weight: 600; } .tile b { font: 700 1.4rem/1.15 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile.strong { background: var(--brand); border-color: transparent; } .tile.strong span { color: var(--on-brand); } .tile.strong b { color: var(--on-brand); }
.sum-rows { display: grid; }
.sum-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--rule); }
.sr-main, .sr-amt { display: grid; min-width: 0; } .sr-amt { text-align: right; font-variant-numeric: tabular-nums; } .sum-row small { color: var(--ink-2); font-size: .8rem; } .sr-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exports { display: grid; gap: 9px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.export { display: flex; gap: 12px; align-items: center; text-align: left; padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--rule); background: var(--paper-3); color: var(--ink); } .export b { display: block; } .export small { color: var(--ink-2); font-size: .82rem; }

/* ---------- memories ---------- */
.adders { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px 12px; padding: 6px 2px; }
.mtile { position: relative; aspect-ratio: 1; padding: 6px 6px 22px; border: 0; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .28); transform: rotate(var(--r, 0deg)); display: grid; color: #4A5A6B; place-items: center; }
.mtile img { width: 100%; height: 100%; object-fit: cover; grid-area: 1/1; min-height: 0; } .mtile.is-cover { outline: 3px solid var(--gold); }
.playb { grid-area: 1/1; width: 42px; height: 42px; border-radius: 50%; background: rgba(12, 20, 28, .7); color: #fff; display: grid; place-items: center; }
.map { height: min(62dvh, 520px); border-radius: 14px; overflow: hidden; background: #cfd8dc; z-index: 0; }
.pin img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .45); }
.lightbox { position: absolute; inset: 0; background: rgba(2, 4, 7, 0); transition: background .4s; overflow: hidden; }
.lightbox.in { background: rgba(2, 4, 7, .96); }
.lb-bar { position: absolute; left: 0; right: 0; height: 0; background: #000; transition: height .45s cubic-bezier(.2, .8, .2, 1); z-index: 2; } .lb-bar.top { top: 0; } .lb-bar.bottom { bottom: 0; }
.lightbox.in .lb-bar { height: max(56px, 7dvh); }
.lb-stage { position: absolute; inset: 0; display: grid; place-items: center; touch-action: none; transform-origin: var(--ox, 50%) var(--oy, 50%); transform: scale(.25); opacity: 0; filter: blur(12px); transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .35s, filter .5s; }
.lightbox.in .lb-stage { transform: none; opacity: 1; filter: none; }
.lb-media { max-width: 100%; max-height: calc(100dvh - 2 * max(56px, 7dvh)); object-fit: contain; opacity: 0; transition: opacity .3s, transform .35s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 0 80px rgba(126, 196, 240, .12); user-select: none; }
.lb-media.from-right { transform: translateX(60px); } .lb-media.from-left { transform: translateX(-60px); } .lb-media.in { opacity: 1; transform: none; } .lb-media.zoomed { transform: scale(2.4); }
.lb-top { position: absolute; top: calc(6px + var(--safe-t)); left: 14px; right: 8px; display: flex; justify-content: space-between; align-items: center; z-index: 3; color: #F2EBDB; font-size: .88rem; }
.lb-prev, .lb-next { position: absolute; top: 50%; z-index: 3; margin-top: -22px; } .lb-prev { left: 6px; } .lb-next { right: 6px; }
.lb-foot { position: absolute; bottom: calc(8px + var(--safe-b)); left: 14px; right: 14px; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; color: #F2EBDB; }
.lb-cap { font: 600 1rem var(--sans); } .lb-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.reel { position: absolute; inset: 0; background: #000; display: grid; place-items: center; opacity: 0; transition: opacity .35s; } .reel.in { opacity: 1; }
.reel-canvas { max-width: 100%; max-height: 100dvh; aspect-ratio: 9/16; height: 100dvh; }
.reel-top { position: absolute; top: calc(8px + var(--safe-t)); right: 8px; }
.reel-bar { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: rgba(255, 255, 255, .2); } .reel-bar i { display: block; height: 100%; width: 0; background: var(--gold); }
.reel-foot { position: absolute; bottom: calc(18px + var(--safe-b)); display: flex; gap: 10px; opacity: 0; transition: opacity .4s; pointer-events: none; } .reel.ended .reel-foot { opacity: 1; pointer-events: auto; }

/* ---------- insights ---------- */
.hero-num { display: grid; gap: 2px; } .hero-num span { color: var(--ink-2); font-weight: 600; } .hero-num b { font: 800 clamp(2.4rem, 12vw, 3.8rem)/1.05 var(--serif); letter-spacing: -.035em; font-variant-numeric: tabular-nums; } .hero-num small { color: var(--ink-2); font-size: .9rem; }
.bars { display: grid; gap: 4px; }
.bar-row { display: grid; grid-template-columns: minmax(96px, 30%) 1fr auto; gap: 10px; align-items: center; background: none; border: 0; padding: 7px 0; text-align: left; min-height: 40px; }
.bar-label { font-size: .9rem; font-weight: 600; } .bar-val { font-size: .9rem; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.bar-track { height: 14px; display: block; border-left: 1.5px solid var(--ink-2); } .bar-track i { display: block; height: 100%; width: 0; border-radius: 0 4px 4px 0; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.bar-detail { min-height: 1.4em; }
.cols { display: flex; gap: 3px; align-items: stretch; height: 150px; border-bottom: 1.5px solid var(--ink-2); }
.col { flex: 1; min-width: 0; display: grid; grid-template-rows: 1fr auto; gap: 3px; background: none; border: 0; padding: 0; color: var(--ink-2); }
.col-track { display: flex; align-items: flex-end; justify-content: center; } .col-track i { display: block; width: min(70%, 26px); height: 0; background: #1F78A8; border-radius: 4px 4px 0 0; transition: height .9s cubic-bezier(.2, .8, .2, 1); }
.col small { font-size: .7rem; }
.badges { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; padding: 4px; }
.badge-card { background: #fff; color: var(--ink); padding: 14px 14px 16px; border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 4px 14px rgba(15, 34, 51, .06); display: grid; gap: 2px; border-top: 4px solid var(--brand); }
.badge-card small { font-size: .78rem; font-weight: 700; color: var(--ink-2); } .badge-card b { font: 700 1.4rem/1.15 var(--serif); letter-spacing: -.02em; } .badge-card span { font: 500 .9rem/1.3 var(--sans); color: var(--brand-deep); }

/* ---------- scanning ---------- */
.cam { position: absolute; inset: 0; background: #000; } .cam video { width: 100%; height: 100%; object-fit: cover; }
.cam-frame { position: absolute; inset: 14% 7% 26%; pointer-events: none; }
.cam-frame i { position: absolute; width: 34px; height: 34px; border: 3px solid var(--gold); } .cam-frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; } .cam-frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; } .cam-frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; } .cam-frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; } .cam-flash.go { animation: flash .35s; } @keyframes flash { from { opacity: .85; } to { opacity: 0; } }
.cam-top { position: absolute; top: calc(8px + var(--safe-t)); left: 8px; right: 14px; display: flex; gap: 10px; align-items: center; color: #fff; text-shadow: 0 1px 6px #000; } .cam-top small { display: block; opacity: .85; } .cam-top > div { flex: 1; min-width: 0; } .cam-top .btn.on { background: #FFD54A; color: #1a1a1a; }
.shutter:disabled { opacity: .6; }
.hint .check { color: #B06A00; font-weight: 600; } .field:has(.check) input, .field:has(.check) select { border-color: #E0A030; background: #FFF8EC; }
.cam-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px calc(18px + var(--safe-b)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); }
.cam-bottom .btn { justify-self: end; } .cam-tray { display: flex; gap: 6px; overflow: auto; } .cam-thumb { width: 44px; height: 58px; object-fit: cover; border-radius: 4px; border: 2px solid #fff; flex: none; }
.shutter { width: 76px; height: 76px; border-radius: 50%; border: 4px solid #fff; background: transparent; padding: 5px; } .shutter i { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; } .shutter:active i { transform: scale(.88); }
.review { position: absolute; inset: 0; background: var(--paper); display: flex; flex-direction: column; transform: translateY(100%); transition: transform .34s cubic-bezier(.2, .8, .2, 1); } .review.in { transform: none; }
.review-head { display: flex; gap: 8px; align-items: flex-start; padding: calc(12px + var(--safe-t)) 14px 10px 8px; border-bottom: 1px solid var(--rule); } .review-head h2 { font-size: 1.35rem; }
.review-list { flex: 1; overflow: auto; padding: 14px; display: grid; gap: 14px; align-content: start; max-width: 720px; width: 100%; margin: 0 auto; }
.review-foot { padding: 10px 14px calc(12px + var(--safe-b)); border-top: 1px solid var(--rule); background: var(--paper-3); } .review-foot .btn { max-width: 692px; margin: 0 auto; display: flex; }
.rcard { position: relative; display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 12px; border-radius: 16px; background: var(--paper-3); border: 1px solid var(--rule); }
.rthumb { position: relative; width: 84px; height: 112px; border-radius: 6px; overflow: hidden; border: 0; padding: 0; background: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); align-self: start; display: grid; place-items: center; color: var(--ink-2); } .rthumb img { width: 100%; height: 100%; object-fit: cover; }
.rbody { display: grid; gap: 10px; min-width: 0; padding-right: 30px; } .rdel { position: absolute; top: 6px; right: 6px; }
.line { display: grid; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--rule); } .line:first-of-type { border-top: 0; padding-top: 0; } .line.is-dup > .field, .line.is-dup > .grid2, .line.is-dup > .grid3 { opacity: .45; }
.line-head { display: flex; justify-content: space-between; align-items: center; }
.dup { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 11px 12px; border-radius: 12px; background: color-mix(in srgb, var(--red) 11%, var(--paper)); border: 1.5px solid var(--red); } .dup > .icw { color: var(--red); } .dup p { font-size: .86rem; margin: 2px 0 8px; }
@media (max-width: 420px) { .rcard { grid-template-columns: 1fr; } .rthumb { width: 68px; height: 90px; } .grid3 { grid-template-columns: 1fr 1fr; } }
.match { display: grid; gap: 10px; }
.mrow { display: flex; gap: 10px; align-items: center; padding: 6px 0; } .mrow > div { flex: 1; min-width: 0; display: grid; } .mrow small { color: var(--ink-2); font-size: .84rem; } .mrow.ok > .icw { color: var(--green); }
.mthumb { width: 40px; height: 52px; border-radius: 4px; overflow: hidden; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); flex: none; display: grid; place-items: center; } .mthumb img { width: 100%; height: 100%; object-fit: cover; } .mrow.ok .mthumb + .mthumb { margin-left: -22px; transform: rotate(5deg); }
.mask { padding: 12px; border-radius: 14px; border: 1.5px solid var(--rule); background: var(--paper-3); display: grid; gap: 4px; }
.settings { display: grid; gap: 12px; } .settings h3 { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); } .settings h3:first-child { border: 0; margin: 0; padding: 0; }
.styles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.style { text-align: left; padding: 11px 12px; border-radius: 12px; border: 1.5px solid var(--rule); background: var(--paper-3); color: var(--ink); display: grid; gap: 2px; } .style small { color: var(--ink-2); font-size: .8rem; line-height: 1.3; }
.style.on { border-color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

.pic-credit { font-size: .74rem; color: var(--ink-2); text-align: right; margin-top: -6px; } .pic-credit a { color: inherit; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; } .swatch { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--rule); padding: 0; } .swatch.on { box-shadow: 0 0 0 3px var(--ink); }
.cover-prev { display: flex; gap: 12px; align-items: center; } .cover-prev img { width: 64px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--rule); }
textarea { width: 100%; min-height: 76px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--rule); background: #fff; color: var(--ink); font: inherit; resize: vertical; }

/* owner tools */
.olist { display: grid; gap: 9px; }
.ocard { padding: 12px 13px; border-radius: 14px; background: var(--paper-3); border: 1px solid var(--rule); display: grid; gap: 6px; min-width: 0; }
.ocard.slim { gap: 2px; padding: 9px 12px; }
.ocard .sub.small, .sub.small { font-size: .82rem; }
.oacts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .oacts input { flex: 1 1 180px; min-width: 0; } .oacts select { width: auto; }
.ocode { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--paper-3); border: 1px dashed var(--brand); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; }
.pill { font-size: .76rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--paper-2, #eef3f7); color: var(--ink-2); white-space: nowrap; }
.pill.licence { background: #e3f5ea; color: #1d6b3d; } .pill.sub { background: #e2f3fe; color: #0b5d8c; } .pill.trial { background: #fff4dc; color: #7a5500; } .pill.locked { background: #fde8e8; color: #9b1c1c; } .pill.owner { background: var(--brand); color: var(--on-brand); }
.sub.good { color: #1d6b3d; font-weight: 600; } .sub.warn { color: #9b1c1c; font-weight: 600; }
