:root {
  --ink: #efe4c6;
  --ink-dim: #b9ab88;
  --gold: #c9a45c;
  --gold-bright: #ecd08e;
  --reference: #f39b7f; /* the legend's reference tick (a legal limit): apart from the gold of Spain's */
  --panel: rgba(16, 25, 35, 0.98);
  --panel-2: rgba(28, 41, 56, 0.98);
  --line: rgba(201, 164, 92, 0.55);
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, "Segoe UI", system-ui, sans-serif;
  --topbar-h: 40px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0d2a47; color: var(--ink); font-family: var(--sans); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--ink-dim); }
svg.icon { display: inline-block; flex: none; }
.emoji { display: inline-block; line-height: 1; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }

#map { position: fixed; inset: 0; width: 100%; height: 100%; cursor: grab; display: block; touch-action: none; }
#map.dragging { cursor: grabbing; }
#map:focus { outline: none; }
#map.key-nav:focus { outline: 2px solid var(--gold-bright); outline-offset: -2px; } /* focus from the keyboard (main.js) */
.map-main { display: contents; } /* the main landmark around the map (pipeline/site.py), no box of its own */

.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 8px 24px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,235,190,.08);
  border-radius: 6px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.icon-btn {
  display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; cursor: pointer;
  background: rgba(0,0,0,.3); border: 1px solid rgba(201,164,92,.45); border-radius: 50%; color: var(--ink-dim);
}
.icon-btn:hover { color: var(--gold-bright); border-color: var(--gold); }

/* ---------- top bar ---------- */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h); z-index: 10;
  display: flex; align-items: center; --tb-gap: 16px; gap: var(--tb-gap); padding: 0 12px;
  background: linear-gradient(180deg, #24364a, #131e2a);
  border-bottom: 1px solid var(--gold);
  box-shadow: 0 2px 10px rgba(0,0,0,.5), inset 0 -3px 0 rgba(0,0,0,.25);
  font-variant-numeric: tabular-nums;
}
.brand { font-family: var(--serif); font-weight: bold; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-bright); white-space: nowrap; display: flex; align-items: center; flex: none; }
.brand-emblem { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #2a4d8f; border: 1px solid var(--gold); color: #fff; font-size: 13px; margin-right: 6px; box-shadow: 0 0 0 2px rgba(0,0,0,.4); }
/* A country's own emblem (pipeline/emblem.py): an image that carries its edge, in place of the star. */
.brand-emblem.brand-img { width: 26px; height: 26px; border: 0; border-radius: 0; background: none; box-shadow: none; }
.yields { display: flex; gap: 14px; flex: none; }
.yield {
  position: relative; display: flex; align-items: center; gap: 5px; font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer; border-radius: 4px;
  background: none; border: 1px solid transparent; padding: 2px 4px; margin: 0 -5px; line-height: 20px; font-variant-numeric: tabular-nums;
}
.yield .ico { display: inline-flex; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
/* The caret sits over the button's bottom padding (out of the flex flow), so the bar is exactly as wide as before. */
.yield .caret { position: absolute; left: 50%; bottom: 0; margin-left: -3.5px; width: 0; height: 0; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-top: 3px solid var(--gold); opacity: .45; transition: transform .15s, opacity .15s; pointer-events: none; }
.yield:hover { background: rgba(201,164,92,.12); border-color: rgba(201,164,92,.35); }
.yield:hover .caret { opacity: 1; }
.yield.open { background: linear-gradient(180deg, rgba(90,74,36,.85), rgba(58,47,21,.85)); border-color: var(--gold-bright); }
.yield.open .caret { opacity: 1; transform: rotate(180deg); border-top-color: var(--gold-bright); }
.spacer { flex: 1; min-width: 0; }
.turn { font-family: var(--serif); color: var(--ink-dim); font-size: 13px; white-space: nowrap; flex: none; }
.turn b { color: var(--gold-bright); }
.tb-buttons { display: flex; gap: 6px; flex: none; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none;
  background: linear-gradient(180deg, #3a5068, #223244); border: 1px solid var(--gold); border-radius: 4px;
  padding: 4px 10px; cursor: pointer; font-family: var(--serif); font-size: 13px; color: var(--gold-bright); line-height: 18px;
  box-shadow: inset 0 1px 0 rgba(255,235,190,.15), 0 1px 2px rgba(0,0,0,.5);
}
.btn:hover { background: linear-gradient(180deg, #4a6584, #2b4057); }
.btn[aria-expanded="true"] { background: linear-gradient(180deg, #5a4a24, #3a2f15); }
.btn-icon { padding: 4px 7px; }
.btn-lang { font-size: 11px; letter-spacing: .06em; min-width: 28px; justify-content: center; } /* ext/lang */

/* search */
.search { position: relative; display: flex; align-items: center; flex: 0 1 230px; min-width: 150px; }
.search-ic { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); color: var(--ink-dim); display: inline-flex; pointer-events: none; }
#search-input {
  width: 100%; height: 28px; padding: 0 34px 0 28px; border-radius: 14px; text-overflow: ellipsis; font: 13px var(--sans); color: var(--ink);
  background: rgba(0,0,0,.35); border: 1px solid rgba(201,164,92,.5); outline: none;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.5);
}
#search-input::placeholder { color: rgba(185,171,136,.75); }
#search-input:focus { border-color: var(--gold-bright); background: rgba(0,0,0,.5); }
#search-input::-webkit-search-cancel-button { display: none; }
.search-kbd { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); pointer-events: none; }
#search-input:focus ~ .search-kbd { display: none; }
kbd {
  display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 3px; font: 11px/16px var(--sans); text-align: center;
  color: var(--gold-bright); background: rgba(255,235,190,.08); border: 1px solid rgba(201,164,92,.5); border-bottom-width: 2px;
}
.search-results { position: fixed; z-index: 40; max-height: min(420px, 70vh); overflow-y: auto; padding: 4px; }
.sr-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.sr-item.sel { background: linear-gradient(90deg, rgba(201,164,92,.28), rgba(201,164,92,.08)); }
.sr-ic { color: var(--gold); display: inline-flex; }
.sr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sr-main b { font-family: var(--serif); color: var(--gold-bright); font-weight: normal; font-size: 14px; }
.sr-sub { color: var(--ink-dim); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-pop { color: var(--ink-dim); font-variant-numeric: tabular-nums; font-size: 12px; }
.sr-empty { padding: 10px; color: var(--ink-dim); font-size: 13px; }

/* share popover + toast */
.share-pop { position: fixed; z-index: 40; width: 250px; padding: 8px; }
.sp-title { font-family: var(--serif); color: var(--gold); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; padding: 2px 6px 6px; }
.sp-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px; border-radius: 4px; cursor: pointer; background: none; border: 1px solid transparent; color: var(--ink); font-size: 13px; }
.sp-item svg { color: var(--gold-bright); }
.sp-item:hover, .sp-item:focus-visible { background: rgba(201,164,92,.15); border-color: rgba(201,164,92,.35); }
.sp-item .muted { font-size: 11px; margin-left: 4px; }
.sp-status { font-size: 12px; color: var(--ink-dim); padding: 4px 8px 0; min-height: 0; }
.sp-status:empty { display: none; }
.sp-url { width: 100%; margin-top: 6px; font: 12px var(--sans); padding: 5px; color: var(--ink); background: rgba(0,0,0,.4); border: 1px solid var(--line); border-radius: 3px; }
.toast {
  position: fixed; top: 54px; left: 50%; transform: translateX(-50%); z-index: 45; padding: 7px 14px; border-radius: 16px;
  background: rgba(16,25,35,.96); border: 1px solid var(--gold); color: var(--gold-bright); font: 13px var(--serif); letter-spacing: .04em;
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
}

/* ---------- top-bar reports (ui/yieldReport.js) ---------- */
.yield-report {
  --yc: var(--gold-bright);
  position: fixed; z-index: 28; width: 450px; max-width: calc(100vw - 16px); max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px);
  overflow-y: auto; overscroll-behavior: contain; padding: 0 0 12px; outline: none;
  border: 1px solid var(--gold); border-top: 3px solid var(--gold);
  box-shadow: 0 0 0 1px rgba(0,0,0,.7), inset 0 0 0 1px rgba(255,235,190,.07), 0 14px 34px rgba(0,0,0,.6);
}
.yr-head { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,235,190,.07), transparent); }
.yr-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--yc), transparent 70%); opacity: .7; }
.yr-ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 50% 35%, #2a3c52, #121b26); border: 2px solid var(--gold); box-shadow: 0 0 0 1px #120d06, inset 0 0 6px rgba(0,0,0,.6); }
.yr-ic svg, .yr-ic .emoji { filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.yr-titles { flex: 1; min-width: 0; }
.yr-kind { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.yr-head h2 { margin: 0; font: normal 21px var(--serif); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-bright); line-height: 1.15; }
.yr-close { flex: none; align-self: flex-start; }
.yr-total { padding: 10px 16px 2px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.yr-total > b { font: bold 34px/1 var(--serif); letter-spacing: .02em; text-shadow: 0 2px 3px rgba(0,0,0,.6); font-variant-numeric: tabular-nums; }
.yr-ctx { list-style: none; margin: 0; padding: 0; font-size: 12px; color: var(--ink); line-height: 1.5; flex: 1; min-width: 180px; }
.yr-ctx li::before { content: "◆"; color: var(--gold); font-size: 8px; margin-right: 6px; vertical-align: 2px; }
.yr-def { margin: 8px 16px 2px; font-size: 12px; line-height: 1.45; color: var(--ink-dim); }
.yr-src { margin: 2px 16px 0; font-size: 11px; color: var(--gold); font-style: italic; }
.yr-sec { padding: 10px 16px 0; }
.yr-sec h3 {
  margin: 4px 0 8px; font-family: var(--serif); font-weight: normal; font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: 8px;
}
.yr-sec h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.yr-sec h4 { margin: 8px 0 4px; font: normal 10.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); }
.yr-note { margin: -4px 0 6px; font-size: 11px; color: var(--ink-dim); }
.yr-note:empty { display: none; }
.yr-bar { display: grid; grid-template-columns: 20px 1fr auto; gap: 1px 7px; align-items: center; font-size: 12px; margin-bottom: 5px; }
.yr-bar.noic { grid-template-columns: 1fr auto; }
.yr-bar.noic .yr-track { grid-column: 1 / 3; }
.yr-bic { display: inline-flex; color: var(--gold-bright); }
.yr-bl { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.yr-bl .muted { font-size: 11px; white-space: nowrap; }
.yr-bv { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.yr-bar.strong .yr-bl { color: var(--gold-bright); font-family: var(--serif); font-size: 13px; }
.yr-track { grid-column: 2 / 4; height: 5px; background: rgba(255,255,255,.07); border-radius: 3px; overflow: hidden; }
.yr-track i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--yc) 70%, #000), var(--yc)); }
.yr-track i.good { background: #7fbf3f; }
.yr-track i.bad { background: #e0704f; }
.yr-more { margin: 2px 0 0 27px; padding: 2px 0; background: none; border: none; color: var(--gold-bright); font-size: 12px; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.yr-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.yr-tabs, .yr-modes { display: inline-flex; border: 1px solid rgba(201,164,92,.5); border-radius: 4px; overflow: hidden; background: rgba(0,0,0,.25); }
.yr-tabs button, .yr-modes button { background: none; border: none; padding: 4px 10px; font-size: 12px; cursor: pointer; color: var(--ink-dim); white-space: nowrap; }
.yr-tabs button + button, .yr-modes button + button { border-left: 1px solid rgba(201,164,92,.35); }
.yr-tabs button { font-family: var(--serif); letter-spacing: .08em; text-transform: uppercase; font-size: 11.5px; }
.yr-tabs button:hover:not([disabled]), .yr-modes button:hover { color: var(--gold-bright); background: rgba(201,164,92,.12); }
.yr-tabs button[aria-selected="true"], .yr-modes button[aria-pressed="true"] { color: var(--gold-bright); background: linear-gradient(180deg, #5a4a24, #3a2f15); }
.yr-tabs button[disabled] { opacity: .4; cursor: default; }
.yr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.yr-row {
  display: grid; grid-template-columns: 20px 1fr auto; gap: 2px 8px; align-items: center; width: 100%; text-align: left; cursor: pointer;
  padding: 5px 8px 6px; border-radius: 4px; background: rgba(0,0,0,.22); border: 1px solid rgba(201,164,92,.2); font-size: 13px;
}
.yr-row:hover, .yr-row:focus-visible { border-color: var(--gold); background: rgba(201,164,92,.12); }
.yr-row .yr-track { height: 3px; }
.yr-rk { grid-row: 1 / 3; align-self: center; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font: bold 11px var(--serif); color: #1a1408; background: radial-gradient(circle at 50% 35%, var(--gold-bright), var(--gold)); }
.yr-nm { font-family: var(--serif); color: var(--gold-bright); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.yr-nm .muted { font-family: var(--sans); font-size: 11px; }
.yr-v { font-variant-numeric: tabular-nums; font-weight: 600; }
.yr-empty { font-size: 12px; }
.yr-foot { padding: 12px 16px 0; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.yr-foot .yr-note { margin: 0; flex: 1; min-width: 0; }
#city-panel:focus { outline: none; }

/* ---------- extension hosts (app/api.js: app.ui.dock, app.ui.addTopButton) ---------- */
/* Docks sit flush under the top bar at the screen edge; the map stays full-size underneath and app.visibleArea()
   shrinks instead. --dock-left / --dock-right on <body> hold the visible docks' widths (0px when closed). */
.app-dock {
  position: fixed; top: var(--topbar-h); bottom: 0; width: var(--dock-w, 380px); max-width: calc(100vw - 120px); z-index: 12;
  overflow-y: auto; overscroll-behavior: contain; border-radius: 0; border-top: none;
}
.app-dock-left { left: 0; border-left: none; }
.app-dock-right { right: 0; border-right: none; }
.btn-ext.active, .btn-ext[aria-pressed="true"] { background: linear-gradient(180deg, #5a4a24, #3a2f15); border-color: var(--gold-bright); }
/* Extension buttons cost top-bar room: their labels go first, then (body.tb-ext) the brand text gives way. */
@media (max-width: 1720px) { .btn-ext .lbl { display: none; } .btn-ext { padding: 4px 7px; } body.tb-ext .turn { display: none; } }
@media (max-width: 1320px) and (min-width: 701px) { body.tb-ext .brand-text { display: none; } }
/* A docked dashboard plus the minimap leave the lens dock no room on smaller desktops: drop the minimap. */
/* ---------- the daily game (ext/game), in the left dock ---------- */
.game-dock { padding: 12px 16px 18px; font-size: 13px; line-height: 1.4; }
.gm-head { display: flex; align-items: flex-start; gap: 8px; }
.gm-head h2 { flex: 1; margin: 0; font-family: var(--serif); font-size: 19px; color: var(--gold-bright); font-weight: normal; }
.gm-day { font-size: 13px; color: var(--ink-dim); white-space: nowrap; }
.gm-rules { margin: 6px 0 10px; font-size: 12px; }
.gm-clues, .gm-guesses { list-style: none; margin: 0; padding: 0; }
.gm-clue { border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; margin-bottom: 6px; background: var(--panel-2); }
.gm-clue h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 14px; font-weight: normal; color: var(--gold-bright); }
.gm-clue.locked { opacity: .45; padding: 5px 10px; }
.gm-clue.locked h3 { margin: 0; color: var(--ink-dim); }
.gm-n { color: var(--ink-dim); font-size: 12px; margin-right: 4px; }
.gm-clue dl { margin: 0; display: grid; gap: 2px; }
.gm-clue dl div { display: flex; gap: 8px; justify-content: space-between; }
.gm-clue dt { color: var(--ink-dim); flex: none; max-width: 55%; }
.gm-clue dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.gm-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 10px 0; }
.gm-prompt { margin: 0; color: var(--ink-dim); }
.game-dock .btn[disabled] { opacity: .45; cursor: default; }
.gm-sub { margin: 12px 0 4px; font-family: var(--serif); font-size: 14px; font-weight: normal; color: var(--gold-bright); }
.gm-guesses li { padding: 3px 0; border-bottom: 1px solid rgba(201,164,92,.18); }
.gm-sq { margin-right: 6px; }
.gm-end { margin: 12px 0 4px; padding: 10px 12px; border: 1px solid var(--gold); border-radius: 6px; background: rgba(90,74,36,.25); }
.gm-end p { margin: 0 0 6px; }
.gm-verdict { font-family: var(--serif); font-size: 17px; color: var(--gold-bright); }
.gm-answer { font-size: 15px; }
.gm-share { margin: 8px 0; padding: 8px 10px; background: rgba(0,0,0,.3); border-radius: 4px; font: 12px/1.45 ui-monospace, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.gm-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
/* Five tabs fit the 360 px dock and a 360 px phone in Spanish and English at 12 px, and a 320 px phone at 11 px. The six
   of a map with «Tres ciudades» and the Camino (Spain) do not: 17 to 33 px too wide in the dock and on 360 and 320 px
   phones. A row that does not fit keeps one line and scrolls sideways, and a faded edge shows there is more (gm-more-start/end, set by
   ext/game/index.js). The baseline is an inset shadow, which the selected tab covers inside the scrolling box; the focus
   ring is drawn inside the tab, where the scrolling box does not clip it. */
.gm-tabs { display: flex; gap: 2px; margin: 8px 0 10px; box-shadow: inset 0 -1px var(--line); overflow-x: auto; scrollbar-width: none; }
.gm-tabs.gm-more-end { mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
.gm-tabs.gm-more-start { mask-image: linear-gradient(to left, #000 calc(100% - 32px), transparent); }
.gm-tabs.gm-more-start.gm-more-end { mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.gm-tab { flex: 1 0 auto; padding: 5px 2px; border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0; background: none; color: var(--ink-dim); font: 12px var(--sans); white-space: nowrap; cursor: pointer; }
.gm-tab:focus-visible { outline-offset: -2px; }
@media (max-width: 340px) { .gm-tabs { gap: 0; } .gm-tab { padding: 5px 1px; font-size: 11px; } }
.gm-tab[aria-selected="true"] { color: var(--gold-bright); border-color: var(--line); background: var(--panel-2); }
.gm-tab.done::after { content: " ✓"; color: #4fa85a; } /* a daily over today (dailies.js) */
.gm-album-line, .gm-left { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
/* the advisors' request (ext/game/requestsPanel.js) */
.gm-req-ask { margin: 4px 0 8px; font-family: var(--serif); font-size: 15px; line-height: 1.4; }
.gm-req-conds, .gm-req-tries, .gm-req-try ul { list-style: none; margin: 0; padding: 0; }
.gm-req-cond { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; margin-bottom: 6px; background: var(--panel-2); }
.gm-req-cond > span:first-child { flex: 1 1 100%; overflow-wrap: anywhere; }
.gm-req-src { flex: 1 1 0; min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.gm-req-lens { flex: none; padding: 2px 8px; font-size: 12px; }
.gm-req-hint { flex: none; font-size: 12px; font-style: italic; }
.gm-req-try { padding: 4px 0 6px; border-bottom: 1px solid rgba(201,164,92,.18); }
.gm-req-try p { margin: 0 0 2px; }
.gm-req-try li { display: flex; gap: 6px; font-size: 13px; overflow-wrap: anywhere; }
.gm-req-mark { flex: none; width: 1em; font-weight: bold; }
.gm-req-ok .gm-req-mark { color: #6fc27a; }
.gm-req-no .gm-req-mark { color: #e0705f; }
/* the character who asks (ext/game/caracter.js): their initials as the advisors' voices show them, why, what they say */
.gm-req-who { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; color: var(--gold-bright); font-family: var(--serif); font-size: 14px; overflow-wrap: anywhere; }
.gm-req-wait { min-height: 28px; }
.gm-req-mono { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--gold); background: rgba(201,164,92,.16); font-size: 11px; letter-spacing: .04em; }
.gm-req-why { margin: 0 0 8px; font-size: 12px; }
.gm-req-why > summary { cursor: pointer; color: var(--ink-dim); width: max-content; max-width: 100%; }
.gm-req-why p { margin: 4px 0 0; overflow-wrap: anywhere; }
.gm-req-why a { color: var(--gold-bright); }
.gm-req-say, .pt-say { margin: 4px 0 6px; font-family: var(--serif); font-style: italic; overflow-wrap: anywhere; }
/* the logbook (ext/game/diaryPanel.js) */
.gm-diary-title { margin: 0; font-family: var(--serif); font-size: 16px; font-weight: normal; color: var(--gold-bright); }
.gm-diary-count { margin: 2px 0 6px; }
.gm-diary-days { list-style: none; margin: 8px 0 0; padding: 0; }
.gm-diary-day { border-top: 1px solid rgba(201,164,92,.25); padding: 8px 0 6px; }
.gm-diary-day h4 { margin: 0 0 4px; font-family: var(--serif); font-size: 14px; font-weight: normal; color: var(--gold-bright); }
.gm-diary-day h4::first-letter { text-transform: uppercase; }
.gm-diary-lines { list-style: none; margin: 0; padding: 0; }
.gm-diary-lines li { padding: 2px 0; overflow-wrap: anywhere; }
.gm-diary-place { padding: 0; border: none; background: none; color: var(--gold-bright); font: inherit; text-decoration: underline dotted; text-underline-offset: 2px; cursor: pointer; }
.gm-diary-xp { margin-right: 4px; padding: 0 6px; border: 1px solid var(--gold); border-radius: 9px; background: none; color: var(--gold-bright); font: 12px var(--sans); cursor: pointer; }
.gm-diary-fold { margin: 4px 0 6px; font-size: 12px; color: var(--ink-dim); }
.gm-diary-fold summary { cursor: pointer; }
.gm-diary-fold p { margin: 3px 0 0; }
.gm-diary-undated { border-top: 1px solid rgba(201,164,92,.25); padding-top: 8px; }
.gm-diary-undated h4 { margin: 0 0 4px; font-family: var(--serif); font-size: 14px; font-weight: normal; color: var(--ink-dim); }
.gm-diary-undated p { margin: 0 0 4px; }
/* «Tu España», the logbook's summary, and an earlier day played again as a reto (ext/game/goals.js) */
.gm-yours { margin: 6px 0 8px; padding: 6px 9px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); }
.gm-yours h4 { margin: 0 0 4px; font-family: var(--serif); font-size: 14px; font-weight: normal; color: var(--gold-bright); }
.gm-yours dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; margin: 0; }
.gm-yours dl div { min-width: 0; }
.gm-yours dt { font-size: 11px; color: var(--ink-dim); overflow-wrap: anywhere; }
.gm-yours dd { margin: 0; font-family: var(--serif); font-size: 15px; color: var(--ink); }
.gm-yours p { margin: 6px 0 0; font-size: 12px; }
.gm-reto { margin: 4px 0 8px; padding: 6px 9px; border-left: 2px solid var(--gold); }
.gm-reto p { margin: 0 0 4px; overflow-wrap: anywhere; }
/* the advisors' favor in the request tab (ext/game/requestsPanel.js, favor.js) */
.gm-req-clue { margin: 0 0 8px; padding: 5px 9px; border-left: 2px solid var(--gold); font-style: italic; overflow-wrap: anywhere; }
.gm-favor { margin: 12px 0 4px; }
.gm-favor > summary { cursor: pointer; font-family: var(--serif); font-size: 14px; color: var(--gold-bright); }
.gm-favor p { margin: 6px 0 0; font-size: 12px; }
.gm-favor-rows { list-style: none; margin: 6px 0 0; padding: 0; }
.gm-favor-rows li { padding: 4px 0; border-bottom: 1px solid rgba(201,164,92,.18); font-size: 13px; overflow-wrap: anywhere; }
.gm-favor-rows b { display: block; font-weight: normal; color: var(--gold-bright); }
/* the province album (ext/game/albumPanel.js) */
.al-title { margin: 0; font-family: var(--serif); font-size: 16px; font-weight: normal; color: var(--gold-bright); }
.al-counts { margin: 2px 0 8px; color: var(--ink-dim); }
.al-goal { margin: 0 0 8px; color: var(--gold-bright); overflow-wrap: anywhere; }
.al-map { display: block; width: 100%; height: auto; margin-bottom: 10px; }
.al-comms { list-style: none; margin: 0; padding: 0; }
.al-comm { border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px 7px; margin-bottom: 6px; background: var(--panel-2); }
.al-comm.complete { border-color: var(--gold-bright); box-shadow: inset 0 0 0 1px rgba(236,208,142,.35); }
.al-comm h4 { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 4px; font-family: var(--serif); font-size: 14px; font-weight: normal; }
.al-comm.complete h4 { color: var(--gold-bright); }
.al-of { color: var(--ink-dim); font-family: var(--sans); font-size: 12px; }
.al-bar { height: 3px; margin-bottom: 6px; background: rgba(201,164,92,.18); border-radius: 2px; overflow: hidden; }
.al-bar i { display: block; height: 100%; background: var(--gold); }
.al-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.al-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 2px 7px; border: 1px solid rgba(201,164,92,.5); border-radius: 10px; background: none; color: var(--ink-dim); font: 12px var(--sans); cursor: pointer; overflow-wrap: anywhere; text-align: left; }
.al-chip.got { background: var(--al-c); border-color: var(--al-c); color: var(--al-t); }
.al-clock { flex: none; }
.al-legend { display: flex; align-items: center; gap: 5px; margin: 0 0 8px; font-size: 12px; }
.al-times { font-weight: bold; }
.al-line { margin: 5px 0 0; font-size: 12px; }
.al-note { margin: 6px 0 0; font-size: 12px; }
.al-buttons { margin-top: 10px; }
@media (max-width: 700px) { .game-dock { padding-top: 18px; } }

/* ---------- a lens's panel in the left dock (app/lensPanel.js: the fiesta calendar, the sun lens, the reservoirs, the climate of the month, the timeline) --- */
.lens-panel { padding: 12px 16px 18px; font-size: 13px; line-height: 1.4; }
.lens-panel-head { display: flex; align-items: flex-start; gap: 8px; }
.lens-panel-head h2 { flex: 1; margin: 0; font-family: var(--serif); font-size: 19px; color: var(--gold-bright); font-weight: normal; }
@media (max-width: 700px) { .lens-panel { padding-top: 18px; } }

/* ---------- a card floating over the map without docking, so the visible area does not change: the expedition's
   (ext/expedicion) and «Desde tu última visita» (ext/vuelta), never both at once. Top right under the top bar, left of
   an open city panel; on phones first in #lens-area, over the lens dock. --float-w sets its desktop width. ---------- */
.float-card {
  position: fixed; z-index: 12; top: calc(var(--topbar-h) + 10px); right: calc(12px + var(--dock-right, 0px));
  width: var(--float-w, 320px); max-height: calc(100vh - var(--topbar-h) - 120px); max-height: calc(100dvh - var(--topbar-h) - 120px);
  display: flex; flex-direction: column; padding: 9px 12px 10px; font-size: 13px; line-height: 1.4;
}
body.panel-open .float-card { right: calc(394px + 12px + var(--dock-right, 0px)); }
@media (max-width: 700px) {
  .float-card { position: static; width: auto; margin: 0 8px; max-height: 42vh; max-height: 42dvh; padding: 8px 10px; }
  body.panel-open .float-card { right: auto; }
}

/* ---------- a list of things to fly to in a panel (the fiesta calendar, the timeline; app/flyToCells.js) ---------- */
.dk-list { list-style: none; margin: 0; padding: 0; }
.dk-item {
  display: flex; flex-direction: column; width: 100%; padding: 5px 6px; text-align: left; background: none; color: inherit; font: inherit;
  border: none; border-bottom: 1px solid rgba(201,164,92,.18); border-radius: 0;
}
button.dk-item { cursor: pointer; }
button.dk-item:hover, .dk-item[aria-current] { background: rgba(90,74,36,.3); }
.dk-name { font-weight: 600; overflow-wrap: anywhere; }
.dk-where, .dk-when { font-size: 12px; overflow-wrap: anywhere; }
.dk-where { color: var(--ink-dim); }
/* A battle in the battles' panel (ext/batallas): the row flies to its hex, the name opens the article. */
.bt-row { cursor: pointer; }
.bt-row:hover { background: rgba(90,74,36,.3); }
.bt-row a.dk-name, .bt-who a, .tl-battles a { color: var(--gold-bright); }
.sl-fold a, .bd-fold a { color: var(--gold-bright); } /* the sources of the wheat silos panel (ext/silos) and the weddings panel (ext/bodas) */
.sl-fold a { color: var(--gold-bright); } /* the wheat silos panel's sources (ext/silos) */
/* A title in the noble titles' panel (ext/titulos): its name flies to the hex, each year opens the order in the BOE. */
.tt-row .dk-name { font-size: inherit; text-decoration: none; }
.tt-cartas a { color: var(--gold-bright); }
/* Its cartas per year: the partial first and last years paler, their dates under the ends; «show all» under the list. */
.tt-strip svg { cursor: default; }
.tt-strip .tt-part { fill-opacity: .45; }
.tt-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 2px; font-size: 10px; }
.tt-all { margin-top: 6px; }
.sl-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; }
.sl-table th, .sl-table td { padding: 2px 4px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.08); }
.sl-table .n { text-align: right; font-variant-numeric: tabular-nums; }
.bt-place { padding: 0; background: none; border: none; color: var(--ink); font: inherit; font-size: 12px; text-align: left; cursor: pointer; text-decoration: underline dotted; }

/* ---------- the month strip and the links between month pages (ext/month.js) ---------- */
.ms-strip { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; margin: 10px 0 8px; }
.ms-month {
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; height: 58px; padding: 3px 0;
  background: none; border: 1px solid transparent; border-radius: 4px; color: var(--ink-dim); font: inherit; font-size: 11px; cursor: pointer;
}
.ms-bare .ms-month { height: 30px; }
/* the bar's room is what the name leaves, so a bar's height is its share of that room */
.ms-bar { flex: 1 1 0; min-height: 0; width: 60%; display: flex; flex-direction: column; justify-content: flex-end; }
.ms-month i { display: block; width: 100%; min-height: 2px; background: rgba(201,164,92,.45); border-radius: 2px 2px 0 0; }
.ms-month i.down { background: rgba(196,98,64,.6); }
.ms-month i.below { background: rgba(63,108,148,.75); } /* under a mean day, in the cool colour of the weddings lens (ext/bodas) */
.ms-month span { text-transform: capitalize; }
.ms-month:hover { color: var(--ink); border-color: var(--line); }
.ms-month.on { color: var(--gold-bright); border-color: var(--gold); background: rgba(90,74,36,.35); }
.ms-month.on i { background: var(--gold-bright); }
.ms-month.on i.down { background: #e2825c; }
.ms-month.on i.below { background: #6f9cc4; }
.ms-links { margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; } /* two links or more once a third page shares the month (ext/bodas) */
.ms-link { padding: 0; background: none; border: none; color: var(--gold-bright); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.ms-link:hover { color: var(--ink); }

/* ---------- the fiesta calendar (ext/fiestas) ---------- */
.fc-sum { margin: 0 0 8px; }
.fc-group h3 { display: flex; align-items: center; gap: 6px; margin: 12px 0 4px; font-family: var(--serif); font-size: 14px; font-weight: normal; color: var(--gold-bright); }
.fc-group h3 i { width: 11px; height: 11px; border-radius: 2px; flex: none; }
.fc-undated { margin: 14px 0 0; font-size: 12px; }

/* ---------- what's new in the data (ext/novedades), in the left dock ---------- */
/* A top-bar button's dot: unseen novedades (A62), today's hex unplayed (A434). */
.dot-btn { position: relative; }
.top-dot { position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: #e0873a; box-shadow: 0 0 0 1.5px var(--panel); }
.nv-dock { padding: 12px 16px 18px; font-size: 13px; line-height: 1.4; }
.nv-intro { margin: 6px 0 10px; font-size: 12px; color: var(--ink-dim); }
.nv-list { list-style: none; margin: 0; padding: 0; }
.nv-card { border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px 8px; margin-bottom: 8px; background: var(--panel-2); }
.nv-card[aria-current] { border-color: var(--gold-bright); }
.nv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-bottom: 4px; font-size: 11px; }
.nv-period { color: var(--ink-dim); }
.nv-new, .nv-tag { padding: 0 6px; border-radius: 8px; border: 1px solid rgba(201,164,92,.5); }
.nv-new { color: #1a1408; background: var(--gold-bright); border-color: var(--gold-bright); }
.nv-tag { color: var(--ink-dim); }
.nv-head, .nv-line { display: block; width: 100%; padding: 2px 4px; margin: 0 -4px; background: none; border: none; border-radius: 3px; color: inherit; font: inherit; text-align: left; overflow-wrap: anywhere; }
button.nv-head, button.nv-line { cursor: pointer; }
button.nv-head:hover, button.nv-line:hover { background: rgba(90,74,36,.3); }
.nv-title { font-family: var(--serif); font-size: 14px; font-weight: normal; color: var(--gold-bright); }
.nv-lines { list-style: none; margin: 4px 0 0; padding: 0; font-size: 12px; }
.nv-lines .nv-line { padding-left: 14px; text-indent: -10px; }
.nv-lines .nv-line::before { content: "· "; color: var(--ink-dim); }
.nv-src { margin: 6px 0 0; font-size: 11px; color: var(--ink-dim); overflow-wrap: anywhere; }
.nv-open { margin-top: 6px; }
.nv-how { margin: 12px 0 0; font-size: 12px; color: var(--ink-dim); }
.nv-how summary { cursor: pointer; color: var(--gold-bright); }
.nv-how ul { margin: 6px 0 0; padding-left: 16px; }
@media (max-width: 700px) { .nv-dock { padding-top: 18px; } }

/* ---------- a lens panel's colour key (app/lensPanel.js panelKey): phones only, where the sheet covers the legend ---------- */
.pk-key { margin: 12px 0 0; }
.pk-cap { display: block; margin-bottom: 3px; font-size: 11px; color: var(--ink-dim); } /* the label of the key */
.pk-ramp { display: block; height: 10px; border-radius: 2px; }
.pk-ticks { display: flex; justify-content: space-between; margin-top: 3px; font-size: 11px; color: var(--ink-dim); }
.pk-swatches .pk-ticks { flex-wrap: wrap; justify-content: flex-start; gap: 2px 10px; } /* a categorical lens: its legend's swatches */
.pk-cat { display: inline-flex; align-items: center; gap: 4px; }
.pk-cat i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
@media (min-width: 701px) { .pk-key { display: none; } }

/* ---------- the climate of the month (ext/clima) ---------- */
.cl-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 4px 0 10px; }
.cl-tabs-3 { grid-template-columns: repeat(3, 1fr); } /* the route panel with the train (ext/rutas) */
.cl-tab {
  padding: 5px 6px; background: none; border: 1px solid var(--line); border-radius: 4px; color: var(--ink-dim); font: inherit; cursor: pointer;
}
.cl-tab:hover { color: var(--ink); }
.cl-tab.on { color: var(--gold-bright); border-color: var(--gold); background: rgba(90,74,36,.35); }
.cl-tab:disabled { opacity: .45; cursor: not-allowed; }
/* the future mode's horizon and scenario rows, and the province's table of projections */
.cl-horizon, .cl-scen { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 8px; }
.cl-horizon { display: grid; grid-template-columns: repeat(4, 1fr); } /* the four on one row, the observed one too */
.cl-horizon .cl-opt { padding: 4px 2px; white-space: nowrap; }
.cl-scen[hidden] { display: none; }
.cl-opt {
  flex: 1 1 auto; padding: 4px 6px; background: none; border: 1px solid var(--line); border-radius: 4px; color: var(--ink-dim);
  font: inherit; font-size: 12px; cursor: pointer; font-variant-numeric: tabular-nums;
}
.cl-opt:hover { color: var(--ink); }
.cl-opt.on { color: var(--gold-bright); border-color: var(--gold); background: rgba(90,74,36,.35); }
.cl-opt.pending { opacity: .6; border-style: dashed; cursor: progress; } /* its projections are loading */
.cl-hatch { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 12px; }
.cl-hatch[hidden] { display: none; }
.cl-hatch input { margin: 0; accent-color: var(--gold); }
.cl-ftable { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.cl-ftable caption { text-align: left; color: var(--ink-dim); padding-bottom: 3px; }
.cl-ftable th, .cl-ftable td { padding: 2px 4px; text-align: right; border-bottom: 1px solid rgba(201,164,92,.12); vertical-align: top; }
.cl-ftable th[scope="row"] { text-align: left; color: var(--ink-dim); font-weight: normal; }
.cl-ftable thead th { color: var(--ink-dim); font-weight: normal; }
.cl-ftable td small { display: block; color: var(--ink-dim); font-size: 10.5px; }
.cl-ftable td.on { color: var(--gold-bright); background: rgba(90,74,36,.35); }
.cl-sum { margin: 0 0 6px; color: var(--gold-bright); }
.cl-rule { margin: 0 0 10px; font-size: 12px; }
.cl-chart h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 14px 0 2px; font-family: var(--serif); font-size: 15px; font-weight: normal; color: var(--gold-bright); }
.cl-chart h3 .ms-link { font-family: var(--sans); font-size: 12px; }
.cl-chart-how { margin: 0 0 6px; font-size: 12px; }
.wl { display: block; color: var(--ink); }
.wl .wl-grid { stroke: rgba(201,164,92,.16); }
.wl .wl-axis { stroke: var(--ink-dim); }
.cl-cap { margin: 4px 0 8px; font-size: 11.5px; }
.cl-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.cl-table caption { text-align: left; color: var(--ink-dim); padding-bottom: 3px; }
.cl-table th, .cl-table td { padding: 1px 4px; text-align: right; border-bottom: 1px solid rgba(201,164,92,.12); }
.cl-table th[scope="row"] { text-align: left; text-transform: capitalize; color: var(--ink-dim); font-weight: normal; }
.cl-table thead th { color: var(--ink-dim); font-weight: normal; }
/* The drove roads' figures under the map switch (ext/canadas/model.js howHtml): compact, numbers aligned. */
.cn-table { width: 100%; border-collapse: collapse; font-size: 11px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.cn-table th, .cn-table td { padding: 2px 3px; text-align: start; vertical-align: top; border-bottom: 1px solid rgba(201,164,92,.12); }
.cn-table .n { text-align: right; white-space: nowrap; }
.cn-table thead th { color: var(--ink-dim); font-weight: normal; }
.cl-credit { margin: 12px 0 0; font-size: 11.5px; }

/* ---------- migration (ext/migration): the clima panel's tabs and texts, three to a row, and the partner list ---------- */
.mg-tabs, .mg-dirs { grid-template-columns: repeat(3, 1fr); }
.mg-dirs { margin-top: -4px; }
.mg-pick { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--ink-dim); }
.mg-pick select { flex: 1; min-width: 0; font: inherit; color: var(--ink); background: rgba(0,0,0,.3); border: 1px solid rgba(201,164,92,.45); border-radius: 4px; padding: 2px 4px; color-scheme: dark; }
.mg-nat { margin: 0 0 10px; font-size: 12px; }
.mg-top-h { margin: 12px 0 4px; font-family: var(--serif); font-size: 15px; font-weight: normal; color: var(--gold-bright); }
.mg-top { display: grid; gap: 2px; margin: 0 0 10px; }
.mg-row {
  display: flex; justify-content: space-between; gap: 8px; padding: 3px 6px; background: none; border: 1px solid var(--line); border-radius: 4px;
  color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.mg-row:hover { border-color: var(--gold); background: rgba(90,74,36,.35); }
.mg-row b { color: var(--gold-bright); font-weight: normal; font-variant-numeric: tabular-nums; }
.mg-unit { margin: 3px 0 0; font-size: 11px; }
.mg-retry { margin: 4px 0 0; }
/* The unit under the phone key and the lens note are the legend's on a wider screen, where the legend is visible. */
@media (min-width: 701px) { .mg-unit, .mg-note { display: none; } }
/* The minimap sits over the Canaries' inset: it gives way while the flows join a Canarian province. */
body.mg-inset #minimap-wrap, body.mg-inset .minimap-toggle { display: none; }

/* ---------- the sun lens (ext/sun) ---------- */
.sn-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 10px 0; }
.sn-mode {
  padding: 6px 4px; background: none; border: 1px solid var(--line); border-radius: 4px; color: var(--ink-dim); font: inherit; cursor: pointer;
}
.sn-mode:hover { color: var(--ink); }
.sn-mode.on { color: var(--gold-bright); border-color: var(--gold); background: rgba(90,74,36,.35); }
.sn-day { display: flex; align-items: center; gap: 8px; }
.sn-day input { flex: 1; min-width: 0; padding: 4px 6px; background: rgba(0,0,0,.3); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; font: inherit; color-scheme: dark; }
.lens-panel .chip.on { background: rgba(201,164,92,.35); }
.sn-note { margin: 12px 0 8px; color: var(--gold-bright); }
/* The spread is the legend's; it shows in the panel only on phones, where the sheet covers the legend (.pk-key). */
@media (min-width: 701px) { .sn-note { display: none; } }
/* The minimap sits over the Canaries' inset, which the lens's text names: it gives way while the panel is open. */
body.sn-open #minimap-wrap, body.sn-open .minimap-toggle { display: none; }
/* «¿Y si cambiamos la hora?»: shown on every screen, unlike .sn-note; the fold keeps the six clocks' figures closed. */
.sn-clock { margin: 12px 0 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.sn-clock h3 { margin: 0 0 4px; font-size: 13px; font-weight: normal; color: var(--gold-bright); }
.sn-switch { display: flex; align-items: center; gap: 8px; padding: 4px 0; background: none; border: 0; color: var(--ink); font: inherit; cursor: pointer; }
.sn-switch i { position: relative; flex: none; width: 30px; height: 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.3); }
.sn-switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-dim); transition: transform .15s; }
.sn-switch[aria-checked="true"] i { border-color: var(--gold); background: rgba(90,74,36,.45); }
.sn-switch[aria-checked="true"] i::after { transform: translateX(14px); background: var(--gold-bright); }
.sn-switch:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }
.sn-hint { margin: 0; font-size: 11px; }
.sn-seasons { grid-template-columns: repeat(3, 1fr); margin: 8px 0; }
.sn-seasons .sn-mode { font-size: 12px; }
.sn-count { display: flex; align-items: baseline; gap: 8px; }
.sn-count-n { flex: none; font-size: 22px; font-weight: normal; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.sn-count-label { font-size: 12px; }
.sn-count-vs { margin: 2px 0 4px; }
.sn-count-vs:empty { display: none; }
.sn-table summary { margin-top: 8px; cursor: pointer; }
.sn-table table { width: 100%; margin-top: 4px; border-collapse: collapse; font-size: 11px; }
.sn-table th, .sn-table td { padding: 3px 3px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-weight: normal; }
.sn-table thead th { color: var(--ink-dim); }
.sn-table td { font-variant-numeric: tabular-nums; }
.sn-table td:nth-child(2) { text-align: right; }
/* The time on its line, its place under it, so a 300 px dock keeps four columns. */
.sn-table .sn-place { display: block; color: var(--ink-dim); white-space: nowrap; }
.sn-table tr.on th, .sn-table tr.on td { color: var(--gold-bright); }
@media (max-width: 700px) { .sn-clock { margin-top: 8px; padding-top: 8px; } }

/* ---------- a weekly series in a panel: the reservoirs and COVID-19 (ext/week.js) ---------- */
.wk-sub { margin: 4px 0 8px; font-size: 12px; }
.wk-slider { width: 100%; margin: 4px 0; accent-color: var(--gold-bright); }
.wk-steps, .wk-jumps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0; }
.wk-year select, .el-option select { font: inherit; color: var(--ink); background: rgba(0,0,0,.3); border: 1px solid rgba(201,164,92,.45); border-radius: 4px; padding: 2px 4px; }
.wk-btn {
  font: inherit; font-size: 12px; color: var(--ink); background: rgba(0,0,0,.25); border: 1px solid rgba(201,164,92,.45);
  border-radius: 4px; padding: 3px 8px; cursor: pointer;
}
.wk-btn:hover, .wk-btn[aria-pressed="true"] { color: var(--gold-bright); border-color: var(--gold); background: rgba(90,74,36,.35); }
.wk-big { margin: 10px 0 2px; }
.wk-where { margin-right: 4px; }
.wk-big b { font-family: var(--serif); font-size: 22px; color: var(--gold-bright); font-weight: normal; margin-right: 4px; }
.wk-chart { margin: 4px 0 0; }
.wk-chart svg { display: block; width: 100%; height: auto; cursor: pointer; }
.wk-chart figcaption { font-size: 11px; }
.wk-grid { stroke: rgba(201,164,92,.22); stroke-width: 1; }
.wk-axis { fill: var(--ink-dim); font-size: 9px; font-family: var(--sans); }
.wk-cursor { stroke: var(--ink); stroke-width: 1; opacity: .7; }
.wk-h3 { display: flex; align-items: center; gap: 6px; margin: 12px 0 4px; font-family: var(--serif); font-size: 14px; font-weight: normal; color: var(--gold-bright); }
.wk-list { list-style: none; margin: 0; padding: 0; }
.wk-list a { color: var(--gold-bright); }
.wk-row.wk-off { opacity: .65; }
.wk-row {
  display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; width: 100%; padding: 4px 6px; text-align: left; background: none;
  color: inherit; font: inherit; border: none; border-bottom: 1px solid rgba(201,164,92,.18); border-radius: 0; cursor: pointer;
}
.wk-row:hover, .wk-row:focus-visible { background: rgba(90,74,36,.3); }
.wk-name { font-weight: 600; overflow-wrap: anywhere; }
.wk-val { font-variant-numeric: tabular-nums; }
.wk-bar { grid-column: 1 / -1; height: 4px; background: rgba(0,0,0,.35); border-radius: 2px; overflow: hidden; }
.wk-bar i { display: block; height: 100%; border-radius: 2px; }
.wk-amt { grid-column: 1 / -1; font-size: 11px; }
.wk-note { margin: 12px 0 0; font-size: 12px; }
/* On a phone the dock is a sheet: the title, week and slider stay in view while the list scrolls under them. */
@media (max-width: 700px) {
  .wk-top { position: sticky; top: -18px; z-index: 1; margin: -18px -16px 0; padding: 18px 16px 4px; border-bottom: 1px solid var(--line);
            background: #1c2938; /* --panel-2 without its alpha: the list scrolls under it */ }
  .wk-top .lens-panel-head h2 { font-size: 16px; }
  .wk-top .wk-sub { margin: 2px 0 4px; }
}

/* the reservoirs (ext/embalses) */
.em-line { fill: none; stroke: #8ac7ea; stroke-width: 1.5; }
.em-res-line { fill: none; stroke: var(--gold-bright); stroke-width: 1.6; }
.em-dot { fill: #8ac7ea; stroke: #0d2a47; stroke-width: 1.5; }
.em-count { margin: 6px 0 10px; }
.em-bar i { background: #8ac7ea; }
.em-res { margin: 8px 0 4px; padding: 2px 8px 6px; border: 1px solid rgba(236,208,142,.45); border-radius: 6px; background: rgba(90,74,36,.18); }
.em-res p { margin: 2px 0; }
.em-res-close { margin-left: auto; }
.em-key { display: inline-block; width: 14px; height: 2px; margin-right: 6px; vertical-align: middle; }
.em-key-res { background: var(--gold-bright); }

/* COVID-19 by province (ext/covid): the measures are clima's tabs (.cl-tab) */
.cv-tabs { grid-template-columns: repeat(3, 1fr); }
.cv-caveat { margin: 0 0 8px; font-size: 12px; color: var(--ink); }
.cv-ia { margin: 0 0 4px; font-size: 12px; }
.cv-line { fill: none; stroke: #c6a8e3; stroke-width: 1.5; }
.cv-dot { fill: #c6a8e3; stroke: #2b1d45; stroke-width: 1.5; }
.cv-rule { stroke: var(--ink-dim); stroke-width: 1; stroke-dasharray: 2 2; }
.cv-bar i { background: #b08ad6; }
.cv-list { margin: 0; padding-left: 16px; }
.cv-list li { margin: 0 0 4px; }
.cv-notes a { color: var(--gold-bright); }

/* ---------- great people through time (ext/timeline) ---------- */
.tl-year { margin: 8px 0 6px; color: var(--ink-dim); }
.tl-year b { font-family: var(--serif); font-size: 30px; font-weight: normal; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.tl-strip { position: relative; }
.tl-strip svg { display: block; width: 100%; height: 44px; cursor: pointer; fill: rgba(201,164,92,.5); }
.tl-now { stroke: var(--gold-bright); stroke-width: 2; vector-effect: non-scaling-stroke; }
.tl-scale { position: absolute; top: 0; left: 2px; font-size: 10px; pointer-events: none; }
.tl-slider { display: block; width: 100%; height: 32px; margin: 2px 0 6px; accent-color: var(--gold); cursor: pointer; }
.tl-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tl-btn {
  min-width: 32px; min-height: 32px; padding: 4px 10px; background: rgba(0,0,0,.25); color: var(--ink); font: inherit;
  border: 1px solid var(--line); border-radius: 4px; cursor: pointer;
}
.tl-btn:hover:not(:disabled) { border-color: var(--gold); }
.tl-btn:disabled { opacity: .4; cursor: default; }
.tl-btn[aria-pressed="true"] { color: var(--gold-bright); border-color: var(--gold); background: rgba(90,74,36,.35); }
.tl-prev, .tl-next { font-size: 18px; line-height: 1; padding: 2px 8px; }
.tl-controls .pb-toggle { min-width: 104px; }
.tl-seg { display: inline-flex; }
.tl-seg .tl-btn, .pb-speed > button { border-radius: 0; }
.tl-seg .tl-btn:first-child, .pb-speed > button:first-child { border-radius: 4px 0 0 4px; }
.tl-seg .tl-btn:last-child { margin-left: -1px; }
.tl-seg .tl-btn:last-child, .pb-speed > button:last-child { border-radius: 0 4px 4px 0; }
.tl-view { margin: 8px 0 0; }
.tl-sum { margin: 10px 0 0; }
.tl-h3 { margin: 12px 0 4px; font-family: var(--serif); font-size: 14px; font-weight: normal; color: var(--gold-bright); }
.tl-note { margin: 10px 0 0; font-size: 12px; }
/* The population projections' dock (web/js/ext/proyecciones), on the timeline's controls and the reservoirs' chart. */
.pj-caveat { margin: 6px 0 0; padding: 6px 8px; font-size: 12px; border-left: 2px solid var(--gold); background: rgba(90,74,36,.18); }
.pj-time { display: flex; align-items: center; gap: 6px; }
.pj-time .tl-slider { flex: 1; min-width: 0; margin: 0; }
.pj-spain { margin: 0; }
.pj-place { margin: 8px 0 0; }
.pj-shade { fill: rgba(201,164,92,.12); }
.pj-line { fill: none; stroke-width: 1; opacity: .75; }
.pj-fertility, .pj-both { stroke: #9a8f7a; }
.pj-line.pj-fertility, .pj-line.pj-both { opacity: .45; } /* behind the migration ones, which the table lists */
.pj-migration { stroke: #6ab0ca; }
.pj-migration_zero { stroke-dasharray: 3 2; }
.pj-line.pj-central { stroke: var(--gold-bright); stroke-width: 2.2; opacity: 1; }
.pj-legend { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 2px 0 6px; font-size: 11px; }
.pj-key { display: inline-block; width: 14px; height: 0; margin-right: 4px; vertical-align: middle; border-top: 2px solid; }
.pj-key.pj-central { border-color: var(--gold-bright); }
.pj-key.pj-migration { border-color: #6ab0ca; }
.pj-key.pj-migration_zero { border-color: #6ab0ca; border-top-style: dashed; }
.pj-key.pj-fertility { border-color: #9a8f7a; }
.pj-scen { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.pj-scen th, .pj-scen td { padding: 2px 4px; text-align: right; border-bottom: 1px solid var(--line); }
.pj-scen th[scope="row"] { text-align: left; font-weight: normal; }
.pj-central-row th, .pj-central-row td { color: var(--gold-bright); }

/* A dock and a province panel open at once leave under 700px of map up to 1600px: the minimap goes too. */
@media (max-width: 1600px) and (min-width: 701px) {
  body.dock-open.panel-open #minimap-wrap { display: none; }
}
@media (max-width: 1360px) and (min-width: 701px) {
  body.dock-open #minimap-wrap { display: none; }
  body.dock-open #lens-area { left: calc(12px + var(--dock-left, 0px)); }
}

/* ---------- tooltip ---------- */
.tooltip {
  position: fixed; z-index: 20; pointer-events: none; max-width: 280px;
  background: rgba(12, 18, 26, .96); border: 1px solid var(--line); border-radius: 4px;
  padding: 6px 9px; font-size: 12px; line-height: 1.45; color: var(--ink);
}
.tooltip b { color: var(--gold-bright); font-family: var(--serif); }
.tooltip .muted { color: var(--ink-dim); }
.tooltip svg.icon { vertical-align: -2px !important; }

/* ---------- city / state panel ---------- */
#city-panel {
  position: fixed; top: 52px; right: calc(12px + var(--dock-right, 0px)); bottom: 12px; width: 370px; z-index: 12;
  overflow-y: auto; padding: 0 0 12px; overscroll-behavior: contain;
}
.sheet-grip { display: none; }
.cp-head { padding: 12px 16px 12px 20px; border-bottom: 1px solid var(--line); position: relative; background: linear-gradient(180deg, rgba(255,235,190,.05), transparent); }
.cp-head .stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; border-radius: 6px 0 0 0; box-shadow: inset -1px 0 0 rgba(0,0,0,.4); }
.cp-kind { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.cp-name { margin: 0; font-weight: normal; font-family: var(--serif); font-size: 24px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-bright); padding-right: 34px; line-height: 1.15; }
.cp-name .cap { color: #ffe9a8; }
.cp-full { color: var(--ink-dim); font-size: 12px; margin-top: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chip { font: 11px var(--sans); letter-spacing: .06em; padding: 1px 7px; border-radius: 9px; border: 1px solid rgba(201,164,92,.5); background: rgba(0,0,0,.25); color: var(--gold-bright); }
button.chip { cursor: pointer; }
button.chip:hover { background: rgba(201,164,92,.2); }
.cp-pop { margin-top: 8px; font-size: 13px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.cp-pop svg { color: var(--ink-dim); }
.cp-pop b { font-size: 16px; }
.cp-pop .growth { white-space: nowrap; }
.cp-pop .growth .since { color: var(--ink-dim); font-size: 12px; }
.cp-close { position: absolute; top: 10px; right: 10px; }
.cp-section { padding: 10px 16px 4px; }
.cp-section h3 {
  margin: 4px 0 8px; font-family: var(--serif); font-weight: normal; font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: 8px;
}
.cp-section h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.yield-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
/* Longer number words (es-ES "18,3 mil M €") wrap after the number instead of pushing the last tile out. */
html:not([lang="en"]) .yield-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
html:not([lang="en"]) .yield-tile .val { font-size: 13px; }
html:not([lang="en"]) .yield-tile .lbl { font-size: 9px; letter-spacing: 0; }
.yield-tile { background: rgba(0,0,0,.25); border: 1px solid rgba(201,164,92,.25); border-radius: 5px; padding: 6px 2px; text-align: center; cursor: help; }
.yield-tile .ico { display: flex; justify-content: center; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.yield-tile .val { font-weight: 700; font-size: 14px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.yield-tile .lbl { font-size: 10px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: .06em; }
.yield-tile .rank { font-size: 10px; color: var(--gold-bright); margin-top: 2px; font-variant-numeric: tabular-nums; }
.ind { display: grid; grid-template-columns: 22px 1fr auto; gap: 2px 6px; align-items: center; margin-bottom: 5px; font-size: 12px; }
.ind .bar { grid-column: 2 / 4; height: 5px; background: rgba(255,255,255,.07); border-radius: 3px; overflow: hidden; }
.ind .bar i { display: block; height: 100%; border-radius: 3px; }
.ind .n { color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.lq { font-size: 10px; padding: 0 4px; border-radius: 3px; margin-left: 4px; }
.lq.hi { background: rgba(127,191,63,.25); color: #b9e486; }
.lq.lo { background: rgba(255,255,255,.06); color: var(--ink-dim); }
.stat-row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 4px 0; border-bottom: 1px dashed rgba(201,164,92,.15); }
.stat-row .sl { display: inline-flex; align-items: center; gap: 6px; }
.stat-row .sl svg, .stat-row .sl .emoji { color: var(--ink-dim); width: 14px; }
.stat-row > span:last-child { text-align: right; }
.stat-row .cmp { font-size: 11px; color: var(--ink-dim); margin-left: 6px; white-space: nowrap; }
.good { color: #9fd76a !important; } .bad { color: #f08a6a !important; }
.city-list { display: flex; flex-direction: column; gap: 3px; }
.city-row {
  display: grid; grid-template-columns: 1fr auto 12px; gap: 8px; align-items: center; width: 100%; text-align: left; cursor: pointer;
  padding: 6px 8px; border-radius: 4px; background: rgba(0,0,0,.22); border: 1px solid rgba(201,164,92,.2); font-size: 13px;
}
.city-row:hover, .city-row:focus-visible { border-color: var(--gold); background: rgba(201,164,92,.12); }
.cr-name { font-family: var(--serif); color: var(--gold-bright); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-name .muted { font-family: var(--sans); font-size: 11px; }
.cr-pop { color: var(--ink-dim); font-variant-numeric: tabular-nums; font-size: 12px; }
.cr-go { color: var(--gold); }
.cp-section p.muted { font-size: 12px; margin: 4px 0; }
.cp-foot { padding: 10px 16px 0; font-size: 11px; color: var(--ink-dim); }
.cp-foot a { color: var(--gold); cursor: pointer; }

/* ---------- lenses ---------- */
/* left: 266px keeps the area clear of the 252px-wide minimap; it never overlaps it. */
#lens-area {
  position: fixed; left: calc(266px + var(--dock-left, 0px)); right: calc(12px + var(--dock-right, 0px)); bottom: 12px; z-index: 11; pointer-events: none;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
#lens-area > * { pointer-events: auto; }
body.panel-open #lens-area { right: calc(394px + var(--dock-right, 0px)); }
#lens-area { container-type: inline-size; }
/* A narrow dock (e.g. beside the open panel) and a row that would not fit (ui/lenses.js fitQuick, .icons) show icons
   only for the quick lenses; a lens without an SVG icon keeps its emoji (glyph() writes it as span.emoji), or its
   button would be an empty box. */
@container (max-width: 560px) {
  .lens-quick .lens-btn:not(.active) span:not(.emoji), .res-toggle span { display: none; }
}
.lens-quick.icons .lens-btn:not(.active) span:not(.emoji) { display: none; }
.lens-quick .lens-btn[hidden] { display: none; } /* a recent lens fitQuick (ui/lenses.js) leaves out */
.lens-dock { display: flex; align-items: center; gap: 4px; padding: 5px; max-width: 100%; min-width: 0; }
.lens-quick { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.lens-quick::-webkit-scrollbar { display: none; }
.lens-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  background: rgba(0,0,0,.25); border: 1px solid rgba(201,164,92,.3); border-radius: 4px; padding: 5px 9px;
  cursor: pointer; font-size: 12px; white-space: nowrap; color: var(--ink);
}
.lens-btn:hover { border-color: var(--gold); }
.lens-btn.active { background: linear-gradient(180deg, #5a4a24, #3a2f15); border-color: var(--gold-bright); color: var(--gold-bright); }
/* A lens whose values are loading (DECISIONS A178): its button pulses until the map shows it. */
.lens-btn.busy, .lp-tile.busy { animation: lens-busy 0.9s ease-in-out infinite alternate; border-color: var(--gold); }
@keyframes lens-busy { from { opacity: 1; } to { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .lens-btn.busy, .lp-tile.busy { animation: none; opacity: 0.7; } }
.lens-more { font-family: var(--serif); color: var(--gold-bright); border-color: rgba(201,164,92,.6); background: linear-gradient(180deg, #33465c, #1d2b3a); }
.lens-more .caret { font-size: 10px; opacity: .8; }
.lens-btn .lens-short { display: none; } /* the phone's label (body.phone-labels, below) */
.lens-more[aria-expanded="true"] .caret { display: inline-block; transform: rotate(180deg); }
.res-toggle { color: var(--ink-dim); margin-right: 4px; }
.res-toggle.active { color: var(--gold-bright); border-color: var(--gold-bright); }

.lens-picker { width: 580px; max-width: 100%; max-height: calc(100vh - 140px); display: flex; flex-direction: column; overflow: hidden; }
.lp-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 6px 14px; border-bottom: 1px solid var(--line);
  font-family: var(--serif); color: var(--gold-bright); letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
.lp-body { overflow-y: auto; padding: 6px 10px 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; }
/* The filter and the group chips (page setting lens_filter, ui/lenses.js): the tiles, groups and chips it leaves out
   take the hidden attribute, which their display rules would otherwise override. */
.lp-find { flex: none; padding: 8px 10px 6px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.lp-filter { width: 100%; box-sizing: border-box; padding: 6px 10px; border-radius: 4px; border: 1px solid rgba(201,164,92,.45);
  background: rgba(0,0,0,.3); color: var(--ink); font: 13px var(--sans); }
.lp-filter:focus { outline: none; border-color: var(--gold-bright); }
.lp-jump { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.lp-chip { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 12px; cursor: pointer;
  background: rgba(0,0,0,.25); border: 1px solid rgba(201,164,92,.3); color: var(--gold); font-size: 11px; white-space: nowrap; }
.lp-chip:hover, .lp-chip:focus-visible { border-color: var(--gold); color: var(--gold-bright); }
.lp-none { margin: 0; padding: 12px 14px; color: var(--ink-dim); font-size: 13px; }
.lp-tile[hidden], .lp-group[hidden], .lp-chip[hidden], .lp-none[hidden] { display: none; }
.lp-group h4 { margin: 8px 0 5px; display: flex; align-items: center; gap: 6px; font: normal 11px var(--serif); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.lp-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.lp-tile {
  position: relative; display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 2px 7px; text-align: left; cursor: pointer;
  padding: 6px 7px 9px; border-radius: 5px; background: rgba(0,0,0,.25); border: 1px solid rgba(201,164,92,.25); color: var(--ink); font-size: 12px; overflow: hidden;
}
.lp-tile:hover, .lp-tile:focus-visible { border-color: var(--gold); background: rgba(201,164,92,.1); }
.lp-tile.active { border-color: var(--gold-bright); background: linear-gradient(180deg, rgba(90,74,36,.9), rgba(58,47,21,.9)); color: var(--gold-bright); }
.lp-ic { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #1b2838; border: 1px solid rgba(201,164,92,.55); color: var(--gold-bright); }
/* Two lines before an ellipsis: a long name ("Quebrantahuesos", "Spanish imperial eagle") is read whole. */
.lp-nm { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; overflow-wrap: break-word; hyphens: auto; }
/* A technical name keeps its official words and gets plain ones under it (ui/lenses.js lensSubtitle, DECISIONS E738). */
.lp-sub { grid-column: 2; font-size: 11px; line-height: 1.2; color: var(--ink-dim); }
.lp-tile.active .lp-sub { color: inherit; opacity: .8; }
.lp-tile:has(.lp-sub) .lp-ic { grid-row: span 2; }
/* That name is the official one the subtitle explains («Superficie construida (CORINE)»): it is read whole, never cut. */
.lp-tile:has(.lp-sub) .lp-nm { display: block; overflow: visible; -webkit-line-clamp: none; }
.lp-ramp { position: absolute; left: 6px; right: 6px; bottom: 3px; height: 3px; border-radius: 2px; }
.lp-ramp.terrain { background: linear-gradient(90deg, #2d6d97, #4f7a35, #a8a05a, #8a7a64, #e6e6e6); }

.legend { padding: 8px 10px 9px; width: 300px; max-width: 100%; font-size: 11px; }
.legend.behind { display: none; }
.lg-head { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.lg-ic { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #1b2838; border: 1px solid var(--gold); color: var(--gold-bright); flex: none; }
.legend .title { font-family: var(--serif); color: var(--gold-bright); font-size: 15px; letter-spacing: .06em; flex: 1; }
.lg-close { width: 20px; height: 20px; }
.legend .desc { color: var(--ink-dim); margin-bottom: 6px; line-height: 1.4; max-height: 4.3em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.lg-scale { position: relative; cursor: crosshair; touch-action: none; padding-top: 2px; border-radius: 3px; }
.lg-hist { display: block; width: 100%; height: 38px; }
.legend .ramp { position: relative; height: 11px; border-radius: 2px; border: 1px solid rgba(0,0,0,.5); box-shadow: 0 0 0 1px rgba(201,164,92,.25); }
.band-mark { position: absolute; top: -45px; bottom: -3px; border: 1px solid var(--gold-bright); border-radius: 2px; background: rgba(255,233,168,.12); box-shadow: 0 0 6px rgba(255,214,110,.5); pointer-events: none; }
.legend .ticks { position: relative; height: 15px; margin-top: 3px; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.legend .ticks span { position: absolute; top: 0; white-space: nowrap; font-size: 10.5px; }
.legend .lg-unit { display: none; margin-top: 1px; color: var(--ink-dim); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-meta { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 5px; color: var(--ink-dim); font-size: 10.5px; }
.hib { font-weight: 600; }
.lg-hint { margin-top: 4px; font-size: 10.5px; color: rgba(185,171,136,.75); font-style: italic; }
.lg-hint.on { color: var(--gold-bright); font-style: normal; }
/* A lens's caveat (lens.note), e.g. what a religion count does and does not measure. Shown everywhere, even on phones. */
.lg-note { margin: -2px 0 6px; padding: 4px 7px; border-left: 2px solid var(--gold); background: rgba(201,164,92,.08);
  color: var(--ink); font-size: 10.5px; line-height: 1.35; }
#legend:not(.expanded) .lg-author { display: none; } /* the author's line (A184) waits in the full legend */
/* Categorical lenses: swatches instead of the histogram; click one to show only it. */
.lg-cats { display: flex; flex-wrap: wrap; gap: 3px 4px; }
/* A lens's places to fly to (lens.fly_to), under its swatches. */
.lg-fly, .lg-see { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 4px; margin-top: 5px; color: var(--ink-dim); font-size: 10.5px; }
.lg-fly-btn { padding: 1px 6px; cursor: pointer; font: inherit; color: var(--ink); background: rgba(0,0,0,.22);
  border: 1px solid rgba(201,164,92,.25); border-radius: 3px; text-align: left; }
.lg-fly-btn:hover, .lg-fly-btn:focus-visible { border-color: var(--gold); color: var(--gold-bright); }
.lg-cat { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px 2px 4px; cursor: pointer; font-size: 11px;
  background: rgba(0,0,0,.22); border: 1px solid rgba(201,164,92,.25); border-radius: 3px; }
.lg-cat i { width: 11px; height: 11px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.45); flex: none; }
.lg-cat:hover { border-color: var(--gold); }
.lg-cats.filtered .lg-cat:not(.on) { opacity: .45; }
.lg-cat.on { border-color: var(--gold-bright); color: var(--gold-bright); }
/* The comparative legend (lensDock.setCompare; ext/compare): ticks over the histogram and ramp at the hovered hex's
   value, at the country's own figure and at a lens's reference (a legal limit), the hovered hex's swatch, and the
   caption lines with the hex/resident switch. */
.lg-marks { position: absolute; left: 0; right: 0; top: 2px; bottom: 0; pointer-events: none; }
.lg-mark { position: absolute; top: 0; bottom: 0; width: 0; margin-left: -.5px; border-left: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 0 2px rgba(0,0,0,.8); }
.lg-mark.nation { border-left: 1.5px dashed var(--gold-bright); box-shadow: none; }
.lg-mark::after { content: attr(data-label); position: absolute; top: -1px; left: 2px; color: var(--gold-bright); font-size: 9px;
  line-height: 1; letter-spacing: .04em; white-space: nowrap; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.lg-mark.flip::after { left: auto; right: 3px; }
.lg-mark.reference { border-left: 1.5px dashed var(--reference); box-shadow: none; }
.lg-mark.reference::after { color: var(--reference); top: auto; bottom: -1px; }
/* The hovered hex's tick has a cap above the histogram, so it shows at either end of the scale too. */
.lg-mark.here::before { content: ""; position: absolute; top: -4px; left: -4.5px; border: 4px solid transparent;
  border-top: 5px solid #fff; border-bottom: 0; filter: drop-shadow(0 0 1px #000); }
.lg-cat.here { border-color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.6); }
.lg-cmp { margin-top: 4px; color: var(--ink); font-size: 10.5px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.lg-cmp-row { display: flex; align-items: center; gap: 6px; }
.lg-cmp-row > span { flex: 1; min-width: 0; }
.lg-cmp .nat { color: var(--gold-bright); }
.lg-cmp .sub { color: var(--gold-bright); }
.lg-cmp-toggle { flex: none; align-self: flex-start; min-height: 22px; padding: 1px 7px; cursor: pointer; font: inherit;
  color: var(--ink-dim); background: rgba(0,0,0,.22); border: 1px solid rgba(201,164,92,.3); border-radius: 3px; }
.lg-cmp-toggle[aria-pressed="true"] { color: var(--gold-bright); border-color: var(--gold); background: rgba(90,74,36,.45); }
.lg-cmp-toggle:hover, .lg-cmp-toggle:focus-visible { border-color: var(--gold); }

/* Map layers menu (app.ui.addMapToggle): one dock button, a small menu of switches above the dock. */
.map-layers-btn { position: relative; }
.map-layers-btn .ml-count { min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--gold); color: #1a1208;
  font-size: 10px; line-height: 15px; text-align: center; }
.map-layers-pop { align-self: flex-end; width: 240px; max-width: calc(100vw - 16px); max-height: 60vh; overflow-y: auto; padding: 4px 0 6px; }
.ml-head { padding: 4px 12px 6px; font: normal 11px var(--serif); letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
  border-bottom: 1px solid var(--line); margin-bottom: 3px; }
.ml-row { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 12px; min-height: 36px; cursor: pointer; text-align: left;
  background: none; border: 0; font-size: 12.5px; color: var(--ink-dim); }
.ml-row:hover, .ml-row:focus-visible { background: rgba(201,164,92,.1); }
.ml-row.on { color: var(--ink); }
.ml-ic { display: inline-grid; place-items: center; width: 18px; flex: none; }
.ml-lbl { flex: 1; }
.ml-switch { position: relative; width: 28px; height: 16px; border-radius: 8px; background: rgba(0,0,0,.4); border: 1px solid rgba(201,164,92,.4); flex: none; }
.ml-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-dim); transition: left .12s; }
.ml-row.on .ml-switch { background: #5a4a24; border-color: var(--gold-bright); }
.ml-row.on .ml-switch::after { left: 14px; background: var(--gold-bright); }
.ml-note { padding: 0 12px 8px 39px; font-size: 11.5px; line-height: 1.45; color: var(--ink-dim); }
.ml-note p { margin: 4px 0; }
.ml-note ul { margin: 4px 0; padding-left: 16px; }
.ml-note summary { cursor: pointer; color: var(--gold); margin-top: 4px; }
.ml-note a { color: var(--gold-bright); }
.ml-key { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 2px 6px; margin: 2px 0 4px; }
.ml-key img { display: block; justify-self: center; }
/* The details toggle matters beside a docked dashboard (advisors), where the legend is a compact strip at the top
   right of the map instead of a card over the south-east, and on a phone for a lens with touch_details (below). */
.lg-more { display: none; width: 20px; height: 20px; font-size: 14px; line-height: 1; }
@media (min-width: 701px) {
  body.dock-open .lg-more { display: inline-grid; place-items: center; }
  body.dock-open #legend { position: absolute; right: 0; bottom: calc(100vh - 12px - var(--topbar-h) - 10px); transform: translateY(100%); }
  body.dock-open #legend:not(.expanded) { width: 230px; padding: 5px 8px 4px; }
  body.dock-open #legend:not(.expanded) .lg-ic { width: 20px; height: 20px; }
  body.dock-open #legend:not(.expanded) .title { font-size: 13px; }
  body.dock-open #legend:not(.expanded) :is(.desc, .lg-hist, .lg-meta, .lg-hint, .lg-cmp) { display: none; }
  body.dock-open #legend:not(.expanded) .band-mark { top: -3px; }
  body.dock-open #legend:not(.expanded) .lg-mark::after { display: none; } /* the ticks stay on the ramp, unlabelled */
  body.dock-open #legend:not(.expanded) .ticks span:nth-child(2n) { display: none; }
  body.dock-open #legend:not(.expanded) .lg-unit { display: block; }
}

/* ---------- minimap ---------- */
/* A left dock pushes the minimap over the credit line, which starts 280px from the left: it then sits on top of the line
   (min() is 0 without a left dock; --credits-foot-h, the line's height at the foot, is set by web/js/ext/credits). */
#minimap-wrap {
  position: fixed; left: calc(12px + var(--dock-left, 0px)); bottom: calc(12px + min(var(--credits-foot-h, 0px), var(--dock-left, 0px)));
  z-index: 11; padding: 5px;
}
/* Map credits (pipeline/site.py writes them for countries whose sources require a visible notice): a line along the
   bottom right, with the lens dock lifted above it. */
.map-credits {
  position: fixed; right: var(--dock-right, 0px); bottom: 0; z-index: 10; margin: 0; max-width: calc(100% - 280px);
  padding: 3px 10px; border-radius: 4px 0 0 0; background: rgba(13,20,30,.72); color: var(--ink-dim); font: 11px/1.35 var(--sans);
  text-align: right;
}
.map-credits a { color: var(--gold-bright); }
.map-credits ~ #lens-area, .map-credits ~ #city-panel { bottom: 30px; }
#minimap { display: block; cursor: pointer; border-radius: 3px; touch-action: none; }
.minimap-toggle { display: none; }
/* The phone's fold of the credit line (web/js/ext/credits, .map-credits.foldable below); never shown on wider screens. */
.mc-toggle { display: none; }

/* ---------- modals: civilopedia + help ---------- */
.modal { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.55); display: grid; place-items: center; }
.modal-card { width: min(980px, 94vw); height: min(680px, 88vh); display: grid; grid-template-columns: 210px 1fr; position: relative; overflow: hidden; }
.modal-card .close { position: absolute; top: 10px; right: 12px; z-index: 2; }
#pedia-nav { border-right: 1px solid var(--line); padding: 16px 0; background: rgba(0,0,0,.2); overflow-y: auto; }
#pedia-nav .hd { font-family: var(--serif); color: var(--gold-bright); font-size: 18px; letter-spacing: .12em; text-transform: uppercase; padding: 0 16px 12px; }
#pedia-nav button { display: block; width: 100%; text-align: left; background: none; border: none; padding: 7px 16px; cursor: pointer; font-size: 13px; color: var(--ink); }
#pedia-nav button.active, #pedia-nav button:hover { background: rgba(201,164,92,.15); color: var(--gold-bright); }
#pedia-body { padding: 20px 28px; overflow-y: auto; font-size: 14px; line-height: 1.55; }
#pedia-body h2 { font-family: var(--serif); color: var(--gold-bright); letter-spacing: .08em; margin: 0 0 12px; font-weight: normal; font-size: 24px; display: flex; align-items: center; gap: 10px; }
#pedia-body h2 svg { color: var(--gold); }
#pedia-body h3.grp { font-family: var(--serif); font-weight: normal; color: var(--gold); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; margin: 22px 0 4px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
#pedia-body h4 { margin: 18px 0 4px; color: var(--gold); font-family: var(--serif); font-size: 15px; display: flex; align-items: center; gap: 6px; }
#pedia-body a { color: var(--gold-bright); }
#pedia-body .muted { color: var(--ink-dim); font-size: 12px; }
#pedia-body table { border-collapse: collapse; width: 100%; font-size: 12px; margin-top: 6px; }
#pedia-body td, #pedia-body th { border-bottom: 1px solid rgba(201,164,92,.2); padding: 4px 6px; text-align: left; vertical-align: top; }
#pedia-body th { color: var(--gold); font-weight: normal; font-family: var(--serif); letter-spacing: .06em; }
#pedia-body td.ic { width: 34px; vertical-align: middle; }
#pedia-body td.nm { white-space: nowrap; }
#pedia-body td.num { text-align: right; font-variant-numeric: tabular-nums; }
#pedia-body code { font-size: 11px; color: var(--ink-dim); word-break: break-all; }
.res-ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--gold); color: #f8f0d8; box-shadow: 0 0 0 1px #120d06; }
.lens-entry { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: start; }
.lens-entry h4 { margin-top: 14px !important; }
.le-ic { margin-top: 14px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #1b2838; border: 1px solid var(--gold); color: var(--gold-bright); }
.le-ramp { display: block; height: 6px; border-radius: 3px; margin: 6px 0 3px; max-width: 260px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; border: 1px solid rgba(0,0,0,.4); }

.help-card { width: min(720px, 94vw); max-height: 88vh; overflow-y: auto; padding: 18px 24px 16px; position: relative; }
.help-card h2 { margin: 0 0 10px; font: normal 22px var(--serif); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-bright); display: flex; align-items: center; gap: 10px; }
.help-card h2 svg { color: var(--gold); }
.help-close { position: absolute; top: 12px; right: 12px; }
.help-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 22px; }
.help-card h3 { margin: 10px 0 6px; font: normal 11px var(--serif); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.help-row { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 4px 0; font-size: 13px; }
.help-row .keys { display: flex; flex-wrap: wrap; gap: 4px; }
.help-foot { margin: 14px 0 0; font-size: 12px; color: var(--ink-dim); }
.help-foot a { color: var(--gold-bright); }
.help-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; } /* app/help.js addAction */

/* welcome (ext/welcome): «Por dónde empezar», a card of doors over the map */
.modal.welcome { padding: 16px; }
.welcome-card { width: min(560px, 100%); max-height: 90vh; max-height: 90dvh; overflow-y: auto; padding: 22px 24px 18px; position: relative; }
.welcome-card h2 { margin: 0 36px 6px 0; font: normal 22px var(--serif); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-bright); }
.wc-close { position: absolute; top: 12px; right: 12px; }
.wc-lead { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.wc-how { margin: 0 0 14px; padding-left: 18px; font-size: 13px; line-height: 1.45; color: var(--ink-dim); }
.wc-how b { color: var(--ink); font-weight: 600; }
.wc-doors { display: grid; gap: 8px; }
.wc-door {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "ic title" "ic body"; column-gap: 12px; row-gap: 2px;
  align-items: center; width: 100%; min-height: 56px; padding: 10px 12px; text-align: left; cursor: pointer;
  background: rgba(0,0,0,.25); border: 1px solid rgba(201,164,92,.45); border-radius: 6px; color: var(--ink);
}
.wc-door:hover, .wc-door:focus-visible { border-color: var(--gold-bright); background: rgba(90,74,36,.35); }
.wc-ic { grid-area: ic; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--gold); background: #1b2838; color: var(--gold-bright); }
.wc-ic svg { width: 24px; height: 24px; }
.wc-title { grid-area: title; font: normal 16px var(--serif); letter-spacing: .03em; color: var(--gold-bright); }
.wc-body { grid-area: body; font-size: 12.5px; line-height: 1.4; color: var(--ink-dim); }
.wc-foot { display: flex; justify-content: flex-end; margin-top: 14px; }
@media (prefers-reduced-motion: no-preference) { .welcome-card { animation: wc-in .18s ease-out; } }
@keyframes wc-in { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 700px) {
  .welcome-card { padding: 18px 16px 14px; }
  .welcome-card h2 { font-size: 19px; }
  .wc-door { padding: 9px 10px; }
}

#loading {
  position: fixed; inset: 0; display: grid; place-items: center; z-index: 50; background: #0c2238;
  font-family: var(--serif); font-size: 22px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-bright);
}
#loading.error { font-size: 15px; letter-spacing: 0; text-transform: none; padding: 40px; text-align: center; }

/* ---------- the column of cards top left over the map (ext/mapCards.js): the explore panel, «España ahora» ---------- */
/* It ends above the minimap (12px from the bottom, about 185px tall with Spain's 252px width) with a gap of 8px. */
.map-cards {
  position: fixed; top: calc(var(--topbar-h) + 10px); left: calc(12px + var(--dock-left, 0px)); z-index: 11;
  width: 260px; max-height: calc(100vh - var(--topbar-h) - 225px); max-height: calc(100dvh - var(--topbar-h) - 225px);
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.map-cards > * { pointer-events: auto; flex: none; }

/* ---------- the fog of war (ext/explore): its progress panel ---------- */
.explore-panel { order: 0; padding: 10px 12px; font-size: 13px; line-height: 1.4; }
.ex-head { display: flex; align-items: baseline; gap: 8px; }
.explore-panel h2 { flex: 1; margin: 0 0 4px; font-family: var(--serif); font-size: 16px; font-weight: normal; color: var(--gold-bright); }
.ex-fold { border: 0; background: none; color: var(--gold-bright); font-size: 14px; cursor: pointer; padding: 2px 6px; margin: -2px -6px 0 0; }
.explore-panel.folded .ex-more { display: none; }
.ex-line { margin: 0 0 6px; }
.ex-line b { color: var(--gold-bright); font-size: 15px; }
.ex-bar, .ex-mini { display: block; height: 6px; border-radius: 3px; background: rgba(230,215,180,.18); overflow: hidden; }
.ex-bar i, .ex-mini i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }
.ex-hint { margin: 6px 0; font-size: 12px; }
.ex-groups summary { cursor: pointer; color: var(--gold-bright); font-family: var(--serif); margin: 4px 0; }
.ex-groups ol { list-style: none; margin: 0; padding: 0; }
.ex-groups li { display: grid; grid-template-columns: 1fr 54px 44px; align-items: center; gap: 6px; padding: 2px 0; font-size: 12px; }
.ex-groups li b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.ex-groups li.done span:first-child::after { content: " ✓"; color: var(--gold-bright); }
.ex-mini { height: 4px; }
.ex-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- «España ahora» (ext/ahora): the card of today, under the explore panel ---------- */
.ah-card { order: 1; padding: 10px 12px; font-size: 13px; line-height: 1.4; }
.ah-head { display: flex; align-items: baseline; gap: 8px; }
.ah-card h2 { flex: 1; margin: 0 0 4px; font-family: var(--serif); font-size: 16px; font-weight: normal; color: var(--gold-bright); }
.ah-fold { border: 0; background: none; color: var(--gold-bright); font-size: 14px; cursor: pointer; padding: 2px 6px; margin: -2px -6px 0 0; }
.ah-card.folded .ah-more { display: none; }
.ah-card p { margin: 0 0 6px; }
.ah-clock { font-variant-numeric: tabular-nums; }
.ah-list { list-style: none; margin: 0 0 6px; padding: 0; }
.ah-list li { margin: 0 0 4px; }
.ah-link { border: 0; background: none; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ah-link:hover b, button.ah-link:hover { color: var(--gold-bright); }
p > .ah-link { color: var(--gold-bright); }
.ah-when { color: var(--ink-dim); font-size: 12px; }
.ah-rest summary, .ah-exact summary { cursor: pointer; color: var(--gold-bright); margin: 0 0 4px; }
.ah-exact summary { font-family: var(--serif); }
.ah-lines p { font-size: 12px; }
@media (max-width: 700px) {
  .map-cards { top: calc(var(--topbar-h) + var(--credits-h, 0px) + 6px); left: 8px; right: 8px; width: auto; max-height: 45vh; }
  .explore-panel, .ah-card { padding: 8px 10px; }
}

/* ---------- narrower desktops ---------- */
#topbar { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
#topbar::-webkit-scrollbar { display: none; }
/* When the bar still overflows, ui/topbar.js steps #topbar[data-fit] up until every button shows: 1 drops the turn and
   the extension buttons' labels, 2 every button label and the brand text, 3 lets the yields row shrink and scroll on
   its own (.clipped fades its end). Phones scroll the whole bar instead. */
#topbar:is([data-fit="1"], [data-fit="2"], [data-fit="3"]) .turn,
#topbar:is([data-fit="1"], [data-fit="2"], [data-fit="3"]) .btn-ext .lbl,
#topbar:is([data-fit="2"], [data-fit="3"]) .btn .lbl,
#topbar:is([data-fit="2"], [data-fit="3"]) .brand-text { display: none; }
#topbar:is([data-fit="1"], [data-fit="2"], [data-fit="3"]) .btn-ext,
#topbar:is([data-fit="2"], [data-fit="3"]) .btn { padding: 4px 7px; }
#topbar[data-fit="3"] .yields { flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
#topbar[data-fit="3"] .yields::-webkit-scrollbar { display: none; }
#topbar[data-fit="3"] .yields.clipped { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); }
/* Fades at the ends of the bar when it scrolls (ui/topbar.js sets .more-l / .more-r), at every width. Sticky
   pseudo-elements stay at the visible edges; the negative margins cancel their width and the flex gap so they add
   no scroll width. */
#topbar::before, #topbar::after {
  content: ""; position: sticky; flex: none; align-self: stretch; width: 30px; z-index: 1; pointer-events: none;
  opacity: 0; transition: opacity .15s;
}
#topbar::before { order: -3; left: 0; margin-right: calc(-30px - var(--tb-gap)); background: linear-gradient(90deg, #1b2a3a 20%, rgba(27,42,58,0)); }
#topbar::after { order: 99; right: 0; margin-left: calc(-30px - var(--tb-gap)); background: linear-gradient(270deg, #1b2a3a 20%, rgba(27,42,58,0)); }
#topbar.more-l::before, #topbar.more-r::after { opacity: 1; }
/* «Más» (ui/topbarMenu.js, DECISIONS E736): on a phone the top bar's buttons fold into a list under the bar, behind a
   button that stays at the right edge while the yields scroll. A button's name shows in the list; .lbl-menu is a name
   only the list shows (Help, the language switch). */
.tb-more { display: none; }
#topbar .btn .lbl-menu { display: none; }
@media (max-width: 700px) {
  #topbar .tb-more { display: inline-flex; position: sticky; right: 0; order: 98; z-index: 2; }
  #topbar .tb-more .lbl { display: inline; }
  #topbar .tb-buttons { display: none; }
  #topbar.menu-open { z-index: 30; }
  #topbar.menu-open .tb-buttons {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: fixed; top: calc(var(--topbar-h) + 4px); right: 8px; width: max-content; min-width: 200px; max-width: calc(100vw - 16px);
    max-height: calc(100vh - var(--topbar-h) - 16px); max-height: calc(100dvh - var(--topbar-h) - 16px); overflow-y: auto;
    padding: 6px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 8px 24px rgba(0,0,0,.45);
  }
  #topbar.menu-open .tb-buttons .btn { justify-content: flex-start; min-height: 40px; padding: 6px 12px; font-size: 14px; }
  #topbar.menu-open .tb-buttons .btn .lbl { display: inline; }
}
/* The "Turn" label is the first thing to go when the bar is short of room (it needs about 1360px). */
@media (max-width: 1380px) { .turn { display: none; } }
@media (max-width: 1200px) {
  #topbar { --tb-gap: 12px; }
  .yields { gap: 10px; }
  .yield { font-size: 13px; }
  .btn .lbl { display: none; }
  .btn { padding: 4px 7px; }
  .search { flex-basis: 180px; min-width: 130px; }
}
@media (max-width: 1000px) and (min-width: 701px) {
  .brand-text { display: none; }
  .lp-body { grid-template-columns: 1fr; }
  #topbar { --tb-gap: 10px; padding: 0 10px; }
  .yields { gap: 8px; }
  .yield { font-size: 12.5px; gap: 4px; }
  .search { flex: 0 1 150px; min-width: 112px; }
  /* With a panel open there is no room for the dock beside the minimap: hide the minimap, give the dock the width. */
  body.panel-open #minimap-wrap { display: none; }
  body.panel-open #lens-area { left: calc(12px + var(--dock-left, 0px)); }
}

/* ---------- phones ---------- */
@media (max-width: 700px) {
  #topbar { --tb-gap: 10px; padding: 0 8px; -webkit-overflow-scrolling: touch; }
  .brand-text { display: none; }
  .spacer { display: none; }
  .search { flex: 0 0 160px; min-width: 160px; order: -1; margin-left: 4px; }
  .brand { order: -2; }
  .search-kbd { display: none; }
  .yields { gap: 10px; }

  #lens-area { left: 0; right: 0; bottom: 0; gap: 6px; align-items: stretch; z-index: 13; }
  body.panel-open #lens-area { right: 0; }
  .lens-dock { border-radius: 10px 10px 0 0; border-left: none; border-right: none; border-bottom: none; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .lens-quick { flex: 1; }
  .res-toggle span, .lens-more span:not(.caret) { display: none; }
  .map-layers-pop { margin: 0 8px; width: auto; align-self: stretch; }
  .ml-row { min-height: 42px; }
  .legend { width: auto; margin: 0 8px; }
  .legend .desc { display: none; }
  .legend.touch-details.expanded .desc { display: block; max-height: 40vh; overflow-y: auto; -webkit-line-clamp: unset; }
  .lg-cmp-toggle { min-height: 32px; padding: 2px 10px; }
  /* Finger targets of 40 px: the round buttons (✕ of every panel, the legend's) and the top bar's buttons reach out
     with an invisible ::after, so they keep their size; the game's tabs, in a row that scrolls (and so clips), and the
     panels' buttons grow. */
  :where(.icon-btn, #topbar .btn) { position: relative; }
  .icon-btn::after, #topbar .btn::after {
    content: ""; position: absolute; inset: min(0px, calc((100% - 40px) / 2)) min(0px, calc((100% - 40px) / 2));
  }
  .gm-tab { min-height: 40px; }
  .btn:not(#topbar .btn) { min-height: 40px; }
  /* ...and its details toggle is the way to expand it. */
  .legend.touch-details .lg-more { display: inline-grid; place-items: center; }
  .lens-picker { width: auto; margin: 0 8px; max-height: 60vh; }
  .lp-body { grid-template-columns: 1fr; }

  .map-credits { top: var(--topbar-h); right: 0; bottom: auto; left: 0; max-width: none; border-radius: 0; padding: 2px 8px; font-size: 10px; text-align: center; }
  .map-credits ~ #lens-area, .map-credits ~ #city-panel { bottom: 0; }
  #minimap-wrap { display: none; bottom: 64px; left: 8px; }
  body.minimap-on #minimap-wrap { display: block; }
  .minimap-toggle {
    display: grid; place-items: center; position: fixed; left: 8px; bottom: 60px; z-index: 11; width: 38px; height: 38px; padding: 0;
    cursor: pointer; color: var(--gold-bright); border-radius: 50%;
  }
  body.minimap-on .minimap-toggle { bottom: auto; top: 50px; }
  body.panel-open .minimap-toggle, body.panel-open #minimap-wrap { display: none; }

  /* body.phone-labels (page setting phone_labels, DECISIONS E329, E737): every bottom-bar button is a column with its
     icon over a label of at most two lines, and the row shares the width, so nothing scrolls sideways. A lens with a
     short label (.has-short, ui/lenses.js lensShort) shows it, and its full name stays in the button's text for screen
     readers. Labels wrap at spaces only: a word wider than its column takes a smaller font (ui/lenses.js
     fitDockLabels), never a hyphen or «…». The selectors outrank the rules above that leave icons only. */
  body.phone-labels .lens-dock { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; align-items: stretch; }
  body.phone-labels .lens-quick { display: contents; } /* its buttons take their own columns of the dock's grid */
  body.phone-labels .lens-dock .lens-btn {
    min-width: 0; margin: 0; position: relative; flex-direction: column; justify-content: center; gap: 2px;
    padding: 4px 0; font-size: 10px; line-height: 1.15; white-space: normal;
  }
  body.phone-labels .lens-quick .lens-btn span:not(.emoji),
  body.phone-labels .lens-quick.icons .lens-btn:not(.active) span:not(.emoji),
  body.phone-labels .res-toggle span:not(.emoji),
  body.phone-labels .lens-more span:not(.caret):not(.emoji) {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%;
    text-align: center; -webkit-hyphens: manual; hyphens: manual;
  }
  body.phone-labels .lens-dock .lens-btn.has-short > .lens-name {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  body.phone-labels .lens-more .caret { position: absolute; top: 2px; right: 3px; font-size: 8px; }
  body.phone-labels .map-layers-btn .ml-count {
    position: absolute; top: 2px; left: calc(50% + 4px); min-width: 13px; height: 13px; padding: 0 2px; font-size: 9px; line-height: 13px;
  }
  body.phone-labels .minimap-toggle { bottom: calc(72px + env(safe-area-inset-bottom)); }
  body.phone-labels #minimap-wrap { bottom: calc(76px + env(safe-area-inset-bottom)); }
  /* A folded credit strip shows the licence notices only (page setting credits_fold, E330, F137): web/js/ext/credits
     marks it .foldable, opens it on load, folds it on the first use of the map, and adds the button. */
  .map-credits.foldable:not(.open) .mc-more { display: none; }
  .map-credits.foldable .mc-toggle {
    display: inline; margin-left: 6px; padding: 0 2px; min-height: 0; background: none; border: 0; cursor: pointer;
    font: inherit; color: var(--gold-bright); text-decoration: underline;
  }

  #city-panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 55vh; height: 55dvh; z-index: 25;
    border-radius: 14px 14px 0 0; border-left: none; border-right: none; border-bottom: none;
    padding-bottom: calc(12px + env(safe-area-inset-bottom)); transition: transform .18s ease-out;
    box-shadow: 0 -8px 30px rgba(0,0,0,.55);
  }
  #city-panel.dragging-sheet { transition: none; }
  /* A tapped tooltip (touch_details) near the bottom of the map stays over the dock's sheet, not under it. */
  .tooltip { z-index: 26; }
  .app-dock {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; height: 55vh; height: 55dvh; z-index: 24;
    border-radius: 14px 14px 0 0; border: 1px solid var(--line); border-bottom: none; border-left: none; border-right: none;
    padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -8px 30px rgba(0,0,0,.55);
  }
  .sheet-grip { display: block; position: sticky; top: 0; z-index: 2; height: 18px; margin-bottom: -18px; touch-action: none; }
  .sheet-grip::before { content: ""; position: absolute; left: 50%; top: 6px; width: 44px; height: 4px; margin-left: -22px; border-radius: 2px; background: rgba(201,164,92,.6); }
  .cp-head { padding-top: 18px; touch-action: none; }
  .cp-close { top: 14px; width: 32px; height: 32px; }
  .cp-name { font-size: 21px; }
  .yield-tile .val { font-size: 13px; }

  .modal-card { grid-template-columns: 1fr; grid-template-rows: auto 1fr; width: 100vw; height: 100%; height: 100dvh; border-radius: 0; }
  #pedia-nav { display: flex; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); padding: 8px 44px 8px 0; }
  #pedia-nav .hd { display: none; }
  .modal-card .close { background: #1c2836; top: 7px; right: 8px; }
  #pedia-nav button { width: auto; white-space: nowrap; padding: 6px 12px; }
  #pedia-body { padding: 14px 16px; }
  .help-card { padding: 16px; }
  .toast { top: 50px; }

  .yield-report {
    left: 0 !important; right: 0; width: auto; max-width: none; z-index: 28;
    max-height: calc(100vh - var(--topbar-h) - 64px); max-height: calc(100dvh - var(--topbar-h) - 64px);
    border-radius: 0 0 12px 12px; border-left: none; border-right: none; border-top-width: 2px;
  }
  .yr-total > b { font-size: 30px; }
  .yr-row { padding: 7px 8px; }
}

/* ---------- the general elections (ext/elecciones) ---------- */
.el-swatch { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; vertical-align: baseline; }
/* the pantry (ext/despensa): a chip per food, the sentence and the fold with the exact series */
.dp-chips { margin: 2px 0 8px; }
.dp-chip { font-size: 12px; letter-spacing: 0; padding: 2px 8px; }
.dp-say { margin: 4px 0 0; }
.dp-fold { margin: 10px 0 0; }
.dp-fold summary { cursor: pointer; color: var(--gold-bright); font-size: 13px; }
.dp-fold .cl-table { margin-top: 4px; }
.dp-fold .cl-table th[scope="row"] { text-transform: none; } /* community names keep their own case («Región de Murcia») */
/* «Un día en España» (ext/unDia): the time over its slider, the chips, the day chart and its legend; the fold is the pantry's */
.ud-say { margin: 8px 0 4px; }
.ud-time { display: flex; align-items: center; gap: 8px; }
.ud-clock b { font-family: var(--serif); font-size: 22px; color: var(--gold-bright); font-weight: normal; font-variant-numeric: tabular-nums; }
.ud-chips { margin: 4px 0; }
.ud-chips .chip { font-size: 12px; letter-spacing: 0; padding: 2px 8px; }
.ud-chart { margin: 8px 0 0; }
.ud-chart figcaption { font-size: 12px; }
.ud-chart svg { display: block; width: 100%; height: auto; }
.ud-cursor { stroke: var(--gold-bright); stroke-width: 1; opacity: .7; }
.ud-ticks text { font-size: 8px; fill: var(--ink-dim); }
.ud-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 2px 0 0; font-size: 11px; color: var(--ink-dim); }
.ud-legend i { display: inline-block; width: 10px; height: 3px; margin-right: 4px; vertical-align: middle; border-radius: 1px; }
.ud-verdicts { margin: 6px 0 0; font-size: 12px; }
.el-share { font-weight: normal; font-variant-numeric: tabular-nums; }
/* the vote lens's option picker (ext/elecciones): its own row, the select as wide as the panel lets it */
.el-option { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.el-option select { max-width: 100%; }
.el-option option, .el-option optgroup { color: #111; }
.wk-note a { color: var(--gold-bright); }
.em-status { margin: 4px 0 0; font-size: 12px; color: var(--gold-bright); }
.em-status:empty { display: none; }
.em-status.em-error { color: #f0a08a; }
.wk-btn:disabled, .wk-steps .icon-btn:disabled, .wk-year select:disabled { opacity: .45; cursor: default; }

/* the play control every panel with a play shares (web/js/ext/playback.js): the toggle and the ×1 ×2 ×4 group */
.pb { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pb-speed { display: inline-flex; }
.pb-speed > button + button { margin-left: -1px; }
.pb-label { font-size: 11px; color: var(--ink-dim); margin-left: 4px; }
/* on phones the control takes a row of its own, so it never pushes the panel's other buttons onto a broken row */
@media (max-width: 700px) { .pb { flex-basis: 100%; } .pb button { min-height: 32px; } }

/* the warnings panel (web/js/ext/avisos): the bars are rows to read, not buttons; the year shown has a gold edge;
   finger-sized year arrows and chips on phones (the play control keeps the 32 px it has in every panel) */
.wk-row.wk-fixed { cursor: default; border-left: 3px solid transparent; }
.wk-row.wk-fixed:hover { background: none; }
.wk-row.wk-fixed[aria-current="true"] { border-left-color: var(--gold); }
.wk-row.wk-fixed[aria-current="true"] .wk-name { color: var(--gold-bright); }
@media (max-width: 700px) {
  .av-ctl .icon-btn { width: 40px; height: 40px; }
  .av-ctl .wk-btn:not(.pb *), .av-ctl select { min-height: 40px; }
}

/* the wildfires day by day (web/js/ext/incendios): the chart's day box and the picked fire in the list */
.ic-cursor { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .8; }
.ic-passes { margin: 2px 0 6px; }
.ic-passes li { padding: 1px 0; }
.wk-row[aria-pressed="true"] .wk-name { color: var(--gold-bright); }
button.wk-row[aria-current="true"] { background: rgba(90,74,36,.3); }
button.wk-row[aria-current="true"] .wk-name { color: var(--gold-bright); }

/* the air lenses' panel (web/js/ext/aire): three pollutant tabs on one row */
.ai-tabs { grid-template-columns: repeat(3, 1fr); }
/* The game's modes (ext/game/modes.js) and its result legend */
.gm-modes-box, .gm-level-box { margin: 4px 0 8px; }
.gm-modes-box summary, .gm-level-box summary { cursor: pointer; font-family: var(--serif); font-size: 14px; color: var(--gold-bright); }
.gm-modes { margin: 6px 0 10px; padding: 6px 10px 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); }
.gm-modes p { margin: 4px 0; font-size: 12px; }
.gm-mode { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; cursor: pointer; }
.gm-mode input { margin: 3px 0 0; accent-color: var(--gold); flex: none; }
.gm-mode b { font-weight: normal; color: var(--ink); }
.gm-mode .muted { display: block; font-size: 12px; }
.gm-mode.locked { cursor: default; }
.gm-mode.locked b { color: var(--ink-dim); }
.gm-mode-badge { display: inline-block; margin: 4px 0 8px; padding: 2px 8px; border: 1px solid var(--gold); border-radius: 10px; font-size: 12px; color: var(--gold-bright); }
.gm-unlock { color: var(--gold-bright); }
.gm-bands { margin: -2px 0 8px; font-size: 12px; }
.gm-mode-note { margin: 4px 0 6px; font-size: 12px; }
/* The level (ext/game/levels.js): a fold like the mode chooser's; after the first guess its summary is a badge beside
   the mode's */
.gm-level-box p { margin: 4px 0; font-size: 12px; }
.gm-level-box.gm-level-on { display: inline-block; margin: 0 6px 0 0; vertical-align: top; }
.gm-level-box summary.gm-mode-badge { font-family: inherit; font-size: 12px; }
.gm-buttons .btn[aria-busy="true"] { cursor: progress; }

/* ¿Dónde te mudarías? (web/js/ext/mudarte): criteria with direction and importance (the climate's .cl-opt buttons),
   then the ranking; each row wraps under 400 px so a phone never scrolls sideways */
.mu-crits, .mu-list, .mu-vals, .mu-rules { list-style: none; margin: 0; padding: 0; }
.mu-crit {
  display: grid; grid-template-columns: 7.5em minmax(0, 1fr); grid-template-areas: "name dir" "name ws"; gap: 3px 6px;
  align-items: center; padding: 4px 0; border-bottom: 1px solid rgba(201,164,92,.14);
}
.mu-cname { grid-area: name; overflow-wrap: anywhere; }
/* The direction is a switch: a pill with the flip glyph at its end and a hover, so it does not read as a text box. */
.mu-dir {
  grid-area: dir; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 32px;
  text-align: left; border-radius: 16px; cursor: pointer;
}
.mu-dir:hover { border-color: var(--gold); }
.mu-dir-flip { color: var(--gold); font-size: 1.05em; }
.mu-ws { grid-area: ws; display: grid; grid-template-columns: auto repeat(3, minmax(32px, 1fr)); gap: 3px; }
.mu-w { min-height: 32px; min-width: 32px; padding: 2px 6px; }
.mu-status { margin: 10px 0 4px; color: var(--gold-bright); }
.mu-row { padding: 4px 0 6px; border-bottom: 1px solid rgba(201,164,92,.18); }
.mu-row.on { background: rgba(90,74,36,.3); }
.mu-go {
  display: grid; grid-template-columns: 3.2em minmax(0, 1fr) auto; gap: 6px; align-items: baseline; width: 100%;
  min-height: 32px; padding: 4px 6px; text-align: left; background: none; color: inherit; font: inherit; border: none; cursor: pointer;
}
.mu-go:hover, .mu-go:focus-visible { background: rgba(90,74,36,.3); }
.mu-rank, .mu-score { font-variant-numeric: tabular-nums; }
.mu-name { font-weight: 600; overflow-wrap: anywhere; }
.mu-score { color: var(--gold-bright); }
.mu-v { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) 56px; gap: 0 6px; align-items: center; padding: 1px 6px; font-size: 12px; }
.mu-vname { color: var(--ink-dim); overflow-wrap: anywhere; }
.mu-vval { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mu-pbar { height: 5px; background: rgba(0,0,0,.35); border-radius: 2px; overflow: hidden; }
.mu-pbar i { display: block; height: 100%; background: var(--gold-bright); border-radius: 2px; }
.mu-detail { grid-column: 2 / -1; font-size: 11px; overflow-wrap: anywhere; }
.mu-open {
  min-height: 32px; margin: 2px 0 0 6px; padding: 2px 6px; background: none; border: none; color: var(--gold-bright);
  font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer;
}
.mu-all { width: 100%; min-height: 32px; margin: 6px 0; }
.mu-details { margin: 8px 0; font-size: 12px; }
.mu-details summary { min-height: 32px; display: flex; align-items: center; cursor: pointer; color: var(--gold-bright); }
/* The numbers on the map: a pointer over one, and the minimap gives way to the Canaries' pills while they show. */
#map.mu-hot:not(.dragging) { cursor: pointer; }
body.mu-pills #minimap-wrap, body.mu-pills .minimap-toggle { display: none; }
.mu-rules li { margin: 0 0 6px; overflow-wrap: anywhere; }
@media (max-width: 400px) {
  .mu-crit { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "dir" "ws"; }
  .mu-v { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mu-pbar, .mu-detail { grid-column: 1 / -1; }
}

/* the surnames panel (web/js/ext/apellidos): the search field, and the provinces table, sortable by its headers */
.ap-search label { display: block; margin: 2px 0 4px; font-size: 13px; color: var(--ink-dim); }
.ap-row { display: flex; gap: 6px; }
.ap-row input { flex: 1; min-width: 0; padding: 6px 8px; background: rgba(0,0,0,.3); color: var(--ink); border: 1px solid var(--line);
  border-radius: 4px; font: inherit; text-transform: uppercase; color-scheme: dark; }
.ap-how { margin: 4px 0 8px; font-size: 12px; }
.ap-link a { color: var(--gold-bright); }
.ap-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.ap-table th, .ap-table td { padding: 3px 2px; text-align: left; border-bottom: 1px solid rgba(201,164,92,.18); }
.ap-table td:last-child, .ap-table td.ap-num { text-align: right; }
.ap-table tbody tr { cursor: pointer; }
.ap-table tbody tr:hover, .ap-table tbody tr:focus { background: rgba(90,74,36,.35); outline: none; }
.ap-sort { padding: 0; background: none; border: 0; color: var(--gold-bright); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
@media (max-width: 700px) { .ap-row input, .ap-row .wk-btn { min-height: 40px; } }

/* the route panel (web/js/ext/rutas): departure and destination rows, the result, the game */
.rt-end { margin: 6px 0; padding: 6px 8px; border: 1px solid rgba(201,164,92,.3); border-radius: 6px; }
.rt-end-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.rt-place { margin: 4px 0; font-weight: 600; overflow-wrap: anywhere; }
.rt-end select { width: 100%; }
.rt-swap { display: block; margin: 0 auto; }
.rt-result p, .rt-question { margin: 4px 0; }
.rt-question { font-family: var(--serif); font-size: 15px; }
.rt-slider { flex: 1; min-width: 0; }
.rt-speeds summary, .rt-rules summary { cursor: pointer; margin: 8px 0 4px; color: var(--gold-bright); }
.rt-speeds table td { text-align: right; }
.rt-speeds th[scope="row"] { text-transform: none; } /* Spanish road types stay in sentence case */
.rt-rules p { margin: 4px 0; }
.rt-daytrip { margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(201,164,92,.3); }
.rt-daytrip-head { color: var(--gold-bright); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 700px) {
  .rt-end .wk-btn, .rt-swap, .rt-end select { min-height: 40px; }
}

/* «Tres ciudades» (web/js/ext/game/partidaPanel.js): the turn bar, the preview, the city cards, the log and the end */
.pt h4 { margin: 8px 0 4px; font-family: var(--serif); font-weight: normal; color: var(--gold-bright); font-size: 15px; }
.pt p { margin: 4px 0; }
.pt-notice { padding: 6px 8px; border: 1px solid var(--gold); border-radius: 6px; background: rgba(90,74,36,.35); }
.pt-modes { display: flex; gap: 14px; margin: 6px 0; padding: 0; border: 0; }
.pt-modes label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.pt-scenario { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 6px 0; font-size: 13px; }
.pt-scenario .btn { flex: none; }
.pt-modes input { margin: 0; accent-color: var(--gold); }
/* Sticky flush with the dock's top edge (top: minus .game-dock's top padding), so nothing scrolls past above it. */
.pt-turn { position: sticky; top: -12px; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 6px 0; padding: 6px 8px; background: #16222e; border: 1px solid rgba(201,164,92,.45); border-radius: 6px; }
.pt-turn { flex-wrap: wrap; }
.pt-turn p { margin: 0; }
.pt-turn-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.pt-explore[aria-pressed="true"] { border-color: #bfe3ff; color: #bfe3ff; }
.pt-terrain { font-size: 13px; color: var(--ink-dim); }
.pt-preview:not(:empty) { margin: 6px 0; padding: 4px 8px; border: 1px dashed rgba(255,241,196,.6); border-radius: 6px; }
.pt-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.pt-chip { padding: 2px 6px; border-radius: 10px; background: rgba(0,0,0,.3); border: 1px solid rgba(201,164,92,.3); font-size: 12px;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.pt-chip b { color: var(--gold-bright); font-weight: 600; }
.pt-est { padding: 0 4px; border-radius: 6px; background: rgba(201,164,92,.25); color: var(--ink); font-size: 10px; letter-spacing: .02em; }
/* The entorno (E504): a game rule, not data, so its chip has a tag of its own and a green edge. */
.pt-rule { background: rgba(110,170,120,.28); }
.pt-chip.pt-entorno { border-color: rgba(120,190,130,.55); }
.pt-chip.pt-oficios { border-color: rgba(127,178,229,.55); }
.pt-voc h4 { margin: 8px 0 2px; font-size: 13px; }
.pt-voc p { margin: 2px 0; }
.pt-chip.pt-voc-chip { display: inline-flex; align-items: center; gap: 4px; border-color: var(--pt); }
.pt-voc-hint { margin: 2px 0; font-size: 12px; }
/* The oficios bar of «Tres ciudades» (A350): five groups of those who state an occupation. */
.pt-of { margin: 4px 0; font-size: 13px; }
.pt-of p { margin: 2px 0; }
.pt-of-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: rgba(0,0,0,.3); }
.pt-of-bar span { display: block; height: 100%; }
.pt-of-legend { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 3px 0; padding: 0; list-style: none; font-size: 11px; color: var(--ink-dim); }
.pt-of-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 2px; }
.pt-of-tec { background: #7fb2e5; }
.pt-of-art { background: #e0a458; }
.pt-of-campo { background: #8cc084; }
.pt-of-serv { background: #c98bb9; }
.pt-of-otros { background: #9d978a; }
.pt-why { margin: 2px 0; padding-left: 16px; font-size: 13px; }
.pt-pat, .pt-hint, .pt-why-line { font-size: 12px; }
.pt-why-line { margin: 2px 0; }
.pt-cities { list-style: none; margin: 6px 0; padding: 0; }
.pt-city, .pt-end { scroll-margin-top: 64px; }
.pt-new { margin-top: 6px; }
.pt-city { margin: 6px 0; padding: 4px 8px 6px; border-left: 4px solid var(--pt); border-radius: 4px; background: rgba(0,0,0,.18); }
.pt-dot { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: var(--pt); }
.pt-wonders, .pt-res { margin: 4px 0; padding-left: 16px; font-size: 13px; }
.pt-res li { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.pt-res li span { overflow-wrap: anywhere; }
.pt-lens { flex: none; }
.pt-gold { font-size: 13px; color: var(--ink-dim); }
.pt-exact summary, .pt-rules summary, .pt-log summary, .pt-voice summary, .pt-nota-fold summary { cursor: pointer; margin: 6px 0 2px; color: var(--gold-bright); }
.pt-exact table, .pt-score, .pt-nota-exact { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.pt-exact th, .pt-exact td, .pt-score th, .pt-score td, .pt-nota-exact th, .pt-nota-exact td { padding: 2px 3px; text-align: left; border-bottom: 1px solid rgba(201,164,92,.18); }
.pt-score td { text-align: right; }
.pt-score-box { overflow-x: auto; }
.pt-log ol { margin: 4px 0; padding-left: 18px; font-size: 13px; }
.pt-voices { margin: 6px 0; padding: 4px 8px; border: 1px solid rgba(201,164,92,.3); border-radius: 6px; }
.pt-voice { margin: 4px 0; font-size: 13px; }
.pt-total { font-family: var(--serif); font-size: 18px; }
.pt-total b { font-size: 30px; color: var(--gold-bright); font-weight: normal; }
.pt-victory { display: inline-block; padding: 2px 8px; border-radius: 10px; background: rgba(90,74,36,.6); border: 1px solid var(--gold-bright); color: var(--gold-bright); }
.pt-rival { padding: 4px 8px; border-left: 3px dashed #d8d2c4; }
.pt-nota { font-family: var(--serif); font-size: 15px; }
.pt-nota-fold { margin: 4px 0 8px; padding: 2px 0 6px 6px; border-left: 3px dashed #d8d2c4; overflow-x: auto; }
.pt-nota-fold p { font-size: 12px; }
.pt-nota-exact { margin: 6px 0; }
.pt-nota-exact td { text-align: right; }
.pt-legend { font-size: 12px; }
/* «Que gobierne un consejero» (A213): the hand-over fold under the turn bar and the advisors' games at the end */
.pt-gov { margin: 6px 0; padding: 2px 8px; border: 1px dashed rgba(201,164,92,.45); border-radius: 6px; }
.pt-gov summary { cursor: pointer; margin: 4px 0; color: var(--gold-bright); }
.pt-gov ul, .pt-advs ul { list-style: none; margin: 4px 0; padding: 0; }
.pt-gov li { display: flex; align-items: baseline; gap: 8px; margin: 4px 0; font-size: 13px; }
.pt-gov .btn { flex: none; min-width: 7.5em; }
.pt-advs li { margin: 6px 0; padding: 4px 8px; border-radius: 4px; background: rgba(0,0,0,.18); font-size: 13px; overflow-wrap: anywhere; }
.pt-advs .pt-victory { margin-left: 4px; padding: 0 6px; font-size: 11px; }
/* The recetario of «Tres ciudades» (ext/game/recetarioPanel.js). */
.rc { margin: 8px 0; padding: 4px 8px 8px; border: 1px solid rgba(201,164,92,.3); border-radius: 6px; scroll-margin-top: 64px; }
.rc-sub { margin: 6px 0 2px; font-size: 12px; color: var(--ink-dim); }
.rc-chip { padding: 2px 6px; border-radius: 10px; background: rgba(0,0,0,.3); border: 1px solid rgba(201,164,92,.3); font-size: 12px; }
.rc-brings { font-size: 13px; }
.rc-toggle { margin-top: 6px; }
.rc-group h5 { margin: 10px 0 4px; font: 13px var(--sans); color: var(--gold-bright); }
.rc-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; }
.rc-card { min-width: 0; padding: 4px 6px; border: 1px dashed rgba(201,164,92,.3); border-radius: 6px; font-size: 12px; color: var(--ink-dim); overflow-wrap: anywhere; }
.rc-card.got { border-style: solid; border-color: rgba(201,164,92,.55); background: rgba(0,0,0,.18); color: var(--ink); }
.rc-name { display: block; font-family: var(--serif); font-size: 14px; }
.rc-name::first-letter { text-transform: uppercase; }
.rc-card:not(.got) .rc-name { opacity: .7; }
.rc-day { display: block; font-size: 11px; }
.rc-card p { margin: 3px 0; font-size: 12px; }
.rc-link { font-size: 11px; color: var(--gold-bright); }
.rc-found summary, .rc-outside summary { cursor: pointer; margin: 10px 0 2px; color: var(--gold-bright); }
.rc-outside ul { margin: 4px 0; padding-left: 16px; font-size: 12px; }
.rc-outside a { color: var(--gold-bright); }
/* The ranks of «Tres ciudades» (rangoPanel.js): the law's link in the city's fold. */
.rg-law a { color: var(--gold-bright); }
@media (max-width: 700px) {
  .pt-turn { top: -18px; }
  .pt-turn .btn, .pt-select, .pt-lens, .pt-modes label, .pt-gov .btn, .pt-switch, .pt-ghost, .rc-toggle { min-height: 40px; }
}

/* ---------- «Eclipses de Sol» (ext/eclipses) ---------- */
/* The minimap sits over the Canaries' inset, which the shadow crosses: it gives way while the panel is open. */
body.ecl-open #minimap-wrap, body.ecl-open .minimap-toggle { display: none; }
.ecl-picks, .ecl-views { margin: 10px 0 4px; }
.ecl-when { margin: 4px 0; color: var(--ink-dim); }
.ecl-headline { margin: 8px 0 4px; font-family: var(--serif); font-size: 16px; color: var(--gold-bright); }
.ecl-fold summary { cursor: pointer; color: var(--gold); }
.ecl-fold p { margin: 4px 0; font-size: 12px; }
.ecl-sub { margin: 14px 0 2px; font: normal 15px var(--serif); color: var(--gold-bright); }
.ecl-moment, .ecl-now { margin: 2px 0; }
.ecl-now { color: var(--gold-bright); }
.ecl-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; }
.ecl-key { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0; font-size: 12px; }
.ecl-key i { display: inline-block; width: 12px; height: 12px; margin-right: 4px; vertical-align: -2px; border: 1px solid rgba(201,164,92,.5); }
.ecl-safety { margin: 10px 0 0; font-size: 12px; }
/* the bathing-water panel (web/js/ext/aguas): the counts, the report's figures and the rule in folds */
.ab-counts p { margin: 3px 0; }
.ab-fold { margin: 6px 0; font-size: 12px; }
.ab-fold summary { cursor: pointer; margin: 4px 0; color: var(--gold-bright); }
.ab-fold .cl-table { margin: 4px 0; }
.ab-off { padding-left: 16px; font-size: 12px; }
.ab-poor .wk-row { border-left: 3px solid transparent; }
.ab-poor .wk-row[aria-current="true"] { border-left-color: var(--gold); background: rgba(90,74,36,.3); }
.ab-poor .wk-row[aria-current="true"] .wk-name { color: var(--gold-bright); } /* the point shown above the list */
.ab-fold p { overflow-wrap: anywhere; }
.ab-fold .cl-table th[scope="row"] { text-transform: none; } /* «Sin clasificar», as the legend writes it */
.tu-fold .cl-table th[scope="row"] { text-transform: none; } /* «De residentes, a otra provincia», a phrase */
.tu-pass { padding: 0 4px; border: 1px solid var(--gold); border-radius: 3px; color: var(--gold-bright); font-size: 10.5px; white-space: nowrap; }
.ab-links { padding-left: 16px; margin: 4px 0; }
.ab-links a { color: var(--gold-bright); }
/* «Cazador y presa» (web/js/ext/cazador): the pairs' lens buttons wrap, the wolf strategy's quote, and the province
   table of the fold, which scrolls sideways inside the dock rather than widening the page. */
.cz-btns { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.cz-top { margin: 6px 0 0; }
.cz-cite a, .cz-exact a { color: var(--gold-bright); }
.cz-exact { margin-top: 10px; font-size: 12px; }
.cz-exact summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; color: var(--gold-bright); }
/* The table is wider than the dock: the province column stays put, and a shadow on the right edge says there is more
   until the scroll reaches it (the cover scrolls with the table, the shadow stays). */
.cz-scroll { overflow-x: auto; margin-top: 6px;
  background: linear-gradient(to left, #101923 40%, rgba(16, 25, 35, 0)) right / 24px 100% no-repeat local,
              radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0)) right / 12px 100% no-repeat scroll; }
.cz-table { border-collapse: collapse; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cz-table th, .cz-table td { padding: 2px 4px; text-align: right; border-bottom: 1px solid var(--line); }
.cz-table th:first-child { position: sticky; left: 0; text-align: left; background: #101923; /* --panel without its alpha */ }
.cz-table th[scope="row"] { font-weight: normal; }
.cz-table .cz-spain th, .cz-table .cz-spain td { font-weight: bold; }
@media (max-width: 700px) { .cz-btns .tl-btn { min-height: 40px; } }
/* «Choques con animales» (ext/choques): the month and hour strips; a bar is a filter, the others dim while one is on */
.ch-strip svg { cursor: default; }
.ch-bar { fill: var(--gold); cursor: pointer; }
.ch-bar:hover { fill: var(--gold-bright); }
.ch-bar.ch-off { opacity: .35; }
.ch-hint { margin: 2px 0 0; font-size: 12px; }
/* ---------- «Cada 100 € del ayuntamiento» (ext/cien) ---------- */
.cn-sides { display: flex; gap: 6px; margin: 8px 0 6px; }
.cn-slice { border-left: 3px solid transparent; }
.cn-slice[aria-pressed="true"] { border-left-color: var(--gold-bright); background: rgba(90,74,36,.35); }
.cn-results { margin: 4px 0; }
.cn-town { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin: 10px 0 4px; }
.cn-town b { font-family: var(--serif); font-size: 17px; font-weight: normal; color: var(--gold-bright); }
.cn-h4 { margin: 10px 0 2px; font-size: 13px; font-weight: 600; color: var(--ink); }
.cn-bar { cursor: default; }
.cn-exact summary { cursor: pointer; margin: 10px 0 4px; color: var(--gold-bright); }
.cn-exact th[colspan] { padding-top: 6px; color: var(--gold-bright); }
@media (max-width: 700px) { .cn-sides .wk-btn, .cn-results .dk-item { min-height: 40px; } }
/* the game's Camino tab (ext/game/caminoPanel.js) */
.gm-camino p { margin: 0 0 8px; }
.gm-camino-next { font-family: var(--serif); font-size: 15px; color: var(--gold-bright); }
.gm-camino-ficha, .gm-camino-how { margin: 4px 0 10px; font-size: 13px; }
.gm-camino-ficha summary, .gm-camino-how summary { cursor: pointer; color: var(--ink-dim); }
.gm-camino-ficha[open] summary, .gm-camino-how[open] summary { margin-bottom: 6px; }
.gm-camino-ficha a, .gm-camino-how a { color: var(--gold-bright); }
.gm-camino-grid { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.gm-camino-box { position: relative; min-height: 64px; padding: 16px 6px 6px; border: 1px dashed var(--line); border-radius: 6px; display: flex; flex-direction: column; gap: 1px; font-size: 11px; line-height: 1.25; overflow-wrap: anywhere; }
.gm-camino-box.stamped { border: 1px solid var(--gold); background: rgba(242,194,48,.12); }
.gm-camino-box b { font-family: var(--serif); font-size: 13px; font-weight: normal; color: var(--gold-bright); }
.gm-camino-n { position: absolute; top: 3px; left: 6px; font-size: 10px; color: var(--ink-dim); }
.gm-camino-note { font-size: 13px; }
/* the game's «Una vida» tab (ext/game/vidaPanel.js) */
.gm-vida p { margin: 0 0 8px; }
.gm-vida-form { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 6px 0; }
.gm-vida-form > label { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--ink-dim); font-size: 12px; }
.gm-vida-form select { max-width: 100%; background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 4px; font: inherit; font-size: 13px; }
.gm-vida-sex { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 0; padding: 0; border: 0; font-size: 13px; }
.gm-vida-sex legend { width: 100%; padding: 0; color: var(--ink-dim); font-size: 12px; }
.gm-vida-hint { font-size: 12px; }
.gm-vida-note { color: var(--gold-bright); font-size: 13px; }
.gm-vida-steps { list-style: none; margin: 10px 0 6px; padding: 0; }
.gm-vida-step { margin: 0 0 10px; padding-left: 10px; border-left: 2px solid var(--line); }
.gm-vida-main { font-family: var(--serif); font-size: 15px; color: var(--gold-bright); }
.gm-vida-fig { font-size: 13px; }
.gm-vida-fold { margin: 2px 0 4px; font-size: 12px; color: var(--ink-dim); }
.gm-vida-fold summary { cursor: pointer; }
.gm-vida-fold[open] summary { margin-bottom: 6px; }
.gm-vida-fold a, .gm-vida-source a { color: var(--gold-bright); }
.gm-vida-bar { margin: 6px 0 8px; }
.gm-vida-bar svg { display: block; width: 100%; height: auto; }
.gm-vida-bar figcaption { display: flex; justify-content: space-between; font-size: 12px; }
.gm-vida-key { display: flex; gap: 10px; }
.gm-vida-key span { display: inline-flex; align-items: center; gap: 3px; }
.gm-vida-key svg { width: 5px; height: 16px; }
.gm-vida-line { stroke: var(--ink-dim); stroke-width: 2; }
.gm-vida-dot { fill: var(--gold-bright); }
.gm-vida-tick { stroke: var(--gold-bright); stroke-width: 2; }
.gm-vida-tick-child { stroke: var(--ink); }
.gm-vida-source { font-size: 12px; }
/* «Andar en agosto» (ext/game/agostoPanel.js) */
.gm-agosto { margin: 10px 0 4px; border-top: 1px solid var(--line); }
.gm-agosto > summary { cursor: pointer; }
.gm-agosto-body { font-size: 13px; }
.gm-agosto-field { display: flex; flex-direction: column; gap: 2px; margin: 0 0 8px; color: var(--ink-dim); font-size: 12px; min-width: 0; }
.gm-agosto-field select { max-width: 100%; background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 4px; font: inherit; font-size: 13px; }
.gm-agosto-pick { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin: 6px 0 8px; }
.gm-agosto-pick .gm-agosto-field { margin: 0; }
.gm-agosto-strip { display: block; width: 100%; height: auto; margin: 4px 0 8px; }
.gm-agosto-axis { stroke: var(--ink-dim); stroke-width: 1.5; }
.gm-agosto-town { stroke: var(--ink); stroke-width: 1.5; }
.gm-agosto-drop { fill: #5ec8f2; }
.gm-agosto-walker { fill: var(--gold-bright); stroke: #1c2938; stroke-width: 1.5; }
.gm-agosto-label { fill: var(--ink-dim); font: 13px var(--sans); }
.gm-agosto-meters { display: grid; gap: 4px; margin: 6px 0; }
.gm-agosto-meter { display: grid; grid-template-columns: 44px 1fr 56px; align-items: center; gap: 6px; font-size: 12px; }
.gm-agosto-mlabel { color: var(--ink-dim); }
.gm-agosto-val { text-align: right; font-variant-numeric: tabular-nums; }
.gm-agosto-bar { position: relative; height: 10px; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: var(--panel-2); }
.gm-agosto-fill { position: absolute; left: 0; top: 0; bottom: 0; }
.gm-agosto-water { background: #5ec8f2; }
.gm-agosto-hot { background: linear-gradient(90deg, #f2d38a, #c43a2b); }
.gm-agosto-mark { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ink); }
.gm-agosto-say { margin: 4px 0 8px; }
.gm-agosto-fixed { font-size: 12px; }
.gm-agosto-teaser { margin-left: 6px; color: var(--ink-dim); font: italic 12px var(--sans); }
.gm-agosto-caption { margin: -4px 0 6px; font-size: 12px; }
.gm-agosto-timeline { margin: 4px 0 6px; padding-left: 18px; color: var(--ink-dim); font-size: 12px; }
@media (max-width: 700px) {
  .gm-camino-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 4px; align-items: start; }
  .gm-camino-box b { font-size: 12px; overflow-wrap: normal; hyphens: auto; }
  .gm-camino-box:not(.stamped) { min-height: 0; padding: 3px 6px; }
  .gm-camino-box:not(.stamped) .gm-camino-n { position: static; }
}

/* «Hermanados» (ext/hermanados): the partners of the chosen town by country, the groups beyond the top ten that share a
   country with a disputed place, and the minimap out of the way while a town with twinnings is chosen. */
.hm-partners { margin: 2px 0 8px; padding-left: 16px; font-size: 12px; line-height: 1.45; }
.hm-national { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 4px; }
.hm-exact summary { cursor: pointer; color: var(--ink-dim); font-size: 12px; margin: 4px 0; }
.hm-exact th.hm-shared { text-align: left; font-weight: 400; color: var(--ink-dim); padding-top: 6px; }
body.hm-inset #minimap-wrap, body.hm-inset .minimap-toggle { display: none; }
