:root {
  color-scheme: light;
  --ink: #17313a;
  --muted: #5b7480;
  --panel: rgba(255, 252, 240, 0.94);
  --paper: #fffaf0;
  --teal: #117c73;
  --teal-dark: #0a5a55;
  --green: #2f9f68;
  --blue: #2776b8;
  --orange: #f0a13b;
  --coral: #df5f53;
  --yellow: #ffd45a;
  --shadow: 0 18px 48px rgba(27, 63, 72, 0.18);
  --tight-shadow: 0 10px 24px rgba(27, 63, 72, 0.16);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 212, 90, 0.35), transparent 26rem),
    radial-gradient(circle at 88% 14%, rgba(74, 163, 151, 0.28), transparent 24rem),
    linear-gradient(145deg, #fdf3d7 0%, #d8eef0 48%, #f7efd8 100%);
}

button,
a {
  font: inherit;
}

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

.sentence-snake-app {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: clamp(12px, 2vw, 22px);
  padding: clamp(10px, 2vw, 22px);
}

.play-shell {
  min-width: 0;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: clamp(8px, 1.5vw, 14px);
}

.game-hud {
  width: min(100%, 760px);
  display: grid;
  grid-template-columns: repeat(5, auto);
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 2px solid rgba(17, 124, 115, 0.18);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.82);
  box-shadow: var(--tight-shadow);
  backdrop-filter: blur(10px);
}

.game-hud span,
.game-hud strong {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: clamp(0.78rem, 2vw, 0.95rem);
  font-weight: 800;
  white-space: nowrap;
}

#levelHud {
  color: #fff;
  background: var(--teal);
}

#scoreHud {
  color: #0e4e47;
  background: rgba(131, 224, 179, 0.58);
}

#livesHud {
  color: #b71f36;
  letter-spacing: 0;
}

.mission-banner {
  width: min(100%, 760px);
  min-height: 76px;
  display: grid;
  gap: 4px;
  padding: 13px 18px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(17, 124, 115, 0.94), rgba(39, 118, 184, 0.9)),
    var(--teal);
  color: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.mission-banner::after {
  content: "";
  position: absolute;
  inset: auto -24px -34px auto;
  width: 190px;
  height: 90px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.mission-banner p,
.mission-banner h1 {
  margin: 0;
  position: relative;
  z-index: 1;
}

.mission-banner p {
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mission-banner h1 {
  max-width: 56rem;
  font-size: clamp(1rem, 3vw, 1.45rem);
  line-height: 1.14;
}

.board-frame {
  width: 100%;
  display: grid;
  place-items: center;
}

.city-board {
  width: min(92vw, 68dvh, 700px);
  max-width: 700px;
  min-width: 280px;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  border: 4px solid rgba(12, 86, 80, 0.34);
  border-radius: clamp(18px, 4vw, 30px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.13) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px),
    radial-gradient(circle at 24% 24%, rgba(255, 242, 166, 0.36), transparent 22%),
    radial-gradient(circle at 76% 72%, rgba(86, 195, 161, 0.28), transparent 24%),
    linear-gradient(145deg, #9edcbd 0%, #79cfc2 48%, #8bd59f 100%);
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
  box-shadow: 0 24px 60px rgba(32, 72, 75, 0.22);
  touch-action: none;
}

.city-sky,
.city-prop,
.board-decor,
.map-zone,
.park-mark,
.street-mark,
.city-path {
  position: absolute;
  pointer-events: none;
}

.city-sky {
  inset: 0;
  z-index: 0;
}

.cloud {
  position: absolute;
  width: 15%;
  height: 6%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow:
    14px -7px 0 rgba(255, 255, 255, 0.24),
    34px 2px 0 rgba(255, 255, 255, 0.2);
}

.cloud-one {
  top: 8%;
  left: 8%;
}

.cloud-two {
  top: 14%;
  right: 18%;
  transform: scale(0.76);
}

.board-decor {
  inset: 0;
  z-index: 1;
}

.map-zone {
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04)),
    rgba(10, 90, 85, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.zone-one {
  left: 8%;
  top: 16%;
  width: 25%;
  height: 19%;
  transform: rotate(-6deg);
}

.zone-two {
  right: 8%;
  top: 12%;
  width: 24%;
  height: 22%;
  border-radius: 999px 28px 28px 999px;
  transform: rotate(5deg);
}

.zone-three {
  left: 12%;
  bottom: 9%;
  width: 30%;
  height: 17%;
  transform: rotate(4deg);
}

.park-mark {
  width: 5.8%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(10, 116, 93, 0.32);
  box-shadow:
    14px 2px 0 rgba(10, 116, 93, 0.24),
    29px 0 0 rgba(10, 116, 93, 0.18);
}

.mark-one {
  right: 15%;
  top: 40%;
}

.mark-two {
  left: 10%;
  bottom: 30%;
  transform: scale(0.72);
}

.mark-three {
  right: 28%;
  bottom: 13%;
  transform: scale(0.62);
}

.street-mark {
  width: 17%;
  height: 3.4%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  transform-origin: center;
}

.street-one {
  left: 10%;
  top: 48%;
  transform: rotate(16deg);
}

.street-two {
  right: 12%;
  bottom: 35%;
  transform: rotate(-20deg);
}

.city-path {
  left: -8%;
  right: -8%;
  bottom: 21%;
  height: 17%;
  z-index: 1;
  transform: rotate(-8deg);
  border-top: 2px solid rgba(255, 255, 255, 0.38);
  border-bottom: 2px solid rgba(83, 107, 107, 0.1);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 18px, transparent 18px 36px),
    rgba(239, 229, 197, 0.42);
}

.house-one,
.house-two {
  z-index: 1;
  width: 13%;
  height: 10%;
  border-radius: 7px 7px 10px 10px;
  background: #fff5c7;
  box-shadow: var(--tight-shadow);
}

.house-one {
  left: 9%;
  bottom: 12%;
}

.house-two {
  right: 8%;
  top: 18%;
  background: #e5f6ff;
}

.house-one::before,
.house-two::before {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  top: -34%;
  height: 48%;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: #df5f53;
}

.house-two::before {
  background: #2776b8;
}

.house-one span,
.house-two span {
  position: absolute;
  inset: 34% 38% 0 38%;
  border-radius: 5px 5px 0 0;
  background: rgba(17, 124, 115, 0.68);
}

.bus-stop {
  right: 20%;
  bottom: 16%;
  z-index: 1;
  width: 8%;
  height: 12%;
  border: 4px solid rgba(23, 49, 58, 0.34);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.bus-stop::before {
  content: "";
  position: absolute;
  left: -30%;
  right: -30%;
  bottom: -7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(23, 49, 58, 0.34);
}

.bike {
  left: 16%;
  top: 43%;
  z-index: 1;
  width: 11%;
  height: 5%;
  border-bottom: 4px solid rgba(17, 124, 115, 0.48);
}

.bike::before,
.bike::after {
  content: "";
  position: absolute;
  bottom: -12px;
  width: 20px;
  height: 20px;
  border: 4px solid rgba(17, 124, 115, 0.56);
  border-radius: 50%;
}

.bike::before {
  left: 0;
}

.bike::after {
  right: 0;
}

.tree {
  z-index: 1;
  width: 5%;
  height: 9%;
  border-radius: 999px 999px 8px 8px;
  background: #2f9f68;
  box-shadow: inset 0 -16px 0 rgba(10, 90, 85, 0.22);
}

.tree::after {
  content: "";
  position: absolute;
  left: 38%;
  right: 38%;
  bottom: -22%;
  height: 34%;
  border-radius: 999px;
  background: #8b6745;
}

.tree-one {
  left: 73%;
  bottom: 12%;
}

.tree-two {
  left: 6%;
  top: 24%;
  transform: scale(0.86);
}

#gameCanvas,
.answer-layer,
.board-flash,
.feedback-toast {
  position: absolute;
}

#gameCanvas {
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
}

.answer-layer {
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.answer-item {
  position: absolute;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 2px solid rgba(23, 49, 58, 0.18);
  border-radius: 15px;
  color: #163037;
  font-size: clamp(0.72rem, 2.6vw, 0.95rem);
  font-weight: 900;
  line-height: 1.06;
  text-align: left;
  box-shadow: 0 8px 16px rgba(23, 49, 58, 0.18);
  transform: translateZ(0);
}

.answer-item .answer-icon {
  width: 28px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  overflow: visible;
  background: transparent;
}

.answer-item .answer-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(23, 49, 58, 0.16));
}

.answer-item .answer-text {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.answer-item.is-visual-only {
  display: grid;
  place-items: center;
  grid-template-columns: 1fr;
  padding: 2px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
}

.answer-item.is-visual-only::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 7%;
  height: 18%;
  border-radius: 50%;
  background: rgba(23, 49, 58, 0.18);
  filter: blur(2px);
}

.answer-item.is-visual-only::after {
  content: "";
  position: absolute;
  inset: 5%;
  z-index: 0;
  border-radius: 22px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0));
  opacity: 0.8;
}

.visual-object {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 9px 12px rgba(23, 49, 58, 0.2));
  transform: translateZ(0);
}

.answer-item.word_hunt .answer-text {
  white-space: nowrap;
}

.answer-item.word_hunt {
  background: #fff0a7;
  border-color: rgba(176, 123, 19, 0.34);
}

.answer-item.word_hunt.is-visual-only {
  border: 0;
  background: transparent;
}

.answer-item.word_hunt .answer-icon {
  background: transparent;
}

.answer-item.phrase_hunt {
  border-radius: 19px 19px 19px 8px;
  background: #e6fbff;
  border-color: rgba(39, 118, 184, 0.28);
}

.answer-item.phrase_hunt .answer-icon {
  background: transparent;
}

.answer-item.sentence_builder {
  background: #fffaf0;
  border-color: rgba(17, 124, 115, 0.32);
}

.answer-item.sentence_builder .answer-icon {
  background: transparent;
}

.answer-item.situation_choice {
  border-radius: 20px 20px 8px 20px;
  background: #e9fff2;
  border-color: rgba(47, 159, 104, 0.3);
}

.answer-item.situation_choice .answer-icon {
  background: transparent;
}

.answer-item.nuance_choice {
  border-radius: 12px;
  background: #fff6e8;
  border-color: rgba(223, 95, 83, 0.26);
}

.answer-item.nuance_choice .answer-icon {
  background: transparent;
}

.board-flash {
  inset: 0;
  z-index: 7;
  opacity: 0;
  pointer-events: none;
}

.board-flash.is-correct {
  animation: correctFlash 520ms ease-out;
}

.board-flash.is-wrong {
  animation: wrongFlash 520ms ease-out;
}

.city-board.is-wrong {
  animation: boardShake 340ms ease-out;
}

.feedback-toast {
  left: 50%;
  bottom: 14px;
  z-index: 8;
  width: max-content;
  max-width: min(88%, 520px);
  padding: 10px 14px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(23, 49, 58, 0.88);
  color: #fff;
  font-size: clamp(0.8rem, 2.4vw, 0.95rem);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  box-shadow: var(--tight-shadow);
}

.feedback-toast:empty {
  display: none;
}

.feedback-toast.is-correct {
  background: rgba(14, 110, 78, 0.94);
}

.feedback-toast.is-wrong {
  background: rgba(181, 62, 48, 0.94);
}

.sentence-bar {
  width: min(100%, 760px);
  min-height: 56px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.92);
  border: 2px solid rgba(17, 124, 115, 0.18);
  box-shadow: var(--tight-shadow);
}

.sentence-bar > span {
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sentence-chunks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.sentence-chunks span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e1f7ed;
  color: #0b5148;
  font-size: clamp(0.8rem, 2.5vw, 0.95rem);
  font-weight: 900;
}

.sentence-chunks .blank {
  min-width: 48px;
  color: rgba(11, 81, 72, 0.58);
  background: repeating-linear-gradient(90deg, #e9edf0 0 12px, #f8fafb 12px 24px);
  border: 1px dashed rgba(11, 81, 72, 0.34);
}

.touch-controls {
  width: min(100%, 360px);
  display: grid;
  grid-template-columns: repeat(3, 64px);
  grid-template-rows: repeat(2, 54px);
  justify-content: center;
  gap: 8px;
}

.touch-controls button {
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(180deg, var(--teal), var(--teal-dark));
  box-shadow: 0 8px 0 #084844, 0 14px 24px rgba(20, 70, 76, 0.18);
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
}

.touch-controls button:active {
  transform: translateY(5px);
  box-shadow: 0 3px 0 #084844, 0 8px 15px rgba(20, 70, 76, 0.2);
}

.control-up {
  grid-column: 2;
}

.control-left {
  grid-column: 1;
  grid-row: 2;
}

.control-down {
  grid-column: 2;
  grid-row: 2;
}

.control-right {
  grid-column: 3;
  grid-row: 2;
}

.game-note {
  align-self: start;
  display: grid;
  gap: 12px;
}

.back-link,
.primary-action,
.secondary-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}

.back-link,
.secondary-action {
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.76);
  border: 2px solid rgba(17, 124, 115, 0.18);
}

.primary-action {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 12px 24px rgba(17, 124, 115, 0.22);
}

.note-card,
.start-card,
.result-card {
  border: 2px solid rgba(17, 124, 115, 0.15);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.note-card {
  padding: 18px;
}

.note-card h2,
.note-card h3,
.note-card p,
.note-card ul {
  margin: 0;
}

.note-card h2,
.note-card h3 {
  margin-bottom: 8px;
}

.note-card p,
.note-card li {
  color: var(--muted);
  line-height: 1.45;
}

.note-card ul {
  padding-left: 20px;
}

.eyebrow {
  margin: 0;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.start-screen,
.result-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 212, 90, 0.34), transparent 22rem),
    radial-gradient(circle at 85% 18%, rgba(17, 124, 115, 0.26), transparent 22rem),
    rgba(13, 45, 48, 0.48);
  backdrop-filter: blur(10px);
}

.start-card,
.result-card {
  width: min(100%, 560px);
  max-height: min(92dvh, 780px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: clamp(18px, 4vw, 30px);
}

.start-card h2,
.result-card h2 {
  margin: 0;
  font-size: clamp(2rem, 9vw, 3.7rem);
  line-height: 0.98;
}

.start-card strong {
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: var(--teal-dark);
}

.start-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.start-city {
  height: 102px;
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(160deg, #a4dfe6 0%, #9fd48e 100%);
}

.start-asset,
.mini-house,
.mini-tree,
.mini-snake {
  position: absolute;
}

.start-asset {
  object-fit: contain;
  filter: drop-shadow(0 9px 12px rgba(23, 49, 58, 0.16));
}

.start-home {
  left: 8px;
  bottom: -8px;
  width: 116px;
}

.start-school {
  right: 8px;
  bottom: -8px;
  width: 118px;
}

.start-tree {
  right: 88px;
  top: 8px;
  width: 54px;
}

.mini-house {
  left: 24px;
  bottom: 18px;
  width: 70px;
  height: 48px;
  border-radius: 7px 7px 10px 10px;
  background: #fff2aa;
}

.mini-house::before {
  content: "";
  position: absolute;
  left: -7px;
  right: -7px;
  top: -26px;
  height: 32px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: #df5f53;
}

.mini-tree {
  right: 34px;
  bottom: 18px;
  width: 42px;
  height: 62px;
  border-radius: 999px 999px 10px 10px;
  background: #2f9f68;
}

.mini-tree::after {
  content: "";
  position: absolute;
  left: 17px;
  bottom: -14px;
  width: 9px;
  height: 18px;
  background: #8b6745;
}

.mini-snake {
  left: 132px;
  right: 132px;
  bottom: 26px;
  height: 28px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 92% 34%, #fff 0 3px, transparent 4px),
    radial-gradient(circle at 92% 66%, #fff 0 3px, transparent 4px),
    linear-gradient(90deg, #0a5a55, #28a779);
  box-shadow: 0 10px 18px rgba(18, 65, 61, 0.2);
}

.level-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.level-selector button {
  min-height: 48px;
  border: 2px solid rgba(17, 124, 115, 0.18);
  border-radius: 16px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.76);
  font-weight: 900;
  cursor: pointer;
}

.level-selector button.is-selected {
  color: #fff;
  border-color: transparent;
  background: var(--teal);
}

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

.result-stats > * {
  min-height: 58px;
  display: grid;
  place-items: center;
  padding: 8px;
  border-radius: 18px;
  color: #0d4f49;
  background: rgba(224, 248, 237, 0.9);
  font-weight: 900;
  text-align: center;
}

.review-list {
  min-height: 100px;
  max-height: 220px;
  overflow: auto;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.review-list h3 {
  margin: 0 0 8px;
}

.review-list ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.review-list li {
  color: var(--muted);
  line-height: 1.35;
}

.review-list strong {
  color: var(--ink);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.result-actions > * {
  flex: 1 1 130px;
}

.is-hidden {
  display: none !important;
}

@keyframes correctFlash {
  0% {
    opacity: 0;
    box-shadow: inset 0 0 0 0 rgba(30, 180, 98, 0);
    background: rgba(55, 214, 124, 0);
  }
  35% {
    opacity: 1;
    box-shadow: inset 0 0 0 9px rgba(41, 184, 99, 0.34);
    background: rgba(82, 230, 146, 0.18);
  }
  100% {
    opacity: 0;
    box-shadow: inset 0 0 0 26px rgba(41, 184, 99, 0);
    background: rgba(82, 230, 146, 0);
  }
}

@keyframes wrongFlash {
  0% {
    opacity: 0;
    background: rgba(223, 95, 83, 0);
  }
  35% {
    opacity: 1;
    background: rgba(223, 95, 83, 0.2);
  }
  100% {
    opacity: 0;
    background: rgba(223, 95, 83, 0);
  }
}

@keyframes boardShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(4px);
  }
  75% {
    transform: translateX(-2px);
  }
}

@media (max-width: 1024px) {
  .sentence-snake-app {
    grid-template-columns: 1fr;
  }

  .game-note {
    width: min(100%, 760px);
    justify-self: center;
    grid-template-columns: 1fr 1fr;
  }

  .back-link {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body {
    background: linear-gradient(160deg, #f9edcf 0%, #cbe9ec 56%, #edf3d5 100%);
  }

  .sentence-snake-app {
    min-height: 100dvh;
    padding: 8px;
    gap: 8px;
  }

  .play-shell {
    gap: 7px;
  }

  .game-hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    width: 100%;
    border-radius: 18px;
    padding: 6px;
    gap: 5px;
  }

  .game-hud span,
  .game-hud strong {
    min-height: 30px;
    padding: 0 8px;
    font-size: 0.76rem;
  }

  #streakHud {
    display: none;
  }

  .mission-banner {
    min-height: 64px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .mission-banner p {
    font-size: 0.68rem;
  }

  .mission-banner h1 {
    font-size: clamp(0.96rem, 4.6vw, 1.14rem);
  }

  .city-board {
    width: min(94vw, calc(100dvh - 294px));
    min-width: 270px;
    border-width: 3px;
    border-radius: 20px;
  }

  .answer-item {
    grid-template-columns: 22px minmax(0, 1fr);
    padding: 4px 5px;
    gap: 4px;
    border-radius: 12px;
    font-size: clamp(0.68rem, 3.1vw, 0.82rem);
  }

  .answer-item .answer-icon {
    width: 22px;
    height: 20px;
  }

  .feedback-toast {
    bottom: 9px;
    border-radius: 16px;
    font-size: 0.78rem;
  }

  .sentence-bar {
    width: 100%;
    min-height: 48px;
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 7px 9px;
    border-radius: 15px;
  }

  .sentence-bar > span {
    font-size: 0.65rem;
  }

  .sentence-chunks {
    gap: 4px;
  }

  .sentence-chunks span {
    min-height: 26px;
    padding: 4px 7px;
    font-size: 0.76rem;
  }

  .touch-controls {
    grid-template-columns: repeat(3, 58px);
    grid-template-rows: repeat(2, 46px);
    gap: 7px;
  }

  .touch-controls button {
    border-radius: 16px;
  }

  .game-note {
    display: none;
  }

  .start-screen,
  .result-screen {
    padding: 10px;
  }

  .start-card,
  .result-card {
    max-height: 94dvh;
    border-radius: 22px;
    gap: 10px;
  }

  .start-city {
    height: 82px;
  }

  .level-selector {
    gap: 6px;
  }

  .level-selector button {
    min-height: 44px;
    border-radius: 13px;
  }

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

  .review-list {
    max-height: 180px;
  }
}

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