:root {
  --ink: #111318;
  --muted: #5d6470;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --line: #d9dee7;
  --blue: #2457d6;
  --teal: #008979;
  --amber: #d68a00;
  --plum: #8f3bb3;
  --green: #168347;
  --red: #c73a3a;
  --gold: #d7af63;
  --sand: #bf8230;
  --deep: #10141d;
  --font-sans: "Geist", "Segoe UI", Arial, Helvetica, sans-serif;
  --font-display: var(--font-sans);
  --font-mono: "Geist Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 28px 18px;
}

.screen {
  display: none;
}

.screen-active {
  display: block;
}

#entryScreen.screen-active {
  min-height: calc(100vh - 56px);
  display: grid;
}

#briefingScreen.screen-active {
  min-height: calc(100vh - 56px);
  display: grid;
}

.start-layout,
.entry-stage,
.results-layout {
  min-height: calc(100vh - 56px);
  display: grid;
  align-content: center;
  gap: 24px;
}

.entry-stage,
.start-layout {
  width: min(100%, 620px);
  margin: 0 auto;
  justify-items: center;
  text-align: center;
}

.entry-stage {
  color: white;
  position: relative;
}

.entry-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 40%, rgba(245, 211, 126, 0.18), transparent 24%),
    linear-gradient(180deg, #242628 0%, #111318 68%, #090a0c 100%);
}

.entry-stage::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.entry-transitioning .brand-logo {
  transform: scale(1.8);
  opacity: 0;
  filter: blur(6px);
}

.entry-transitioning .entry-stage::before {
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 228, 132, 0.62), transparent 30%),
    linear-gradient(180deg, #242628 0%, #111318 68%, #090a0c 100%);
}

.start-layout {
  color: var(--ink);
}

.brand-logo {
  width: min(100%, 540px);
  display: grid;
  justify-items: center;
  gap: 16px;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
  transition: transform 900ms ease, opacity 900ms ease, filter 900ms ease;
}

.brand-logo:hover .logo-crop,
.brand-logo:focus-visible .logo-crop {
  transform: translateY(-2px);
  filter: drop-shadow(0 26px 38px rgba(245, 194, 74, 0.2));
}

.brand-logo:focus-visible {
  outline: 3px solid rgba(36, 87, 214, 0.38);
  outline-offset: 8px;
  border-radius: 8px;
}

.logo-crop {
  width: min(100%, 520px);
  aspect-ratio: 1 / 1;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38);
  transition: transform 180ms ease, filter 180ms ease;
}

.logo-image {
  width: 100%;
  height: auto;
  display: block;
}

.visually-hidden {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.tap-hint {
  color: rgba(255, 255, 255, 0.56);
  font-size: 14px;
  font-weight: 500;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.results-main h1 {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: clamp(42px, 8vw, 76px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0;
}

.welcome-card,
.question-panel,
.score-grid > div,
.review-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(17, 19, 24, 0.08);
}

.welcome-card {
  width: min(100%, 560px);
  display: grid;
  justify-items: center;
  gap: 20px;
  padding: clamp(22px, 5vw, 34px);
}

.welcome-logo {
  width: clamp(160px, 46vw, 230px);
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 18px 34px rgba(17, 19, 24, 0.16);
}

.welcome-copy {
  display: grid;
  gap: 6px;
}

.welcome-kicker {
  margin-bottom: 0;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 500;
}

.welcome-copy h1 {
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: clamp(36px, 7vw, 54px);
  font-weight: 500;
  line-height: 1;
}

.welcome-copy > p:not(.welcome-kicker) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.creator-credit {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.creator-credit p {
  margin-bottom: 0;
}

.welcome-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}

.welcome-stats > div {
  min-width: 76px;
}

.welcome-stats strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  font-weight: 600;
}

.welcome-stats span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.welcome-focus {
  width: 100%;
  padding: 16px 18px;
  border-radius: 8px;
  background: #f0f2f5;
  text-align: left;
}

.welcome-focus p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.welcome-focus ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  line-height: 1.35;
}

.welcome-focus li::before {
  content: "- ";
}

.welcome-card .primary-action,
.welcome-card .light-action {
  width: 100%;
}

.editor-layout {
  display: grid;
  gap: 18px;
  padding: 12px 0 28px;
}

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

.editor-header h1 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 500;
  line-height: 1;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.editor-actions button,
.editor-actions .editor-command-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  min-height: 46px;
  padding: 0 16px;
  color: white;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.editor-actions .light-action {
  border: 1px solid #3a414d;
  background: #3a414d;
}

.editor-actions .light-action:hover {
  background: #2f3540;
}

.secondary-editor-action {
  background: #6b7280;
}

.secondary-editor-action:hover {
  background: #555e6c;
}

.final-action {
  background: var(--green);
}

.final-action:hover {
  background: #11693a;
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

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

.question-list-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  text-align: left;
  cursor: grab;
}

.question-list-item strong {
  font-size: 17px;
  font-weight: 600;
}

.question-list-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.question-list-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.question-drag-grip {
  display: block;
  width: 14px;
  height: 34px;
  border-radius: 7px;
  opacity: 0.5;
  background-image: radial-gradient(circle, #667085 1.4px, transparent 1.8px);
  background-position: center;
  background-size: 6px 6px;
}

.question-list-item:hover .question-drag-grip,
.question-list-item.active .question-drag-grip,
.question-list-item.drop-target .question-drag-grip {
  opacity: 0.9;
}

.question-list-item:active {
  cursor: grabbing;
}

.question-list-item.dragging {
  opacity: 0.55;
  transform: scale(0.99);
}


.question-list-item:hover,
.question-list-item.active {
  border-color: var(--blue);
  background: #eef4ff;
}

.question-list-item.in-progress {
  border-color: rgba(217, 146, 0, 0.45);
  background: #fff8e8;
}

.question-list-item.ready {
  border-color: rgba(22, 131, 71, 0.42);
  background: #eef8f2;
}

.question-list-item.in-progress.active,
.question-list-item.in-progress:hover,
.question-list-item.ready.active,
.question-list-item.ready:hover {
  border-color: var(--blue);
  background: #eef4ff;
}

.question-list-item.in-progress.drop-target,
.question-list-item.ready.drop-target,
.question-list-item.drop-target {
  border-color: var(--blue);
  background: #eef4ff;
  box-shadow: 0 0 0 3px rgba(42, 94, 235, 0.14);
}

.editor-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 14px 30px rgba(17, 19, 24, 0.08);
}

.editor-meta-panel {
  box-shadow: 0 10px 22px rgba(17, 19, 24, 0.055);
}

.draft-workflow-panel {
  border-color: rgba(36, 87, 214, 0.22);
  background: #f7faff;
  box-shadow: 0 10px 22px rgba(36, 87, 214, 0.06);
}

.draft-workflow-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.workflow-guide-button {
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: white;
  color: var(--blue);
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.workflow-guide-button:hover {
  background: #eef4ff;
}

.workflow-guide-panel {
  border-top: 1px solid rgba(36, 87, 214, 0.18);
  padding-top: 14px;
}

.workflow-guide-panel ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.workflow-guide-panel strong {
  color: var(--ink);
}

.week-panel {
  gap: 14px;
}

.game-library-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.week-picker {
  width: min(180px, 100%);
  display: grid;
  gap: 6px;
  flex: 0 0 180px;
}

.week-picker span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.week-picker select {
  min-height: 44px;
}

.editor-section-title {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

.editor-helper-text {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.game-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.game-list-item {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  color: var(--ink);
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.game-list-item strong {
  font-size: 14px;
  font-weight: 600;
}

.game-list-item span,
.game-list-item em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.game-list-item.final em {
  color: var(--green);
  font-weight: 600;
}

.game-list-item.saved em {
  color: var(--blue);
  font-weight: 600;
}

.game-list-item.submitted em {
  color: var(--green);
  font-weight: 600;
}

.game-list-item:hover,
.game-list-item.active {
  border-color: var(--blue);
  background: #eef4ff;
}

.week-variety-summary {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(22, 131, 71, 0.22);
  border-radius: 8px;
  background: #f2faf5;
  padding: 10px 12px;
}

.week-variety-summary.over-limit {
  border-color: rgba(217, 146, 0, 0.38);
  background: #fff8e8;
}

.week-variety-summary strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.week-variety-summary span {
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
}

.week-variety-summary.over-limit span {
  color: #9b5f00;
}

.week-variety-summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.draft-review-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 12px;
}

.draft-review-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.draft-review-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.draft-review-item button {
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.draft-review-item button:hover {
  background: #303540;
}

.editor-panel label {
  display: grid;
  gap: 6px;
}

.editor-panel label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.editor-panel input,
.editor-panel select,
.editor-panel textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 11px 12px;
}

.editor-panel textarea {
  resize: vertical;
  min-height: 92px;
}

.editor-panel input:focus,
.editor-panel select:focus,
.editor-panel textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(36, 87, 214, 0.16);
}

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

.editor-row.two-columns {
  grid-template-columns: minmax(0, 1.2fr) minmax(160px, 0.8fr);
}

.editor-row.four-columns {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.readiness-check-panel {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

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

.readiness-check-item {
  display: flex !important;
  align-items: flex-start;
  gap: 8px !important;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 10px;
  cursor: pointer;
}

.readiness-check-item:hover {
  border-color: rgba(22, 131, 71, 0.34);
  background: #eef8f2;
}

.editor-panel .readiness-check-item input {
  width: auto;
  margin-top: 2px;
}

.editor-panel .readiness-check-item span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-transform: none;
}

.editor-readiness-summary {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.readiness-complete {
  color: var(--green);
  font-weight: 600;
}

.readiness-pending {
  color: var(--muted);
}

.editor-readiness-summary ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.editor-readiness-summary li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
}

.editor-readiness-summary li.ready {
  border-left: 3px solid rgba(22, 131, 71, 0.7);
  background: #eef8f2;
}

.editor-readiness-summary li.pending {
  border-left: 3px solid rgba(217, 146, 0, 0.75);
  background: #fff8e8;
}

.editor-readiness-summary li strong {
  color: var(--ink);
  font-size: 13px;
}

.editor-readiness-summary li span {
  color: var(--muted);
  font-size: 13px;
}

.editor-saved-state {
  min-height: 26px;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
}

.draft-json-output {
  min-height: 180px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  color: var(--ink);
  font: 12px / 1.45 var(--font-mono);
  padding: 12px;
}

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

.tier-preview span {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.tier-preview span:nth-child(1) {
  background: var(--amber);
}

.tier-preview span:nth-child(2) {
  background: var(--teal);
}

.tier-preview span:nth-child(3) {
  background: var(--blue);
}

.tier-preview span:nth-child(4) {
  background: var(--plum);
}

.game-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  gap: 18px;
  align-items: start;
}

.game-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
}

.tier-pyramid {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(215, 175, 99, 0.24);
  border-radius: 8px;
  background: var(--deep);
  box-shadow: 0 18px 34px rgba(17, 19, 24, 0.16);
}

.tier-pyramid-title {
  margin-bottom: 0;
  color: rgba(245, 230, 196, 0.86);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
}

.tier-track {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 8px;
}

.tier-step {
  min-height: 60px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.58);
  text-align: center;
  opacity: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tier-step:nth-child(1) {
  width: 100%;
}

.tier-step:nth-child(2) {
  width: 88%;
}

.tier-step:nth-child(3) {
  width: 76%;
}

.tier-step:nth-child(4) {
  width: 64%;
}

.tier-name {
  font-size: 13px;
  font-weight: 600;
}

.tier-range {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.42);
}

.tier-step.complete {
  border-color: rgba(215, 175, 99, 0.42);
  background: rgba(215, 175, 99, 0.12);
  color: rgba(255, 255, 255, 0.86);
}

.tier-step.complete .tier-range {
  color: rgba(245, 230, 196, 0.66);
}

.tier-step.active {
  border-color: rgba(247, 223, 158, 0.92);
  background: var(--gold);
  color: #111318;
  outline: 0;
  box-shadow:
    0 14px 24px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.tier-step.active .tier-range {
  color: rgba(17, 19, 24, 0.62);
}

.primary-action,
.secondary-action,
.light-action {
  border: 0;
  border-radius: 8px;
  min-height: 50px;
  padding: 0 20px;
  font-weight: 600;
  cursor: pointer;
}

.primary-action {
  background: var(--blue);
  color: white;
}

.primary-action:hover {
  background: #1d47ad;
}

.light-action {
  border: 2px solid var(--line);
  background: white;
  color: var(--ink);
}

.light-action:hover {
  border-color: var(--blue);
}

.secondary-action,
.ghost-action {
  display: none;
}

.secondary-action.show {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.secondary-action {
  background: var(--ink);
  color: white;
}

.secondary-action:hover {
  background: #303540;
}

.ghost-action {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 50px;
  padding: 0 20px;
  background: white;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

.ghost-action.show {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ghost-action:hover {
  border-color: var(--blue);
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.game-header h1 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 42px);
  font-weight: 500;
  line-height: 1.04;
}

.timer-wrap {
  display: grid;
  justify-items: center;
}

.timer-hourglass {
  --timer-progress: 1;
  --timer-elapsed: 0;
  width: 112px;
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--ink);
}

.hourglass-icon {
  width: 74px;
  height: 104px;
  position: relative;
  display: block;
  filter: drop-shadow(0 12px 12px rgba(17, 19, 24, 0.16));
}

.hourglass-cap {
  position: absolute;
  left: 50%;
  z-index: 4;
  width: 64px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid rgba(34, 24, 17, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 236, 180, 0.72), transparent 42%),
    linear-gradient(90deg, #53351f, #c5964c 21%, #5a3921 48%, #d2a35a 76%, #43291b);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 216, 0.5),
    0 2px 3px rgba(17, 19, 24, 0.2);
  transform: translateX(-50%);
}

.hourglass-cap.top {
  top: 2px;
}

.hourglass-cap.bottom {
  bottom: 2px;
}

.hourglass-post {
  position: absolute;
  top: 9px;
  bottom: 9px;
  z-index: 4;
  width: 9px;
  border: 1px solid rgba(34, 24, 17, 0.48);
  border-radius: 999px;
  background:
    repeating-linear-gradient(180deg, transparent 0 8px, rgba(255, 231, 173, 0.18) 8px 12px),
    linear-gradient(90deg, #3b2418, #bf8f47 44%, #4b2d1c 100%);
  box-shadow:
    inset 1px 0 0 rgba(255, 239, 196, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.18);
}

.hourglass-post.left {
  left: 5px;
}

.hourglass-post.right {
  right: 5px;
}

.hourglass-glass {
  position: absolute;
  inset: 10px 17px;
  z-index: 3;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.48) 0 9%, transparent 18% 66%, rgba(255, 255, 255, 0.38) 78%, transparent 100%),
    rgba(170, 188, 209, 0.3);
  clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%, 40% 50%);
}

.hourglass-glass::after {
  content: "";
  position: absolute;
  inset: 3px 4px;
  z-index: 1;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.46) 0 13%, transparent 30% 70%, rgba(255, 255, 255, 0.34) 82%, transparent 100%),
    rgba(255, 253, 246, 0.14);
  clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%, 40% 50%);
}

.hourglass-glass::before {
  content: "";
  position: absolute;
  inset: 5px 8px 5px 10px;
  z-index: 1;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.72), transparent 36%);
  clip-path: polygon(0 0, 45% 0, 38% 48%, 44% 100%, 0 100%, 28% 50%);
  opacity: 0.76;
}

.hourglass-sand-mask {
  position: absolute;
  left: 50%;
  z-index: 1;
  width: 36px;
  height: 35px;
  overflow: hidden;
  transform: translateX(-50%);
}

.hourglass-sand-mask.top {
  top: 17px;
  clip-path: polygon(0 0, 100% 0, 62% 100%, 38% 100%);
}

.hourglass-sand-mask.bottom {
  bottom: 17px;
  clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%);
}

.hourglass-top-sand,
.hourglass-bottom-sand,
.hourglass-stream {
  position: absolute;
  left: 50%;
  background:
    radial-gradient(circle at 45% 55%, rgba(255, 229, 151, 0.55) 0 2px, transparent 2px 4px),
    var(--timer-color, var(--gold));
  transform: translateX(-50%);
}

.hourglass-top-sand {
  bottom: 0;
  width: 100%;
  height: 100%;
  transform: translateX(-50%) scaleY(var(--timer-progress));
  transform-origin: bottom;
  clip-path: polygon(0 0, 100% 0, 58% 100%, 42% 100%);
}

.hourglass-stream {
  top: 43px;
  z-index: 2;
  width: 3px;
  height: 28px;
  border-radius: 999px;
  opacity: calc(var(--timer-progress) * 0.9);
}

.hourglass-bottom-sand {
  bottom: 0;
  width: 100%;
  height: 100%;
  transform: translateX(-50%) scaleY(var(--timer-elapsed));
  transform-origin: bottom;
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
}

.timer-count {
  min-width: 34px;
  min-height: 26px;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

.question-panel {
  padding: clamp(18px, 2.6vw, 26px);
  box-shadow: 0 10px 24px rgba(17, 19, 24, 0.055);
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.question-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  background: #eef2f8;
  color: #273142;
  font-size: 12px;
  font-weight: 500;
}

.prompt {
  min-height: 56px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: clamp(23px, 3.5vw, 34px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
}

.signal-line {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
  font-size: clamp(28px, 6vw, 46px);
  font-weight: 600;
  letter-spacing: 0;
}

.letter-blue {
  color: var(--blue);
}

.letter-red {
  color: var(--red);
}

.letter-green {
  color: var(--green);
}

.letter-amber {
  color: var(--amber);
}

.color-scan-question,
.pane-word-question {
  display: block;
  margin-bottom: 18px;
}

.color-scan-line {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(208, 169, 92, 0.48);
  border-radius: 8px;
  background: #fbf8f0;
  padding: clamp(14px, 2vw, 22px);
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 900;
  line-height: 1;
}

.gold-letter {
  color: #b88a2d;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.color-scan-line span:not(.gold-letter) {
  color: rgba(80, 89, 105, 0.34);
}

.pane-word-clue {
  display: block;
  width: min(100%, 520px);
  border: 1px solid rgba(208, 169, 92, 0.5);
  border-radius: 8px;
  background: linear-gradient(180deg, #f7fbff, #eef4fb);
  padding: clamp(12px, 2vw, 18px);
}

.pane-word-clue svg {
  display: block;
  width: 100%;
  height: auto;
}

.pane-word-clue rect {
  fill: rgba(255, 255, 255, 0.45);
  stroke: rgba(47, 65, 88, 0.24);
  stroke-width: 2;
}

.pane-word-clue text {
  fill: transparent;
  stroke: #192435;
  stroke-width: 4;
  stroke-linejoin: round;
  font-family: var(--font-display);
  font-size: 88px;
  font-weight: 900;
  letter-spacing: 5px;
}

.pane-word-clue text:nth-of-type(1) {
  stroke: #1f5d8f;
}

.pane-word-clue text:nth-of-type(2) {
  stroke: #d0a95c;
}

.pane-word-clue text:nth-of-type(3) {
  stroke: #182235;
}

.rebus-question,
.rebus-clue {
  display: flex;
}

.rebus-question {
  margin-bottom: 18px;
}

.letter-grid-question {
  display: block;
  margin-bottom: 18px;
}

.letter-grid-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(14px, 2vw, 22px);
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(208, 169, 92, 0.48);
  border-radius: 8px;
  background: #fbf8f0;
  padding: clamp(14px, 2.2vw, 22px);
}

.letter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(42px, 56px));
  gap: 6px;
}

.letter-cell {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8fb;
  font-family: var(--font-sans);
  font-size: clamp(23px, 4vw, 30px);
  font-weight: 800;
  line-height: 1;
}

.letter-cell.start {
  border-color: rgba(215, 175, 99, 0.75);
  background: #fff4dc;
  color: #10141d;
}

.letter-cell.start::after {
  content: "START";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--deep);
  color: #fff7e8;
  padding: 2px 6px;
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0;
}

.letter-path-note {
  max-width: 260px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: clamp(17px, 2.3vw, 22px);
  font-weight: 650;
  line-height: 1.25;
}

.move-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.move-chip {
  border-radius: 999px;
  border: 1px solid rgba(17, 19, 24, 0.12);
  background: #ffffff;
  padding: 5px 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.rebus-clue {
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(10px, 1.8vw, 18px);
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(208, 169, 92, 0.48);
  border-radius: 8px;
  background: #fbf8f0;
  padding: clamp(14px, 2.2vw, 22px);
}

.rebus-letter,
.rebus-plus {
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 800;
  line-height: 1;
}

.rebus-letter {
  min-width: clamp(40px, 7vw, 62px);
  font-size: clamp(40px, 8vw, 72px);
}

.rebus-word {
  min-width: auto;
  font-size: clamp(34px, 6vw, 56px);
}

.rebus-plus {
  color: var(--muted);
  font-size: clamp(26px, 4vw, 38px);
}

.rebus-crib {
  position: relative;
  width: clamp(86px, 13vw, 128px);
  height: clamp(58px, 8vw, 82px);
  display: flex;
  align-items: stretch;
  justify-content: space-evenly;
  border: 5px solid #2d4158;
  border-top-width: 7px;
  border-radius: 8px 8px 5px 5px;
  background: linear-gradient(180deg, #f7f1e4 0 42%, #dce8f4 42% 100%);
  box-shadow: inset 0 -6px 0 rgba(45, 65, 88, 0.12);
}

.rebus-crib::before,
.rebus-crib::after {
  content: "";
  position: absolute;
  bottom: -11px;
  width: 16px;
  height: 10px;
  border-radius: 0 0 7px 7px;
  background: #2d4158;
}

.rebus-crib::before {
  left: 10px;
}

.rebus-crib::after {
  right: 10px;
}

.rebus-crib span {
  width: 5px;
  border-radius: 99px;
  background: #2d4158;
  opacity: 0.75;
}

.rebus-ant {
  position: relative;
  width: clamp(92px, 14vw, 136px);
  height: clamp(58px, 8vw, 82px);
  display: inline-block;
}

.ant-body,
.ant-head {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(135deg, #241611, #5b3324 62%, #8a5c39);
  box-shadow: inset 0 4px 8px rgba(255, 255, 255, 0.16),
    0 3px 8px rgba(17, 19, 24, 0.22);
}

.ant-body {
  left: 24%;
  width: 50%;
  height: 48%;
}

.ant-head {
  right: 9%;
  width: 28%;
  height: 36%;
}

.ant-head::before,
.ant-head::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 22px;
  height: 16px;
  border-top: 3px solid #4b2d21;
  border-radius: 999px;
}

.ant-head::before {
  right: 4px;
  transform: rotate(-30deg);
}

.ant-head::after {
  right: -6px;
  transform: rotate(26deg);
}

.ant-leg {
  position: absolute;
  left: 42%;
  width: 3px;
  height: 44%;
  border-radius: 999px;
  background: #4b2d21;
  transform-origin: top;
}

.leg-one {
  top: 12%;
  left: 32%;
  transform: rotate(-42deg);
}

.leg-two {
  bottom: 10%;
  left: 32%;
  transform: rotate(42deg);
}

.leg-three {
  top: 6%;
  left: 48%;
  transform: rotate(-12deg);
}

.leg-four {
  bottom: 6%;
  left: 48%;
  transform: rotate(12deg);
}

.leg-five {
  top: 14%;
  left: 64%;
  transform: rotate(42deg);
}

.leg-six {
  bottom: 12%;
  left: 64%;
  transform: rotate(-42deg);
}

.color-path-question {
  display: block;
  margin-bottom: 18px;
}

.color-path {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(8px, 1.5vw, 14px);
  max-width: 100%;
  border: 1px solid rgba(208, 169, 92, 0.48);
  border-radius: 8px;
  background: #fbf8f0;
  padding: clamp(14px, 2.2vw, 22px);
}

.color-tile {
  display: inline-grid;
  place-items: center;
  min-width: clamp(68px, 9vw, 104px);
  min-height: 42px;
  border: 1px solid rgba(15, 20, 29, 0.18);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: clamp(0.78rem, 1.5vw, 0.95rem);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  box-shadow: 0 10px 20px rgba(15, 20, 29, 0.12);
}

.color-tile.red {
  background: #c73a3a;
}

.color-tile.orange {
  background: #d9781c;
}

.color-tile.yellow {
  background: #e0b84f;
  color: #111318;
}

.color-tile.green {
  background: #168347;
}

.color-tile.blue {
  background: #2457d6;
}

.color-tile.indigo {
  background: #4038a8;
}

.color-tile.violet {
  background: #7a3ea6;
}

.color-tile.mystery {
  background: #10141d;
  color: #f2d784;
}

.color-arrow {
  color: var(--muted);
  font-weight: 900;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.choice-button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--ink);
  padding: 11px 14px;
  font-size: clamp(16px, 2.1vw, 18px);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.choice-button:hover:not(:disabled) {
  border-color: var(--blue);
  background: white;
}

.choice-button.selected {
  border-color: var(--green);
  background: #eef8f2;
  box-shadow: inset 0 0 0 1px var(--green);
}

.choice-button.correct {
  border-color: var(--green);
  background: #eef8f2;
}

.choice-button.wrong {
  border-color: var(--red);
  background: #fff0ef;
}

.choice-button:disabled {
  cursor: default;
}

.visual-choice-button {
  padding: 10px;
  min-height: 138px;
}

.choice-art {
  display: block;
  position: relative;
  min-height: 116px;
  border: 1px solid rgba(55, 66, 84, 0.16);
  border-radius: 7px;
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.28), transparent 42%),
    linear-gradient(155deg, #d5ebf3 0%, #b9d7e5 52%, #f2e5bd 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.choice-art::before,
.choice-art::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
}

.choice-art::before {
  left: -8%;
  right: -8%;
  bottom: -16px;
  height: 42px;
  background: rgba(46, 77, 88, 0.12);
  transform: rotate(-3deg);
}

.choice-art::after {
  left: 9%;
  top: 12%;
  width: 45%;
  height: 38%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  filter: blur(6px);
}

.art-shape {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 4px 5px rgba(18, 26, 38, 0.22));
}

.art-shape.circle {
  width: var(--shape-size);
  height: var(--shape-size);
  border-radius: 999px;
  background: var(--shape-color);
}

.art-shape.square {
  width: var(--shape-size);
  height: var(--shape-size);
  border-radius: 4px;
  background: var(--shape-color);
}

.art-shape.triangle {
  width: 0;
  height: 0;
  background: transparent;
  border-left: var(--shape-half) solid transparent;
  border-right: var(--shape-half) solid transparent;
  border-bottom: var(--shape-size) solid var(--shape-color);
}

.submit-answer-button {
  justify-self: end;
  min-width: 180px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: white;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.submit-answer-button:hover:not(:disabled) {
  background: #252a33;
  transform: translateY(-1px);
}

.submit-answer-button:disabled {
  cursor: default;
  opacity: 0.42;
}

.submit-answer-button.hide {
  display: none;
}

.answer-state {
  min-height: 0;
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.answer-state strong {
  color: var(--ink);
  font-weight: 600;
}

.question-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 14px;
}

.results-layout {
  align-content: start;
}

.results-main {
  padding-top: 34px;
}

.result-subtitle {
  max-width: 700px;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.35;
}

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

.score-grid > div {
  padding: 16px;
}

.score-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.score-grid strong {
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 600;
  line-height: 1;
}

.dashboard-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 24px rgba(17, 19, 24, 0.055);
}

.dashboard-panel h2 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 500;
  line-height: 1.08;
}

.dashboard-kicker {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

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

.pressure-card {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.pressure-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.pressure-card strong {
  font-size: 20px;
  font-weight: 600;
}

.pressure-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.tier-path {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
}

.tier-path-step {
  min-height: 62px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  color: var(--muted);
  text-align: center;
}

.tier-path-step strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.tier-path-step span {
  font-size: 11px;
  font-weight: 600;
}

.tier-path-step.correct {
  border-color: rgba(22, 131, 71, 0.32);
  background: #eef8f2;
}

.tier-path-step.wrong {
  border-color: rgba(199, 58, 58, 0.32);
  background: #fff0ef;
}

.tier-path-step.practice {
  border-style: dashed;
}

.tier-path-step.skipped {
  opacity: 0.58;
}

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

.review-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.review-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef2f8;
  font-weight: 600;
}

.review-item p {
  margin: 0;
  color: var(--muted);
}

.review-status {
  font-weight: 600;
}

.review-status.correct {
  color: var(--green);
}

.review-status.wrong {
  color: var(--red);
}

.review-status.practice {
  color: var(--blue);
}

@media (max-width: 900px) {
  .game-stage {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .game-sidebar {
    display: contents;
    position: static;
  }

  .timer-wrap {
    order: -2;
    margin: 0 auto;
  }

  .question-panel {
    order: -1;
  }

  .tier-pyramid {
    order: 1;
    margin: 0 auto;
  }

  .timer-wrap,
  .tier-pyramid {
    width: min(100%, 440px);
  }

  .tier-track {
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 18px 12px;
  }

  .entry-stage,
  .start-layout {
    width: 100%;
  }

  .editor-header {
    align-items: stretch;
    flex-direction: column;
  }

  .draft-workflow-heading,
  .game-library-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .week-picker {
    width: 100%;
    flex-basis: auto;
  }

  .workflow-guide-button {
    width: 100%;
  }

  .editor-actions {
    justify-content: stretch;
  }

  .editor-actions button,
  .editor-actions .editor-command-link {
    flex: 1 1 160px;
  }

  .editor-grid,
  .editor-row.two-columns,
  .editor-row.four-columns,
  .readiness-check-grid,
  .draft-review-item {
    grid-template-columns: 1fr;
  }

  .editor-readiness-summary li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

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

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

  .game-header {
    align-items: flex-start;
  }

  .choice-grid,
  .score-grid,
  .pressure-read {
    grid-template-columns: 1fr;
  }

  .tier-path {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .tier-step {
    min-height: 42px;
  }

  .question-panel {
    padding: 16px;
  }

  .submit-answer-button {
    justify-self: stretch;
    width: 100%;
  }

  .prompt {
    min-height: 0;
  }

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

  .review-status {
    grid-column: 2;
  }
}

@media (max-width: 460px) {
  .question-list {
    grid-template-columns: 1fr;
  }

  .game-list {
    grid-template-columns: 1fr;
  }

  .timer-hourglass {
    width: 92px;
  }

  .hourglass-icon {
    width: 62px;
    height: 88px;
  }

  .timer-count {
    font-size: 22px;
  }

  .tier-path {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
