:root {
  color-scheme: light;
  --ink: #17233d;
  --muted: #53617a;
  --paper: #fffaf0;
  --white: #ffffff;
  --leaf: #3faf7a;
  --leaf-dark: #16704b;
  --sky: #8ed7ee;
  --sky-pale: #e9f8fc;
  --sun: #ffd760;
  --berry: #ec6f68;
  --soil: #a96845;
  --lavender: #b8a8ed;
  font-family: "Avenir Next", "Trebuchet MS", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 18%, rgb(255 215 96 / 34%), transparent 18rem),
    radial-gradient(
      circle at 92% 82%,
      rgb(63 175 122 / 24%),
      transparent 22rem
    ),
    var(--paper);
  font-size: 1rem;
  line-height: 1.5;
}

button,
a {
  min-height: 48px;
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

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

[data-game-control],
h1,
h2 {
  scroll-margin-block: 84px 28px;
}

.skip-link {
  position: fixed;
  z-index: 60;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  color: var(--white);
  background: var(--ink);
  font-weight: 900;
  transform: translateY(-180%);
}

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

.game-bar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  min-height: 70px;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem max(0.75rem, calc((100vw - 1080px) / 2));
  border-bottom: 2px solid var(--ink);
  background: rgb(255 250 240 / 94%);
  backdrop-filter: blur(12px);
}

.home-link {
  justify-self: start;
}

.game-bar strong {
  font-size: 1.08rem;
  text-align: center;
}

.game-bar > :last-child,
.game-bar-actions {
  justify-self: end;
}

.game-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.home-link,
#guide-open,
#guide-close,
.quiet-actions button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: 14px;
  color: var(--ink);
  background: var(--white);
  font-weight: 850;
  text-decoration: none;
}

.home-link span {
  margin-right: 0.4rem;
}

.guide-panel {
  width: min(620px, calc(100% - 1.5rem));
  max-width: none;
  max-height: calc(100dvh - 1.5rem);
  margin: auto;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  overflow: visible;
}

.guide-panel::backdrop {
  background: rgb(23 35 61 / 72%);
  backdrop-filter: blur(3px);
}

.guide-panel > div {
  width: 100%;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: clamp(1.4rem, 5vw, 2.4rem);
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 8px 0 var(--ink);
}

.guide-panel h2 {
  margin-top: 0.2rem;
}

.guide-panel li + li {
  margin-top: 0.45rem;
}

main {
  display: grid;
  min-height: calc(100vh - 70px);
  min-height: calc(100dvh - 70px);
  padding: clamp(1rem, 3vw, 2.25rem);
  place-items: center;
}

.screen {
  width: min(880px, 100%);
  scroll-margin-block-start: 84px;
  padding: clamp(1.25rem, 4vw, 2.7rem);
  border: 3px solid var(--ink);
  border-radius: 30px;
  background: var(--white);
  box-shadow: 0 9px 0 var(--ink);
  text-align: center;
}

.start-screen {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(300px, 1.1fr);
  overflow: hidden;
  padding: 0;
  text-align: left;
}

.start-copy {
  align-self: center;
  padding: clamp(1.5rem, 5vw, 3.5rem);
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--leaf-dark);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: break-word;
}

h1 {
  max-width: 8ch;
  margin: 0 0 0.8rem;
  font-size: clamp(3rem, 8vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
}

h2 {
  margin: 0.2rem auto 0.75rem;
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.lead {
  margin: 0 auto 1.4rem;
  color: var(--ink);
  font-size: clamp(1.12rem, 2.3vw, 1.35rem);
  font-weight: 720;
  line-height: 1.42;
}

.lead.small {
  max-width: 640px;
  font-size: clamp(1.02rem, 2vw, 1.18rem);
}

.quiet-copy {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 720;
}

.primary-action,
.secondary-action,
.secondary-link {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.25rem;
  border: 3px solid var(--ink);
  border-radius: 17px;
  color: var(--ink);
  font-weight: 950;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--ink);
}

.primary-action {
  background: var(--sun);
}

.secondary-action,
.secondary-link {
  background: var(--white);
}

.primary-action:not(:disabled):active,
.secondary-action:active,
.secondary-link:active,
.mission-card:active,
.observation-grid button:active,
.comparison-grid button:active {
  box-shadow: 0 1px 0 var(--ink);
  transform: translateY(3px);
}

.together-note {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 0.75rem;
  margin: 1.1rem 0 1.3rem;
  padding: 0.9rem;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--sky-pale);
}

.together-note p {
  margin: 0;
}

.together-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
  font-weight: 950;
}

.window-scene {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border-right: 3px solid var(--ink);
  background: linear-gradient(#bdeaf5 0 58%, #dff3ca 58% 100%);
}

.window-scene::before,
.window-scene::after {
  position: absolute;
  z-index: 8;
  background: var(--ink);
  content: "";
}

.window-scene::before {
  top: 0;
  bottom: 0;
  left: calc(50% - 6px);
  width: 12px;
}

.window-scene::after {
  top: calc(50% - 6px);
  right: 0;
  left: 0;
  height: 12px;
}

.sun {
  position: absolute;
  top: 12%;
  left: 12%;
  width: 72px;
  height: 72px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
}

.cloud {
  position: absolute;
  z-index: 2;
  width: 108px;
  height: 36px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
}

.cloud::before,
.cloud::after {
  position: absolute;
  bottom: 13px;
  border: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
  background: var(--white);
  content: "";
}

.cloud::before {
  left: 19px;
  width: 34px;
  height: 29px;
}

.cloud::after {
  right: 17px;
  width: 42px;
  height: 40px;
}

.cloud-one {
  top: 22%;
  right: 8%;
  animation: cloud-drift 7s ease-in-out infinite alternate;
}

.cloud-two {
  top: 40%;
  left: 8%;
  scale: 0.72;
  animation: cloud-drift 9s ease-in-out -2s infinite alternate-reverse;
}

.hill {
  position: absolute;
  bottom: -80px;
  border: 3px solid var(--ink);
  border-radius: 50% 50% 0 0;
}

.hill-back {
  right: -85px;
  width: 330px;
  height: 270px;
  background: #8bd28d;
}

.hill-front {
  bottom: -120px;
  left: -105px;
  width: 390px;
  height: 310px;
  background: var(--leaf);
}

.plant {
  position: absolute;
  z-index: 6;
  bottom: 6%;
  width: 8px;
  height: 105px;
  border: 2px solid var(--ink);
  background: var(--leaf-dark);
}

.plant-one {
  right: 23%;
}

.plant-two {
  bottom: 2%;
  left: 27%;
  height: 84px;
}

.plant i {
  position: absolute;
  width: 48px;
  height: 28px;
  border: 2px solid var(--ink);
  border-radius: 100% 0 100% 0;
  background: #bce77f;
  transform: rotate(-24deg);
}

.plant i:nth-child(1) {
  top: 12px;
  left: -45px;
}

.plant i:nth-child(2) {
  top: 41px;
  left: 4px;
  transform: scaleX(-1) rotate(-24deg);
}

.plant i:nth-child(3) {
  top: 69px;
  left: -43px;
}

.step-line {
  display: flex;
  max-width: 600px;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0 auto 1.4rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.step-line span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--white);
  font-weight: 950;
}

.step-line span.current,
body[data-phase="choose"] .step-line span:first-child {
  background: var(--sun);
}

.step-line i {
  width: clamp(10px, 5vw, 54px);
  height: 2px;
  background: #b3bdc8;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}

.mission-card {
  display: grid;
  min-height: 190px;
  padding: 1.1rem;
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: var(--sky-pale);
  box-shadow: 0 5px 0 var(--ink);
  place-items: center;
}

.mission-card:nth-child(2) {
  background: #eff9df;
}

.mission-card:nth-child(3) {
  background: #fff1d6;
}

.mission-card:nth-child(4) {
  background: #f0eafa;
}

.mission-card strong {
  margin-top: 0.6rem;
  font-size: 1.28rem;
}

.mission-card small {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 720;
}

.mission-picture {
  position: relative;
  display: block;
  width: 104px;
  height: 76px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--white);
}

.mission-picture--sky {
  background: linear-gradient(var(--sky) 0 68%, #a5db91 68%);
}

.mission-picture--sky i {
  position: absolute;
  top: 10px;
  left: 12px;
  width: 24px;
  height: 24px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
}

.mission-picture--sky b {
  position: absolute;
  top: 25px;
  right: 10px;
  width: 48px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
}

.mission-picture--plant::before,
.mission-picture--plant::after {
  position: absolute;
  top: 13px;
  width: 39px;
  height: 50px;
  border: 3px solid var(--ink);
  border-radius: 100% 0 100% 0;
  background: var(--leaf);
  content: "";
}

.mission-picture--plant::before {
  left: 19px;
  transform: rotate(-22deg);
}

.mission-picture--plant::after {
  right: 19px;
  transform: scaleX(-1) rotate(-22deg);
}

.mission-picture--sound i,
.mission-picture--sound b,
.mission-picture--sound::after {
  position: absolute;
  top: 16px;
  border: 4px solid var(--ink);
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  content: "";
}

.mission-picture--sound i {
  left: 15px;
  width: 20px;
  height: 40px;
}

.mission-picture--sound b {
  left: 27px;
  width: 34px;
  height: 40px;
}

.mission-picture--sound::after {
  left: 40px;
  width: 46px;
  height: 40px;
}

.mission-picture--indoor {
  background: linear-gradient(var(--lavender) 0 54%, #d8b38d 54%);
}

.mission-picture--indoor::before,
.mission-picture--indoor::after {
  position: absolute;
  background: var(--ink);
  content: "";
}

.mission-picture--indoor::before {
  top: 0;
  bottom: 34%;
  left: 49px;
  width: 4px;
}

.mission-picture--indoor::after {
  top: 25px;
  right: 0;
  left: 0;
  height: 4px;
}

.mission-hero {
  position: relative;
  width: 160px;
  height: 118px;
  margin: 0.4rem auto 1rem;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 50% 50% 22px 22px;
  background: var(--sky-pale);
}

.mission-hero::before,
.mission-hero::after {
  position: absolute;
  content: "";
}

.mission-hero > span,
.mission-hero > i,
.mission-hero > b {
  display: none;
  position: absolute;
}

.mission-hero--sky {
  background: linear-gradient(var(--sky) 0 67%, #b6dd8b 67%);
}

.mission-hero--sky::before {
  top: 18px;
  left: 25px;
  width: 45px;
  height: 45px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
}

.mission-hero--sky::after {
  top: 46px;
  right: 20px;
  width: 70px;
  height: 26px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
}

.mission-hero--plant {
  background: linear-gradient(var(--sky-pale) 0 70%, #d2b08a 70%);
}

.mission-hero--plant::before,
.mission-hero--plant::after {
  top: 22px;
  width: 60px;
  height: 74px;
  border: 3px solid var(--ink);
  border-radius: 100% 0 100% 0;
  background: var(--leaf);
}

.mission-hero--plant::before {
  left: 28px;
  transform: rotate(-18deg);
}

.mission-hero--plant::after {
  right: 28px;
  transform: scaleX(-1) rotate(-18deg);
}

.mission-hero--sound::before {
  top: 19px;
  left: 39px;
  width: 72px;
  height: 72px;
  border: 5px solid var(--berry);
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  box-shadow:
    13px 0 0 -7px var(--sun),
    26px 0 0 -9px var(--leaf);
}

.mission-hero--sound::after {
  top: 49px;
  left: 35px;
  width: 25px;
  height: 25px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--lavender);
}

.mission-hero--indoor {
  background: linear-gradient(105deg, var(--sky-pale) 0 48%, var(--sky) 48% 100%);
}

.mission-hero--indoor::before {
  top: 15px;
  left: 17px;
  width: 35px;
  height: 35px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
}

.mission-hero--indoor::after {
  top: 25px;
  right: 13px;
  width: 55px;
  height: 23px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
}

.mission-hero--indoor > span {
  display: block;
  right: -14px;
  bottom: -2px;
  width: 124px;
  height: 70px;
  background: #2b7655;
  clip-path: polygon(0 100%, 44% 7%, 64% 45%, 79% 22%, 100% 100%);
}

.mission-hero--indoor > i,
.mission-hero--indoor > b {
  z-index: 1;
  display: block;
  border: 3px solid var(--ink);
  background: var(--leaf);
}

.mission-hero--indoor > i {
  bottom: 11px;
  left: 20px;
  width: 36px;
  height: 25px;
  border-radius: 100% 0 100% 0;
  transform: rotate(-18deg);
}

.mission-hero--indoor > b {
  bottom: 14px;
  left: 52px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
}

.screen-down-card {
  display: grid;
  grid-template-columns: 50px 1fr;
  max-width: 660px;
  align-items: center;
  gap: 0.85rem;
  margin: 1.2rem auto;
  padding: 1rem;
  border: 3px dashed var(--leaf-dark);
  border-radius: 20px;
  background: #f1fae6;
  text-align: left;
}

.screen-down-card > span {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
  font-size: 1.8rem;
  font-weight: 950;
}

.screen-down-card--onscreen > span {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.screen-down-card p,
.word-help p {
  margin: 0;
}

.word-help {
  max-width: 660px;
  margin: 1rem auto;
  padding: 0.85rem 1rem;
  border-left: 6px solid var(--lavender);
  border-radius: 10px;
  background: #f5f1fb;
  text-align: left;
}

.word-help button {
  min-height: 48px;
  margin-top: 0.65rem;
  padding: 0.5rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--white);
  font-weight: 900;
}

#hint-close {
  scroll-margin-block-end: 12px;
}

.action-row,
.quiet-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.quiet-actions {
  margin-top: 1rem;
}

.quiet-actions button {
  min-height: 48px;
  border-color: #7a8799;
  color: #344158;
  background: transparent;
  font-size: 0.92rem;
}

.observation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  max-width: 700px;
  margin: 1.5rem auto;
}

.observation-grid button,
.comparison-grid button {
  display: grid;
  min-height: 112px;
  padding: 0.75rem;
  border: 3px solid var(--ink);
  border-radius: 19px;
  background: var(--sky-pale);
  box-shadow: 0 4px 0 var(--ink);
  place-items: center;
}

.observation-grid button:nth-child(3n + 2) {
  background: #eff9df;
}

.observation-grid button:nth-child(3n + 3) {
  background: #fff1d6;
}

.observation-grid button[aria-pressed="true"],
.comparison-grid button[aria-pressed="true"] {
  background: var(--sun);
  box-shadow:
    0 0 0 5px var(--white),
    0 0 0 9px var(--leaf-dark);
}

.observation-grid span,
.comparison-grid span {
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 950;
  line-height: 1;
}

.observation-grid strong,
.comparison-grid strong {
  font-size: 1.05rem;
}

.note-preview,
.finished-note {
  display: grid;
  grid-template-columns: 50px 1fr;
  max-width: 650px;
  min-height: 92px;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem auto;
  padding: 1rem 1.2rem;
  border: 3px solid var(--ink);
  border-radius: 10px 24px 24px 10px;
  background:
    linear-gradient(
      90deg,
      transparent 31px,
      rgb(236 111 104 / 28%) 31px 34px,
      transparent 34px
    ),
    repeating-linear-gradient(var(--white) 0 31px, #dcecf1 31px 33px);
  box-shadow: 0 5px 0 var(--ink);
  text-align: left;
}

.mini-note {
  max-width: 650px;
  margin: 0.8rem auto;
  padding: 0.75rem 1rem;
  border: 2px solid var(--leaf-dark);
  border-radius: 14px;
  background: #f1fae6;
  text-align: left;
}

.mini-note strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--leaf-dark);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mini-note p {
  margin: 0;
  font-weight: 800;
}

.note-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  max-width: 720px;
  margin: 1rem auto 1.25rem;
}

.note-pair article {
  min-height: 118px;
  padding: 0.9rem 1rem 0.85rem 1.3rem;
  border: 3px solid var(--ink);
  border-radius: 10px 20px 20px 10px;
  background:
    linear-gradient(90deg, transparent 20px, rgb(236 111 104 / 30%) 20px 23px, transparent 23px),
    repeating-linear-gradient(var(--white) 0 29px, #dcecf1 29px 31px);
  box-shadow: 0 4px 0 var(--ink);
  text-align: left;
}

.note-pair article > strong {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  color: var(--white);
  background: var(--leaf-dark);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.note-pair article:nth-child(2) > strong {
  background: #7a5393;
}

.note-pair p {
  margin: 0.6rem 0 0;
  font-size: clamp(0.98rem, 2.2vw, 1.13rem);
  font-weight: 850;
}

.note-preview p,
.finished-note p {
  margin: 0;
  font-size: clamp(1.05rem, 2.8vw, 1.28rem);
  font-weight: 850;
}

.note-leaf {
  display: block;
  width: 42px;
  height: 55px;
  border: 3px solid var(--ink);
  border-radius: 100% 0 100% 0;
  background: var(--leaf);
  transform: rotate(-12deg);
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  max-width: 700px;
  margin: 1.5rem auto 1rem;
}

.comparison-grid button:nth-child(2) {
  background: #eff9df;
}

.comparison-grid button:nth-child(3) {
  background: #f0eafa;
}

.feedback {
  min-height: 1.7rem;
  margin: 0.85rem auto;
  color: var(--leaf-dark);
  font-weight: 900;
}

.finished-screen,
.revisit-screen {
  background:
    radial-gradient(circle at 12% 14%, rgb(255 215 96 / 45%), transparent 9rem),
    radial-gradient(
      circle at 90% 85%,
      rgb(63 175 122 / 25%),
      transparent 12rem
    ),
    var(--white);
}

.finished-scene,
.revisit-scene {
  position: relative;
  width: 130px;
  height: 105px;
  margin: 0 auto 0.4rem;
}

.finished-scene > span,
.finished-scene > i,
.finished-scene > b,
.revisit-scene > span,
.revisit-scene > i,
.revisit-scene > b {
  position: absolute;
  bottom: 8px;
  width: 52px;
  height: 68px;
  border: 3px solid var(--ink);
  border-radius: 100% 0 100% 0;
  background: var(--leaf);
}

.finished-scene > span,
.revisit-scene > span {
  left: 12px;
  transform: rotate(-24deg);
}

.finished-scene > i,
.revisit-scene > i {
  right: 12px;
  background: #a8dd75;
  transform: scaleX(-1) rotate(-24deg);
}

.finished-scene > b,
.revisit-scene > b {
  bottom: 20px;
  left: 43px;
  width: 44px;
  height: 58px;
  background: var(--sun);
  transform: rotate(-5deg);
}

.reflection {
  margin: 0.7rem auto;
  color: var(--leaf-dark);
  font-weight: 850;
}

.talk-prompt {
  max-width: 560px;
  margin: 1.3rem auto;
  padding: 0.9rem;
  border-radius: 16px;
  background: var(--sky-pale);
  font-size: 1.08rem;
}

.future-note {
  max-width: 590px;
  margin: 1.2rem auto 1.4rem;
  padding: 1rem;
  border: 3px dashed var(--berry);
  border-radius: 18px;
  background: #fff4e1;
}

.future-note strong {
  color: #8d3f3c;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.future-note p {
  margin: 0.35rem 0 0;
  font-weight: 750;
}

#finished-title {
  scroll-margin-block-start: 120px;
}

noscript {
  display: block;
  padding: 1rem;
  text-align: center;
}

@keyframes cloud-drift {
  from {
    translate: -5px 0;
  }

  to {
    translate: 12px 2px;
  }
}

@media (max-width: 700px) {
  .start-screen {
    grid-template-columns: 1fr;
  }

  .window-scene {
    min-height: 230px;
    border-right: 0;
    border-bottom: 3px solid var(--ink);
  }

  h1 {
    max-width: none;
  }

  .mission-card {
    min-height: 168px;
  }
}

@media (max-width: 520px) {
  .game-bar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .game-bar > strong {
    display: none;
  }

  .game-bar-actions {
    min-width: 0;
    gap: 0.35rem;
  }

  #guide-open {
    padding-inline: 0.65rem;
  }

  main {
    padding: 0.75rem 0.65rem 1.35rem;
  }

  .screen {
    padding: 1.15rem 0.85rem 1.5rem;
    border-radius: 22px;
    box-shadow: 0 6px 0 var(--ink);
  }

  .start-screen {
    padding: 0;
  }

  .start-copy {
    padding: 0.9rem 1rem 1.2rem;
  }

  .window-scene {
    min-height: 125px;
  }

  h1 {
    margin-bottom: 0.45rem;
    font-size: clamp(2.65rem, 15vw, 3.8rem);
  }

  h2 {
    font-size: clamp(1.85rem, 10vw, 2.7rem);
  }

  .start-copy .eyebrow {
    margin-bottom: 0.2rem;
    font-size: 0.7rem;
  }

  .start-copy .lead {
    margin-bottom: 0.65rem;
    font-size: 1rem;
    line-height: 1.3;
  }

  .together-note {
    grid-template-columns: 38px 1fr;
    gap: 0.55rem;
    margin: 0.65rem 0 0.75rem;
    padding: 0.55rem;
    font-size: 0.84rem;
    line-height: 1.32;
  }

  .together-mark {
    width: 38px;
    height: 38px;
  }

  .start-copy .quiet-copy {
    margin-top: 0.65rem;
    font-size: 0.78rem;
  }

  .step-line strong {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .step-line i {
    width: 34px;
  }

  .mission-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .mission-card {
    min-height: 150px;
    padding: 0.7rem 0.45rem;
  }

  .mission-picture {
    width: 84px;
    height: 62px;
  }

  .mission-card strong {
    font-size: 1.02rem;
  }

  .mission-card small {
    font-size: 0.76rem;
    line-height: 1.25;
  }

  .observation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .observation-grid button {
    min-height: 98px;
  }

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

  .comparison-grid button {
    min-height: 76px;
    grid-template-columns: 46px 1fr;
  }

  .note-preview,
  .finished-note {
    grid-template-columns: 40px 1fr;
    padding: 0.85rem;
  }

  .note-pair {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin-block: 0.75rem 1rem;
  }

  .note-pair article {
    min-height: 94px;
    padding-block: 0.7rem;
  }

  .finished-scene,
  .revisit-scene {
    width: 105px;
    height: 78px;
    margin-bottom: 0;
    transform: scale(0.78);
    transform-origin: bottom center;
  }

  .finished-screen .eyebrow,
  .revisit-screen .eyebrow {
    margin-bottom: 0.2rem;
  }

  .finished-screen h2,
  .revisit-screen h2 {
    margin-bottom: 0.5rem;
  }

  #finished-title {
    scroll-margin-block-start: 106px;
  }

  .note-leaf {
    width: 34px;
    height: 45px;
  }

  .action-row > *,
  .primary-action,
  .secondary-action,
  .secondary-link {
    width: 100%;
  }
}

@media (max-height: 420px) and (orientation: landscape) {
  .game-bar {
    min-height: 52px;
    padding-block: 0.2rem;
  }

  .guide-panel { max-height: calc(100dvh - 0.75rem); }

  main {
    min-height: calc(100vh - 52px);
    min-height: calc(100dvh - 52px);
    padding: 0.35rem 0.65rem 0.6rem;
  }

  .screen {
    border-radius: 20px;
    box-shadow: 0 4px 0 var(--ink);
  }

  .start-copy {
    padding: 0.45rem 0.8rem;
  }

  .start-copy .eyebrow {
    margin-bottom: 0.1rem;
    font-size: 0.62rem;
  }

  h1 {
    margin-bottom: 0.2rem;
    font-size: 2.25rem;
  }

  .start-copy .lead {
    margin-bottom: 0.25rem;
    font-size: 0.84rem;
    line-height: 1.16;
  }

  .together-note {
    grid-template-columns: 32px 1fr;
    gap: 0.4rem;
    margin: 0.3rem 0 0.4rem;
    padding: 0.25rem 0.45rem;
    font-size: 0.72rem;
    line-height: 1.18;
  }

  .together-mark {
    width: 32px;
    height: 32px;
  }

  .start-copy .primary-action {
    min-height: 48px;
    padding-block: 0.45rem;
  }

  .start-copy .quiet-copy {
    display: none;
  }

  .window-scene {
    min-height: 220px;
  }

  .finished-scene,
  .revisit-scene {
    display: none;
  }

  .finished-screen {
    display: grid;
    grid-template-areas:
      "eyebrow eyebrow eyebrow"
      "title title title"
      "notes notes notes"
      "reflection talk actions";
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr) minmax(330px, 1.2fr);
    gap: 0.25rem 0.75rem;
    padding: 0.55rem 0.9rem 0.75rem;
  }

  .finished-screen .eyebrow {
    grid-area: eyebrow;
    margin: 0;
  }

  .finished-screen h2 {
    grid-area: title;
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.45rem);
  }

  #finished-notes {
    grid-area: notes;
  }

  #finished-reflection {
    grid-area: reflection;
  }

  #finished-revisit {
    grid-area: talk;
  }

  .finished-screen .action-row {
    grid-area: actions;
    flex-wrap: nowrap;
    gap: 0.45rem;
  }

  .finished-screen .action-row > * {
    padding-inline: 0.65rem;
    font-size: 0.82rem;
  }

  .note-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-block: 0.35rem 0.55rem;
  }

  .note-pair article {
    min-height: 82px;
    padding: 0.5rem 0.75rem 0.5rem 1rem;
  }

  .finished-screen .reflection,
  .finished-screen .talk-prompt,
  .finished-screen .action-row {
    margin: 0;
  }

  .finished-screen .talk-prompt {
    padding: 0.4rem 0.65rem;
    font-size: 0.86rem;
    line-height: 1.18;
  }
}

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

@media (forced-colors: active) {
  .mission-card,
  .observation-grid button,
  .comparison-grid button,
  .note-preview,
  .finished-note,
  .note-pair article,
  .mini-note,
  .future-note {
    forced-color-adjust: auto;
  }
}
