/* teebee.wiki (spec 040). Ported from the G0 prototype (prototype/src/index.html), reviewed by the owner.
   A dark header in both schemes, section menus, a picture hero on the home page, section pages with topic
   cards, and inner pages with the section's page list on the left. Colour tokens on :root, light and dark
   (FR-009a); their contrast is tested by tests/teebee_wiki/test_contrast.py. */
:root {
  --bg: #f3f0e8;
  --surface: #fffdf8;
  --sunk: #e9e5da;
  --ink: #1d232a;
  --muted: #5a6470;
  --line: #d9d3c4;
  --accent: #1b6b60;
  --accent-soft: #dcebe5;
  --on-accent: #ffffff;
  --gold: #855b0d;
  --gold-soft: #f5e8cc;
  --warn-soft: #fbf0d9;
  --hdr: #11191f;
  --hdr-2: #1a252d;
  --hdr-ink: #ece6d6;
  --hdr-muted: #a9b2b8;
  --hdr-gold: #e2b458;
  --q1: #8d939a; --q2: #a9b3b8; --q3: #4f9a46; --q4: #3a62c4; --q5: #8b4fc4; --q6: #d0861c; --q7: #cf4636; --q8: #d9ad2b;
  /* Rarity as text (socket labels, gem dots): AA on surface, bg and sunk in each scheme; borders keep --q*. */
  --rt-leg: #8a5a0f; --rt-epic: #7a3fb3; --rt-rare: #2f55b0; --rt-common: #5a6470;
  --display: "Marcellus", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --body: "Noto Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 8px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0e1418; --surface: #161f26; --sunk: #0b1014; --ink: #e6e8e3; --muted: #9ca7b0; --line: #2a353f;
  --accent: #5cbcaa; --accent-soft: #17312c; --on-accent: #0a1512; --gold: #e0ad52; --gold-soft: #2e2512; --warn-soft: #2a2314;
  --hdr: #080d10; --hdr-2: #10181d;
  --rt-leg: #e0a04a; --rt-epic: #b78be6; --rt-rare: #8aa6ef; --rt-common: #a9b3b8;
  color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0e1418; --surface: #161f26; --sunk: #0b1014; --ink: #e6e8e3; --muted: #9ca7b0; --line: #2a353f;
  --accent: #5cbcaa; --accent-soft: #17312c; --on-accent: #0a1512; --gold: #e0ad52; --gold-soft: #2e2512; --warn-soft: #2a2314;
  --hdr: #080d10; --hdr-2: #10181d;
  --rt-leg: #e0a04a; --rt-epic: #b78be6; --rt-rare: #8aa6ef; --rt-common: #a9b3b8;
  color-scheme: dark }

* { box-sizing: border-box }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--body) }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--hdr) }
a { color: var(--accent) }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.gut { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)) }
.wrap { max-width: 1200px; margin: 0 auto }
h1, h2, h3 { text-wrap: balance; line-height: 1.2; margin: 0 }
/* Long words (German compounds, addresses) break rather than push the page wider; Japanese headings break at
   phrases, and its text keeps the strict line-break rules (FR-004, T085). */
body { overflow-wrap: break-word }
h1, h2, h3, h4, .card h3, .drop a b, .side a.it span { hyphens: auto }
.crumb code, footer.site a { overflow-wrap: anywhere }
:lang(ja) { line-break: strict }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { word-break: auto-phrase; overflow-wrap: anywhere }   /* a phrase wider than its box may still break (long calculator names, 2026-11-17) */
h1 { font: 400 32px/1.15 var(--display); letter-spacing: .01em }
h2 { font: 400 22px/1.2 var(--display) }
h3 { font-size: 15px; font-weight: 600 }
p { margin: 0; max-width: 70ch }
.muted { color: var(--muted) }
.small { font-size: 13px }
.num, td.n, th.n { font-variant-numeric: tabular-nums }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted) }
.svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }

/* Header */
header.site { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--hdr); color: var(--hdr-ink); box-shadow: 0 1px 0 rgba(0,0,0,.4) }
.bar { display: flex; align-items: center; gap: 10px; min-height: 60px }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 400 22px/1 var(--display); color: var(--hdr-ink); text-decoration: none; letter-spacing: .02em; white-space: nowrap; margin-right: 10px }
.brand .mark { width: 30px; height: 30px; color: var(--hdr-gold) }
.brand .wm span { color: var(--hdr-gold) }
nav.menu { display: flex; align-items: stretch; gap: 2px; flex: 1; min-width: 0 }
.mi { position: relative; display: flex }
.mi > a { display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; color: var(--hdr-ink); text-decoration: none; font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; min-height: 60px; white-space: nowrap }
.mi > a:hover, .mi:focus-within > a { background: var(--hdr-2) }
.mi > a[aria-current="true"] { border-bottom-color: var(--hdr-gold); color: #fff }
.mi > a .caret { width: 10px; height: 10px; opacity: .6 }
.drop { position: absolute; top: 100%; left: 0; width: 360px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-top: 2px solid var(--hdr-gold); border-radius: 0 0 var(--r) var(--r); box-shadow: 0 14px 34px rgba(0,0,0,.28); padding: 8px; display: none; z-index: 25 }
.mi:hover .drop, .mi:focus-within .drop { display: grid }
.mi.right .drop { left: auto; right: 0 }
.drop a { display: grid; grid-template-columns: 30px 1fr; gap: 1px 10px; padding: 8px 10px; border-radius: 6px; text-decoration: none; color: var(--ink) }
.drop a:hover { background: var(--sunk) }
.drop a .ic, .drop a .svgic { grid-row: span 2; width: 30px; height: 30px }
.drop a b { font-weight: 600; font-size: 14px }
.drop a small { color: var(--muted); font-size: 12.5px; line-height: 1.35 }
.drop a.planned b { color: var(--muted); font-weight: 500 }
.drop .all { display: block; border-top: 1px solid var(--line); margin-top: 4px; padding: 9px 10px 4px; font-size: 13px; font-weight: 600 }
.tools { display: flex; gap: 6px; margin-left: auto; align-items: center }
.hbtn { display: inline-flex; align-items: center; gap: 7px; background: transparent; color: var(--hdr-ink); border: 1px solid rgba(255,255,255,.18); border-radius: 6px; padding: 6px 10px; font: 500 13px var(--body); cursor: pointer; min-height: 36px }
.hbtn:hover { background: var(--hdr-2) }
.hbtn .svg { width: 17px; height: 17px }
.search { position: relative; display: flex; align-items: center }
.search .svg { position: absolute; left: 9px; width: 16px; height: 16px; color: var(--hdr-muted); pointer-events: none }
.search input { width: 160px; min-height: 36px; padding: 6px 10px 6px 31px; background: transparent; color: var(--hdr-ink); border: 1px solid rgba(255,255,255,.18); border-radius: 6px; font: 400 13px var(--body) }
.search input::placeholder { color: var(--hdr-muted); opacity: 1 }
.search input:focus { background: var(--hdr-2); outline: 2px solid var(--hdr-gold); outline-offset: 1px }
.results { position: absolute; top: calc(100% + 6px); right: 0; width: min(360px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-top: 2px solid var(--hdr-gold); border-radius: var(--r); box-shadow: 0 14px 34px rgba(0,0,0,.28); padding: 6px; display: grid; gap: 2px; z-index: 26 }
.results[hidden] { display: none }
.results a { display: grid; gap: 1px; padding: 7px 9px; border-radius: 6px; text-decoration: none; color: var(--ink) }
.results a:hover, .results a:focus { background: var(--sunk) }
.results a b { font-size: 14px; font-weight: 600 }
.results a small { color: var(--muted); font-size: 12.5px; line-height: 1.35 }
.results p { padding: 7px 9px; color: var(--muted); font-size: 13px }
.menubtn { display: none }
@media (max-width: 1060px) { .search input { width: 150px } }
@media (max-width: 560px) { .search input { width: 38px; padding-right: 0; cursor: pointer } .search input:focus { width: min(220px, calc(100vw - 150px)); cursor: text } }
@media (max-width: 920px) {
  .menubtn { display: inline-flex }
  nav.menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--hdr); flex-direction: column; padding: 6px 16px 14px; max-height: calc(100dvh - 60px); overflow: auto; border-top: 1px solid rgba(255,255,255,.08) }
  header.open nav.menu { display: flex }
  .mi { flex-direction: column }
  .mi > a { min-height: 46px; border-bottom: 0; font-size: 15.5px }
  .mi .drop { position: static; display: grid; width: auto; box-shadow: none; border: 0; border-radius: 6px; background: var(--hdr-2); color: var(--hdr-ink); padding: 4px; margin: 0 0 6px }
  .mi .drop a { color: var(--hdr-ink) } .mi .drop a small { color: var(--hdr-muted) } .mi .drop a:hover { background: rgba(255,255,255,.06) }
  .mi .drop .all { border-color: rgba(255,255,255,.1) }
  .mi .drop a small { display: none } .drop a .ic, .drop a .svgic { grid-row: auto; width: 22px; height: 22px }
}
@media (max-width: 560px) { .brand { font-size: 19px } .theme span { display: none } }
/* Folded menu (FR-004, T085): wider than a phone, when the menu row doesn't fit beside the tools (German, Russian,
   Japanese at 1280 px), site.js sets header.fold and the menu folds into the menu button as on a phone. */
header.fold .menubtn { display: inline-flex }
header.fold nav.menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--hdr); flex-direction: column; padding: 6px max(16px, calc((100% - 1200px) / 2)) 14px; max-height: calc(100dvh - 60px); overflow: auto; border-top: 1px solid rgba(255,255,255,.08) }
header.fold.open nav.menu { display: flex }
header.fold .mi { flex-direction: column }
header.fold .mi > a { min-height: 46px; border-bottom: 0; font-size: 15.5px }
header.fold .mi .drop { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); width: auto; box-shadow: none; border: 0; border-radius: 6px; background: var(--hdr-2); color: var(--hdr-ink); padding: 4px; margin: 0 0 6px }
header.fold .mi .drop a { color: var(--hdr-ink) } header.fold .mi .drop a small { color: var(--hdr-muted) } header.fold .mi .drop a:hover { background: rgba(255,255,255,.06) }
header.fold .mi .drop .all { border-color: rgba(255,255,255,.1); grid-column: 1 / -1 }
header.fold .mi .drop a small { display: none } header.fold .drop a .ic, header.fold .drop a .svgic { grid-row: auto; width: 22px; height: 22px }

/* Language picker (FR-009): a globe and the language code in the header (the globe alone under 400 px); the list of
   19 drops under the header's right edge, two columns, never wider than the screen. */
.langs { position: static }
.langs > summary { list-style: none; user-select: none; white-space: nowrap }
.langs > summary::-webkit-details-marker { display: none }
.langs[open] > summary { background: var(--hdr-2) }
.langs .ln { display: none } .langs .lc { font-size: 12px; letter-spacing: .03em }
.langlist { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 60px); right: max(16px, env(safe-area-inset-right, 0px), calc((100% - 1200px) / 2)); z-index: 26; width: min(400px, calc(100vw - 32px)); max-height: calc(100dvh - 72px); overflow: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; padding: 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-top: 2px solid var(--hdr-gold); border-radius: 0 0 var(--r) var(--r); box-shadow: 0 14px 34px rgba(0,0,0,.28) }
.langlist a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 14px; overflow-wrap: anywhere }
.langlist a:hover, .langlist a:focus-visible { background: var(--sunk) }
.langlist a[aria-current="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600 }
@media (max-width: 1360px) { .theme span { display: none } }
/* A phone's header row (FR-004): brand, search, language, scheme and menu fit 360 px. The menu button keeps its
   word for screen readers only; the search, while typed in, covers the row instead of pushing it wider. */
@media (max-width: 560px) {
  .tools .hbtn { padding: 6px 8px }
  .menubtn .mt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
  .search:focus-within { position: static }
  .search input:focus { position: absolute; top: 12px; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); width: auto; z-index: 27; background: var(--hdr-2) }
  .search:focus-within .svg { z-index: 28; left: calc(max(16px, env(safe-area-inset-left, 0px)) + 9px) }
}
@media (max-width: 400px) { .langs .lc { display: none } }

/* Buttons and controls */
button, .btn { font: inherit; font-weight: 500; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 6px; padding: 7px 13px; min-height: 36px; text-decoration: none; display: inline-flex; align-items: center; gap: 7px }
button:hover, .btn:hover { border-color: var(--muted) }
.btn .svgic, button .svgic { width: 18px; height: 18px; color: inherit }
.btn.primary { background: var(--hdr-gold); border-color: var(--hdr-gold); color: #1d1608 }
.btn.ghost { background: rgba(0,0,0,.25); color: #fff; border-color: rgba(255,255,255,.35) }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; flex-wrap: wrap }
.seg button { border: 0; border-radius: 0; border-right: 1px solid var(--line) }
.seg button:last-child { border-right: 0 }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent) }
select, input[type="number"], input[type="text"] { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; min-height: 36px; max-width: 100% }
input[type="range"] { accent-color: var(--accent); width: 100% }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px }
.linklike { border: 0; background: none; padding: 0; min-height: 0; color: var(--accent); text-decoration: underline; font-size: inherit; font-weight: 400 }

/* Hero (home) and section bands */
.hero { position: relative; color: #fff; background: #12222a; overflow: hidden }
.hero .bgimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9 }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,13,16,.92) 0%, rgba(8,13,16,.72) 45%, rgba(8,13,16,.25) 100%) }
.hero.noimg { background: radial-gradient(1200px 500px at 85% 20%, #2b5547 0%, transparent 60%), radial-gradient(900px 400px at 10% 110%, #3a2c14 0%, transparent 60%), #10191e }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; padding-block: 54px 50px; align-items: center }
.hero h1 { font-size: 46px; color: #fff }
.hero p.lede { color: #dfe4e2; font-size: 17px; margin-top: 12px }
.hero .eyebrow { color: var(--hdr-gold) }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px }
.nowcard { background: rgba(10,16,20,.72); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 14px; backdrop-filter: blur(4px); color: #e8ece9 }
.nowcard .eyebrow { color: var(--hdr-gold); margin-bottom: 8px }
.nowcard .ev { border-color: rgba(255,255,255,.1) }
.nowcard .ev .when, .nowcard .ev .len { color: #b9c2c6 }
.nowcard .ev .what { color: #fff }
.nowcard .chip { background: rgba(255,255,255,.1); color: #d8dedf }
.nowcard .chip.epic { background: rgba(226,180,88,.2); color: var(--hdr-gold) }
.nowcard a { color: var(--hdr-gold) }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; padding-block: 36px } .hero h1 { font-size: 34px } }
.band { background: var(--hdr-2); color: var(--hdr-ink); border-bottom: 1px solid var(--line); position: relative; overflow: hidden }
.band .wrap { position: relative; z-index: 1; display: flex; gap: 18px; align-items: center; padding-block: 28px 26px }
.band h1 { color: #fff }
.band p { color: var(--hdr-muted); margin-top: 6px }
.band .bigic { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; background: rgba(226,180,88,.12); color: var(--hdr-gold); flex: none }
.band .bigic .svg { width: 34px; height: 34px; stroke-width: 1.5 }
.band .bigic .ic { width: 52px; height: 52px }   /* a section's game picture (Player: Garvel) */
.band .crumb, .band .crumb a { color: var(--hdr-muted) }
.band .crumb code { background: rgba(255,255,255,.08); color: var(--hdr-muted) }

/* Page frame */
main { padding-block: 26px 56px }
.docs { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 30px; align-items: start }
.side { position: sticky; top: 84px; display: grid; gap: 2px; font-size: 14px; max-height: calc(100dvh - 100px); overflow: auto; padding-right: 4px }
.side .sh { display: flex; gap: 8px; align-items: center; font: 400 17px var(--display); padding: 4px 8px 10px; color: var(--ink); text-decoration: none }
.side a.it { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; text-decoration: none; color: var(--ink) }
.side a.it:hover { background: var(--sunk) }
.side a.it[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600 }
.side a.it.sub { padding-left: 30px; font-size: 13.5px }
.side a.it.planned { color: var(--muted) }
.side .ic, .side .svgic { width: 20px; height: 20px }
.side .tag { margin-left: auto }
.sidetoggle { display: none }
@media (max-width: 920px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 14px }
  .side { position: static; max-height: none; display: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px }
  .side.open { display: grid }
  .sidetoggle { display: inline-flex; justify-self: start }
}
.crumb { font-size: 13px; color: var(--muted); display: flex; gap: 7px; flex-wrap: wrap; align-items: baseline; margin-bottom: 8px }
.crumb a { color: inherit }
.crumb code { font: 11.5px var(--mono); background: var(--sunk); padding: 2px 6px; border-radius: 4px; color: var(--muted); margin-left: 4px }
.copyurl { display: inline-flex; align-items: center; gap: 4px; align-self: baseline; font-size: 11.5px; font-weight: 600; line-height: 1.35; min-height: 0; height: auto; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; margin-left: -3px }
.copyurl svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8 }
.copyurl:hover { color: var(--ink); border-color: currentColor }
.copyurl.ok { color: var(--accent); border-color: currentColor }
.band .copyurl { color: var(--hdr-muted); border-color: rgba(255,255,255,.18) }
.page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; min-width: 0 }
.lede { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px }
.lede p { color: var(--muted); font-size: 16px }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px }
.controls { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end }
.field { display: grid; gap: 4px; font-size: 13px; color: var(--muted) }
.field > span { font-weight: 600 }
.field > .seg { justify-self: start }   /* a button bar as wide as its buttons, not the field's row */
.note { background: var(--warn-soft); border-radius: var(--r); padding: 10px 13px; font-size: 13.5px }
.note.plain { background: var(--sunk) }
.tag { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 1px 7px; border-radius: 99px; background: var(--sunk); color: var(--muted); white-space: nowrap }
.tag.tag-calc { background: var(--accent-soft); color: var(--accent) }
.tag.plan { background: transparent; border: 1px solid var(--line) }

.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface) }
table { border-collapse: collapse; width: 100%; font-size: 13.5px }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top }
th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--sunk); white-space: nowrap }
td.n, th.n { text-align: right; white-space: nowrap }
tr:last-child td { border-bottom: 0 }
tr.mark td { background: var(--accent-soft) }
tr.done td { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line) }
tr.done td:first-child { text-decoration: none }
tr.phase td { background: var(--sunk); font-weight: 600; font-size: 12.5px }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 10px }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 2px; min-width: 0 }
.stat .v { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums }
.stat .k { font-size: 12.5px; color: var(--muted) }
.stat.main { border-color: var(--accent); background: var(--accent-soft) }
.stat.main .v { color: var(--accent) }
.stat.one { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; padding: 6px 14px; min-height: 36px }
.stat.one .v { white-space: nowrap }
.stat.one .v { font-size: 20px }
.sksearch { margin: 6px 0 16px }
.sklabel { display: block; margin-bottom: 4px; font-size: 13px; color: var(--muted) }
/* The box, Clear and the count line on one row, centred on each other (owner, 2026-11-10). */
.skrow { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center }
.sksearch input { width: 140px; font-size: 16px }
.skmsg { font-size: 14px; color: var(--muted) }
.skmsg b { color: var(--ink) }
.skgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 12px }
.sktile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; min-width: 0 }
.sktile.hit { border: 2px solid var(--accent); background: var(--accent-soft); padding: 11px 13px }
.sktile h3 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; font-size: 22px }
.sktile h3 small { font-size: 12.5px; font-weight: 500; color: var(--muted) }
.sktile ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px }
.sktile li { display: grid; grid-template-columns: 44px minmax(0, 1fr) 52px 52px; gap: 6px; align-items: baseline; font-size: 13px; padding: 3px 6px; border-radius: 4px }
.sktile li .kn { font: 12px var(--mono); color: var(--muted) }
.sktile li .cn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.sktile li .cn b { font-weight: 600; margin-right: 4px }
.sktile li .mt { font-variant-numeric: tabular-nums; color: var(--muted); text-align: right }
.sktile li.hd { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding-bottom: 2px }
.sktile li.hd span:nth-child(n+3) { text-align: right }
.sktile li.none .cn { color: var(--muted); font-style: italic }
.sktile li.hit { background: var(--accent); color: var(--on-accent) }
.sktile li.hit .kn, .sktile li.hit .mt, .sktile li.hit .cn { color: var(--on-accent) }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px }
@media (max-width: 820px) { .two { grid-template-columns: minmax(0, 1fr) } h1 { font-size: 27px } }

/* Icons */
.ic { width: 24px; height: 24px; object-fit: contain; flex: none; vertical-align: middle }
.ic.lg { width: 40px; height: 40px } .ic.xl { width: 64px; height: 64px }
.ph { display: inline-grid; place-items: center; border-radius: 6px; background: var(--sunk); color: var(--muted); font: 700 10px var(--body); text-transform: uppercase }
.svgic { display: inline-grid; place-items: center; color: var(--gold); flex: none }
.svgic .svg { width: 100%; height: 100% }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 14px }
.card { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 4px 14px; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; text-decoration: none; color: var(--ink) }
.card:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(0,0,0,.08) }
.card .ic, .card .svgic { grid-row: span 3; width: 48px; height: 48px }
.card h3 { font: 400 19px/1.2 var(--display) }
.card p { color: var(--muted); font-size: 13.5px }
/* Tiles (owner, 2026-11-09): every tile in a grid the same size; the summary at most 3 lines, "…", the full text on hover. */
.cards, .calcs { grid-auto-rows: 1fr }
.card p, .calc p { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden }
.card .tags { display: flex; gap: 5px; flex-wrap: wrap }
.card.planned { background: transparent; border-style: dashed }
.card.planned h3 { color: var(--muted) }
.card.planned .ic, .card.planned .svgic { opacity: .55 }
.sect { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; align-content: start }
.sect > a.head { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink) }
.sect > a.head .svgic { width: 40px; height: 40px; padding: 7px; border-radius: 10px; background: var(--gold-soft) }
.sect h2 { font-size: 21px }
.sect p { color: var(--muted); font-size: 13.5px }
.sect ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 14px }
.sect li a { display: flex; gap: 8px; align-items: center; text-decoration: none; color: var(--ink); padding: 4px 6px; border-radius: 6px }
.sect li a:hover { background: var(--sunk) }
.sect li a.planned { color: var(--muted) }
.sect li .ic, .sect li .svgic { width: 22px; height: 22px }
.sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px }
.calcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px }
.calc { display: grid; grid-template-columns: 56px 1fr; gap: 4px 14px; align-items: center; padding: 16px; border-radius: 12px; text-decoration: none; color: var(--ink); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border: 1px solid var(--line) }
.calc:hover { border-color: var(--accent) }
.calc .ic, .calc .svgic { width: 56px; height: 56px; grid-row: span 2 }
.calc h3 { font: 400 18px var(--display) }
.calc p { font-size: 13px; color: var(--muted) }
.calc.planned { background: transparent; border-style: dashed }
.calc.planned h3 { color: var(--muted) } .calc.planned .ic, .calc.planned .svgic { opacity: .5 }
.secthead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap }

/* Calendar strip */
.evlist { display: grid; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden }
.nowcard .evlist { background: transparent; border: 0 }
.news { max-width: 860px }
.newsday h2 { font-size: 18px; margin: 4px 0 10px; color: var(--muted) }
.newsday ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px }
.newsrow { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none }
.newsrow:hover { border-color: var(--accent) }
.newsrow .ic { width: 40px; height: 40px; flex: none }
.newsrow .nt { display: grid; gap: 3px; min-width: 0 }
.newsrow .nt b { font-size: 15.5px }
.newsrow .nx { color: var(--muted); font-size: 14px }
.newsrow .tag { justify-self: start; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 1px 7px; border-radius: 999px }
.newsrow .tag.added { background: var(--accent-soft); color: var(--accent) }
.newsrow .tag.updated { background: var(--gold-soft); color: var(--gold) }
.btn img.btnic { width: 22px; height: 22px; object-fit: contain; border-radius: 4px }
.forestbox { margin-top: 10px; display: grid; gap: 6px }
.nowcard .chatbtn, .nowcard .chatbtn.btn.ghost { justify-self: start; color: #1d232a; border-color: #c99a3c; background: #e2b458; min-height: 32px; padding: 4px 12px; font-size: 13px; font-weight: 600 }
.nowcard .chatbtn:hover { background: #ecc472; border-color: #c99a3c; color: #1d232a }
.chatbtn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8 }
.chattext { width: 100%; font: 12.5px/1.45 var(--mono); background: rgba(0,0,0,.35); color: #e8ece9; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; padding: 6px 8px }
.evday { padding: 7px 12px; background: var(--sunk); font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line) }
.ev { display: grid; grid-template-columns: 112px 1fr auto; gap: 4px 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); align-items: baseline }
.ev:last-child { border-bottom: 0 }
.ev .when { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--muted) }
.ev .what { font-weight: 500; min-width: 0 }
.ev .len { font-size: 12px; color: var(--muted); white-space: nowrap }
.chips { display: inline-flex; gap: 4px; flex-wrap: wrap; margin-left: 6px; vertical-align: 1px }
.chip { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--sunk); color: var(--muted) }
.chip.epic { background: var(--gold-soft); color: var(--gold) }
@media (max-width: 560px) { .ev { grid-template-columns: 1fr auto } .ev .when { grid-column: 1 / -1 } }
.calframe { display: block; width: 100%; height: calc(100dvh - 92px); border: 0; background: var(--bg) }

/* Camp steps */
.phasehead { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 10px 0 -4px }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); display: grid; overflow: hidden }
.step.done { opacity: .55 }
.step > header { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 12px 14px }
.step .tick { padding-top: 3px }
.step .no { font: 400 22px/1.05 var(--display); color: var(--accent); min-width: 28px }
.step h3 { font-size: 15px; font-weight: 600 }
.step .price { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); margin-top: 4px }
.mchip { display: inline-flex; align-items: center; gap: 5px; background: var(--sunk); border-radius: 99px; padding: 2px 9px 2px 3px; font-size: 12.5px; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums }
.mchip .ic { width: 20px; height: 20px }
.mchip.nomg { padding-left: 9px }
.timebar { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 8px 14px; background: var(--sunk); border-block: 1px solid var(--line); font-size: 13px }
.timebar b { font-variant-numeric: tabular-nums }
.timebar .or { color: var(--muted) }
.timebar .svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 3px }
.do2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) }
.do2 section { padding: 10px 14px 12px; min-width: 0 }
.do2 section + section { border-left: 1px solid var(--line) }
.do2 h4 { margin: 0 0 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted) }
.huts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px }
.huts li { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 8px; align-items: center; font-size: 13px }
.huts .hn { font-weight: 600; font-size: 12.5px; color: var(--muted); white-space: nowrap }
.runs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center }
.runs .arrow { color: var(--muted); font-size: 12px }
.run { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px 2px 3px; background: var(--surface); font-size: 12.5px }
.run .ic { width: 22px; height: 22px }
.run small { color: var(--muted); font-variant-numeric: tabular-nums }
.orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px }
.orders li { font-size: 13px; display: grid; gap: 3px }
.orders .oh { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap }
.orders .oh b { font-weight: 600 }
.orders .meta { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums }
.orders .io { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; color: var(--muted); font-size: 12px }
.step .stock { font-size: 12.5px; color: var(--muted); padding: 0 14px 10px; max-width: none; display: flex; gap: 5px; flex-wrap: wrap; align-items: center }
ol.order { list-style: none; padding-left: 0 }
.step .rcps { display: grid; gap: 6px; margin-top: 6px }
.step .rcp { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px }
.step .rarrow { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; padding: 0 2px }
.step .rt { white-space: nowrap }
.step .hutsum { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); margin: 8px 0 0; max-width: none }
.step .pay { color: var(--ink); font-size: 13px; border-top: 1px solid var(--line); padding-top: 10px }
.step .paid { display: inline-flex; gap: 5px; flex-wrap: wrap; align-items: center }
@media (max-width: 760px) { .do2 { grid-template-columns: 1fr } .do2 section + section { border-left: 0; border-top: 1px solid var(--line) } }
.slots { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px }
.slot { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 4px; text-align: center; font-size: 12px; background: var(--surface); display: grid; gap: 3px; justify-items: center; min-width: 0 }
.slot .ic { width: 34px; height: 34px }
.slot b { font-size: 12.5px; max-width: 100%; overflow-wrap: anywhere; hyphens: auto }
.slot.hut { border-color: var(--accent) } .slot.hut b { color: var(--accent) }
.slot.ws { border-color: var(--gold) } .slot.ws b { color: var(--gold) }
.slot.off { color: var(--muted); border-style: dashed }
@media (max-width: 640px) { .slots { grid-template-columns: repeat(3, minmax(0, 1fr)) } }

/* Crypt calculator */
.checks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px }
.checks label { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: 14px; min-width: 0 }
.checks label.na { color: var(--muted); order: 1 }   /* cuts that don't apply to the crypt sink to the end (FR-026) */
.checks label select { min-height: 28px; padding: 1px 4px; font-size: 13px }
.formula { font-family: var(--mono); font-size: 13.5px; background: var(--sunk); padding: 10px 12px; border-radius: var(--r) }
.tech summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 6px 0 }
.tech summary .v { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums }
.tech summary small { color: var(--muted); flex-basis: 100% }
.tech .scroll { margin: 4px 0 10px }
.checks .v { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap }
.checks fieldset { border: 0; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; min-width: 0 }
.checks legend { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 2px }
.cryptpick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px }
.cryptpick button { display: grid; justify-items: center; gap: 4px; padding: 10px 6px; text-align: center; font-size: 13px }
.cryptpick button .ic { width: 64px; height: 52px }
.cryptpick button .ic.sm { width: 18px; height: 18px; vertical-align: -4px }
.cryptpick button small { color: var(--muted); font-weight: 400 }
.cryptpick button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent) }
@media (max-width: 560px) { .cryptpick { grid-template-columns: repeat(2, minmax(0, 1fr)) } }

/* Hero window: the captain builder */
.hw { display: grid; gap: 14px; background: linear-gradient(180deg, var(--surface), var(--surface)) }
.hw-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap }
.hw-total { font-size: 30px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; display: grid; text-align: right; line-height: 1.05 }
.hw-total small { font-size: 12px; font-weight: 400; color: var(--muted) }
.hw-sum { display: flex; gap: 6px; flex-wrap: wrap }
.hw-sum span { font-size: 12.5px; padding: 3px 10px; border-radius: 99px; background: var(--sunk); font-variant-numeric: tabular-nums }
.hw-sum b { font-weight: 600 }
.hw-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px }
@media (max-width: 900px) { .hw-grid { grid-template-columns: 1fr } }
.hcard { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 12px; background: var(--bg); align-content: start }
.hcard-top { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center }
.medal { width: 96px; height: 96px; border-radius: 12px; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #3b4b55, #141c21); border: 2px solid var(--q8); overflow: hidden }
.medal img { width: 100%; height: 100%; object-fit: cover }
.medal.art { border-color: var(--q6); background: radial-gradient(circle at 50% 40%, #4a3a1c, #17120a) }
.medal.art img { object-fit: contain; padding: 8px }
.medal .ph { width: 100%; height: 100%; background: transparent; color: #cfd6da; font-size: 22px; border-radius: 0 }
.hcard h3 { font: 400 20px var(--display) }
.hcard .sub { font-size: 12.5px; color: var(--muted) }
.hcard .pct { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums }
.row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13.5px }
.row > span:first-child { font-weight: 600; color: var(--muted); font-size: 12.5px }
.row input[type="number"] { width: 78px; min-height: 32px; padding: 3px 7px }
.row .pct { min-width: 64px; text-align: right }
.stars { display: inline-flex; gap: 2px; align-items: center }
.starbtn { border: 0; background: none; padding: 1px; min-height: 0; cursor: pointer; color: var(--line); line-height: 0 }
.starbtn svg { width: 26px; height: 26px }
.starbtn.on { color: var(--q8) }
.starbtn:hover { color: var(--q6) }
.segstars { display: inline-flex; gap: 4px; flex-wrap: wrap }
.segstar { width: 34px; height: 34px; overflow: visible }
.segstar path { fill: var(--sunk); stroke: var(--line); stroke-width: .6; cursor: pointer }
.segstar path.on { fill: var(--q8); stroke: #8a6a10 }
.segstar path:hover { fill: var(--q6) }
.skills { display: grid; gap: 6px }
.skill { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: 13px }
.step-in { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface) }
.step-in button { border: 0; border-radius: 0; min-height: 30px; padding: 0 9px; background: transparent }
.step-in input { border: 0; border-inline: 1px solid var(--line); border-radius: 0; width: 52px; text-align: center; min-height: 30px; padding: 2px }
.sockets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px }
.sock { display: grid; justify-items: center; gap: 3px; padding: 7px 4px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 11.5px; line-height: 1.2; text-align: center; min-height: 72px; cursor: pointer }
.sock b { font-size: 13px; font-variant-numeric: tabular-nums }
.sock.locked { cursor: default; opacity: .5; border-style: dashed; background: transparent }
.sock .gemdot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center }
.sock.r-Legendary { border-color: var(--q6); color: var(--rt-leg) } .sock.r-Epic { border-color: var(--q5); color: var(--rt-epic) } .sock.r-Rare { border-color: var(--q4); color: var(--rt-rare) } .sock.r-Common { border-color: var(--q2); color: var(--rt-common) }
.sock .note2 { color: var(--muted); font-size: 10.5px }
.sock.off b { text-decoration: line-through; color: var(--muted) }
@media (max-width: 520px) { .starbtn svg { width: 20px; height: 20px } .sockets { grid-template-columns: repeat(3, minmax(0, 1fr)) } .row { grid-template-columns: 76px minmax(0, 1fr) auto } }
.eqs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px }
@media (max-width: 760px) { .eqs { grid-template-columns: 1fr } }
.eq { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 10px; background: var(--bg) }
.eq-main { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; padding: 0; border: 0; background: transparent; min-height: 0 }
.frame { position: relative; width: 76px; height: 76px; border-radius: 10px; display: grid; place-items: center; border: 2px solid var(--qc, var(--line)); background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--qc, #888) 35%, transparent), color-mix(in srgb, var(--qc, #888) 8%, var(--surface))) }
.frame img { width: 84%; height: 84%; object-fit: contain }
.frame .ph { width: 70%; height: 70%; background: transparent }
.frame.sm { width: 50px; height: 50px; border-radius: 50% }
.frame.empty { border-style: dashed; --qc: var(--line); background: var(--surface) }
.frame .plus { color: var(--muted); font-size: 26px; font-weight: 300 }
.eq-main b { display: block; font-size: 14px; line-height: 1.25 }
.eq-main small { color: var(--muted); font-size: 12px }
.eq-socks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px }
.eq-sock { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 8px; align-items: center; text-align: left; padding: 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); min-height: 0; font-weight: 400 }
.eq-sock b { display: block; font-size: 12.5px; font-weight: 600 } .eq-sock small { font-size: 11.5px; color: var(--muted) }
.q1 { --qc: var(--q1) } .q2 { --qc: var(--q2) } .q3 { --qc: var(--q3) } .q4 { --qc: var(--q4) } .q5 { --qc: var(--q5) } .q6 { --qc: var(--q6) } .q7 { --qc: var(--q7) } .q8 { --qc: var(--q8) }
.qtxt { color: var(--ink); font-weight: 600; text-decoration: underline 3px var(--qc); text-underline-offset: 3px }
.breakdown summary { cursor: pointer; font-size: 13.5px; color: var(--accent) }
.breakdown ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px }
.breakdown li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dotted var(--line); padding-bottom: 3px }
.breakdown li.na { color: var(--muted) }
.tl { font-size: 11px; color: var(--muted); background: var(--sunk); border-radius: 4px; padding: 0 5px }

/* Picker dialog */
dialog.pick { border: 1px solid var(--line); border-radius: 12px; padding: 0; background: var(--surface); color: var(--ink); width: min(720px, calc(100vw - 24px)); max-height: calc(100dvh - 40px) }
dialog.pick::backdrop { background: rgba(5,8,10,.6) }
.pk-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1 }
.pk-head h2 { font-size: 20px }
.pk-body { padding: 14px 16px 18px; display: grid; gap: 14px }
/* Quality tiles: equal size, filled in the quality's colour; the picked one is full strength with a ring and a tick. */
.qrow { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px }
@media (max-width: 640px) { .qrow { grid-template-columns: repeat(4, minmax(0, 1fr)) } }
.qrow button { justify-content: center; min-width: 0; min-height: 34px; padding: 4px 6px; font-size: 12.5px; font-weight: 600; border: 1px solid rgba(0,0,0,.25); background: var(--qc); color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.45); opacity: .5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.qrow button.q1, .qrow button.q2, .qrow button.q3, .qrow button.q6, .qrow button.q8 { color: #1d232a; text-shadow: none }
.qrow button:hover { opacity: .8; border-color: rgba(0,0,0,.25) }
.qrow button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink) }
.qrow button[aria-pressed="true"]::before { content: "✓"; margin-right: 4px }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 8px }
.ptile { display: grid; justify-items: center; gap: 5px; padding: 10px 8px; text-align: center; font-size: 12.5px; line-height: 1.25; font-weight: 400 }
.ptile b { font-weight: 600; font-size: 13px }
.ptile small { color: var(--muted) }
.ptile[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent) }
.ptile .frame { width: 64px; height: 64px }
.pgroup { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 4px 0 -4px }

/* Footer */
footer.site { background: var(--hdr); color: var(--hdr-muted); font-size: 13px; padding-block: 34px 30px }
footer.site .cols { display: grid; grid-template-columns: 1.3fr repeat(6, minmax(0, 1fr)); gap: 22px }
footer.site h4 { margin: 0 0 8px; color: var(--hdr-ink); font: 400 15px var(--display) }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px }
footer.site a { color: var(--hdr-muted); text-decoration: none } footer.site a:hover { color: var(--hdr-ink); text-decoration: underline }
footer.site .legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 24px; padding-top: 14px; display: grid; gap: 4px }
@media (max-width: 900px) { footer.site .cols { grid-template-columns: repeat(2, minmax(0, 1fr)) } footer.site .cols > div:first-child { grid-column: 1 / -1 } }
footer.site .linklike { color: var(--hdr-muted); text-decoration: none; font-size: inherit } footer.site .linklike:hover { color: var(--hdr-ink); text-decoration: underline }

/* The consent notice of the shared consent.js (FR-008): a small bar at the bottom that blocks nothing. Accept and
   Decline look the same, so neither is pushed. */
.consent { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 40; width: min(560px, calc(100% - 32px)); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-top: 2px solid var(--hdr-gold); border-radius: var(--r); box-shadow: 0 14px 34px rgba(0,0,0,.28); font-size: 14px }
.consent.hidden { display: none }
.consent p { margin: 0; flex: 1 1 240px }
.consent .btn, .consent .btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--muted) }
.consent .btn:hover { border-color: var(--ink) }
@media (prefers-reduced-motion: no-preference) { .card, .calc, button, .mi > a, .sect li a { transition: border-color .15s, background-color .15s, box-shadow .15s } }

/* Not in the prototype: no-JavaScript note, empty section, 404, skip link */
.nojs { background: var(--warn-soft); color: var(--ink); border-radius: var(--r); padding: 10px 13px; font-size: 14px; margin: 12px 0 }
.empty { color: var(--muted) }
.skip { position: absolute; left: -9999px; top: 0; z-index: 40; background: var(--surface); color: var(--ink); padding: 8px 12px }
.skip:focus { left: 8px; top: 8px }
.hero.noimg .bgimg { display: none }
.prose { display: grid; gap: 22px; max-width: 820px }
.theme .svg { display: none }
:root[data-theme="light"] .theme .i-dark, :root[data-theme="dark"] .theme .i-light { display: inline }
.brand img.mark { display: block }

/* troops: the troops catalogue draft (player/troops/, troops.js) */
.trhow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; margin: 18px 0 }
.trhow h2 { margin: 0 0 6px; font: 400 18px var(--display) }
.trhow p { margin: 0; font-size: 14px }
.trbar { margin-bottom: 8px }
.trbar input[type="search"] { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; min-height: 36px; width: 14em; max-width: 100% }
.trbar .trcats { flex-basis: 100% }
.trbar select { max-width: 13em }
#trTable td { vertical-align: middle }
#trTable tr.trrow { cursor: pointer }
#trTable tr.trrow:hover td, #trTable tr.trrow[aria-expanded="true"] td { background: var(--accent-soft) }
#trTable tr.trrow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px }
.trname { display: flex; align-items: center; gap: 8px; min-width: 11em }
.trname img, .trnopic { width: 36px; height: 36px; flex: none; object-fit: contain; border-radius: 6px; background: var(--sunk) }
.trname > span { display: grid; gap: 1px }
#trTable tr.trcard > td { background: var(--bg); padding: 0 }
.trcardin { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 6px 22px; padding: 12px 14px; white-space: normal; max-width: 92vw; position: sticky; left: 0 }
.trcardin h3 { margin: 10px 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted) }
.trcardin .trcol > h3:first-child { margin-top: 0 }
.trcardin p { margin: 0 }
.trstats { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0 }
.trstats dt { color: var(--muted) }
.trstats dd { margin: 0; font-variant-numeric: tabular-nums }
.trtags { display: flex; flex-wrap: wrap; gap: 4px }
.trbonus, .trlist { margin: 0; padding-left: 1.1em; display: grid; gap: 3px }
.trbonus b { color: var(--accent); white-space: nowrap }
/* end troops */

/* captains draft (2026-11-16): player/captains/, its calculator and hall-of-fame/ (captains.js) */
.cpsec { display: grid; gap: 10px; min-width: 0 }
.cpsec > h2 { margin-top: 6px }
.cph3 { margin-top: 6px }
.cphow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px }
.cphow h3 { margin: 0 0 6px; font: 400 18px var(--display) }
.cphow p { font-size: 14px }
.cpprose { gap: 10px }
.cplist { margin: 0; padding-left: 1.1em; display: grid; gap: 4px }
.cplist ul { margin: 4px 0 0; padding-left: 1.1em }
.cpbar { align-items: end }
.cpbar select { max-width: 16em }
.cpbar input[type="number"] { width: 7em }
.cpbar input[type="range"] { flex: 1 1 200px; max-width: 420px; align-self: center }
#cpTable td { vertical-align: middle }
#cpTable tr.cprow { cursor: pointer }
#cpTable tr.cprow:hover td, #cpTable tr.cprow[aria-expanded="true"] td { background: var(--accent-soft) }
#cpTable tr.cprow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px }
#cpTable tr.cpcard > td { background: var(--bg); padding: 0 }
.cpname { display: flex; align-items: center; gap: 8px; min-width: 10em }
.cpname img, .cpnopic { width: 40px; height: 40px; flex: none; object-fit: contain; border-radius: 6px; background: var(--sunk) }
.cpname > span { display: grid; gap: 1px }
.cpboost { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; min-width: 13em }
.cpboost b { color: var(--accent); white-space: nowrap }
.cpfac { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap }
.cpfac::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--cpf, var(--muted)); flex: none }
.cpf-red { --cpf: var(--q7) } .cpf-green { --cpf: var(--q3) } .cpf-blue { --cpf: var(--q4) }
.cpcardin { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px 22px; padding: 12px 14px; white-space: normal; max-width: 92vw; position: sticky; left: 0 }
@media (max-width: 820px) { .cpcardin { grid-template-columns: minmax(0, 1fr) } }
.cpcardin h3 { margin: 10px 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted) }
.cpcardin .cpcol > h3:first-child { margin-top: 0 }
.cpcardin p { margin: 4px 0 0 }
.cpmini { font-size: 12.5px }
.cpmini td, .cpmini th { padding: 4px 6px }
.cpgrp { text-align: center }
.cpmini td:first-child { min-width: 9em }
.cpinputs { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end }
.cpinputs .cpwho select { min-width: 12em }
.cpat { display: flex; flex-wrap: wrap; gap: 10px; border: 1px solid var(--line); border-radius: var(--r); padding: 6px 12px 10px; margin: 0 }
.cpat legend { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 4px }
.cpat input[type="number"] { width: 6.5em }
.stat.cpbig .v { font-size: 16px; overflow-wrap: anywhere }
.stat.cpneed .v { font-size: 15px; font-weight: 600 }
.stat .k .tag { vertical-align: middle }
.cpfacs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px }
.cpfaccard { border-top: 4px solid var(--cpf, var(--line)); display: grid; gap: 6px; align-content: start }
.cpfaccard h3 { font: 400 18px var(--display) }
.cpfaccard h4 { margin: 4px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted) }
.cpcaps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 6px 10px }
.cpcaps li { display: flex; align-items: center; gap: 8px; font-size: 13.5px }
.cpcaps li img, .cpcaps li .cpnopic { width: 32px; height: 32px; flex: none; object-fit: contain; border-radius: 6px; background: var(--sunk) }
.cpcaps li > span { display: grid; line-height: 1.25 }
.cpnarrow { max-width: 560px }
/* end captains draft */

/* ragnarok draft (2026-11-16): events/ragnarok/ (ragnarok.js) and events/ragnarok/store/ (ragnarok-store.js) */
.rgsec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0 }
.rgtier { flex: 1 1 20em; min-width: 0; max-width: 34em }
.rgtier select { width: 100% }
.rgsec h3 { margin-top: 6px }
.rgcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 12px }
.rgcard { display: grid; gap: 8px; align-content: start }
.rgcard h3 { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font: 400 18px var(--display) }
.rgcard p { font-size: 14px }
.rgrules summary { cursor: pointer; color: var(--accent); font-size: 13.5px }
.rgrules ul { margin: 6px 0 0; padding-left: 1.1em; display: grid; gap: 3px; font-size: 13.5px }
.rgrules p { margin-top: 6px }
.rgsquads th[scope="row"], .rgtiers th[scope="row"], .rgboost th[scope="row"] { background: var(--surface); color: var(--ink); font-size: 13px; white-space: normal }
.rgtiers th[scope="row"] { min-width: 15em }
.rgladder { max-height: 460px; overflow-y: auto }
.rgladder thead th { position: sticky; top: 0; z-index: 1 }
.rgladder td, .rgladder th { font-variant-numeric: tabular-nums }
.rsbar input[type="number"] { width: 11em }
.rsbar select { max-width: 100% }
.rsout .stat .k b { color: var(--ink) }
.rsout .rsgoal { font-size: 14px; color: var(--ink) }
.rsmedals { margin-top: 8px }
.rsshop { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0 }
.rslots td { vertical-align: middle }
.rslots tfoot th, .rslots tfoot td { background: var(--sunk); border-top: 1px solid var(--line); border-bottom: 0 }
.rslots tr.off td { color: var(--muted) }
.rslots tr.off img { opacity: .55 }
.rslot { display: flex; align-items: center; gap: 8px; min-width: 14em }
.rslot img, .rsnopic { width: 32px; height: 32px; flex: none; object-fit: contain; border-radius: 6px; background: var(--sunk) }
.rslot > span { display: grid; gap: 2px; justify-items: start }
.rslot small { font-size: 12px; line-height: 1.3 }
.rscur { display: block; font-size: 11.5px }
.rsqty { display: inline-flex; align-items: center; gap: 6px }
.rsqty input[type="number"] { width: 6em; min-height: 32px; padding: 3px 7px; text-align: right }
.rscrypt { background: var(--gold-soft); color: var(--gold) }
.rsbest { margin: 0; padding-left: 1.1em; display: grid; gap: 5px; max-width: 70ch }
.rgcardic { width: 40px; height: 40px; object-fit: contain; flex: none }
.rgth { display: inline-flex; align-items: center; gap: 6px }
.rgthn { justify-content: flex-end }
.rgic { width: 26px; height: 26px; object-fit: contain; flex: none }
.rginside { font-size: 12.5px; max-width: 34em }
.rginside summary { cursor: pointer; color: var(--accent) }
.rginside p { margin: 4px 0 }
.rgcaps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px }
.rgcaps li { display: flex; align-items: center; gap: 5px }
.rgcaps img, .rgcaps .rsnopic, .rgdrops img, .rgdrops .rsnopic { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; vertical-align: middle; margin-right: 5px }
.rgdrops { width: auto; font-size: 12.5px }
.rgdrops td { padding: 2px 8px 2px 0; border: 0; white-space: nowrap }
/* end ragnarok draft */

/* summon-mastery draft (2026-11-17): events/summon-mastery/ (summon_mastery.js) */
.smsec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0 }
.smsec h3 { margin-top: 6px }
.smrules summary, .smdays summary { cursor: pointer; color: var(--accent); font-size: 13.5px }
.smrules ul { margin: 6px 0 0; padding-left: 1.1em; display: grid; gap: 3px; font-size: 13.5px }
.smdays .scroll { margin-top: 8px; max-height: 480px; overflow-y: auto }
.smdays thead th { position: sticky; top: 0; z-index: 1 }
.smcap { display: inline-flex; align-items: center; gap: 6px }
.smcap img { width: 28px; height: 28px; object-fit: contain; flex: none; border-radius: 6px; background: var(--sunk) }
.smcaps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px }
.smladders { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 12px; align-items: start }
.smgoals td:nth-child(3) { min-width: 9em }
.smladder { display: grid; gap: 8px; min-width: 0 }
.smladder h3 { margin: 0; font: 400 18px var(--display) }
.smcycle td, .smseason td, .smgoals td, .smcaptains td { font-variant-numeric: tabular-nums }
.smcycle tr.now td, .smseason tr.now td { background: var(--gold-soft) }
.smcaptains tfoot th, .smcaptains tfoot td { background: var(--sunk); border-top: 1px solid var(--line); border-bottom: 0; vertical-align: top }
.smcaptains th[scope="row"] { color: var(--ink); text-align: left }
.smcycle td, .smcaptains td { vertical-align: middle }
/* end summon-mastery draft */
/* prime-arena draft (2026-11-17): events/prime-arena/ (prime-arena.js) and events/prime-arena/store/ (prime-arena-store.js); reuses the ragnarok rg/rs rules */
.panc { background: var(--warn-soft); color: var(--ink); vertical-align: middle }
.pawhen:empty { display: none }
.padiv th[scope="row"], .paelo th[scope="row"], .padaily th[scope="row"], .papass th[scope="row"], .pacmp th[scope="row"], .pachest th[scope="row"] { background: var(--surface); color: var(--ink); font-size: 13px; white-space: normal }
.padaily td, .pachest td, .paelo td { font-variant-numeric: tabular-nums }
.pato { display: block; font-size: 11px }
.pafinal summary { cursor: pointer; color: var(--accent); font-size: 14px; margin: 4px 0 }
.pafinal .scroll { margin-top: 6px }
.pacounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px }
.pacounts h4 { margin: 0 0 6px; font-size: 15px }
.pacounts ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; font-size: 14px }
.pabar .pacheck { display: flex; flex-direction: row; align-items: center; gap: 8px; max-width: 26em }
.padaily td:first-child, .pafinal td:first-child, .paseason td:first-child { white-space: nowrap }
.pabar input[type="number"] { width: 11em }
.pabar select { max-width: 100% }
/* end prime-arena draft */
/* summoning-circle draft (2026-11-17): player/summoning-circle/ and its calculator/ (summoning-circle.js) */
.scsec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0 }
.scsec h3 { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px }
.scwhat { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start }
.scwhat p { margin: 0 0 8px }
.scbuilding { width: 128px; height: auto; object-fit: contain }
@media (max-width: 520px) { .scwhat { grid-template-columns: minmax(0, 1fr) } .scbuilding { width: 96px } }
.scic { width: 26px; height: 26px; object-fit: contain; flex: none; vertical-align: middle; margin-right: 4px }
.sclist { margin: 0; padding-left: 1.1em; display: grid; gap: 5px; max-width: 75ch }
.sccaps { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px }
.sccap { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap }
.sccap img { width: 26px; height: 26px; object-fit: contain; border-radius: 5px; background: var(--sunk) }
.scodds td, .scmean td, .scvar td, .sccost td { font-variant-numeric: tabular-nums }
.scodds tfoot th, .scodds tfoot td { background: var(--sunk); border-top: 1px solid var(--line); border-bottom: 0 }
.scmean th[scope="row"], .scvar th[scope="row"], .sccost th[scope="row"] { background: var(--surface); color: var(--ink); font-size: 13px; white-space: normal; text-align: left }
.scbeg summary { cursor: pointer; color: var(--accent); font-size: 14px; margin: 4px 0 }
.scbeg .scroll { margin-top: 6px }
.scbar select { max-width: 100% }
.scbar input[type="number"] { width: 9em }
.scwho { flex: 1 1 14em; min-width: 0; max-width: 22em }
.scwho select { width: 100% }
.scstars { display: contents }
.scstars[hidden] { display: none }
.scopts { margin-top: 10px }
.sccheck { display: flex; align-items: center; gap: 8px; font-size: 14px; max-width: 26em }
#scCalc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0 }
#scCalc .panel + .panel { margin-top: -8px }
.scopts .field[hidden] { display: none }
.sconewrap { max-width: 36em }
#scOut .stats + p { margin-top: 10px }
#scOut p { margin: 4px 0 }
/* end summoning-circle draft */

/* clan-altar draft (2026-11-17): seasonal/clan-altar/ (clan_altar.js) */
.casec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0 }
.casec h3 { margin-top: 6px }
.cahead { display: flex; gap: 14px; align-items: flex-start }
.cahead p { margin: 0 }
.caart { width: 72px; height: 72px; object-fit: contain; flex: none; border-radius: 10px; background: var(--sunk) }
.caic { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; margin-right: 5px }
.cath { display: flex; align-items: center; gap: 2px }
.calist { margin: 0; padding-left: 1.1em; display: grid; gap: 5px }
.tag.canc { background: var(--warn-soft); color: var(--ink); margin-left: 4px; vertical-align: 1px }
.caprice { display: inline-grid; gap: 2px; justify-items: end }
.capi { white-space: nowrap }
.cacost td, .catiers td, .cagrid td, .cachests td { font-variant-numeric: tabular-nums; vertical-align: middle }
.cacost tfoot th, .cacost tfoot td { background: var(--sunk); border-top: 1px solid var(--line); border-bottom: 0; vertical-align: top }
.cabar select { max-width: 15em }
.cagrid, .cachests { width: auto; min-width: min(36em, 100%) }
.caevents { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px }
.caevents li::before { content: "•"; color: var(--accent); margin-right: 6px }
/* end clan-altar draft */

/* trials-of-olympus draft (2026-11-17): events/trials-of-olympus/ (olympus.js) and its store/ (olympus-store.js) */
.olnc { background: var(--gold-soft); color: var(--gold); text-transform: none; letter-spacing: 0 }
.olwhen th[scope="row"] { background: var(--surface); color: var(--ink); font-size: 13px; white-space: normal; min-width: 12em }
.olclan tr.olfirst > * { border-top: 2px solid var(--line) }
.olclan th[scope="row"] { background: var(--surface); color: var(--ink); font-size: 13px; white-space: nowrap; vertical-align: top }
.olcrypt td { font-variant-numeric: tabular-nums }
#olLadder tr.ol-scrolls td { background: var(--gold-soft) }
.oslock { background: var(--gold-soft); color: var(--gold) }
.osgoals { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; font-size: 14px }
.osgoals b { color: var(--ink) }
/* end trials-of-olympus draft */

/* forest-pass draft (2026-11-17): seasonal/forest-pass/ (forest-pass.js) and its store/ (forest-store.js) */
.fpic { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; margin-right: 6px }
.fph2ic { width: 30px; height: 30px; object-fit: contain; vertical-align: middle; margin-right: 8px }
.fpnc { font-size: 11.5px; white-space: nowrap }
.fpcamp { border-left: 4px solid var(--accent); padding-left: 12px }
.fpms td, .fptot td { vertical-align: middle }
.fpchoose { margin: 4px 0 0; padding-left: 18px; columns: 2 14em; font-size: 13px }
.fscheck { display: flex; flex-direction: row; align-items: center; gap: 8px; min-height: 40px }
.rslots tr.locked td:first-child .rslot > img { opacity: .6 }
.fslock { font-weight: 400 }
.fsgoals td small { display: block }
.fpms small, .fptot small { display: block }

/* dark-omens draft (2026-11-17): events/dark-omens/ (dark-omens.js) */
.dosec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0 }
.dosec h3 { margin-top: 6px }
.docards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 12px }
.docard { display: grid; gap: 8px; align-content: start }
.docard h3 { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font: 400 18px var(--display) }
.docard p, .donames p { font-size: 14px }
.donames { border-left: 4px solid var(--gold); }
.donames h3 { margin: 0 0 4px }
.dorules summary { cursor: pointer; color: var(--accent); font-size: 13.5px }
.dorules ul { margin: 6px 0 0; padding-left: 1.1em; display: grid; gap: 3px; font-size: 13.5px }
.dorules p { margin-top: 6px; font-size: 13.5px; max-width: 75ch }
.docardic { width: 40px; height: 40px; object-fit: contain; flex: none }
.doh { width: 30px; height: 30px; object-fit: contain; vertical-align: middle; margin-right: 8px }
.doic { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; margin-right: 5px }
.doth { display: inline-flex; align-items: center; gap: 4px }
.doband { flex: 1 1 20em; min-width: 0; max-width: 34em }
.doband select { width: 100% }
.tag.nc { background: var(--warn-soft); color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 600 }
.dosquads th[scope="row"], .dobands th[scope="row"] { background: var(--surface); color: var(--ink); font-size: 13px; white-space: normal }
.dobands td { white-space: normal; font-size: 13px; min-width: 18em }
.dokills td, .domis td, .dogoals td, .doclan td, .dorob td { font-variant-numeric: tabular-nums }
.dogoals caption { caption-side: top; text-align: left; font-size: 13px; color: var(--muted); padding: 0 0 4px }
.dogoals td:last-child { white-space: normal; min-width: 16em }
.dosum th, .dosum td { background: var(--sunk); border-top: 1px solid var(--line); font-weight: 600 }
.doclan tr.dogroup td, .dorob tr.dogroup td { border-top: 2px solid var(--line) }
.doclan td[rowspan], .dorob td[rowspan] { vertical-align: top; background: var(--surface) }
.dobp td { white-space: normal; min-width: 11em; font-size: 13px }
.dobp td.n { min-width: 0 }
.dobp tr.reached td { background: var(--accent-soft) }
.docalc { display: grid; gap: 10px }
.docalc h3 { margin: 0 }
.docalc input[type="number"] { width: 11em }
.doband-tables { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0 }
.doband-tables[hidden] { display: none }
.doband-tables h3 { margin: 6px 0 0 }
.doband-tables h3 .tag, .dogoals caption { white-space: normal }
.dowin, .dofat, .dobonus { width: auto; min-width: 18em }
/* a narrow table's frame hugs the table instead of running the full width (owner, 2026-11-17) */
.scroll.fit { width: fit-content; max-width: 100% }
.doclan td:last-child { white-space: nowrap }
.doclan th .doth, .dorob th .doth { white-space: normal; min-width: 7em }
/* end dark-omens draft */
/* olympus calculators draft (2026-11-17): events/trials-of-olympus/clan-points/ (olympus-clan.js) and oil/ (olympus-oil.js) */
.ocmembers { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px 12px; align-items: end }
.ocmembers input[type="number"] { width: 100%; min-width: 0 }
.ocmembers .ocsum b { font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 32px }
.octal select { max-width: 100%; min-width: 9em }
.octal th[scope="row"] { background: var(--surface); color: var(--ink); font-size: 13px; white-space: normal; min-width: 9em }
.octal tfoot th, .octal tfoot td { background: var(--sunk); border-top: 1px solid var(--line); font-weight: 600; font-size: 13px }
.octal td.ocover, .octal .ocover { color: var(--bad, #b3261e) }
.ocbest td, .oocrypt td, .ooin td { font-variant-numeric: tabular-nums }
.ocbest tr.mark td, .oocrypt tr.mark td { background: var(--accent-soft) }
.oocrypt tr.off td { color: var(--muted) }
.oocrypt thead th { white-space: normal; vertical-align: bottom }
.oocrypt td:first-child { white-space: nowrap }
.ooin td:first-child { white-space: normal }
/* end olympus calculators draft */
/* item pictures inside reward tables (owner, 2026-11-17) */
.paic { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; margin-right: 4px }
/* Epic-monster event drafts (events/doomsday/, arachnes-swarm/, armageddon/). The goal tables reuse .fsgoalswrap /
   .fsgoals from seasonal/forest-surges/. The tier picker panel kept narrow; the picked tier's row in the season
   totals table (monster-events.js sets tr.picked); past windows dimmed; the compact ranking table. */
.panel.mepick { max-width: 680px }
.metot tr.picked th, .metot tr.picked td { background: var(--accent-soft) }
.mewin tr.muted td { color: var(--muted) }
.metot td, .dorank td, .dobonus td, .dokill td { font-variant-numeric: tabular-nums }
.dorank td:last-child { white-space: nowrap }
/* Forest Surges goal tables (owner, 2026-11-17: narrower, better aligned): one width for every table, fixed columns,
   the amount right-aligned in its own column next to the reward */
.fsgoalswrap { max-width: 680px }
.fsgoals { table-layout: fixed }
.fsgoals td { vertical-align: middle }
.fsgoals col.fsc1 { width: 4.5em }
.fsgoals col.fsc2 { width: 9.5em }
.fsgoals col.fsc3 { width: 6.5em }
.fsgoals td.fsamt { padding-right: 4px }
.fsgoals td.fsamt + td { padding-left: 2px }
/* Hellforge shop summary (events/hellforge/, owner 2026-11-17): the set name readable and never clipped, the eight
   quality columns of one tight width; below 680px the table scrolls inside its own frame */
.hsshopwrap { max-width: 780px }
.hsshop { table-layout: fixed; min-width: 680px }
.hsshop col.hsset { width: 12.5em }
.hsshop thead th { font-size: 11px; padding-left: 4px; padding-right: 6px; vertical-align: bottom }
.hsshop th[scope="row"] { background: var(--surface); color: var(--ink); font-size: 13px; white-space: normal }
.hsshop td { font-variant-numeric: tabular-nums; padding-left: 4px; padding-right: 6px }
/* Hellforge and Shadow Invasion goal tables (.fsgoals.hsgoals) on a phone: narrower fixed columns so the reward keeps
   room; the long "… points needed" header wraps */
@media (max-width: 520px) {
  .hsgoals col.fsc1 { width: 3.6em }
  .hsgoals col.fsc2 { width: 6.6em }
  .hsgoals col.fsc3 { width: 5.8em }
  .hsgoals thead th { white-space: normal; vertical-align: bottom; padding-left: 4px; padding-right: 6px }
}
/* Forest Surges tables (owner 2026-11-18, "layout issue"): the goal tables' second header wraps instead of running
   into "Reward"; the long per-Sigil headers wrap; the "Also" lists keep room for one item per line; the two-column
   season totals table is only as wide as it needs. */
.fsgoals th { white-space: normal; vertical-align: bottom }
.fsgoals th .doth { justify-content: flex-end }
.fssurges thead th, .fskills thead th, .fstot thead th { vertical-align: bottom }
.fssurges thead th.n:last-child, .fskills thead th.n:nth-child(6) { white-space: normal; min-width: 7em; max-width: 10em }
.fstot thead th { white-space: normal }
.fskills td:last-child { min-width: 17em }
.fstot td:last-child { min-width: 15em }
@media (max-width: 520px) {
  .fssg col.fsc1 { width: 3.6em }
  .fssg col.fsc2 { width: 6.6em }
  .fssg col.fsc3 { width: 5.8em }
  .fssg thead th { padding-left: 4px; padding-right: 6px }
}

/* clan/union-of-triumph/ (draft 2026-11-18): the tokens/coins comparison, the first-line bonus table and the shop
   table, kept inside a 360 px phone without breaking words. */
.uttok col.utrow { width: 7.5em }
.uttok td, .uttok th { vertical-align: top }
.utfirst col.utc1 { width: 2.6em }
.utfirst col.utc2 { width: 5.6em }
.utfirst col.utc4 { width: 4.2em }
.uttot col.uttc1 { width: 7.5em }
.utrank th .doth { min-width: 0; white-space: normal }
.utshop td small { display: block }
.utshop th { white-space: normal; vertical-align: bottom }
.utshop td.fsamt { padding-right: 4px; white-space: nowrap }
.utshop td.fsamt + td { padding-left: 2px }
@media (max-width: 480px) {
  .uttok col.utrow { width: 5.8em }
  .uttok th, .uttok td, .utshop th, .utshop td { padding-left: 5px; padding-right: 5px }
  .utshop, .utrank { font-size: 13px }
}
/* Triumphal Challenge (draft 2026-11-18): events/triumphal-challenge/ (triumphal-challenge.js). The reward track keeps
   each amount right-aligned in its own column next to its item; the level totals in three panels; the running season
   highlighted; the game's descriptions under a name on their own line. */
.tctrack { min-width: 760px }
.tctrack col.tcl { width: 3.6em }
.tctrack col.tcs { width: 4.6em }
.tctrack col.tca { width: 5.4em }
.tctrack td { vertical-align: top; white-space: normal }
.tctrack td.tcamt, .tchunter td.tcamt { padding-right: 4px }
.tctrack td.tcamt + td, .tchunter td.tcamt + td { padding-left: 2px }
.tctrack td small, .tcchange td small, .tcprices td small, .tcshop td small { display: block; font-size: 12px }
.tctotals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px }
.tctotals h4 { margin: 0 0 6px; font-size: 14px }
.tctotals ul { margin: 0; padding-left: 1.1em; display: grid; gap: 3px; font-size: 13.5px; font-variant-numeric: tabular-nums }
.tcseasons tr.tcnow td { background: var(--accent-soft) }
.tcchange td, .tcprices td, .tcshop td, .tcgenres td, .tcseasonal td { white-space: normal; vertical-align: top }
.tcchange td, .tcchange th[scope="row"] { min-width: 12em }
.tcchange th[scope="row"], .tcprices th[scope="row"] { background: var(--surface); color: var(--ink); font-size: 13px; white-space: normal }
.tcprices td:nth-child(3) { min-width: 14em }
.tcgenres td:first-child, .tcseasonal td:first-child { min-width: 14em }
.tcshop { min-width: 30em }
.tcshop col.tcp { width: 6.2em }
.tcshop thead th { white-space: normal; vertical-align: bottom }
.tcseason { display: block }
.tcseason + .tcseason { margin-top: 6px }
.tcsales td:nth-child(3) { white-space: normal }
/* player/artifacts/ and its calculator/ (draft 2026-11-19, artifact-calculator.js): the artifact list keeps each
   artifact's bonus lines together under its picture and name; the long star, level and bonus tables stay narrow and
   right-aligned; the calculator's Now / Target panels side by side where there is room. */
.arlist { min-width: 34em }
.arlist col.arc1 { width: 13em }
.arlist col.arc3 { width: 6em }
.arlist tbody.argroup, .arpool tbody.argroup { border-top: 2px solid var(--line) }
.arlist td, .arpool td { vertical-align: top }
.arlist td[rowspan], .arpool td[rowspan] { background: var(--surface) }
.arname { display: flex; align-items: center; gap: 8px }
.arname > span { display: grid; gap: 1px }
.arname small { font-size: 12px }
.aric { width: 36px; height: 36px; flex: none; object-fit: contain }
.arstars thead th, .arlevels thead th, .archance thead th, .arcost thead th, .aritems thead th { white-space: normal; vertical-align: bottom }
.arstars tr.arstar td, .arlevels tr.arstar td { border-bottom: 2px solid var(--line) }
.arxp td small, .arbon td small { display: block; font-size: 12px }
.arxp td:last-child { white-space: normal; min-width: 14em }
.arwhere td { white-space: normal; vertical-align: top }
.arwhere td:first-child { min-width: 10em }
.arwhere td:last-child { min-width: 16em }
.artable summary { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px }
.artwo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 10px; align-items: start; margin-top: 6px }
.arbonus thead th { white-space: normal; vertical-align: bottom }
.arsides { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; margin-top: 12px }
.arside { display: grid; gap: 8px; margin: 0; min-width: 0 }
.arside legend { font-weight: 600; padding: 0 4px }
.arside select, .arwho select { max-width: 100% }
.arheld { margin-top: 12px }
.arheld summary { cursor: pointer; color: var(--accent) }
.arheld .arbar { margin-top: 8px }
.arbon td:first-child { white-space: normal; min-width: 12em }
/* end player/artifacts/ draft */
/* player/hero-talents/ and its planner/ (draft 2026-11-19, talent-planner.js): one table per tree with the talent's
   picture and name together, the value at every rank folded away in a wide scrolling table, the two points tables
   side by side where there is room; the planner's tree buttons, its rows with the - / + / max buttons, and the
   learned, full and above-the-Hero-level rows. */
.httrees { min-width: 36em }
.httrees col.htc1, .htobs col.htc1 { width: 11em }
.httrees col.htc3 { width: 7em }
.httrees col.htc4 { width: 13em }
.httrees td, .httal td, .htobs td { white-space: normal }
.httrees thead th, .httal thead th, .htobs thead th { white-space: normal; vertical-align: bottom }
.httrees tr.httotal td { border-top: 2px solid var(--line) }
.htpair { display: flex; flex-wrap: wrap; gap: 12px; align-items: start }
.httal { min-width: 36em }
.httal col.htn { width: 18em }
.httal col.htv, .htobs col.htv { width: 7em }
.httal col.htr, .htobs col.htr { width: 5em }
.httal td small, .htobs td small { display: block; font-size: 12px }
.htname { display: flex; align-items: center; gap: 8px }
.htname > span { display: grid; gap: 1px; min-width: 0 }
.htname small { font-size: 12px }
.htic { width: 32px; height: 32px; flex: none; object-fit: contain }
.htrank th, .htrank td { padding: 5px 7px }
.htrank td:first-child { white-space: normal; min-width: 13em }
.htrank td.htnc { background: var(--warn-soft) }
.htobs { min-width: 40em }
.htobs col.htb { width: 15em }
.htobs tbody.htgroup { border-top: 2px solid var(--line) }
.htbar { align-items: end }
.htbar input[type="number"] { width: 7em }
.htlink { width: 100%; font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink) }
.htnotes span { display: block }
.httabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px }
.httabs button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); font-weight: 600 }
.httabs .htused { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums }
.htpane { margin-top: 10px; display: grid; gap: 8px; min-width: 0 }
.htpane[hidden] { display: none }
.htplan { min-width: 30em }
.htplan col.htr, .htplan col.htv { width: 5.5em }
.htplan col.htacts { width: 10.5em }
.htplan td { vertical-align: middle }
.htplan td:first-child { white-space: normal }
.htplan .htwhy { color: var(--muted); font-style: italic }
.htplan tr.htlearned td:first-child { box-shadow: inset 3px 0 0 var(--accent) }
.htplan tr.htfull { background: var(--accent-soft) }
.htplan tr.htbad { background: var(--warn-soft) }
.htact { white-space: nowrap }
.htact button { min-width: 36px; min-height: 34px; padding: 4px 8px; justify-content: center; margin-right: 3px }
.htact button:disabled { opacity: .45; cursor: default }
.htsum td:first-child { white-space: normal; min-width: 12em }
.htghead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px }
.htghead h2, .htghead h3 { margin: 0 }
.htghead .htgrk { font-size: 13px; font-variant-numeric: tabular-nums; margin-left: auto }
.htghead.httroop { margin-top: 10px; padding-top: 10px; border-top: 2px solid var(--line) }
.htgmax { min-height: 34px; padding: 4px 10px; justify-content: center }
.htgmax:disabled { opacity: .45; cursor: default }
.htplan tbody.htkind { border-top: 2px solid var(--line) }
.htplan tr.htkrow td { background: var(--sunk) }
.htplan tr.htkrow .htgrk { font-size: 12px; color: var(--muted) }
.htplan tr.htkrow.htfull td { background: var(--accent-soft) }
@media (max-width: 560px) {
  .htplan, .htplan tbody { display: block; min-width: 0 }
  .htplan thead, .htplan colgroup { display: none }
  .htplan tr { display: grid; grid-template-columns: auto auto 1fr; gap: 4px 12px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line) }
  .htplan td { border: 0; padding: 0 }
  .htplan td:first-child { grid-column: 1 / -1 }
  .htplan tr.htlearned td:first-child { box-shadow: none }
  .htplan tr.htlearned { box-shadow: inset 3px 0 0 var(--accent) }
  .htplan td.htact { justify-self: end }
  .htplan tr.htkrow { background: var(--sunk) }
  .htplan tr.htkrow.htfull { background: var(--accent-soft) }
}
/* end player/hero-talents/ draft */

/* Rise of the Ancients (draft 2026-11-19): levels, artifacts, treasure, summons, goals */
.ralv table, table.raw, table.rasum { font-size: 13px }
.ralv td.rachest { white-space: normal; min-width: 12em }
.ralv tr.rahit td { background: var(--gold-soft) }
table.raart input, table.ratre input { width: 7em }
table.ratre select { max-width: 12em }
table.raart th { white-space: normal; min-width: 6em }
table.raart td.ratarget { white-space: nowrap }
table.raart td, table.ratre td { vertical-align: middle }
.rabox { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0 }
.rabox h3 { margin: 6px 0 0 }
.rabox > p { margin: 0 }
.ragoals table { font-size: 12.5px }
.ragoals td.ragoal { vertical-align: top; min-width: 7.5em }
.ragoals td.ragoal small { display: inline-flex; align-items: center; margin-right: 4px }
.ragoals td.ragoal .doic { width: 18px; height: 18px; margin-right: 2px }
.ragoals td.raok { background: var(--accent-soft) }

/* Dragon (draft 2026-11-20): player/dragon/ and its calculator */
table.drevo th, .drlv th { white-space: normal; min-width: 5em; vertical-align: bottom }
table.drevo, .drlv table, table.drwhere, table.drq { font-size: 13px }
.panel.drgo { width: fit-content; max-width: 100% }
.drgo input { width: 7em }
#drLvTable tr.drhit td { background: var(--gold-soft) }
table.drwhere td small, table.drbon td small { display: block }
table.drwhere th[scope="rowgroup"] { vertical-align: top; background: var(--sunk) }
#drCalc .arside { align-content: start }
.rabox.drmid { margin: 12px 0 }
table.drbon th:first-child, table.drbon td:first-child { min-width: 9em }
table.drband td, table.drband th, table.drnpc td { white-space: nowrap }
/* Research Camp: the three rewards on top (needs, chest, its choices) and the plan options (owner 2026-11-20) */
.rewards-top td .choose { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; white-space: normal }
.rewards-top td .choose .mchip { font-size: 12px }
.optblock { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 14px }
.optblock[hidden] { display: none }
.optnote { margin: 0 0 6px }
.fpcampv td { vertical-align: top }
.fpcampv .fpitem { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap }
.fpcampv .fpcampitem { font-weight: 600 }
.fpcampv th small { display: block; font-weight: 400 }
@media (max-width: 640px) {
  .rewards-top table.rewards thead { display: none }
  .rewards-top table.rewards tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--line) }
  .rewards-top table.rewards td { display: block; border: 0; padding: 0 8px }
  .rewards-top table.rewards td:first-child { grid-row: span 2; font-weight: 600 }
}
.fpcampv .fptrack { display: none }
@media (max-width: 640px) {
  .fpcampv .fpitem { white-space: normal; align-items: flex-start; text-align: left }
  .fpcampv td, .fpcampv th { padding-left: 6px; padding-right: 6px; white-space: normal }
  .fpcampv th:nth-child(2), .fpcampv td:nth-child(2) { display: none }
  .fpcampv .fptrack { display: block; font-size: 11.5px }
}
