@font-face {
  font-family: "Euclid Circular A";
  src: url("/fonts/EuclidCircularA-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Euclid Circular A";
  src: url("/fonts/EuclidCircularA-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Euclid Circular A";
  src: url("/fonts/EuclidCircularA-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Euclid Circular A";
  src: url("/fonts/EuclidCircularA-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --coral: #ff315f;
  --coral-dark: #d91645;
  --ink: #262424;
  --muted: #797374;
  --line: #e8e1e2;
  --paper: #ffffff;
  --pink-wash: #fff2f4;
  --cream: #fff7e6;
  --mint: #eaf7f2;
  --green: #176b63;
  --blue: #2979ff;
  --yellow: #f4b400;
  --danger: #b81d3f;
  --shadow: 0 14px 40px rgba(61, 30, 39, 0.09);
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #fffafb;
  color: var(--ink);
  font-family: "Euclid Circular A", Arial, sans-serif;
  letter-spacing: 0;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #fffafb;
}

button,
input,
textarea,
select {
  min-width: 0;
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

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

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
  overflow-wrap: anywhere;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4.5vw, 4.35rem);
  line-height: 1.02;
  font-weight: 700;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.15;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.12rem;
  line-height: 1.25;
}

p,
li,
label,
button,
input,
textarea,
select {
  font-size: 1rem;
  line-height: 1.45;
}

ul,
ol {
  margin: 0;
  padding-left: 22px;
}

.app-shell {
  min-height: 100vh;
}

.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px max(20px, calc((100vw - var(--content)) / 2));
  border-bottom: 1px solid rgba(232, 225, 226, 0.9);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.brand-lockup,
.brand-lockup > div,
.header-status,
.team-chip,
.control-banner,
.control-banner > span,
.section-heading,
.section-heading > div,
.team-review-head,
.team-review-head > div,
.answer-meta,
.review-actions,
.artifact-review-head,
.winner-row,
.timer-controls,
.music-controls,
.game-code-row,
.trainer-tabs,
.editor-toolbar,
.editor-toolbar > div {
  display: flex;
  align-items: center;
}

.brand-lockup {
  min-width: 0;
  gap: 12px;
}

.brand-mark {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: inset 0 0 0 8px #fff, 0 0 0 2px var(--coral);
}

.brand-lockup > div {
  align-items: flex-start;
  flex-direction: column;
  min-width: 0;
}

.brand-lockup b {
  font-size: 1rem;
  line-height: 1.2;
}

.brand-lockup span:last-child {
  max-width: 300px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.team-chip,
.phase-chip,
.timer-chip,
.status-pill,
.section-counter,
.review-count,
.waiting-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  white-space: nowrap;
}

.team-chip {
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid color-mix(in srgb, var(--team-color) 35%, white);
  background: color-mix(in srgb, var(--team-color) 10%, white);
  font-size: 0.82rem;
  font-weight: 600;
}

.phase-chip,
.timer-chip {
  padding: 5px 11px;
  background: #f5f2f2;
  color: #5e595a;
  font-size: 0.82rem;
  font-weight: 600;
}

.timer-chip {
  min-width: 66px;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.timer-chip.running {
  background: #e8f6ef;
  color: #126244;
}

.timer-chip.expired {
  background: #ffe6eb;
  color: var(--danger);
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.btn.primary {
  border-color: var(--coral);
  background: var(--coral);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 49, 95, 0.18);
}

.btn.primary:hover {
  background: var(--coral-dark);
}

.btn.secondary {
  border-color: #d8d0d2;
  background: #fff;
  color: var(--ink);
}

.btn.text {
  min-height: 36px;
  padding: 6px 10px;
  background: transparent;
  color: inherit;
}

.btn.danger {
  border-color: #ffd0da;
  background: #fff1f4;
  color: var(--danger);
}

.btn.compact {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 0.88rem;
}

.input,
.textarea,
select,
.content-editor textarea {
  display: block;
  width: 100%;
  border: 1px solid #dcd4d5;
  border-radius: 7px;
  outline: none;
  background: #fff;
  color: var(--ink);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.input,
select {
  min-height: 44px;
  padding: 9px 12px;
}

.textarea,
.content-editor textarea {
  min-height: 96px;
  padding: 11px 12px;
  resize: vertical;
}

.input:focus,
.textarea:focus,
select:focus,
.content-editor textarea:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 49, 95, 0.12);
}

.input:disabled,
.textarea:disabled,
select:disabled {
  background: #f4f1f2;
  color: #8c8586;
}

label {
  display: grid;
  min-width: 0;
  gap: 7px;
  font-weight: 600;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 10px;
  font-weight: 600;
}

.eyebrow {
  min-height: 27px;
  margin-bottom: 12px;
  padding: 5px 10px;
  background: #ffe7ec;
  color: var(--coral-dark);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.form-error {
  margin: 12px 0 0;
  color: var(--danger);
  font-weight: 600;
}

.toast {
  position: fixed;
  z-index: 200;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 13px 16px;
  transform: translateY(20px);
  border-radius: 7px;
  background: #252222;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.entry-shell {
  min-height: 100vh;
  padding: 40px max(20px, calc((100vw - var(--content)) / 2));
  background: #fffafb;
}

.entry-hero {
  display: grid;
  min-height: calc(100vh - 80px);
  align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  overflow: hidden;
  border: 1px solid #ffd5de;
  border-radius: 8px;
  background: var(--pink-wash);
}

.entry-copy {
  z-index: 2;
  padding: clamp(30px, 6vw, 80px);
}

.entry-copy p,
.registration-intro p,
.screen-heading p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.12rem;
}

.entry-code-form {
  display: grid;
  max-width: 430px;
  margin-top: 28px;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.code-input {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.entry-character {
  position: relative;
  align-self: stretch;
  min-height: 520px;
  overflow: hidden;
  background: #fff7e8;
}

.entry-character::before {
  position: absolute;
  right: 8%;
  bottom: 4%;
  width: 78%;
  height: 24%;
  border-radius: 50%;
  background: rgba(255, 49, 95, 0.1);
  content: "";
}

.entry-character img {
  position: absolute;
  right: -2%;
  bottom: -6%;
  width: min(92%, 620px);
  max-height: 96%;
  object-fit: contain;
  object-position: bottom right;
}

.registration-shell {
  min-height: 100vh;
}

.registration-intro {
  margin: 20px 0 32px;
}

.registration-intro h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

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

.entry-section {
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.entry-form {
  display: grid;
  gap: 20px;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(6, 42px);
  gap: 10px;
}

.color-option {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  cursor: pointer;
}

.color-option input {
  position: absolute;
  opacity: 0;
}

.color-option span {
  display: block;
  width: 34px;
  height: 34px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px #d7d0d1;
  transition: transform 130ms ease, box-shadow 130ms ease;
}

.color-option input:checked + span {
  transform: scale(1.08);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--swatch);
}

.color-option.used span {
  opacity: 0.24;
}

.team-choice-list {
  display: grid;
  max-height: 360px;
  gap: 8px;
  overflow-y: auto;
}

.team-choice {
  display: grid;
  min-height: 52px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  grid-template-columns: auto auto 1fr auto;
  gap: 10px;
  cursor: pointer;
}

.team-choice:has(input:checked) {
  border-color: var(--team-color);
  background: color-mix(in srgb, var(--team-color) 7%, white);
}

.team-choice input {
  position: absolute;
  opacity: 0;
}

.team-choice-dot,
.team-color-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--team-color);
}

.team-choice small {
  color: var(--muted);
  font-weight: 400;
}

.empty-state {
  padding: 20px;
  border: 1px dashed #d8d0d2;
  border-radius: 7px;
  color: var(--muted);
  text-align: center;
}

.empty-state.compact-empty {
  padding: 14px;
}

.game-main {
  width: min(var(--content), calc(100% - 40px));
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 44px 0 72px;
}

.screen-heading {
  margin-bottom: 28px;
}

.screen-heading h1 {
  max-width: 960px;
}

.screen-heading.centered {
  text-align: center;
}

.lobby-band {
  display: grid;
  min-height: 320px;
  padding: clamp(24px, 5vw, 52px);
  border-top: 8px solid var(--team-color);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 36px;
}

.lobby-band > div {
  display: flex;
  flex-direction: column;
}

.lobby-band > div b {
  font-size: 5rem;
  line-height: 1;
}

.lobby-band > div span {
  color: var(--muted);
}

.lobby-band ul {
  display: grid;
  align-content: start;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}

.lobby-band li {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow-wrap: anywhere;
}

.presence {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c9c3c4;
}

.presence.online {
  background: #24a36b;
  box-shadow: 0 0 0 4px rgba(36, 163, 107, 0.13);
}

.legend-screen {
  display: grid;
  align-items: center;
}

.legend-stage {
  position: relative;
  display: grid;
  min-height: min(680px, calc(100vh - 150px));
  overflow: hidden;
  border: 1px solid #f0d8dc;
  border-radius: 8px;
  background: #fff2f4;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

.station-forest .legend-stage,
.station-prompt .legend-stage {
  background: #edf8f3;
}

.station-joins .legend-stage,
.station-artifacts .legend-stage {
  background: #fff7e7;
}

.station-arguments .legend-stage {
  background: #eef4ff;
}

.legend-copy {
  z-index: 3;
  align-self: center;
  padding: clamp(28px, 5vw, 68px);
}

.legend-copy h1 {
  max-width: 720px;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
  font-size: 3.625rem;
  letter-spacing: 0;
}

.legend-story {
  max-width: 680px;
  color: #554f50;
  font-size: 1.125rem;
  line-height: 1.48;
}

.legend-story p {
  margin-bottom: 12px;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  letter-spacing: 0;
}

.legend-story p:last-child {
  margin-bottom: 0;
}

.legend-visual {
  position: relative;
  align-self: stretch;
  min-height: 420px;
}

.legend-visual::after {
  position: absolute;
  right: 6%;
  bottom: 5%;
  width: 82%;
  height: 16%;
  border-radius: 50%;
  background: rgba(61, 30, 39, 0.08);
  content: "";
  filter: blur(8px);
}

.legend-character {
  position: absolute;
  z-index: 2;
  right: 1%;
  bottom: -3%;
  width: min(96%, 590px);
  max-height: 100%;
  object-fit: contain;
  object-position: bottom center;
  animation: character-breathe 3.8s ease-in-out infinite;
  filter: drop-shadow(0 18px 20px rgba(40, 27, 31, 0.15));
}

.legend-character.character-2 {
  z-index: 1;
  right: 43%;
  bottom: 0;
  width: min(58%, 340px);
  animation-delay: -1.2s;
}

.magic-ring {
  position: absolute;
  z-index: 0;
  right: 5%;
  bottom: 13%;
  width: 78%;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 49, 95, 0.18);
  border-radius: 50%;
  animation: ring-turn 12s linear infinite;
}

.magic-ring::before,
.magic-ring::after {
  position: absolute;
  border: 1px solid rgba(41, 121, 255, 0.2);
  border-radius: 50%;
  content: "";
}

.magic-ring::before {
  inset: 11%;
}

.magic-ring::after {
  inset: 24%;
}

.magic-spark {
  position: absolute;
  z-index: 4;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--yellow);
  animation: spark-float 2.5s ease-in-out infinite;
}

.legend-stage::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-repeat: no-repeat;
  background-size: 200% auto;
  content: "";
  filter: saturate(0.92) contrast(0.98);
}

.station-intro .legend-stage::before {
  background-image: url("/assets/legend-atlas-1.png");
  background-position: 0 0;
}

.station-forest .legend-stage::before {
  background-image: url("/assets/legend-atlas-1.png");
  background-position: 100% 0;
}

.station-joins .legend-stage::before {
  background-image: url("/assets/legend-atlas-1.png");
  background-position: 0 100%;
}

.station-arguments .legend-stage::before {
  background-image: url("/assets/legend-atlas-1.png");
  background-position: 100% 100%;
}

.station-prompt .legend-stage::before {
  background-image: url("/assets/legend-atlas-2.png");
  background-position: 0 0;
}

.station-final .legend-stage::before {
  background-image: url("/assets/legend-atlas-2.png");
  background-position: 100% 0;
}

.station-artifacts .legend-stage::before {
  background-image: url("/assets/legend-atlas-2.png");
  background-position: 100% 100%;
}

.legend-copy {
  min-height: 100%;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(5px);
}

.legend-copy .eyebrow {
  background: rgba(255, 231, 236, 0.94);
}

.legend-story {
  color: #3e393a;
}

.spark-a { top: 17%; right: 17%; }
.spark-b { top: 34%; right: 73%; animation-delay: -0.9s; }
.spark-c { right: 38%; bottom: 16%; animation-delay: -1.7s; }

@keyframes character-breathe {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-9px) rotate(0.5deg); }
}

@keyframes ring-turn {
  to { transform: rotate(360deg); }
}

@keyframes spark-float {
  0%, 100% { transform: translateY(0) scale(0.85); opacity: 0.55; }
  50% { transform: translateY(-12px) scale(1.1); opacity: 1; }
}

.control-banner {
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 14px 16px;
  border-left: 5px solid var(--coral);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(61, 30, 39, 0.07);
  gap: 16px;
}

.control-banner > span {
  align-items: flex-start;
  flex-direction: column;
  min-width: 0;
}

.control-banner small {
  color: var(--muted);
}

.control-banner.active {
  border-color: var(--green);
  background: #f0faf6;
}

.control-banner.closed {
  border-color: var(--danger);
  background: #fff0f3;
}

.task-layout,
.task-single,
.matching-board,
.classification-board,
.final-task,
.completed-task,
.outcome-band,
.team-submissions {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.task-layout {
  display: grid;
  padding: 20px;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
}

.task-context,
.task-form,
.objection-panel {
  min-width: 0;
  padding: clamp(18px, 3vw, 30px);
}

.task-context,
.objection-panel {
  border-radius: 7px;
  background: #fff5f1;
}

.task-form {
  display: grid;
  align-content: start;
  gap: 18px;
}

.task-form.compact {
  width: min(720px, 100%);
  margin: 24px auto 0;
  padding: 0;
}

.dialog-lines {
  display: grid;
  gap: 8px;
}

.dialog-lines p {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid #ff8aa4;
  background: rgba(255, 255, 255, 0.7);
}

.task-single,
.matching-board,
.classification-board,
.final-task,
.completed-task,
.outcome-band {
  padding: clamp(22px, 4vw, 42px);
}

.completed-task {
  display: grid;
  min-height: 300px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.completion-mark {
  display: grid;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 50%;
  background: #def3e7;
  color: var(--green);
  font-size: 2.2rem;
  font-weight: 700;
}

.sticker-progress,
.matching-progress {
  width: fit-content;
  margin-bottom: 18px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f5f2f2;
  color: var(--muted);
  font-size: 0.88rem;
}

.forest-stickers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.forest-sticker {
  display: flex;
  min-height: 130px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  transform: rotate(-1deg);
  border: 1px solid #f1d97b;
  border-radius: 4px;
  background: #fff4b9;
  box-shadow: 0 9px 20px rgba(78, 60, 13, 0.09);
}

.forest-sticker:nth-child(even) {
  transform: rotate(1deg);
  background: #ffe7ee;
  border-color: #ffc5d2;
}

.forest-sticker.current {
  box-shadow: 0 0 0 3px var(--coral), 0 9px 20px rgba(78, 60, 13, 0.1);
}

.forest-sticker small {
  color: var(--muted);
  text-transform: uppercase;
}

.forest-sticker b {
  font-size: 1.15rem;
}

.matching-board,
.classification-board {
  display: grid;
  gap: 20px;
}

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

.matching-columns > div {
  display: grid;
  align-content: start;
  gap: 10px;
}

.match-card {
  width: 100%;
  min-height: 64px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  overflow-wrap: anywhere;
}

.match-card.selected {
  border-color: var(--blue);
  background: #eef4ff;
  box-shadow: 0 0 0 2px rgba(41, 121, 255, 0.13);
}

.match-card.matched {
  border-color: #b9dfcb;
  background: #ebf8f1;
  color: #245c43;
  opacity: 1;
}

.join-completed {
  min-height: 0;
  place-items: stretch;
  text-align: left;
}

.join-completed .completion-mark,
.join-completed > h2,
.join-completed > p {
  justify-self: center;
  text-align: center;
}

.join-pair-results {
  display: grid;
  width: 100%;
  margin-top: 16px;
  gap: 9px;
}

.join-pair-results > div {
  display: grid;
  align-items: start;
  padding: 12px 14px;
  border-left: 4px solid var(--green);
  border-radius: 6px;
  background: #f4faf7;
  grid-template-columns: minmax(170px, 0.7fr) minmax(0, 1.3fr);
  gap: 14px;
}

.join-pair-results span {
  overflow-wrap: anywhere;
}

.argument-layout {
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
}

.objection-panel {
  display: flex;
  min-height: 290px;
  flex-direction: column;
  justify-content: center;
  background: #ff8c7c;
  color: #fff;
}

.objection-panel .eyebrow {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.objection-panel h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.argument-meter {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.argument-meter b {
  font-size: 2rem;
}

.criteria-band {
  padding: 20px;
  border-left: 4px solid var(--green);
  border-radius: 7px;
  background: var(--mint);
  grid-column: 1 / -1;
}

.criteria-band ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 30px;
}

.classification-list {
  display: grid;
  gap: 10px;
}

.classification-row {
  display: grid;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
}

.classification-row:last-child {
  border-bottom: 0;
}

.classification-row p {
  margin: 0;
  font-weight: 600;
}

.segmented {
  display: grid;
  overflow: hidden;
  border: 1px solid #d8d0d2;
  border-radius: 7px;
  grid-template-columns: repeat(2, 1fr);
}

.segmented button {
  min-height: 40px;
  padding: 7px 12px;
  border: 0;
  border-right: 1px solid #d8d0d2;
  background: #fff;
  color: #5d5758;
  white-space: nowrap;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active.yes {
  background: #dff4e8;
  color: #126244;
}

.segmented button.active.no {
  background: #ffe4ea;
  color: var(--danger);
}

.final-task {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 22px;
}

.final-objection {
  display: flex;
  min-height: 290px;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  border-radius: 7px;
  background: #3a3034;
  color: #fff;
}

.final-objection small {
  margin-bottom: 12px;
  color: #ffbecd;
  font-weight: 700;
  text-transform: uppercase;
}

.final-objection blockquote {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  font-weight: 700;
  line-height: 1.16;
}

.final-instruction {
  margin-bottom: 18px;
  padding: 14px;
  border-left: 4px solid var(--coral);
  background: #fff1f4;
  font-weight: 600;
}

.team-submissions {
  margin-top: 22px;
  padding: clamp(20px, 3vw, 30px);
}

.submission-row {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.submission-row:first-of-type {
  border-top: 0;
}

.submission-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.submission-row p {
  margin: 12px 0 0;
}

.submission-row blockquote {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 3px solid #bdb5b7;
  color: var(--muted);
}

.status-pill {
  min-height: 26px;
  padding: 4px 9px;
  background: #f1eeee;
  color: #665f61;
  font-size: 0.78rem;
  font-weight: 600;
}

.status-approved .status-pill,
.status-auto_scored .status-pill {
  background: #e2f5ea;
  color: #166246;
}

.status-rework .status-pill {
  background: #ffe4ea;
  color: var(--danger);
}

.outcome-band {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 28px;
}

.outcome-band .trainer-points {
  padding: 20px;
  border-left: 4px solid var(--yellow);
  border-radius: 7px;
  background: var(--cream);
}

.outcome-band .trainer-points li + li {
  margin-top: 8px;
}

.conclusion-screen {
  display: grid;
  align-items: center;
}

.conclusion-band {
  display: grid;
  min-height: min(570px, calc(100vh - 150px));
  align-items: center;
  padding: clamp(28px, 6vw, 72px);
  border: 1px solid #cce7db;
  border-radius: 8px;
  background: var(--mint);
  grid-template-columns: 150px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 60px);
}

.conclusion-band > div:last-child {
  max-width: 800px;
}

.conclusion-band p {
  color: #4b5f57;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.6;
}

.conclusion-symbol {
  display: grid;
  width: 130px;
  height: 130px;
  place-items: center;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  box-shadow: 0 0 0 3px var(--green);
  font-size: 4rem;
  font-weight: 700;
}

.watching-panel {
  display: grid;
  min-height: 380px;
  place-items: center;
  align-content: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow);
}

.watching-panel p {
  color: var(--muted);
}

.watching-visual {
  display: flex;
  height: 50px;
  align-items: end;
  margin-bottom: 20px;
  gap: 7px;
}

.watching-visual span {
  width: 10px;
  height: 22px;
  border-radius: 999px;
  background: var(--coral);
  animation: typing-bars 1s ease-in-out infinite;
}

.watching-visual span:nth-child(2) { height: 42px; animation-delay: -0.33s; }
.watching-visual span:nth-child(3) { height: 30px; animation-delay: -0.66s; }

@keyframes typing-bars {
  0%, 100% { transform: scaleY(0.65); }
  50% { transform: scaleY(1); }
}

.roundboard-list {
  width: min(860px, 100%);
  margin: 0 auto;
}

.roundboard-row {
  display: grid;
  min-height: 66px;
  align-items: center;
  margin-bottom: 9px;
  padding: 10px 16px;
  border-left: 8px solid var(--team-color);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(61, 30, 39, 0.06);
  grid-template-columns: 42px 16px minmax(0, 1fr) auto;
  gap: 10px;
}

.roundboard-row.leader {
  background: #fff8df;
}

.place {
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 700;
}

.roundboard-score {
  font-size: 1.25rem;
  font-weight: 700;
}

.arrow-arena {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid #f0d8dc;
  border-radius: 8px;
  background: #fff2f4;
}

.battlefield {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid #f0d8dc;
  border-radius: 8px;
  background: #fff2f4;
}

.battlefield .arrow-target {
  position: absolute;
  z-index: 5;
  right: 2%;
  bottom: 0;
  display: flex;
  width: min(36%, 390px);
  height: 84%;
  align-items: center;
  flex-direction: column;
  justify-content: flex-end;
}

.battlefield .arrow-target img {
  z-index: 2;
  width: 100%;
  height: calc(100% - 42px);
  object-fit: contain;
  object-position: bottom;
}

.battlefield .arrow-target b {
  z-index: 4;
  min-width: 150px;
  margin-top: -18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  text-align: center;
  box-shadow: 0 8px 20px rgba(52, 35, 40, 0.12);
}

.target-rings {
  position: absolute;
  z-index: 4;
  top: 31%;
  left: 39%;
  width: 82px;
  height: 82px;
  border: 13px solid #ffb1c2;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 10px var(--coral), inset 0 0 0 22px #ffe1e8;
}

.battle-arrow {
  position: absolute;
  z-index: 3;
  top: var(--start-y);
  left: 3%;
  display: block;
  transform: translate(0, -50%);
  animation: battle-flight 2.5s cubic-bezier(0.22, 0.82, 0.37, 1) forwards;
  animation-delay: var(--delay);
  opacity: 0;
}

.arrow-line {
  display: block;
  width: clamp(65px, 11vw, 155px);
  height: 8px;
  background: var(--team-color);
  clip-path: polygon(0 27%, 80% 27%, 80% 0, 100% 50%, 80% 100%, 80% 73%, 0 73%, 8% 50%);
}

.battle-arrow .arrow-label {
  position: absolute;
  top: 50%;
  right: calc(100% + 8px);
  transform: translateY(-50%);
}

@keyframes battle-flight {
  0% { left: 3%; top: var(--start-y); transform: translate(0, -50%); opacity: 0; }
  10% { opacity: 1; }
  100% { left: var(--end-x); top: var(--end-y); transform: translate(-100%, -50%); opacity: 1; }
}

.arrow-target {
  position: absolute;
  right: 4%;
  bottom: 3%;
  width: min(42%, 430px);
  height: 80%;
}

.arrow-target img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
}

.arrow-target-ring {
  position: absolute;
  z-index: 2;
  top: 35%;
  left: 44%;
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border: 14px solid #ffb1c2;
  border-radius: 50%;
  background: #fff;
  color: var(--coral);
  font-size: 0.8rem;
  font-weight: 700;
}

.arrow-lanes {
  position: absolute;
  inset: 5% 37% 5% 3%;
  display: grid;
  align-content: center;
  gap: 11px;
}

.arrow-lane {
  position: relative;
  height: 46px;
  border-bottom: 1px dashed color-mix(in srgb, var(--team-color) 35%, white);
}

.arrow-projectile {
  position: absolute;
  top: 4px;
  left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: arrow-flight 2.3s cubic-bezier(0.22, 0.82, 0.37, 1) forwards;
  animation-delay: var(--delay, 0s);
}

.arrow-projectile::after {
  width: 88px;
  height: 4px;
  background: var(--team-color);
  clip-path: polygon(0 25%, 82% 25%, 82% 0, 100% 50%, 82% 100%, 82% 75%, 0 75%);
  content: "";
}

.arrow-label {
  max-width: 150px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(40, 27, 31, 0.1);
  font-size: 0.78rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes arrow-flight {
  0% { transform: translateX(0); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateX(var(--flight, 76%)); opacity: 1; }
}

.victory-stage {
  display: grid;
  min-height: min(680px, calc(100vh - 150px));
  align-items: center;
  overflow: hidden;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid #cce7db;
  border-radius: 8px;
  background: #eaf7f2;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 24px;
}

.victory-stage img {
  max-height: 570px;
  object-fit: contain;
  filter: drop-shadow(0 18px 25px rgba(31, 47, 41, 0.13));
  animation: defeated-wobble 3s ease-in-out infinite;
}

@keyframes defeated-wobble {
  0%, 100% { transform: translateY(5px) rotate(-2deg); }
  50% { transform: translateY(-4px) rotate(2deg); }
}

.artifact-picker {
  display: grid;
  gap: 24px;
}

.artifact-grid,
.artifact-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.artifact-card {
  display: grid;
  min-height: 190px;
  align-content: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.artifact-form {
  display: grid;
  gap: 24px;
}

.artifact-search {
  width: min(520px, 100%);
}

.artifact-option {
  position: relative;
  display: grid;
  min-height: 180px;
  align-content: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.artifact-option:has(input:checked) {
  border-color: var(--coral);
  background: #fff1f4;
  box-shadow: 0 0 0 2px rgba(255, 49, 95, 0.13);
}

.artifact-option input {
  position: absolute;
  opacity: 0;
}

.artifact-option .artifact-emoji {
  margin-bottom: 14px;
  font-size: 2rem;
}

.artifact-option small {
  margin-top: 7px;
  color: var(--muted);
  font-weight: 400;
}

.rating-field {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.rating-stars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rating-stars label {
  position: relative;
  cursor: pointer;
}

.rating-stars input {
  position: absolute;
  opacity: 0;
}

.rating-stars span {
  display: grid;
  min-width: 54px;
  min-height: 42px;
  place-items: center;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #887f81;
}

.rating-stars input:checked + span {
  border-color: #e0b32d;
  background: #fff8df;
  color: #966d00;
  box-shadow: 0 0 0 2px rgba(224, 179, 45, 0.15);
}

.artifact-card.selected {
  border-color: var(--coral);
  background: #fff1f4;
  box-shadow: 0 0 0 2px rgba(255, 49, 95, 0.14);
}

.artifact-card .artifact-emoji {
  margin-bottom: 18px;
  font-size: 2.2rem;
}

.artifact-card b {
  margin-bottom: 7px;
}

.artifact-card small {
  color: var(--muted);
}

.artifact-reflection {
  display: grid;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 20px;
}

.rating-control {
  display: flex;
  align-items: center;
  align-self: end;
  gap: 8px;
}

.rating-control button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #e4dcde;
  border-radius: 50%;
  background: #fff;
  color: #b7afb1;
  font-size: 1.3rem;
}

.rating-control button.active {
  border-color: #e1ad19;
  background: #fff7dc;
  color: #d49900;
}

.artifact-showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.artifact-showcase-item,
.artifact-review {
  padding: 22px;
  border-top: 6px solid var(--team-color);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.artifact-showcase-item > span {
  display: block;
  margin-bottom: 10px;
  font-size: 2rem;
}

.artifact-showcase-item small,
.artifact-review small {
  display: block;
  color: var(--muted);
}

.results-screen .winner-banner {
  display: grid;
  min-height: 280px;
  place-items: center;
  margin-bottom: 24px;
  padding: 30px;
  border: 1px solid #f2d278;
  border-radius: 8px;
  background: #fff8df;
  text-align: center;
}

.results-hero {
  min-height: 290px;
  margin-bottom: 22px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid #cce7db;
  border-radius: 8px;
  background: var(--mint);
}

.results-hero p {
  max-width: 760px;
  color: #52615b;
  font-size: 1.12rem;
}

.winner-band {
  margin-bottom: 18px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid #f2d278;
  border-radius: 8px;
  background: #fff8df;
}

.certificate-button {
  min-height: 52px;
}

.winner-banner strong {
  font-size: clamp(2rem, 5vw, 4rem);
}

.certificate-list {
  display: grid;
  gap: 10px;
}

.trainer-shell {
  background: #f7f5f5;
}

.trainer-main {
  width: min(1440px, calc(100% - 36px));
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 24px 0 70px;
}

.trainer-login {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
  background: #fff3f5;
}

.trainer-login-panel {
  width: min(460px, 100%);
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.loading-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  align-content: center;
  gap: 16px;
  background: #fffafb;
}

.loader {
  width: 42px;
  height: 42px;
  border: 4px solid #ffd8e1;
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: ring-turn 0.8s linear infinite;
}

.trainer-login-panel form {
  display: grid;
  gap: 16px;
}

.trainer-header {
  gap: 18px;
}

.trainer-tabs {
  padding: 4px;
  border-radius: 7px;
  background: #f2eeee;
}

.trainer-tabs button {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 0.85rem;
}

.trainer-tabs button.active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(52, 35, 40, 0.08);
}

.control-deck,
.trainer-control-deck,
.trainer-section,
.editor-toolbar,
.content-editor details,
.danger-zone {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.control-deck,
.trainer-control-deck {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(340px, 1.4fr) minmax(260px, 1fr);
}

.control-deck > div,
.trainer-control-deck > div {
  min-width: 0;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.control-deck > div:last-child,
.trainer-control-deck > div:last-child {
  border-right: 0;
}

.control-deck h1,
.control-deck h2,
.control-deck h3,
.trainer-control-deck h1,
.trainer-control-deck h2,
.trainer-control-deck h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.trainer-control-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.step-navigation {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
}

.step-navigation .btn {
  min-height: 46px;
}

.current-step h1,
.current-step .eyebrow {
  margin-bottom: 5px;
}

.trainer-control-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.trainer-control-deck {
  grid-template-columns: minmax(280px, 0.8fr) minmax(580px, 2.2fr);
}

.tool-group {
  display: flex;
  min-width: 0;
  min-height: 98px;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px;
  background: #fff;
  gap: 8px;
}

.tool-label {
  flex: 1 0 100%;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
}

.timer-tool > strong {
  min-width: 76px;
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
}

.timer-tool > strong.expired {
  color: var(--danger);
}

.inline-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.icon-text-button {
  min-width: 36px;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}

.music-tool .compact-select {
  flex: 1 1 135px;
  min-height: 38px;
  padding: 6px 8px;
}

.music-tool input[type="range"] {
  flex: 1 1 120px;
}

.link-tool code {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: #645d5e;
  font-size: 0.77rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.next-action {
  display: grid;
  gap: 12px;
}

.next-action .btn {
  width: 100%;
  min-height: 58px;
  font-size: 1.1rem;
}

.next-action p,
.control-deck p {
  margin-bottom: 0;
  color: var(--muted);
}

.timer-controls,
.music-controls,
.game-code-row {
  flex-wrap: wrap;
  gap: 8px;
}

.timer-controls .input,
.music-controls .input {
  width: 92px;
}

.music-controls select {
  flex: 1 1 160px;
}

.game-code-row strong {
  font-size: 1.4rem;
  letter-spacing: 0.08em;
}

.trainer-section {
  padding: 22px;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 14px;
}

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

.section-heading .eyebrow,
.section-heading h2 {
  margin-bottom: 4px;
}

.section-counter,
.review-count,
.waiting-label {
  min-height: 27px;
  padding: 4px 9px;
  background: #f1eeee;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.profile-switch,
.profile-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.profile-switch label,
.profile-switcher label {
  flex: 1 1 280px;
}

.profile-switcher > span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.profile-switcher .select {
  flex: 1 1 240px;
}

.registration-grid,
.registration-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.team-board-head {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.team-board-head h3 {
  min-width: 0;
  flex: 1;
  margin: 0;
}

.registration-team {
  padding: 16px;
  border-left: 6px solid var(--team-color);
  border-radius: 7px;
  background: #fdfcfc;
}

.registration-team header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.registration-team ul {
  margin-top: 12px;
  padding: 0;
  list-style: none;
}

.registration-team li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
}

.trainer-script {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 20px;
}

.trainer-script blockquote {
  margin: 0;
  padding: 20px;
  border-left: 5px solid var(--coral);
  border-radius: 7px;
  background: #fff1f4;
  font-size: 1.08rem;
  line-height: 1.55;
}

.trainer-script ul {
  padding: 18px 18px 18px 38px;
  border-radius: 7px;
  background: var(--cream);
}

.trainer-script li + li {
  margin-top: 8px;
}

.team-review-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.review-queue {
  grid-template-columns: 1fr;
}

.review-queue-empty {
  grid-column: 1 / -1;
}

.round-complete-alert {
  display: flex;
  align-items: flex-start;
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid #abd9bf;
  border-left: 7px solid var(--green);
  border-radius: 8px;
  background: #edf8f2;
  gap: 18px;
}

.round-complete-alert .eyebrow {
  flex: 0 0 auto;
  background: #d8f1e3;
  color: #1d6b49;
}

.round-complete-alert h2 {
  margin: 0 0 5px;
  font-size: 1.35rem;
}

.round-complete-alert p {
  margin: 0;
  color: var(--muted);
}

.review-team-archive,
.review-waiting,
.checked-answer-archive {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.review-team-archive > summary,
.review-waiting > summary,
.checked-answer-archive > summary {
  padding: 14px 16px;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.review-team-archive > .team-review-list {
  padding: 0 16px 16px;
}

.checked-answer-archive {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: #faf8f8;
}

.waiting-team-chips {
  display: flex;
  flex-wrap: wrap;
  padding: 0 16px 16px;
  gap: 8px;
}

.waiting-team-chips span {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  gap: 7px;
}

.waiting-team-chips i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--team-color);
}

.team-review-board {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 8px solid var(--team-color);
  border-radius: 8px;
  background: #fff;
}

.team-review-head {
  justify-content: space-between;
  padding: 16px 18px;
  gap: 10px;
}

.team-review-head > div {
  min-width: 0;
  flex-wrap: wrap;
  gap: 9px;
}

.team-review-head h3 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.team-review-roster {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 18px 12px;
}

.team-review-roster span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f2eeee;
  color: var(--muted);
  font-size: 0.76rem;
}

.team-review-roster span.online {
  background: #e4f4eb;
  color: #226445;
}

.typing-status {
  padding: 9px 18px;
  background: color-mix(in srgb, var(--team-color) 7%, white);
  color: #615b5c;
  font-size: 0.8rem;
}

.team-answer-list {
  border-top: 1px solid var(--line);
}

.team-answer {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.team-answer:last-child {
  border-bottom: 0;
}

.answer-meta {
  flex-wrap: wrap;
  margin-bottom: 12px;
  gap: 8px;
}

.answer-meta time {
  color: var(--muted);
  font-size: 0.8rem;
}

.answer-body {
  max-height: 360px;
  overflow-y: auto;
  overflow-wrap: anywhere;
}

.answer-body p:last-child {
  margin-bottom: 0;
}

.review-controls {
  display: grid;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
}

.review-controls .rubric-control {
  grid-column: 1 / -1;
}

.review-actions {
  justify-content: flex-end;
  grid-column: 1 / -1;
  gap: 8px;
}

.rubric-list,
.rubric-grid {
  display: grid;
  gap: 7px;
}

.rubric-list label,
.rubric-grid label {
  display: flex;
  align-items: flex-start;
  font-weight: 400;
  gap: 8px;
}

.rubric-list input,
.rubric-grid input {
  flex: 0 0 auto;
  margin-top: 4px;
}

.review-result {
  display: flex;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--green);
  gap: 9px;
}

.submission-context {
  padding: 9px 11px;
  border-left: 3px solid var(--team-color, var(--coral));
  background: #f8f6f6;
}

.submission-context span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.prompt-result-list {
  display: grid;
  width: 100%;
  margin-top: 16px;
  gap: 8px;
  text-align: left;
}

.prompt-result {
  display: grid;
  padding: 11px 13px;
  border-left: 4px solid;
  background: #f8f8f8;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
}

.prompt-result.correct {
  border-color: #2f8a61;
  background: #edf8f2;
}

.prompt-result.incorrect {
  border-color: #d64d68;
  background: #fff0f3;
}

.prompt-result > span {
  font-weight: 800;
}

.prompt-result.correct > span {
  color: #226445;
}

.prompt-result.incorrect > span {
  color: #a42642;
}

.prompt-result p {
  margin: 0;
  overflow-wrap: anywhere;
}

.prompt-result small {
  color: var(--muted);
  grid-column: 2;
}

.prompt-completed {
  place-items: stretch;
  text-align: left;
}

.prompt-completed .completion-mark {
  justify-self: center;
}

.prompt-completed > h2,
.prompt-completed > p {
  text-align: center;
}

.review-total {
  margin-top: 12px;
}

.player-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.player-review-team {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 7px solid var(--team-color);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.player-review-team > header {
  display: flex;
  align-items: center;
  padding: 15px 17px;
  gap: 9px;
  flex-wrap: wrap;
}

.player-review-team h2 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.team-review-score {
  margin-left: auto;
  white-space: nowrap;
}

.first-team-badge {
  padding: 5px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--team-color) 14%, white);
  color: #312d2e;
  font-size: 0.76rem;
  font-weight: 700;
}

.review-waiting-screen {
  display: grid;
  min-height: min(640px, calc(100vh - 88px));
  place-items: center;
}

.review-waiting-panel {
  width: min(720px, 100%);
  padding: 40px;
  text-align: center;
}

.review-answer-key,
.review-team-results {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.review-answer-key h2,
.review-team-results h2 {
  margin: 6px 0 18px;
}

.prompt-key-list {
  display: grid;
  gap: 8px;
}

.prompt-key-list > div {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.prompt-key-list span {
  display: grid;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f4eff1;
  place-items: center;
  font-weight: 700;
}

.prompt-key-list p {
  margin: 0;
}

.prompt-key-list b {
  color: var(--accent-dark);
}

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

.review-result-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--team-color);
  border-radius: 6px;
}

.review-result-card h3,
.review-result-card p {
  margin: 0;
}

.review-result-card p {
  color: var(--muted);
  font-size: 0.86rem;
}

.player-review-answer {
  padding: 16px 17px;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.player-review-answer blockquote {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--team-color);
  background: #f8f6f6;
}

.attempt-history {
  margin-top: 14px;
  color: var(--muted);
}

.attempt-history summary,
.content-editor summary,
.danger-zone summary {
  cursor: pointer;
  font-weight: 600;
}

.history-row {
  margin-top: 9px;
  padding: 10px;
  border-left: 3px solid #d7d0d1;
  background: #f8f6f6;
}

.trainer-score-list,
.artifact-progress-list {
  display: grid;
  gap: 8px;
}

.trainer-score-row {
  display: grid;
  min-height: 52px;
  align-items: center;
  padding: 7px 10px;
  border-left: 5px solid var(--team-color);
  border-radius: 6px;
  background: #faf8f8;
  grid-template-columns: 30px 14px minmax(0, 1fr) 90px 20px;
  gap: 8px;
}

.trainer-score-row .input {
  min-height: 36px;
}

.artifact-progress-row {
  display: grid;
  min-height: 52px;
  align-items: center;
  padding: 9px 12px;
  border-left: 5px solid var(--team-color);
  border-radius: 6px;
  background: #faf8f8;
  grid-template-columns: 14px minmax(150px, 0.8fr) minmax(120px, 0.6fr) minmax(180px, 1fr);
  gap: 10px;
}

.artifact-progress-row small {
  color: var(--muted);
}

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

.artifact-review-head {
  align-items: flex-start;
  gap: 10px;
}

.artifact-review-head > span {
  font-size: 1.8rem;
}

.artifact-review-head > div {
  min-width: 0;
  flex: 1;
}

.artifact-review p {
  margin: 14px 0 0;
}

.winner-row {
  min-height: 56px;
  margin-bottom: 8px;
  padding: 9px 12px;
  border-left: 6px solid var(--team-color);
  border-radius: 7px;
  background: #fff8df;
  gap: 10px;
}

.winner-row b {
  min-width: 0;
  flex: 1;
}

.danger-zone {
  padding: 16px 20px;
}

.danger-zone p {
  max-width: 720px;
  color: var(--muted);
}

.editor-main {
  width: min(1380px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 70px;
}

.editor-toolbar {
  position: sticky;
  z-index: 20;
  top: 82px;
  justify-content: space-between;
  padding: 16px 18px;
  box-shadow: 0 8px 20px rgba(52, 35, 40, 0.06);
  gap: 16px;
}

.editor-toolbar > div:first-child {
  align-items: flex-start;
  flex-direction: column;
}

.editor-toolbar h1,
.editor-toolbar .eyebrow {
  margin-bottom: 3px;
  font-size: 1.2rem;
}

.editor-toolbar > div:last-child {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.editor-toolbar .profile-switch {
  margin: 0;
  padding: 0;
  border: 0;
}

.content-editor {
  display: grid;
  gap: 12px;
}

.content-editor details {
  margin-bottom: 0;
  overflow: hidden;
}

.content-editor summary {
  padding: 18px 20px;
  background: #faf8f8;
  list-style-position: inside;
}

.editor-grid {
  display: grid;
  padding: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.editor-grid label > span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
}

.editor-grid .span-2 {
  grid-column: 1 / -1;
}

@media (max-width: 1050px) {
  .control-deck,
  .trainer-control-deck {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-deck > div:nth-child(2),
  .trainer-control-deck > div:nth-child(2) {
    border-right: 0;
  }

  .control-deck > div:last-child,
  .trainer-control-deck > div:last-child {
    border-top: 1px solid var(--line);
    grid-column: 1 / -1;
  }

  .team-review-list,
  .registration-grid,
  .registration-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 780px) {
  h1 {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .join-pair-results > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .round-complete-alert {
    flex-direction: column;
    padding: 16px;
    gap: 10px;
  }

  .app-header {
    position: relative;
    align-items: flex-start;
    padding: 10px 14px;
    gap: 8px;
  }

  .brand-lockup span:last-child,
  .phase-chip {
    display: none;
  }

  .header-status {
    gap: 6px;
  }

  .team-chip {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .entry-shell {
    padding: 0;
  }

  .entry-hero {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(270px, 40vh);
  }

  .entry-copy {
    padding: 32px 20px 10px;
  }

  .entry-code-form {
    grid-template-columns: 1fr;
  }

  .entry-character {
    min-height: 270px;
  }

  .entry-character img {
    right: 3%;
    width: min(82%, 430px);
  }

  .registration-shell {
    padding: 24px 16px 50px;
  }

  .entry-columns,
  .task-layout,
  .final-task,
  .outcome-band,
  .victory-stage,
  .trainer-script,
  .artifact-reflection {
    grid-template-columns: 1fr;
  }

  .conclusion-band {
    grid-template-columns: 1fr;
  }

  .conclusion-symbol {
    width: 82px;
    height: 82px;
    font-size: 2.5rem;
  }

  .entry-section {
    padding: 20px;
  }

  .game-main {
    width: min(100% - 28px, var(--content));
    min-height: calc(100vh - 60px);
    padding: 28px 0 52px;
  }

  .lobby-band {
    min-height: 0;
    padding: 22px;
    grid-template-columns: 1fr;
  }

  .lobby-band > div b {
    font-size: 3.5rem;
  }

  .lobby-band ul {
    grid-template-columns: 1fr;
  }

  .legend-stage {
    min-height: calc(100vh - 110px);
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(270px, 45vh);
  }

  .legend-copy {
    min-height: 0;
    padding: 28px 22px 4px;
    background: rgba(255, 255, 255, 0.88);
  }

  .legend-copy h1 {
    font-size: 2.5rem;
    line-height: 1.05;
  }

  .legend-story {
    font-size: 1rem;
  }

  .legend-visual {
    min-height: 270px;
  }

  .legend-stage::before {
    background-size: auto 200%;
  }

  .station-intro .legend-stage::before,
  .station-joins .legend-stage::before,
  .station-prompt .legend-stage::before {
    background-position-x: 22%;
  }

  .station-forest .legend-stage::before,
  .station-arguments .legend-stage::before,
  .station-final .legend-stage::before,
  .station-artifacts .legend-stage::before {
    background-position-x: 78%;
  }

  .legend-character {
    right: 4%;
    width: min(88%, 470px);
  }

  .legend-character.character-2 {
    right: 48%;
    width: min(52%, 260px);
  }

  .control-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .task-layout {
    padding: 12px;
  }

  .task-context,
  .task-form,
  .objection-panel {
    padding: 20px;
  }

  .objection-panel {
    min-height: 230px;
  }

  .criteria-band ul {
    grid-template-columns: 1fr;
  }

  .matching-columns {
    grid-template-columns: 1fr;
  }

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

  .review-answer-key,
  .review-team-results,
  .review-waiting-panel {
    padding: 18px;
  }

  .review-result-grid {
    grid-template-columns: 1fr;
  }

  .prompt-key-list > div {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .prompt-key-list b {
    grid-column: 2;
  }

  .segmented {
    width: 100%;
  }

  .final-objection {
    min-height: 210px;
  }

  .roundboard-row {
    grid-template-columns: 34px 14px minmax(0, 1fr) auto;
    padding: 9px 12px;
  }

  .arrow-arena {
    min-height: 600px;
  }

  .battlefield {
    min-height: 610px;
  }

  .battlefield .arrow-target {
    width: 62%;
    height: 54%;
  }

  .arrow-target {
    right: 0;
    bottom: 2%;
    width: 64%;
    height: 54%;
  }

  .arrow-lanes {
    inset: 3% 4% 49% 3%;
  }

  .arrow-projectile::after {
    width: 58px;
  }

  .victory-stage {
    min-height: calc(100vh - 110px);
  }

  .victory-stage img {
    max-height: 360px;
  }

  .artifact-grid,
  .artifact-review-grid,
  .artifact-showcase-grid,
  .team-review-list,
  .player-review-grid,
  .registration-grid,
  .registration-board,
  .editor-grid {
    grid-template-columns: 1fr;
  }

  .artifact-card {
    min-height: 150px;
  }

  .trainer-main,
  .editor-main {
    width: min(100% - 20px, 1440px);
    padding-top: 10px;
  }

  .control-deck,
  .trainer-control-deck {
    grid-template-columns: 1fr;
  }

  .control-deck > div,
  .trainer-control-deck > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .control-deck > div:last-child,
  .trainer-control-deck > div:last-child {
    border-bottom: 0;
    grid-column: auto;
  }

  .trainer-control-tools {
    grid-template-columns: 1fr;
  }

  .review-controls {
    grid-template-columns: 1fr;
  }

  .review-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .review-actions .btn {
    width: 100%;
  }

  .trainer-score-row {
    grid-template-columns: 26px 12px minmax(0, 1fr) 74px 16px;
  }

  .artifact-progress-row {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  .artifact-progress-row small,
  .artifact-progress-row strong,
  .artifact-progress-row .waiting-label {
    grid-column: 2;
  }

  .editor-toolbar {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .editor-toolbar > div:last-child {
    justify-content: stretch;
  }

  .editor-toolbar .btn {
    flex: 1 1 180px;
  }

  .editor-grid .span-2 {
    grid-column: auto;
  }
}

@media (max-width: 480px) {
  .brand-lockup b {
    max-width: 118px;
    overflow: hidden;
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-mark {
    flex-basis: 26px;
    width: 26px;
    height: 26px;
  }

  .team-chip {
    max-width: 118px;
  }

  .color-grid {
    grid-template-columns: repeat(6, 36px);
    gap: 7px;
  }

  .color-option {
    width: 36px;
    height: 36px;
  }

  .color-option span {
    width: 30px;
    height: 30px;
  }

  .task-single,
  .matching-board,
  .classification-board,
  .final-task,
  .completed-task,
  .outcome-band {
    padding: 18px;
  }

  .segmented button {
    padding: 7px 8px;
    font-size: 0.84rem;
  }

  .arrow-label {
    max-width: 112px;
    padding: 3px 6px;
    font-size: 0.68rem;
  }

  .trainer-section {
    padding: 14px;
  }

  .team-review-head,
  .team-answer {
    padding: 14px;
  }

  .winner-row {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .winner-row .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
