:root {
  --ink: #17142c;
  --ink-soft: #342f52;
  --paper: #f6f2e8;
  --paper-bright: #fffdf7;
  --acid: #d8ff45;
  --purple: #7857ff;
  --purple-deep: #4f35ba;
  --orange: #ff8b42;
  --red: #ea4d4d;
  --green: #19a76d;
  --line: rgba(23, 20, 44, 0.16);
  --shadow: 0 22px 60px rgba(23, 20, 44, 0.15);
  --radius-lg: 30px;
  --radius-md: 20px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(216, 255, 69, 0.18), transparent 26rem),
    linear-gradient(145deg, #f8f3e8 0%, #eee7da 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

button,
input {
  font: inherit;
}

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

button {
  touch-action: manipulation;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 16px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  transform: translateY(-180%);
  padding: 12px 16px;
  border-radius: 10px;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: min(1500px, 100%);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(18px + var(--safe-top)) clamp(16px, 3.4vw, 54px) calc(24px + var(--safe-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: var(--acid);
  background: var(--ink);
  font-size: 19px;
  font-weight: 950;
  letter-spacing: -0.08em;
  box-shadow: 5px 5px 0 var(--acid);
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 17px;
  letter-spacing: -0.03em;
}

.brand-copy small {
  color: #6b667e;
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.presentation-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 8px 7px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 247, 0.74);
  cursor: pointer;
  user-select: none;
}

.presentation-label {
  font-size: 13px;
  font-weight: 800;
}

.presentation-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-track {
  width: 50px;
  height: 32px;
  padding: 4px;
  border-radius: 999px;
  background: #c8c3cf;
  transition: background-color 160ms ease;
}

.toggle-track span {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(23, 20, 44, 0.28);
  transition: transform 160ms ease;
}

.presentation-toggle input:checked + .toggle-track {
  background: var(--purple);
}

.presentation-toggle input:checked + .toggle-track span {
  transform: translateX(18px);
}

.presentation-toggle input:focus-visible + .toggle-track {
  outline: 4px solid var(--orange);
  outline-offset: 3px;
}

.reset-button {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 15px;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.reset-button span {
  margin-right: 5px;
  font-size: 19px;
}

.training-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  margin: 18px 0 0;
  padding: 10px 18px;
  border-radius: 13px;
  color: #fff;
  background: var(--ink);
  font-size: clamp(13px, 1.5vw, 16px);
  letter-spacing: 0.01em;
  text-align: center;
}

.notice-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 5px rgba(216, 255, 69, 0.16);
}

main {
  outline: none;
}

.screen {
  min-height: calc(100dvh - 208px);
  padding: clamp(30px, 5vw, 76px) 0 clamp(34px, 6vw, 80px);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  align-items: center;
  gap: clamp(32px, 7vw, 112px);
  max-width: 1260px;
  min-height: min(680px, calc(100dvh - 240px));
  margin: 0 auto;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 14px;
  color: var(--purple-deep);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.intro-copy h1,
.lesson-copy h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(52px, 7.5vw, 118px);
  line-height: 0.89;
  letter-spacing: -0.075em;
}

.intro-copy h1 span {
  display: inline-block;
  color: var(--purple);
  text-decoration: underline;
  text-decoration-color: var(--acid);
  text-decoration-thickness: 0.13em;
  text-underline-offset: 0.08em;
}

.intro-lead {
  max-width: 680px;
  margin: 28px 0;
  color: #57516b;
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.48;
}

.candidate-pill {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  max-width: 100%;
  margin-bottom: 28px;
  padding: 11px 20px 11px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 253, 247, 0.72);
  box-shadow: 0 9px 30px rgba(23, 20, 44, 0.08);
}

.candidate-number {
  display: grid;
  place-items: center;
  min-width: 90px;
  height: 60px;
  border-radius: 13px;
  color: var(--acid);
  background: var(--ink);
  font-size: 27px;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.candidate-pill > span:last-child {
  display: grid;
  gap: 3px;
}

.candidate-pill strong {
  font-size: 18px;
}

.candidate-pill small {
  color: #6c667a;
  font-size: 13px;
}

.primary-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-width: min(100%, 350px);
  min-height: 68px;
  padding: 0 24px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: var(--purple);
  box-shadow: 0 11px 0 var(--purple-deep);
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.primary-action span {
  font-size: 26px;
}

.primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 13px 0 var(--purple-deep);
}

.primary-action:active {
  transform: translateY(7px);
  box-shadow: 0 4px 0 var(--purple-deep);
}

.privacy-line {
  margin: 24px 0 0;
  color: #696276;
  font-size: 12px;
}

.privacy-line span {
  color: var(--green);
}

.steps-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid rgba(216, 255, 69, 0.28);
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    linear-gradient(145deg, rgba(120, 87, 255, 0.16), transparent 55%),
    var(--ink);
  box-shadow: var(--shadow);
}

.steps-panel::after {
  content: "1515";
  position: absolute;
  right: -14px;
  bottom: -35px;
  color: rgba(216, 255, 69, 0.07);
  font-size: 115px;
  font-weight: 950;
  letter-spacing: -0.09em;
  pointer-events: none;
}

.panel-kicker {
  color: var(--acid);
}

.steps-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps-list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.steps-list li > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--ink);
  background: var(--acid);
  font-size: 18px;
  font-weight: 950;
}

.steps-list strong {
  font-size: 18px;
}

.steps-list p {
  margin: 5px 0 0;
  color: #cbc6da;
  font-size: 14px;
  line-height: 1.45;
}

.source-note {
  position: relative;
  z-index: 1;
  margin: 22px 0 0;
  color: #aba6bc;
  font-size: 12px;
  line-height: 1.5;
}

.simulator-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(560px, 1.28fr);
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
  max-width: 1300px;
  margin: 0 auto;
}

.lesson-panel {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lesson-progress {
  display: flex;
  align-items: center;
  margin-bottom: clamp(34px, 5vw, 70px);
}

.progress-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #898395;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.progress-item i {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid #aaa4b4;
  border-radius: 50%;
  font-style: normal;
}

.progress-item.is-current,
.progress-item.is-done {
  color: var(--ink);
}

.progress-item.is-current i {
  color: var(--ink);
  border-color: var(--acid);
  background: var(--acid);
}

.progress-item.is-done i {
  color: #fff;
  border-color: var(--purple);
  background: var(--purple);
}

.progress-line {
  width: clamp(14px, 2.3vw, 38px);
  height: 1px;
  margin: 0 6px;
  background: #c8c2ce;
}

.lesson-copy h1 {
  max-width: 540px;
  font-size: clamp(46px, 6vw, 88px);
}

.lesson-copy > p:last-child {
  max-width: 500px;
  margin: 22px 0 0;
  color: #5f586c;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.45;
}

.memory-card {
  display: grid;
  width: min(100%, 450px);
  margin-top: clamp(28px, 4vw, 48px);
  padding: 22px 25px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 247, 0.68);
}

.memory-card > span {
  color: var(--purple-deep);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.memory-card strong {
  color: var(--ink);
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.07em;
}

.memory-card strong span {
  color: var(--purple);
}

.memory-card small {
  margin-top: 7px;
  color: #6f687b;
}

.keyboard-hint {
  max-width: 470px;
  margin: 22px 0 0;
  color: #746d7e;
  font-size: 12px;
  line-height: 1.6;
}

kbd {
  padding: 2px 5px;
  border: 1px solid #beb7c4;
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

.device-card {
  width: 100%;
  max-width: 760px;
  margin-left: auto;
  padding: clamp(16px, 2.1vw, 25px);
  border: 2px solid var(--ink);
  border-radius: 34px;
  background: #ded9cf;
  box-shadow: 14px 16px 0 var(--ink), var(--shadow);
}

.device-screen {
  min-height: 310px;
  padding: clamp(20px, 3vw, 32px);
  border: 2px solid var(--ink);
  border-radius: 20px;
  background:
    linear-gradient(rgba(23, 20, 44, 0.035) 1px, transparent 1px),
    var(--paper-bright);
  background-size: 100% 4px;
}

.screen-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.1em;
}

.vote-state {
  min-height: 222px;
  padding-top: 22px;
}

.screen-label {
  margin: 0 0 18px;
  color: #625b6d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.digit-display {
  display: flex;
  gap: clamp(8px, 2vw, 17px);
  width: 100%;
  max-width: 440px;
}

.digit {
  display: grid;
  place-items: center;
  width: clamp(58px, 9vw, 88px);
  height: clamp(76px, 11vw, 105px);
  border: 3px solid #c6c0ca;
  border-radius: 15px;
  color: var(--ink);
  background: #fff;
  font-size: clamp(41px, 7vw, 64px);
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 -6px 0 rgba(23, 20, 44, 0.04);
}

.digit.is-active {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(120, 87, 255, 0.12), inset 0 -6px 0 rgba(23, 20, 44, 0.04);
}

.digit.is-filled {
  border-color: var(--ink);
}

.screen-feedback {
  margin: 16px 0 0;
  color: #6f6878;
  font-size: 13px;
}

.review-number {
  color: var(--ink);
  font-size: clamp(54px, 8vw, 86px);
  font-weight: 950;
  line-height: 0.92;
  letter-spacing: -0.08em;
}

.review-number span {
  color: var(--purple);
}

.review-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: start;
  gap: 22px;
}

.review-copy {
  min-width: 0;
}

.review-details {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 7px 16px;
  margin-top: 20px;
  font-size: 13px;
}

.review-details span {
  color: #6d6675;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.review-details strong {
  font-size: 15px;
}

.candidate-photo {
  overflow: hidden;
  align-self: stretch;
  min-height: 176px;
  margin: 0;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #e9e5db;
}

.candidate-photo img {
  display: block;
  width: 100%;
  height: 144px;
  object-fit: cover;
  object-position: 50% 22%;
}

.candidate-photo figcaption {
  padding: 8px 5px;
  color: #fff;
  background: var(--ink);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-align: center;
}

.review-tip {
  display: inline-block;
  margin: 18px 0 0;
  padding: 8px 11px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-size: 12px;
}

.blank-title,
.invalid-number {
  display: block;
  margin-bottom: 15px;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.04em;
}

.blank-title {
  color: var(--purple-deep);
}

.vote-state--blank > p:nth-of-type(2),
.vote-state--invalid > p:nth-of-type(2) {
  max-width: 500px;
  color: #5f5968;
  line-height: 1.45;
}

.vote-state--complete {
  text-align: center;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 55px;
  height: 55px;
  margin: -5px auto 8px;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-size: 29px;
  font-weight: 950;
}

.vote-state--complete .screen-label {
  margin-bottom: 8px;
}

.vote-state--complete > strong {
  display: block;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.05em;
}

.vote-state--complete > p:not(.screen-label, .countdown, .completion-disclaimer) {
  margin: 8px 0;
  color: #5d5667;
}

.completion-disclaimer {
  margin: 9px 0 14px;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}

.train-again {
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--purple);
  font-weight: 850;
  cursor: pointer;
}

.countdown {
  margin: 10px 0 0;
  color: #6c6574;
  font-size: 12px;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  gap: 10px;
  width: min(100%, 480px);
  margin: 18px auto 0;
}

.keypad button {
  min-height: clamp(58px, 7vw, 73px);
  border: 2px solid var(--ink);
  border-radius: 15px;
  color: #fff;
  background: var(--ink-soft);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.3);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 900;
  cursor: pointer;
  transition: transform 90ms ease, box-shadow 90ms ease, background-color 90ms ease;
}

.keypad button:hover {
  background: #443d68;
}

.keypad button:active,
.keypad button.is-pressed {
  transform: translateY(4px);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.3);
}

.keypad button:disabled {
  cursor: not-allowed;
  opacity: 0.34;
}

.decision-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  gap: 10px;
  margin-top: 18px;
}

.decision {
  display: grid;
  place-items: center;
  min-height: 72px;
  padding: 10px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  color: var(--ink);
  box-shadow: inset 0 -5px 0 rgba(23, 20, 44, 0.15);
  cursor: pointer;
}

.decision span {
  font-size: clamp(12px, 1.5vw, 15px);
  font-weight: 950;
  letter-spacing: 0.03em;
}

.decision small {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
}

.decision--correct {
  background: var(--orange);
}

.decision--blank {
  background: #fff;
}

.decision--confirm {
  background: var(--acid);
}

.decision:disabled {
  color: #746f78;
  background: #b9b5b9;
  cursor: not-allowed;
  opacity: 0.68;
}

footer {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: start;
  gap: 18px 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: #696274;
  font-size: 12px;
  line-height: 1.55;
}

footer p {
  max-width: 720px;
  margin: 0;
}

footer strong {
  color: var(--ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}

.footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--purple-deep);
  font-weight: 800;
  text-underline-offset: 3px;
}

.presentation-help {
  grid-column: 1 / -1;
  padding-top: 6px;
  color: #7f7888;
}

.presenter-reset {
  position: fixed;
  z-index: 50;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
}

.presenter-reset button {
  min-height: 54px;
  padding: 0 19px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: var(--purple-deep);
  box-shadow: 0 12px 30px rgba(23, 20, 44, 0.32);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

body.is-presenting .presentation-toggle {
  border-color: var(--purple);
  background: rgba(216, 255, 69, 0.3);
}

body.is-presenting .presenter-reset:not([hidden]) {
  display: block;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1024px) {
  .site-shell {
    padding-right: 24px;
    padding-left: 24px;
  }

  .intro-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
    gap: 42px;
  }

  .simulator-layout {
    grid-template-columns: minmax(245px, 0.62fr) minmax(500px, 1.38fr);
    gap: 34px;
  }

  .device-card {
    box-shadow: 9px 10px 0 var(--ink), var(--shadow);
  }

  .progress-item {
    font-size: 0;
  }

  .progress-item i {
    font-size: 12px;
  }

  .memory-card {
    padding: 18px 20px;
  }
}

@media (max-width: 820px) {
  .site-shell {
    padding-right: 18px;
    padding-left: 18px;
  }

  .brand-copy small,
  .presentation-label {
    display: none;
  }

  .presentation-toggle {
    padding-left: 8px;
  }

  .reset-button {
    width: 48px;
    padding: 0;
    font-size: 0;
  }

  .reset-button span {
    margin: 0;
    font-size: 22px;
  }

  .intro-grid,
  .simulator-layout {
    grid-template-columns: 1fr;
  }

  .intro-grid {
    gap: 40px;
    min-height: auto;
  }

  .intro-copy h1 {
    font-size: clamp(55px, 12vw, 94px);
  }

  .steps-panel {
    max-width: none;
  }

  .screen--simulator {
    padding-top: 30px;
  }

  .lesson-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 18px;
  }

  .lesson-progress {
    grid-column: 1 / -1;
    margin-bottom: 8px;
  }

  .progress-item {
    font-size: 12px;
  }

  .lesson-copy h1 {
    font-size: clamp(45px, 9vw, 66px);
  }

  .memory-card {
    width: 240px;
    margin: 0;
  }

  .memory-card strong {
    font-size: 52px;
  }

  .keyboard-hint {
    display: none;
  }

  .device-card {
    max-width: none;
    margin-top: 8px;
    padding: 18px;
  }
}

@media (max-width: 600px) {
  .site-shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .topbar {
    gap: 8px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .topbar-actions {
    gap: 7px;
  }

  .presentation-toggle {
    min-height: 44px;
    padding: 6px;
  }

  .toggle-track {
    width: 46px;
    height: 30px;
    padding: 3px;
  }

  .toggle-track span {
    width: 24px;
    height: 24px;
  }

  .presentation-toggle input:checked + .toggle-track span {
    transform: translateX(16px);
  }

  .reset-button {
    min-height: 44px;
    width: 44px;
  }

  .training-notice {
    margin-top: 14px;
    padding: 9px 12px;
    font-size: 12px;
  }

  .screen {
    min-height: auto;
    padding: 36px 0 52px;
  }

  .intro-copy h1 {
    font-size: clamp(49px, 15vw, 70px);
  }

  .intro-lead {
    margin: 23px 0;
    font-size: 17px;
  }

  .candidate-pill {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 13px;
    width: 100%;
    padding-right: 13px;
  }

  .candidate-number {
    min-width: 82px;
  }

  .candidate-pill strong {
    font-size: 16px;
  }

  .primary-action {
    width: 100%;
  }

  .steps-panel {
    padding: 25px 22px;
  }

  .lesson-panel {
    display: block;
  }

  .lesson-progress {
    margin-bottom: 30px;
  }

  .progress-item {
    font-size: 0;
  }

  .progress-item i {
    font-size: 12px;
  }

  .lesson-copy h1 {
    font-size: 50px;
  }

  .lesson-copy > p:last-child {
    font-size: 16px;
  }

  .memory-card {
    width: 100%;
    margin-top: 24px;
  }

  .device-card {
    margin-top: 24px;
    padding: 12px;
    border-radius: 25px;
    box-shadow: 6px 7px 0 var(--ink), 0 14px 40px rgba(23, 20, 44, 0.14);
  }

  .device-screen {
    min-height: 290px;
    padding: 18px;
    border-radius: 15px;
  }

  .screen-head {
    gap: 8px;
    font-size: 12px;
  }

  .vote-state {
    min-height: 213px;
  }

  .digit-display {
    justify-content: center;
    gap: 7px;
  }

  .digit {
    width: min(19vw, 73px);
    height: min(24vw, 92px);
    border-width: 2px;
    border-radius: 12px;
    font-size: min(13vw, 52px);
  }

  .review-details {
    grid-template-columns: 80px 1fr;
  }

  .review-card {
    grid-template-columns: minmax(0, 1fr) 94px;
    gap: 12px;
  }

  .candidate-photo {
    min-height: 142px;
  }

  .candidate-photo img {
    height: 112px;
  }

  .candidate-photo figcaption {
    padding: 7px 3px;
  }

  .review-number {
    font-size: clamp(48px, 15vw, 64px);
  }

  .review-details {
    gap: 5px 8px;
    margin-top: 14px;
  }

  .review-details span {
    font-size: 10px;
  }

  .review-details strong {
    font-size: 13px;
  }

  .keypad {
    gap: 8px;
    margin-top: 13px;
  }

  .keypad button {
    min-height: 62px;
    border-radius: 12px;
  }

  .decision-buttons {
    gap: 7px;
    margin-top: 13px;
  }

  .decision {
    min-height: 68px;
    padding: 8px 3px;
    border-radius: 11px;
  }

  .decision small {
    display: none;
  }

  .decision span {
    font-size: 12px;
  }

  footer {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .presenter-reset {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .presenter-reset button {
    min-height: 50px;
  }
}

@media (max-height: 760px) and (min-width: 821px) {
  .screen {
    padding-top: 28px;
    padding-bottom: 42px;
  }

  .simulator-layout {
    align-items: start;
  }

  .lesson-progress {
    margin-bottom: 32px;
  }

  .device-screen {
    min-height: 255px;
  }

  .vote-state {
    min-height: 170px;
    padding-top: 14px;
  }

  .digit {
    height: 80px;
  }

  .keypad {
    gap: 7px;
    margin-top: 12px;
  }

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

  .decision-buttons {
    margin-top: 12px;
  }

  .decision {
    min-height: 61px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(23, 20, 44, 0.5);
  }

  .training-notice,
  .steps-panel,
  .device-card,
  .device-screen,
  .keypad button,
  .decision {
    border-width: 3px;
  }
}
