:root {
  color-scheme: light;
  --paper: #fff8e9;
  --surface: #fffaf0;
  --ink: #552809;
  --body: #492e18;
  --link: #134d67;
  --line: #ebcca0;
  --sky: #008ec8;
  --sans: "Nunito", "Segoe UI", Arial, sans-serif;
  --header: 4.65rem;
  --gutter: clamp(1.05rem, 3.8vw, 3.5rem);
  font-family: var(--sans);
  color: var(--body);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: radial-gradient(ellipse at 50% 70%, #fffdf5, transparent 65%), var(--paper);
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
button:not(:disabled), a { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--link); text-underline-offset: .15em; }
:focus-visible { outline: 3px solid #084c78; outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(90rem, calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.18em; height: 1.18em; display: inline-block; flex: none; vertical-align: middle;
  fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round;
}
.masthead {
  position: sticky; inset-block-start: 0; z-index: 4;
  border-bottom: 1px solid rgb(255 255 255 / 27%);
  background: linear-gradient(180deg, #0081bc, var(--sky));
}
.header-inner { min-height: calc(var(--header) - 1px); display: flex; align-items: center; gap: 1.3rem; }
.brand { display: block; width: auto; height: clamp(3rem, 4.4vw, 4rem); flex: none; }
.platform {
  display: inline-flex; align-items: center; gap: .55rem; padding-left: 1.15rem; border-left: 1px solid rgb(255 255 255 / 65%);
  color: #fff; font-size: clamp(1.17rem, 1.35vw, 1.4rem); line-height: 1.4; font-weight: 700; text-shadow: 0 1px 3px #006291;
}
.platform .icon { width: 1rem; height: 1rem; }
.button, .view-button {
  display: inline-flex; align-items: center; justify-content: center; gap: .53rem;
  min-height: 2.85rem; padding: .5rem 1.05rem; border: 1px solid var(--line); border-radius: .68rem;
  color: var(--ink); background: var(--surface); font-size: 1.02rem; font-weight: 800;
  line-height: 1.2; text-decoration: none; text-align: center;
}
.button:hover, .view-button:hover { background-color: #ffedc9; }
.game-link {
  margin-left: auto; padding: .5rem 1.05rem; gap: .6rem; white-space: nowrap;
  color: white; background: #121415; border: 1px solid #121415; border-radius: .82rem;
  font: 600 1.04rem/1.1 "Segoe UI", Arial, sans-serif; box-shadow: 0 3px 8px rgb(1 45 63 / 24%);
}
.vk-lockup { display: block; height: clamp(1.6rem, 2.15vw, 2rem); width: auto; flex: none; }
.game-link:hover { background-color: #202327; border-color: #91c6ff; }
.game-link:focus-visible { outline-color: white; }
.next, .is-expanded .move {
  color: #fff; background: linear-gradient(#d6420f, #bc3010); border-color: #a4280b;
  box-shadow: inset 0 1px 0 #ffae6c, 0 3px 0 #942c0d, 0 5px 9px rgb(119 56 13 / 16%);
}
.next:hover, .is-expanded .move:not(:disabled):hover { background: linear-gradient(#cd420c, #a92b0b); }
.next:active, .is-expanded .move:not(:disabled):active { background: #ad300c; }

.meadow {
  position: relative; isolation: isolate; display: flow-root;
  min-height: calc(100vh - var(--header)); min-height: calc(100svh - var(--header));
  padding-bottom: clamp(3.5rem, 8vh, 6rem);
}
.scenery {
  position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  container-type: size; background: #01d4fe;
  mask-image: linear-gradient(to top, transparent, #000 clamp(4rem, 10vh, 7.5rem));
}
.scenery::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--sky), rgb(0 128 188 / 38%) 12%, transparent 32%);
}
.panorama {
  position: absolute; inset: auto 0 0;
  height: min(100%, 50vw); height: min(100%, 50cqw);
  /* The tree and cottage keep their proportions. Only the open meadow widens. */
  border-image: url("./assets/meadow.webp") 0 25% fill / 0 25% stretch;
  border-image-width: 0 min(25cqw, 50cqh);
  mask-image: linear-gradient(to bottom, transparent, #000 6%);
}
.guide { margin-block: clamp(.85rem, 2.55vh, 1.8rem) 1rem; }
.guide-heading {
  margin: 0 auto clamp(.8rem, 2vh, 1.45rem); color: #fff;
  font: 800 clamp(1.85rem, 3.55vw, 3.65rem)/1.08 var(--sans);
  letter-spacing: -.035em; text-align: center; text-wrap: balance;
  text-shadow: 0 2px 0 #1978a4, 0 3px 9px #00658d;
}
.board {
  display: grid;
  grid-template-columns: minmax(16.5rem, .9fr) minmax(0, 1.6fr);
  grid-template-areas: "speaker screen" "speaker controls";
  align-items: center; column-gap: clamp(1.15rem, 2.1vw, 2.25rem); row-gap: .85rem;
  padding: clamp(.9rem, 1.5vw, 1.5rem);
  border: 1px solid #fff9e7; border-radius: 1.8rem;
  background: linear-gradient(118deg, #ffedb9, #fff4db 41%, #fffaef 80%);
  box-shadow: inset 0 2px 0 #fff8df, 0 5px 0 rgb(136 98 27 / 15%), 0 14px 32px rgb(48 66 16 / 19%);
  touch-action: pan-y pinch-zoom;
}
.speaker {
  position: relative; isolation: isolate;
  grid-area: speaker; display: flex; flex-direction: column; align-items: center;
  align-self: stretch; justify-content: flex-end; gap: .48rem; min-width: 0;
}
body:not(.is-expanded) .speaker::before {
  content: ""; position: absolute; z-index: -1; inset: -.48rem -.65rem 0;
  background: linear-gradient(155deg, #b3dbd9, #83babd 48%, #57959d);
  border: 1px solid #679da2; border-radius: 1.35rem 1.8rem 1.4rem 1.4rem;
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 55%), 0 2px 0 rgb(40 101 109 / 20%);
}
.speech-slot, .speech-measure { display: grid; min-width: 0; width: 100%; }
.speech-slot { align-items: end; flex: none; }
/* The overlapping copies reserve the tallest message at the current text size and width. */
.speech-slot > *, .speech-measure > * { grid-area: 1 / 1; }
.speech-measure {
  align-items: start; visibility: hidden; pointer-events: none; user-select: none;
}
.speech-measure .speech::after { content: none; }
.speech {
  position: relative; z-index: 1; width: 100%; padding: 1.13rem 1.26rem 1.22rem;
  color: var(--body); background: #fffdf7;
  border: 1px solid #839f9e; border-radius: 1.25rem;
  box-shadow: 0 3px 7px rgb(34 73 77 / 15%);
}
.speech::after {
  content: ""; position: absolute; bottom: -.57rem; left: 36.5%; width: 1.04rem; height: 1.04rem;
  background: #fffdf7; border-right: 1px solid #839f9e; border-bottom: 1px solid #839f9e;
  transform: rotate(45deg) skew(7deg, 7deg);
}
.speech h2 {
  margin: 0; font: 800 clamp(1.7rem, 2.45vw, 2.6rem)/1.1 var(--sans);
  letter-spacing: -.032em; color: var(--ink); text-wrap: balance;
}
.step-text { margin: .55rem 0 0; font-size: clamp(1.09rem, 1.29vw, 1.24rem); line-height: 1.43; font-weight: 400; }
.step-text a { color: var(--link); text-decoration-thickness: 1px; }
.step-text a:hover { color: #082d40; }
.installed-option { display: block; margin-top: .38em; }
.character { flex: none; width: 100%; height: clamp(12rem, 32vh, 20.5rem); }
.character img { display: block; height: 100%; width: 100%; object-fit: contain; filter: drop-shadow(0 2px 2px rgb(32 69 75 / 20%)); }
.screen {
  grid-area: screen; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border: 4px solid #fffcf1; border-radius: 1.26rem; background: #fff2d6;
  box-shadow: 0 0 0 1px #eacb9c, 0 5px 12px rgb(125 72 22 / 16%);
}
.screen-bar {
  display: flex; flex: none; align-items: center; justify-content: space-between; gap: .5rem;
  min-height: 3.05rem; padding: .08rem .63rem .08rem .95rem;
  border-bottom: 1px solid #00658b; background: linear-gradient(115deg, #087faa, #006b93);
}
.surface { display: inline-flex; align-items: center; gap: .47rem; color: white; font-size: 1rem; font-weight: 700; }
.surface .icon { width: 1.04rem; height: 1.04rem; }
.view-button { padding: .4rem .5rem; min-height: 2.75rem; border-color: transparent; background: none; font-size: .96rem; }
.view-button .icon { width: 1.06rem; height: 1.06rem; }
.screen-bar .view-button { color: white; }
.screen-bar .view-button:hover { background: #005977; }
.screen-bar .view-button:focus-visible { outline-color: white; outline-offset: -2px; }
.photo-view {
  display: flex; position: relative; width: 100%; height: clamp(14.5rem, 46vh, 28.7rem); overflow: hidden;
  background: radial-gradient(ellipse at center, #fffcf1, #f3e5cd);
}
.photo-sheet {
  position: relative; flex: none; margin: auto; display: block; padding: 0;
  overflow: hidden; border: 0; border-radius: .38rem; color: inherit; background: #d9dece;
  box-shadow: 0 2px 8px rgb(35 48 34 / 20%);
  width: 94%; aspect-ratio: 1568 / 705;
}
.image-opener {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  padding: 0; border: 0; border-radius: inherit; background: transparent;
}
.image-opener:not(:disabled) { cursor: zoom-in; }
.image-opener:focus-visible { outline-offset: -3px; }
.photo-sheet img { user-select: none; pointer-events: none; display: block; position: absolute; max-width: none; }
.photo-sheet[aria-busy="true"] img, .photo-sheet[aria-busy="true"] .annotations { visibility: hidden; }
.annotations { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.target-box, .target-rim, .target-arrow { vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.target-rim { fill: none; stroke: #613b18; stroke-width: 4.5; }
.target-box { fill: none; stroke: #ffce6c; stroke-width: 3; }
.target-arrow { fill: #e02a22; stroke: #fffdf8; stroke-width: 2.3; }
.deck-controls { grid-area: controls; display: flex; align-items: center; justify-content: flex-end; gap: .7rem; min-width: 0; }
.move { min-height: 3.1rem; padding-inline: 1.04rem; border-radius: .85rem; }
.move .icon { width: 1.13rem; height: 1.13rem; stroke-width: 2.5; }
.next { min-width: 9.1rem; }
body:not(.is-expanded) .previous:disabled { color: #8d7964; background: #fff5e3; border-color: #e5d2b2; }
.previous:disabled .icon { opacity: .7; }

.video-guide {
  max-width: 64rem; margin-block: clamp(1.5rem, 3.2vw, 3rem) clamp(2.4rem, 5vw, 4.5rem);
  scroll-margin-top: calc(var(--header) + 1rem);
}
.video-frame {
  position: relative; overflow: hidden; border: 3px solid #fffaf0; border-radius: 1.12rem;
  background: #192125; box-shadow: 0 0 0 1px var(--line), 0 8px 22px -12px rgb(75 42 17 / 45%);
}
.video-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.video-frame video:fullscreen { width: 100%; height: 100%; object-fit: contain; background: #121415; }
.video-frame video:focus-visible, .video-cover:focus-visible { outline-offset: -4px; outline-color: white; }
.video-cover {
  position: absolute; inset: 0; display: grid; place-items: center; width: 100%; padding: 0; border: 0;
  background: linear-gradient(180deg, rgb(36 21 9 / 6%), rgb(24 18 13 / 16%));
}
.video-action {
  display: inline-flex; align-items: center; gap: .65rem; min-height: 3.15rem; padding: .65rem 1.15rem;
  border: 1px solid rgb(255 255 255 / 68%); border-radius: 2rem;
  background: #173c49; color: white; box-shadow: 0 3px 14px rgb(32 21 12 / 36%);
  font-size: clamp(1.05rem, 1.55vw, 1.3rem); font-weight: 800; line-height: 1.2;
}
.video-cover:hover .video-action, .video-cover:focus-visible .video-action { background: #075d76; }
.video-cover:disabled { cursor: progress; }
.video-cover:disabled .video-duration { display: none; }
.video-duration { padding-left: .65rem; border-left: 1px solid #8da7af; font-size: .9em; font-weight: 600; }
.video-error { margin: .8rem 0 0; text-align: center; }

.gallery {
  --poster-size: clamp(14rem, calc(100svh - var(--header) - 6rem), 50rem);
  --arrow-size: 3.3rem;
  order: 2; min-width: 0; display: grid; align-items: center; justify-content: center;
  grid-template-columns: var(--arrow-size) minmax(0, var(--poster-size)) var(--arrow-size);
  grid-template-areas: ". heading ." "previous artwork next" ". playback .";
  gap: clamp(.65rem, 1.3vw, 1.1rem) clamp(.65rem, 1.65vw, 1.6rem);
  margin-top: clamp(1rem, 2.3vw, 2.15rem); padding-block: clamp(.6rem, 1.25vw, 1.2rem) .6rem;
  scroll-margin-top: calc(var(--header) + .5rem);
}
.gallery-heading, .video-heading {
  margin: 0; text-align: center;
  color: var(--ink); font: 800 clamp(1.95rem, 3.5vw, 3.1rem)/1.13 var(--sans);
  letter-spacing: -.03em;
}
.gallery-heading { grid-area: heading; }
.video-heading { margin-bottom: clamp(.85rem, 1.6vw, 1.5rem); text-wrap: balance; }
.gallery-playback {
  grid-area: playback; justify-self: center; gap: .45rem; min-height: 2.75rem;
  padding-inline: 1rem; border: 1px solid var(--line); border-radius: 2rem; background: var(--surface);
}
.gallery-arrow { width: var(--arrow-size); height: var(--arrow-size); min-height: 0; padding: 0; border-radius: 50%; }
.gallery-arrow .icon { width: 1.3rem; height: 1.3rem; stroke-width: 2.5; }
#gallery-previous { grid-area: previous; }
#gallery-next { grid-area: next; }
.gallery-track {
  grid-area: artwork; display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: .75rem;
  width: 100%; min-width: 0; aspect-ratio: 1; grid-template-rows: 100%;
  overflow: hidden; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  border-radius: .95rem; scrollbar-width: none; box-shadow: 0 7px 19px -10px rgb(69 52 24 / 32%);
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-card, .gallery-loop {
  display: block; min-width: 0; min-height: 0; padding: .28rem;
  scroll-snap-align: start; scroll-snap-stop: always;
  border: 1px solid #d5c9ab; border-radius: .95rem; background: #fffaf0;
}
.gallery-track img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: .59rem; }
.gallery-card:hover { border-color: #976e43; }
.gallery-card:focus-visible { outline-offset: -3px; }
.gallery-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.communities {
  order: 3; margin-top: clamp(1.5rem, 3.2vw, 3rem); padding-block: clamp(1.2rem, 2.8vw, 2.4rem);
  border-top: 1px solid var(--line); text-align: center;
}
.communities h2 {
  margin: 0 0 clamp(.9rem, 1.7vw, 1.4rem); color: var(--ink);
  font: 800 clamp(1.7rem, 3vw, 2.65rem)/1.13 var(--sans); letter-spacing: -.03em;
}
.socials {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.55rem, 1.3vw, 1rem);
  max-width: 51rem; margin-inline: auto;
}
.social-link {
  display: flex; align-items: center; justify-content: center; gap: .75rem;
  min-height: 4.7rem; padding: .7rem 1rem; border: 1px solid #cecbb6; border-radius: 1rem;
  background: #fffdf6; color: var(--ink); font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  font-weight: 800; line-height: 1.15; text-decoration: none; box-shadow: 0 3px 9px -6px rgb(75 60 33 / 28%);
}
.social-link:hover, .social-link:focus-visible { background: #fff0cf; border-color: #d29d57; text-decoration: none; }
.social-icon { display: block; flex: none; width: 2.6rem; height: 2.6rem; padding: .22rem; border-radius: .72rem; color: #fff; }
.social-ok { background: #c7580a; }
.social-vk { background: #0867d7; }
.social-world { background: #32649b; }

.is-expanded .guide { width: min(101rem, calc(100% - 1.5rem)); margin-block: .5rem; }
.is-expanded .meadow { padding: 0; min-height: calc(100dvh - var(--header)); }
.is-expanded .scenery { mask-image: none; }
.is-expanded .guide-heading, .is-expanded .video-guide, .is-expanded .gallery, .is-expanded .communities { display: none; }
.is-expanded .board {
  height: calc(100vh - var(--header) - 1rem);
  height: calc(100dvh - var(--header) - 1rem); padding: 0;
  grid-template-columns: 3.2rem minmax(0, 1fr) 3.2rem;
  grid-template-rows: auto minmax(9rem, 1fr);
  grid-template-areas: "speaker speaker speaker" "prev screen next";
  gap: .48rem .7rem; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.is-expanded .speaker {
  display: grid; grid-template-columns: 5.85rem minmax(0, 1fr); gap: .95rem;
  align-items: end; align-self: center; width: min(100%, 73rem); margin-inline: auto;
}
.is-expanded .speech-slot { grid-area: 1 / 2; }
.is-expanded .speech { padding: .58rem 1.05rem .67rem; }
.is-expanded .character { grid-area: 1 / 1; height: 6rem; }
.is-expanded .speech h2 { font-size: clamp(1.43rem, 2.1vw, 1.85rem); }
.is-expanded .step-text { margin-top: .13rem; font-size: 1.06rem; line-height: 1.36; }
.is-expanded .speech::after { left: -.53rem; top: auto; bottom: 2rem; width: .93rem; height: .93rem; transform: rotate(135deg); }
.is-expanded .screen { align-self: stretch; min-height: 0; }
.is-expanded .photo-view { flex: 1; height: auto; min-height: 0; }
.is-expanded .photo-sheet { border-radius: 0; box-shadow: none; }
.is-expanded .photo-sheet img { pointer-events: auto; }
.is-expanded .deck-controls { display: contents; }
.is-expanded .move { width: 3.15rem; height: 3.15rem; min-width: 0; min-height: 0; padding: 0; place-self: center; border-radius: 50%; }
.is-expanded .move:disabled { opacity: .63; }
.is-expanded .move .icon { width: 1.45rem; height: 1.45rem; }
.is-expanded .previous { grid-area: prev; }
.is-expanded .next { grid-area: next; }
.is-expanded .move span { display: none; }

@media (max-width: 43rem) {
  .platform { display: none; }
}
@media (min-width: 50.01rem) and (max-height: 43rem) {
  :root { --header: 3.7rem; }
  .brand { height: 2.85rem; }
  .guide { margin-block: .55rem; }
  .guide-heading { margin-bottom: .52rem; }
  .board { padding: .85rem 1.1rem; }
  .speech { padding: .82rem 1rem; }
  .speech h2 { font-size: clamp(1.65rem, 2.55vw, 2.22rem); }
  .character { height: clamp(7.5rem, 23vh, 10.2rem); }
  .photo-view { height: clamp(10rem, 43vh, 17rem); }
}
@media (max-width: 50rem) {
  :root { --gutter: clamp(.65rem, 2.8vw, 1.35rem); --header: 3.95rem; }
  .brand { height: 2.85rem; }
  .header-inner { gap: .75rem; }
  .guide { display: flex; flex-direction: column; gap: .6rem; margin-block: .7rem; }
  .board {
    order: 0; grid-template-columns: minmax(0, 1fr); grid-template-areas: "speaker" "screen" "controls";
    border-radius: 1.03rem; padding: clamp(.77rem, 2.1vw, 1.2rem); row-gap: .72rem;
  }
  .guide-heading { margin: 0 auto; font-size: clamp(1.35rem, 4vw, 2.05rem); }
  .speaker { display: grid; grid-template-columns: clamp(5.4rem, 21vw, 9.5rem) minmax(0, 1fr); align-items: end; gap: .72rem; }
  body:not(.is-expanded) .speaker::before { inset: -.17rem -.2rem -.15rem; border-radius: 1rem; }
  .character { grid-area: 1 / 1; width: 100%; height: auto; aspect-ratio: 581 / 680; }
  .speech-slot { grid-area: 1 / 2; }
  .speech { padding: .82rem 1rem; }
  .speech::after { left: -.53rem; top: auto; bottom: clamp(2rem, 11vw, 5rem); width: .93rem; height: .93rem; transform: rotate(135deg); }
  .speech h2 { font-size: clamp(1.45rem, 4.8vw, 2.1rem); }
  .step-text { margin-top: .36rem; font-size: 1.06rem; line-height: 1.4; }
  .photo-view { height: clamp(9.2rem, min(49vw, 33dvh), 20rem); }
  .screen-bar { min-height: 2.78rem; padding-block: 0; }
  .screen { border-width: 2px; }
  .move { min-height: 2.85rem; }
  .is-expanded .guide { display: block; width: calc(100% - 1rem); }
  .is-expanded .board { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(8rem, 1fr) auto; grid-template-areas: "speaker speaker" "screen screen" "prev next"; }
  .is-expanded .speaker { grid-template-columns: clamp(4.5rem, 14vw, 6.3rem) minmax(0, 1fr); gap: .7rem; }
  .is-expanded .character { height: auto; }
  .is-expanded .move { width: 100%; height: 2.85rem; border-radius: .65rem; }
  .is-expanded .move span { display: inline; }
}
@media (max-width: 50rem) and (orientation: portrait), (max-width: 32rem) {
  .gallery {
    --arrow-size: 2.8rem;
    width: min(calc(100% - var(--gutter) * 2), var(--poster-size)); margin-inline: auto;
    grid-template-columns: var(--arrow-size) minmax(0, 1fr) var(--arrow-size);
    grid-template-areas: "previous heading next" "artwork artwork artwork" "playback playback playback"; column-gap: .35rem;
  }
  .gallery-heading, .video-heading { font-size: clamp(1.65rem, 5.8vw, 2.7rem); }
}
@media (max-width: 40rem) {
  .socials { grid-template-columns: minmax(0, 1fr); max-width: 24rem; }
  .social-link { justify-content: flex-start; padding-inline: 1.15rem; min-height: 4.15rem; }
}
@media (max-width: 36rem) {
  :root { --header: 3.4rem; }
  .brand { height: 2.49rem; object-fit: contain; }
  .game-link { font-size: .94rem; min-height: 2.75rem; gap: .4rem; padding-inline: .73rem; }
  .vk-lockup { height: 1.42rem; }
  .guide { gap: .38rem; margin-block: .48rem; }
  .board { padding: .65rem; gap: .43rem; }
  .speaker { grid-template-columns: clamp(4.7rem, 22vw, 6.65rem) minmax(0, 1fr); gap: .64rem; }
  .speech { border-radius: .8rem; padding: .64rem .76rem; }
  .speech h2 { font-size: clamp(1.33rem, 5.9vw, 1.73rem); }
  .step-text { font-size: 1rem; }
  .surface, .view-button { font-size: .9rem; }
  .screen-bar { gap: .15rem; padding-inline: .53rem .26rem; }
  .view-button { padding-inline: .38rem; gap: .29rem; }
  .deck-controls { gap: .37rem; }
  .move { padding-inline: .72rem; gap: .35rem; }
  .next { min-width: 7.55rem; }
  .is-expanded .step-text { font-size: .99rem; }
  .is-expanded .speech { padding: .52rem .69rem; }
  .is-expanded .screen-bar .surface .icon { display: none; }
}
@media (max-width: 23rem) {
  .brand { width: clamp(5.35rem, 27vw, 6.25rem); height: auto; }
  .game-link { font-size: .91rem; padding-inline: .62rem; }
  .vk-lockup { height: 1.34rem; }
  .board { padding: .5rem; gap: .38rem; }
  .speaker { grid-template-columns: 4.65rem minmax(0, 1fr); gap: .45rem; }
  .speech { padding: .5rem .55rem; }
  .step-text { line-height: 1.35; }
  .is-expanded .surface { font-size: .84rem; }
}
@media (max-height: 38rem) and (max-width: 50rem) {
  .photo-view { height: clamp(6.7rem, 24dvh, 9.2rem); }
  .is-expanded .photo-view { height: auto; }
}
@media (max-height: 38rem) and (max-width: 23rem) {
  .guide { width: calc(100% - .7rem); margin-block: .35rem; }
  .guide-heading { font-size: 1.17rem; }
  .board { row-gap: .35rem; padding-inline: .4rem; }
  .speaker { gap: .4rem; }
  .speech { padding-block: .4rem; }
  .step-text { margin-top: .25rem; line-height: 1.33; }
  .photo-view { height: min(22dvh, 7.6rem); }
}
@media (max-height: 32rem) and (min-width: 50.01rem) {
  :root { --header: 3.24rem; }
  .brand { height: 2.42rem; }
  .guide { display: flex; flex-direction: column; margin-block: .35rem; }
  .guide-heading { font-size: 1.3rem; margin-bottom: .2rem; }
  .board { grid-template-columns: minmax(16.5rem, 1.12fr) minmax(0, 1.38fr); padding: .5rem .85rem; gap: .35rem 1.15rem; }
  .character { height: clamp(3.8rem, 17dvh, 5.85rem); }
  .speaker { gap: .15rem; }
  .speech { padding: .48rem .72rem; }
  .step-text { margin-top: .28rem; font-size: 1rem; }
  .photo-view { height: 44dvh; }
  .is-expanded .guide { display: block; }
  .is-expanded .character { height: 4rem; }
  .is-expanded .speaker { grid-template-columns: 4rem 1fr; }
  .is-expanded .speech { padding: .28rem .7rem; }
  .is-expanded .step-text { font-size: .96rem; }
  .is-expanded .photo-view { height: auto; }
}
@media (min-width: 30rem) and (max-width: 50rem) and (max-height: 32rem) {
  :root { --header: 3.1rem; }
  .header-inner { display: flex; gap: .45rem; }
  .brand { width: clamp(4.5rem, 13vw, 6.25rem); height: auto; }
  .game-link { font-size: .87rem; padding-inline: .53rem; gap: .25rem; }
  .vk-lockup { height: 1.32rem; }
  .guide { margin-block: .35rem; }
  .board {
    grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); grid-template-areas: "speaker screen" "speaker controls";
    padding: .5rem .62rem; gap: .35rem .7rem;
  }
  .speaker { display: flex; gap: .2rem; }
  .speech { padding: .43rem .62rem; }
  .speech::after { left: 36%; top: auto; bottom: -.37rem; width: .68rem; height: .68rem; transform: rotate(45deg); }
  .speech h2 { font-size: clamp(1.2rem, 3.25vw, 1.48rem); }
  .step-text { margin-top: .2rem; font-size: .98rem; line-height: 1.3; }
  .character { height: clamp(2.9rem, 14dvh, 4.5rem); aspect-ratio: auto; }
  .screen-bar { padding-inline: .36rem; }
  .surface, .view-button { font-size: .88rem; }
  .surface .icon { display: none; }
  .photo-view { height: clamp(5.5rem, 39dvh, 12.25rem); }
  .deck-controls { gap: .3rem; }
  .move { padding-inline: .57rem; }
  .next { min-width: 7.35rem; }
  .is-expanded .board {
    grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "speaker speaker speaker" "prev screen next"; gap: .3rem;
  }
  .is-expanded .speaker { grid-template-columns: 3.75rem minmax(0, 1fr); gap: .6rem; }
  .is-expanded .character { height: 3.75rem; }
  .is-expanded .move { width: 2.75rem; height: 2.75rem; border-radius: 50%; }
  .is-expanded .move span { display: none; }
}
@media (min-width: 30rem) and (max-width: 50rem) and (max-height: 22rem) {
  .guide { margin-block: .2rem; gap: .15rem; }
  .guide-heading { font-size: 1.24rem; }
  .board { grid-template-columns: minmax(15.6rem, .96fr) minmax(0, 1.04fr); gap: .25rem .55rem; padding-block: .38rem; }
  .speech { padding: .3rem .55rem; }
  .step-text { line-height: 1.27; }
}
@media (min-width: 30rem) and (max-width: 34rem) and (max-height: 22rem) {
  .surface { line-height: 1.15; }
  .screen-bar .view-button { min-width: 2.75rem; }
  body:not(.is-expanded) #view-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  body:not(.is-expanded) .deck-controls .icon { display: none; }
  .deck-controls { justify-content: flex-end; }
  .move { padding-inline: .43rem; }
  .next { min-width: 5.5rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
