:root {
  --viewport-height: 100svh;
  --ink: #17324d;
  --muted: #596878;
  --paper: #fff9ec;
  --paper-soft: #f4ead7;
  --line: #caa87a;
  --brand: #1f5fbf;
  --brand-dark: #174783;
  --brand-soft: #dceafb;
  --accent: #f3b72b;
  --accent-soft: #fff0bd;
  --workshop-red: #e84b32;
  --workshop-red-soft: #fbded6;
  --wood: #d6a565;
  --wood-light: #efcf9c;
  --danger: #b43b2d;
  --danger-soft: #fbded6;
  --shadow: 9px 10px 0 rgba(23, 50, 77, 0.16), 0 18px 42px rgba(66, 44, 20, 0.12);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(rgba(31, 95, 191, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 95, 191, 0.065) 1px, transparent 1px),
    radial-gradient(circle at 14% 18%, rgba(243, 183, 43, 0.32), transparent 28%),
    radial-gradient(circle at 86% 80%, rgba(232, 75, 50, 0.16), transparent 32%),
    #dfbd87;
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
}

button,
input {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #2369bf;
  outline-offset: 3px;
}

button {
  border: 0;
}

.hidden {
  display: none !important;
}

.page-shell {
  height: var(--viewport-height);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
}

.site-header {
  min-height: 58px;
  padding: max(10px, env(safe-area-inset-top)) 20px 6px;
  display: flex;
  align-items: center;
}

.site-logo {
  display: inline-flex;
}

.site-logo img {
  display: block;
  width: min(178px, 38vw);
  height: 42px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.72));
}

.site-footer {
  min-height: 34px;
  padding: 6px 12px max(6px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer a {
  color: var(--brand-dark);
  font-weight: 400;
}

body:not([data-view="menu"]) .site-header,
body:not([data-view="menu"]) .site-footer,
body.dialog-open .site-header,
body.dialog-open .site-footer {
  display: none;
}

body:not([data-view="menu"]) .page-shell,
body.dialog-open .page-shell {
  grid-template-rows: minmax(0, 1fr);
  padding-top: max(62px, calc(env(safe-area-inset-top) + 58px));
  padding-bottom: env(safe-area-inset-bottom);
}

.game-main,
.screen {
  min-height: 0;
}

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

.menu-screen,
.result-screen,
.phase-screen,
.play-screen {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.menu-screen {
  height: 100%;
  display: grid;
  align-content: safe center;
  padding: 12px 0;
}

.menu-layout,
.pending-panel,
.play-shell,
.phase-card,
.result-layout,
.dialog-card {
  background:
    radial-gradient(circle at 16px 16px, #9a754b 0 2px, #e1c28d 2.5px 4px, transparent 4.5px),
    radial-gradient(circle at calc(100% - 16px) 16px, #9a754b 0 2px, #e1c28d 2.5px 4px, transparent 4.5px),
    linear-gradient(135deg, rgba(255,255,255,0.56), transparent 45%),
    var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
}

.menu-layout {
  min-height: min(560px, 100%);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 54px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.eyebrow,
.phase-label {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 0.79rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 10px;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.94;
  letter-spacing: -0.065em;
}

h1,
h2,
h3,
button,
summary {
  font-family: "Arial Rounded MT Bold", "Avenir Next", Inter, ui-sans-serif, system-ui, sans-serif;
}

.lead {
  margin-bottom: 18px;
  color: var(--brand-dark);
  font-size: clamp(1.25rem, 2.1vw, 1.75rem);
  font-weight: 760;
}

.intro-copy {
  max-width: 670px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.6;
}

.menu-actions,
.result-actions,
.pending-actions,
.resume-actions,
.training-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.menu-actions {
  align-items: center;
}

.primary-button,
.secondary-button,
.text-button {
  min-height: 48px;
  border-radius: 12px;
  padding: 11px 22px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.primary-button {
  color: white;
  background: var(--brand);
  border: 2px solid var(--ink);
  box-shadow: 0 5px 0 var(--ink), 0 10px 20px rgba(31, 95, 191, 0.2);
}

.secondary-button {
  color: var(--brand-dark);
  background: var(--accent-soft);
  border: 2px solid var(--ink);
  box-shadow: 0 4px 0 rgba(23, 50, 77, 0.8);
}

.text-button {
  color: var(--ink);
  background: transparent;
  padding-inline: 14px;
}

.primary-button:hover,
.secondary-button:hover,
.text-button:hover {
  transform: translateY(-1px);
}

.primary-button:active,
.secondary-button:active,
.text-button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

#start-button {
  min-width: 250px;
  min-height: 56px;
  color: white;
  background: #16724f;
  box-shadow: 0 6px 0 var(--ink), 0 12px 24px rgba(22, 114, 79, 0.28);
  font-size: 1.08rem;
}

#start-button::after {
  content: "→";
  margin-left: 10px;
  font-size: 1.25em;
}

#start-button:hover {
  background: #0f6544;
}

#rules-button {
  width: auto;
  min-height: 44px;
  padding: 8px 6px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
  font-size: 0.92rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

#rules-button:hover {
  color: var(--brand-dark);
  box-shadow: none;
}

#rules-button:active {
  box-shadow: none;
  transform: translateY(1px);
}

.danger-text {
  color: var(--danger);
}

.menu-info {
  position: relative;
  border-radius: 22px;
  padding: clamp(18px, 3vw, 30px);
  background: #ead2a7;
  border: 3px solid var(--ink);
  box-shadow: inset 0 0 0 5px rgba(255,255,255,0.28), 6px 7px 0 rgba(23, 50, 77, 0.14);
}

.step-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.step-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 13px;
  align-items: center;
}

.step-list li > span {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--brand-dark);
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: none;
  font-weight: 850;
}

.step-list strong,
.step-list small {
  display: block;
}

.step-list strong {
  font-size: 1.02rem;
}

.step-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.35;
}

.privacy-note {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(35, 91, 70, 0.18);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.resume-panel {
  width: min(920px, 100%);
  min-height: 0;
  margin: auto;
  border-radius: 28px;
  padding: clamp(24px, 3.5vw, 42px);
  background:
    radial-gradient(circle at 16px 16px, #9a754b 0 2px, #e1c28d 2.5px 4px, transparent 4.5px),
    radial-gradient(circle at calc(100% - 16px) 16px, #9a754b 0 2px, #e1c28d 2.5px 4px, transparent 4.5px),
    var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
}

.resume-heading {
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 146px;
  gap: 22px;
  align-items: center;
}

.resume-heading-copy {
  min-width: 0;
}

.menu-screen.has-complete-session .menu-layout {
  display: none;
}

.resume-title {
  margin-bottom: 8px;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.resume-lead {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.45;
}

.resume-meter {
  width: 146px;
  padding: 8px 8px 5px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper-soft);
  box-shadow: 0 4px 0 rgba(23, 50, 77, 0.5);
  text-align: center;
}

.resume-meter > span {
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 850;
}

.resume-meter .resume-gauge {
  width: 126px;
  margin: -7px auto -1px;
}

.resume-gauge .resume-gauge-fill {
  stroke: url(#resume-gauge-gradient);
}

.resume-meter .resume-gauge strong {
  left: 0;
  bottom: 5px;
  width: 100%;
  padding: 0;
  transform: none;
  background: transparent;
  font-size: 1.32rem;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    -1px -1px 0 var(--paper-soft),
    1px -1px 0 var(--paper-soft),
    -1px 1px 0 var(--paper-soft),
    1px 1px 0 var(--paper-soft);
}

.resume-journey {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.resume-journey li {
  min-height: 76px;
  padding: 12px 14px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 2px solid rgba(23, 50, 77, 0.26);
}

.resume-journey li > span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 850;
}

.resume-journey .is-complete {
  color: var(--ink);
  background: rgba(255, 249, 236, 0.64);
}

.resume-journey .is-complete > span {
  color: var(--brand);
  background: var(--paper);
  border: 2px solid var(--ink);
}

.resume-journey .is-next {
  background: var(--accent-soft);
  border-color: var(--ink);
  box-shadow: 0 4px 0 var(--ink);
}

.resume-journey .is-next > span {
  color: white;
  background: var(--brand);
}

.resume-journey strong,
.resume-journey small {
  display: block;
}

.resume-journey small {
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.3;
}

.resume-journey .journey-action {
  min-width: 168px;
  white-space: nowrap;
}

#resume-new-check-button,
#resume-result-button {
  min-width: 0;
  min-height: 44px;
  padding-inline: 10px;
  color: var(--muted);
  border: 0;
  box-shadow: none;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

#resume-new-check-button:hover,
#resume-new-check-button:active,
#resume-result-button:hover,
#resume-result-button:active {
  color: var(--brand-dark);
  box-shadow: none;
}

.fullscreen-button {
  position: fixed;
  z-index: 20;
  top: max(10px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--accent);
  border: 2px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink), 0 8px 18px rgba(23, 50, 77, 0.16);
  cursor: pointer;
}

.fullscreen-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fullscreen-icon-exit,
.fullscreen-button[aria-pressed="true"] .fullscreen-icon-enter {
  display: none;
}

.fullscreen-button[aria-pressed="true"] .fullscreen-icon-exit {
  display: block;
}

.play-screen {
  width: min(1040px, calc(100% - 24px));
  height: 100%;
  display: grid;
  align-items: safe center;
  padding: 12px 0;
  position: relative;
}

.play-shell {
  width: 100%;
  max-height: 100%;
  border-radius: 26px;
  padding: clamp(14px, 2vw, 24px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px 20px;
}

.play-header {
  grid-column: 1 / -1;
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.play-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.phase-copy {
  display: grid;
  gap: 2px;
  padding: 5px 9px;
  border-radius: 11px;
  border: 2px solid transparent;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.phase-copy.is-starting {
  background: var(--accent);
  border-color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}

.phase-copy.is-starting .phase-label {
  color: var(--ink);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.phase-copy .phase-label {
  margin: 0;
}

.timer-chip {
  min-width: 132px;
  padding: 9px 16px;
  border-radius: 14px;
  display: grid;
  grid-template-columns: auto auto;
  gap: 10px;
  align-items: baseline;
  background: var(--accent-soft);
  border: 2px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}

.timer-chip span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.timer-chip strong {
  font-size: 1.42rem;
  font-variant-numeric: tabular-nums;
}

.time-track {
  grid-column: 1 / -1;
  height: 9px;
  overflow: hidden;
  border-radius: 4px;
  background: #dfc495;
  border: 2px solid var(--ink);
}

.time-bar {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.timer-chip.timer-normal,
.time-track.timer-normal .time-bar {
  background: #dbe9ff;
}

.time-track.timer-normal .time-bar {
  background: var(--brand);
}

.timer-chip.timer-middle {
  background: #ffeaa2;
}

.time-track.timer-middle .time-bar {
  background: #e7a900;
}

.timer-chip.timer-low,
.timer-chip.timer-final {
  background: #ffd1c8;
}

.time-track.timer-low .time-bar,
.time-track.timer-final .time-bar {
  background: var(--danger);
}

.timer-chip.timer-final {
  animation: timer-pulse 900ms ease-in-out infinite alternate;
}

@keyframes timer-pulse {
  from { box-shadow: 0 3px 0 var(--ink); }
  to { box-shadow: 0 3px 0 var(--ink), 0 0 0 5px rgba(239, 74, 51, 0.24); }
}

.screening-countdown {
  position: absolute;
  z-index: 12;
  inset: 50% auto auto 50%;
  width: min(420px, calc(100% - 40px));
  min-height: min(360px, calc(100% - 40px));
  transform: translate(-50%, -50%);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: var(--ink);
  text-align: center;
  border-radius: 28px;
  border: 4px solid var(--ink);
  background: var(--paper);
  box-shadow: 10px 12px 0 rgba(23, 50, 77, 0.72), 0 18px 45px rgba(23, 50, 77, 0.2);
}

.screening-countdown span,
.screening-countdown small {
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.screening-countdown span {
  color: var(--brand);
  font-size: clamp(1rem, 2vw, 1.3rem);
}

.screening-countdown strong {
  display: grid;
  place-items: center;
  width: clamp(128px, 18vw, 176px);
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  border: 5px solid var(--ink);
  box-shadow: 0 8px 0 var(--ink);
  font-size: clamp(5rem, 12vw, 8rem);
  line-height: 1;
}

.screening-countdown small {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.question-panel {
  grid-row: 3;
  min-height: 370px;
  border-radius: 22px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 28px;
  text-align: center;
  background:
    repeating-linear-gradient(0deg, transparent 0 37px, rgba(31, 95, 191, 0.08) 38px),
    linear-gradient(145deg, #fffaf0, #f7e8c9);
  border: 5px solid #b97838;
  outline: 2px solid var(--ink);
  box-shadow: inset 0 0 0 3px #edc98e, 5px 6px 0 rgba(23, 50, 77, 0.16);
}

.question-guidance {
  margin-bottom: 24px;
  color: var(--muted);
  font-weight: 700;
}

.question-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 3vw, 34px);
  font-size: clamp(3.7rem, 8vw, 7.2rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

.answer-display {
  min-width: 1.42em;
  min-height: 1.18em;
  padding: 0.08em 0.18em;
  border-radius: 0.14em;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--accent);
  border: 3px solid var(--ink);
  box-shadow: 0 0.08em 0 var(--ink);
  font-variant-numeric: tabular-nums;
}

.feedback {
  min-height: 28px;
  margin: 22px 0 0;
  color: var(--danger);
  font-size: 1.12rem;
  font-weight: 800;
}

.feedback.correct {
  color: #14583f;
}

.hint-ladder {
  width: min(100%, 620px);
  margin-top: 22px;
  padding: 10px;
  overflow-x: auto;
  display: grid;
  grid-template-columns: repeat(10, minmax(44px, 1fr));
  gap: 6px;
  border-radius: 10px;
  color: var(--brand-dark);
  background: #c88e4e;
  border: 3px solid var(--ink);
  font-variant-numeric: tabular-nums;
}

.hint-step {
  min-width: 42px;
  min-height: 40px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 2px solid var(--ink);
  box-shadow: 0 3px 0 rgba(23, 50, 77, 0.75);
  font-weight: 850;
}

.input-panel {
  grid-row: 3;
  border-radius: 22px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    var(--brand);
  background-size: 22px 22px, 22px 22px, auto;
  border: 3px solid var(--ink);
  box-shadow: 5px 6px 0 rgba(23, 50, 77, 0.18);
  align-self: stretch;
}

.keypad {
  flex: 1;
  height: auto;
  min-height: 330px;
  display: grid;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  grid-template-rows: repeat(4, minmax(58px, 1fr));
  gap: 9px;
}

.keypad button {
  min-width: 44px;
  min-height: 44px;
  border-radius: 9px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.55), transparent 50%),
    var(--wood-light);
  border: 2px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
  font-size: clamp(1.35rem, 2.7vw, 2rem);
  font-weight: 850;
}

.keypad button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

.keypad .keypad-secondary {
  color: white;
  background: var(--workshop-red);
  font-size: 1rem;
}

.support-actions {
  width: 100%;
  display: flex;
  gap: 9px;
}

.skip-button,
.hint-button {
  width: 100%;
  min-height: 44px;
  margin-top: 9px;
  border-radius: 9px;
  color: var(--paper);
  background: rgba(23, 50, 77, 0.22);
  border: 2px solid var(--paper);
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 800;
}

.hint-button {
  color: var(--ink);
  background: var(--accent);
  border-color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}

.hint-button:disabled {
  cursor: default;
  opacity: 0.5;
}

.skip-button:hover,
.hint-button:hover:not(:disabled) {
  color: var(--ink);
  background: var(--paper);
}

.skip-button:active,
.hint-button:active:not(:disabled) {
  transform: translateY(1px);
}

.input-hint {
  margin: 12px 0 0;
  color: rgba(255, 249, 236, 0.88);
  font-size: 0.82rem;
  text-align: center;
}

.phase-screen {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 20px 0;
}

.phase-card {
  width: min(620px, 100%);
  border-radius: 26px;
  padding: clamp(30px, 6vw, 62px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.phase-card::after {
  content: "×";
  position: absolute;
  right: 20px;
  bottom: -28px;
  color: rgba(31, 95, 191, 0.1);
  font-size: 9rem;
  font-weight: 900;
  line-height: 1;
  transform: rotate(-12deg);
  pointer-events: none;
}

.phase-card h2,
.result-heading h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4.8vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.phase-card p:not(.eyebrow) {
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.phase-card h2.training-focus-title {
  font-size: clamp(1.8rem, 3.7vw, 3rem);
  line-height: 1.08;
}

.phase-card p.phase-card-meta {
  margin-top: -16px;
  font-size: 0.92rem;
  font-weight: 850;
  letter-spacing: 0.015em;
  color: var(--brand-dark);
}

.training-summary-screen {
  height: 100%;
  padding: 14px 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
}

.training-summary-card {
  width: min(820px, 100%);
  border-radius: 26px;
  padding: clamp(24px, 4vw, 44px);
  text-align: center;
  background:
    radial-gradient(circle at 16px 16px, #9a754b 0 2px, #e1c28d 2.5px 4px, transparent 4.5px),
    var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
}

.training-summary-card h2 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.training-summary-card > p:not(.eyebrow) {
  color: var(--muted);
}

.training-summary-score {
  margin: 20px auto;
  display: grid;
  justify-items: center;
}

.training-summary-score strong {
  color: var(--brand-dark);
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 1;
}

.training-summary-score span {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 750;
}

.training-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  text-align: left;
}

.training-summary-grid section {
  border-radius: 16px;
  padding: 17px 20px;
  background: var(--brand-soft);
  border: 2px solid var(--ink);
  box-shadow: 0 4px 0 rgba(23, 50, 77, 0.7);
}

.training-summary-grid section:last-child {
  background: var(--accent-soft);
}

.training-summary-grid h3 {
  margin-bottom: 8px;
}

.training-summary-grid ul {
  margin: 0;
  padding-left: 21px;
  line-height: 1.5;
}

.training-summary-actions {
  margin-top: 20px;
  justify-content: center;
}

.result-screen {
  height: 100%;
  padding: 14px 0;
}

.result-layout {
  width: min(940px, 100%);
  margin: 0 auto;
  border-radius: 26px;
  padding: clamp(20px, 3.5vw, 42px);
}

.result-heading {
  text-align: center;
}

.result-heading p:last-child {
  color: var(--muted);
}

.result-overview {
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1.7fr);
  gap: 12px;
  margin: 18px 0;
}

.gauge-panel,
.result-components article {
  border-radius: 12px;
  background: var(--paper-soft);
  border: 2px solid var(--ink);
  box-shadow: 0 4px 0 rgba(23, 50, 77, 0.55);
}

.gauge-panel {
  min-height: 176px;
  padding: 12px 14px 9px;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.gauge-label {
  color: var(--brand-dark);
  font-weight: 850;
}

.gauge {
  position: relative;
  width: min(220px, 100%);
}

.gauge svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.gauge-track,
.gauge-fill {
  fill: none;
  stroke-width: 17;
  stroke-linecap: round;
}

.gauge-track {
  stroke: #d5b680;
}

.gauge-fill {
  stroke: url(#gauge-gradient);
  stroke-dasharray: 0 100;
  transition: stroke-dasharray 500ms ease;
}

.gauge strong {
  white-space: nowrap;
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  padding: 0 5px;
  border-radius: 6px;
  background: var(--paper-soft);
  font-size: 2.15rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.gauge small {
  position: absolute;
  left: 50%;
  bottom: -3px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.72rem;
}

.gauge-panel p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

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

.result-components article {
  min-height: 82px;
  padding: 11px 13px;
  display: grid;
  align-content: center;
  gap: 3px;
  text-align: center;
}

.result-components article:nth-child(1) {
  background: var(--brand-soft);
}

.result-components article:nth-child(2) {
  background: var(--accent-soft);
}

.result-components article:nth-child(3) {
  background: var(--workshop-red-soft);
}

.result-components article:nth-child(4) {
  background: #e7f1df;
}

.result-components span,
.result-components small {
  color: var(--muted);
}

.result-components span {
  font-size: 0.8rem;
}

.result-components strong {
  font-size: 1.28rem;
  font-variant-numeric: tabular-nums;
}

.result-components small {
  font-size: 0.74rem;
}

.result-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 22px 0;
}

.result-metrics article {
  min-height: 100px;
  border-radius: 10px;
  padding: 14px;
  display: grid;
  align-content: center;
  gap: 7px;
  text-align: center;
  background: var(--paper-soft);
  border: 2px solid var(--ink);
  box-shadow: 0 4px 0 rgba(23, 50, 77, 0.45);
}

.result-metrics span {
  color: var(--muted);
  font-size: 0.83rem;
}

.result-metrics strong {
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  font-variant-numeric: tabular-nums;
}

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

.strength-panel,
.recommendation-panel,
.details-panel,
.teacher-panel {
  margin-top: 14px;
  border-radius: 12px;
  padding: 17px 20px;
  background: var(--brand-soft);
  border: 2px solid var(--ink);
}

.strength-panel h3,
.recommendation-panel h3 {
  margin-bottom: 10px;
}

.strength-panel ul,
.recommendation-panel ul {
  margin: 0;
  padding-left: 21px;
  line-height: 1.55;
}

.recommendation-panel {
  background: var(--accent-soft);
}

.details-panel,
.teacher-panel {
  background: var(--paper-soft);
  border: 2px solid var(--ink);
}

summary {
  cursor: pointer;
  font-weight: 800;
}

.fact-map-section {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: var(--paper);
  border: 2px solid var(--ink);
}

.fact-map-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.fact-map-heading h3,
.detail-table-title {
  margin: 0;
  font-size: 1rem;
}

.fact-map-heading p,
.fact-map-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.fact-map-legend {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 12px;
  list-style: none;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.fact-map-legend li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.legend-mark,
.status-badge {
  display: inline-grid;
  place-items: center;
  border: 2px solid transparent;
  font-weight: 900;
}

.legend-mark {
  width: 23px;
  height: 23px;
  border-radius: 7px;
}

.fact-map-scroll {
  margin-top: 14px;
  overflow-x: auto;
  padding: 2px 2px 7px;
  overscroll-behavior-x: contain;
}

.fact-map-scroll:focus-visible {
  border-radius: 8px;
  outline: 3px solid rgba(36, 105, 81, 0.28);
  outline-offset: 2px;
}

.fact-map {
  width: min(680px, 100%);
  min-width: 540px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 32px repeat(10, minmax(42px, 1fr));
  gap: 4px;
}

.fact-map-axis,
.fact-cell {
  min-height: 42px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

.fact-map-axis {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.fact-map-corner {
  color: var(--brand-dark);
  font-size: 1rem;
}

.fact-cell {
  position: relative;
  border: 2px solid transparent;
  font-size: 0.84rem;
  font-weight: 850;
}

.fact-cell .fact-symbol {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  line-height: 1;
  font-weight: 950;
}

.status-secure {
  color: #064b3a;
  background: #9fe0c8;
  border-color: #0b7556;
}

.status-developing {
  color: #5e3900;
  background: #ffd666;
  border-color: #a96000;
  border-style: dashed;
}

.status-practice {
  color: #681d18;
  background: #ff9d91;
  border-color: #a8271f;
  border-width: 3px;
}

.status-unseen {
  color: #454b55;
  background: #d9dee5;
  border-color: #7a838f;
}

.fact-cell.status-secure .fact-symbol {
  color: white;
  background: #0b7556;
}

.fact-cell.status-developing .fact-symbol {
  color: #fff7df;
  background: #8a5000;
  border-radius: 4px;
}

.fact-cell.status-practice .fact-symbol {
  color: white;
  background: #a8271f;
  border-radius: 3px;
}

.fact-cell.status-unseen .fact-symbol {
  color: white;
  background: #626b76;
}

.fact-map-note {
  text-align: center;
}

.detail-table-title {
  margin-top: 20px;
}

.status-badge {
  min-width: 92px;
  min-height: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.detail-table-wrap {
  margin-top: 8px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.teacher-panel p {
  color: var(--muted);
  line-height: 1.5;
}

.result-actions {
  margin-top: 20px;
  justify-content: center;
}

.dialog-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(23, 32, 53, 0.54);
  backdrop-filter: blur(6px);
}

.dialog-card {
  width: min(580px, 100%);
  max-height: calc(var(--viewport-height) - 40px);
  overflow-y: auto;
  border-radius: 24px;
  padding: clamp(24px, 5vw, 44px);
}

.dialog-card h2 {
  margin-bottom: 18px;
}

.dialog-card ul {
  margin: 0 0 24px;
  padding-left: 22px;
  line-height: 1.6;
}

.confirm-dialog-card {
  position: relative;
  width: min(620px, 100%);
  padding: clamp(30px, 5vw, 50px);
  overflow: visible;
  text-align: center;
  border: 4px solid var(--ink);
  box-shadow: 10px 11px 0 rgba(23, 50, 77, 0.72), 0 24px 50px rgba(23, 50, 77, 0.28);
}

.dialog-tool-mark {
  width: 66px;
  height: 66px;
  margin: -4px auto 16px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--accent);
  border: 3px solid var(--ink);
  box-shadow: 0 6px 0 var(--ink);
  font-family: "Arial Rounded MT Bold", "Avenir Next", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 2.25rem;
  font-weight: 900;
  transform: rotate(-3deg);
}

.confirm-dialog-card .eyebrow {
  margin-bottom: 10px;
}

.confirm-dialog-card h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.confirm-dialog-card > p:last-of-type {
  max-width: 500px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.confirm-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.confirm-action-button {
  background: var(--workshop-red);
  box-shadow: 0 5px 0 var(--ink), 0 10px 20px rgba(232, 75, 50, 0.22);
}

@media (max-width: 560px) {
  .confirm-dialog-card {
    padding: 28px 20px 24px;
  }

  .confirm-actions > * {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .menu-layout {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .resume-panel {
    width: 100%;
  }

  .menu-info {
    padding: 18px;
  }

  .play-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(250px, 1fr) auto;
  }

  .question-panel {
    grid-row: 3;
    min-height: 250px;
  }

  .input-panel {
    grid-row: 4;
  }

  .keypad {
    min-height: 300px;
  }

  .result-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .gauge-panel {
    min-height: 160px;
  }

  .result-feedback-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .training-summary-grid {
    grid-template-columns: 1fr;
  }

  .fact-map-heading {
    display: block;
  }

  .fact-map-legend {
    margin-top: 10px;
    justify-content: flex-start;
  }
}

@media (orientation: landscape) and (max-height: 760px) {
  .site-header {
    min-height: 42px;
    padding-block: 4px;
  }

  .site-logo img {
    height: 34px;
  }

  .site-footer {
    min-height: 28px;
    padding-block: 3px;
  }

  .menu-screen {
    padding: 6px 0;
  }

  .menu-layout {
    min-height: 0;
    padding: clamp(16px, 3vh, 28px) clamp(24px, 4vw, 48px);
    gap: 34px;
  }

  .resume-panel {
    min-height: 0;
    padding: clamp(14px, 2.5vh, 22px) clamp(20px, 3vw, 32px);
  }

  .resume-heading {
    margin-bottom: 10px;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 14px;
  }

  .resume-meter {
    width: 118px;
    padding: 5px 5px 3px;
  }

  .resume-meter > span {
    font-size: 0.7rem;
  }

  .resume-meter .resume-gauge {
    width: 88px;
    margin: -5px auto -4px;
  }

  .resume-gauge svg {
    overflow: hidden;
  }

  .resume-meter .resume-gauge strong {
    bottom: 4px;
    font-size: 1.02rem;
  }

  .resume-title {
    margin-bottom: 5px;
    font-size: clamp(2rem, 6vh, 3rem);
  }

  .resume-lead {
    margin-bottom: 0;
    font-size: 0.92rem;
    line-height: 1.35;
  }

  .resume-journey {
    gap: 7px;
  }

  .resume-journey li {
    min-height: 50px;
    padding: 6px 10px;
  }

  h1 {
    font-size: clamp(2.6rem, 7vh, 4.3rem);
  }

  .lead {
    margin-bottom: 10px;
  }

  .intro-copy {
    margin-bottom: 14px;
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .menu-info {
    padding: 16px 20px;
  }

  .step-list {
    gap: 10px;
  }

  .privacy-note {
    margin-top: 12px;
    padding-top: 10px;
  }

  .play-screen {
    padding: 8px 0;
  }

  .play-shell {
    height: 100%;
    grid-template-columns: minmax(0, 1.25fr) minmax(290px, 0.75fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    padding: 12px 16px;
    gap: 8px 14px;
  }

  .play-header {
    min-height: 42px;
  }

  .question-panel {
    min-height: 0;
    height: 100%;
    padding: 16px;
  }

  .question-guidance {
    margin-bottom: 14px;
  }

  .question-line {
    font-size: clamp(3.2rem, 12vh, 6rem);
  }

  .feedback {
    margin-top: 12px;
  }

  .input-panel {
    padding: 10px;
  }

  .keypad {
    min-height: 0;
    height: auto;
    grid-template-rows: repeat(4, minmax(44px, 1fr));
    gap: 6px;
  }

  .skip-button {
    margin-top: 6px;
  }

  .hint-ladder {
    margin-top: 10px;
    padding: 6px;
    gap: 4px;
  }

  .hint-step {
    min-width: 36px;
    min-height: 32px;
    font-size: 0.84rem;
  }

  .keypad button {
    border-radius: 10px;
  }

  .input-hint {
    margin-top: 6px;
    font-size: 0.72rem;
  }

  .result-screen {
    padding: 8px 0;
  }

  .result-layout {
    padding: 16px 24px;
  }

  .result-heading h2 {
    font-size: 2rem;
  }

  .result-heading p,
  .result-heading .eyebrow {
    margin-bottom: 5px;
  }

  .result-metrics {
    margin: 10px 0;
  }

  .result-metrics article {
    min-height: 72px;
    padding: 9px;
  }

  .strength-panel,
  .recommendation-panel,
  .details-panel,
  .teacher-panel {
    margin-top: 8px;
    padding: 11px 16px;
  }

  .result-actions {
    margin-top: 10px;
  }

  .training-summary-screen {
    padding: 8px 0;
  }

  .training-summary-card {
    padding: 16px 22px;
  }

  .training-summary-card h2 {
    font-size: 2rem;
  }

  .training-summary-score {
    margin: 10px auto;
  }

  .training-summary-score strong {
    font-size: 2.8rem;
  }

  .training-summary-grid section {
    padding: 10px 14px;
  }

  .training-summary-actions {
    margin-top: 10px;
  }
}

@media (max-width: 560px) {
  .screen {
    width: min(100% - 16px, 1180px);
  }

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

  .fullscreen-button {
    width: 44px;
    height: 44px;
  }

  .menu-layout,
  .play-shell,
  .result-layout {
    border-radius: 19px;
  }

  .menu-layout {
    padding: 22px 18px;
  }

  h1 {
    font-size: clamp(2.8rem, 15vw, 4rem);
  }

  .menu-actions > *,
  .pending-actions > * {
    width: 100%;
  }

  .resume-actions > *,
  .training-summary-actions > * {
    width: 100%;
  }

  .resume-actions .text-button {
    width: 100%;
    text-align: center;
  }

  .pending-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .play-screen {
    width: min(100% - 10px, 1040px);
    padding: 5px 0;
  }

  .play-shell {
    padding: 10px;
    gap: 7px;
  }

  .play-header {
    gap: 8px;
  }

  .play-actions {
    gap: 8px;
  }

  .play-actions .text-button {
    min-height: 44px;
    padding: 8px;
  }

  .timer-chip {
    min-width: 84px;
    padding: 6px 10px;
  }

  .question-panel {
    min-height: 210px;
    padding: 16px 8px;
  }

  .question-guidance {
    margin-bottom: 12px;
    font-size: 0.88rem;
  }

  .question-line {
    font-size: clamp(2rem, 10vw, 3.6rem);
    gap: 10px;
  }

  .feedback {
    min-height: 22px;
    margin-top: 12px;
    font-size: 0.98rem;
  }

  .input-panel {
    padding: 8px;
  }

  .keypad {
    min-height: 280px;
    gap: 6px;
  }

  .keypad button {
    border-radius: 10px;
  }

  .input-hint {
    display: none;
  }

  .result-layout {
    padding: 20px 14px;
  }

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

  .result-actions > * {
    width: 100%;
  }
}

@media (max-height: 500px) and (min-width: 821px) {
  .play-header {
    padding-right: 14px;
  }

  .result-heading {
    padding-inline: 54px;
  }

  .result-layout {
    padding: 10px 16px;
  }

  .result-heading h2 {
    font-size: 1.72rem;
  }

  .result-heading p:last-child {
    font-size: 0.88rem;
  }

  .result-overview {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 7px;
    margin: 5px 0;
  }

  .gauge-panel {
    min-height: 108px;
    padding: 4px 8px;
  }

  .gauge-label {
    font-size: 0.84rem;
  }

  .gauge {
    width: 150px;
    margin-top: -4px;
  }

  .gauge strong {
    bottom: 8px;
    font-size: 1.55rem;
  }

  .gauge small {
    bottom: -4px;
    font-size: 0.62rem;
  }

  .gauge-panel p {
    display: none;
  }

  .result-components {
    gap: 6px;
  }

  .result-components article {
    min-height: 50px;
    padding: 4px 7px;
    gap: 0;
  }

  .result-components strong {
    font-size: 1rem;
  }

  .result-components span,
  .result-components small {
    font-size: 0.68rem;
  }

  .result-metrics {
    margin: 6px 0;
    gap: 7px;
  }

  .result-metrics article {
    min-height: 58px;
    padding: 6px;
    gap: 2px;
  }

  .result-feedback-grid {
    gap: 8px;
  }

  .strength-panel,
  .recommendation-panel {
    padding: 8px 12px;
    font-size: 0.86rem;
  }

  .strength-panel h3,
  .recommendation-panel h3 {
    margin-bottom: 4px;
    font-size: 1rem;
  }

  .strength-panel ul,
  .recommendation-panel ul {
    line-height: 1.34;
  }

  .site-header {
    min-height: 38px;
  }

  .site-logo img {
    height: 30px;
  }

  .site-footer {
    min-height: 24px;
    font-size: 0.76rem;
  }

  .menu-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    padding: 14px 28px;
  }

  h1 {
    font-size: 3.1rem;
  }

  .lead {
    font-size: 1.12rem;
  }

  .intro-copy {
    margin-bottom: 10px;
    font-size: 0.88rem;
  }

  .primary-button,
  .secondary-button,
  .text-button {
    min-height: 44px;
  }

  .step-list li {
    grid-template-columns: 38px 1fr;
  }

  .step-list li > span {
    width: 38px;
    height: 38px;
  }

  .privacy-note {
    display: none;
  }
}

.storage-notice {
  position: fixed;
  z-index: 60;
  inset: auto 12px max(8px, env(safe-area-inset-bottom));
  margin: 0;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  color: var(--ink);
  background: var(--paper);
  font-size: 0.85rem;
  pointer-events: none;
}

@media (orientation: landscape) and (max-width: 820px) {
  .play-shell {
    grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.8fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    min-height: 340px;
  }
  .input-panel { grid-row: 3; }
  .question-panel { min-height: 0; }
  .keypad { min-height: 0; grid-template-rows: repeat(4, minmax(44px, 1fr)); }
  .question-line { font-size: clamp(1.8rem, 5vw, 3.5rem); gap: 8px; }
}

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

  .timer-chip.timer-final {
    animation: none;
  }
}

/* Full-color Tabelværksted scenes
   Illustrations stay vivid; readable content sits on opaque paper/wood surfaces. */
body {
  background-color: #e9b85e;
  background-image: url("assets/workshop-menu.webp");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
}

body[data-view="play"],
body[data-view="phase"] {
  background-image: url("assets/workshop-play.webp");
}

body[data-view="result"],
body[data-view="training-summary"] {
  background-image: url("assets/workshop-result.webp");
}

.site-logo img {
  filter: drop-shadow(0 2px 0 rgba(255, 249, 236, 0.9)) drop-shadow(0 5px 12px rgba(23, 50, 77, 0.22));
}

.menu-layout {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.menu-copy {
  padding: clamp(24px, 3.2vw, 40px);
  border-radius: 24px;
  background:
    radial-gradient(circle at 16px 16px, #9a754b 0 2px, #e1c28d 2.5px 4px, transparent 4.5px),
    radial-gradient(circle at calc(100% - 16px) 16px, #9a754b 0 2px, #e1c28d 2.5px 4px, transparent 4.5px),
    var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
}

.menu-info {
  background: #f1c96d;
}

.play-shell {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.play-header {
  min-height: 58px;
  padding: 8px 14px;
  border-radius: 16px;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 0 5px 0 rgba(23, 50, 77, 0.72);
}

.question-panel {
  background:
    repeating-linear-gradient(0deg, transparent 0 37px, rgba(31, 95, 191, 0.075) 38px),
    linear-gradient(145deg, #fffdf7, #f5dba8);
  box-shadow: inset 0 0 0 3px #f4d8a9, 7px 8px 0 rgba(23, 50, 77, 0.28);
}

.phase-card,
.result-layout,
.training-summary-card,
.dialog-card {
  background:
    radial-gradient(circle at 16px 16px, #9a754b 0 2px, #e1c28d 2.5px 4px, transparent 4.5px),
    radial-gradient(circle at calc(100% - 16px) 16px, #9a754b 0 2px, #e1c28d 2.5px 4px, transparent 4.5px),
    var(--paper);
}

.dialog-backdrop {
  background: rgba(23, 71, 131, 0.76);
}

@media (orientation: landscape) and (max-height: 760px) {
  .menu-copy {
    padding: 18px 22px;
  }

  .play-header {
    min-height: 46px;
    padding: 5px 12px;
  }
}

@media (max-width: 820px) {
  body {
    background-position: 58% center;
  }

  body[data-view="play"],
  body[data-view="phase"] {
    background-position: center center;
  }
}

@media (max-width: 560px) {
  .menu-copy {
    padding: 22px 18px;
    border-radius: 19px;
  }

  .resume-panel {
    padding: 20px 16px;
    border-radius: 20px;
  }

  .resume-heading {
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 10px;
  }

  .resume-meter {
    width: 104px;
  }

  .resume-meter .resume-gauge {
    width: 90px;
  }

  .resume-journey li {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .resume-journey .journey-action {
    grid-column: 2;
    width: 100%;
    min-width: 0;
  }
}
