

:root {
  --bg: #f8dca8;
  --bg-deep: #eca05d;
  --surface: #fffaf0;
  --surface-raised: #fff1d5;
  --surface-input: #fff5df;
  --surface-hover: #ffe9c4;
  --border: #e2bd87;
  --border-strong: #c98e58;
  --text: #33434a;
  --text-strong: #17292f;
  --text-muted: #65737a;
  --text-soft: #879398;
  --accent: #d74725;
  --accent-hover: #b8321b;
  --accent-soft: #ffe0c8;
  --wood: #94522f;
  --wood-dark: #713a25;
  --sun: #f2b544;
  --forest: #3f624b;
  --danger: #a8554d;
  --success: #4f7858;
  --warning: #d5a746;
  --radius-lg: 18px;
  --radius-md: 13px;
  --radius-sm: 10px;
  --shadow-card: 0 12px 32px rgba(78, 65, 44, .08);
  --shadow-dialog: 0 24px 70px rgba(49, 42, 31, .25);
  --font: "Nunito Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Lilita One", "Trebuchet MS", sans-serif;
}

* { box-sizing: border-box; }
html {
  min-height: 100%;
  scroll-behavior: smooth;
  background-color: #5c7548;
  background-image: url("images/background.webp");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  background: transparent;
  letter-spacing: -.006em;
  overflow-x: hidden;
}
body::before,
body::after { display: none; }


html:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) {
  background-color: #170f26;
  background-image:
    linear-gradient(180deg, rgba(18, 8, 28, .12), rgba(18, 7, 20, .34)),
    url("images/campfire.webp");
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(215, 71, 37, .3);
  outline-offset: 2px;
}
[hidden] { display: none !important; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; }

* { scrollbar-color: var(--border-strong) var(--surface-raised); }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: var(--surface-raised); border-radius: 999px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border: 2px solid var(--surface-raised); border-radius: 999px; }



.app-shell {
  position: relative;
  min-height: 100vh;
  padding: 0 clamp(16px, 3vw, 42px) 72px;
}
.hero-header,
.page-shell { width: min(1240px, 100%); margin-inline: auto; }
.hero-header {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr);
  align-items: center;
  min-height: 92px;
  margin-bottom: 40px;
  border-bottom: 3px solid rgba(110, 58, 37, .25);
}
.brand-title {
  grid-column: 2;
  justify-self: center;
  color: #fff0d2;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 43px);
  font-weight: 400;
  line-height: .95;
  letter-spacing: .045em;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 2px 0 rgba(38, 46, 39, .25),
    0 6px 18px rgba(16, 24, 22, .42),
    0 0 18px rgba(255, 236, 198, .14);
}
.home-link-btn {
  grid-column: 3;
  justify-self: end;
}

.screen { display: none; animation: cleanFade .24s ease both; }
.screen.is-active { display: block; }
@keyframes cleanFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.screen-head,
.episode-topbar,
.setup-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0 0 28px;
  padding: 0 0 22px;
  border-bottom: 1px solid rgba(110, 79, 57, .18);
}
.setup-intro { align-items: flex-end; margin-bottom: 22px; }



.setup-intro > div:first-child .eyebrow,
.screen-head > div:first-child .eyebrow {
  color: #e7a15f;
  text-shadow: 0 2px 9px rgba(22, 31, 28, .48);
}
.setup-intro > div:first-child h1,
.screen-head > div:first-child h1 {
  color: #f2dfbd;
  text-shadow:
    0 2px 0 rgba(38, 46, 39, .34),
    0 6px 18px rgba(16, 24, 22, .48);
}
.setup-intro > div:first-child .screen-description,
.screen-head > div:first-child .screen-description {
  color: #ead9bf;
  font-weight: 650;
  text-shadow: 0 2px 10px rgba(18, 25, 23, .55);
}

.screen-head h1,
.episode-title-stack h1,
.setup-intro h1 {
  margin: 0;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 400;
  line-height: .96;
  letter-spacing: .005em;
  text-transform: uppercase;
}
.screen-description {
  max-width: 650px;
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
}
h2, h3, p { margin-top: 0; }
h2 {
  margin-bottom: 0;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: .01em;
}
h3 {
  margin-bottom: 6px;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 800;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--wood);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.episode-subline { margin: 7px 0 0; color: var(--text-muted); font-size: 13px; font-weight: 600; }

.screen-action-row,
.episode-controls,
.roster-action-row,
.modal-actions,
.proceed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.screen-action-row,
.episode-controls { justify-content: flex-end; }



.primary-btn,
.secondary-btn,
.icon-close {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.008em;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.primary-btn {
  color: #fffdf7;
  border: 1px solid var(--accent);
  background: var(--accent);
  box-shadow: 0 5px 0 rgba(135, 42, 22, .23), 0 9px 18px rgba(188, 59, 28, .17);
}
.primary-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 7px 0 rgba(135, 42, 22, .22), 0 12px 22px rgba(188, 59, 28, .2); }
.secondary-btn {
  color: var(--text-strong);
  border: 1px solid var(--border-strong);
  background: rgba(255, 253, 247, .66);
}
.secondary-btn:hover { border-color: var(--wood); background: var(--surface); transform: translateY(-2px); }
.large-btn { min-height: 48px; padding-inline: 20px; }
.icon-close {
  width: 42px;
  padding: 0;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface-raised);
  font-size: 21px;
  line-height: 1;
}



.panel,
.stats-card {
  border: 3px solid rgba(148, 82, 47, .28);
  border-radius: 22px;
  background: rgba(255, 250, 240, .95);
  box-shadow: 0 10px 0 rgba(174, 89, 47, .13), var(--shadow-card);
  backdrop-filter: blur(4px);
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 26px 0;
}
.panel-head.compact-head { padding-bottom: 15px; }
.panel-head.split { align-items: center; }
.panel-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(139, 104, 77, .24);
  border-radius: 11px;
  color: var(--accent);
  background: #fff0d6;
  font-size: 24px;
  font-weight: 800;
}
.small-note { color: var(--text-soft); font-size: 11px; font-weight: 700; }
.setup-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.camp-setup-grid { grid-template-columns: 1fr; align-items: start; }
.format-panel, .options-panel { width: 100%; }
.setup-card { padding-bottom: 24px; }
.setup-card::before {
  content: "";
  display: block;
  height: 10px;
  margin: 0 18px;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(90deg, #d95f37, #f2b544);
}
.field-grid { display: grid; grid-template-columns: 1fr; gap: 17px; padding: 22px 26px 0; }
.setup-core-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.camp-core-grid { gap: 20px 16px; }
.field-span-2 { grid-column: span 2; }
.range-field { grid-column: span 1; }
.field { display: grid; gap: 8px; min-width: 0; }
.field > span,
.field > legend { color: var(--text-strong); font-size: 12px; font-weight: 800; }
.field-help,
.field small { color: var(--text-soft); font-size: 11px; line-height: 1.4; }
input[type="text"],
input[type="search"],
input[type="url"],
select,
textarea,
.episode-select {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text-strong);
  background: var(--surface-input);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}
input[type="text"]:hover,
input[type="search"]:hover,
input[type="url"]:hover,
select:hover,
textarea:hover { border-color: var(--border-strong); }
textarea { min-height: 110px; padding-block: 11px; resize: vertical; }
select { appearance: auto; padding-right: 8px; }
option { color: #24352a; background: #fffdf7; }
input::placeholder { color: #9c9b92; }
input[type="range"] {
  width: 100%;
  height: 24px;
  accent-color: var(--accent);
  cursor: pointer;
}
.range-pill,
.meta-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  margin-left: 4px;
  padding: 3px 8px;
  border: 1px solid #efb77e;
  border-radius: 7px;
  color: var(--accent-hover);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 800;
}
.meta-chip { gap: 4px; margin-left: 0; white-space: nowrap; }

.choice-field { align-content: start; }
.choice-field legend { margin-bottom: 8px; }
.choice-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.choice-pills label { cursor: pointer; }
.choice-pills input { position: absolute; opacity: 0; pointer-events: none; }
.choice-pills span {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text-muted);
  background: var(--surface-input);
  font-size: 12px;
  font-weight: 800;
  transition: .15s ease;
}
.choice-pills label:hover span { border-color: var(--border-strong); color: var(--text-strong); }
.choice-pills input:checked + span {
  border-color: var(--accent);
  color: var(--accent-hover);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(63, 98, 75, .05);
}
.season-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 26px 0;
  padding: 15px 16px;
  border: 2px solid #ecc18c;
  border-radius: 14px;
  background: #fff0cc;
}
.preview-icon { color: var(--accent); font-size: 13px; transform: rotate(0deg); }
.season-preview div { display: grid; gap: 2px; }
.season-preview strong { color: var(--text-strong); font-size: 13px; }
.season-preview span:not(.preview-icon) { color: var(--text-muted); font-size: 11px; }



.option-section { padding: 22px 26px 0; }
.option-section + .option-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.option-section-head { margin-bottom: 13px; }
.option-section-head p { margin: 0; color: var(--text-soft); font-size: 11px; line-height: 1.45; }
.twist-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.option-tile {
  position: relative;
  min-width: 0;
  cursor: pointer;
}
.option-tile input { position: absolute; opacity: 0; pointer-events: none; }
.option-tile > span {
  display: grid;
  align-content: center;
  min-height: 62px;
  padding: 10px 11px 10px 38px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-input);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.option-tile > span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 12px;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
  transform: translateY(-50%);
}
.option-tile > span::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 12px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  transform: translateY(-50%);
}
.option-tile:hover > span { border-color: var(--border-strong); transform: translateY(-1px); }
.option-tile input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.option-tile input:checked + span::before { border-color: var(--accent); background: var(--accent); }
.option-tile input:checked + span::after { opacity: 1; }
.option-tile strong { overflow: hidden; color: var(--text-strong); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.option-tile small { display: block; margin-top: 2px; color: var(--text-soft); font-size: 9.5px; line-height: 1.25; }

.rule-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 245, 223, .76);
  cursor: pointer;
}
.switch-row > span { color: var(--text); font-size: 10.5px; font-weight: 750; line-height: 1.15; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i {
  position: relative;
  flex: 0 0 auto;
  width: 31px;
  height: 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #e4dccb;
  transition: .18s ease;
}
.switch-row i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fffdf7;
  box-shadow: 0 1px 3px rgba(56, 47, 34, .22);
  transition: .18s ease;
}
.switch-row input:checked + i { border-color: var(--accent); background: var(--accent); }
.switch-row input:checked + i::after { transform: translateX(13px); }
.setup-footer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 18px;
  padding: 0 2px;
}



.cast-layout {
  display: grid;
  grid-template-columns: minmax(330px, 400px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}
.roster-panel,
.selected-panel {
  min-width: 0;
  min-height: 650px;
  padding-bottom: 20px;
}
.selected-panel { display: flex; flex-direction: column; }
.cast-filter-stack {
  display: grid;
  gap: 12px;
  padding: 2px 22px 18px;
}
.cast-filter-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.cast-filter-label {
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 900;
}
.search-filter-row input { min-width: 0; }
.check-dropdown {
  position: relative;
  min-width: 0;
}
.check-dropdown > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 13px;
  list-style: none;
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text-strong);
  background: var(--surface-input);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.check-dropdown > summary::-webkit-details-marker { display: none; }
.check-dropdown > summary:hover,
.check-dropdown[open] > summary {
  border-color: var(--accent);
  background: #fff0d6;
}
.dropdown-chevron {
  color: var(--accent);
  font-size: 16px;
  transition: transform .16s ease;
}
.check-dropdown[open] .dropdown-chevron { transform: rotate(180deg); }
.check-dropdown-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  max-height: 310px;
  overflow: auto;
  padding: 8px;
  border: 3px solid rgba(148, 82, 47, .3);
  border-radius: 14px;
  background: #fffaf0;
  box-shadow: 0 14px 32px rgba(74, 49, 31, .2);
}
.check-dropdown:not([open]) .check-dropdown-menu { display: none; }
.check-dropdown.is-disabled > summary {
  opacity: .62;
  cursor: not-allowed;
  background: #f1e7d2;
}
.dropdown-option,
.dropdown-all-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 9px;
  cursor: pointer;
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
}
.dropdown-option:hover,
.dropdown-all-option:hover { background: var(--surface-hover); }
.dropdown-option input,
.dropdown-all-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}
.dropdown-all-option {
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
}
.season-group + .season-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.season-group-title {
  padding: 3px 9px 5px;
  color: var(--wood);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .02em;
}
.season-empty-note {
  margin: 0;
  padding: 18px 12px;
  color: var(--text-soft);
  text-align: center;
  font-size: 11px;
  line-height: 1.45;
}
.contestant-list-shell {
  margin: 0 22px;
  overflow: hidden;
  border: 3px solid rgba(148, 82, 47, .23);
  border-radius: 15px;
  background: rgba(255, 245, 223, .76);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.65);
}
.contestant-name-list {
  max-height: 395px;
  overflow-y: auto;
  padding: 7px;
}
.contestant-name-row {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid rgba(201, 142, 88, .22);
  border-radius: 8px;
  color: var(--text-strong);
  text-align: left;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  transition: background .14s ease, color .14s ease, transform .14s ease;
}
.contestant-name-row:last-child { border-bottom-color: transparent; }
.contestant-name-row:hover { color: var(--accent-hover); background: #ffe7c6; transform: translateX(2px); }
.contestant-name-row.is-selected {
  color: var(--forest);
  background: #e3efd9;
  cursor: default;
}
.contestant-name-row.is-selected::after {
  content: "Selected";
  flex: 0 0 auto;
  color: var(--forest);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.contestant-list-empty {
  padding: 48px 18px;
  color: var(--text-soft);
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
}
.selected-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  align-content: start;
  gap: 13px;
  padding: 2px 22px 18px;
}
.selected-contestant-card {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 14px 11px 11px;
  border: 2px solid rgba(201, 142, 88, .55);
  border-radius: 16px;
  background: #fff4dc;
  box-shadow: 0 5px 0 rgba(148, 82, 47, .1);
}
.selected-contestant-image {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border: 3px solid #fffaf0;
  border-radius: 20px;
  background: #eadcc3;
  box-shadow: 0 0 0 2px rgba(148, 82, 47, .32);
}
.selected-contestant-name {
  width: 100%;
  overflow: hidden;
  color: var(--text-strong);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
}
.selected-card-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.card-action-btn {
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  color: var(--text-strong);
  background: rgba(255, 253, 247, .72);
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.card-action-btn:hover { transform: translateY(-1px); border-color: var(--wood); background: #fffaf0; }
.card-action-btn.remove-btn { color: #9b3524; border-color: rgba(168, 85, 77, .45); }
.card-action-btn.remove-btn:hover { background: #ffe1d5; }
.cast-empty-state {
  grid-column: 1 / -1;
  min-height: 320px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 32px;
  border: 2px dashed rgba(148, 82, 47, .3);
  border-radius: 16px;
  color: var(--text-soft);
  text-align: center;
  background: rgba(255, 245, 223, .45);
}
.cast-empty-state strong {
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
}
.cast-empty-state p { max-width: 390px; margin: 0; font-size: 12px; line-height: 1.5; }
.cast-count-chip.is-complete { color: var(--forest); border-color: #8ca77f; background: #e4f0db; }
.cast-count-chip.is-over { color: #9b3524; border-color: #d0917c; background: #ffe1d5; }
.primary-btn:disabled,
.secondary-btn:disabled {
  opacity: .48;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}



#contestantEditDialog { width: min(760px, calc(100% - 24px)); }
.contestant-edit-card {
  max-height: min(86vh, 760px);
  overflow: hidden;
  border: 4px solid rgba(113, 58, 37, .42);
  border-radius: 22px;
  background: #fffaf0;
  box-shadow: 0 12px 0 rgba(180, 64, 34, .18), var(--shadow-dialog);
}
.contestant-modal-head { padding: 20px 22px 0; }
.contestant-modal-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.edit-contestant-image {
  width: 76px;
  height: 76px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 3px solid #fffaf0;
  border-radius: 18px;
  background: #eadcc3;
  box-shadow: 0 0 0 2px rgba(148, 82, 47, .34);
}
.modal-subtitle { margin: 5px 0 0; color: var(--text-muted); font-size: 12px; }
.stats-editor-grid {
  max-height: calc(86vh - 210px);
  overflow-y: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 22px;
}
.stat-editor-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-input);
}
.stat-editor-row label { color: var(--text-strong); font-size: 11px; font-weight: 900; }
.stat-editor-row input[type="range"] { min-width: 0; height: 20px; }
.stat-value {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 28px;
  border: 1px solid #efb77e;
  border-radius: 8px;
  color: var(--accent-hover);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 900;
}
.contestant-modal-actions { padding: 0 22px 22px; }
.modal-action-spacer { flex: 1 1 auto; }

.empty-state,
.content-card,
.summary-card,
.record-card,
.result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}
.avatar {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #eee6d7;
}
.empty-state {
  grid-column: 1 / -1;
  padding: 28px 18px;
  color: var(--text-muted);
  text-align: center;
}
.empty-state p { max-width: 560px; margin: 0 auto; color: var(--text-soft); font-size: 13px; line-height: 1.55; }
.empty-state h3 { margin-bottom: 7px; }
.empty-marker {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 32px;
  margin-bottom: 13px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 800;
}
.large-empty-state { padding-block: 50px; }



.evaluation-grid,
.summary-grid,
.records-grid,
.result-board { display: grid; gap: 10px; }

.episode-select { width: auto; min-width: 150px; }
.section-toggle-row,
.stats-nav {
  display: flex;
  gap: 0;
  overflow-x: auto;
  margin: 0 0 14px;
  padding: 0 0 1px;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.section-toggle-row::-webkit-scrollbar,
.stats-nav::-webkit-scrollbar { display: none; }
.section-toggle,
.stats-tab {
  min-height: 42px;
  flex: 0 0 auto;
  padding: 10px 13px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-soft);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.section-toggle:hover,
.stats-tab:hover { color: var(--text-strong); }
.section-toggle.is-active,
.stats-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.episode-panel-shell { padding: clamp(16px, 3vw, 28px); }
.episode-panel { display: none; }
.episode-panel.is-active { display: block; animation: cleanFade .18s ease both; }
.section-title {
  margin-bottom: 22px;
  color: var(--wood);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.proceed-row { justify-content: center; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.proceed-row.dual { justify-content: space-between; }
.evaluation-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.content-card { padding: 17px; }
.content-card p,
.record-card p { margin-bottom: 0; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.content-index { display: inline-block; margin-bottom: 20px; color: var(--accent); font-size: 11px; font-weight: 800; }
.result-placeholder { display: grid; justify-items: center; gap: 13px; padding: 48px 18px; text-align: center; }
.result-placeholder p { margin: 0; color: var(--text-muted); }
.result-board { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.result-card { padding: 18px; text-align: center; }
.result-card.is-primary { border-color: #abc1ad; background: var(--accent-soft); }
.result-card span { display: block; margin-bottom: 7px; color: var(--text-soft); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.result-card strong { color: var(--text-strong); font-size: 17px; }
.summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.summary-card { min-height: 110px; padding: 17px; display: flex; flex-direction: column; justify-content: space-between; }
.summary-card span { color: var(--text-soft); font-size: 11px; font-weight: 700; }
.summary-card strong { color: var(--text-strong); font-size: 22px; font-weight: 800; letter-spacing: -.035em; }




#statistics-screen .stats-nav {
  margin-bottom: 16px;
  padding-inline: 10px;
  border: 1px solid rgba(112, 83, 58, .16);
  border-radius: 14px;
  background: rgba(252, 245, 232, .76);
  box-shadow: 0 8px 24px rgba(54, 37, 23, .07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
#statistics-screen .stats-nav .stats-tab { color: #6b635d; }
#statistics-screen .stats-nav .stats-tab:hover { color: #2f464d; }
#statistics-screen .stats-nav .stats-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
#statistics-screen .stats-card {
  border-color: rgba(123, 84, 57, .26);
  background: linear-gradient(145deg, rgba(255, 249, 240, .90), rgba(245, 236, 219, .86));
  box-shadow: 0 10px 0 rgba(169, 84, 44, .12), 0 20px 42px rgba(51, 36, 20, .10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.stats-panel { display: none; }
.stats-panel.is-active { display: block; animation: cleanFade .18s ease both; }
.stats-card { padding: 22px; }
.stats-summary-grid { margin-top: 0; }
.records-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.record-card { padding: 17px; }
.record-card small { color: var(--text-soft); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.record-card strong { display: block; margin: 16px 0 8px; color: var(--text-strong); font-size: 21px; }



dialog {
  width: min(520px, calc(100% - 24px));
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
}
dialog::backdrop { background: rgba(42, 48, 40, .52); backdrop-filter: blur(4px); }
.modal-card { border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-dialog); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 20px 0; }
.modal-body { display: grid; gap: 14px; padding: 20px; }
.modal-actions { justify-content: flex-end; padding: 0 20px 20px; }
#presetCastDialog { width: min(410px, calc(100% - 24px)); }
.preset-cast-card .modal-head { padding: 17px 18px 0; }
.preset-cast-card .modal-body {
  gap: 10px;
  padding: 16px 18px;
}
.preset-cast-card .modal-actions { padding: 0 18px 17px; }
.preset-cast-card h2 { font-size: 24px; }
.preset-cast-card select { min-height: 40px; }
.preset-cast-preview {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  background: var(--surface-raised);
  font-size: 10.5px;
  line-height: 1.35;
}
.preset-cast-preview[hidden] { display: none !important; }



@media (max-width: 1060px) {
  .camp-setup-grid { grid-template-columns: 1fr; }
  .twist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-core-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cast-layout { grid-template-columns: 1fr; }
  .roster-panel, .selected-panel { min-height: auto; }
  .evaluation-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .app-shell { padding-inline: 14px; }
  .hero-header { min-height: 72px; margin-bottom: 28px; grid-template-columns: 1fr auto; gap: 12px; }
  .brand-title { grid-column: 1; justify-self: start; font-size: clamp(24px, 8vw, 34px); text-align: left; }
  .home-link-btn { grid-column: 2; }
  .screen-head,
  .episode-topbar,
  .setup-intro { align-items: stretch; flex-direction: column; }
  .setup-intro { gap: 18px; }
  .screen-action-row,
  .episode-controls { justify-content: flex-start; }
  .screen-action-row .primary-btn,
  .episode-controls .primary-btn { margin-left: auto; }
  .setup-core-grid,
  .roster-controls,
  .summary-grid,
  .records-grid,
  .twist-grid,
  .rule-grid { grid-template-columns: 1fr; }
  .field-span-2 { grid-column: span 1; }
  .selected-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cast-filter-row { grid-template-columns: 1fr; gap: 6px; }
  .stats-editor-grid { grid-template-columns: 1fr; }
  .proceed-row.dual > * { flex: 1 1 0; }
  .setup-footer-actions { align-items: stretch; flex-direction: column; }
  .setup-footer-actions .primary-btn { width: 100%; }
}

@media (max-width: 460px) {
  .screen-head h1,
  .episode-title-stack h1,
  .setup-intro h1 { font-size: 36px; }
  .panel-head,
  .field-grid,
  .option-section { padding-left: 18px; padding-right: 18px; }
  .season-preview { margin-left: 18px; margin-right: 18px; }
  .selected-grid { grid-template-columns: 1fr 1fr; }
  .selected-contestant-image { width: 86px; height: 86px; }
  .contestant-modal-identity { align-items: flex-start; }
  .edit-contestant-image { width: 62px; height: 62px; }
  .stat-editor-row { grid-template-columns: 90px minmax(0, 1fr) 32px; }
  .contestant-modal-actions { align-items: stretch; }
  .contestant-modal-actions .modal-action-spacer { display: none; }
  .roster-action-row { align-items: stretch; flex-direction: column; }
  .roster-action-row > * { width: 100%; }
  .episode-controls .episode-select { width: 100%; }
}


.cast-tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 12px 22px 0;
}
.cast-tool-grid > button {
  width: 100%;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 11px;
}
.cast-tool-grid .cast-tool-primary,
.cast-tool-grid .danger-outline-btn { grid-column: auto; }
.danger-outline-btn { color: #9b3524; border-color: rgba(168, 85, 77, .48); }
.danger-outline-btn:hover { background: #ffe1d5; border-color: #b85645; }

.selected-panel-head { gap: 18px; }
.selected-panel-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.compact-header-btn { min-height: 34px; padding: 6px 11px; font-size: 10px; border-radius: 10px; }

.selected-grid {
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 9px;
  padding: 2px 18px 16px;
}
.selected-contestant-card {
  gap: 6px;
  padding: 9px 8px 8px;
  border-width: 1px;
  border-radius: 13px;
  box-shadow: 0 3px 0 rgba(148, 82, 47, .08);
}
.selected-contestant-image {
  width: 70px;
  height: 70px;
  border-width: 2px;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(148, 82, 47, .3);
}
.selected-contestant-name { font-size: 15px; }
.selected-card-actions { gap: 5px; }
.card-action-btn {
  min-height: 27px;
  padding: 4px 5px;
  border-radius: 7px;
  font-size: 9px;
}

#contestantEditDialog { width: min(620px, calc(100% - 24px)); }
.contestant-edit-card {
  max-height: min(90vh, 700px);
  display: flex;
  flex-direction: column;
}
.contestant-modal-head { padding: 16px 18px 0; }
.edit-contestant-image { width: 62px; height: 62px; border-radius: 15px; }
.contestant-editor-body {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 14px;
  padding: 16px 18px;
}
.archetype-field { gap: 6px; }
.archetype-field select { min-height: 40px; }
.skill-editor-section {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 245, 223, .64);
}
.skill-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.skill-section-head .eyebrow { margin-bottom: 4px; }
.skill-section-head h3 { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 400; }
.skill-section-head > span {
  color: var(--wood);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}
.stats-editor-grid {
  max-height: none;
  overflow: visible;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
}
.stat-editor-row {
  grid-template-columns: 82px minmax(0, 1fr) 30px;
  gap: 7px;
  min-height: 40px;
  padding: 6px 8px;
  border-radius: 10px;
}
.stat-editor-row label { font-size: 10px; }
.stat-editor-row input[type="range"] { height: 18px; }
.stat-value {
  min-width: 28px;
  height: 25px;
  border-radius: 7px;
  font-size: 11px;
}
.contestant-modal-actions {
  flex-wrap: wrap;
  padding: 0 18px 17px;
}
.confirmation-card { border: 3px solid rgba(113, 58, 37, .35); }
#randomizeAllSkillsDialog { width: min(500px, calc(100% - 24px)); }

@media (max-width: 720px) {
  .selected-panel-head { align-items: flex-start; }
  .selected-panel-tools { justify-content: flex-start; }
  .selected-grid { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); }
  .stats-editor-grid { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .selected-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-inline: 12px; }
  .selected-contestant-image { width: 62px; height: 62px; }
  .selected-contestant-name { font-size: 13px; }
  .selected-card-actions { grid-template-columns: 1fr; }
  .contestant-modal-actions > button { flex: 1 1 calc(50% - 5px); }
  .contestant-modal-actions .modal-action-spacer { display: none; }
}



#relationshipsDialog {
  width: min(820px, calc(100% - 16px));
  max-width: none;
  padding: 0;
  overflow: visible;
}
.relationship-setup-card {
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 3px solid rgba(113, 58, 37, .4);
  border-radius: 17px;
  background: #fffaf0;
  box-shadow: 0 8px 0 rgba(180, 64, 34, .16), var(--shadow-dialog);
}
.relationship-modal-head {
  flex: 0 0 auto;
  padding: 9px 11px 0;
}
.relationship-modal-head .eyebrow { margin-bottom: 3px; font-size: 8px; }
.relationship-modal-head h2 { font-size: 23px; }
.relationship-modal-head .icon-close { width: 32px; min-height: 32px; border-radius: 9px; }
.relationship-modal-body {
  min-height: 0;
  display: flex;
  justify-content: center;
  padding: 7px 9px 8px;
}
.relationship-grid-shell {
  width: fit-content;
  max-width: 100%;
  min-height: 180px;
  max-height: calc(86vh - 116px);
  margin-inline: auto;
  overflow: auto;
  border: 1px solid rgba(148, 82, 47, .3);
  border-radius: 8px;
  background: #fff7e7;
}
.relationship-grid {
  width: max-content;
  min-width: 100%;
  border-spacing: 0;
  border-collapse: collapse;
  color: var(--text-strong);
  font-size: 9px;
}
.relationship-grid th,
.relationship-grid td {
  min-width: 35px;
  width: 35px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(201, 142, 88, .3);
  background: rgba(255, 250, 240, .9);
  text-align: center;
}
.relationship-grid thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 36px;
  background: #f7ddad;
}
.relationship-grid .relationship-corner-cell {
  left: 0;
  z-index: 6;
  min-width: 36px;
  width: 36px;
  background: #f7ddad;
}
.relationship-column-head,
.relationship-grid .relationship-row-head {
  min-width: 36px;
  width: 36px;
  max-width: 36px;
}
.relationship-grid .relationship-row-head {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #ffedc9;
}
.relationship-contestant-image {
  display: block;
  width: 27px;
  height: 27px;
  margin: auto;
  object-fit: cover;
  border: 1px solid #fffaf0;
  border-radius: 6px;
  background: #eadcc3;
  box-shadow: 0 0 0 1px rgba(148, 82, 47, .23);
}
.relationship-self-cell {
  color: rgba(51, 67, 74, .32);
  background: repeating-linear-gradient(135deg, #eee2cb 0 4px, #f5ead6 4px 8px) !important;
  font-size: 11px;
  font-weight: 900;
}
.relationship-score-button {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: filter .12s ease, box-shadow .12s ease;
}
.relationship-score-button:hover,
.relationship-score-button[aria-expanded="true"] {
  filter: saturate(1.18) brightness(.97);
  box-shadow: inset 0 0 0 2px rgba(23, 41, 47, .34);
}
.relationship-score-button.is-hostile,
.relationship-score-option.is-hostile { color: #7d1714; background: #ffc7bd; }
.relationship-score-button.is-negative,
.relationship-score-option.is-negative { color: #8b3b20; background: #ffdac1; }
.relationship-score-button.is-slightly-negative,
.relationship-score-option.is-slightly-negative { color: #855c36; background: #ffead0; }
.relationship-score-button.is-neutral,
.relationship-score-option.is-neutral { color: #69747a; background: #f3ecde; }
.relationship-score-button.is-slightly-positive,
.relationship-score-option.is-slightly-positive { color: #4f7356; background: #edf4df; }
.relationship-score-button.is-positive,
.relationship-score-option.is-positive { color: #356b48; background: #dcefd8; }
.relationship-score-button.is-devoted,
.relationship-score-option.is-devoted { color: #17563b; background: #c8ead4; }
.relationship-score-menu {
  position: fixed;
  z-index: 10000;
  width: 205px;
  max-height: min(318px, calc(100vh - 12px));
  overflow-y: auto;
  padding: 4px;
  border: 2px solid rgba(113, 58, 37, .38);
  border-radius: 9px;
  background: #fffaf0;
  box-shadow: 0 12px 30px rgba(49, 42, 31, .28);
}
.relationship-score-option {
  width: 100%;
  min-height: 27px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border: 0;
  border-radius: 5px;
  text-align: left;
  cursor: pointer;
}
.relationship-score-option + .relationship-score-option { margin-top: 2px; }
.relationship-score-option:hover { filter: brightness(.94) saturate(1.08); }
.relationship-score-option[aria-selected="true"] { box-shadow: inset 0 0 0 2px currentColor; }
.relationship-score-option strong { text-align: center; font-size: 10px; }
.relationship-score-option span { overflow: hidden; font-size: 9.5px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.setup-flow-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 6px;
  border-top: 1px solid var(--border);
  padding: 7px 9px 9px;
  background: #fff6e4;
}
.setup-flow-actions .primary-btn,
.setup-flow-actions .secondary-btn {
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 10px;
  font-size: 11px;
}

#teamSetupDialog {
  width: min(580px, calc(100% - 16px));
  max-width: none;
  padding: 0;
}
.team-setup-modal-card {
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 3px solid rgba(113, 58, 37, .4);
  border-radius: 17px;
  background: #fffaf0;
  box-shadow: 0 8px 0 rgba(180, 64, 34, .16), var(--shadow-dialog);
}
.team-setup-modal-head {
  flex: 0 0 auto;
  padding: 9px 11px 0;
}
.team-setup-modal-head .eyebrow { margin-bottom: 3px; font-size: 9.5px; }
.team-setup-modal-head h2 { font-size: 28px; }
.team-setup-modal-head .icon-close { width: 32px; min-height: 32px; border-radius: 9px; }
.team-setup-modal-body {
  min-height: 0;
  overflow: auto;
  padding: 7px 10px 8px;
}
.team-setup-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.team-setup-card {
  position: relative;
  min-width: 0;
  padding: 8px 4px 9px 10px;
  border: 0;
  border-left: 4px solid var(--team-color);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.team-setup-card + .team-setup-card {
  margin-top: 5px;
  padding-top: 12px;
  border-top: 1px dashed rgba(148, 82, 47, .3);
}
.team-setup-card::before { display: none; }
.team-setup-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: end;
  gap: 7px;
  padding: 0 3px 7px 0;
  border: 0;
}
.team-name-field { min-width: 0; display: grid; gap: 3px; }
.team-name-field > span {
  color: var(--wood);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.team-name-select {
  min-height: 32px;
  padding-inline: 8px;
  border: 1px solid color-mix(in srgb, var(--team-color) 48%, #c98e58 52%);
  border-radius: 8px;
  background: #fffaf0;
  font-size: 12.5px;
  font-weight: 900;
}
.team-emblem-image {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border: 0;
  border-radius: 8px;
  background: transparent;
}
.team-member-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 8px;
  row-gap: 0;
  padding: 0;
}
.team-member-slot {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 3px 0;
  border: 0;
  border-bottom: 1px solid rgba(201, 142, 88, .24);
  border-radius: 0;
  background: transparent;
}
.team-member-image {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border: 1px solid #fffaf0;
  border-radius: 6px;
  background: #eadcc3;
  box-shadow: 0 0 0 1px rgba(148, 82, 47, .22);
}
.team-member-select {
  min-width: 0;
  min-height: 29px;
  padding-inline: 6px;
  border: 1px solid rgba(201, 142, 88, .48);
  border-radius: 7px;
  background: rgba(255, 250, 240, .72);
  font-size: 11.5px;
  font-weight: 800;
}

#teamSetupDialog .setup-flow-actions .primary-btn,
#teamSetupDialog .setup-flow-actions .secondary-btn {
  font-size: 12px;
}

@media (max-width: 720px) {
  #relationshipsDialog,
  #teamSetupDialog { width: calc(100% - 8px); }
  .relationship-modal-head,
  .team-setup-modal-head { padding: 9px 9px 0; }
  .relationship-modal-body,
  .team-setup-modal-body { padding: 7px 8px 8px; }
  .setup-flow-actions { align-items: stretch; padding: 8px; }
  .setup-flow-actions > button { flex: 1 1 100%; }
  .team-member-slots { grid-template-columns: 1fr; }
}



.relationship-modal-head {
  position: relative;
  justify-content: center;
  text-align: center;
}
.relationship-modal-head > div { text-align: center; }
.relationship-modal-head .icon-close {
  position: absolute;
  top: 9px;
  right: 11px;
}
.relationship-setup-card .setup-flow-actions { justify-content: center; }



.event-system-shell { padding: clamp(16px, 2.5vw, 26px); }
.episode-stage-tabs .section-toggle { padding-inline: 16px; }
.event-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.event-stage-head h2 { margin: 0; font-size: clamp(27px, 4vw, 38px); }
.event-stage-head p:not(.eyebrow) { max-width: 720px; margin: 7px 0 0; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.event-count-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 5px 10px;
  border: 1px solid #efb77e;
  border-radius: 999px;
  color: var(--accent-hover);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.season-team-overview { display: grid; gap: 13px; }
.season-active-team-grid {
  display: grid;
  grid-template-columns: repeat(var(--status-team-count, 2), minmax(0, 1fr));
  align-items: stretch;
  gap: 13px;
}
.season-active-team-grid > .season-team-card { min-width: 0; height: 100%; }
.season-team-card {
  position: relative;
  overflow: hidden;
  padding: 15px;
  border: 2px solid rgba(148, 82, 47, .24);
  border-radius: 16px;
  background: rgba(255, 245, 223, .78);
}
.season-team-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--team-color); }
.season-team-card-head { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; padding-left: 4px; }
.season-team-emblem { width: 51px; height: 51px; object-fit: contain; border-radius: 50%; background: #fffaf0; }
.season-team-card-head div { display: grid; gap: 3px; }
.season-team-card-head h3 { margin: 0; font-family: var(--font-display); font-size: 21px; font-weight: 400; }
.season-team-card-head span { color: var(--text-soft); font-size: 10px; font-weight: 800; }
.season-team-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(63px, 1fr)); gap: 7px; }
.season-team-member { display: grid; justify-items: center; gap: 4px; min-width: 0; }
.season-team-member img { width: 48px; height: 48px; object-fit: cover; border: 2px solid #fffaf0; border-radius: 11px; background: #eadcc3; box-shadow: 0 0 0 1px rgba(148,82,47,.2); }
.season-team-member span { width: 100%; overflow: hidden; color: var(--text-strong); font-size: 9px; font-weight: 900; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.camp-event-list { display: grid; gap: 12px; }
.camp-event-card {
  --event-accent: var(--wood);
  position: relative;
  overflow: hidden;
  padding: 18px 20px 17px;
  border: 1px solid color-mix(in srgb, var(--event-accent) 28%, var(--border));
  border-top: 5px solid var(--event-accent);
  border-radius: 15px;
  text-align: center;
  background: color-mix(in srgb, var(--event-accent) 4%, rgba(255, 250, 240, .96));
}
.camp-event-card::before { content: none; }
.camp-event-card.event-tone-positive { --event-accent: #4f7858; }
.camp-event-card.event-tone-negative { --event-accent: #ca7a37; }
.camp-event-card.event-tone-danger { --event-accent: #a8554d; }
.camp-event-card.event-tone-strategy { --event-accent: #5f4b8b; }
.camp-event-card.event-tone-emotional { --event-accent: #b85e7e; }
.camp-event-card.event-tone-challenge { --event-accent: #d5a746; }
.camp-event-card.event-tone-camp { --event-accent: #3f624b; }
.camp-event-card-head {
  display: grid;
  justify-items: center;
  gap: 4px;
}
.camp-event-category {
  display: block;
  color: var(--event-accent);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.camp-event-card-head h3 {
  max-width: 760px;
  margin: 0;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 25px);
  font-weight: 400;
  line-height: 1.05;
}
.event-participants {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 13px;
}
.event-participant {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 62px;
  min-width: 0;
}
.event-participant img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border: 2px solid #fffaf0;
  border-radius: 12px;
  background: #eadcc3;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--event-accent) 35%, transparent);
}
.event-participant > span {
  width: 100%;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 8.5px;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.camp-event-story {
  max-width: 820px;
  margin: 13px auto 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}
.event-team-roster-grid {
  display: grid;
  grid-template-columns: repeat(var(--event-team-count, 2), minmax(0, 1fr));
  align-items: stretch;
  gap: 13px;
  max-width: 980px;
  margin: 16px auto 0;
  text-align: left;
}
.event-team-roster-grid > .event-team-roster-card { min-width: 0; height: 100%; }
.event-team-roster-card .season-team-card-head { justify-content: center; }
.event-team-roster-card .season-team-members { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
.camp-event-outcome {
  max-width: 820px;
  margin: 12px auto 0;
  padding-top: 11px;
  border-top: 1px solid color-mix(in srgb, var(--event-accent) 22%, var(--border));
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.55;
}
.event-empty-state { display: grid; justify-items: center; gap: 5px; padding: 38px 16px; border: 1px dashed var(--border-strong); border-radius: 14px; color: var(--text-muted); text-align: center; background: rgba(255,245,223,.5); }
.event-empty-state > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--accent); background: var(--accent-soft); font-size: 18px; }
.event-empty-state strong { color: var(--text-strong); font-size: 13px; }
.event-empty-state p { margin: 0; color: var(--text-soft); font-size: 11px; }
.event-stage-actions { justify-content: flex-end; }
.event-stage-actions > :first-child { margin-right: auto; }
.challenge-episode-panel { text-align: center; }
.challenge-introduction-card {
  display: grid;
  grid-template-columns: minmax(150px, 230px) minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 2px solid rgba(148, 82, 47, .28);
  border-radius: 20px;
  background: linear-gradient(135deg, #fff8e9, #ffedca);
  box-shadow: 0 8px 0 rgba(174, 89, 47, .10);
  text-align: left;
}
.challenge-host-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 270px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 32%, rgba(255,255,255,.72), transparent 48%),
    linear-gradient(160deg, #8ec6df, #d9edf2 58%, #f3c978 59%);
}
.challenge-host-wrap img {
  display: block;
  width: min(100%, 215px);
  max-height: 275px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 8px 7px rgba(55, 48, 37, .18));
}
.challenge-introduction-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 42px);
}
.challenge-introduction-copy .eyebrow { margin-bottom: 7px; }
.challenge-introduction-copy h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 50px);
  line-height: .98;
}
.challenge-introduction-text {
  max-width: 800px;
  margin: 15px 0 0;
  color: var(--text);
  font-size: clamp(13px, 1.5vw, 16px);
  font-weight: 650;
  line-height: 1.65;
}
.challenge-run-row {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 24px 0 8px;
}
.challenge-run-row .primary-btn {
  min-width: min(280px, 100%);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: .01em;
}
.challenge-reveal { margin-top: 30px; }
.challenge-section-heading {
  display: grid;
  justify-items: center;
  gap: 2px;
  margin-bottom: 15px;
}
.challenge-section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
}
.challenge-results-heading { margin-top: 32px; }
.challenge-highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.challenge-highlight-card {
  --highlight-color: var(--warning);
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 12px;
  min-height: 225px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--highlight-color) 36%, var(--border));
  border-top: 5px solid var(--highlight-color);
  border-radius: 16px;
  background: color-mix(in srgb, var(--highlight-color) 5%, #fffaf0);
}
.challenge-highlight-card.is-positive { --highlight-color: #4f7858; }
.challenge-highlight-card.is-neutral { --highlight-color: #d5a746; }
.challenge-highlight-card.is-negative { --highlight-color: #a8554d; }
.challenge-highlight-label {
  color: var(--highlight-color);
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.challenge-highlight-participants {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.challenge-participant {
  display: grid;
  justify-items: center;
  gap: 5px;
  width: 78px;
  min-width: 0;
}
.challenge-participant img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border: 4px solid var(--challenge-team-color, var(--border-strong));
  border-radius: 15px;
  background: #eadcc3;
  box-shadow: 0 0 0 3px #fffaf0, 0 5px 12px rgba(75, 61, 40, .14);
}
.challenge-participant > span {
  width: 100%;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 9px;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.challenge-highlight-card > p {
  max-width: 500px;
  margin: 0;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.58;
  text-align: center;
}
.challenge-team-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 10px;
}
.challenge-team-card {
  --team-color: var(--forest);
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 14px 15px;
  border: 2px solid color-mix(in srgb, var(--team-color) 45%, var(--border));
  border-top: 7px solid var(--team-color);
  border-radius: 15px;
  text-align: left;
  background: rgba(255,245,223,.76);
}
.challenge-team-card img {
  width: 53px;
  height: 53px;
  object-fit: contain;
  border-radius: 50%;
  background: #fffaf0;
}
.challenge-team-card div { display: grid; gap: 3px; min-width: 0; }
.challenge-team-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 400;
}
.challenge-team-card span {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 800;
}
.challenge-team-card > strong {
  grid-column: 1 / -1;
  padding-top: 9px;
  border-top: 1px solid color-mix(in srgb, var(--team-color) 25%, var(--border));
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: .10em;
  text-align: center;
}
.challenge-team-card.is-winner { border-color: #79a785; background: #edf7e9; }
.challenge-team-card.is-winner > strong { color: #356b48; }
.challenge-team-card.is-loser { border-color: #d48878; background: #fff0e7; }
.challenge-team-card.is-loser > strong { color: #a44a3f; }
.challenge-bottom-actions { margin-top: 25px; }
.vote-preview-panel { display: grid; justify-items: center; gap: 8px; padding: 46px 18px; text-align: center; }
.vote-preview-panel h3 { margin: 0; font-family: var(--font-display); font-size: 23px; font-weight: 400; }
.vote-preview-panel p { max-width: 620px; margin: 0; color: var(--text-muted); font-size: 12px; line-height: 1.55; }
.event-summary-grid { margin-bottom: 13px; }
.event-summary-grid .summary-card strong { font-size: 19px; }
.episode-state-list { display: grid; gap: 7px; }
.episode-state-row { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 11px; background: rgba(255,245,223,.58); }
.episode-state-row img { width: 36px; height: 36px; object-fit: cover; border-radius: 9px; background: #eadcc3; }
.episode-state-row div { min-width: 0; display: grid; gap: 2px; }
.episode-state-row strong { color: var(--text-strong); font-size: 11px; }
.episode-state-row span { overflow: hidden; color: var(--text-soft); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 760px) {
  .event-stage-head { display: grid; gap: 8px; }
  .event-count-chip { justify-self: start; }
  .event-stage-actions > * { flex: 1 1 100%; margin-right: 0 !important; }
  .challenge-introduction-card { grid-template-columns: 1fr; text-align: center; }
  .challenge-host-wrap { min-height: 205px; }
  .challenge-host-wrap img { max-height: 215px; }
  .challenge-introduction-copy { align-items: center; padding: 24px 19px 27px; }
  .challenge-introduction-text { text-align: center; }
  .challenge-highlight-grid { grid-template-columns: 1fr; }
  .challenge-bottom-actions > * { flex: 1 1 100%; }
}

@media (max-width: 480px) {
  .season-active-team-grid,
  .event-team-roster-grid { grid-template-columns: 1fr; }
  .season-team-members { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .challenge-introduction-copy h2 { font-size: 34px; }
  .challenge-highlight-card { padding-inline: 13px; }
  .challenge-participant { width: 70px; }
  .challenge-participant img { width: 61px; height: 61px; }
  .challenge-team-board { grid-template-columns: 1fr; }
  .challenge-team-card { grid-template-columns: 48px minmax(0, 1fr); }
  .challenge-team-card img { width: 47px; height: 47px; }
  .challenge-team-card > strong { grid-column: 1 / -1; text-align: center; }
}


.event-participant.has-team-color img {
  border: 3px solid var(--participant-team-color);
  box-shadow: 0 0 0 2px #fffaf0, 0 0 0 3px color-mix(in srgb, var(--participant-team-color) 55%, transparent);
}
.event-alliance-name {
  color: var(--text-strong);
  font-weight: 1000;
}


.event-contestant-name {
  color: var(--text-strong);
  font-weight: 1000;
}

.challenge-introduction-card {
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: center;
}
.challenge-host-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  align-self: center;
  padding: 0;
  background: #fffaf0;
}
.challenge-host-wrap img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
  filter: none;
}

.challenge-highlight-card {
  grid-template-columns: 88px minmax(0, 1fr);
  justify-items: stretch;
  align-items: center;
  align-content: center;
  gap: 16px;
  min-height: 150px;
  padding: 17px 19px;
  text-align: left;
}
.challenge-highlight-card .challenge-participant {
  width: 82px;
  justify-self: start;
}
.challenge-highlight-card .challenge-participant img {
  width: 76px;
  height: 76px;
}
.challenge-highlight-copy {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  min-width: 0;
  text-align: left;
}
.challenge-highlight-copy > p {
  max-width: none;
  margin: 0;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.58;
  text-align: left;
}

.challenge-team-board {
  display: flex;
  justify-content: center;
}
.challenge-team-card.is-winner {
  width: min(460px, 100%);
  min-height: 136px;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 24px;
  border-width: 3px;
  border-top-width: 9px;
  text-align: center;
}
.challenge-team-card.is-winner img {
  width: 82px;
  height: 82px;
}
.challenge-team-card.is-winner div {
  justify-items: center;
  gap: 5px;
}
.challenge-team-card.is-winner h3 {
  font-size: 31px;
  line-height: 1;
}
.challenge-team-card.is-winner span {
  color: #356b48;
  font-size: 15px;
  font-weight: 1000;
}

@media (max-width: 760px) {
  .challenge-introduction-card { grid-template-columns: 1fr; }
  .challenge-host-wrap {
    width: min(260px, 100%);
    margin: 22px auto 0;
  }
  .challenge-highlight-card {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 13px;
  }
  .challenge-highlight-card .challenge-participant { width: 72px; }
  .challenge-highlight-card .challenge-participant img { width: 68px; height: 68px; }
}

@media (max-width: 480px) {
  .challenge-highlight-card {
    grid-template-columns: 64px minmax(0, 1fr);
    padding: 14px 13px;
  }
  .challenge-highlight-card .challenge-participant { width: 60px; }
  .challenge-highlight-card .challenge-participant img { width: 58px; height: 58px; }
  .challenge-highlight-card .challenge-participant > span { font-size: 8px; }
  .challenge-team-card.is-winner {
    grid-template-columns: 68px minmax(0, 1fr);
    padding: 17px 18px;
  }
  .challenge-team-card.is-winner img { width: 66px; height: 66px; }
  .challenge-team-card.is-winner h3 { font-size: 26px; }
}


.event-contestant-name {
  color: var(--text-strong);
  font-weight: 1000;
}

.challenge-introduction-card {
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: center;
}
.challenge-host-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  align-self: center;
  padding: 0;
  background: #fffaf0;
}
.challenge-host-wrap img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
  filter: none;
}

.challenge-highlight-card {
  grid-template-columns: 88px minmax(0, 1fr);
  justify-items: stretch;
  align-items: center;
  align-content: center;
  gap: 16px;
  min-height: 150px;
  padding: 17px 19px;
  text-align: left;
}
.challenge-highlight-card .challenge-participant {
  width: 82px;
  justify-self: start;
}
.challenge-highlight-card .challenge-participant img {
  width: 76px;
  height: 76px;
}
.challenge-highlight-copy {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  min-width: 0;
  text-align: left;
}
.challenge-highlight-copy > p {
  max-width: none;
  margin: 0;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.58;
  text-align: left;
}

.challenge-team-board {
  display: flex;
  justify-content: center;
}
.challenge-team-card.is-winner {
  width: min(460px, 100%);
  min-height: 136px;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 24px;
  border-width: 3px;
  border-top-width: 9px;
  text-align: center;
}
.challenge-team-card.is-winner img {
  width: 82px;
  height: 82px;
}
.challenge-team-card.is-winner div {
  justify-items: center;
  gap: 5px;
}
.challenge-team-card.is-winner h3 {
  font-size: 31px;
  line-height: 1;
}
.challenge-team-card.is-winner span {
  color: #356b48;
  font-size: 15px;
  font-weight: 1000;
}

@media (max-width: 760px) {
  .challenge-introduction-card { grid-template-columns: 1fr; }
  .challenge-host-wrap {
    width: min(260px, 100%);
    margin: 22px auto 0;
  }
  .challenge-highlight-card {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 13px;
  }
  .challenge-highlight-card .challenge-participant { width: 72px; }
  .challenge-highlight-card .challenge-participant img { width: 68px; height: 68px; }
}

@media (max-width: 480px) {
  .challenge-highlight-card {
    grid-template-columns: 64px minmax(0, 1fr);
    padding: 14px 13px;
  }
  .challenge-highlight-card .challenge-participant { width: 60px; }
  .challenge-highlight-card .challenge-participant img { width: 58px; height: 58px; }
  .challenge-highlight-card .challenge-participant > span { font-size: 8px; }
  .challenge-team-card.is-winner {
    grid-template-columns: 68px minmax(0, 1fr);
    padding: 17px 18px;
  }
  .challenge-team-card.is-winner img { width: 66px; height: 66px; }
  .challenge-team-card.is-winner h3 { font-size: 26px; }
}



.challenge-host-wrap {
  border-radius: 20px;
  overflow: hidden;
}
.challenge-host-wrap img {
  border-radius: inherit;
}

.challenge-team-board {
  gap: 18px;
}
.challenge-team-board.has-multiple-winners {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 420px));
  justify-content: center;
  align-items: stretch;
}
.challenge-team-board.has-multiple-winners .challenge-team-card.is-winner {
  width: 100%;
  min-width: 0;
}

@media (max-width: 760px) {
  .challenge-team-board.has-multiple-winners {
    grid-template-columns: minmax(0, 460px);
  }
}


.vote-ceremony-panel {
  display: none;
}
.vote-ceremony-panel.is-active {
  display: block;
}
.vote-ceremony-intro-card {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: 24px;
  border: 3px solid rgba(148, 82, 47, .28);
  border-radius: 20px;
  background: linear-gradient(135deg, #fff7e5, #fffaf0);
  box-shadow: 0 8px 0 rgba(174, 89, 47, .11);
}
.vote-host-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 3px solid rgba(148, 82, 47, .32);
  border-radius: 20px;
  background: #fffaf0;
}
.vote-host-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.vote-ceremony-intro-copy {
  display: grid;
  gap: 9px;
  min-width: 0;
}
.vote-ceremony-intro-copy h2 {
  font-size: clamp(31px, 4vw, 45px);
  line-height: .98;
}
.vote-ceremony-intro-copy > p:last-child {
  max-width: 790px;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.7;
}
.vote-reveal-controls,
.vote-breakdown-controls {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}
.safe-contestant-grid,
.vote-revote-safe-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  width: min(860px, 100%);
  margin: 22px auto 0;
}
.safe-contestant-card {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 66px;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 12px 15px;
  overflow: hidden;
  border: 2px solid #bdd4b8;
  border-radius: 17px;
  background: linear-gradient(135deg, #f4faec, #fffaf0);
  box-shadow: 0 6px 0 rgba(79, 120, 88, .11);
}
.safe-contestant-card.is-newly-revealed {
  animation: ceremonyReveal .58s cubic-bezier(.2, .82, .24, 1) var(--ceremony-reveal-delay, 0ms) both;
}
 .safe-contestant-card,
.vote-tie-section,
.eliminated-contestant-card { scroll-margin-block: 120px; }
@keyframes ceremonyReveal {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(.955);
    filter: blur(4px);
    box-shadow: 0 1px 0 rgba(79, 120, 88, 0);
  }
  62% {
    opacity: 1;
    transform: translateY(-3px) scale(1.008);
    filter: blur(0);
    box-shadow: 0 9px 0 rgba(79, 120, 88, .1);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: blur(0);
    box-shadow: 0 6px 0 rgba(79, 120, 88, .11);
  }
}
.ceremony-contestant-image {
  display: block;
  width: 74px;
  height: 74px;
  object-fit: cover;
  object-position: top center;
  border: 4px solid var(--ceremony-team-color, var(--forest));
  border-radius: 16px;
  background: var(--surface-raised);
}
.safe-contestant-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.safe-contestant-copy span {
  color: var(--success);
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: .16em;
}
.safe-contestant-copy strong {
  overflow: hidden;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ceremony-marshmallow-image {
  display: block;
  width: 60px;
  height: 60px;
  justify-self: end;
  object-fit: contain;
  filter: drop-shadow(0 5px 5px rgba(89, 58, 38, .18));
}

.eliminated-contestant-card {
  animation: eliminationReveal .62s cubic-bezier(.18, .84, .22, 1) both;
}
@keyframes eliminationReveal {
  from { opacity: 0; transform: translateY(24px) scale(.97); filter: blur(4px); }
  65% { opacity: 1; transform: translateY(-3px) scale(1.006); filter: blur(0); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .safe-contestant-card.is-newly-revealed,
  .eliminated-contestant-card {
    animation-duration: .01ms;
    animation-iteration-count: 1;
  }
}
.vote-tie-section {
  width: min(900px, 100%);
  margin: 27px auto 0;
  padding: 24px;
  border: 3px solid #e0ac42;
  border-radius: 20px;
  text-align: center;
  background: linear-gradient(145deg, #fff1bd, #fff9e6);
  box-shadow: 0 8px 0 rgba(173, 118, 27, .13);
  animation: ceremonyReveal .34s ease both;
}
.vote-tied-contestants {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 14px;
  flex-wrap: wrap;
}
.vote-tied-contestant-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: min(180px, 45%);
  padding: 13px;
  border: 2px solid #d99139;
  border-radius: 16px;
  background: rgba(255, 250, 240, .85);
}
.vote-tied-contestant-card .ceremony-contestant-image {
  width: 86px;
  height: 86px;
}
.vote-tied-contestant-card > span {
  color: #9a5e1d;
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: .16em;
}
.vote-tied-contestant-card > strong {
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}
.vote-tie-message {
  max-width: 720px;
  margin: 19px auto 0;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
}
.vote-revote-label {
  margin: 20px 0 10px;
  color: var(--accent-hover);
  font-family: var(--font-display);
  font-size: 31px;
  line-height: 1;
  letter-spacing: .08em;
}
.vote-revote-safe-list {
  grid-template-columns: repeat(auto-fit, minmax(280px, 410px));
  justify-content: center;
  margin-top: 20px;
}
.vote-elimination-area {
  width: min(940px, 100%);
  margin: 24px auto 0;
}
.eliminated-contestant-card {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(300px, 1.1fr);
  align-items: stretch;
  overflow: hidden;
  border: 4px solid #a63e35;
  border-radius: 21px;
  color: #fff8ed;
  background: linear-gradient(135deg, #a63e35, #d3533e);
  box-shadow: 0 9px 0 rgba(104, 30, 25, .20), 0 16px 32px rgba(118, 36, 28, .18);
  animation: ceremonyReveal .4s ease both;
}
.eliminated-contestant-identity {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 22px;
}
.eliminated-contestant-identity .ceremony-contestant-image {
  width: 102px;
  height: 102px;
  border-color: #fff4df;
  filter: grayscale(.72) contrast(.95);
}
.eliminated-contestant-identity > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.eliminated-contestant-identity span {
  color: #ffe0c7;
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: .16em;
}
.eliminated-contestant-identity strong {
  overflow-wrap: anywhere;
  color: #fffdf7;
  font-family: var(--font-display);
  font-size: clamp(31px, 4vw, 45px);
  font-weight: 400;
  line-height: .95;
}
.vote-host-sendoff {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 17px;
  padding: 20px 23px;
  border-left: 2px solid rgba(255, 240, 219, .26);
  background: rgba(96, 24, 20, .22);
}
.vote-host-sendoff img {
  width: 82px;
  height: 82px;
  object-fit: cover;
  object-position: center;
  border: 3px solid rgba(255, 248, 232, .72);
  border-radius: 17px;
  background: #fffaf0;
}
.vote-host-sendoff p {
  margin: 0;
  color: #fff8ed;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
}
.vote-breakdown {
  width: min(900px, 100%);
  margin: 18px auto 0;
  padding: 19px;
  border: 2px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 250, 240, .90);
}
.vote-breakdown h3 {
  margin: 0 0 12px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
}
.vote-breakdown h3:not(:first-child) {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-strong);
}
.vote-breakdown-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.vote-breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fff8e9;
}
.vote-breakdown-row > span {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.vote-breakdown-person {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.vote-breakdown-person:last-child {
  flex-direction: row-reverse;
  text-align: right;
}
.vote-breakdown-person .ceremony-contestant-image {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-width: 2px;
  border-radius: 10px;
}
.vote-breakdown-person strong {
  overflow: hidden;
  color: var(--text-strong);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vote-tiebreak-note {
  margin: 15px 0 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.vote-bottom-actions {
  margin-top: 25px;
}

@media (max-width: 760px) {
  .vote-ceremony-intro-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .vote-host-wrap {
    width: min(260px, 100%);
    margin-inline: auto;
  }
  .vote-ceremony-intro-copy { justify-items: center; }
  .safe-contestant-grid,
  .vote-revote-safe-list,
  .vote-breakdown-list { grid-template-columns: 1fr; }
  .eliminated-contestant-card { grid-template-columns: 1fr; }
  .vote-host-sendoff { border-top: 2px solid rgba(255, 240, 219, .26); border-left: 0; }
}

@media (max-width: 480px) {
  .vote-ceremony-intro-card,
  .vote-tie-section { padding: 16px; }
  .safe-contestant-card {
    grid-template-columns: 62px minmax(0, 1fr) 48px;
    gap: 10px;
    min-height: 86px;
    padding: 10px;
  }
  .safe-contestant-card .ceremony-contestant-image {
    width: 58px;
    height: 58px;
    border-width: 3px;
    border-radius: 13px;
  }
  .safe-contestant-copy strong { font-size: 21px; }
  .ceremony-marshmallow-image { width: 45px; height: 45px; }
  .vote-tied-contestant-card { width: 100%; }
  .eliminated-contestant-identity {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 13px;
    padding: 17px;
  }
  .eliminated-contestant-identity .ceremony-contestant-image {
    width: 78px;
    height: 78px;
  }
  .vote-host-sendoff {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }
  .vote-host-sendoff img { width: 60px; height: 60px; }
  .vote-breakdown-row {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    padding-inline: 7px;
  }
  .vote-breakdown-person .ceremony-contestant-image {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
  .vote-breakdown-person strong { font-size: 9px; }
}



.challenge-introduction-card {
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: 24px;
  overflow: visible;
  border: 3px solid rgba(148, 82, 47, .28);
  background: linear-gradient(135deg, #fff7e5, #fffaf0);
  box-shadow: 0 8px 0 rgba(174, 89, 47, .11);
}
.challenge-host-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 3px solid rgba(148, 82, 47, .32);
  border-radius: 20px;
  background: #fffaf0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .48);
}
.challenge-host-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  filter: none;
}

.challenge-introduction-copy {
  display: grid;
  justify-content: stretch;
  gap: 9px;
  padding: 0;
}
.challenge-introduction-copy .eyebrow { margin-bottom: 0; }
.challenge-introduction-copy h2 {
  font-size: clamp(31px, 4vw, 45px);
  line-height: .98;
}
.challenge-introduction-text {
  max-width: 790px;
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.7;
}

.camp-event-category { font-size: 10.5px; }
.camp-event-card-head h3 { font-size: clamp(22px, 3vw, 28px); }
.event-participant { width: 70px; }
.event-participant img { width: 58px; height: 58px; }
.event-participant > span { font-size: 10px; }
.camp-event-story { font-size: 15px; line-height: 1.65; }
.camp-event-outcome { font-size: 12.5px; line-height: 1.6; }

.episode-summary-panel { text-align: left; }
.episode-summary-heading {
  margin-bottom: 22px;
  text-align: center;
}
.episode-summary-heading h2 {
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1;
}
.episode-summary-stack {
  display: grid;
  gap: 18px;
}
.episode-summary-block {
  padding: 20px;
  border: 2px solid rgba(148, 82, 47, .24);
  border-radius: 18px;
  background: rgba(255, 248, 233, .9);
  box-shadow: 0 6px 0 rgba(174, 89, 47, .08);
}
.episode-summary-block-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}
.episode-summary-block-head .eyebrow { margin-bottom: 3px; }
.episode-summary-block-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}
.episode-summary-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  color: #fffaf0;
  background: var(--wood);
  font-family: var(--font-display);
  font-size: 22px;
}
.episode-summary-event-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.episode-summary-event-card {
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fffaf0;
}
.episode-summary-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}
.episode-summary-event-meta span {
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--wood-dark);
  background: #f8dfb9;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.episode-summary-event-meta span:last-child {
  color: #4e4369;
  background: #ebe5f3;
}
.episode-summary-event-card h4 {
  margin: 0 0 5px;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 900;
}
.episode-summary-event-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}
.episode-summary-winner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 390px));
  justify-content: center;
  gap: 13px;
}
.episode-summary-winner-grid > .episode-summary-winner-card:only-child {
  grid-column: 1 / -1;
  width: min(430px, 100%);
  justify-self: center;
}
.episode-summary-winner-card {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 15px 18px;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--summary-team-color) 65%, #c5b28d);
  border-radius: 16px;
  background: color-mix(in srgb, var(--summary-team-color) 9%, #fffaf0);
}
.episode-summary-winner-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--summary-team-color);
}
.episode-summary-winner-card img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  border-radius: 50%;
  background: #fffaf0;
}
.episode-summary-winner-card div { display: grid; gap: 3px; }
.episode-summary-winner-card span {
  color: #356b48;
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: .12em;
}
.episode-summary-winner-card strong {
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
}
.episode-summary-eliminated {
  display: grid;
  justify-items: center;
}
.episode-summary-eliminated-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 17px;
  width: min(520px, 100%);
  padding: 18px 20px;
  border: 3px solid #a8554d;
  border-radius: 18px;
  color: #fff7ef;
  background: linear-gradient(135deg, #a8554d, #793b37);
  box-shadow: 0 7px 0 rgba(96, 37, 34, .18);
}
.episode-summary-eliminated-card .ceremony-contestant-image {
  width: 88px;
  height: 88px;
  border-color: #fff7ef;
}
.episode-summary-eliminated-card div { display: grid; gap: 4px; }
.episode-summary-eliminated-card span {
  color: #ffe0d8;
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: .14em;
}
.episode-summary-eliminated-card strong {
  color: #fff;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}
.episode-summary-eliminated-card p {
  margin: 2px 0 0;
  color: #fff0e9;
  font-size: 12px;
  font-weight: 750;
}
.episode-summary-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--border-strong);
  border-radius: 13px;
  color: var(--text-muted);
  text-align: center;
  background: rgba(255, 250, 240, .65);
}
.episode-summary-actions { margin-top: 22px; }

@media (max-width: 760px) {
  .challenge-introduction-card {
    grid-template-columns: 1fr;
    padding: 20px;
    text-align: center;
  }
  .challenge-host-wrap {
    width: min(260px, 100%);
    margin: 0 auto;
  }
  .challenge-introduction-copy { padding: 4px 0 0; }
  .episode-summary-event-list,
  .episode-summary-winner-grid { grid-template-columns: 1fr; }
  .episode-summary-winner-grid > .episode-summary-winner-card:only-child { grid-column: auto; }
}

@media (max-width: 480px) {
  .camp-event-card { padding-inline: 15px; }
  .camp-event-story { font-size: 14px; }
  .camp-event-outcome { font-size: 12px; }
  .episode-summary-block { padding: 15px; }
  .episode-summary-eliminated-card {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 13px;
    padding: 15px;
  }
  .episode-summary-eliminated-card .ceremony-contestant-image {
    width: 70px;
    height: 70px;
  }
  .episode-summary-eliminated-card strong { font-size: 29px; }
}



.merge-announcement-panel { text-align: left; }
.merge-introduction-card {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: 24px;
  border: 3px solid rgba(148, 82, 47, .28);
  border-radius: 20px;
  background: linear-gradient(135deg, #fff7e5, #fffaf0);
  box-shadow: 0 8px 0 rgba(174, 89, 47, .11);
}
.merge-introduction-copy {
  display: grid;
  gap: 9px;
  min-width: 0;
}
.merge-introduction-copy h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: .98;
}
.merge-introduction-copy > p:last-child {
  max-width: 790px;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.7;
}
.merge-roster-card {
  margin-top: 22px;
  padding: 22px;
  border: 2px solid rgba(148, 82, 47, .24);
  border-radius: 18px;
  background: rgba(255, 248, 233, .92);
}
.merge-roster-heading {
  margin-bottom: 18px;
  text-align: center;
}
.merge-roster-heading h2 {
  margin: 0;
  font-size: clamp(31px, 4vw, 44px);
}
.merge-contestant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 13px;
}
.merge-contestant-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  padding: 13px 9px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fffaf0;
}
.merge-contestant-card img {
  width: 82px;
  height: 82px;
  object-fit: cover;
  object-position: top center;
  border: 3px solid var(--wood);
  border-radius: 50%;
}
.merge-contestant-card strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.challenge-individual-winner-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  width: min(520px, 100%);
  margin-inline: auto;
  padding: 19px 22px;
  border: 3px solid #d5a746;
  border-radius: 19px;
  background: #fff3c9;
  box-shadow: 0 7px 0 rgba(135, 95, 28, .14);
}
.challenge-individual-winner-card .challenge-participant { width: 88px; }
.challenge-individual-winner-card .challenge-participant img {
  width: 86px;
  height: 86px;
  border-color: #d5a746;
}
.challenge-individual-winner-card .challenge-participant > span { display: none; }
.challenge-individual-winner-card h3 {
  margin: 0 0 3px;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 400;
  line-height: 1;
}
.challenge-individual-winner-card span {
  color: #756021;
  font-size: 14px;
  font-weight: 900;
}
.episode-summary-winner-card.is-individual-winner .ceremony-contestant-image {
  width: 68px;
  height: 68px;
  border-color: #d5a746;
}

@media (max-width: 760px) {
  .merge-introduction-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .merge-introduction-card .vote-host-wrap {
    width: min(260px, 100%);
    margin-inline: auto;
  }
  .merge-contestant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .merge-contestant-grid { grid-template-columns: 1fr 1fr; }
  .challenge-individual-winner-card {
    grid-template-columns: 74px minmax(0, 1fr);
    padding: 16px;
  }
  .challenge-individual-winner-card .challenge-participant { width: 70px; }
  .challenge-individual-winner-card .challenge-participant img { width: 68px; height: 68px; }
}



.season-eliminated-card {
  grid-column: 1 / -1;
  padding: 17px 18px 18px;
  border: 2px solid rgba(108, 72, 58, .24);
  border-radius: 16px;
  background: rgba(238, 224, 207, .78);
}
.season-eliminated-head {
  display: grid;
  gap: 1px;
  margin-bottom: 13px;
}
.season-eliminated-head .eyebrow { margin-bottom: 2px; color: var(--danger); }
.season-eliminated-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 400;
}
.season-eliminated-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 11px;
}
.season-eliminated-contestant {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
}
.season-eliminated-portrait-wrap {
  position: relative;
  width: 58px;
  height: 58px;
}
.season-eliminated-portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 2px solid rgba(255, 250, 240, .9);
  border-radius: 12px;
  background: #d6cec4;
  filter: grayscale(1) contrast(.9) brightness(.78);
  box-shadow: 0 0 0 1px rgba(89, 69, 60, .25);
}
.season-eliminated-placement {
  position: absolute;
  top: -5px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 30px;
  min-height: 22px;
  padding: 2px 6px;
  border: 2px solid #fffaf0;
  border-radius: 999px;
  color: #fff;
  background: var(--danger);
  box-shadow: 0 3px 8px rgba(88, 49, 42, .24);
  font-size: 9px;
  font-weight: 1000;
}
.season-eliminated-contestant strong {
  width: 100%;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .season-eliminated-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}



.finale-introduction-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 20px;
  border: 2px solid rgba(148, 82, 47, .26);
  border-radius: 18px;
  background: rgba(255, 245, 223, .84);
}
.finale-introduction-card .vote-host-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
}
.finale-introduction-copy { min-width: 0; }
.finale-introduction-copy h2 { margin-bottom: 9px; font-size: clamp(31px, 4vw, 45px); }
.finale-introduction-copy p:last-child {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.65;
}
.finale-contestant-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 22px;
}
.finale-contestant-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(180px, 100%);
  padding: 14px;
  border: 2px solid rgba(148, 82, 47, .24);
  border-radius: 15px;
  background: rgba(255, 250, 240, .92);
}
.finale-contestant-card img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border: 3px solid #fffaf0;
  border-radius: 15px;
  background: #eadcc3;
  box-shadow: 0 0 0 1px rgba(148, 82, 47, .25);
}
.finale-contestant-card strong {
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  text-align: center;
}
.finale-reveal-controls { display: flex; justify-content: center; margin-top: 20px; }
.finale-result-area { display: grid; gap: 13px; margin-top: 20px; }
.finale-winner-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  width: min(560px, 100%);
  margin-inline: auto;
  padding: 22px 25px;
  border: 3px solid #d5a746;
  border-top-width: 9px;
  border-radius: 18px;
  background: #fff4c9;
  box-shadow: 0 9px 0 rgba(183, 130, 35, .14);
}
.finale-winner-card img {
  width: 108px;
  height: 108px;
  object-fit: cover;
  border: 4px solid #fffaf0;
  border-radius: 18px;
  background: #eadcc3;
  box-shadow: 0 0 0 2px rgba(213, 167, 70, .5);
}
.finale-winner-card div { display: grid; gap: 5px; }
.finale-winner-card span {
  color: #8b641d;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.finale-winner-card strong {
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 50px);
  font-weight: 400;
  line-height: .95;
}
.finale-winner-card p { margin: 2px 0 0; font-size: 14px; font-weight: 750; }
.finale-jury-breakdown {
  width: min(760px, 100%);
  margin: 18px auto 0;
  padding: 17px;
  border: 2px solid rgba(148, 82, 47, .22);
  border-radius: 16px;
  background: rgba(255, 250, 240, .9);
}
.finale-jury-breakdown h3 { margin: 0 0 12px; font-family: var(--font-display); font-size: 25px; font-weight: 400; text-align: center; }
.finale-jury-tiebreak-card {
  display: grid;
  gap: 6px;
  width: min(620px, 100%);
  margin: 0 auto 14px;
  padding: 15px 17px;
  border: 2px solid rgba(213, 167, 70, .72);
  border-radius: 14px;
  text-align: center;
  background: #fff4c9;
  box-shadow: 0 7px 0 rgba(183, 130, 35, .11);
}
.finale-jury-tiebreak-card span {
  color: #8b641d;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .14em;
}
.finale-jury-tiebreak-card strong {
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}
.finale-jury-tiebreak-card p { margin: 0; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.finale-jury-vote-list { display: grid; gap: 8px; }
.finale-jury-vote-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(148, 82, 47, .18);
  border-radius: 11px;
  background: rgba(255, 245, 223, .72);
}
.finale-jury-vote-person { display: flex; align-items: center; gap: 8px; min-width: 0; }
.finale-jury-vote-person:last-child { justify-content: flex-end; text-align: right; }
.finale-jury-vote-person img { width: 38px; height: 38px; object-fit: cover; border-radius: 9px; filter: grayscale(.25); }
.finale-jury-vote-person strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.finale-bottom-actions { margin-top: 21px; }
.episode-summary-season-winner { display: grid; }
.episode-summary-season-winner .finale-winner-card { width: 100%; }
.challenge-automatic-loser-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 17px;
  width: min(460px, 100%);
  padding: 18px 21px;
  border: 3px solid #a8554d;
  border-top-width: 8px;
  border-radius: 17px;
  background: #f8ddd5;
}
.challenge-automatic-loser-card .challenge-participant img { filter: grayscale(1) brightness(.78); }
.challenge-automatic-loser-card h3 { margin: 0; font-family: var(--font-display); font-size: 29px; font-weight: 400; }
.challenge-automatic-loser-card span { color: #8c3c35; font-size: 13px; font-weight: 900; }
/* When a challenge produces two result cards (for example, a winner plus a
   challenge elimination), stack them vertically so neither card is squeezed. */
.challenge-team-board.has-showdown-results {
  flex-direction: column;
  align-items: center;
  gap: 18px;
  flex-wrap: nowrap;
}
.challenge-team-board.has-showdown-results .challenge-individual-winner-card,
.challenge-team-board.has-showdown-results .challenge-automatic-loser-card {
  width: min(520px, 100%);
  margin-inline: auto;
}

@media (max-width: 720px) {
  .finale-introduction-card { grid-template-columns: 1fr; text-align: center; }
  .finale-introduction-card .vote-host-wrap { width: min(210px, 100%); justify-self: center; }
  .finale-winner-card { grid-template-columns: 86px minmax(0, 1fr); padding: 18px; }
  .finale-winner-card img { width: 82px; height: 82px; }
  .finale-jury-vote-row { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .finale-jury-vote-person,
  .finale-jury-vote-person:last-child { justify-content: center; text-align: center; }
}



.stats-feature-card { overflow: hidden; }
.stats-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.stats-section-head h2 { font-size: clamp(30px, 4vw, 42px); }
.stats-section-head > p {
  max-width: 520px;
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
  text-align: right;
}
.stats-empty-state {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 54px 18px;
  color: var(--text-muted);
  text-align: center;
}
.stats-empty-state h3 { margin: 0; font-size: 17px; }
.stats-empty-state p { max-width: 520px; margin: 0; color: var(--text-soft); font-size: 12px; line-height: 1.55; }
.stats-table-scroll,
.voting-history-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 253, 247, .62);
  scrollbar-gutter: stable;
}
.season-stats-table,
.voting-history-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text);
  font-size: 11px;
}
.season-stats-table th,
.season-stats-table td,
.voting-history-table th,
.voting-history-table td {
  padding: 11px 12px;
  border-right: 1px solid rgba(201, 142, 88, .24);
  border-bottom: 1px solid rgba(201, 142, 88, .24);
  vertical-align: middle;
}
.season-stats-table tr > :last-child,
.voting-history-table tr > :last-child { border-right: 0; }
.season-stats-table tbody tr:last-child > *,
.voting-history-table tbody tr:last-child > * { border-bottom: 0; }
.season-stats-table thead th {
  color: var(--wood-dark);
  background: #fff0d6;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.season-stats-table tbody tr:nth-child(even) td { background: rgba(255, 241, 213, .34); }
.season-stats-table td:first-child { color: var(--text-strong); font-weight: 900; white-space: nowrap; }
.challenge-stats-table { min-width: 960px; }
.alliance-stats-table { min-width: 1120px; }
.stats-number-cell { color: var(--text-strong); font-size: 17px; font-weight: 900; text-align: center; }
.stats-person-list,
.stats-team-winner-list {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.stats-person-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 180px;
  padding: 4px 8px 4px 4px;
  border: 1px solid rgba(148, 82, 47, .22);
  border-radius: 999px;
  color: var(--text-strong);
  background: rgba(255, 250, 240, .92);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}
.stats-person-chip > span:last-child {
  max-width: 105px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-mini-portrait {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  object-fit: cover;
  border: 2px solid #fffaf0;
  border-radius: 50%;
  background: #eadcc3;
  box-shadow: 0 0 0 1px rgba(148, 82, 47, .28);
}
.stats-team-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--stats-team-color) 42%, var(--border));
  border-left: 5px solid var(--stats-team-color);
  border-radius: 8px;
  color: var(--text-strong);
  background: color-mix(in srgb, var(--stats-team-color) 7%, #fffaf0);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.alliance-status-pill {
  display: inline-flex;
  min-width: 74px;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.alliance-status-pill.is-active { color: #315b3a; background: #dcebd9; }
.alliance-status-pill.is-dissolved { color: #87413b; background: #f2d9d4; }



.voting-history-table { min-width: max-content; table-layout: fixed; }
.voting-contestant-heading,
.voting-contestant-cell {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 188px;
  min-width: 188px;
  max-width: 188px;
  background: #fffaf0;
  box-shadow: 5px 0 9px rgba(88, 67, 43, .08);
}
.voting-contestant-heading {
  z-index: 7;
  color: var(--wood-dark);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}
.voting-phase-heading {
  height: 36px;
  color: #fffdf7;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .1em;
  text-align: center;
  text-transform: uppercase;
}
.voting-phase-heading.is-original { background: #94522f; }
.voting-phase-heading.is-switched { background: #d17d35; }
.voting-phase-heading.is-merged { background: #3f624b; }
.voting-event-heading {
  width: 112px;
  min-width: 112px;
  height: 174px;
  padding: 9px 7px !important;
  border-top: 6px solid var(--vote-stage-color);
  background: color-mix(in srgb, var(--vote-stage-color) 8%, #fff8e8);
  text-align: center;
}
.voting-event-heading > * { display: block; margin-inline: auto; }
.voting-event-episode {
  margin-bottom: 7px;
  color: var(--wood-dark);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.voting-outcome-portrait {
  width: 56px;
  height: 56px;
  margin-bottom: 7px;
  object-fit: cover;
  border: 3px solid var(--vote-stage-color);
  border-radius: 13px;
  background: #eadcc3;
  box-shadow: 0 0 0 2px #fffaf0;
}
.voting-event-heading strong {
  max-width: 96px;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 10px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.voting-event-outcome {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 750;
}
.voting-event-count {
  margin-top: 6px;
  color: var(--accent-hover);
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
}
.voting-contestant-identity {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.voting-row-portrait {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 2px solid var(--border-strong);
  border-radius: 11px;
  background: #eadcc3;
}
.voting-contestant-identity strong {
  display: block;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.voting-team-history { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.voting-team-triangle {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 9px solid var(--team-marker-color);
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.12));
}
.voting-history-cell {
  width: 112px;
  min-width: 112px;
  height: 60px;
  color: var(--text-strong);
  background: color-mix(in srgb, var(--vote-stage-color) 6%, #fffaf0);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.25;
  text-align: center;
}
.voting-history-cell > span { display: block; }
.voting-history-cell small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 750;
}
.voting-history-cell.is-none { color: var(--text-muted); font-style: italic; }
.voting-history-cell.is-outcome {
  color: #7d2f29;
  background: color-mix(in srgb, #c85e52 19%, #fffaf0);
  box-shadow: inset 0 0 0 2px rgba(168, 85, 77, .32);
}
.voting-history-cell.is-departed {
  background:
    repeating-linear-gradient(135deg, rgba(84, 90, 91, .14) 0 5px, rgba(84, 90, 91, .08) 5px 10px),
    #e4e2dc;
}
.voting-history-legend {
  display: flex;
  gap: 10px 18px;
  flex-wrap: wrap;
  margin-top: 13px;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.45;
}
.voting-history-legend strong { color: var(--text-strong); }



.season-records-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}
.season-record-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 128px;
  padding: 17px 18px;
  border: 1px solid var(--border);
  border-left: 6px solid var(--wood);
  border-radius: 15px;
  background: rgba(255, 248, 232, .76);
}
.season-record-copy small {
  display: block;
  margin-bottom: 7px;
  color: var(--accent-hover);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.season-record-copy strong {
  display: block;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
}
.season-record-copy p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
}
.season-record-portraits { display: flex; align-items: center; justify-content: flex-end; }
.season-record-portrait {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 4px solid #fffaf0;
  border-radius: 16px;
  background: #eadcc3;
  box-shadow: 0 0 0 2px var(--border-strong), 0 6px 14px rgba(77, 57, 37, .12);
}
.season-record-portrait + .season-record-portrait { margin-left: -17px; }

@media (max-width: 820px) {
  .stats-section-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .stats-section-head > p { text-align: left; }
  .season-records-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .stats-card { padding: 15px; }
  .voting-contestant-heading,
  .voting-contestant-cell { width: 154px; min-width: 154px; max-width: 154px; }
  .voting-contestant-identity { grid-template-columns: 36px minmax(0, 1fr); gap: 8px; }
  .voting-row-portrait { width: 36px; height: 36px; }
  .season-record-card { grid-template-columns: minmax(0, 1fr) 58px; }
  .season-record-portrait { width: 52px; height: 52px; }
  .season-record-portrait + .season-record-portrait { margin-left: -28px; }
}



.voting-contestant-heading {
  text-align: center;
  vertical-align: middle;
}

.voting-contestant-heading,
.voting-contestant-cell {
  width: 176px;
  min-width: 176px;
  max-width: 176px;
}

.voting-history-table tbody th,
.voting-history-table tbody td {
  height: 40px;
  padding: 5px 8px;
}

.voting-contestant-identity {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.voting-row-portrait {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-width: 1px;
  border-radius: 7px;
}

.voting-team-history {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 2px;
  margin: 0;
}

.voting-team-triangle {
  border-top-width: 4px;
  border-bottom-width: 4px;
  border-left-width: 7px;
}

.voting-contestant-identity strong {
  min-width: 0;
  font-size: 10px;
  line-height: 1.1;
}

.voting-phase-heading {
  height: 32px;
  padding-block: 7px !important;
}

.voting-episode-heading {
  height: 31px;
  padding: 6px 8px !important;
  color: var(--wood-dark);
  border-top: 4px solid var(--vote-stage-color);
  background: color-mix(in srgb, var(--vote-stage-color) 10%, #fff3d9);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .07em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.voting-outcome-heading {
  height: 68px;
  padding: 7px 8px !important;
  background: color-mix(in srgb, var(--vote-stage-color) 6%, #fffaf0);
  text-align: center;
}

.voting-outcome-identity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
}

.voting-outcome-portrait {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  margin: 0;
  border-width: 2px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px #fffaf0;
}

.voting-outcome-identity > div {
  display: grid;
  min-width: 0;
  gap: 2px;
  text-align: left;
}

.voting-outcome-identity strong {
  display: block;
  max-width: 108px;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voting-outcome-identity .voting-event-outcome {
  margin: 0;
  font-size: 7.5px;
}

.voting-stage-heading {
  width: 96px;
  min-width: 96px;
  height: 48px;
  padding: 6px 7px !important;
  background: color-mix(in srgb, var(--vote-stage-color) 9%, #fff8e8);
  text-align: center;
}

.voting-stage-heading.is-revote {
  background: color-mix(in srgb, var(--vote-stage-color) 15%, #fff3d9);
}

.voting-stage-heading.is-chris {
  background: color-mix(in srgb, #d74725 14%, #fff3d9);
}

.voting-stage-label {
  display: block;
  color: var(--text-muted);
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: .07em;
  line-height: 1.1;
  text-transform: uppercase;
}

.voting-stage-heading .voting-event-count {
  display: block;
  margin-top: 4px;
  font-size: 9.5px;
}

.voting-history-cell {
  width: 96px;
  min-width: 96px;
  height: 40px;
  font-size: 9.5px;
}

.voting-history-cell.is-revote {
  background: color-mix(in srgb, var(--vote-stage-color) 10%, #fffaf0);
}

.voting-history-cell.is-chris {
  background: color-mix(in srgb, #d74725 9%, #fffaf0);
}

.challenge-stats-table th,
.challenge-stats-table td,
.alliance-stats-table th,
.alliance-stats-table td {
  text-align: center !important;
}

.challenge-stats-table .stats-person-list,
.challenge-stats-table .stats-team-winner-list,
.alliance-stats-table .stats-person-list,
.alliance-stats-table .stats-team-winner-list {
  justify-content: center;
}

.season-records-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.season-record-card {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 122px;
  gap: 26px;
  padding: 19px 22px;
}

.season-record-copy h3 {
  margin: 0;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: .01em;
  text-transform: uppercase;
}

.season-record-copy p {
  max-width: 720px;
  margin: 9px 0 0;
  font-size: 11px;
  line-height: 1.55;
}

.season-record-winners {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
}

.season-record-winner {
  display: grid;
  justify-items: center;
  gap: 7px;
  width: 82px;
  min-width: 0;
  text-align: center;
}

.season-record-winner strong {
  display: block;
  width: 100%;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.season-record-portrait {
  width: 68px;
  height: 68px;
  border-radius: 16px;
}

.season-record-portrait + .season-record-portrait { margin-left: 0; }
.season-record-no-winner {
  align-self: center;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
}

.season-record-card:nth-child(3n + 1) { border-left-color: var(--accent); }
.season-record-card:nth-child(3n + 2) { border-left-color: var(--forest); }
.season-record-card:nth-child(3n + 3) { border-left-color: var(--sun); }

@media (max-width: 700px) {
  .season-record-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .season-record-winners { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .voting-contestant-heading,
  .voting-contestant-cell {
    width: 145px;
    min-width: 145px;
    max-width: 145px;
  }
  .voting-contestant-identity { gap: 5px; }
  .voting-row-portrait { width: 22px; height: 22px; flex-basis: 22px; }
  .season-record-card { grid-template-columns: 1fr; }
  .season-record-winner { width: 70px; }
  .season-record-portrait { width: 58px; height: 58px; }
}


.voting-outcome-heading { height: 86px; }
.voting-outcome-identity {
  flex-direction: column;
  gap: 4px;
}
.voting-outcome-identity > div {
  justify-items: center;
  text-align: center;
}
.voting-outcome-identity strong {
  max-width: 90px;
  overflow: visible;
  line-height: 1.05;
  text-overflow: clip;
  white-space: normal;
}
.voting-outcome-portrait {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}



.voting-stage-heading,
.voting-history-cell {
  width: 120px;
  min-width: 120px;
}

.voting-history-table tbody th,
.voting-history-table tbody td {
  height: 34px;
  padding: 3px 7px;
}

.voting-history-cell {
  height: 34px;
  font-size: 9.25px;
  line-height: 1.12;
}

.voting-contestant-identity { gap: 6px; }
.voting-row-portrait {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
}
.voting-contestant-identity strong {
  font-size: 9.5px;
  line-height: 1;
}

.voting-outcome-heading {
  height: 64px;
  padding: 5px 8px !important;
}
.voting-outcome-identity { gap: 3px; }
.voting-outcome-portrait {
  width: 31px;
  height: 31px;
  flex-basis: 31px;
}
.voting-outcome-identity strong {
  max-width: 108px;
  font-size: 9.5px;
}

.voting-stage-heading {
  height: 34px;
  padding: 4px 8px !important;
}
.voting-stage-heading .voting-event-count {
  display: block;
  margin: 0;
  font-size: 10px;
  line-height: 1.1;
}

@media (max-width: 560px) {
  .voting-stage-heading,
  .voting-history-cell {
    width: 112px;
    min-width: 112px;
  }
  .voting-history-table tbody th,
  .voting-history-table tbody td,
  .voting-history-cell { height: 32px; }
  .voting-row-portrait {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }
}


.voting-stage-heading,
.voting-history-cell {
  width: 176px;
  min-width: 176px;
}

.voting-history-cell > span,
.voting-history-cell > s {
  white-space: nowrap;
}

.voting-outcome-identity strong {
  max-width: 158px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

@media (max-width: 560px) {
  .voting-stage-heading,
  .voting-history-cell {
    width: 158px;
    min-width: 158px;
  }
}


.voting-stage-heading,
.voting-history-cell {
  width: 240px;
  min-width: 240px;
}

.voting-stage-heading .voting-event-count,
.voting-history-cell > span,
.voting-history-cell > s {
  white-space: nowrap;
}

.voting-outcome-identity strong {
  max-width: 220px;
}


.voting-history-cell.is-event-outcome-person:not(.is-outcome) {
  background: #fffaf0 !important;
  box-shadow: none !important;
}

.voting-history-cell.is-event-outcome-person.is-outcome,
.voting-history-cell.is-outcome {
  color: #7d2f29;
  background: color-mix(in srgb, #c85e52 19%, #fffaf0) !important;
  box-shadow: inset 0 0 0 2px rgba(168, 85, 77, .42) !important;
}

@media (max-width: 560px) {
  .voting-stage-heading,
  .voting-history-cell {
    width: 220px;
    min-width: 220px;
  }
}


#statsVotingHistory .voting-history-table {
  table-layout: fixed !important;
}

#statsVotingHistory .voting-contestant-column,
#statsVotingHistory .voting-contestant-heading,
#statsVotingHistory .voting-contestant-cell {
  width: 160px !important;
  min-width: 160px !important;
  max-width: 160px !important;
}

#statsVotingHistory .voting-stage-column,
#statsVotingHistory .voting-stage-heading,
#statsVotingHistory .voting-history-cell {
  width: 100px !important;
  min-width: 100px !important;
  max-width: 100px !important;
}

#statsVotingHistory .voting-stage-heading {
  padding-inline: 8px !important;
}

#statsVotingHistory .voting-stage-heading .voting-event-count,
#statsVotingHistory .voting-history-cell > span,
#statsVotingHistory .voting-history-cell > s {
  display: block;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}


#statsVotingHistory .voting-history-cell > span,
#statsVotingHistory .voting-history-cell > s {
  white-space: normal !important;
  overflow-wrap: anywhere;
  line-height: 1.08;
}

#statsVotingHistory .voting-stage-heading .voting-event-count {
  white-space: nowrap !important;
}

#statsVotingHistory .voting-outcome-heading,
#statsVotingHistory .voting-episode-heading,
#statsVotingHistory .voting-phase-heading {
  overflow: visible !important;
}

#statsVotingHistory .voting-outcome-identity strong {
  max-width: 104px !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}


#statsVotingHistory .voting-history-cell.has-voter-team-color {
  color: var(--voter-team-text-color, #17292f) !important;
  background: var(--voter-team-color) !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: 0 !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .16);
}


#statsVotingHistory .voting-history-cell.is-uninvolved {
  color: var(--text-muted) !important;
  background: #fffaf0 !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: 0 !important;
}


#statsVotingHistory .voting-history-cell.is-final-elimination {
  background-image: none !important;
  box-shadow: none !important;
  outline: 0 !important;
  font-weight: 950;
}


#statsVotingHistory .voting-history-cell.is-outcome:not(.is-final-elimination) {
  box-shadow: none !important;
}


#statsVotingHistory .voting-history-cell.is-post-elimination-blank {
  color: transparent !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

#statsVotingHistory .voting-history-cell.is-post-elimination-blank::before,
#statsVotingHistory .voting-history-cell.is-post-elimination-blank::after {
  content: none !important;
}

@media (max-width: 700px) {
  #statsVotingHistory .voting-stage-column,
  #statsVotingHistory .voting-stage-heading,
  #statsVotingHistory .voting-history-cell {
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
  }

  #statsVotingHistory .voting-outcome-identity strong {
    max-width: 112px !important;
  }
}




#statsVotingHistory .voting-stage-heading.is-revote {
  color: #2f4861 !important;
  background: #d9e8f3 !important;
  border-top: 3px solid #7898b2 !important;
}

#statsVotingHistory .voting-stage-heading.is-chris {
  color: #6d3d13 !important;
  background: #ffe1a8 !important;
  border-top: 3px solid #d58a2f !important;
}

#statsVotingHistory .voting-stage-heading.is-revote .voting-event-count,
#statsVotingHistory .voting-stage-heading.is-chris .voting-event-count {
  color: inherit !important;
}

.challenge-stats-table td[rowspan] {
  vertical-align: middle;
}

.challenge-profile-list {
  display: grid;
  justify-content: center;
  gap: 7px;
}

.challenge-profile-line,
.challenge-team-line {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-width: 0;
  color: var(--text-strong);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  text-align: left;
}

.challenge-profile-portrait {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  object-fit: cover;
  border: 2px solid #fffaf0;
  border-radius: 50%;
  background: #eadcc3;
  box-shadow: 0 0 0 1px rgba(148, 82, 47, .3);
}

.challenge-team-marker {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 2px solid #fffaf0;
  border-radius: 50%;
  background: var(--challenge-team-color);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--challenge-team-color) 70%, #94522f);
}

.challenge-stats-table .challenge-team-line {
  justify-content: center;
}

.challenge-stats-table tbody tr:has(td[rowspan]) + tr td {
  border-top: 1px dashed rgba(201, 142, 88, .32);
}



.stats-section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.stats-download-btn {
  min-width: 112px;
  letter-spacing: .08em;
}

.stats-download-btn:disabled {
  opacity: .48;
  cursor: not-allowed;
  transform: none;
}


.alliance-stats-table {
  min-width: 960px;
}

.alliance-stats-table .challenge-profile-list {
  justify-content: center;
}

.alliance-stats-table .challenge-profile-line {
  margin-inline: auto;
}

.alliance-stats-table td:first-child {
  white-space: normal;
}


#statsVotingHistory .voting-contestant-column,
#statsVotingHistory .voting-contestant-heading,
#statsVotingHistory .voting-contestant-cell {
  width: 142px !important;
  min-width: 142px !important;
  max-width: 142px !important;
}

#statsVotingHistory .voting-stage-column,
#statsVotingHistory .voting-stage-heading,
#statsVotingHistory .voting-history-cell {
  width: 82px !important;
  min-width: 82px !important;
  max-width: 82px !important;
}

#statsVotingHistory .voting-stage-heading {
  padding-inline: 5px !important;
  color: var(--wood-dark) !important;
  border-top: 0 !important;
  background: color-mix(in srgb, var(--vote-stage-color) 9%, #fff8e8) !important;
}


#statsVotingHistory .voting-stage-heading.is-initial,
#statsVotingHistory .voting-stage-heading.is-revote,
#statsVotingHistory .voting-stage-heading.is-chris,
#statsVotingHistory .voting-stage-heading.is-automatic,
#statsVotingHistory .voting-stage-heading.is-jury {
  color: var(--wood-dark) !important;
  border-top: 0 !important;
  background: color-mix(in srgb, var(--vote-stage-color) 9%, #fff8e8) !important;
}

#statsVotingHistory .voting-stage-heading .voting-event-count {
  font-size: 8.75px;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

#statsVotingHistory .voting-history-cell {
  padding-inline: 4px;
  font-size: 8.75px;
}

#statsVotingHistory .voting-outcome-identity strong {
  max-width: 82px !important;
  font-size: 9px;
}


.voting-history-table.is-exporting .voting-contestant-heading,
.voting-history-table.is-exporting .voting-contestant-cell {
  position: static !important;
  box-shadow: none !important;
}

@media (max-width: 700px) {
  #statsVotingHistory .voting-contestant-column,
  #statsVotingHistory .voting-contestant-heading,
  #statsVotingHistory .voting-contestant-cell {
    width: 132px !important;
    min-width: 132px !important;
    max-width: 132px !important;
  }

  #statsVotingHistory .voting-stage-column,
  #statsVotingHistory .voting-stage-heading,
  #statsVotingHistory .voting-history-cell {
    width: 76px !important;
    min-width: 76px !important;
    max-width: 76px !important;
  }
}



.cast-tool-grid .even-gender-cast-btn {
  border-color: rgba(63, 98, 75, .52);
  color: #31543e;
  background: #edf4e6;
}
.cast-tool-grid .even-gender-cast-btn:hover {
  border-color: #3f624b;
  background: #dcebd5;
}

#randomizeAllArchetypesDialog { width: min(540px, calc(100% - 24px)); }

#relationshipsDialog {
  width: min(742px, calc(100% - 14px));
}
.relationship-grid-shell {
  min-height: 160px;
  max-height: calc(86vh - 110px);
  border-radius: 7px;
}
.relationship-grid {
  font-size: 8.25px;
}
.relationship-grid th,
.relationship-grid td {
  width: 30px;
  min-width: 30px;
  height: 29px;
}
.relationship-grid thead th {
  height: 31px;
}
.relationship-grid .relationship-corner-cell,
.relationship-column-head,
.relationship-grid .relationship-row-head {
  width: 31px;
  min-width: 31px;
  max-width: 31px;
}
.relationship-contestant-image {
  width: 23px;
  height: 23px;
  border-radius: 5px;
}
.relationship-score-button {
  min-height: 27px;
  font-size: 8.25px;
}
.relationship-score-menu {
  width: 188px;
  max-height: min(296px, calc(100vh - 12px));
}
.relationship-score-option {
  min-height: 25px;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 5px;
  padding: 3px 6px;
}
.relationship-score-option strong { font-size: 9px; }
.relationship-score-option span { font-size: 8.75px; }


.relationship-score-button.is-hostile,
.relationship-score-option.is-hostile { color: #fff; background: #cf443b; }
.relationship-score-button.is-negative,
.relationship-score-option.is-negative { color: #5d1e13; background: #f08358; }
.relationship-score-button.is-slightly-negative,
.relationship-score-option.is-slightly-negative { color: #5e3b0e; background: #f5bd52; }
.relationship-score-button.is-neutral,
.relationship-score-option.is-neutral { color: #4c5559; background: #e4dccb; }
.relationship-score-button.is-slightly-positive,
.relationship-score-option.is-slightly-positive { color: #264d2e; background: #acd77f; }
.relationship-score-button.is-positive,
.relationship-score-option.is-positive { color: #173f2a; background: #67bd76; }
.relationship-score-button.is-devoted,
.relationship-score-option.is-devoted { color: #fff; background: #26895b; }

#teamSetupDialog .setup-flow-actions {
  flex-wrap: wrap;
  justify-content: center;
}
#randomizeEvenGenderTeamsBtn {
  border-color: rgba(63, 98, 75, .52);
  color: #31543e;
  background: #edf4e6;
}
#randomizeEvenGenderTeamsBtn:hover {
  border-color: #3f624b;
  background: #dcebd5;
}



.team-setup-message {
  margin: 0 24px 4px;
  padding: 10px 12px;
  border: 1px solid #cf6d5d;
  border-radius: 10px;
  color: #792b24;
  background: #ffe1d8;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}
.team-setup-message.is-success {
  border-color: #6b9670;
  color: #294f31;
  background: #e0f1df;
}
.season-preparing-dialog {
  width: min(430px, calc(100vw - 28px));
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
}
.season-preparing-dialog::backdrop {
  background: rgba(31, 36, 32, .58);
  backdrop-filter: blur(3px);
}
.season-preparing-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
  padding: 30px 28px 26px;
  border: 3px solid rgba(148, 82, 47, .34);
  border-radius: 22px;
  color: var(--text);
  text-align: center;
  background: var(--surface);
  box-shadow: var(--shadow-dialog);
}
.season-preparing-card h2 { margin: 0; }
.season-preparing-card p:not(.eyebrow) {
  min-height: 22px;
  margin: 2px 0 4px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}
.season-preparing-card small {
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.45;
}
.season-preparing-spinner {
  width: 42px;
  height: 42px;
  border: 5px solid #f0d5ac;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: seasonPreparingSpin .8s linear infinite;
}
.season-preparing-progress {
  position: relative;
  width: 100%;
  height: 12px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-raised);
}
.season-preparing-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--sun));
  transition: width .2s ease;
}
@keyframes seasonPreparingSpin { to { transform: rotate(360deg); } }


.challenge-winner-circumstance {
  width: min(440px, 100%);
  margin: 7px 0 0;
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  color: var(--text) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.48;
  text-align: center;
}
.challenge-individual-winner-card > div,
.challenge-team-card.is-winner > div {
  min-width: 0;
}
.challenge-individual-winner-card .challenge-winner-circumstance {
  color: #5c522d !important;
}
.challenge-team-card.is-winner .challenge-winner-circumstance {
  color: #355442 !important;
}


#statsVotingHistory .voting-history-cell.is-race-winner {
  color: #17292f !important;
  background: #ffed00 !important;
}
#statsVotingHistory .voting-history-cell.is-race-second {
  color: #17292f !important;
  background: #dcdcdc !important;
}
#statsVotingHistory .voting-history-cell.is-race-third {
  color: #fffaf0 !important;
  background: #8f4d2b !important;
}
#statsVotingHistory .voting-history-cell.is-race-winner,
#statsVotingHistory .voting-history-cell.is-race-second,
#statsVotingHistory .voting-history-cell.is-race-third {
  font-weight: 950 !important;
  box-shadow: none !important;
}




.challenge-introduction-text { white-space: pre-line; }



.challenge-reveal.is-finale-result-only > .challenge-section-heading:first-child,
.challenge-reveal.is-finale-result-only > .challenge-highlight-grid {
  display: none !important;
}

.finale-jury-tally {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 14px;
}
.finale-jury-tally-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 116px;
  padding: 7px 10px;
  border: 1px solid rgba(148, 82, 47, .2);
  border-radius: 10px;
  color: var(--text-strong);
  background: #fff5df;
}
.finale-jury-tally-chip span {
  flex: 1;
  overflow: hidden;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.finale-jury-tally-chip strong {
  display: grid;
  place-items: center;
  min-width: 28px;
  min-height: 28px;
  border-radius: 8px;
  color: #fffdf7;
  background: var(--forest);
  font-size: 14px;
  font-weight: 950;
}
.finale-jury-vote-row.is-newly-revealed {
  animation: finaleVoteReveal .42s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes finaleVoteReveal {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.finale-confetti-layer {
  position: fixed;
  z-index: 9999;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.finale-confetti-piece {
  position: absolute;
  top: -8vh;
  left: var(--confetti-left);
  width: 11px;
  height: 17px;
  opacity: 0;
  background: hsl(var(--confetti-hue) 82% 55%);
  transform: scale(var(--confetti-scale));
  animation: finaleConfettiFall var(--confetti-duration) cubic-bezier(.16, .72, .3, 1) var(--confetti-delay) forwards;
}
.finale-confetti-piece.is-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.finale-confetti-piece.is-strip {
  width: 7px;
  height: 23px;
  border-radius: 3px;
}
@keyframes finaleConfettiFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -5vh, 0) rotate(0deg) scale(var(--confetti-scale));
  }
  8% { opacity: 1; }
  88% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate3d(var(--confetti-drift), 112vh, 0) rotate(var(--confetti-spin)) scale(var(--confetti-scale));
  }
}

@media (prefers-reduced-motion: reduce) {
  .finale-jury-vote-row.is-newly-revealed { animation-duration: .01ms; }
  .finale-confetti-piece { animation-timing-function: linear; }
}


.finale-question-area {
  width: min(900px, 100%);
  margin: 24px auto 0;
  display: grid;
  gap: 18px;
}
.finale-question-heading {
  text-align: center;
}
.finale-question-heading h3 {
  margin: 0;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
}
.finale-question-heading > p:last-child {
  max-width: 620px;
  margin: 7px auto 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}
.finale-question-finalist {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 2px solid rgba(148, 82, 47, .22);
  border-radius: 17px;
  background: rgba(255, 250, 240, .86);
}
.finale-question-finalist-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 82, 47, .18);
}
.finale-question-finalist-heading img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border: 2px solid #fffaf0;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(148, 82, 47, .22);
}
.finale-question-finalist-heading strong {
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 400;
}
.finale-question-card {
  display: grid;
  grid-template-columns: minmax(130px, .34fr) minmax(0, 1fr);
  gap: 8px 14px;
  padding: 13px;
  border: 1px solid rgba(148, 82, 47, .18);
  border-radius: 13px;
  background: #fff5df;
}
.finale-question-asker {
  grid-row: span 2;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.finale-question-asker img,
.finale-question-answer img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 11px;
}
.finale-question-asker > div,
.finale-question-answer > div {
  min-width: 0;
}
.finale-question-asker strong,
.finale-question-answer strong {
  display: block;
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 900;
}
.finale-question-asker span {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.finale-question-text {
  margin: 0;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.45;
}
.finale-question-answer {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  border-left: 4px solid var(--sun);
  border-radius: 9px;
  background: rgba(255, 250, 240, .88);
}
.finale-question-answer p {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}


.is-finale-focus-target:focus {
  outline: 4px solid rgba(242, 181, 68, .38);
  outline-offset: 5px;
}
.finale-jury-vote-row.is-newly-revealed {
  position: relative;
  z-index: 2;
  border-color: #e1aa34;
  background: #fff1bd;
  box-shadow: 0 8px 24px rgba(122, 82, 24, .16);
  animation: finaleVoteReveal .62s cubic-bezier(.16, .9, .25, 1) both;
  scroll-margin-block: 34vh;
}
.finale-winner-card,
.challenge-individual-winner-card {
  scroll-margin-block: 30vh;
}


.finale-confetti-layer {
  position: fixed;
  z-index: 9999;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.finale-confetti-piece {
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  width: var(--confetti-size);
  height: var(--confetti-size);
  margin-left: calc(var(--confetti-size) / -2);
  margin-top: calc(var(--confetti-size) / -2);
  opacity: 0;
  color: var(--confetti-color);
  background: var(--confetti-color);
  border-radius: 2px;
  transform: translate3d(var(--confetti-start-x), var(--confetti-start-y), 0) scale(.25);
  animation: finaleConfettiBurst var(--confetti-duration) cubic-bezier(.12, .72, .2, 1) var(--confetti-delay) forwards;
  will-change: transform, opacity;
}
.finale-confetti-piece.is-dot {
  border-radius: 999px;
}
.finale-confetti-piece.is-ribbon {
  width: calc(var(--confetti-size) * .55);
  height: calc(var(--confetti-size) * 1.8);
  border-radius: 999px;
}
.finale-confetti-piece.is-sparkle,
.finale-confetti-piece.is-heart {
  display: grid;
  place-items: center;
  width: calc(var(--confetti-size) * 1.45);
  height: calc(var(--confetti-size) * 1.45);
  margin-left: calc(var(--confetti-size) * -.725);
  margin-top: calc(var(--confetti-size) * -.725);
  background: transparent;
  font-size: calc(var(--confetti-size) * 1.35);
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255,255,255,.45);
}
@keyframes finaleConfettiBurst {
  0% {
    opacity: 0;
    transform: translate3d(var(--confetti-start-x), var(--confetti-start-y), 0) rotate(0deg) scale(.2);
  }
  7% { opacity: 1; }
  42% {
    opacity: 1;
    transform: translate3d(
      calc(var(--confetti-start-x) + var(--confetti-burst-x)),
      calc(var(--confetti-start-y) + var(--confetti-burst-y)),
      0
    ) rotate(var(--confetti-mid-spin)) scale(1);
  }
  82% { opacity: .96; }
  100% {
    opacity: 0;
    transform: translate3d(
      calc(var(--confetti-start-x) + var(--confetti-final-x)),
      calc(var(--confetti-start-y) + var(--confetti-final-y)),
      0
    ) rotate(var(--confetti-spin)) scale(.72);
  }
}

@media (max-width: 720px) {
  .finale-question-card { grid-template-columns: 1fr; }
  .finale-question-asker { grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .finale-jury-vote-row.is-newly-revealed { animation-duration: .01ms; }
  .finale-confetti-piece { animation-duration: 1.2s !important; }
}


#lateEntrantDialog { width: min(520px, calc(100% - 24px)); }
.late-entrant-selection-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fffaf0;
  box-shadow: 0 10px 0 rgba(180, 64, 34, .16), var(--shadow-dialog);
}
.late-entrant-selection-body {
  display: grid;
  gap: 10px;
  padding: 4px 22px 18px;
}
.late-entrant-selection-body .team-setup-message { margin: 0; }

.event-advantage-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 12px;
  padding: 10px 12px;
  border: 1px solid #e9bb6c;
  border-radius: 12px;
  background: #fff2bd;
}
.event-advantage-image {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 5px 8px rgba(92, 58, 22, .18));
}
.event-advantage-copy { display: grid; gap: 2px; }
.event-advantage-copy strong { color: var(--text-strong); font-size: 13px; }
.event-advantage-copy span { color: var(--text-muted); font-size: 11px; }

.special-outcome-stack {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.special-outcome-card,
.idol-play-card,
.non-elimination-card,
.team-switch-result-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px;
  border: 2px solid rgba(148, 82, 47, .28);
  border-radius: 16px;
  background: #fff4dc;
}
.special-outcome-card img,
.idol-play-card .ceremony-contestant-image,
.team-switch-result-card .ceremony-contestant-image {
  width: 70px;
  height: 70px;
  border-radius: 14px;
  object-fit: cover;
}
.special-outcome-card.is-quit { border-color: #c69051; background: #fff0d7; }
.special-outcome-card.is-medical { border-color: #b76f6f; background: #fff0ef; }
.special-outcome-card.is-disqualification { border-color: #8f4d2b; background: #f8e2d7; }
.special-outcome-card.is-challenge { border-color: #d74725; background: #ffe5cf; }
.special-outcome-card.is-return { border-color: #4f7858; background: #e9f4e6; }
.special-outcome-copy { display: grid; gap: 3px; }
.special-outcome-copy span,
.idol-play-copy span { color: var(--wood); font-size: 10px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.special-outcome-copy strong,
.idol-play-copy strong { color: var(--text-strong); font-size: 18px; }
.special-outcome-copy p,
.idol-play-copy p { margin: 2px 0 0; color: var(--text-muted); font-size: 12px; line-height: 1.5; }

.idol-play-card { border-color: #e0ab36; background: #fff3bd; }
.idol-play-image { width: 78px; height: 78px; object-fit: contain; }
.non-elimination-card { justify-content: center; text-align: center; border-color: #4f7858; background: #eaf5e7; }
.team-switch-result-card { border-color: #5279a8; background: #e9f0fa; }
.vote-breakdown-row.is-cancelled { opacity: .55; text-decoration: line-through; }
.vote-breakdown-row.is-cancelled::after {
  content: "CANCELLED";
  margin-left: auto;
  color: var(--danger);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}

.twist-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 16px;
}
.twist-status-chip {
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--surface-raised);
  font-size: 10px;
  font-weight: 800;
}

@media (max-width: 720px) {
}


.return-challenge-panel { display: none; }
.return-challenge-panel.is-active { display: block; }
.return-challenge-introduction-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
  padding: 20px;
  border: 2px solid rgba(79, 120, 88, .32);
  border-radius: 18px;
  background: #eef7e9;
}
.return-challenge-competitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.return-challenge-competitor-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-raised);
  text-align: center;
}
.return-challenge-competitor-card .ceremony-contestant-image {
  width: 64px;
  height: 64px;
  border-radius: 13px;
  object-fit: cover;
}
.return-challenge-competitor-card strong { font-size: 12px; }
.return-challenge-result-area { margin: 18px 0; }
.return-challenge-winner-card,
.challenge-exile-result-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 2px solid #4f7858;
  border-radius: 17px;
  background: #eaf5e7;
}
.return-challenge-winner-card .ceremony-contestant-image,
.challenge-exile-result-card .ceremony-contestant-image {
  width: 76px;
  height: 76px;
  border-radius: 15px;
  object-fit: cover;
}
.return-challenge-winner-card > div,
.challenge-exile-result-card > div { display: grid; gap: 3px; }
.return-challenge-winner-card span,
.challenge-exile-result-card span,
.challenge-exile-intro-card span {
  color: var(--wood);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.return-challenge-winner-card strong,
.challenge-exile-result-card strong,
.challenge-exile-intro-card strong { color: var(--text-strong); font-size: 18px; }
.return-challenge-winner-card p,
.challenge-exile-result-card p,
.challenge-exile-intro-card p { margin: 2px 0 0; color: var(--text-muted); font-size: 12px; line-height: 1.5; }

.challenge-exile-area {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.challenge-exile-intro-card {
  padding: 16px;
  border: 2px solid #a9a9a9;
  border-radius: 16px;
  background: #f0f0f0;
}
.challenge-exile-intro-card > div { display: grid; gap: 4px; }
.challenge-exile-votes-btn { justify-self: center; }
.challenge-exile-vote-list { margin-bottom: 2px; }
.challenge-exile-result-card { border-color: #808080; background: #ececec; }
.vote-breakdown-target-list { display: grid; gap: 7px; }
.vote-breakdown-row.has-multiple-targets { align-items: center; }
.vote-breakdown-person.is-cancelled-target { opacity: .52; text-decoration: line-through; }

.vote-elimination-area .is-delayed-twist-reveal {
  opacity: 0;
  transform: translateY(10px) scale(.98);
  animation: delayedTwistReveal .42s ease 1s forwards;
}
@keyframes delayedTwistReveal {
  to { opacity: 1; transform: none; }
}
.vote-elimination-area .is-apparent-elimination { margin-bottom: 14px; }

#statsVotingHistory .voting-history-cell.is-special-gray,
#statsVotingHistory .voting-history-cell.is-exile {
  color: #fff !important;
  background: #808080 !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: 0 !important;
  font-style: normal !important;
  font-weight: 900 !important;
}
#statsVotingHistory .voting-history-cell.is-none {
  color: #fff !important;
  background: #999999 !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: 0 !important;
  font-style: normal !important;
}
#statsVotingHistory .voting-history-cell br { line-height: .55; }

@media (max-width: 700px) {
  .return-challenge-introduction-card { grid-template-columns: 1fr; text-align: center; }
  .return-challenge-introduction-card .challenge-host-wrap { justify-self: center; }
}


#statsVotingHistory .voting-history-cell > span,
#statsVotingHistory .voting-history-cell > s {
  display: inline !important;
}



.event-advantage-row {
  width: min(390px, 100%);
  justify-content: center;
  margin: 4px auto 12px;
  padding: 8px 10px;
}
.event-advantage-image {
  width: 46px;
  height: 46px;
}
.event-advantage-copy { text-align: center; }

.challenge-exile-area > h3 {
  margin: 2px 0 0;
  text-align: center;
}
.challenge-exile-vote-list {
  width: min(720px, 100%);
  margin: 0 auto 2px;
}
.challenge-exile-result-card {
  justify-self: center;
  width: min(500px, 100%);
  gap: 12px;
  padding: 12px 14px;
}
.challenge-exile-result-card .ceremony-contestant-image {
  width: 58px;
  height: 58px;
  border-radius: 12px;
}
.challenge-exile-result-card strong { font-size: 16px; }
.challenge-exile-result-card p { font-size: 11px; }

.vote-elimination-area .is-idol-apparent-elimination {
  margin-bottom: 14px;
}
.vote-elimination-area .is-idol-sequence-card,
.vote-elimination-area .is-idol-replacement-elimination {
  opacity: 0;
  transform: translateY(12px) scale(.985);
  animation: idolCeremonySequence .46s ease forwards;
}
.vote-elimination-area .is-idol-sequence-card {
  margin: 0 auto 14px;
  animation-delay: .7s;
}
.vote-elimination-area .is-idol-replacement-elimination {
  animation-delay: 1.45s;
}
@keyframes idolCeremonySequence {
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .vote-elimination-area .is-idol-sequence-card,
  .vote-elimination-area .is-idol-replacement-elimination {
    animation-duration: .01ms;
    animation-delay: 0s;
  }
}

.challenge-exile-vote-list .vote-breakdown-row {
  width: min(620px, 100%);
  margin-inline: auto;
}



#statsEdgicHistory {
  display: grid;
  gap: 13px;
}

.edgic-key {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  padding: 1px 1px 5px;
  scrollbar-width: thin;
}

.edgic-key-chip {
  display: inline-grid;
  place-items: center;
  min-width: 51px;
  height: 25px;
  flex: 0 0 auto;
  padding-inline: 7px;
  border: 1px solid rgba(23, 41, 47, .34);
  color: var(--edgic-text);
  background: var(--edgic-background);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .01em;
  line-height: 1;
}

.edgic-history-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 253, 247, .62);
  scrollbar-gutter: stable;
}

.edgic-history-table {
  min-width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: var(--text);
  font-size: 10px;
}

.edgic-history-table th,
.edgic-history-table td {
  height: 37px;
  padding: 5px 6px;
  border-right: 1px solid rgba(23, 41, 47, .34);
  border-bottom: 1px solid rgba(23, 41, 47, .34);
  vertical-align: middle;
}

.edgic-history-table tr > :last-child { border-right: 0; }
.edgic-history-table tbody tr:last-child > * { border-bottom: 0; }

.edgic-contestant-heading,
.edgic-contestant-cell {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 142px !important;
  min-width: 142px !important;
  max-width: 142px !important;
  background: #fffaf0;
  box-shadow: 5px 0 9px rgba(88, 67, 43, .08);
}

.edgic-contestant-heading {
  z-index: 7;
  color: var(--wood-dark);
  font-size: 9.5px;
  font-weight: 950;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

.edgic-contestant-identity {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.edgic-row-portrait {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-width: 1px;
  border-radius: 7px;
}

.edgic-contestant-identity strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edgic-phase-heading {
  height: 32px !important;
  padding: 7px 8px !important;
  color: #fffdf7;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .09em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.edgic-phase-heading.is-original { background: #94522f; }
.edgic-phase-heading.is-switched { background: #d17d35; }
.edgic-phase-heading.is-merged { background: #3f624b; }
.edgic-phase-heading.is-summary { background: #33434a; }

.edgic-episode-heading,
.edgic-summary-heading {
  height: 31px !important;
  padding: 6px 5px !important;
  color: var(--wood-dark);
  background: #fff0d6;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.edgic-episode-heading.is-merge {
  box-shadow: inset 0 4px 0 #3f624b;
}

.edgic-episode-heading.is-finale {
  box-shadow: inset 0 4px 0 #d74725;
}

.edgic-history-cell,
.edgic-overall-cell {
  width: 76px !important;
  min-width: 76px !important;
  max-width: 76px !important;
  color: var(--edgic-text);
  background: var(--edgic-background);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: -.01em;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255,255,255,.12);
  cursor: help;
}

.edgic-history-cell.is-inactive {
  color: transparent;
  background: transparent;
  border-right-color: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
  font-weight: 750;
  text-shadow: none;
  cursor: default;
  pointer-events: none;
}

.edgic-overall-cell {
  width: 86px !important;
  min-width: 86px !important;
  max-width: 86px !important;
  border-left: 2px solid rgba(23, 41, 47, .52);
  font-size: 11px;
}

.edgic-average-cell {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  color: var(--text-strong);
  background: #fff0d6;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}

.edgic-history-table tbody tr:hover .edgic-contestant-cell,
.edgic-history-table tbody tr:hover .edgic-average-cell {
  background-color: #fff5df;
}

.edgic-history-table tbody tr:hover .edgic-history-cell.is-inactive {
  background-color: transparent;
}

@media (max-width: 700px) {
  .edgic-contestant-heading,
  .edgic-contestant-cell {
    width: 132px !important;
    min-width: 132px !important;
    max-width: 132px !important;
  }
  .edgic-history-cell {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
  }
  .edgic-overall-cell {
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
  }
}



#createContestantDialog {
  width: min(660px, calc(100% - 24px));
  max-width: none;
  padding: 0;
}
.create-contestant-card {
  max-height: min(90vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 4px solid rgba(113, 58, 37, .42);
  border-radius: 22px;
  background: #fffaf0;
  box-shadow: 0 12px 0 rgba(180, 64, 34, .18), var(--shadow-dialog);
}
.create-contestant-card > .modal-head { padding: 16px 18px 0; }
.custom-contestant-body {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 14px;
  padding: 16px 18px;
}
.custom-identity-grid {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.custom-image-column {
  display: grid;
  gap: 8px;
}
.custom-contestant-image {
  display: block;
  width: 128px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid rgba(148, 82, 47, .32);
  border-radius: 16px;
  background: var(--surface-input);
}
.custom-upload-btn {
  min-height: 36px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 11px;
}
.custom-upload-btn input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.custom-identity-fields {
  display: grid;
  gap: 10px;
}
.custom-identity-fields input {
  min-height: 40px;
}
.custom-contestant-actions {
  flex-wrap: wrap;
  padding: 0 18px 17px;
}

@media (max-width: 560px) {
  #createContestantDialog { width: min(100% - 12px, 660px); }
  .custom-identity-grid { grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }
  .custom-contestant-image { width: 92px; border-radius: 13px; }
  .custom-upload-btn { padding-inline: 6px; font-size: 9px; }
  .custom-contestant-actions > button { flex: 1 1 calc(50% - 5px); }
  .custom-contestant-actions .modal-action-spacer { display: none; }
}


#statsFanPopularity { width: 100%; }
.fan-popularity-chart-shell {
  width: 100%;
  border: 1px solid rgba(201, 142, 88, .34);
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255, 253, 247, .48);
}
.fan-popularity-chart-scroll {
  width: 100%;
  overflow-x: auto;
  padding: 6px 8px 0;
  scrollbar-gutter: stable;
}
.fan-popularity-chart {
  display: block;
  max-width: none;
  overflow: visible;
}
.fan-popularity-grid-line {
  stroke: rgba(113, 58, 37, .14);
  stroke-width: 1;
}
.fan-popularity-y-label,
.fan-popularity-x-label {
  fill: var(--text-soft);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 800;
}
.fan-popularity-line {
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: opacity .15s ease, stroke-width .15s ease;
}
.fan-popularity-point {
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
  transition: opacity .15s ease, r .15s ease, stroke-width .15s ease;
}
.fan-popularity-series { transition: opacity .15s ease; }
.fan-popularity-series.is-dimmed { opacity: .09; }
.fan-popularity-series.is-focused .fan-popularity-line { stroke-width: 4; }
.fan-popularity-series.is-focused .fan-popularity-point { stroke-width: 3.2; r: 5.2; }
.fan-popularity-legend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 2px 12px;
  padding: 13px 15px 15px;
  border-top: 1px solid rgba(201, 142, 88, .28);
}
.fan-popularity-legend-item {
  position: relative;
  min-width: 0;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 5px;
  border: 0;
  border-radius: 9px;
  color: var(--text-strong);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
  text-align: left;
  transition: opacity .15s ease, background .15s ease;
}
.fan-popularity-legend-item:hover,
.fan-popularity-legend-item:focus-visible {
  background: rgba(255, 224, 200, .5);
}
.fan-popularity-legend-item.is-dimmed { opacity: .18; }
.fan-popularity-legend-item.is-focused { opacity: 1; }
.fan-popularity-portrait {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  object-fit: cover;
  border: 2px solid var(--fan-line-color);
  border-radius: 50%;
  background: var(--surface-raised);
}
.fan-popularity-legend-item span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .fan-popularity-chart-scroll { padding-inline: 2px; }
  .fan-popularity-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 10px; }
}



.toast-region {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1200;
  width: min(520px, calc(100% - 28px));
  transform: translateX(-50%);
  pointer-events: none;
}
.toast-notification {
  padding: 11px 15px;
  border: 2px solid rgba(148, 82, 47, .30);
  border-radius: 12px;
  color: var(--text-strong);
  background: rgba(255, 250, 240, .97);
  box-shadow: 0 8px 0 rgba(174, 89, 47, .12), 0 16px 36px rgba(78, 65, 44, .14);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}
.toast-notification.is-visible { opacity: 1; transform: translateY(0); }



body:has(#simulation-screen.is-active .episode-panel.is-active:not(:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"]))) .episode-topbar {
  margin-bottom: 18px;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(242, 223, 189, .32);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
body:has(#simulation-screen.is-active .episode-panel.is-active:not(:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"]))) .episode-title-stack h1 {
  color: #f2dfbd;
  text-shadow: 0 2px 0 rgba(38, 46, 39, .34), 0 6px 18px rgba(16, 24, 22, .48);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:not(:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"]))) .episode-title-stack .eyebrow {
  color: #e7a15f;
  text-shadow: 0 2px 9px rgba(22, 31, 28, .48);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:not(:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"]))) .episode-subline {
  color: #ead9bf;
  text-shadow: 0 2px 10px rgba(18, 25, 23, .55);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:not(:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"]))) .episode-controls .secondary-btn,
body:has(#simulation-screen.is-active .episode-panel.is-active:not(:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"]))) .episode-select {
  background: rgba(255, 248, 237, .88);
  box-shadow: 0 5px 16px rgba(66, 46, 28, .08);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:not(:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"]))) .episode-stage-tabs {
  margin-bottom: 16px;
  padding-inline: 10px;
  border: 1px solid rgba(112, 83, 58, .16);
  border-radius: 14px;
  background: rgba(252, 245, 232, .74);
  box-shadow: 0 8px 24px rgba(54, 37, 23, .06);
  backdrop-filter: blur(8px);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:not(:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"]))) .episode-stage-tabs .section-toggle {
  color: #6b635d;
}
body:has(#simulation-screen.is-active .episode-panel.is-active:not(:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"]))) .episode-stage-tabs .section-toggle:hover {
  color: #2f464d;
}
body:has(#simulation-screen.is-active .episode-panel.is-active:not(:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"]))) .episode-panel-shell {
  border-color: rgba(123, 84, 57, .26);
  background: linear-gradient(145deg, rgba(255, 249, 240, .88), rgba(245, 236, 219, .84));
  box-shadow: 0 10px 0 rgba(169, 84, 44, .12), 0 20px 42px rgba(51, 36, 20, .10);
  backdrop-filter: blur(10px);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:not(:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"]))) .episode-panel-shell .section-title,
body:has(#simulation-screen.is-active .episode-panel.is-active:not(:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"]))) .event-stage-head .eyebrow,
body:has(#simulation-screen.is-active .episode-panel.is-active:not(:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"]))) .episode-summary-heading .eyebrow {
  color: #9b5d2d;
}


body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-topbar {
  border-bottom-color: rgba(255, 180, 128, .28);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-title-stack h1 {
  color: #fff7f2;
  text-shadow: 0 3px 18px rgba(7, 2, 12, .72);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-title-stack .eyebrow {
  color: #ffb06f;
  text-shadow: 0 2px 10px rgba(7, 2, 12, .6);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-subline {
  color: #e5cedd;
  text-shadow: 0 2px 10px rgba(7, 2, 12, .6);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-controls .secondary-btn,
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-select {
  color: #fff4ee;
  border-color: rgba(255, 174, 113, .36);
  background: rgba(31, 18, 39, .82);
  box-shadow: 0 7px 20px rgba(5, 2, 11, .18);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-controls .secondary-btn:hover {
  color: #fff;
  border-color: rgba(255, 174, 113, .66);
  background: rgba(53, 28, 48, .93);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-select option {
  color: #fff4ee;
  background: #2a1934;
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-stage-tabs {
  margin-bottom: 16px;
  padding-inline: 8px;
  border: 1px solid rgba(255, 176, 116, .2);
  border-radius: 13px;
  background: rgba(24, 13, 32, .66);
  backdrop-filter: blur(7px);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-stage-tabs .section-toggle {
  color: #cbb7c7;
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-stage-tabs .section-toggle:hover {
  color: #fff4ee;
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-stage-tabs .section-toggle.is-active {
  color: #ff9a5d;
  border-bottom-color: #ff8b4b;
}

body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-panel-shell {
  --surface: #291c30;
  --surface-raised: #34233b;
  --surface-input: #2d1d34;
  --surface-hover: #3a2640;
  --border: rgba(255, 184, 128, .24);
  --border-strong: rgba(255, 164, 96, .48);
  --text: #f0e4eb;
  --text-strong: #fff8f3;
  --text-muted: #d4c0cd;
  --text-soft: #b59eae;
  --accent: #e9683b;
  --accent-hover: #ff8750;
  --accent-soft: rgba(233, 104, 59, .18);
  --wood: #f5a55f;
  --wood-dark: #d9814d;
  --sun: #ffc268;
  --forest: #73906f;
  --danger: #da675d;
  --success: #9fcb94;
  --warning: #e8b95f;
  color: var(--text);
  border-color: rgba(255, 168, 105, .25);
  background: linear-gradient(145deg, rgba(36, 22, 43, .91), rgba(25, 17, 35, .94));
  box-shadow: 0 12px 0 rgba(31, 8, 20, .23), 0 24px 55px rgba(6, 2, 12, .31);
  backdrop-filter: blur(8px);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-panel-shell .secondary-btn {
  color: #fff5ef;
  border-color: rgba(255, 177, 116, .34);
  background: rgba(70, 42, 57, .76);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-panel-shell .secondary-btn:hover {
  color: #fff;
  border-color: rgba(255, 177, 116, .62);
  background: rgba(91, 49, 61, .92);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-panel-shell .proceed-row {
  border-top-color: rgba(255, 181, 123, .2);
}


body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .vote-ceremony-intro-card {
  border-color: rgba(239, 116, 69, .42);
  background: linear-gradient(135deg, rgba(86, 36, 42, .93), rgba(41, 24, 48, .95));
  box-shadow: 0 8px 0 rgba(49, 11, 25, .2);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .vote-host-wrap {
  border-color: rgba(255, 171, 106, .4);
  background: #24172b;
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .safe-contestant-card {
  border-color: rgba(132, 173, 120, .56);
  background: linear-gradient(135deg, rgba(52, 73, 52, .94), rgba(34, 36, 42, .94));
  box-shadow: 0 6px 0 rgba(9, 20, 12, .18);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .safe-contestant-copy span { color: #b9dda9; }
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .vote-tie-section {
  border-color: #c9883d;
  background: linear-gradient(145deg, rgba(92, 52, 34, .96), rgba(48, 28, 40, .96));
  box-shadow: 0 8px 0 rgba(50, 22, 19, .18);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .vote-tied-contestant-card {
  border-color: rgba(227, 153, 75, .7);
  background: rgba(45, 27, 39, .9);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .vote-tied-contestant-card > span { color: #ffc073; }
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .vote-breakdown {
  border-color: rgba(255, 178, 113, .28);
  background: rgba(35, 23, 42, .92);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .vote-breakdown-row {
  border-color: rgba(255, 178, 113, .18);
  background: rgba(64, 39, 52, .72);
}


body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .finale-introduction-card {
  border-color: rgba(241, 124, 70, .38);
  background: linear-gradient(135deg, rgba(75, 32, 42, .92), rgba(39, 23, 49, .94));
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .finale-contestant-card {
  border-color: rgba(255, 170, 109, .28);
  background: rgba(48, 29, 45, .9);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .finale-contestant-card img {
  border-color: rgba(255, 229, 211, .72);
  background: #2f2235;
  box-shadow: 0 0 0 1px rgba(255, 164, 98, .25);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .finale-jury-breakdown {
  border-color: rgba(255, 177, 114, .28);
  background: rgba(36, 23, 43, .92);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .finale-jury-vote-row {
  border-color: rgba(255, 177, 114, .2);
  background: rgba(63, 39, 53, .72);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .finale-question-finalist {
  border-color: rgba(255, 177, 114, .25);
  background: rgba(44, 28, 48, .9);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .finale-question-finalist-heading {
  border-bottom-color: rgba(255, 177, 114, .2);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .finale-question-finalist-heading img {
  border-color: rgba(255, 229, 211, .7);
  box-shadow: 0 0 0 1px rgba(255, 164, 98, .24);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .finale-question-card {
  border-color: rgba(255, 177, 114, .18);
  background: rgba(54, 34, 52, .84);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .finale-question-answer {
  border-left-color: #f1a453;
  background: rgba(73, 43, 55, .82);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .finale-jury-tally-chip {
  border-color: rgba(255, 177, 114, .22);
  background: rgba(61, 38, 53, .86);
}


body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-summary-heading .eyebrow,
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-summary-block-head .eyebrow,
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-summary-number {
  color: #ffb06f;
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-summary-number {
  background: rgba(233, 104, 59, .22);
  box-shadow: inset 0 0 0 1px rgba(255, 177, 114, .28);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-summary-block {
  border-color: rgba(255, 177, 114, .24);
  background: rgba(40, 25, 47, .9);
  box-shadow: 0 8px 0 rgba(22, 8, 22, .18);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-summary-event-card {
  border-color: rgba(255, 177, 114, .2);
  background: rgba(57, 36, 54, .78);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-summary-event-meta span {
  color: #ffd0a6;
  background: rgba(111, 67, 45, .72);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-summary-event-meta span:last-child {
  color: #ead8ff;
  background: rgba(72, 56, 95, .82);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-summary-event-card h4,
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-summary-winner-card strong {
  color: #fff8f3;
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-summary-event-card p,
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-summary-winner-card span {
  color: #dbc7d2;
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-summary-winner-card {
  border-color: rgba(255, 177, 114, .26);
  background: rgba(53, 32, 48, .88);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-summary-winner-card::before {
  filter: saturate(1.1) brightness(1.02);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-summary-winner-card img {
  background: rgba(255, 244, 235, .94);
}
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-summary-empty {
  border-color: rgba(255, 177, 114, .26);
  color: #d8c6d3;
  background: rgba(57, 36, 54, .72);
}


body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .finale-winner-card,
body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .finale-jury-tiebreak-card {
  --text: #4c3b2b;
  --text-strong: #2e251d;
  --text-muted: #705c46;
  color: #4c3b2b;
}

@media (max-width: 760px) {
  body:has(#simulation-screen.is-active .episode-panel.is-active:is([data-panel="vote"], [data-panel="finale"], [data-panel="summary"])) .episode-stage-tabs {
    margin-inline: -4px;
    border-radius: 10px;
  }
}


img {
  -webkit-user-drag: none;
  user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}


/* Mobile safeguard: when Challenge Result has two special result cards
   (for example an immunity winner plus a challenge elimination), force the
   cards to stack vertically so they never get cut off side-by-side. */
.challenge-team-board.has-dual-result-cards {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  flex-wrap: nowrap;
}
.challenge-team-board.has-dual-result-cards .challenge-individual-winner-card,
.challenge-team-board.has-dual-result-cards .challenge-automatic-loser-card {
  width: min(520px, 100%);
  margin-inline: auto;
}

@media (max-width: 560px) {
  .challenge-team-board.has-dual-result-cards .challenge-individual-winner-card,
  .challenge-team-board.has-dual-result-cards .challenge-automatic-loser-card {
    width: 100%;
  }
}


/* If the Challenge Result area contains a winner card plus a second result box
   (for example a challenge elimination card), stack them vertically without
   stretching the normal winner card. */
.challenge-team-board.has-stacked-results {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 18px !important;
  flex-wrap: nowrap !important;
}

.challenge-team-board.has-stacked-results .challenge-team-card.is-winner {
  width: min(460px, 100%) !important;
  margin-inline: auto;
}

.challenge-team-board.has-stacked-results .challenge-individual-winner-card {
  width: min(520px, 100%) !important;
  margin-inline: auto;
}

.challenge-team-board.has-stacked-results .challenge-automatic-loser-card {
  width: min(460px, 100%) !important;
  margin-inline: auto;
}

.challenge-team-board.has-stacked-results .special-outcome-stack {
  width: min(460px, 100%);
  margin: 0 auto;
}

.challenge-team-board.has-stacked-results .special-outcome-card {
  width: 100%;
  max-width: 100%;
}
