:root {
  color-scheme: light dark;
  --bg: #f5f2ea;
  --surface: #fffdf8;
  --ink: #1c2430;
  --muted: #657084;
  --line: #ded7c9;
  --accent: #2f80ed;
  --shadow: 0 18px 48px rgb(35 42 54 / 14%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 80%), rgb(255 255 255 / 18%)),
    var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

button,
iframe {
  font: inherit;
}

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

.hero {
  display: grid;
  gap: 14px;
  min-height: 42vh;
  align-content: center;
  padding: 42px 0 32px;
}

.eyebrow {
  margin: 0;
  color: #8d4b28;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.hero-copy,
.game-header p,
.game-card p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.6;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.game-card {
  display: grid;
  gap: 18px;
  align-content: start;
  min-height: 280px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.game-card__preview {
  display: grid;
  width: 72px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 8px;
  background: #16324f;
  color: #fff8e8;
  font-weight: 900;
}

.button {
  display: inline-flex;
  width: fit-content;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.topbar {
  display: flex;
  min-height: 48px;
  align-items: center;
}

.topbar a {
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.game-header {
  display: grid;
  gap: 14px;
  padding: 36px 0 24px;
}

.game-header h1 {
  font-size: clamp(2.4rem, 7vw, 5.6rem);
}

.game-frame-wrap {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.game-frame-toolbar {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  background: #fffdf8;
  color: var(--ink);
  font-weight: 900;
}

.game-frame-toolbar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-fullscreen-button {
  flex: 0 0 auto;
}

.game-frame {
  display: block;
  width: 100%;
  min-height: clamp(620px, 78vh, 920px);
  border: 0;
  background: transparent;
}

.game-frame-wrap:fullscreen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
}

.game-frame-wrap:fullscreen .game-frame {
  height: 100% !important;
  min-height: 0;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.scenario-card {
  display: grid;
  gap: 18px;
  align-content: space-between;
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.scenario-card h2 {
  margin-bottom: 8px;
}

.scenario-card p {
  color: var(--muted);
  line-height: 1.55;
}

.scenario-card__meta,
.scenario-loading {
  margin: 0 0 8px;
  color: #8d4b28;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty-state {
  display: grid;
  min-height: 60vh;
  place-content: center;
  gap: 18px;
}

.embed-body {
  min-height: 0;
  background: transparent;
}

.embed-root {
  min-height: 100%;
  background: transparent;
}

.word-game {
  min-height: 320px;
  padding: 18px;
  background: transparent;
}

[data-background="solid"] .word-game {
  background: #fffdf8;
}

.word-game__panel {
  display: grid;
  gap: 18px;
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 28px;
  border: 1px solid rgb(28 36 48 / 14%);
  border-radius: 8px;
  background: rgb(255 253 248 / 88%);
}

.word-game__kicker {
  margin: 0;
  color: var(--game-accent, var(--accent));
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.word-game__answer {
  min-height: 56px;
  overflow-wrap: anywhere;
  color: #18202b;
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 900;
  line-height: 1;
}

.word-game__tiles {
  display: grid;
  grid-template-columns: repeat(7, minmax(36px, 1fr));
  gap: 8px;
}

.letter-tile {
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgb(28 36 48 / 18%);
  border-radius: 8px;
  background: #ffffff;
  color: #18202b;
  cursor: pointer;
  font-size: clamp(1.2rem, 5vw, 2rem);
  font-weight: 900;
}

.letter-tile:disabled {
  cursor: default;
  opacity: 0.34;
}

.word-game__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.text-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgb(28 36 48 / 18%);
  border-radius: 8px;
  background: #ffffff;
  color: #18202b;
  cursor: pointer;
  font-weight: 800;
}

.text-button--primary {
  border-color: var(--game-accent, var(--accent));
  background: var(--game-accent, var(--accent));
  color: #ffffff;
}

.icon-button {
  display: grid;
  width: 42px;
  min-width: 42px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgb(28 36 48 / 18%);
  border-radius: 8px;
  background: #ffffff;
  color: #18202b;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 900;
}

.threads-game {
  min-height: 520px;
  padding: 18px;
  background: transparent;
}

[data-background="solid"] .threads-game {
  background: #f7fbf8;
}

.threads-shell {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 18px;
  border: 1px solid rgb(28 36 48 / 14%);
  border-radius: 8px;
  background: rgb(255 255 255 / 92%);
}

.threads-header {
  display: flex;
  grid-column: 1 / -1;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
}

.threads-header h2,
.threads-lists h3 {
  margin: 0;
}

.threads-header p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.threads-stats {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  gap: 8px;
}

.threads-stats div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgb(28 36 48 / 12%);
  border-radius: 8px;
  background: #f4f7f5;
}

.threads-top-panel {
  display: contents;
  min-width: 0;
}

.threads-top-panel__main {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.threads-stats strong {
  color: #18202b;
  font-size: 1.35rem;
  line-height: 1;
}

.threads-stats span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.threads-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.4;
}

.threads-status.is-good {
  color: #08755b;
}

.threads-status.is-bad {
  color: #a73525;
}

.threads-current {
  grid-column: 1 / -1;
  min-height: 0;
  padding: 2px 0 0;
  border: 0;
  background: transparent;
  color: #18202b;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  overflow-wrap: anywhere;
}

.threads-board {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  border: 1px solid rgb(28 36 48 / 16%);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 68%), rgb(255 255 255 / 36%)),
    repeating-linear-gradient(45deg, rgb(28 36 48 / 10%) 0 2px, transparent 2px 16px),
    #f7fbf8;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 55%);
}

.threads-board--garden-sampler {
  background:
    radial-gradient(circle at 18% 28%, rgb(229 120 36 / 44%) 0 36px, transparent 37px),
    radial-gradient(circle at 74% 34%, rgb(216 96 138 / 42%) 0 44px, transparent 45px),
    radial-gradient(circle at 55% 76%, rgb(14 143 111 / 38%) 0 78px, transparent 79px),
    repeating-linear-gradient(30deg, rgb(87 138 58 / 20%) 0 4px, transparent 4px 22px),
    #edf7e9;
}

.threads-board--storm-sampler {
  background:
    linear-gradient(135deg, transparent 0 45%, rgb(255 241 191 / 72%) 46% 49%, transparent 50%),
    radial-gradient(circle at 32% 28%, rgb(47 128 237 / 36%) 0 86px, transparent 87px),
    radial-gradient(circle at 78% 68%, rgb(32 156 181 / 34%) 0 96px, transparent 97px),
    repeating-linear-gradient(90deg, rgb(79 96 173 / 18%) 0 3px, transparent 3px 20px),
    #eaf1f8;
}

.threads-board--kitchen-sampler {
  background:
    radial-gradient(circle at 24% 30%, rgb(214 162 42 / 42%) 0 58px, transparent 59px),
    radial-gradient(circle at 72% 70%, rgb(172 91 59 / 36%) 0 72px, transparent 73px),
    repeating-linear-gradient(0deg, rgb(216 96 138 / 14%) 0 6px, transparent 6px 24px),
    repeating-linear-gradient(90deg, rgb(14 143 111 / 12%) 0 6px, transparent 6px 24px),
    #fff4df;
}

.threads-board--trust-sampler {
  background:
    linear-gradient(45deg, rgb(14 143 111 / 28%) 0 18%, transparent 18% 35%, rgb(47 128 237 / 22%) 35% 52%, transparent 52%),
    repeating-linear-gradient(135deg, rgb(28 36 48 / 12%) 0 3px, transparent 3px 18px),
    #edf6f4;
}

.threads-board--night-sampler {
  background:
    radial-gradient(circle at 18% 22%, rgb(255 241 191 / 80%) 0 18px, transparent 19px),
    radial-gradient(circle at 62% 36%, rgb(255 255 255 / 68%) 0 4px, transparent 5px),
    radial-gradient(circle at 78% 74%, rgb(126 87 194 / 44%) 0 92px, transparent 93px),
    repeating-linear-gradient(30deg, rgb(47 128 237 / 18%) 0 2px, transparent 2px 18px),
    #11182b;
}

.threads-cell {
  display: grid;
  position: absolute;
  width: 42px;
  height: 48px;
  min-width: 0;
  place-items: center;
  border: 0;
  clip-path: polygon(50% 0, 94% 25%, 94% 75%, 50% 100%, 6% 75%, 6% 25%);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 86%), rgb(255 255 255 / 74%));
  color: #18202b;
  cursor: pointer;
  font-size: 1.06rem;
  font-weight: 900;
  transform: translate(-21px, -24px);
  touch-action: none;
  transition:
    background 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.threads-cell::after {
  position: absolute;
  inset: 2px;
  content: "";
  clip-path: inherit;
  border: 1px solid rgb(28 36 48 / 22%);
  pointer-events: none;
}

.threads-cell:disabled {
  cursor: default;
  opacity: 0.45;
}

.threads-cell.is-special {
  background:
    linear-gradient(180deg, rgb(255 241 191 / 92%), rgb(255 255 255 / 74%));
  color: #4f3904;
}

.threads-cell.is-selected {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--game-accent, var(--accent)) 42%, white), rgb(255 255 255 / 64%));
  box-shadow: 0 8px 18px rgb(28 36 48 / 18%);
  transform: translate(-21px, -26px);
}

.threads-cell.is-found {
  background:
    linear-gradient(180deg, var(--word-fill), rgb(255 255 255 / 28%));
  color: #101820;
}

.threads-actions {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}

.threads-actions .text-button {
  flex: 1;
  width: 100%;
}

.threads-actions .text-button--primary {
  flex-basis: auto;
}

.threads-lists {
  grid-column: 1 / -1;
  display: block;
}

.threads-lists > div {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.threads-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
  min-height: 42px;
}

.threads-chip,
.threads-empty {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgb(28 36 48 / 14%);
  border-radius: 8px;
  background: #f4f7f5;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

button.threads-chip {
  cursor: pointer;
  font: inherit;
}

.threads-chip.is-found {
  border-color: rgb(28 36 48 / 16%);
  background: var(--word-fill);
  color: #101820;
}

.threads-chip.is-theme-word {
  font-weight: 1000;
}

.threads-chip.is-hinted {
  border-color: var(--game-accent, var(--accent));
  background: color-mix(in srgb, var(--game-accent, var(--accent)) 16%, white);
  color: #18202b;
}

.threads-chip.is-bonus {
  border-color: #d6a22a;
  background: #fff1bf;
  color: #4f3904;
}

.threads-detail {
  display: grid;
  min-height: 132px;
  gap: 8px;
  align-content: start;
  padding: 0;
  border: 0;
  background: transparent;
}

.threads-detail h3,
.threads-detail p {
  margin: 0;
}

.threads-detail p {
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 560px) {
  .site-shell {
    width: min(100% - 24px, 1120px);
  }

  .word-game {
    padding: 10px;
  }

  .word-game__panel {
    padding: 16px;
  }

  .threads-game {
    padding: 10px;
  }

  .threads-shell {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .threads-lists {
    grid-template-columns: 1fr;
  }
}

.resonance-game {
  min-height: 520px;
  padding: 18px;
  background: transparent;
}

[data-background="solid"] .resonance-game {
  background: #fffaf4;
}

.resonance-shell {
  display: grid;
  gap: 16px;
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 18px;
  border: 1px solid rgb(28 36 48 / 14%);
  border-radius: 8px;
  background: rgb(255 255 255 / 92%);
}

.resonance-header {
  display: flex;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
}

.resonance-header h2,
.resonance-header p,
.resonance-detail h3,
.resonance-detail p {
  margin: 0;
}

.resonance-header p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.5;
}

.resonance-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid rgb(28 36 48 / 10%);
  border-radius: 8px;
  background: #fffaf4;
}

.resonance-meter,
.resonance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.resonance-status {
  display: flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.4;
}

.resonance-status.is-good {
  color: #08755b;
}

.resonance-status.is-bad {
  color: #a73525;
}

.resonance-meter {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.resonance-meter span {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgb(28 36 48 / 12%);
  border-radius: 8px;
  background: #f8f4ef;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.resonance-solved {
  display: grid;
  gap: 8px;
}

.resonance-solved:empty {
  display: none;
}

.resonance-group {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgb(28 36 48 / 14%);
  border-radius: 8px;
  background: #fff1bf;
  color: #18202b;
  cursor: pointer;
  text-align: left;
}

.resonance-group span {
  color: rgb(28 36 48 / 72%);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.4;
}

.resonance-group.is-difficulty-2 {
  background: #d8eecf;
}

.resonance-group.is-difficulty-3 {
  background: #cde9f1;
}

.resonance-group.is-difficulty-4 {
  background: #ead7f2;
}

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

.resonance-card {
  container-type: inline-size;
  display: grid;
  min-width: 0;
  min-height: 86px;
  place-items: center;
  padding: 10px;
  border: 1px solid rgb(28 36 48 / 18%);
  border-radius: 8px;
  background: #f8f4ef;
  color: #18202b;
  cursor: pointer;
  font-weight: 900;
  text-align: center;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.resonance-card.is-selected {
  border-color: var(--game-accent, var(--accent));
  background: color-mix(in srgb, var(--game-accent, var(--accent)) 18%, white);
  transform: translateY(-1px);
}

.resonance-card.is-mistake {
  border-color: #a73525;
  background: #f8d6cf;
  animation: resonance-shake 220ms ease-in-out 2;
}

.resonance-card:disabled {
  cursor: default;
  opacity: 0.72;
}

.resonance-card__media {
  display: block;
  max-width: 100%;
  max-height: 52px;
  object-fit: contain;
}

.resonance-card__label {
  display: block;
  max-width: 100%;
  font-size: clamp(0.68rem, 9.5cqi, 1.02rem);
  font-weight: 900;
  line-height: 1.08;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.resonance-actions {
  justify-content: center;
}

.text-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.resonance-detail {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.resonance-detail p,
.resonance-detail li {
  color: var(--muted);
  line-height: 1.5;
}

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

.resonance-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.resonance-board.is-solution {
  grid-template-columns: 1fr;
}

.resonance-solution-group {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgb(28 36 48 / 14%);
  border-radius: 8px;
  background: #fff1bf;
  color: #18202b;
  animation: resonance-solution-rise 360ms ease-out both;
  animation-delay: calc(var(--solution-index) * 90ms);
}

.resonance-solution-group.is-difficulty-2 {
  background: #d8eecf;
}

.resonance-solution-group.is-difficulty-3 {
  background: #cde9f1;
}

.resonance-solution-group.is-difficulty-4 {
  background: #ead7f2;
}

.resonance-solution-group h3,
.resonance-solution-group p {
  margin: 0;
}

.resonance-solution-group p {
  color: rgb(28 36 48 / 72%);
  line-height: 1.45;
}

.resonance-solution-group > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.resonance-solution-card {
  container-type: inline-size;
  display: grid;
  min-height: 58px;
  place-items: center;
  padding: 8px;
  border: 1px solid rgb(28 36 48 / 12%);
  border-radius: 8px;
  background: rgb(255 255 255 / 55%);
}

@keyframes resonance-shake {
  0%,
  100% {
    transform: translateX(0);
  }

  35% {
    transform: translateX(-4px);
  }

  70% {
    transform: translateX(4px);
  }
}

@keyframes resonance-solution-rise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 560px) {
  .resonance-game {
    padding: 10px;
  }

  .resonance-shell {
    padding: 16px;
  }

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

  .resonance-status-row {
    grid-template-columns: 1fr;
  }

  .resonance-meter {
    justify-content: start;
  }

  .resonance-card {
    min-height: 76px;
  }

  .resonance-solution-group > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.degrees-game {
  min-height: 560px;
  padding: 18px;
  background: transparent;
}

[data-background="solid"] .degrees-game {
  background: #f7f8f3;
}

.degrees-shell {
  display: grid;
  gap: 16px;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 18px;
  border: 1px solid rgb(28 36 48 / 14%);
  border-radius: 8px;
  background: rgb(255 255 255 / 92%);
}

.degrees-header {
  display: flex;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
}

.degrees-header h2,
.degrees-header p,
.degrees-tray h3,
.degrees-detail h3,
.degrees-detail p {
  margin: 0;
}

.degrees-header p {
  max-width: 640px;
  color: var(--muted);
  line-height: 1.5;
}

.degrees-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid rgb(28 36 48 / 10%);
  border-radius: 8px;
  background: #f3f6ee;
}

.degrees-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.4;
}

.degrees-status.is-good {
  color: #08755b;
}

.degrees-status.is-bad {
  color: #a73525;
}

.degrees-meter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.degrees-meter span {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgb(28 36 48 / 12%);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

.degrees-board-wrap {
  min-width: 0;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgb(28 36 48 / 12%);
  border-radius: 8px;
  background: #f4f7f1;
}

.degrees-board {
  position: relative;
  margin: 0 auto;
}

.degrees-edges {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.degrees-edges line {
  stroke: #7b8e34;
  stroke-linecap: round;
  stroke-width: 5;
}

.degrees-edges text {
  paint-order: stroke;
  stroke: rgb(255 255 255 / 92%);
  stroke-linejoin: round;
  stroke-width: 5px;
  fill: #2f3b21;
  font-size: 0.72rem;
  font-weight: 900;
}

.degrees-edges .is-hinted line {
  stroke: #d6a22a;
  stroke-dasharray: 7 6;
}

.degrees-cell {
  container-type: inline-size;
  display: grid;
  position: absolute;
  width: 76px;
  height: 88px;
  min-width: 0;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #18202b;
  cursor: pointer;
  transform: translate(-38px, -44px);
  touch-action: none;
  transition:
    transform 140ms ease;
}

.degrees-cell::after {
  content: none;
}

.degrees-cell.is-open {
  background: transparent;
}

.degrees-cell.is-fixed {
  background: transparent;
  cursor: default;
}

.degrees-cell.is-closed {
  display: none;
}

.degrees-cell.is-selected {
  outline: 3px solid color-mix(in srgb, var(--game-accent, var(--accent)) 44%, transparent);
  outline-offset: 2px;
}

.degrees-cell.is-correct {
  background: #d8eecf;
}

.degrees-cell.is-incorrect {
  background: #f8d6cf;
}

.degrees-cell.is-missing {
  background: #fff1bf;
}

.degrees-cell__empty {
  width: 32px;
  aspect-ratio: 1;
  border: 2px dashed rgb(28 36 48 / 24%);
  border-radius: 8px;
}

.degrees-side {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.degrees-tray,
.degrees-detail {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.degrees-tray {
  min-height: 180px;
  padding: 12px;
  border: 1px solid rgb(28 36 48 / 12%);
  border-radius: 8px;
  background: #f8f9f4;
}

.degrees-tray__cards {
  display: grid;
  gap: 8px;
}

.degrees-card {
  container-type: inline-size;
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 54px;
  align-content: center;
  padding: 8px 10px;
  border: 1px solid rgb(28 36 48 / 16%);
  border-radius: 8px;
  background: #ffffff;
  color: #18202b;
  cursor: grab;
  text-align: center;
  user-select: none;
}

.degrees-card.is-selected {
  border-color: var(--game-accent, var(--accent));
  background: color-mix(in srgb, var(--game-accent, var(--accent)) 15%, white);
}

.degrees-card strong {
  display: block;
  max-width: 100%;
  font-size: clamp(0.68rem, 11cqi, 0.96rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.degrees-card span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.degrees-cell .degrees-card {
  width: 72px;
  min-height: 56px;
  padding: 6px;
  background: #ffffff;
}

.degrees-detail {
  padding: 2px 0;
}

.degrees-detail p {
  color: var(--muted);
  line-height: 1.5;
}

.degrees-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.degrees-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.4;
}

@media (max-width: 980px) {
  .degrees-game {
    padding: 10px;
  }

  .degrees-shell {
    padding: 16px;
  }

  .degrees-header,
  .degrees-status-row {
    grid-template-columns: 1fr;
  }

  .degrees-header {
    display: grid;
  }

  .degrees-meter {
    justify-content: start;
  }

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

  .degrees-side {
    order: -1;
  }

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

.fire-drill-game {
  min-height: 320px;
  padding: 18px;
  background: transparent;
}

[data-background="solid"] .fire-drill-game {
  background: #fffdf8;
}

.fire-drill-shell {
  display: grid;
  gap: 18px;
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 24px;
  border: 1px solid rgb(28 36 48 / 14%);
  border-radius: 8px;
  background: rgb(255 253 248 / 92%);
  color: #18202b;
}

.fire-drill-start,
.fire-drill-header {
  display: flex;
  gap: 18px;
  align-items: start;
  justify-content: space-between;
}

.fire-drill-start {
  display: grid;
}

.fire-drill-start h2,
.fire-drill-header h2 {
  margin-bottom: 8px;
  font-size: clamp(1.65rem, 5vw, 2.6rem);
  line-height: 1.02;
}

.fire-drill-start p,
.fire-drill-header p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.55;
}

.fire-drill-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.fire-drill-meta div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgb(28 36 48 / 12%);
  border-radius: 8px;
  background: #f8f4ef;
}

.fire-drill-meta dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.fire-drill-meta dd {
  margin: 4px 0 0;
  font-weight: 900;
}

.fire-drill-objectives,
.fire-drill-debrief,
.fire-drill-feedback,
.fire-drill-scenarios {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgb(28 36 48 / 12%);
  border-radius: 8px;
  background: #f8f4ef;
}

.fire-drill-objectives h3,
.fire-drill-debrief h3,
.fire-drill-map h3,
.fire-drill-scenarios h3 {
  margin: 0;
  font-size: 0.92rem;
  text-transform: uppercase;
}

.fire-drill-objectives ul,
.fire-drill-debrief ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.fire-drill-actions {
  display: flex;
  justify-content: start;
}

.fire-drill-scenarios > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.fire-drill-scenarios button {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 10px;
  border: 1px solid rgb(28 36 48 / 14%);
  border-radius: 8px;
  background: #ffffff;
  color: #18202b;
  cursor: pointer;
  text-align: left;
}

.fire-drill-scenarios button.is-selected {
  border-color: var(--game-accent, var(--accent));
  background: color-mix(in srgb, var(--game-accent, var(--accent)) 12%, white);
}

.fire-drill-scenarios strong,
.fire-drill-scenarios span {
  min-width: 0;
  line-height: 1.25;
}

.fire-drill-scenarios span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.fire-drill-layout {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.fire-drill-map {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgb(28 36 48 / 12%);
  border-radius: 8px;
  background: #f8f4ef;
}

.fire-drill-map ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fire-drill-map li {
  position: relative;
  min-width: 0;
  padding: 8px 8px 8px 24px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.25;
}

.fire-drill-map li::before {
  position: absolute;
  top: 12px;
  left: 8px;
  width: 8px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: rgb(28 36 48 / 22%);
  content: "";
}

.fire-drill-map li.is-visited {
  color: #18202b;
}

.fire-drill-map li.is-visited::before {
  background: var(--game-accent, var(--accent));
}

.fire-drill-map li.is-current {
  background: color-mix(in srgb, var(--game-accent, var(--accent)) 16%, white);
  color: #18202b;
}

.fire-drill-map li.is-ending::before {
  border-radius: 2px;
}

.fire-drill-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.fire-drill-meters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.fire-drill-meter {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgb(28 36 48 / 12%);
  border-radius: 8px;
  background: #ffffff;
}

.fire-drill-meter div {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.fire-drill-meter span {
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.2;
}

.fire-drill-meter strong {
  color: #18202b;
  font-size: 0.9rem;
}

.fire-drill-meter meter {
  width: 100%;
  height: 10px;
  accent-color: var(--game-accent, var(--accent));
}

.fire-drill-feedback {
  border-color: color-mix(in srgb, var(--game-accent, var(--accent)) 32%, white);
  background: color-mix(in srgb, var(--game-accent, var(--accent)) 10%, white);
}

.fire-drill-feedback strong {
  font-size: 0.78rem;
  text-transform: uppercase;
}

.fire-drill-feedback p {
  margin: 0;
  color: rgb(28 36 48 / 74%);
  line-height: 1.45;
}

.fire-drill-choices {
  display: grid;
  gap: 10px;
}

.fire-drill-choice {
  width: 100%;
  min-height: 58px;
  padding: 13px 14px;
  border: 1px solid rgb(28 36 48 / 16%);
  border-radius: 8px;
  background: #ffffff;
  color: #18202b;
  cursor: pointer;
  font-weight: 850;
  line-height: 1.35;
  text-align: left;
}

.fire-drill-choice:hover,
.fire-drill-choice:focus-visible {
  border-color: var(--game-accent, var(--accent));
  background: color-mix(in srgb, var(--game-accent, var(--accent)) 9%, white);
}

.fire-drill-status {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.fire-drill-status.is-good {
  color: #0f6f46;
}

.fire-drill-status.is-bad {
  color: #a73525;
}

@media (max-width: 700px) {
  .fire-drill-game {
    padding: 10px;
  }

  .fire-drill-shell {
    padding: 16px;
  }

  .fire-drill-header {
    display: grid;
  }

  .fire-drill-layout,
  .fire-drill-meta,
  .fire-drill-meters {
    grid-template-columns: 1fr;
  }
}

.rehearsal-game {
  min-height: 320px;
  padding: 18px;
  background: transparent;
}

[data-background="solid"] .rehearsal-game {
  background: #f7fbf8;
}

.rehearsal-shell {
  display: grid;
  gap: 18px;
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 24px;
  border: 1px solid rgb(28 36 48 / 14%);
  border-radius: 8px;
  background: rgb(255 255 255 / 92%);
  color: #18202b;
}

.rehearsal-start,
.rehearsal-header {
  display: flex;
  gap: 18px;
  align-items: start;
  justify-content: space-between;
}

.rehearsal-start {
  display: grid;
}

.rehearsal-start h2,
.rehearsal-header h2 {
  margin-bottom: 8px;
  font-size: clamp(1.65rem, 5vw, 2.7rem);
  line-height: 1.02;
}

.rehearsal-start p,
.rehearsal-header p {
  max-width: 700px;
  color: var(--muted);
  line-height: 1.55;
}

.rehearsal-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.rehearsal-meta div,
.rehearsal-panel,
.rehearsal-feedback,
.rehearsal-scenarios,
.rehearsal-map {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgb(28 36 48 / 12%);
  border-radius: 8px;
  background: #f3f8f5;
}

.rehearsal-meta dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rehearsal-meta dd {
  margin: 4px 0 0;
  font-weight: 900;
}

.rehearsal-panel,
.rehearsal-scenarios,
.rehearsal-map,
.rehearsal-main {
  display: grid;
  gap: 10px;
}

.rehearsal-panel h3,
.rehearsal-scenarios h3,
.rehearsal-map h3 {
  margin: 0;
  font-size: 0.92rem;
  text-transform: uppercase;
}

.rehearsal-panel ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.rehearsal-actions {
  display: flex;
  justify-content: start;
}

.rehearsal-scenarios > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.rehearsal-scenarios button {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 10px;
  border: 1px solid rgb(28 36 48 / 14%);
  border-radius: 8px;
  background: #ffffff;
  color: #18202b;
  cursor: pointer;
  text-align: left;
}

.rehearsal-scenarios button.is-selected {
  border-color: var(--game-accent, var(--accent));
  background: color-mix(in srgb, var(--game-accent, var(--accent)) 12%, white);
}

.rehearsal-scenarios span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
}

.rehearsal-layout {
  display: grid;
  grid-template-columns: minmax(160px, 230px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.rehearsal-map ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rehearsal-map li {
  position: relative;
  min-width: 0;
  padding: 8px 8px 8px 24px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.25;
}

.rehearsal-map li::before {
  position: absolute;
  top: 12px;
  left: 8px;
  width: 8px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: rgb(28 36 48 / 22%);
  content: "";
}

.rehearsal-map li.is-visited {
  color: #18202b;
}

.rehearsal-map li.is-visited::before {
  background: var(--game-accent, var(--accent));
}

.rehearsal-map li.is-current {
  background: color-mix(in srgb, var(--game-accent, var(--accent)) 16%, white);
  color: #18202b;
}

.rehearsal-map li.is-ending::before {
  border-radius: 2px;
}

.rehearsal-meters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rehearsal-meter {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgb(28 36 48 / 12%);
  border-radius: 8px;
  background: #ffffff;
}

.rehearsal-meter div {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.rehearsal-meter span {
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.2;
}

.rehearsal-meter meter {
  width: 100%;
  height: 10px;
  accent-color: var(--game-accent, var(--accent));
}

.rehearsal-feedback {
  border-color: color-mix(in srgb, var(--game-accent, var(--accent)) 32%, white);
  background: color-mix(in srgb, var(--game-accent, var(--accent)) 10%, white);
}

.rehearsal-feedback strong {
  font-size: 0.78rem;
  text-transform: uppercase;
}

.rehearsal-feedback p {
  margin: 0;
  color: rgb(28 36 48 / 74%);
  line-height: 1.45;
}

.rehearsal-choices {
  display: grid;
  gap: 10px;
}

.rehearsal-choice {
  width: 100%;
  min-height: 58px;
  padding: 13px 14px;
  border: 1px solid rgb(28 36 48 / 16%);
  border-radius: 8px;
  background: #ffffff;
  color: #18202b;
  cursor: pointer;
  font-weight: 850;
  line-height: 1.35;
  text-align: left;
}

.rehearsal-choice:hover,
.rehearsal-choice:focus-visible {
  border-color: var(--game-accent, var(--accent));
  background: color-mix(in srgb, var(--game-accent, var(--accent)) 9%, white);
}

.rehearsal-status {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.rehearsal-status.is-good {
  color: #0f6f46;
}

.rehearsal-status.is-bad {
  color: #a73525;
}

@media (max-width: 700px) {
  .rehearsal-game {
    padding: 10px;
  }

  .rehearsal-shell {
    padding: 16px;
  }

  .rehearsal-header {
    display: grid;
  }

  .rehearsal-layout,
  .rehearsal-meta,
  .rehearsal-meters {
    grid-template-columns: 1fr;
  }
}

.sniff-test-game {
  min-height: 320px;
  padding: 18px;
  background: transparent;
}

[data-background="solid"] .sniff-test-game {
  background: #fffdf5;
}

.sniff-test-shell {
  display: grid;
  gap: 18px;
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 24px;
  border: 1px solid rgb(28 36 48 / 14%);
  border-radius: 8px;
  background: rgb(255 255 255 / 94%);
  color: #18202b;
}

.sniff-test-header {
  display: flex;
  gap: 18px;
  align-items: start;
  justify-content: space-between;
}

.sniff-test-header h2 {
  margin-bottom: 8px;
  font-size: clamp(1.65rem, 5vw, 2.7rem);
  line-height: 1.02;
}

.sniff-test-header p,
.sniff-test-scenario p,
.sniff-test-result p {
  color: var(--muted);
  line-height: 1.5;
}

.sniff-test-scenario,
.sniff-test-settings,
.sniff-test-controls,
.sniff-test-smells,
.sniff-test-result {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgb(28 36 48 / 12%);
  border-radius: 8px;
  background: #fbf6e9;
}

.sniff-test-scenario h3,
.sniff-test-control-group h3,
.sniff-test-smells h3,
.sniff-test-result h3,
.sniff-test-result h4 {
  margin: 0;
}

.sniff-test-smells > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.sniff-test-scenario {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.8fr);
}

.sniff-test-scenario ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.sniff-test-scenario blockquote {
  display: grid;
  min-height: 120px;
  align-content: center;
  margin: 0;
  padding: 16px;
  border-left: 5px solid var(--game-accent, var(--accent));
  border-radius: 8px;
  background: #ffffff;
  color: #18202b;
  font-size: 1.1rem;
  font-weight: 850;
  line-height: 1.4;
}

.sniff-test-settings {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sniff-test-settings div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sniff-test-settings span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sniff-test-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sniff-test-control-group {
  display: grid;
  gap: 8px;
}

.sniff-test-control-group label,
.sniff-test-smell {
  display: flex;
  gap: 8px;
  align-items: start;
  min-width: 0;
  min-height: 46px;
  padding: 10px;
  border: 1px solid rgb(28 36 48 / 14%);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.25;
}

.sniff-test-control-group label.is-selected,
.sniff-test-smell.is-selected {
  border-color: var(--game-accent, var(--accent));
  background: color-mix(in srgb, var(--game-accent, var(--accent)) 12%, white);
}

.sniff-test-actions {
  display: flex;
  justify-content: start;
}

.sniff-test-result {
  background: #ffffff;
}

.sniff-test-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sniff-test-result article,
.sniff-test-feedback-list > div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgb(28 36 48 / 12%);
  border-radius: 8px;
  background: #fbf6e9;
}

.sniff-test-result .is-good {
  color: #0f6f46;
  font-weight: 900;
}

.sniff-test-result .is-bad {
  color: #a73525;
  font-weight: 900;
}

.sniff-test-feedback-list {
  display: grid;
  gap: 10px;
}

.sniff-test-feedback-list p {
  margin: 0;
}

.sniff-test-status {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.sniff-test-status.is-good {
  color: #0f6f46;
}

.sniff-test-status.is-bad {
  color: #a73525;
}

@media (max-width: 760px) {
  .sniff-test-game {
    padding: 10px;
  }

  .sniff-test-shell {
    padding: 16px;
  }

  .sniff-test-header,
  .sniff-test-scenario,
  .sniff-test-settings,
  .sniff-test-controls,
  .sniff-test-result-grid {
    grid-template-columns: 1fr;
  }

  .sniff-test-header {
    display: grid;
  }
}

.context-gobbler-game {
  min-height: 100vh;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgb(45 111 95 / 14%), transparent 32rem),
    linear-gradient(180deg, #f8fbf7, #eef3f1);
  color: #17212a;
}

.context-gobbler-shell {
  display: grid;
  gap: 16px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.context-gobbler-start,
.context-gobbler-header,
.context-gobbler-teaching {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid #cfdad3;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 14px 34px rgb(31 42 54 / 10%);
}

.context-gobbler-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.context-gobbler-start h2,
.context-gobbler-header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1;
}

.context-gobbler-start p,
.context-gobbler-header p,
.context-gobbler-teaching p {
  max-width: 780px;
  margin: 0;
  color: #526070;
  line-height: 1.55;
}

.context-gobbler-briefing,
.context-gobbler-results,
.context-gobbler-hud {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.context-gobbler-briefing div,
.context-gobbler-results div,
.context-gobbler-stat,
.context-gobbler-meter {
  display: grid;
  gap: 6px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid #d7dfda;
  border-radius: 8px;
  background: #ffffff;
}

.context-gobbler-briefing strong,
.context-gobbler-results strong,
.context-gobbler-stat strong {
  color: #182332;
  font-size: 1.35rem;
}

.context-gobbler-briefing span,
.context-gobbler-results span,
.context-gobbler-stat span {
  color: #5f6976;
  font-size: 0.9rem;
  line-height: 1.35;
}

.context-gobbler-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.context-gobbler-meter div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.context-gobbler-meter strong,
.context-gobbler-meter span {
  font-size: 0.9rem;
}

.context-gobbler-meter meter {
  width: 100%;
  height: 12px;
}

.context-gobbler-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.context-gobbler-status {
  margin: 0;
  color: #526070;
  font-weight: 800;
}

.context-gobbler-status.is-good {
  color: #20745d;
}

.context-gobbler-status.is-bad {
  color: #a93737;
}

.context-gobbler-gate {
  padding: 6px 10px;
  border: 1px solid #d1d8dc;
  border-radius: 999px;
  background: #f8fafc;
  color: #526070;
  font-size: 0.86rem;
  font-weight: 900;
}

.context-gobbler-gate.is-open {
  border-color: #95c7b1;
  background: #e7f6ee;
  color: #1f6b55;
}

.context-gobbler-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 280px);
  gap: 14px;
  align-items: start;
}

.context-gobbler-board-wrap {
  overflow: auto;
  padding: 10px;
  border: 1px solid #cfdad3;
  border-radius: 8px;
  background: #101820;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 8%);
}

.context-gobbler-board {
  display: grid;
  gap: 3px;
  width: min(100%, 820px);
  min-width: 620px;
  margin: 0 auto;
}

.context-gobbler-cell {
  display: grid;
  aspect-ratio: 1;
  min-width: 0;
  place-items: center;
  border-radius: 4px;
  background: #182535;
  color: #f8fbf7;
  font-size: clamp(0.72rem, 1.8vw, 1rem);
  font-weight: 950;
  line-height: 1;
}

.context-gobbler-cell.is-wall {
  background: #41505f;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%);
}

.context-gobbler-cell.is-grounded {
  background: #1f755f;
}

.context-gobbler-cell.is-weak {
  background: #8f7d2f;
}

.context-gobbler-cell.is-ambiguous {
  background: #5d568d;
}

.context-gobbler-cell.is-junk {
  background: #8a4d39;
}

.context-gobbler-cell.is-corrupted {
  background: #a73755;
}

.context-gobbler-cell.is-power {
  background: #e5f2f0;
  color: #14312c;
}

.context-gobbler-cell.is-gate {
  background: #283346;
  color: #b8c2ce;
}

.context-gobbler-cell.is-gate.is-open {
  background: #dff4e8;
  color: #155842;
}

.context-gobbler-cell.is-empty,
.context-gobbler-cell.is-collected {
  background: #13202d;
  color: transparent;
}

.context-gobbler-side {
  display: grid;
  gap: 12px;
}

.context-gobbler-side section {
  padding: 14px;
  border: 1px solid #d7dfda;
  border-radius: 8px;
  background: #fffdf8;
}

.context-gobbler-side h3,
.context-gobbler-teaching h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.context-gobbler-side p {
  margin: 0;
  color: #526070;
  line-height: 1.45;
}

.context-gobbler-legend {
  display: grid;
  gap: 8px;
  margin: 0;
}

.context-gobbler-legend div,
.context-gobbler-debug dl div {
  display: grid;
  gap: 2px;
}

.context-gobbler-legend dt,
.context-gobbler-debug dt {
  color: #17212a;
  font-weight: 900;
}

.context-gobbler-legend dd,
.context-gobbler-debug dd {
  margin: 0;
  color: #5f6976;
}

.context-gobbler-debug {
  max-height: 420px;
  overflow: auto;
  background: #17212a !important;
  color: #eef3f1;
}

.context-gobbler-debug h3,
.context-gobbler-debug dt {
  color: #ffffff;
}

.context-gobbler-debug dd,
.context-gobbler-debug li {
  color: #cbd5df;
  font-size: 0.84rem;
}

.context-gobbler-debug ol {
  display: grid;
  gap: 5px;
  margin: 12px 0 0;
  padding-left: 18px;
}

@media (max-width: 860px) {
  .context-gobbler-game {
    padding: 10px;
  }

  .context-gobbler-header,
  .context-gobbler-layout {
    grid-template-columns: 1fr;
  }

  .context-gobbler-actions {
    justify-content: flex-start;
  }

  .context-gobbler-board {
    min-width: 560px;
  }
}
