/* Layout: one narrow phone column. Score-a-Pokémon card on top, saved collection below, sorted by showcase points. */
:root {
  --bg: #eef1f6;
  --surface: #ffffff;
  --ink: #1b2433;
  --muted: #5e6b80;
  --line: #d8dee8;
  --accent: #e8962e;       /* appraisal-bar orange */
  --accent-ink: #8a4f06;
  --night: #1d2b4f;        /* Pokémon GO night sky */
  --good: #2f8f5b;
  --warn: #b5541c;
  --chip: #e7ebf2;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1522; --surface: #18202f; --ink: #e9edf4; --muted: #9aa6ba; --line: #2b3548;
    --accent: #f0a443; --accent-ink: #ffd29a; --night: #0b1224; --good: #5cc48b; --warn: #f08a52; --chip: #243045;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1522; --surface: #18202f; --ink: #e9edf4; --muted: #9aa6ba; --line: #2b3548;
  --accent: #f0a443; --accent-ink: #ffd29a; --night: #0b1224; --good: #5cc48b; --warn: #f08a52; --chip: #243045;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.45; }
.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px 48px; display: grid; gap: 16px; }
header.top { background: var(--night); color: #f4f6fb; border-radius: 16px; padding: 16px 18px; display: grid; gap: 4px; }
header.top h1 { font-family: var(--display); font-size: 30px; line-height: 1; margin: 0; letter-spacing: .3px; text-wrap: balance; }
header.top p { margin: 0; color: #c3cbe0; font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 14px; }
h2 { font-family: var(--display); font-size: 22px; margin: 0; letter-spacing: .2px; }
.muted { color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
button, .btn { font: 700 15px var(--body); border-radius: 10px; border: 1px solid var(--line); background: var(--chip); color: var(--ink); padding: 10px 14px; cursor: pointer; }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: #2a1600; }
button.danger { color: var(--warn); background: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, .btn:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: .5; cursor: default; }
.upload { position: relative; display: grid; place-items: center; text-align: center; gap: 4px; border: 2px dashed var(--accent); border-radius: 12px; padding: 18px 12px; background: color-mix(in srgb, var(--accent) 8%, transparent); cursor: pointer; }
.upload strong { font-size: 17px; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.status { font-size: 14px; color: var(--muted); min-height: 1.2em; }
.status.err { color: var(--warn); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.grid .full { grid-column: 1 / -1; }
.iv3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
label.f { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
input, select { font: 400 16px var(--body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; width: 100%; min-width: 0; }
input[type="number"] { font-variant-numeric: tabular-nums; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--chip); color: var(--ink); white-space: nowrap; }
.chip.t { color: #fff; }
.chip.xxl { background: var(--accent); color: #2a1600; }
.chip.buddy { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.scorebox { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; background: var(--night); color: #f4f6fb; border-radius: 12px; padding: 14px 16px; }
.big { font-family: var(--display); font-size: 52px; line-height: .9; font-variant-numeric: tabular-nums; }
.range { font-size: 13px; color: #c3cbe0; }
.bars { display: grid; gap: 5px; font-size: 12px; }
.bar { display: grid; grid-template-columns: 52px 1fr 54px; gap: 8px; align-items: center; font-variant-numeric: tabular-nums; }
.bar .track { height: 8px; background: rgba(255,255,255,.14); border-radius: 4px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--accent); border-radius: 4px; }
.elig { font-size: 14px; }
.elig b { font-weight: 700; }
.list { display: grid; gap: 8px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-weight: 400; }
.item .name { font-weight: 700; font-size: 16px; }
.item .meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.item .pts { grid-row: 1 / span 3; grid-column: 2; font-family: var(--display); font-size: 30px; text-align: right; font-variant-numeric: tabular-nums; }
.item .pts small { display: block; font-family: var(--body); font-size: 11px; color: var(--muted); font-weight: 600; }
.item.example { border-style: dashed; }
.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.filters button { padding: 6px 11px; font-size: 13px; border-radius: 999px; white-space: nowrap; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.thumbs { display: flex; gap: 8px; }
.thumbs img { height: 72px; border-radius: 6px; border: 1px solid var(--line); }
.hidden { display: none !important; }
details summary { cursor: pointer; font-weight: 700; }
details p { margin: 8px 0 0; font-size: 14px; color: var(--muted); max-width: 65ch; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.radio { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.radio input { width: auto; margin-top: 4px; }
.consent { border: 1px solid var(--accent); border-radius: 10px; padding: 12px; display: grid; gap: 10px; font-size: 14px; }
textarea { font: 400 16px var(--body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; width: 100%; resize: vertical; }
button.linkish { background: none; border: none; padding: 4px 0; color: var(--accent-ink); text-decoration: underline; font-weight: 600; font-size: inherit; justify-self: start; }
footer.fine { font-size: 12px; color: var(--muted); text-align: center; max-width: 65ch; margin: 0 auto; }
.btn input[type="file"] { display: none; }

input.check, select.check { border-color: var(--warn); box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 35%, transparent); }
.chip.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.chip.ok { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
