:root {
  --bg: #16110b; --surface: #221a11; --inset: #1a140d; --line: #3a2d1d;
  --text: #f6ecdc; --muted: #b5a48c; --amber: #f2a51a; --amber-dark: #c47d06;
  --green: #7fd18b; --red: #ff8a7a; --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding-bottom: 84px; }
a { color: var(--amber); }
.top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); }
.brand { color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .01em; }
.brand-mark { margin-right: 4px; }
.top-link { color: var(--muted); text-decoration: none; font-size: .9rem; }
.page { max-width: 560px; margin: 0 auto; padding: 16px; }
.page-title { font-size: 1.4rem; margin: 4px 0 14px; }
.section-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 10px; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.card-inset { background: var(--inset); border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px; font-size: .88rem; }
.stack { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; }
label .muted { font-weight: 400; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; }
label.check input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--amber); }
input, select { font: inherit; color: var(--text); background: var(--inset); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; min-height: 44px; }
input:focus, select:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
input[disabled] { opacity: .5; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--amber); border-color: var(--amber); color: #1b1206; }
.btn-primary:active { background: var(--amber-dark); }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: .85rem; }
.btn-danger { color: var(--red); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.btn-row .btn { flex: 1 1 140px; }
.flash { border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-weight: 600; }
.flash-success { background: #1f3322; color: var(--green); border: 1px solid #2f5034; }
.flash-error { background: #3a1d18; color: var(--red); border: 1px solid #5c2c24; }
.warn { background: #3a2d12; border: 1px solid #5d4718; border-radius: 10px; padding: 10px 12px; margin: 0; font-size: .9rem; }
.hero { text-align: center; padding: 18px 0 10px; }
.hero h1 { margin: 6px 0 4px; font-size: 1.8rem; }
.hero-mark { font-size: 2.6rem; }

.bank { text-align: center; padding: 22px 16px; border-radius: 18px; background: linear-gradient(160deg, #f2a51a 0%, #c47d06 100%); color: #1b1206; margin-bottom: 8px; }
.bank-neg { background: linear-gradient(160deg, #6b3a2a 0%, #3e2219 100%); color: var(--text); }
.bank-label { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.bank-num { font-size: 3rem; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bank-num span { font-size: 1.1rem; font-weight: 700; }
.bank-sub { font-size: .9rem; font-weight: 600; opacity: .85; }

.earned { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.earned-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 8px; text-align: center; }
.earned-item.zero { opacity: .45; }
.earned-icon { font-size: 1.7rem; }
.earned-n { font-size: 1.8rem; font-weight: 900; color: var(--amber); line-height: 1.1; }
.earned-name { font-weight: 700; font-size: .9rem; }
.earned-serv { color: var(--muted); font-size: .72rem; }

.list { padding: 4px 16px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row-end { display: flex; align-items: center; gap: 8px; text-align: right; }
.grow { flex: 1; min-width: 0; }
.plus { color: var(--green); font-weight: 800; font-variant-numeric: tabular-nums; }
.minus { color: var(--red); font-weight: 800; font-variant-numeric: tabular-nums; }
.x { background: none; border: 0; color: var(--muted); font-size: 1.4rem; width: 36px; height: 36px; cursor: pointer; border-radius: 8px; }
.rank { width: 34px; text-align: center; font-weight: 800; font-size: 1.15rem; color: var(--muted); }
.board-row.me { background: rgba(242, 165, 26, .08); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.board-num b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; background: rgba(242, 165, 26, .18); color: var(--amber); padding: 2px 7px; border-radius: 99px; vertical-align: 2px; }
.tag-off { background: rgba(255, 138, 122, .15); color: var(--red); }

.seg { display: flex; background: var(--inset); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.seg label, .seg a { flex: 1; flex-direction: row; justify-content: center; text-align: center; padding: 9px 6px; border-radius: 9px; cursor: pointer; font-size: .88rem; color: var(--muted); text-decoration: none; font-weight: 700; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.seg label:has(input:checked), .seg a.on { background: var(--amber); color: #1b1206; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--amber); }
.seg-links { margin-bottom: 12px; }
.estimate { background: var(--inset); border: 1px dashed var(--amber-dark); border-radius: 10px; padding: 10px 12px; text-align: center; }
.estimate b { color: var(--amber); }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pick { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 10px; text-align: center; align-items: center; gap: 2px; cursor: pointer; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.pick:has(input:checked) { border-color: var(--amber); background: #2e2213; }
.pick:has(input:focus-visible) { outline: 2px solid var(--amber); }
.pick-icon { font-size: 1.8rem; }
.pick-name { font-weight: 800; }
.pick-serv { color: var(--muted); font-size: .74rem; font-weight: 500; }
.link { font-size: .82rem; }
.disclaimer { padding-left: 18px; margin: 8px 0; }
.disclaimer li { margin-bottom: 6px; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: #1d160e; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px 0 9px; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 700; }
.tabs a span { font-size: 1.25rem; line-height: 1.2; }
.tabs a.on { color: var(--amber); }
.foot { text-align: center; color: var(--muted); font-size: .75rem; padding: 8px 16px 16px; }
