:root {
  color-scheme: dark;
  --ink: #edf2e7;
  --muted: #9aac9f;
  --faint: #71847a;
  --night: #07100f;
  --night-2: #0b1715;
  --panel: #10201d;
  --panel-2: #142723;
  --line: #274039;
  --gold: #c9aa63;
  --gold-pale: #ead9a1;
  --thematic: #b6d958;
  --neutral: #99aaa3;
  --excluded: #d7777b;
  --random: #8c78c5;
  --blue: #567fbe;
  --green: #5e9a77;
  --yellow: #c9a84f;
  --shadow: 0 22px 60px rgba(0, 0, 0, .34);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 13% 4%, rgba(42, 89, 72, .24), transparent 27rem),
    radial-gradient(circle at 82% 26%, rgba(105, 79, 36, .12), transparent 31rem),
    linear-gradient(180deg, #091311 0, var(--night) 32rem);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  z-index: 20;
  mix-blend-mode: soft-light;
}

button, input, select, summary { font: inherit; }
button, select, summary, label { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: #08100e;
  background: var(--gold-pale);
  border-radius: 8px;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  width: min(1180px, calc(100% - 40px));
  min-height: 108px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(201, 170, 99, .24);
}

.brand-logo {
  width: clamp(150px, 18vw, 210px);
  height: auto;
  flex: 0 0 auto;
  padding: 2px 4px;
  background: #03040a;
  border-radius: 7px;
  mix-blend-mode: screen;
  filter: saturate(.82) brightness(.94) drop-shadow(0 5px 18px rgba(0, 0, 0, .55));
}

.eyebrow, .kicker {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1, h2, .category-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

h1 { margin: 0; font-size: 1.4rem; letter-spacing: .025em; }

.ghost-button {
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(14, 29, 26, .68);
  cursor: pointer;
}

.ghost-button:hover { border-color: var(--gold); background: var(--panel-2); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.theme-button { min-width: 124px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.theme-button > span:first-child { font-size: 1rem; line-height: 1; }
.compact-button { display: inline-flex; align-items: center; gap: 7px; }
.compact-button.is-active { color: var(--gold-pale); border-color: var(--gold); background: var(--panel-2); }
.table-mode-button { display: inline-flex; align-items: center; gap: 7px; }
.table-mode-button.is-active { color: var(--gold-pale); border-color: var(--gold); background: var(--panel-2); }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.hero {
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr);
  align-items: center;
  gap: clamp(38px, 8vw, 110px);
  margin: 20px 0 26px;
  padding: 58px clamp(24px, 5vw, 68px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(126, 148, 198, .24);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .38);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(3, 8, 20, .96) 0%, rgba(5, 11, 25, .88) 38%, rgba(7, 13, 29, .50) 67%, rgba(5, 9, 20, .28) 100%),
    linear-gradient(180deg, rgba(4, 8, 18, .08), rgba(4, 9, 18, .60)),
    url("assets/hero-eldritch-v1.png") 66% center / cover no-repeat;
  background:
    linear-gradient(90deg, rgba(3, 8, 20, .96) 0%, rgba(5, 11, 25, .88) 38%, rgba(7, 13, 29, .50) 67%, rgba(5, 9, 20, .28) 100%),
    linear-gradient(180deg, rgba(4, 8, 18, .08), rgba(4, 9, 18, .60)),
    image-set(url("assets/hero-eldritch-v1.webp") type("image/webp"), url("assets/hero-eldritch-v1.png") type("image/png")) 66% center / cover no-repeat;
  transform: scale(1.012);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 9px;
  z-index: -1;
  pointer-events: none;
  border: 1px solid rgba(218, 199, 147, .15);
  border-radius: 15px;
  box-shadow: inset 0 0 52px rgba(3, 7, 18, .38);
}

.hero h2 { margin: 6px 0 12px; font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: .98; letter-spacing: -.035em; text-shadow: 0 4px 28px rgba(0, 0, 0, .9); }
.hero-copy > p:last-child { max-width: 640px; color: #bdc7d0; font-size: 1.04rem; line-height: 1.7; text-shadow: 0 2px 14px rgba(0, 0, 0, .95); }

.selector-card {
  padding: 23px;
  background: linear-gradient(145deg, rgba(18, 31, 42, .92), rgba(8, 19, 27, .94));
  border: 1px solid rgba(201, 170, 99, .36);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  backdrop-filter: blur(12px);
}

.selector-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(201, 170, 99, .09);
  border-radius: 12px;
  pointer-events: none;
}

.selector-card label { display: block; margin-bottom: 9px; color: var(--gold-pale); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.select-wrap { position: relative; }
.select-wrap::after { content: "⌄"; position: absolute; right: 15px; top: 50%; color: var(--gold); transform: translateY(-56%); pointer-events: none; }

select {
  width: 100%;
  padding: 15px 44px 15px 15px;
  appearance: none;
  color: var(--ink);
  background: #0a1513;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  cursor: pointer;
}

select:focus, input:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.expansion-line { display: flex; align-items: center; gap: 5px; margin: 10px 2px 0; color: var(--muted); font-size: .82rem; }
.expansion-reference { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.expansion-icon { width: 1.5em; height: 1.5em; flex: 0 0 auto; object-fit: contain; filter: invert(88%) sepia(18%) saturate(530%) hue-rotate(355deg) brightness(91%); }

.mythos-deck-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding: 10px 12px;
  color: var(--gold-pale);
  background: rgba(213, 188, 119, .07);
  border: 1px solid rgba(213, 188, 119, .22);
  border-radius: 9px;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 700;
  text-align: left;
}

.mythos-deck-toggle:hover { background: rgba(213, 188, 119, .13); border-color: rgba(213, 188, 119, .42); }
.mythos-deck-toggle span:first-child { color: var(--gold); font-size: 1rem; }
.mythos-deck-panel { margin-top: 10px; padding: 14px; background: rgba(4, 11, 15, .58); border: 1px solid rgba(201, 170, 99, .18); border-radius: 10px; }
.mythos-deck-panel[hidden] { display: none; }
.mythos-deck-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.mythos-deck-heading strong { color: #f0e5c6; font-family: Georgia, "Times New Roman", serif; font-size: .95rem; }
.mythos-deck-heading span { color: #9fadb1; font-size: .7rem; }
.mythos-deck-grid { display: grid; grid-template-columns: minmax(42px, .7fr) repeat(3, 1fr); gap: 5px; align-items: center; }
.mythos-grid-corner, .mythos-color-heading { color: #9fadb1; font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.mythos-grid-corner { text-align: left; }
.mythos-color-heading::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; vertical-align: 1px; background: currentColor; }
.mythos-color-heading.green { color: #73c99b; }
.mythos-color-heading.yellow { color: #e2bd57; }
.mythos-color-heading.blue { color: #76a9df; }
.mythos-stage-label { color: #c9d2d2; font-family: Georgia, "Times New Roman", serif; font-size: .82rem; }
.mythos-count { padding: 7px 5px; color: #fff; border: 1px solid rgba(255, 255, 255, .20); border-radius: 5px; box-shadow: inset 0 0 12px rgba(255, 255, 255, .06); font-size: .9rem; font-weight: 900; text-align: center; }
.mythos-count.green { background: #147a4d; }
.mythos-count.yellow { background: #a98114; }
.mythos-count.blue { background: #346fae; }
.mythos-deck-panel > a { display: inline-block; margin-top: 10px; color: #ac9a6e; font-size: .68rem; text-decoration-color: rgba(172, 154, 110, .42); text-underline-offset: 2px; }
.mythos-deck-panel > a:hover { color: var(--gold-pale); }

.sticky-setup {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding: 10px 14px;
  position: sticky;
  top: 8px;
  z-index: 18;
  background: rgba(8, 20, 18, .94);
  border: 1px solid rgba(201, 170, 99, .42);
  border-radius: 13px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, .32);
  backdrop-filter: blur(18px);
}
.sticky-threat span, .setup-highlight-label { display: block; color: var(--gold); font-size: .62rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.sticky-threat strong { display: block; margin-top: 2px; overflow: hidden; color: var(--gold-pale); font-family: Georgia, serif; font-size: 1rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.sticky-mythos { display: flex; gap: 8px; }
.sticky-stage { display: grid; grid-template-columns: 18px repeat(3, 24px); align-items: center; gap: 3px; }
.sticky-stage > strong { color: var(--muted); font-family: Georgia, serif; font-size: .72rem; }
.sticky-mythos-count { width: 24px; height: 24px; display: grid; place-items: center; color: #fff; border-radius: 5px; font-size: .7rem; font-weight: 900; }
.sticky-mythos-count.green { background: #147a4d; }
.sticky-mythos-count.yellow { background: #a98114; }
.sticky-mythos-count.blue { background: #346fae; }
.sticky-setup > button, .setup-actions button { padding: 7px 10px; color: var(--gold-pale); background: rgba(201, 170, 99, .08); border: 1px solid rgba(201, 170, 99, .28); border-radius: 8px; cursor: pointer; font-size: .7rem; }
.sticky-setup > button:hover, .setup-actions button:hover { background: rgba(201, 170, 99, .16); border-color: var(--gold); }
.setup-actions button:disabled { opacity: .45; cursor: wait; }

.setup-highlights { display: grid; grid-template-columns: 1fr 1.35fr; gap: 12px; margin-bottom: 18px; scroll-margin-top: 86px; }
.setup-highlights article { min-width: 0; padding: 16px 18px; color: var(--muted); background: rgba(14, 29, 26, .82); border: 1px solid var(--line); border-radius: 12px; font-size: .8rem; line-height: 1.5; }
.prelude-recommendations { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.prelude-chip, .side-board-badge { display: inline-flex; padding: 5px 8px; color: var(--gold-pale); background: rgba(201, 170, 99, .11); border: 1px solid rgba(201, 170, 99, .25); border-radius: 999px; font-size: .72rem; font-weight: 750; }
#setupNotes ul { margin: 9px 0 0; padding-left: 18px; }
#setupNotes li + li { margin-top: 3px; }

.collection-panel {
  display: grid;
  grid-template-columns: minmax(220px, .42fr) minmax(0, 1fr);
  gap: 30px;
  margin: 0 0 18px;
  padding: 24px;
  background: linear-gradient(145deg, rgba(18, 36, 32, .96), rgba(11, 24, 21, .96));
  border: 1px solid rgba(201, 170, 99, .28);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .18);
}

.collection-intro h3 { margin: 4px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; font-weight: 500; }
.collection-intro > p:last-child { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.collection-controls { min-width: 0; }
.expansion-actions { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.expansion-actions button, .text-button { padding: 0; color: var(--gold); background: none; border: 0; cursor: pointer; font-size: .78rem; }
.expansion-actions button:hover, .text-button:hover { color: var(--gold-pale); }
.collection-saved { margin-left: auto; color: var(--faint); font-size: .72rem; transition: color .18s ease; }
.collection-saved::before { content: "✓"; margin-right: 5px; color: var(--thematic); }
.collection-saved.is-saving { color: var(--gold-pale); }
.expansion-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.expansion-option { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 10px; color: var(--muted); background: #091411; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.expansion-option:hover { color: var(--ink); border-color: #3c5a50; }
.expansion-option:has(input:checked) { color: var(--ink); background: rgba(201, 170, 99, .07); border-color: rgba(201, 170, 99, .42); }
.expansion-option:has(input:disabled) { cursor: default; }
.expansion-option input { flex: 0 0 auto; accent-color: var(--gold); }
.collection-expansion-icon { width: 30px; height: 30px; margin: -2px 1px -2px 0; }
.expansion-option-copy { min-width: 0; }
.expansion-option-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .76rem; font-weight: 650; }
.expansion-option-copy small { display: block; margin-top: 2px; color: var(--faint); font-size: .64rem; }
.collection-summary { margin: 10px 1px 0; color: var(--faint); font-size: .72rem; }

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: rgba(14, 28, 25, .86);
  border: 1px solid var(--line);
  border-radius: 14px;
  position: relative;
  top: auto;
  z-index: 10;
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.setup-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; padding-top: 2px; }
.setup-action-link { padding: 7px 10px; color: var(--gold-pale); background: rgba(201, 170, 99, .08); border: 1px solid rgba(201, 170, 99, .28); border-radius: 8px; font-size: .7rem; text-decoration: none; }
.setup-action-link:hover { background: rgba(201, 170, 99, .16); border-color: var(--gold); }
.action-status { min-height: 1.2em; margin: 5px 2px 0; color: var(--gold); font-size: .72rem; }

.search-wrap { position: relative; }
.search-wrap > span { position: absolute; left: 13px; top: 50%; color: var(--faint); font-size: 1.2rem; transform: translateY(-54%); }

input[type="search"] {
  width: 100%;
  padding: 11px 12px 11px 39px;
  color: var(--ink);
  background: #091411;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
}

input::placeholder { color: #64766d; }

.view-switch { display: flex; gap: 5px; padding: 4px; background: #091411; border: 1px solid var(--line); border-radius: 10px; }
.level-toggle { display: flex; align-items: center; gap: 7px; padding: 7px 9px; color: var(--faint); background: transparent; border: 0; border-radius: 7px; font-size: .78rem; cursor: pointer; }
.level-toggle:hover { color: var(--ink); }
.level-toggle.is-active { color: var(--ink); background: var(--panel-2); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }

.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dot.thematic { color: var(--thematic); }
.dot.neutral { color: var(--neutral); }
.dot.random { color: var(--random); }
.dot.excluded { color: var(--excluded); }

.summary-grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 12px; margin: 20px 0 14px; }
.summary-card { min-height: 118px; display: flex; flex-direction: column; justify-content: center; padding: 20px; background: linear-gradient(145deg, rgba(18, 36, 32, .94), rgba(12, 25, 22, .94)); border: 1px solid var(--line); border-radius: 13px; }
.summary-card.primary { border-color: rgba(201, 170, 99, .44); background: linear-gradient(145deg, rgba(48, 48, 31, .5), rgba(15, 29, 26, .95)); }
.summary-label { color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.summary-card strong { margin: 4px 0 1px; color: var(--gold-pale); font-family: Georgia, serif; font-size: 2rem; font-weight: 500; }
.summary-card small { color: var(--faint); }

.guidance { display: flex; align-items: center; gap: 13px; padding: 14px 16px; margin-bottom: 18px; color: var(--muted); background: rgba(201, 170, 99, .055); border: 1px solid rgba(201, 170, 99, .18); border-radius: 11px; font-size: .84rem; line-height: 1.5; }
.guidance p { margin: 0; flex: 1; }
.guidance strong { color: var(--gold-pale); }
.guidance-icon { width: 24px; height: 24px; flex: 0 0 auto; display: grid; place-items: center; color: var(--gold); border: 1px solid var(--gold); border-radius: 50%; font-family: Georgia, serif; font-style: italic; }

.monster-cup { margin-bottom: 18px; overflow: hidden; background: linear-gradient(145deg, rgba(18, 36, 32, .96), rgba(9, 21, 19, .98)); border: 1px solid rgba(201, 170, 99, .34); border-radius: var(--radius); box-shadow: 0 16px 42px rgba(0, 0, 0, .22); }
.monster-cup-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.monster-cup-heading h3 { margin: 4px 0 5px; font-family: Georgia, serif; font-size: 1.65rem; font-weight: 500; }
.monster-cup-heading p:last-child { max-width: 660px; margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.monster-cup-stats { display: flex; gap: 7px; }
.monster-cup-stats span { min-width: 92px; padding: 9px 11px; color: var(--faint); background: rgba(3, 10, 8, .32); border: 1px solid var(--line); border-radius: 9px; font-size: .67rem; text-align: center; }
.monster-cup-stats strong { display: block; margin-bottom: 1px; color: var(--gold-pale); font-family: Georgia, serif; font-size: 1.35rem; font-weight: 500; }

.seeded-draw { display: grid; grid-template-columns: minmax(210px, 1fr) minmax(150px, .45fr) auto minmax(210px, .75fr); align-items: center; gap: 14px; margin: 14px; padding: 14px; background: rgba(140, 120, 197, .08); border: 1px solid rgba(140, 120, 197, .28); border-radius: 12px; }
.seeded-draw > div:first-child > strong { display: block; margin-top: 3px; color: var(--ink); font-family: Georgia, serif; font-size: 1rem; }
.seeded-draw p { margin: 3px 0 0; color: var(--faint); font-size: .7rem; line-height: 1.4; }
.seed-field { display: grid; gap: 5px; color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.seed-field input { width: 100%; min-width: 0; padding: 9px 10px; color: var(--ink); background: #091411; border: 1px solid var(--line); border-radius: 8px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .72rem; text-transform: none; }
.seed-actions { display: grid; gap: 6px; }
.seed-actions button { padding: 8px 10px; color: var(--gold-pale); background: rgba(201, 170, 99, .08); border: 1px solid rgba(201, 170, 99, .28); border-radius: 8px; cursor: pointer; font-size: .7rem; }
.seed-actions button:first-child { color: #f1e9ff; background: rgba(140, 120, 197, .25); border-color: rgba(174, 154, 226, .55); }
.draw-result { min-height: 70px; display: flex; align-items: center; gap: 10px; padding: 6px 9px; background: rgba(3, 9, 8, .32); border: 1px solid rgba(140, 120, 197, .24); border-radius: 9px; }
.draw-result-placeholder { width: 100%; color: var(--faint); font-size: .72rem; text-align: center; }
.draw-result-copy { min-width: 0; display: grid; gap: 2px; }
.draw-result-copy small { color: var(--random); font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.draw-result-copy strong { overflow: hidden; font-family: Georgia, serif; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.draw-result-copy .expansion-reference { color: var(--faint); font-size: .62rem; }
.draw-result-copy .expansion-icon { width: 14px; height: 14px; }

.set-aside-group, .monster-group { border-top: 1px solid var(--line); }
.set-aside-group { background: rgba(201, 170, 99, .035); }
.monster-group-heading { min-height: 46px; display: flex; align-items: center; gap: 10px; padding: 10px 18px; color: var(--muted); background: rgba(3, 10, 8, .22); }
.monster-group-heading > div { min-width: 0; }
.monster-group-heading h4 { margin: 0; color: var(--ink); font-family: Georgia, serif; font-size: .98rem; font-weight: 500; }
.monster-group-heading > div > span:not(.setup-highlight-label) { display: block; margin-top: 1px; color: var(--faint); font-size: .65rem; }
#monsterSetAsideWarning { margin-left: auto; color: var(--thematic); font-size: .68rem; font-weight: 750; }
#monsterSetAsideWarning.has-warning { color: var(--excluded); }
.monster-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.monster-row { min-width: 0; min-height: 96px; display: grid; grid-template-columns: 72px minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid rgba(39, 64, 57, .5); }
.monster-row:nth-child(odd) { border-right: 1px solid rgba(39, 64, 57, .5); }
.monster-check-label { min-width: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 10px; cursor: pointer; }
.monster-image-button { width: 72px; height: 72px; position: relative; overflow: hidden; padding: 0; background: #091411; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.monster-image-button:disabled { cursor: default; }
.monster-image { width: 100%; height: 100%; display: block; object-fit: cover; }
.monster-image-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold); font-family: Georgia, serif; font-size: 1.4rem; }
.monster-image-button.has-image .monster-image-fallback { display: none; }
.monster-copy-count { min-width: 32px; color: var(--gold-pale); font-family: Georgia, serif; font-size: 1rem; font-weight: 500; text-align: center; }
.monster-row .component-check:checked ~ .component-main .component-name { color: var(--faint); text-decoration: line-through; }
.level-badge.setAside { color: var(--gold-pale); background: rgba(201, 170, 99, .13); }
.level-badge.shortfall { color: #efb1b3; background: rgba(215, 119, 123, .16); }
.monster-empty-state { margin: 0; padding: 24px; color: var(--faint); text-align: center; font-size: .78rem; }

.app-dialog { width: min(560px, calc(100% - 28px)); position: fixed; color: var(--ink); background: var(--panel); border: 1px solid rgba(201, 170, 99, .46); border-radius: 16px; box-shadow: 0 28px 90px rgba(0, 0, 0, .65); }
.app-dialog::backdrop { background: rgba(2, 7, 6, .78); backdrop-filter: blur(4px); }
.app-dialog > form { position: absolute; top: 10px; right: 10px; }
.dialog-close { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; font-size: 1.4rem; }
.monster-image-dialog { max-width: 420px; padding: 16px; text-align: center; }
.monster-image-dialog > img { width: min(100%, 320px); height: auto; margin-top: 26px; border-radius: 12px; }
.monster-image-dialog h3, .data-health-dialog h3 { margin: 12px 0 5px; font-family: Georgia, serif; font-size: 1.5rem; font-weight: 500; }
.monster-image-dialog a, .dialog-actions a { color: var(--gold); font-size: .72rem; }
.data-health-dialog { padding: 24px; }
.data-health-dialog h3 { margin-top: 3px; }
.health-summary { margin: 0 36px 16px 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.health-summary.has-warning { color: var(--excluded); }
.health-list { display: grid; grid-template-columns: 140px minmax(0, 1fr); margin: 0; border: 1px solid var(--line); border-radius: 10px; }
.health-list dt, .health-list dd { margin: 0; padding: 9px 11px; border-bottom: 1px solid var(--line); font-size: .72rem; overflow-wrap: anywhere; }
.health-list dt { color: var(--faint); font-weight: 800; }
.health-list dd { color: var(--muted); }
.health-list > :nth-last-child(-n+2) { border-bottom: 0; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 16px; }

.component-insight-drawer { width: min(500px, 100%); max-width: none; height: 100dvh; max-height: none; position: fixed; inset: 0 0 0 auto; margin: 0; padding: 24px; overflow-y: auto; color: var(--ink); background: var(--panel); border: 0; border-left: 1px solid rgba(201, 170, 99, .46); border-radius: 18px 0 0 18px; box-shadow: -24px 0 80px rgba(0, 0, 0, .5); }
.component-insight-drawer::backdrop { background: rgba(2, 7, 6, .68); backdrop-filter: blur(3px); }
body:has(.component-insight-drawer[open]) { overflow: hidden; }
.insight-topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.insight-topbar h3 { margin: 3px 0 0; font-family: Georgia, serif; font-size: 1.65rem; font-weight: 500; }
.insight-topbar form { flex: 0 0 auto; }
.insight-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; color: var(--muted); font-size: .72rem; }
.insight-meta > span + span::before { content: "·"; margin-right: 12px; color: var(--faint); }
.insight-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 20px 0 12px; }
.insight-count { min-height: 70px; display: grid; place-items: center; align-content: center; gap: 2px; padding: 8px 4px; color: var(--muted); background: rgba(3, 10, 8, .32); border: 1px solid var(--line); border-radius: 10px; font: inherit; cursor: default; }
button.insight-count { cursor: pointer; }
.insight-count[aria-pressed="false"] { opacity: .42; }
.insight-count strong { color: var(--gold-pale); font-family: Georgia, serif; font-size: 1.35rem; font-weight: 500; }
.insight-count span { font-size: .62rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.insight-count.veryThematic { border-color: rgba(182, 217, 88, .35); }
.insight-count.randomMonster { border-color: rgba(140, 120, 197, .38); }
.insight-count.nonThematic { border-color: rgba(215, 119, 123, .3); }
.insight-note { margin: 10px 0 14px; color: var(--faint); font-size: .67rem; line-height: 1.45; }
.insight-list { display: grid; gap: 7px; }
.insight-ancient-one { min-height: 66px; display: grid; grid-template-columns: minmax(0, 1fr) auto 58px; align-items: center; gap: 10px; padding: 10px 11px; background: rgba(3, 10, 8, .28); border: 1px solid var(--line); border-radius: 10px; }
.insight-ancient-one.is-current { background: rgba(201, 170, 99, .08); border-color: rgba(201, 170, 99, .48); }
.insight-ancient-one > div { min-width: 0; display: grid; gap: 3px; }
.insight-ancient-one strong { overflow: hidden; font-family: Georgia, serif; font-size: .9rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.insight-ancient-one .expansion-reference { color: var(--faint); font-size: .64rem; }
.insight-ancient-one .expansion-icon { width: 16px; height: 16px; }
.insight-ancient-one > button, .insight-navigation button { padding: 7px 9px; color: var(--gold-pale); background: rgba(201, 170, 99, .08); border: 1px solid rgba(201, 170, 99, .28); border-radius: 8px; cursor: pointer; font-size: .66rem; }
.insight-ancient-one > button:disabled, .insight-navigation button:disabled { opacity: .45; cursor: default; }
.insight-empty { padding: 28px 12px; color: var(--faint); text-align: center; font-size: .75rem; }
.insight-navigation { position: sticky; bottom: -24px; display: flex; justify-content: space-between; gap: 10px; margin: 18px -24px -24px; padding: 14px 24px; background: linear-gradient(transparent, var(--panel) 22%); }

html[data-table-mode="true"] main { width: min(1440px, calc(100% - 24px)); }
html[data-table-mode="true"] .site-header { width: min(1440px, calc(100% - 24px)); min-height: 72px; }
html[data-table-mode="true"] .brand-logo { width: 126px; }
html[data-table-mode="true"] .site-header > div:not(.header-actions),
html[data-table-mode="true"] .hero-copy,
html[data-table-mode="true"] .collection-panel,
html[data-table-mode="true"] .summary-grid,
html[data-table-mode="true"] .guidance,
html[data-table-mode="true"] footer { display: none; }
html[data-table-mode="true"] .hero { min-height: 0; grid-template-columns: 1fr; margin: 12px 0; padding: 12px; background: rgba(9, 19, 17, .84); }
html[data-table-mode="true"] .hero::before, html[data-table-mode="true"] .hero::after { display: none; }
html[data-table-mode="true"] .selector-card { width: 100%; display: grid; grid-template-columns: minmax(220px, .65fr) minmax(260px, 1fr); gap: 4px 20px; padding: 14px; box-shadow: none; }
html[data-table-mode="true"] .selector-card > label, html[data-table-mode="true"] .selector-card > .select-wrap, html[data-table-mode="true"] .selector-card > .expansion-line { grid-column: 1; }
html[data-table-mode="true"] .mythos-deck-toggle, html[data-table-mode="true"] .mythos-deck-panel { grid-column: 2; }
html[data-table-mode="true"] .mythos-deck-toggle { grid-row: 1 / span 2; align-self: start; margin-top: 0; }
html[data-table-mode="true"] .sticky-setup { top: 0; }
html[data-table-mode="true"] .component-row { min-height: 74px; }
html[data-table-mode="true"] .component-name { font-size: 1.05rem; }
html[data-table-mode="true"] .monster-row { min-height: 104px; }

.results { display: grid; gap: 12px; min-height: 240px; }
.category-panel { overflow: hidden; background: rgba(14, 29, 26, .9); border: 1px solid var(--line); border-radius: 14px; }
.category-heading { width: 100%; display: grid; grid-template-columns: 39px minmax(0, 1fr) auto 18px; align-items: center; gap: 12px; padding: 16px 18px; text-align: left; background: transparent; border: 0; cursor: pointer; }
.category-heading:hover { background: rgba(255,255,255,.018); }
.category-glyph { width: 36px; height: 36px; display: grid; place-items: center; color: var(--gold-pale); background: #0a1613; border: 1px solid var(--line); border-radius: 9px; font-family: Georgia, serif; font-size: 1.05rem; }
.category-title-wrap { min-width: 0; }
.category-title { display: block; color: var(--ink); font-size: 1.1rem; }
.category-subtitle { display: block; margin-top: 2px; color: var(--faint); font-size: .73rem; }
.mythos-stage-requirement { display: block; margin-top: 4px; color: var(--gold); font-size: .7rem; font-weight: 800; letter-spacing: .025em; }
.mythos-stage-requirement:empty { display: none; }
.category-progress { color: var(--muted); font-size: .78rem; }
.chevron { width: 8px; height: 8px; border-right: 1px solid var(--gold); border-bottom: 1px solid var(--gold); transform: rotate(45deg) translateY(-3px); transition: transform .18s ease; }
.category-heading[aria-expanded="false"] .chevron { transform: rotate(-45deg); }
.category-content { border-top: 1px solid var(--line); }
.category-content[hidden] { display: none; }

.level-section + .level-section { border-top: 1px solid rgba(39, 64, 57, .7); }
.level-heading { display: flex; align-items: center; gap: 9px; padding: 10px 18px; color: var(--faint); background: rgba(3, 10, 8, .22); font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.level-heading .level-line { height: 1px; flex: 1; background: var(--line); }
.component-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.component-row { min-width: 0; min-height: 66px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 11px; padding: 11px 18px; border-bottom: 1px solid rgba(39, 64, 57, .5); }
.component-row:nth-child(odd) { border-right: 1px solid rgba(39, 64, 57, .5); }
.component-check-label { min-width: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 11px; cursor: pointer; }
.component-insight-button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; color: var(--gold); background: rgba(201, 170, 99, .06); border: 1px solid rgba(201, 170, 99, .28); border-radius: 50%; cursor: pointer; font-family: Georgia, serif; font-size: .9rem; }
.component-insight-button:hover { background: rgba(201, 170, 99, .15); border-color: var(--gold); }
html[data-detail-icons="false"] .component-insight-button { display: none; }

html[data-density="compact"] .category-heading { padding-block: 10px; }
html[data-density="compact"] .component-row { min-height: 46px; padding-block: 6px; }
html[data-density="compact"] .component-name { font-size: .86rem; }
html[data-density="compact"] .component-meta { margin-top: 1px; font-size: .64rem; }
html[data-density="compact"] .level-heading { padding-block: 7px; }
html[data-density="compact"] .summary-card { min-height: 90px; padding-block: 12px; }
.component-row:hover { background: rgba(255,255,255,.02); }
.component-check { position: absolute; opacity: 0; pointer-events: none; }
.custom-check { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid #50655a; border-radius: 4px; }
.component-check:focus-visible + .custom-check { outline: 2px solid var(--gold); outline-offset: 2px; }
.component-check:checked + .custom-check { color: #0c1714; background: var(--thematic); border-color: var(--thematic); }
.component-check:checked + .custom-check::after { content: "✓"; font-size: .74rem; font-weight: 900; }
.component-check:checked ~ .component-main .component-name { color: var(--faint); text-decoration: line-through; }
.component-main { min-width: 0; }
.component-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: Georgia, serif; font-size: .96rem; }
.component-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 4px; color: var(--faint); font-size: .7rem; }
.component-meta > span + span::before { content: "·"; margin-right: 10px; color: #42564c; }
.component-meta .meta-expansion { color: var(--muted); }
.component-meta .expansion-icon { width: 16px; height: 16px; }

.level-badge { padding: 4px 7px; border-radius: 999px; font-size: .64rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.level-badge.veryThematic { color: #d9ef8f; background: rgba(182, 217, 88, .12); }
.level-badge.neutral { color: #bac6c1; background: rgba(153, 170, 163, .12); }
.level-badge.nonThematic { color: #e9a1a4; background: rgba(215, 119, 123, .12); }
.level-badge.randomMonster { color: #c2b5e5; background: rgba(140, 120, 197, .15); }

.category-panel[data-category="blue-mythos"] .category-glyph { color: #a9c7f0; border-color: rgba(86,127,190,.55); }
.category-panel[data-category="green-mythos"] .category-glyph { color: #afe0c0; border-color: rgba(94,154,119,.55); }
.category-panel[data-category="yellow-mythos"] .category-glyph { color: #f0d589; border-color: rgba(201,168,79,.55); }

.loading-state, .empty-state, .error-state { min-height: 250px; display: grid; place-items: center; align-content: center; gap: 15px; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.loader { width: 34px; height: 34px; border: 1px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite; }
.error-state { padding: 30px; color: #efb1b3; text-align: center; }
.error-state code { color: var(--gold-pale); }
@keyframes spin { to { transform: rotate(360deg); } }

footer { width: min(1180px, calc(100% - 40px)); display: flex; justify-content: space-between; gap: 32px; margin: 56px auto 0; padding: 25px 0 35px; color: #5f7168; border-top: 1px solid rgba(39, 64, 57, .6); font-size: .7rem; line-height: 1.5; }
footer p { margin: 0; }
footer > p { max-width: 440px; text-align: right; }
footer a { color: #91a99e; text-underline-offset: 2px; }
footer a:hover { color: var(--gold-pale); }
.footer-credit { display: grid; gap: 5px; max-width: 610px; }

html[data-theme="normal"] {
  color-scheme: light;
  --ink: #292821;
  --muted: #5f625b;
  --faint: #777a72;
  --night: #e7e0d1;
  --night-2: #f4efe4;
  --panel: #faf6ec;
  --panel-2: #eee7d8;
  --line: #c9bfaa;
  --gold: #8a641f;
  --gold-pale: #694916;
  --thematic: #71891c;
  --neutral: #697570;
  --excluded: #ac4f54;
  --random: #715da5;
  --shadow: 0 18px 45px rgba(60, 48, 28, .16);
}

html[data-theme="normal"] body {
  background:
    radial-gradient(circle at 13% 4%, rgba(107, 137, 119, .16), transparent 27rem),
    radial-gradient(circle at 82% 26%, rgba(151, 112, 47, .13), transparent 31rem),
    linear-gradient(180deg, #f6f1e7 0, var(--night) 35rem);
}

html[data-theme="normal"] body::before { opacity: .035; mix-blend-mode: multiply; }
html[data-theme="normal"] .site-header { border-bottom-color: rgba(104, 76, 28, .26); }
html[data-theme="normal"] .brand-logo { mix-blend-mode: normal; border: 1px solid rgba(82, 70, 49, .28); }
html[data-theme="normal"] .ghost-button { background: rgba(255, 252, 244, .72); }
html[data-theme="normal"] .ghost-button:hover { background: #fffaf0; }
html[data-theme="normal"] .hero { color: #edf2e7; }
html[data-theme="normal"] .hero .kicker { color: #d8bc76; }
html[data-theme="normal"] .hero select { color: #edf2e7; }
html[data-theme="normal"] .hero .selector-card label { color: #ead9a1; }
html[data-theme="normal"] .hero .expansion-line { color: #aebdc4; }
html[data-theme="normal"] .sticky-setup { background: rgba(250, 246, 236, .96); border-color: rgba(138, 100, 31, .42); }
html[data-theme="normal"] .sticky-threat strong { color: #40361f; }
html[data-theme="normal"] .setup-highlights article { background: rgba(250, 247, 239, .96); }
html[data-theme="normal"] .collection-panel { background: linear-gradient(145deg, rgba(253, 249, 239, .98), rgba(239, 232, 216, .98)); border-color: rgba(138, 100, 31, .30); }
html[data-theme="normal"] .expansion-option { background: #f8f3e8; }
html[data-theme="normal"] .expansion-option:hover { border-color: #9b8d70; }
html[data-theme="normal"] .expansion-option:has(input:checked) { background: rgba(159, 121, 47, .12); border-color: rgba(128, 91, 24, .48); }
html[data-theme="normal"] .toolbar { background: rgba(249, 245, 235, .92); }
html[data-theme="normal"] input[type="search"],
html[data-theme="normal"] .view-switch { background: #fffaf0; }
html[data-theme="normal"] input::placeholder { color: #8a8c84; }
html[data-theme="normal"] .level-toggle.is-active { background: #e7dfce; box-shadow: inset 0 0 0 1px rgba(76, 60, 33, .08); }
html[data-theme="normal"] .summary-card { background: linear-gradient(145deg, #fbf7ed, #ede6d6); }
html[data-theme="normal"] .summary-card.primary { background: linear-gradient(145deg, #f4ead0, #eee7d8); border-color: rgba(138, 100, 31, .48); }
html[data-theme="normal"] .guidance { background: rgba(138, 100, 31, .075); border-color: rgba(138, 100, 31, .22); }
html[data-theme="normal"] .monster-cup { background: linear-gradient(145deg, #fbf7ed, #ede6d6); }
html[data-theme="normal"] .seeded-draw { background: rgba(113, 93, 165, .08); }
html[data-theme="normal"] .seed-field input, html[data-theme="normal"] .draw-result, html[data-theme="normal"] .monster-image-button { background: #fffaf0; }
html[data-theme="normal"] .monster-group-heading { background: rgba(129, 108, 68, .075); }
html[data-theme="normal"] .app-dialog { background: #faf6ec; }
html[data-theme="normal"] .component-insight-drawer { background: #faf6ec; }
html[data-theme="normal"] .insight-count, html[data-theme="normal"] .insight-ancient-one { background: rgba(112, 87, 42, .035); }
html[data-theme="normal"] .monster-row, html[data-theme="normal"] .monster-row:nth-child(odd) { border-color: rgba(145, 132, 107, .42); }
html[data-theme="normal"] .category-panel { background: rgba(250, 247, 239, .96); }
html[data-theme="normal"] .category-heading:hover,
html[data-theme="normal"] .component-row:hover { background: rgba(112, 87, 42, .045); }
html[data-theme="normal"] .category-glyph { background: #eee7d8; }
html[data-theme="normal"] .level-section + .level-section,
html[data-theme="normal"] .component-row,
html[data-theme="normal"] .component-row:nth-child(odd) { border-color: rgba(145, 132, 107, .42); }
html[data-theme="normal"] .level-heading { background: rgba(129, 108, 68, .075); }
html[data-theme="normal"] .custom-check { border-color: #948a76; }
html[data-theme="normal"] .component-check:checked + .custom-check { color: #fff; }
html[data-theme="normal"] .component-meta > span + span::before { color: #b5aa95; }
html[data-theme="normal"] .level-badge.veryThematic { color: #4e6500; background: #e2ebc2; }
html[data-theme="normal"] .level-badge.neutral { color: #4f5b57; background: #e0e5e2; }
html[data-theme="normal"] .level-badge.nonThematic { color: #923b42; background: #f2dadd; }
html[data-theme="normal"] .level-badge.randomMonster { color: #58438d; background: #e4ddf2; }
html[data-theme="normal"] .category-panel[data-category="blue-mythos"] .category-glyph { color: #345b91; }
html[data-theme="normal"] .category-panel[data-category="green-mythos"] .category-glyph { color: #47765a; }
html[data-theme="normal"] .category-panel[data-category="yellow-mythos"] .category-glyph { color: #876d25; }
html[data-theme="normal"] footer { color: #6d6c64; border-top-color: rgba(120, 106, 78, .38); }
html[data-theme="normal"] footer a { color: #6e5524; }

.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; }

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 48px; }
  .hero::before { background-position: 62% center; }
  .hero h2 { max-width: 700px; }
  .selector-card { max-width: 620px; }
  .collection-panel { grid-template-columns: 1fr; gap: 18px; }
  .expansion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .sticky-setup { grid-template-columns: minmax(150px, 1fr) auto; }
  .sticky-setup > button { display: none; }
  .setup-highlights { grid-template-columns: 1fr; }
  .monster-cup-heading { grid-template-columns: 1fr; align-items: start; }
  .monster-cup-stats { width: 100%; }
  .monster-cup-stats span { flex: 1; }
  .seeded-draw { grid-template-columns: 1fr 1fr; }
  .draw-result { min-height: 74px; }
}

@media (max-width: 680px) {
  .site-header, main, footer { width: min(100% - 24px, 1180px); }
  .site-header { min-height: 78px; }
  .site-header { flex-wrap: wrap; padding: 10px 0; }
  .brand-logo { width: 122px; }
  .header-actions { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); margin-left: 0; }
  .header-actions .ghost-button { min-width: 0; min-height: 44px; padding: 8px; justify-content: center; }
  .theme-button { min-width: 42px; padding-inline: 11px; }
  .theme-button #themeLabel { display: none; }
  .compact-button span:last-child { display: none; }
  .table-mode-button span:last-child { display: none; }
  .eyebrow { display: none; }
  h1 { display: none; }
  .print-button { padding: 8px 10px; font-size: 0; }
  .print-button span { font-size: 1rem; }
  .hero { min-height: auto; padding: 40px 0 34px; }
  .hero { margin-top: 12px; padding: 42px 20px 30px; border-radius: 16px; }
  .hero::before {
    background:
      linear-gradient(90deg, rgba(3, 8, 20, .95), rgba(5, 11, 25, .78)),
      linear-gradient(180deg, rgba(4, 8, 18, .18), rgba(4, 9, 18, .72)),
      url("assets/hero-eldritch-v1.png") 67% center / cover no-repeat;
    background:
      linear-gradient(90deg, rgba(3, 8, 20, .95), rgba(5, 11, 25, .78)),
      linear-gradient(180deg, rgba(4, 8, 18, .18), rgba(4, 9, 18, .72)),
      image-set(url("assets/hero-eldritch-v1.webp") type("image/webp"), url("assets/hero-eldritch-v1.png") type("image/png")) 67% center / cover no-repeat;
  }
  .hero h2 { font-size: clamp(2.35rem, 13vw, 4rem); }
  .collection-panel { padding: 18px; }
  .expansion-grid { grid-template-columns: 1fr; }
  .collection-saved { width: 100%; margin: 3px 0 0; }
  .expansion-actions { flex-wrap: wrap; }
  .toolbar { grid-template-columns: 1fr; position: relative; top: auto; }
  .view-switch { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .level-toggle { min-height: 42px; justify-content: center; min-width: 0; }
  .setup-actions button, .setup-action-link { min-height: 42px; display: inline-flex; align-items: center; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-card { min-height: 100px; padding: 15px; }
  .summary-card strong { font-size: 1.6rem; }
  .guidance { align-items: flex-start; flex-wrap: wrap; }
  .guidance .text-button { margin-left: 37px; }
  .component-list { grid-template-columns: 1fr; }
  .component-row:nth-child(odd) { border-right: 0; }
  .category-heading { grid-template-columns: 35px minmax(0,1fr) 18px; padding: 14px; }
  .category-progress { grid-column: 2; grid-row: 2; }
  .chevron { grid-column: 3; grid-row: 1 / 3; }
  .level-badge { display: none; }
  footer { flex-direction: column; }
  footer > p { max-width: none; text-align: left; }
  .sticky-setup { grid-template-columns: 1fr; gap: 8px; top: 5px; }
  .sticky-mythos { width: 100%; justify-content: space-between; overflow-x: auto; }
  .sticky-stage { flex: 1 0 auto; }
  .monster-cup-heading { gap: 14px; padding: 18px 14px; }
  .monster-cup-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
  .monster-cup-stats span { min-width: 0; padding-inline: 6px; }
  .seeded-draw { grid-template-columns: 1fr; margin: 10px; }
  .seed-actions { grid-template-columns: 1fr 1fr; }
  .seed-actions button { min-height: 44px; }
  .monster-list { grid-template-columns: 1fr; }
  .monster-row { min-height: 86px; grid-template-columns: 62px minmax(0, 1fr) 38px; gap: 9px; padding: 8px 10px; }
  .monster-row:nth-child(odd) { border-right: 0; }
  .monster-image-button { width: 62px; height: 62px; }
  .monster-row .level-badge { display: none; }
  .component-insight-button { width: 42px; height: 42px; }
  .component-insight-drawer { width: 100%; padding: 18px; border-left: 0; border-radius: 0; }
  .component-insight-drawer .dialog-close { width: 44px; height: 44px; }
  .insight-counts { gap: 5px; }
  .insight-count span { font-size: .55rem; }
  .insight-ancient-one { grid-template-columns: minmax(0, 1fr) auto 54px; }
  .insight-ancient-one > button, .insight-navigation button { min-height: 42px; }
  .insight-navigation { bottom: -18px; margin: 16px -18px -18px; padding: 13px 18px; }
  .monster-group-heading { padding-inline: 13px; }
  #monsterSetAsideWarning { max-width: 48%; text-align: right; }
  .health-list { grid-template-columns: 1fr; }
  .health-list dt { padding-bottom: 2px; border-bottom: 0; }
  .health-list dd { padding-top: 2px; }
  .health-list > :nth-last-child(2) { border-bottom: 0; }
  .app-dialog { max-height: calc(100dvh - 24px); overflow-y: auto; }
  html[data-table-mode="true"] .selector-card { display: block; }
  html[data-table-mode="true"] .mythos-deck-toggle { margin-top: 10px; }
  html[data-table-mode="true"] .hero { padding: 8px; }
  html[data-density="compact"] .hero { padding-block: 28px 22px; }
  html[data-density="compact"] .setup-highlights article { padding: 11px 13px; }
  html[data-density="compact"] .category-glyph { width: 30px; height: 30px; }
  html[data-density="compact"] .category-heading { grid-template-columns: 31px minmax(0,1fr) 18px; padding: 8px 10px; }
  html[data-density="compact"] .component-row { min-height: 42px; padding: 5px 11px; }
}

@media print {
  :root { color-scheme: light; }
  body { color: #1a1a1a; background: #fff; }
  body::before, .site-header, .hero::before, .hero::after, .hero-copy p:last-child, .sticky-setup, .collection-panel, .toolbar, .action-status, .guidance-icon, .text-button, .seeded-draw, footer, .app-dialog, .component-insight-drawer, .component-insight-button { display: none !important; }
  main { width: 100%; }
  .hero { min-height: 0; display: block; margin: 0; padding: 0 0 16px; border: 0; box-shadow: none; }
  .hero-copy h2 { font-size: 24pt; margin-bottom: 6px; }
  .selector-card { padding: 0; color: #111; background: none; border: 0; box-shadow: none; }
  .selector-card label, .select-wrap::after, .mythos-deck-toggle, .mythos-deck-panel > a { display: none; }
  .mythos-deck-panel, .mythos-deck-panel[hidden] { display: block; margin-top: 8px; padding: 8px; color: #111; background: none; border-color: #bbb; }
  .mythos-deck-heading strong, .mythos-stage-label { color: #111; }
  .mythos-deck-heading span, .mythos-grid-corner { color: #555; }
  select { padding: 0; color: #111; background: none; border: 0; font: 18pt Georgia, serif; appearance: none; }
  .expansion-line { color: #555; }
  .summary-grid { grid-template-columns: repeat(4, 1fr); margin: 8px 0 12px; }
  .summary-card, .summary-card.primary { min-height: 0; padding: 8px; color: #111; background: #fff; border-color: #bbb; }
  .summary-card strong { color: #111; font-size: 16pt; }
  .category-panel { break-inside: avoid; color: #111; background: #fff; border-color: #aaa; }
  .category-heading { padding: 8px; }
  .category-glyph, .category-title, .category-subtitle, .mythos-stage-requirement, .category-progress { color: #111 !important; }
  .category-content { border-color: #aaa; }
  .level-heading { padding: 5px 9px; color: #444; background: #eee; }
  .component-row { min-height: 0; padding: 6px 9px; border-color: #ddd !important; }
  .component-name { color: #111 !important; text-decoration: none !important; }
  .component-meta { color: #555; }
  .expansion-icon { filter: none; }
  .level-badge { border: 1px solid #bbb; color: #222 !important; background: #fff !important; }
  .monster-cup { color: #111; background: #fff; border-color: #aaa; box-shadow: none; }
  .monster-row { break-inside: avoid; border-color: #ddd !important; }
  .monster-group-heading, .monster-cup-heading { color: #111; background: #fff; }
  .monster-image-button { background: #fff; border-color: #aaa; }
}
