:root {
  --ink: #182019;
  --muted: #5e675d;
  --paper: #fbf7ef;
  --panel: #fffdf8;
  --line: #ded3c2;
  --copper: #c86d3f;
  --blue: #3d76b8;
  --green: #5f9462;
  --steel: #737b82;
  --gold: #e5b74f;
  --shadow: 0 18px 46px rgba(55, 45, 31, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(61, 118, 184, 0.12), transparent 34%),
    linear-gradient(220deg, rgba(95, 148, 98, 0.14), transparent 30%),
    var(--paper);
}

button {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 34px;
}

.top-links {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.top-links a,
button {
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--gold);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.secondary {
  background: #ffffff;
}

.hero {
  margin: 14px 0 18px;
}

.eyebrow,
.label,
.ticket-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 4px 0 6px;
  font-size: clamp(2.2rem, 7vw, 5.2rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin: 2px 0 0;
  font-size: 1.1rem;
}

.lede {
  max-width: 680px;
  margin: 0;
  color: #3e463d;
  font-size: 1.05rem;
  line-height: 1.5;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
}

.scoreboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 16px;
}

.scoreboard div {
  padding: 14px;
  background: var(--panel);
}

.scoreboard strong {
  display: block;
  margin-top: 4px;
  font-size: 1.55rem;
}

.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.kitchen-panel,
.order-panel {
  padding: 16px;
}

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

.kitchen {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 14px;
  min-height: 430px;
}

.burner {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 196px;
  padding: 18px;
  border-radius: 8px;
  background: #272b29;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  transition: transform 130ms ease, filter 130ms ease;
}

.burner::before {
  content: "";
  position: absolute;
  width: 58%;
  aspect-ratio: 1;
  border: 12px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  z-index: -1;
}

.burner .flame {
  position: absolute;
  inset: auto 18% 18% 18%;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.burner .pan {
  width: min(150px, 72%);
  aspect-ratio: 1.18;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.26);
}

.burner-a {
  background: linear-gradient(145deg, #8e442d, var(--copper));
}

.burner-b {
  background: linear-gradient(145deg, #244e83, var(--blue));
}

.burner-c {
  background: linear-gradient(145deg, #345f3a, var(--green));
}

.burner-d {
  background: linear-gradient(145deg, #4d555a, var(--steel));
}

.burner.lit {
  transform: translateY(-3px) scale(1.015);
  filter: saturate(1.25) brightness(1.14);
}

.burner.lit .flame {
  background: #ffd465;
  box-shadow: 0 0 28px rgba(255, 212, 101, 0.9);
}

.burner.correct {
  outline: 4px solid #f0d76d;
}

.burner.wrong {
  outline: 4px solid #e04d43;
}

.message {
  min-height: 48px;
  margin: 14px 0 0;
  color: #313a31;
  line-height: 1.45;
}

.progress {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  min-height: 42px;
  margin-bottom: 14px;
}

.pip {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eee4d3;
}

.pip.done {
  background: var(--gold);
  border-color: var(--ink);
}

.ticket {
  padding: 14px;
  border: 1px dashed #b9aa93;
  border-radius: 8px;
  background: #fff9e9;
}

.ticket strong {
  display: block;
  margin-top: 5px;
  font-size: 1.12rem;
  line-height: 1.35;
}

.full {
  width: 100%;
  margin-top: 14px;
}

@media (max-width: 820px) {
  .scoreboard {
    grid-template-columns: repeat(2, 1fr);
  }

  .play-layout {
    grid-template-columns: 1fr;
  }

  .kitchen {
    min-height: auto;
  }
}

@media (max-width: 540px) {
  .shell {
    width: min(100% - 18px, 1120px);
    padding-top: 12px;
  }

  .top-links {
    flex-wrap: wrap;
  }

  .kitchen {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .burner {
    min-height: 142px;
    padding: 10px;
  }

  .burner .pan {
    width: 84%;
    font-size: 0.88rem;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading button {
    width: 100%;
  }
}
