@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap");

:root {
  --ink: #35252d;
  --night: #17243d;
  --cream: #fff0c2;
  --cream-dark: #e7c476;
  --wood: #8f593f;
  --wood-dark: #50352f;
  --gold: #f6bd45;
  --berry: #c94c67;
  --leaf: #4d8b49;
  --water: #65b7ce;
  --panel-shadow: 6px 7px 0 rgba(25, 24, 36, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--night);
  color: var(--ink);
  font-family: "VT323", monospace;
  font-size: 20px;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.game {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #87c95c;
  image-rendering: pixelated;
}

.pixel-panel {
  border: 4px solid var(--wood-dark);
  border-radius: 2px;
  background: var(--cream);
  box-shadow:
    inset 0 0 0 4px var(--cream-dark),
    var(--panel-shadow);
}

.hud {
  position: fixed;
  z-index: 10;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.player-hud,
.quest-hud {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 11px 15px;
  pointer-events: auto;
}

.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 3px solid var(--ink);
  background: var(--berry);
  color: var(--cream);
  box-shadow: inset 0 -7px 0 rgba(53, 37, 45, 0.25);
  font: 18px "Press Start 2P", monospace;
}

.hud-label {
  display: block;
  margin-bottom: 6px;
  font: 9px/1.4 "Press Start 2P", monospace;
  text-transform: uppercase;
}

.hud-detail {
  color: var(--wood);
  line-height: 1;
}

.mobile-label {
  display: none;
}

.seed-row {
  display: flex;
  gap: 7px;
  margin-top: 7px;
}

.seed-slot {
  width: 18px;
  height: 18px;
  border: 3px solid var(--wood-dark);
  background: #c9aa71;
  transform: rotate(45deg);
  transition: background 0.2s;
}

.seed-slot.found {
  background: var(--gold);
  box-shadow: inset 0 0 0 3px #fff0a5;
}

.menu-button {
  min-height: 54px;
  padding: 0 16px;
  border: 4px solid var(--wood-dark);
  background: var(--cream);
  box-shadow:
    inset 0 0 0 3px var(--cream-dark),
    4px 5px 0 rgba(25, 24, 36, 0.35);
  font: 9px "Press Start 2P", monospace;
  text-transform: uppercase;
  pointer-events: auto;
}

.menu-button:hover {
  color: var(--cream);
  background: var(--berry);
}

.location-banner {
  position: fixed;
  z-index: 8;
  top: 104px;
  left: 50%;
  min-width: 220px;
  padding: 12px 18px 9px;
  border: 3px solid var(--ink);
  background: rgba(255, 240, 194, 0.94);
  box-shadow: 4px 4px 0 rgba(53, 37, 45, 0.5);
  font: 9px/1.5 "Press Start 2P", monospace;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  transform: translate(-50%, 20px);
  transition: opacity 0.2s steps(3), transform 0.2s steps(3);
}

.location-banner.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.location-banner.changing {
  animation: locationPulse 0.3s steps(2);
}

@keyframes locationPulse {
  0% {
    transform: translate(-50%, 0) scale(1);
  }
  50% {
    box-shadow: 5px 5px 0 rgba(53, 37, 45, 0.52);
    transform: translate(-50%, -2px) scale(1.015);
  }
  100% {
    transform: translate(-50%, 0) scale(1);
  }
}

@media (min-width: 801px) {
  .location-banner {
    top: 16px;
  }
}

.interaction-prompt {
  position: fixed;
  z-index: 9;
  bottom: 34px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 8px;
  border: 3px solid var(--ink);
  background: var(--cream);
  box-shadow: 4px 4px 0 rgba(53, 37, 45, 0.45);
  font: 9px/1.4 "Press Start 2P", monospace;
  text-transform: uppercase;
  opacity: 0;
  transform: translate(-50%, 0) scale(0.85);
  transition: opacity 0.14s steps(2), transform 0.14s steps(2);
}

.interaction-prompt.visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.key {
  display: grid;
  place-items: center;
  min-width: 27px;
  height: 27px;
  padding: 0 6px;
  border: 3px solid var(--ink);
  background: var(--gold);
  box-shadow: 2px 2px 0 var(--ink);
}

.dialogue {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 28px;
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 18px;
  width: min(820px, calc(100% - 36px));
  min-height: 154px;
  padding: 22px;
  visibility: hidden;
  transform: translate(-50%, 150%);
  transition: transform 0.22s steps(3), visibility 0.22s;
}

.dialogue.visible {
  visibility: visible;
  transform: translate(-50%, 0);
}

.dialogue-portrait {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 4px solid var(--ink);
  background: var(--leaf);
  color: var(--cream);
  box-shadow: inset 0 -11px 0 rgba(53, 37, 45, 0.2);
  font: 24px "Press Start 2P", monospace;
}

.dialogue-speaker {
  margin: 0 0 8px;
  color: var(--berry);
  font: 10px/1.5 "Press Start 2P", monospace;
  text-transform: uppercase;
}

.dialogue-text {
  margin: 0;
  font-size: 25px;
  line-height: 1.05;
}

.dialogue-next {
  align-self: end;
  width: 40px;
  height: 36px;
  border: 3px solid var(--ink);
  background: var(--gold);
  box-shadow: 3px 3px 0 var(--ink);
  font: 12px "Press Start 2P", monospace;
  animation: nudge 1s steps(2) infinite;
}

@keyframes nudge {
  50% {
    transform: translateY(-3px);
  }
}

.overlay {
  position: fixed;
  z-index: 70;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(19, 25, 42, 0.78);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s;
}

.overlay.visible {
  opacity: 1;
  visibility: visible;
}

.portfolio-window {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-width: 0;
  width: min(1050px, 100%);
  height: min(720px, 92vh);
  overflow: hidden;
}

.menu-sidebar {
  min-width: 0;
  padding: 24px 16px;
  border-right: 4px solid var(--wood-dark);
  background: #d99a62;
}

.menu-sidebar h1 {
  margin: 0 8px 22px;
  font: 15px/1.5 "Press Start 2P", monospace;
  color: var(--cream);
  text-shadow: 3px 3px 0 var(--wood-dark);
}

.tab-list {
  display: grid;
  gap: 9px;
}

.tab-button {
  width: 100%;
  padding: 13px 10px 10px;
  border: 3px solid var(--wood-dark);
  background: var(--cream);
  box-shadow: 3px 3px 0 var(--wood-dark);
  font: 8px/1.5 "Press Start 2P", monospace;
  text-align: left;
  text-transform: uppercase;
}

.tab-button[aria-selected="true"],
.tab-button:hover {
  color: var(--cream);
  background: var(--berry);
}

.menu-content {
  position: relative;
  min-width: 0;
  overflow-y: auto;
  padding: 42px 46px 48px;
  background:
    linear-gradient(rgba(143, 89, 63, 0.08) 1px, transparent 1px) 0 0 / 100% 30px,
    var(--cream);
}

.close-button {
  position: sticky;
  z-index: 2;
  top: 0;
  float: right;
  width: 42px;
  height: 42px;
  margin: -27px -30px 0 14px;
  border: 3px solid var(--ink);
  background: var(--berry);
  color: var(--cream);
  box-shadow: 3px 3px 0 var(--ink);
  font: 12px "Press Start 2P", monospace;
}

.content-panel[hidden] {
  display: none;
}

.content-kicker {
  display: inline-block;
  margin-bottom: 18px;
  padding: 8px 10px 6px;
  border: 3px solid var(--ink);
  background: var(--gold);
  box-shadow: 3px 3px 0 var(--ink);
  font: 8px/1.5 "Press Start 2P", monospace;
  text-transform: uppercase;
}

.content-panel h2 {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--berry);
  font: clamp(22px, 4vw, 40px)/1.35 "Press Start 2P", monospace;
  letter-spacing: -0.06em;
}

.lead {
  margin: 0 0 28px;
  font-size: 31px;
  line-height: 1.06;
}

.skill-chips,
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-chips span,
.pixel-link {
  padding: 9px 11px 7px;
  border: 3px solid var(--wood-dark);
  background: #f6d98c;
  box-shadow: 2px 2px 0 var(--wood-dark);
  font: 8px/1.5 "Press Start 2P", monospace;
  text-decoration: none;
}

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

.item-slot {
  display: none;
}

.item-slot.owned {
  display: grid;
  justify-items: center;
  gap: 13px;
  min-height: 170px;
  padding: 20px 14px;
  border: 4px solid var(--wood-dark);
  color: var(--ink);
  background: #fff7da;
  box-shadow: 4px 4px 0 rgba(80, 53, 47, .25);
  text-align: center;
}

.item-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 4px solid var(--wood-dark);
  background: var(--gold);
  box-shadow: inset 0 -8px 0 rgba(143, 89, 63, .2);
  font: 25px "Press Start 2P", monospace;
}

.item-slot strong,
.item-slot small {
  display: block;
}

.item-slot strong {
  font: 9px/1.5 "Press Start 2P", monospace;
}

.item-slot small {
  margin-top: 8px;
  font-size: 19px;
  line-height: 1;
}

/* ── Journal ──────────────────────────────────────────── */

.journal-entries {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

.journal-entry {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px;
  background: #fff7da;
  border: 3px solid var(--wood-dark);
  box-shadow: 3px 3px 0 rgba(80, 53, 47, .2);
}

.journal-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--gold);
  border: 3px solid var(--wood-dark);
  font: 14px "Press Start 2P", monospace;
  flex-shrink: 0;
}

.journal-source {
  display: block;
  font: 8px/1.6 "Press Start 2P", monospace;
  color: var(--berry);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.journal-text {
  font: 9px/1.8 "Press Start 2P", monospace;
  color: var(--ink);
}

.pixel-link:hover {
  color: var(--cream);
  background: var(--berry);
}

.cards {
  display: grid;
  gap: 16px;
}

.content-card {
  position: relative;
  padding: 20px;
  border: 4px solid var(--wood-dark);
  background: #fff7da;
  box-shadow: 4px 4px 0 rgba(80, 53, 47, 0.28);
}

.content-card h3 {
  margin: 0 0 8px;
  color: var(--berry);
  font: 13px/1.5 "Press Start 2P", monospace;
}

.content-card p {
  margin: 0;
  font-size: 23px;
  line-height: 1.08;
}

.content-card .meta {
  display: block;
  margin-top: 12px;
  color: var(--wood);
  font: 8px/1.5 "Press Start 2P", monospace;
  text-transform: uppercase;
}

.content-card > a {
  position: absolute;
  inset: 0;
  font-size: 0;
}

.timeline {
  border-top: 4px solid var(--wood-dark);
}

.timeline-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 14px;
  padding: 16px 4px;
  border-bottom: 3px dashed #c59c63;
}

.timeline-row strong {
  font: 9px/1.6 "Press Start 2P", monospace;
}

.timeline-row span:nth-child(2) {
  color: var(--berry);
}

.timeline-row time {
  font: 8px/1.6 "Press Start 2P", monospace;
  text-transform: uppercase;
}

.touch-controls {
  position: fixed;
  z-index: 15;
  inset: auto 18px 18px;
  display: none;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.joystick {
  position: relative;
  width: 150px;
  height: 150px;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.joystick-ring {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: rgba(255, 240, 194, 0.34);
  box-shadow:
    inset 0 0 0 8px rgba(255, 240, 194, 0.12),
    4px 4px 0 rgba(53, 37, 45, 0.55);
}

.joystick-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 62px;
  height: 62px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: rgba(120, 181, 116, 0.96);
  box-shadow: 4px 4px 0 rgba(53, 37, 45, 0.65);
  transform: translate(-50%, -50%);
  will-change: transform;
}

.action-button {
  position: static;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  color: var(--cream);
  background: rgba(201, 76, 103, 0.94);
  box-shadow: 3px 3px 0 rgba(53, 37, 45, 0.65);
  font: 14px "Press Start 2P", monospace;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.start-screen {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 22%, #fff7be 0 3px, transparent 4px),
    radial-gradient(circle at 77% 34%, white 0 3px, transparent 4px),
    linear-gradient(#80c9dc 0 55%, transparent 55%),
    linear-gradient(90deg, rgba(255,255,255,.05) 2px, transparent 2px) 0 55% / 42px 42px,
    linear-gradient(rgba(255,255,255,.04) 2px, transparent 2px) 0 55% / 42px 42px,
    #5c9948;
  transition: opacity 0.4s steps(5), visibility 0.4s;
}

.start-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.start-scenery {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.start-scenery::before,
.start-scenery::after {
  content: "";
  position: absolute;
  left: -5%;
  width: 110%;
}

.start-scenery::before {
  bottom: 36%;
  height: 22%;
  background:
    linear-gradient(135deg, transparent 38%, #568b49 39% 61%, transparent 62%) 0 0 / 240px 150px repeat-x;
  opacity: .88;
}

.start-scenery::after {
  bottom: 0;
  height: 20%;
  background:
    linear-gradient(90deg, transparent 48%, #d4b15f 48% 52%, transparent 52%) 0 0 / 92px 92px,
    linear-gradient(0deg, transparent 48%, rgba(139,194,84,.8) 48% 52%, transparent 52%) 0 0 / 92px 92px;
}

.start-sun {
  position: absolute;
  top: 9%;
  right: 10%;
  width: 76px;
  height: 76px;
  border: 6px solid #d99b3e;
  border-radius: 50%;
  background: #ffe071;
  box-shadow: 0 0 0 12px rgba(255,224,113,.2);
  animation: sunGlow 2.2s steps(2) infinite;
}

.start-cloud {
  position: absolute;
  width: 96px;
  height: 26px;
  background: rgba(255,255,255,.88);
  box-shadow: 24px -18px 0 rgba(255,255,255,.88), 54px -8px 0 rgba(255,255,255,.88);
  animation: cloudDrift 24s linear infinite;
}

.cloud-one { top: 14%; left: -160px; }
.cloud-two { top: 29%; left: -240px; animation-delay: -9s; animation-duration: 31s; transform: scale(.72); }
.cloud-three { top: 7%; left: -190px; animation-delay: -18s; animation-duration: 37s; transform: scale(.52); }

.start-birds {
  position: absolute;
  top: 26%;
  left: 17%;
  color: #3c5960;
  font: 26px/1 "Press Start 2P", monospace;
  animation: birdsBob 1.3s steps(2) infinite;
}

.start-windmill {
  position: absolute;
  right: 8%;
  bottom: 17%;
  width: 18px;
  height: 126px;
  background: #80543d;
  box-shadow: 9px 0 0 #6a4434;
}

.start-windmill::after {
  content: "";
  position: absolute;
  left: -21px;
  bottom: -12px;
  width: 68px;
  height: 30px;
  background: #d9a164;
  border: 5px solid #50352f;
}

.start-windmill i {
  position: absolute;
  z-index: 1;
  top: -31px;
  left: -34px;
  width: 86px;
  height: 86px;
  animation: windmillSpin 4s steps(12) infinite;
}

.start-windmill i::before,
.start-windmill i::after {
  content: "";
  position: absolute;
  background: #fff0c2;
  border: 4px solid #50352f;
}

.start-windmill i::before {
  top: 36px;
  left: 0;
  width: 86px;
  height: 12px;
}

.start-windmill i::after {
  top: 0;
  left: 36px;
  width: 12px;
  height: 86px;
}

.start-leaf {
  position: absolute;
  top: -20px;
  width: 9px;
  height: 14px;
  background: #447b3d;
  transform: rotate(45deg);
  animation: leafFall 6s steps(18) infinite;
}

.leaf-one { left: 8%; animation-delay: -1s; }
.leaf-two { left: 31%; animation-delay: -4.2s; animation-duration: 7.5s; }
.leaf-three { left: 71%; animation-delay: -2.7s; animation-duration: 5.5s; }
.leaf-four { left: 91%; animation-delay: -5.4s; animation-duration: 8s; }

@keyframes cloudDrift {
  to { left: calc(100% + 180px); }
}

@keyframes birdsBob {
  50% { transform: translateY(-5px); }
}

@keyframes windmillSpin {
  to { transform: rotate(360deg); }
}

@keyframes leafFall {
  0% { transform: translate(0, -20px) rotate(0); }
  50% { transform: translate(45px, 52vh) rotate(180deg); }
  100% { transform: translate(-15px, 105vh) rotate(360deg); }
}

@keyframes sunGlow {
  50% { box-shadow: 0 0 0 18px rgba(255,224,113,.14); }
}

.start-card {
  position: relative;
  z-index: 2;
  width: min(670px, 100%);
  padding: 42px;
  text-align: center;
  animation: cardIdle 3s steps(6) infinite;
}

@keyframes cardIdle {
  50% { transform: translateY(-3px); }
}

.start-card .eyebrow {
  color: var(--wood);
  font: 9px/1.5 "Press Start 2P", monospace;
  text-transform: uppercase;
}

.start-card h1 {
  margin: 18px 0;
  color: var(--berry);
  font: clamp(29px, 7vw, 58px)/1.3 "Press Start 2P", monospace;
  letter-spacing: -0.07em;
  text-shadow: 5px 5px 0 var(--cream-dark);
}

.start-card p {
  max-width: 500px;
  margin: 0 auto 26px;
  font-size: 27px;
  line-height: 1.08;
}

.start-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button,
.secondary-button {
  padding: 14px 17px 11px;
  border: 4px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font: 9px/1.5 "Press Start 2P", monospace;
  text-transform: uppercase;
}

.primary-button {
  color: var(--cream);
  background: var(--berry);
  animation: startButtonPulse 1.7s steps(2) infinite;
}

@keyframes startButtonPulse {
  50% { filter: brightness(1.12); transform: translateY(-2px); }
}

.secondary-button {
  background: var(--gold);
}

.start-help {
  display: block;
  margin-top: 24px;
  color: var(--wood);
  font: 8px/1.6 "Press Start 2P", monospace;
}

.toast {
  position: fixed;
  z-index: 50;
  top: 50%;
  left: 50%;
  width: min(520px, calc(100% - 40px));
  padding: 24px;
  color: var(--cream);
  background: var(--berry);
  border: 5px solid var(--ink);
  box-shadow: 7px 7px 0 rgba(53, 37, 45, 0.55);
  font: 12px/1.7 "Press Start 2P", monospace;
  text-align: center;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.25s steps(4);
}

.toast.visible {
  transform: translate(-50%, -50%) scale(1);
}

.touch-device .touch-controls {
  display: flex;
}

.touch-device .interaction-prompt {
  bottom: 178px;
}

.touch-device .dialogue {
  bottom: 184px;
}

@media (max-width: 700px) {
  .hud {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 8px;
  }

  .player-hud {
    flex: 0 1 44%;
    min-width: 0;
    min-height: 58px;
    padding: 8px 10px;
  }

  .player-hud > div {
    min-width: 0;
  }

  .avatar {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .player-hud .hud-detail {
    display: none;
  }

  .quest-hud {
    flex: 1 1 auto;
    justify-content: space-between;
    min-width: 0;
    min-height: 58px;
    padding: 8px 10px;
  }

  .hud-label {
    font-size: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .desktop-label {
    display: none;
  }

  .mobile-label {
    display: inline;
  }

  .location-banner {
    top: 104px;
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .interaction-prompt {
    bottom: 174px;
    width: max-content;
    max-width: calc(100% - 32px);
  }

  .seed-slot {
    width: 14px;
    height: 14px;
    border-width: 2px;
  }

  .menu-button {
    min-height: 47px;
    padding: 0 10px;
    font-size: 7px;
  }

  .portfolio-window {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    height: calc(100vh - 24px);
  }

  .menu-sidebar {
    padding: 14px;
    border-right: 0;
    border-bottom: 4px solid var(--wood-dark);
  }

  .menu-sidebar h1 {
    margin: 0 0 11px;
    font-size: 10px;
  }

  .tab-list {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .tab-button {
    flex: 0 0 auto;
    width: auto;
    padding: 9px 8px 7px;
    font-size: 7px;
  }

  .menu-content {
    padding: 33px 24px 38px;
  }

  .close-button {
    margin: -22px -12px 0 10px;
  }

  .content-panel h2 {
    font-size: 23px;
  }

  .lead {
    font-size: 25px;
  }

  .timeline-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .satchel-grid {
    grid-template-columns: 1fr;
  }

  .item-slot {
    grid-template-columns: 62px 1fr;
    justify-items: start;
    align-items: center;
    min-height: auto;
    text-align: left;
  }

  .dialogue {
    grid-template-columns: 50px 1fr;
    gap: 12px;
    min-height: 130px;
    padding: 16px;
  }

  .dialogue-portrait {
    width: 48px;
    height: 48px;
    border-width: 3px;
    font-size: 16px;
  }

  .dialogue-speaker {
    font-size: 8px;
  }

  .dialogue-text {
    font-size: 21px;
  }

  .dialogue-next {
    position: absolute;
    right: 13px;
    bottom: 13px;
  }

  .start-card {
    padding: 30px 21px;
  }
}

@media (max-width: 430px) {
  .quest-hud .hud-label {
    max-width: 76px;
  }

  .location-banner {
    top: 104px;
  }

  .interaction-prompt {
    bottom: 170px;
  }

  .joystick {
    width: 132px;
    height: 132px;
  }

  .joystick-knob {
    width: 56px;
    height: 56px;
  }

  .action-button {
    width: 64px;
    height: 64px;
  }
}

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