:root {
  /* Red and white. The palette slots are deliberately named for their job
     rather than a colour, so a theme swap only touches this block plus the map
     ramp below. The previous warm palette is kept in themes/warm.css. */
  --paper: #f8f6f6;          /* page behind the cards */
  --card: #ffffff;
  --ink: #1a1414;
  --ink-soft: #5b5252;
  --ink-faint: #8d8484;
  --rule: #e7dfdf;
  --accent: #c1121f;         /* the red everything keys off */
  --accent-soft: #fdecee;
  --tint: #e0555c;           /* lighter red, for bar fills */
  --contrast: #6b6470;       /* slate, for "below the group" bars */
  --ok: #2f7d4f;             /* the one green: "saved" feedback only */
  --on-accent: #ffffff;      /* text on a red background */
  --radius: 10px;
  --shadow: 0 1px 2px rgba(26, 20, 20, .06), 0 6px 18px rgba(26, 20, 20, .07);

  /* One ramp, white through to red, used by both the map and its legend so the
     two can never drift apart. */
  --map-0: #e8e6ea;          /* neutral: nothing read from here */
  --map-1: color-mix(in srgb, var(--accent) 22%, var(--card));
  --map-2: color-mix(in srgb, var(--accent) 38%, var(--card));
  --map-3: color-mix(in srgb, var(--accent) 55%, var(--card));
  --map-4: color-mix(in srgb, var(--accent) 74%, var(--card));
  --map-5: var(--accent);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Same identity, dark ground — so a phone set to dark mode doesn't get a
       glaring white page. */
    --paper: #141011;
    --card: #1e1819;
    --ink: #f2eaea;
    --ink-soft: #b9adad;
    --ink-faint: #8d8484;
    --rule: #3a2e30;
    --accent: #f0555f;
    --accent-soft: #3a1e21;
    --tint: #c9424b;
    --contrast: #9a8f9c;
    --ok: #6fbf90;
    /* The dark-mode red is lighter, so white text on it is hard to read. */
    --on-accent: #1a1010;
    --map-0: #2b2930;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, var(--card), var(--paper));
  padding: 26px 0 18px;
  margin-bottom: 26px;
}
h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -.01em;
}
.tagline { margin: 4px 0 18px; color: var(--ink-soft); font-size: .95rem; }

.controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.field.grow { flex: 1 1 260px; }
.label {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: .7rem; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-faint);
}
input[type="search"], input[type="text"], select {
  font: inherit; font-size: .95rem;
  padding: 9px 11px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  width: 100%;
}
input:focus-visible, select:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.toggles {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  margin-top: 14px;
  font-family: system-ui, -apple-system, sans-serif; font-size: .85rem;
  color: var(--ink-soft);
}
.toggles label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
#add-book-btn { margin-left: auto; }

button {
  font: inherit; cursor: pointer; border-radius: 8px; padding: 9px 15px;
  font-family: system-ui, -apple-system, sans-serif; font-size: .88rem; font-weight: 600;
}
.btn-primary { background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); }
.btn-secondary { background: var(--card); color: var(--ink); border: 1px solid var(--rule); }
button:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- grid ---------- */
.result-count {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: .8rem; color: var(--ink-faint); margin: 0 0 12px;
}
/* ---------- list ---------- */
:root { --cols: 36px minmax(0, 1fr) 96px 62px 84px minmax(0, 150px) 78px; }

.list {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 40px;
}
.list-head {
  display: grid; grid-template-columns: var(--cols); gap: 14px; align-items: center;
  padding: 9px 16px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: .68rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-faint);
}
.list-head .num { text-align: right; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li + li { border-top: 1px solid var(--rule); }

.row {
  display: grid; grid-template-columns: var(--cols); gap: 14px; align-items: center;
  width: 100%; padding: 9px 16px;
  cursor: pointer; color: inherit;
}
.row:hover { background: var(--accent-soft); }

/* The title is a real button so it's keyboard reachable; a quick-score input
   can then live in the same row (an input inside a <button> would be invalid). */
.row-open {
  background: none; border: none; padding: 0; margin: 0; border-radius: 0;
  font: inherit; font-weight: 400; text-align: left; color: inherit;
  cursor: pointer; min-width: 0; display: block;
}
.quick-score {
  width: 100%; max-width: 62px; padding: 4px 6px; text-align: center;
  font-family: system-ui, sans-serif; font-size: .92rem; font-weight: 700;
  border: 1px solid var(--tint); border-radius: 6px;
  background: var(--card); color: var(--ink);
}
.quick-mode .row { background: linear-gradient(90deg, transparent, transparent); }
.row-cover {
  width: 30px; height: 44px; object-fit: cover; border-radius: 3px;
  border: 1px solid var(--rule); background: var(--accent-soft);
  display: grid; place-items: center; font-size: .9rem;
}
.row-title { min-width: 0; }
.row-title strong { display: block; font-size: .97rem; line-height: 1.3; }
.row-title span {
  display: block; color: var(--ink-soft); font-size: .82rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-cell {
  font-family: system-ui, -apple-system, sans-serif; font-size: .8rem;
  color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-cell.num { text-align: right; font-variant-numeric: tabular-nums; }
.row-score { font-weight: 700; color: var(--ok); }
.row-score.none { color: var(--ink-faint); font-weight: 400; }
.row-awards {
  color: var(--tint); font-size: .78rem; font-family: system-ui, sans-serif;
  display: flex; gap: 8px; align-items: center;
}
.row-awards .author-award { color: var(--ink-faint); }
.awards.author-awards li { color: var(--ink-soft); }
.legend { display: inline-flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }

@media (max-width: 780px) {
  :root { --cols: 30px minmax(0, 1fr) 56px 60px; }
  .list-head span:nth-child(3),
  .list-head span:nth-child(5),
  .list-head span:nth-child(6),
  .row > :nth-child(3),
  .row > :nth-child(5),
  .row > :nth-child(6) { display: none; }
}

.cover {
  flex: 0 0 62px; width: 62px; height: 94px;
  border-radius: 5px; object-fit: cover;
  background: var(--accent-soft);
  border: 1px solid var(--rule);
}
.cover-none {
  display: grid; place-items: center;
  font-family: system-ui, sans-serif; font-size: 1.5rem; color: var(--ink-faint);
}
.card-main { min-width: 0; flex: 1; }
.card h3 {
  margin: 0 0 2px; font-size: 1.02rem; line-height: 1.25;
}
.card .by { margin: 0 0 8px; color: var(--ink-soft); font-size: .87rem; }
.meta-row {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-family: system-ui, -apple-system, sans-serif; font-size: .72rem;
}
.chip {
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 2px 8px; color: var(--ink-soft); white-space: nowrap;
}
.chip-score { border-color: var(--ok); color: var(--ok); font-weight: 700; }
.chip-award { border-color: var(--tint); color: var(--tint); }
.chip-pick { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

/* ---------- dialog ---------- */
.sheet {
  border: none; border-radius: 14px; padding: 26px;
  max-width: 660px; width: calc(100% - 32px);
  background: var(--card); color: var(--ink);
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.sheet::backdrop { background: rgba(20,18,16,.55); backdrop-filter: blur(2px); }
.close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; font-size: 1.6rem; line-height: 1;
  color: var(--ink-faint); padding: 4px 8px;
}
.sheet h2 { margin: 0 0 4px; font-size: 1.5rem; }
.sheet .by { margin: 0 0 16px; color: var(--ink-soft); }
.hint { color: var(--ink-faint); font-size: .85rem; font-family: system-ui, sans-serif; }

.detail-head { display: flex; gap: 18px; margin-bottom: 18px; }
.detail-head .cover { flex: 0 0 96px; width: 96px; height: 144px; }

dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 18px; font-size: .92rem; }
dl.facts dt { color: var(--ink-faint); font-family: system-ui, sans-serif; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding-top: 3px; }
dl.facts dd { margin: 0; }

.scores { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.scores li {
  border: 1px solid var(--rule); border-radius: 8px; padding: 6px 8px;
  font-family: system-ui, sans-serif; font-size: .78rem; text-align: center;
}
.scores .who { display: block; color: var(--ink-faint); font-size: .7rem; }
.scores .val { font-size: 1.05rem; font-weight: 700; }
.scores .none { color: var(--ink-faint); font-weight: 400; font-size: .95rem; }

.awards { margin: 0 0 18px; padding-left: 18px; }
.awards li { margin-bottom: 3px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.links a {
  font-family: system-ui, sans-serif; font-size: .82rem; font-weight: 600;
  text-decoration: none; color: var(--accent);
  border: 1px solid var(--rule); border-radius: 999px; padding: 6px 13px;
}
.links a:hover { background: var(--accent-soft); }

/* ---------- add form ---------- */
.add-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.scores-input { border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; }
.scores-input legend { font-family: system-ui, sans-serif; font-size: .8rem; font-weight: 600; padding: 0 6px; }
.score-inputs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.score-inputs label { display: flex; flex-direction: column; gap: 2px; font-family: system-ui, sans-serif; font-size: .72rem; color: var(--ink-faint); }
.score-inputs input { padding: 6px 8px; font-size: .9rem; }
.add-actions { display: flex; gap: 10px; }
.lookup-result { margin-top: 16px; padding: 14px; border: 1px solid var(--rule); border-radius: 10px; font-size: .9rem; background: var(--paper); }
.lookup-result .ok { color: var(--ok); font-weight: 700; }
.lookup-result .warn { color: var(--tint); font-weight: 700; }
.download-note { margin-top: 16px; padding: 14px; border: 1px dashed var(--tint); border-radius: 10px; font-size: .88rem; }
.download-note p { margin: 0 0 10px; }

/* ---------- Google Books candidate picker ---------- */
.candidates { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.candidates .label { display: block; margin-bottom: 2px; }
.candidate {
  display: flex; gap: 12px; align-items: center; text-align: left;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 10px;
  padding: 10px; font-family: inherit; font-weight: 400; width: 100%;
}
.candidate:hover { border-color: var(--accent); }
.candidate.chosen { border-color: var(--accent); background: var(--accent-soft); }
.cand-cover {
  flex: 0 0 44px; width: 44px; height: 66px; object-fit: cover;
  border-radius: 4px; border: 1px solid var(--rule); background: var(--accent-soft);
  display: grid; place-items: center; font-size: 1.2rem;
}
.cand-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cand-main strong { font-size: .95rem; line-height: 1.25; }
.cand-meta { font-family: system-ui, sans-serif; font-size: .74rem; color: var(--ink-faint); }

/* ---------- unsaved-changes bar ---------- */
.unsaved {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  margin: 0 auto 18px; padding: 11px 16px;
  border: 1px solid var(--tint); border-radius: var(--radius);
  background: var(--accent-soft);
  font-family: system-ui, -apple-system, sans-serif; font-size: .86rem;
}
.unsaved span { flex: 1; min-width: 200px; }

/* ---------- editable scores ---------- */
.score-edit .scores li { padding: 5px 6px; }
.score-edit .scores label { display: flex; flex-direction: column; gap: 3px; cursor: text; }
.score-edit .scores input {
  width: 100%; padding: 4px 6px; text-align: center;
  font-size: 1rem; font-weight: 700; font-family: system-ui, sans-serif;
  border: 1px solid var(--rule); border-radius: 6px;
  background: var(--paper); color: var(--ink);
}
.score-edit .scores input::placeholder { font-weight: 400; color: var(--ink-faint); }
.score-actions { display: flex; gap: 12px; align-items: center; margin: 0 0 18px; }
.edit-row { margin-bottom: 12px; max-width: 260px; }
.edit-row label { display: flex; flex-direction: column; gap: 4px; }

details.scores-input > summary {
  cursor: pointer; font-family: system-ui, sans-serif; font-size: .85rem; font-weight: 600;
}
details.scores-input[open] > summary { margin-bottom: 10px; }

.empty { color: var(--ink-soft); text-align: center; padding: 40px 0; }
.site-footer { border-top: 1px solid var(--rule); padding: 20px 20px 40px; color: var(--ink-faint); font-size: .8rem; font-family: system-ui, sans-serif; }
.site-footer a { color: var(--accent); }

@media (max-width: 560px) {
  .add-grid { grid-template-columns: 1fr; }
  #add-book-btn { margin-left: 0; }
}

.more-awards > summary {
  cursor: pointer; font-family: system-ui, sans-serif; font-size: .82rem;
  color: var(--accent); margin-bottom: 6px;
}

/* The hidden attribute is enforced by the browser as [hidden] { display: none },
   which has the same specificity as a class selector — so any .foo { display: flex }
   silently beats it. .unsaved and .candidates both did, leaving the "unsaved
   changes" bar on screen permanently. Settle it once, here. */
[hidden] { display: none !important; }

/* ---------------------------------------------- sign-in, toasts, read-only */

.title-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}

.account {
  display: flex; align-items: center; gap: 12px;
  font-family: system-ui, sans-serif; font-size: .85rem;
}
.account .who-am-i { color: var(--ink-soft); }
.account .btn-primary {
  padding: 7px 14px; border-radius: 8px; text-decoration: none;
  font-weight: 600; font-size: .85rem;
}
.btn-link { color: var(--ink-faint); text-decoration: underline; }
.btn-link:hover { color: var(--accent); }

/* A reader who isn't signed in shouldn't see controls that can't work. */
.read-only .score-edit,
.read-only [data-save-scores] { display: none; }

.scores.read-only li { background: transparent; }
.scores.read-only .num { font-size: 1.05rem; font-weight: 700; }
.scores.read-only .num:not(:empty) { display: block; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 50; max-width: min(520px, calc(100vw - 32px));
  padding: 11px 18px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-family: system-ui, sans-serif; font-size: .87rem; font-weight: 500;
  box-shadow: var(--shadow);
}
.toast.bad { background: var(--accent); color: var(--on-accent); }

/* Saving a score straight from the list: green flash on success, red if the
   server refused it, so nobody types 40 scores into a void. */
.quick-score.saved { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.quick-score.bad { border-color: var(--accent); background: var(--accent-soft); }

.sheet.narrow { max-width: 420px; }

/* ----------------------------------------------------------- club stats */

.views { display: flex; gap: 4px; margin: 0 0 14px; }
.view-tab {
  font: inherit; font-family: system-ui, sans-serif; font-size: .85rem; font-weight: 600;
  padding: 7px 15px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink-soft); border: 1px solid transparent;
}
.view-tab:hover { color: var(--ink); }
.view-tab.is-on {
  background: var(--card); color: var(--ink);
  border-color: var(--rule); box-shadow: var(--shadow);
}

.stat-headline {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px; margin: 4px 0 22px;
}
.stat-headline > div {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.stat-headline strong { display: block; font-size: 1.12rem; line-height: 1.25; }
.stat-headline span {
  display: block; margin-top: 4px; color: var(--ink-soft);
  font-family: system-ui, sans-serif; font-size: .8rem;
}

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 18px;
}
.stat-card {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 18px 20px 20px; box-shadow: var(--shadow);
}
.stat-card h3 { margin: 0 0 2px; font-size: 1.02rem; }
.stat-card .hint { margin: 0 0 12px; }

.stat-rows { list-style: none; margin: 10px 0 0; padding: 0; }

/* Two columns: a label that truncates, and a bar block that owns its own space.
   Nothing is sized as a share of "whatever's left", which is what let long
   titles and long notes squeeze the bars into each other. */
.stat-rows li {
  display: grid; grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr);
  align-items: center; gap: 4px 12px; padding: 6px 0; font-size: .88rem;
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 45%, transparent);
}
.stat-rows li:last-child { border-bottom: 0; }
.stat-rows.plain li { grid-template-columns: minmax(0, 1fr) auto; }
.stat-rows li.divider {
  display: block; height: 1px; background: var(--rule); margin: 8px 0;
  padding: 0; border: 0;
}

.stat-label { min-width: 0; }
.stat-name {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stat-sub {
  display: block; color: var(--ink-faint); font-family: system-ui, sans-serif;
  font-size: .72rem; line-height: 1.3;
}
.stat-note {
  color: var(--ink-faint); font-family: system-ui, sans-serif; font-size: .78rem;
  text-align: right; font-variant-numeric: tabular-nums;
}
.stat-note.good { color: var(--accent); font-weight: 600; }

/* The bar gets a track that fills its column and the number a fixed column, so
   neither can push the other out. */
.stat-bar {
  display: grid; grid-template-columns: minmax(0, 1fr) 3.1rem;
  align-items: center; gap: 9px; min-width: 0;
}
.stat-bar .track {
  height: 8px; border-radius: 999px; overflow: hidden;
  background: color-mix(in srgb, var(--rule) 60%, transparent);
}
.stat-bar .fill {
  display: block; height: 100%; width: var(--w); border-radius: 999px;
  background: var(--tint);
}
.stat-bar.cold .fill { background: var(--contrast); }
.stat-bar.warm .fill { background: var(--accent); }
.stat-bar .value {
  font-family: system-ui, sans-serif; font-size: .76rem; color: var(--ink-soft);
  font-variant-numeric: tabular-nums; text-align: right;
}

@media (max-width: 620px) {
  .stat-grid { grid-template-columns: 1fr; }
  .stat-rows li { grid-template-columns: minmax(0, 7rem) minmax(0, 1fr); }
  .stat-bar { grid-template-columns: minmax(0, 1fr) 2.8rem; gap: 7px; }
}

/* ------------------------------------------------------------- world map */

.map-wrap {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 10px; box-shadow: var(--shadow); margin: 0 0 12px; overflow: hidden;
}
.worldmap { display: block; width: 100%; height: auto; }

/* Six bands: c0 is "not read from", c1..c5 deepen with the count. Colours come
   from the theme variables so dark mode follows automatically. */
/* White through to red, straight off the shared ramp. */
.worldmap .c { stroke: var(--card); stroke-width: .5; fill: var(--map-0); }
.worldmap .c0 { fill: var(--map-0); }
.worldmap .c1 { fill: var(--map-1); }
.worldmap .c2 { fill: var(--map-2); }
.worldmap .c3 { fill: var(--map-3); }
.worldmap .c4 { fill: var(--map-4); }
.worldmap .c5 { fill: var(--map-5); }
.worldmap [data-country] { cursor: pointer; }
.worldmap [data-country]:hover,
.worldmap [data-country]:focus { stroke: var(--ink); stroke-width: 1; outline: none; }

.map-legend {
  display: flex; align-items: center; gap: 7px; margin: 0 0 20px;
  font-family: system-ui, sans-serif; font-size: .78rem; color: var(--ink-faint);
  flex-wrap: wrap;
}
.map-legend .key {
  width: 26px; height: 11px; border-radius: 3px; display: inline-block;
}
.map-legend .key.c1 { background: var(--map-1); }
.map-legend .key.c2 { background: var(--map-2); }
.map-legend .key.c3 { background: var(--map-3); }
.map-legend .key.c4 { background: var(--map-4); }
.map-legend .key.c5 { background: var(--map-5); }
.map-legend .hint { margin-left: auto; }

/* --------------------------------------------------- notes and stat flags */

.note-edit { display: block; margin: 0 0 14px; }
.note-edit textarea {
  width: 100%; box-sizing: border-box; margin-top: 5px;
  font: inherit; font-size: .92rem; line-height: 1.5; resize: vertical;
  padding: 9px 11px; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--paper); color: var(--ink);
}
.note-edit textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.book-note {
  white-space: pre-wrap; margin: 4px 0 16px; padding: 12px 14px;
  background: var(--accent-soft); border-radius: 8px; font-size: .95rem;
}

.flag-edit {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 9px;
  align-items: start; margin: 0 0 16px; font-family: system-ui, sans-serif;
  font-size: .85rem;
}
.flag-edit input { margin-top: 3px; }
.flag-edit .hint { grid-column: 2; }


/* -------------------------------------------------- finding a cover by hand */

.cover-find { margin: 0 0 16px; }
.cover-find-row { display: flex; gap: 8px; margin: 5px 0 0; flex-wrap: wrap; }
.cover-find-row button { white-space: nowrap; }
.cover-find-row input {
  flex: 1; min-width: 180px; font: inherit; font-size: .88rem;
  padding: 7px 10px; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--paper); color: var(--ink);
}

.cover-candidates {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px; margin: 10px 0 0;
}
.cover-candidates .hint { grid-column: 1 / -1; margin: 2px 0 0; }

.cover-pick {
  display: flex; flex-direction: column; gap: 3px; align-items: stretch;
  padding: 6px; cursor: pointer; text-align: left; font: inherit;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 8px;
}
.cover-pick img {
  width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px;
  background: var(--rule);
}
.cover-pick span { font-size: .72rem; line-height: 1.25; }
.cover-pick:hover { border-color: var(--accent); }
.cover-pick.chosen {
  border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft);
}

.map-readout {
  min-height: 3.2em; margin: 0 0 12px; padding: 10px 13px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 8px;
  font-family: system-ui, sans-serif; font-size: .85rem; line-height: 1.45;
}
.map-readout .btn-link {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  font-size: .8rem;
}
.worldmap .c { cursor: default; }
.worldmap [data-name]:hover { stroke: var(--ink); stroke-width: 1; }
