:root {
  color-scheme: light;
  --ink: #121820;
  --muted: #64717d;
  --paper: #f4f7f2;
  --panel: #ffffff;
  --line: #dae4de;
  --green: #1d7a53;
  --green-soft: #e8f6ed;
  --blue: #315d9b;
  --blue-soft: #e8effb;
  --yellow: #ffdf5d;
  --yellow-soft: #fff5ca;
  --red: #c74848;
  --red-soft: #fde9e5;
  --shadow: 0 16px 34px rgba(18, 24, 32, .1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #eef5ee 0, #ffffff 420px),
    #ffffff;
  color: var(--ink);
  font-family: "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

h1,
h2,
p {
  margin: 0;
}

.site-header,
.worldcup-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand,
.site-header nav {
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 900;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border: 1px solid #1e2933;
  border-radius: var(--radius);
  background: #fff7cf;
  object-fit: contain;
}

.site-header nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.site-header nav a,
.icon-button,
.text-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .94);
  color: #26313c;
  font-size: 13px;
  font-weight: 850;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
}

.site-header nav a:hover,
.icon-button:hover,
.text-button:hover {
  border-color: rgba(49, 93, 155, .42);
  box-shadow: 0 8px 18px rgba(18, 24, 32, .08);
  transform: translateY(-1px);
}

.worldcup-shell {
  padding-bottom: 42px;
}

.command-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: stretch;
  padding: 18px 0 14px;
}

.headline,
.clock-panel,
.probability-panel,
.stat-panel,
.condition-card,
.ranking-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.headline {
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255, 223, 93, .42), rgba(232, 246, 237, .9) 58%, rgba(232, 239, 251, .94)),
    #ffffff;
}

.eyebrow,
.panel-kicker {
  display: block;
  color: #8b6500;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

h1 {
  margin-top: 5px;
  font-size: 46px;
  line-height: 1.08;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  margin-top: 12px;
  color: #3f4b57;
  font-size: 16px;
}

.clock-panel {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 144px;
  padding: 20px;
  background: #101820;
  color: #f9fcff;
}

.clock-panel .panel-kicker {
  color: var(--yellow);
}

.clock-panel strong {
  font-size: 30px;
  line-height: 1.1;
}

.clock-panel span:last-child {
  color: #b8c4cf;
  font-size: 13px;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.5fr) repeat(3, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.sticky-summary {
  position: sticky;
  top: 0;
  z-index: 60;
  width: 100vw;
  margin: 0 calc(50% - 50vw);
  padding: 8px max(16px, calc((100vw - 1180px) / 2));
  border-top: 1px solid rgba(218, 228, 222, .7);
  border-bottom: 1px solid rgba(218, 228, 222, .9);
  border-radius: 0;
  background: rgba(244, 247, 242, .96);
  backdrop-filter: blur(14px);
}

.sticky-summary .probability-panel,
.sticky-summary .stat-panel {
  min-height: 76px;
  padding: 10px 12px;
  box-shadow: none;
}

.sticky-summary .probability-panel {
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 10px;
}

.sticky-summary .probability-copy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
}

.sticky-summary .probability-copy .panel-kicker {
  grid-column: 1 / -1;
  margin-bottom: 1px;
}

.sticky-summary .probability-copy strong {
  grid-row: 2 / 4;
  font-size: 36px;
}

.sticky-summary .probability-copy span {
  margin-top: 0;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticky-summary .probability-copy p,
.sticky-summary .stat-panel p {
  margin-top: 0;
  font-size: 12px;
}

.sticky-summary .stat-panel strong {
  font-size: 24px;
}

.sticky-summary .probability-meter {
  width: 54px;
  height: 54px;
}

.probability-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 16px;
  align-items: center;
  min-height: 138px;
  padding: 17px;
  overflow: hidden;
}

.probability-panel[data-tone="qualified"] {
  border-color: rgba(29, 122, 83, .36);
  background: linear-gradient(135deg, #ffffff 0, var(--green-soft) 100%);
}

body.is-qualified .sticky-summary {
  border-bottom-color: rgba(29, 122, 83, .34);
  background: rgba(232, 246, 237, .97);
}

body.is-qualified .probability-panel {
  border-color: rgba(29, 122, 83, .52);
  background: linear-gradient(135deg, #ffffff 0, #dff7e8 100%);
}

.probability-panel[data-tone="eliminated"],
.probability-panel[data-tone="danger"] {
  border-color: rgba(199, 72, 72, .3);
  background: linear-gradient(135deg, #ffffff 0, var(--red-soft) 100%);
}

body.is-eliminated .sticky-summary {
  border-bottom-color: rgba(199, 72, 72, .34);
  background: rgba(255, 239, 239, .97);
}

body.is-eliminated .probability-panel {
  border-color: rgba(199, 72, 72, .56);
  background: linear-gradient(135deg, #ffffff 0, #ffe0e0 100%);
  animation: eliminationPanelPulse 1200ms ease both;
}

body.is-eliminated .probability-copy span {
  color: #a73434;
}

.probability-panel[data-tone="tie"],
.probability-panel[data-tone="watch"] {
  border-color: rgba(210, 139, 22, .3);
  background: linear-gradient(135deg, #ffffff 0, var(--yellow-soft) 100%);
}

.probability-panel.is-simulation {
  border-color: rgba(49, 93, 155, .48);
  box-shadow: inset 0 0 0 2px rgba(49, 93, 155, .12), 0 18px 36px rgba(18, 24, 32, .14);
}

body.is-simulation-active .sticky-summary {
  box-shadow: 0 10px 26px rgba(18, 24, 32, .12);
}

.probability-copy strong {
  display: block;
  margin-top: 3px;
  font-size: 52px;
  line-height: 1;
  letter-spacing: 0;
}

.probability-copy span {
  display: block;
  margin-top: 7px;
  font-size: 19px;
  font-weight: 900;
}

.probability-copy p {
  margin-top: 6px;
  color: #46535f;
}

.probability-meter {
  position: relative;
  width: 88px;
  height: 88px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: conic-gradient(var(--green) var(--meter, 22%), #edf1ef 0);
}

.probability-meter::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: #fff;
}

.probability-meter span {
  display: none;
}

.stat-panel {
  display: grid;
  align-content: center;
  min-height: 138px;
  padding: 16px;
}

.stat-panel strong {
  display: block;
  margin-top: 6px;
  font-size: 30px;
  line-height: 1.05;
}

.stat-panel p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.section-block {
  margin-top: 22px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.section-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

h2 {
  margin-top: 2px;
  font-size: 24px;
  letter-spacing: 0;
}

.icon-button {
  width: 40px;
  padding: 0;
  cursor: pointer;
}

.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  cursor: pointer;
}

.updated-at {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.condition-section {
  padding: 16px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(29, 122, 83, .26), rgba(16, 24, 32, .98) 44%),
    #101820;
  color: #f7fbff;
  box-shadow: var(--shadow);
}

.condition-section .eyebrow,
.condition-section .updated-at {
  color: var(--yellow);
}

.condition-progress {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(140px, 240px);
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .08);
}

.condition-progress strong {
  color: #54e08f;
  font-size: 28px;
  line-height: 1;
}

.condition-progress span {
  color: rgba(255, 255, 255, .88);
  font-size: 14px;
  font-weight: 900;
}

.condition-meter {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  overflow: hidden;
}

.condition-meter i {
  display: block;
  width: var(--condition-fill, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #54e08f, var(--yellow));
}

.condition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 10px;
}

.condition-card {
  position: relative;
  display: grid;
  gap: 9px;
  min-height: 196px;
  padding: 12px;
  border-color: rgba(255, 255, 255, .14);
  background: #f9fbff;
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
  overflow: hidden;
}

.condition-card.essential {
  border-color: rgba(84, 224, 143, .52);
}

.condition-card.conditional {
  border-color: rgba(255, 223, 93, .48);
}

.condition-card.is-simulated {
  border-color: rgba(49, 93, 155, .56);
  background: linear-gradient(180deg, #ffffff 0, #f4f8ff 100%);
}

.condition-card[data-judge="good"] {
  box-shadow: inset 0 0 0 2px rgba(29, 122, 83, .22), 0 12px 28px rgba(0, 0, 0, .22);
}

.condition-card[data-judge="bad"] {
  box-shadow: inset 0 0 0 2px rgba(199, 72, 72, .18), 0 12px 28px rgba(0, 0, 0, .22);
}

.condition-card.is-past {
  opacity: .6;
  filter: grayscale(.45);
}

.condition-card.is-past::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 20, .22);
  pointer-events: none;
}

.condition-dim-label {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(16, 24, 32, .84);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

.condition-card-head,
.condition-card-foot,
.condition-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.condition-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 28px;
  border-radius: 999px;
  background: #101820;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.match-kind,
.judge-pill,
.ranking-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f7faf8;
  color: #3b4650;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.match-kind {
  border-color: rgba(29, 122, 83, .28);
  background: var(--green-soft);
  color: var(--green);
}

.match-kind.conditional {
  border-color: rgba(210, 139, 22, .32);
  background: var(--yellow-soft);
  color: #8b6500;
}

.condition-teams {
  align-items: stretch;
}

.team-chip {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-width: 0;
  width: 44%;
  min-height: 74px;
  padding: 8px 6px;
  border: 1px solid #e1e9e5;
  border-radius: var(--radius);
  background: #ffffff;
  text-align: center;
}

.team-chip span {
  font-size: 22px;
  line-height: 1;
}

.team-chip strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-chip em,
.ranking-team em,
.completed-chip em {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.condition-vs {
  display: inline-flex;
  align-items: center;
  color: #6e7b86;
  font-size: 11px;
  font-weight: 950;
}

.condition-want {
  min-height: 30px;
  color: #101820;
  font-size: 18px;
  line-height: 1.14;
}

.score-sim {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #e1e9e5;
  border-radius: var(--radius);
  background: #f7faf8;
}

.score-box {
  display: grid;
  gap: 5px;
  min-width: 0;
  text-align: center;
}

.score-box > span {
  overflow: hidden;
  color: #53616d;
  font-size: 11px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-stepper {
  display: grid;
  grid-template-columns: 28px minmax(28px, 1fr) 28px;
  align-items: center;
  min-height: 30px;
  border: 1px solid #d8e3dc;
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
}

.score-stepper button,
.match-reset {
  border: 0;
  background: transparent;
  color: #26313c;
  font-weight: 950;
  cursor: pointer;
}

.score-stepper button {
  min-width: 28px;
  min-height: 30px;
  font-size: 16px;
}

.score-stepper button:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.score-stepper button:disabled {
  background: #eef2f1;
  color: #a9b4b0;
  cursor: not-allowed;
}

.score-stepper button:disabled:hover {
  background: #eef2f1;
  color: #a9b4b0;
}

.score-stepper strong {
  min-width: 0;
  font-size: 18px;
  line-height: 1;
}

.match-reset {
  min-width: 42px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid #d8e3dc;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  font-size: 11px;
}

.match-reset:hover {
  border-color: rgba(49, 93, 155, .36);
  color: var(--blue);
}

.outcome-list {
  display: grid;
  gap: 4px;
  padding: 7px;
  border-radius: var(--radius);
  background: #f1f5f3;
}

.outcome-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 6px;
  border-radius: 6px;
  background: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.outcome-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outcome-row strong {
  color: #101820;
}

.outcome-row em {
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--muted);
  font-style: normal;
  white-space: nowrap;
}

.outcome-row[data-tone="good"] em {
  background: var(--green-soft);
  color: var(--green);
}

.outcome-row[data-tone="bad"] em {
  background: var(--red-soft);
  color: var(--red);
}

.outcome-row[data-tone="mixed"] em {
  background: var(--yellow-soft);
  color: #8b6500;
}

.condition-card p {
  color: #4b5964;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.condition-card-foot {
  align-self: end;
  padding-top: 8px;
  border-top: 1px solid #e8eeeb;
}

.condition-card-foot span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.judge-pill.good {
  border-color: rgba(29, 122, 83, .3);
  background: var(--green-soft);
  color: var(--green);
}

.judge-pill.bad {
  border-color: rgba(199, 72, 72, .28);
  background: var(--red-soft);
  color: var(--red);
}

.judge-pill.tie {
  border-color: rgba(210, 139, 22, .32);
  background: var(--yellow-soft);
  color: #8b6500;
}

.completed-strip {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .07);
}

.completed-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, .88);
  font-size: 13px;
  font-weight: 900;
}

.completed-chip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.completed-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  background: rgba(9, 16, 22, .68);
  color: rgba(255, 255, 255, .78);
  filter: grayscale(.22);
}

.completed-chip strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.completed-chip span,
.completed-chip b {
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.completed-chip.good {
  border-color: rgba(84, 224, 143, .34);
}

.completed-chip.good b {
  color: #7ef0aa;
}

.completed-chip.bad {
  border-color: rgba(255, 139, 126, .28);
}

.completed-chip.bad b {
  color: #ffb1a6;
}

.ranking-table-wrap {
  overflow-x: auto;
}

.ranking-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e8eeeb;
  text-align: left;
  white-space: nowrap;
}

.ranking-table th {
  color: #55636f;
  font-size: 12px;
}

.ranking-table tr.is-korea {
  background: #fff7ce;
  font-weight: 900;
}

.ranking-table tr.is-confirmed {
  background: #edf9f1;
}

.ranking-table tr.is-advance td:first-child {
  color: var(--green);
  font-weight: 900;
}

.ranking-status {
  min-width: 74px;
}

.ranking-status.confirmed {
  border-color: rgba(29, 122, 83, .32);
  background: var(--green-soft);
  color: var(--green);
}

.ranking-status.advance-zone {
  border-color: rgba(49, 93, 155, .26);
  background: var(--blue-soft);
  color: var(--blue);
}

.ranking-status.out-zone {
  border-color: rgba(199, 72, 72, .22);
  background: var(--red-soft);
  color: var(--red);
}

.ranking-team {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ranking-team strong {
  font-weight: inherit;
}

body.has-guide-modal {
  overflow: hidden;
}

.guide-modal[hidden] {
  display: none;
}

.guide-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(9, 16, 22, .58);
}

.guide-dialog {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .3);
}

.guide-dialog h2 {
  margin-top: 4px;
  font-size: 26px;
  line-height: 1.18;
}

.guide-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: #26313c;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}

.guide-copy {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: #46535f;
  font-size: 14px;
  font-weight: 750;
}

.guide-recommend {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid rgba(29, 122, 83, .2);
  border-radius: var(--radius);
  background: var(--green-soft);
  color: #22312a;
}

.guide-recommend strong {
  color: var(--green);
  font-size: 13px;
  font-weight: 950;
}

.guide-recommend ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.guide-recommend li {
  padding-left: 2px;
}

.guide-primary {
  width: 100%;
  min-height: 42px;
  margin-top: 18px;
  border: 0;
  border-radius: var(--radius);
  background: #101820;
  color: #ffffff;
  font-weight: 950;
  cursor: pointer;
}

.fanfare-toast[hidden],
.elimination-toast[hidden] {
  display: none;
}

.fanfare-toast,
.elimination-toast {
  position: fixed;
  left: 50%;
  top: 92px;
  z-index: 120;
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: min(360px, calc(100% - 32px));
  padding: 14px 18px;
  border: 1px solid rgba(29, 122, 83, .42);
  border-radius: var(--radius);
  background: #101820;
  color: #ffffff;
  box-shadow: 0 20px 46px rgba(18, 24, 32, .24);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -16px) scale(.96);
}

.elimination-toast {
  border-color: rgba(199, 72, 72, .56);
  background: #18191d;
  box-shadow: 0 20px 46px rgba(104, 27, 27, .28);
}

.fanfare-toast.is-visible {
  animation: fanfarePop 2600ms ease both;
}

.elimination-toast.is-visible {
  animation: eliminationDrop 2400ms ease both;
}

.fanfare-toast strong,
.elimination-toast strong {
  color: var(--yellow);
  font-size: 24px;
  line-height: 1;
}

.elimination-toast strong {
  color: #ff8b7e;
  font-size: 30px;
}

.fanfare-toast span,
.elimination-toast span {
  font-size: 14px;
  font-weight: 900;
}

.fanfare-toast::before,
.fanfare-toast::after {
  content: "";
  position: absolute;
  top: 11px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--yellow) 0 13%, transparent 14%),
    conic-gradient(from 0deg, #54e08f, transparent 20%, #ffdf5d 32%, transparent 46%, #7bb3ff 58%, transparent 72%, #ff8b7e 82%, transparent 100%);
}

.fanfare-toast::before {
  left: 14px;
}

.fanfare-toast::after {
  right: 14px;
}

.elimination-toast::before,
.elimination-toast::after {
  content: "";
  position: absolute;
  top: 26px;
  width: 46px;
  height: 8px;
  border-radius: 999px;
  background: #ff4f5e;
}

.elimination-toast::before {
  left: 18px;
  transform: rotate(45deg);
}

.elimination-toast::after {
  right: 18px;
  transform: rotate(-45deg);
}

@keyframes fanfarePop {
  0% {
    opacity: 0;
    transform: translate(-50%, -18px) scale(.94);
  }
  12% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1.02);
  }
  22%,
  78% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -8px) scale(.98);
  }
}

@keyframes eliminationDrop {
  0% {
    opacity: 0;
    transform: translate(-50%, -24px) scale(.96);
  }
  12% {
    opacity: 1;
    transform: translate(-50%, 2px) scale(1.04);
  }
  18% {
    transform: translate(-50%, -3px) scale(1);
  }
  26%,
  78% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 12px) scale(.98);
  }
}

@keyframes eliminationPanelPulse {
  0%,
  100% {
    transform: translateY(0);
  }
  22% {
    transform: translateY(2px);
  }
  44% {
    transform: translateY(-1px);
  }
}

@media (max-width: 1040px) {
  .command-board,
  .condition-progress {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(92px, 1fr));
  }

  .probability-panel {
    grid-template-columns: minmax(0, 1fr) 92px;
  }

  .sticky-summary {
    position: sticky;
    padding: 7px 16px;
    background: rgba(244, 247, 242, .97);
    backdrop-filter: blur(14px);
  }

  .completed-chip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header {
    padding: 12px 0;
  }

  .site-header nav {
    justify-content: stretch;
  }

  .site-header nav a {
    flex: 1 1 120px;
    justify-content: center;
  }

  h1 {
    font-size: 34px;
  }

  .headline,
  .clock-panel,
  .probability-panel,
  .stat-panel,
  .condition-section {
    padding: 14px;
  }

  .probability-panel {
    grid-template-columns: 1fr;
  }

  .sticky-summary {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .sticky-summary .probability-panel {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) 72px;
    min-height: 74px;
    padding: 10px;
  }

  .sticky-summary .stat-panel {
    display: none;
  }

  .sticky-summary .probability-copy strong {
    font-size: 32px;
  }

  .sticky-summary .probability-copy span {
    font-size: 14px;
  }

  .probability-meter {
    width: 100%;
    height: 14px;
    border-radius: 999px;
    background: #edf1ef;
  }

  .sticky-summary .probability-meter {
    width: 100%;
    height: 14px;
  }

  .probability-meter::after {
    display: none;
  }

  .probability-meter span {
    display: block;
    width: var(--meter, 22%);
    height: 100%;
    border-radius: inherit;
    background: var(--green);
  }

  .section-actions {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .condition-teams {
    gap: 6px;
  }

  .team-chip {
    width: 46%;
  }

  .completed-chip-grid {
    grid-template-columns: 1fr;
  }

  .completed-chip {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }

  .outcome-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .outcome-row em {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .guide-dialog h2 {
    font-size: 22px;
  }

  .fanfare-toast,
  .elimination-toast {
    top: 118px;
  }

  .fanfare-toast::before,
  .fanfare-toast::after,
  .elimination-toast::before,
  .elimination-toast::after {
    display: none;
  }
}
