:root {
  --black: #050505;
  --ink: #fafafa;
  --paper: #f4f0e8;
  --muted: #a6a29a;
  --faint: #5c5a55;
  --red: #ff1f3d;
  --deep-red: #71000f;
  --acid: #dfff35;
  --blue: #5ed7ff;
  --panel: rgba(250, 250, 250, 0.055);
  --panel-strong: rgba(250, 250, 250, 0.105);
  --line: rgba(250, 250, 250, 0.16);
  --line-strong: rgba(250, 250, 250, 0.42);
  --radius: 0;
  --sans: "Arial Black", "Helvetica Neue", system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans JP", sans-serif;
  --serif: "Times New Roman", "Yu Mincho", "Hiragino Mincho ProN", serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 31, 61, 0.12), transparent 18rem),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    var(--black);
  background-size: auto, 4.6rem 100%, auto;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body::before {
  content: "DAMASARERUNA";
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: -5;
  width: 100vmax;
  transform: translate(-50%, -50%) rotate(-90deg);
  color: rgba(255, 255, 255, 0.024);
  font-size: 9rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -4;
  background:
    linear-gradient(180deg, transparent 70%, rgba(0, 0, 0, 0.78)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.72), transparent 14%, transparent 86%, rgba(0, 0, 0, 0.72));
  pointer-events: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 4px;
}

::selection {
  background: var(--ink);
  color: var(--black);
}

.stage-architecture,
.screen-noise,
.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.stage-architecture {
  z-index: -3;
  overflow: hidden;
}

.rail {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(250, 250, 250, 0.2);
}

.rail-left {
  left: 1rem;
}

.rail-right {
  right: 1rem;
}

.beam {
  position: absolute;
  top: -12rem;
  width: 1px;
  height: 140vh;
  transform-origin: top center;
  background: linear-gradient(180deg, rgba(250, 250, 250, 0.6), transparent 65%);
  opacity: 0.24;
  filter: blur(0.2px);
}

.beam-one {
  left: 24%;
  transform: rotate(18deg);
}

.beam-two {
  left: 50%;
  transform: rotate(-8deg);
}

.beam-three {
  right: 19%;
  transform: rotate(-19deg);
}

.screen-noise {
  z-index: -2;
  opacity: 0.23;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.83' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E");
}

.scanline {
  z-index: -1;
  opacity: 0.22;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0,
    rgba(255, 255, 255, 0.08) 1px,
    transparent 1px,
    transparent 5px
  );
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 4.2rem;
  padding: 0.7rem max(1rem, env(safe-area-inset-left)) 0.7rem max(1rem, env(safe-area-inset-right));
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 0.7rem;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.brand-mark {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  background: var(--red);
  box-shadow: 0 0 0 2px var(--black), 0 0 2rem rgba(255, 31, 61, 0.62);
  transform: skewX(-14deg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 3.1rem;
  min-height: 2.55rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  transition: transform 140ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.icon-button:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--black);
}

.icon-button:active {
  transform: translateY(1px) scale(0.98);
}

.sound-label {
  color: currentColor;
  opacity: 0.72;
}

.sound-state {
  min-width: 1.7rem;
  color: var(--acid);
}

.icon-button:hover .sound-state {
  color: var(--black);
}

.app {
  width: min(100%, 72rem);
  min-height: calc(100svh - 4.2rem);
  margin: 0 auto;
  padding: 0 1rem 5rem;
}

.view {
  animation: viewIn 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(0.65rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.start-view {
  position: relative;
  display: grid;
  gap: 1rem;
}

.hero-marquee {
  width: calc(100% + 2rem);
  margin-left: -1rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  color: var(--black);
  background: var(--ink);
  font-size: 0.86rem;
  font-weight: 950;
  white-space: nowrap;
}

.hero-marquee span {
  display: inline-block;
  padding: 0.48rem 1.5rem;
  animation: marquee 18s linear infinite;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.hero {
  position: relative;
  min-height: calc(100svh - 7rem);
  display: grid;
  align-content: center;
  gap: 1.2rem;
  padding: 2.4rem 0 1.2rem;
  isolation: isolate;
}

.hero-gridline {
  position: absolute;
  inset: 1rem 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.hero-code,
.kicker {
  width: fit-content;
  color: var(--acid);
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.hero-code {
  color: var(--muted);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.kicker::before {
  content: "";
  width: 3rem;
  height: 1px;
  background: currentColor;
}

.title-stack {
  display: grid;
  gap: 0.8rem;
}

.game-title {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.08em;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 4.6rem;
  font-weight: 950;
  line-height: 0.78;
  letter-spacing: 0;
  text-transform: uppercase;
}

.game-title span {
  display: inline-block;
  position: relative;
  text-shadow: 0 0 1rem rgba(255, 255, 255, 0.36), 0 0 3rem rgba(255, 255, 255, 0.16);
}

.game-title span:nth-child(even) {
  color: transparent;
  -webkit-text-stroke: 1px var(--ink);
  text-stroke: 1px var(--ink);
}

.game-title .hot {
  color: var(--red);
  -webkit-text-stroke: 0;
  text-stroke: 0;
  text-shadow: 0 0 2.5rem rgba(255, 31, 61, 0.8);
}

.game-subtitle {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
  text-transform: uppercase;
}

.hero-copy {
  max-width: 37rem;
  margin: 0;
  color: #fff8ef;
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.9;
}

.hero-copy strong {
  color: var(--acid);
  font-family: var(--sans);
  font-weight: 950;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.metric {
  min-height: 5.5rem;
  padding: 1rem 0.8rem;
  background: rgba(5, 5, 5, 0.92);
}

.metric strong {
  display: block;
  color: #ffffff;
  font-size: 2.4rem;
  font-weight: 950;
  line-height: 0.9;
}

.metric span {
  display: block;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 950;
}

.category-strip {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.2rem 0 0.5rem;
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  padding: 0.46rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 950;
  white-space: nowrap;
}

.primary-actions,
.result-actions,
.verdict-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  min-width: 0;
}

.primary-actions {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.35rem;
  padding: 0.9rem 1rem;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--black);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  min-width: 0;
  transition: transform 140ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.button::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-102%) skewX(-18deg);
  background: rgba(255, 255, 255, 0.22);
  transition: transform 260ms ease;
}

.button:hover::after {
  transform: translateX(102%) skewX(-18deg);
}

.button.primary {
  flex: 1 1 16rem;
  background: #ffffff;
  color: var(--black);
  border-color: var(--ink);
}

.button.secondary {
  background: rgba(255, 31, 61, 0.12);
  border-color: rgba(255, 31, 61, 0.72);
  color: var(--ink);
}

.button.ghost {
  min-height: 2.5rem;
  padding: 0.62rem 0.8rem;
  background: transparent;
  color: var(--muted);
}

.button:hover {
  border-color: var(--acid);
}

.button:active {
  transform: translateY(1px) scale(0.99);
}

.prompt {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.ad-slot {
  display: grid;
  place-items: center;
  min-height: 4.8rem;
  border: 1px dashed rgba(250, 250, 250, 0.22);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(250, 250, 250, 0.38);
  font-size: 0.72rem;
  font-weight: 950;
}

.ad-slot.compact {
  min-height: 3.6rem;
}

.quiz-view {
  display: grid;
  gap: 1rem;
  max-width: 50rem;
  margin: 0 auto;
  padding-top: 1.2rem;
}

.quiz-titlebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.quiz-titlebar-main {
  color: var(--ink);
  font-size: 2.2rem;
  font-weight: 950;
  line-height: 0.9;
}

.quiz-titlebar-sub {
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 950;
}

.progress-header {
  display: grid;
  gap: 0.65rem;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
}

.progress-meta strong {
  color: var(--ink);
  font-size: 1.3rem;
}

.progress-bar {
  height: 0.45rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--ink);
  box-shadow: 0 0 1.6rem rgba(255, 255, 255, 0.55);
  transition: width 320ms ease;
}

.case-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.category-badge,
.risk-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.78);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 950;
}

.category-badge {
  color: var(--acid);
}

.risk-badge {
  color: var(--red);
}

.case-panel {
  position: relative;
  min-height: 17rem;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(255, 31, 61, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.018));
  box-shadow: 0 2.5rem 6rem rgba(0, 0, 0, 0.52);
}

.case-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.case-number {
  position: absolute;
  right: -0.08em;
  bottom: -0.18em;
  color: rgba(255, 255, 255, 0.08);
  font-size: 8rem;
  font-weight: 950;
  line-height: 0.8;
  pointer-events: none;
}

.speaker-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0;
}

.speaker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  background: var(--ink);
  color: var(--black);
  font-size: 0.74rem;
  font-weight: 950;
}

.speaker-name {
  min-width: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.case-meta {
  position: relative;
  z-index: 1;
  padding: 0.1rem 1rem 1rem 4.45rem;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.88rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.message {
  position: relative;
  z-index: 1;
  margin: 0 1rem 1rem;
  padding: 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.36);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1.52;
  overflow-wrap: anywhere;
}

.choices {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.choice {
  width: 100%;
  min-height: 4.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: rgba(5, 5, 5, 0.92);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, background 160ms ease, color 160ms ease;
}

.choice:hover {
  background: var(--ink);
  color: var(--black);
}

.choice:active {
  transform: translateY(1px) scale(0.995);
}

.choice[disabled] {
  cursor: default;
}

.choice-label {
  font-size: 1.3rem;
  font-weight: 950;
}

.choice-note {
  color: currentColor;
  font-size: 0.72rem;
  font-weight: 950;
  opacity: 0.5;
  white-space: nowrap;
}

.choice.correct {
  background: var(--acid);
  color: var(--black);
  box-shadow: inset 0 0 0 2px var(--black);
}

.choice.wrong {
  background: var(--red);
  color: var(--ink);
  animation: shake 260ms ease;
}

.choice.dimmed {
  opacity: 0.36;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-0.3rem);
  }
  50% {
    transform: translateX(0.3rem);
  }
  75% {
    transform: translateX(-0.15rem);
  }
}

.case-share {
  display: flex;
  justify-content: flex-end;
}

.verdict {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--line-strong);
  background: rgba(5, 5, 5, 0.94);
  animation: viewIn 240ms ease;
}

.verdict.good {
  border-color: rgba(223, 255, 53, 0.78);
}

.verdict.bad {
  border-color: rgba(255, 31, 61, 0.78);
}

.verdict-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.95rem;
  font-weight: 950;
}

.verdict-head .correct-answer {
  color: var(--acid);
}

.tactic {
  display: inline-flex;
  width: fit-content;
  padding: 0.42rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: var(--ink);
  color: var(--black);
  font-size: 0.75rem;
  font-weight: 950;
}

.insight {
  margin: 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.8;
}

.learn {
  color: var(--acid);
  font-size: 0.84rem;
  font-weight: 950;
}

.result-view {
  display: grid;
  gap: 1rem;
  max-width: 55rem;
  margin: 0 auto;
  padding-top: 1.2rem;
}

.result-card {
  position: relative;
  overflow: hidden;
  min-height: 24rem;
  padding: 1rem;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(255, 31, 61, 0.2), transparent 36%),
    rgba(255, 255, 255, 0.055);
  box-shadow: 0 2.5rem 6rem rgba(0, 0, 0, 0.56);
}

.result-label {
  position: relative;
  z-index: 1;
  color: var(--acid);
  font-size: 0.76rem;
  font-weight: 950;
}

.result-overprint {
  position: absolute;
  right: -0.08em;
  top: 0.15em;
  max-width: 100%;
  color: rgba(255, 255, 255, 0.06);
  font-size: 5.6rem;
  font-weight: 950;
  line-height: 0.8;
  text-align: right;
  pointer-events: none;
}

.result-name {
  position: relative;
  z-index: 1;
  max-width: 15ch;
  margin: 2.2rem 0 0.65rem;
  color: var(--ink);
  font-size: 3rem;
  font-weight: 950;
  line-height: 1;
  overflow-wrap: anywhere;
}

.result-score {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 950;
}

.result-score strong {
  color: var(--acid);
  font-size: 2rem;
}

.result-tagline {
  position: relative;
  z-index: 1;
  margin: 1.2rem 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.6;
}

.result-desc {
  position: relative;
  z-index: 1;
  max-width: 43rem;
  margin: 0.9rem 0 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.9;
}

.share-preview {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.4);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.dimension-panel,
.review-panel,
.tips-panel {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
}

.section-title {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
}

.dimension-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr 2.8rem;
  gap: 0.8rem;
  align-items: center;
}

.dimension-name {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 950;
}

.dimension-track {
  height: 0.55rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.4);
}

.dimension-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ink);
  transition: width 520ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.dimension-value {
  color: var(--acid);
  font-size: 0.84rem;
  font-weight: 950;
  text-align: right;
}

.review-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.review-item {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 0.65rem;
  align-items: center;
  min-width: 0;
  padding: 0.65rem;
  background: rgba(5, 5, 5, 0.94);
}

.review-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  font-size: 0.7rem;
  font-weight: 950;
}

.review-item.ok .review-mark {
  background: var(--acid);
  color: var(--black);
}

.review-item.ng .review-mark {
  background: var(--red);
  color: var(--ink);
}

.review-text {
  min-width: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-answer {
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 950;
}

.tips-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.8;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.4rem + env(safe-area-inset-bottom));
  z-index: 50;
  width: min(calc(100% - 2rem), 27rem);
  transform: translateX(-50%);
  padding: 0.85rem 1rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--black);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 950;
  animation: toastIn 220ms ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 0.5rem);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.site-footer {
  position: relative;
  z-index: 1;
  width: min(100%, 72rem);
  margin: 0 auto;
  padding: 1rem 1rem 2.2rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--serif);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.site-footer p {
  margin: 0.35rem 0;
}

.noscript {
  margin: 1.4rem;
  padding: 1rem;
  border: 1px solid var(--ink);
  background: var(--black);
  color: var(--ink);
  text-align: center;
}

.hidden {
  display: none !important;
}

@media (max-width: 420px) {
  body::before {
    font-size: 5.8rem;
  }

  .app {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .game-title {
    font-size: 3.15rem;
  }

  .metric {
    min-height: 5rem;
    padding: 0.8rem 0.65rem;
  }

  .metric strong {
    font-size: 2rem;
  }

  .message {
    font-size: 1.32rem;
  }

  .case-number {
    font-size: 6rem;
  }

  .choice-label {
    font-size: 1.08rem;
  }

  .choice-note {
    font-size: 0.64rem;
  }

  .dimension-row {
    grid-template-columns: 5.2rem 1fr 2.3rem;
  }

  .primary-actions .button {
    width: 100%;
  }

  .primary-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (min-width: 700px) {
  .app {
    padding-left: 1.4rem;
    padding-right: 1.4rem;
  }

  .rail-left {
    left: 2rem;
  }

  .rail-right {
    right: 2rem;
  }

  .game-title {
    font-size: 7.4rem;
  }

  .hero {
    min-height: 44rem;
  }

  .metrics {
    max-width: 38rem;
  }

  .primary-actions {
    grid-template-columns: minmax(0, 1fr) minmax(8rem, 10rem);
  }

  .quiz-titlebar {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .message {
    font-size: 2.1rem;
  }

  .case-number {
    font-size: 10rem;
  }

  .result-card {
    padding: 1.3rem;
  }

  .result-name {
    font-size: 4.2rem;
  }
}

@media (min-width: 1100px) {
  body::before {
    font-size: 14rem;
  }

  .app-header {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .game-title {
    font-size: 9rem;
  }

  .hero {
    min-height: 46rem;
  }
}

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