/* AmiaM Studio: one board of tiles, like a desk seen from above. */

@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/Jost-Bold-latin.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* Three stones for the board, charcoal type. */
  --bg: #eeecea;
  --surface: #e4e1dd;
  --stone: #cdc3b6;
  --ink: #333231;
  --muted: #625e5a;
  --accent: #2f6f4e;
  --accent-ink: #ffffff;
  --accent-press: #275d41;

  /* The pastels GooshiYar's tiles and JomleSazi's sticky notes share. */
  --mint: #d5ecdb;
  --yellow: #f7e7b0;
  --peach: #f9dfc6;
  --pink: #f4d2d2;
  --cream: #fbf3ea;
  --paper: #f5f4f2;
  --chalk: #2b5343;
  --chalk-ink: #eeecea;
  --spine: #dbd6d0;

  --gap: 8px;
  --edge: 16px;
  --inset: 24px;
  --radius: 8px;
  --row: 92px;

  --step-small: 0.9375rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.375rem, 1.1rem + 0.8vw, 2rem);
  --step-head: clamp(2.125rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(140px, 14.4vw, 220px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Vazirmatn", Tahoma, sans-serif;
  --font-latin: "Jost", "Vazirmatn", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.6;
  font-feature-settings: "ss01";
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.latin { font-family: var(--font-latin); font-weight: 700; font-synthesis: none; }

.skip {
  position: absolute;
  inset-inline-start: var(--edge);
  top: var(--edge);
  padding: 12px 20px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius);
  z-index: 10;
}
.skip:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Every tile is a flat filled rectangle with the same corners. */
.tile {
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

/* ---------- Hero board ---------- */

.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: 170px 64px minmax(560px, 1fr);
  gap: var(--gap);
  padding: var(--edge);
  min-height: 100svh;
}

.band {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px 22px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 800;
}
.band__fa {
  font-size: var(--step-head);
  line-height: 1.1;
  white-space: nowrap;
}
.band__name {
  font-size: var(--step-display);
  line-height: 0.78;
  letter-spacing: -0.03em;
  margin-bottom: -6px;
}

.hero__links {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}
.link {
  display: flex;
  align-items: flex-start;
  padding: 18px 22px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.link:hover { background: var(--stone); }
.link:active { background: var(--ink); color: var(--bg); }

.hero__start {
  grid-column: 1 / span 2;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: var(--gap);
}
.pic { position: relative; }
.pic img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 20%;
}
.pic--peach { background: var(--peach); }
.pic--yellow { background: var(--yellow); }

.facts {
  padding: 20px 22px;
  font-size: var(--step-small);
  font-weight: 500;
  line-height: 1.5;
}
.facts li + li { margin-top: 8px; }

.desk {
  grid-column: 3 / span 8;
  position: relative;
  background: var(--ink);
}
.desk__scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  container-type: size;
}
.desk__wood {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  animation: drift 26s ease-in-out infinite alternate;
}
.desk__phone {
  position: absolute;
  width: auto;
  border: 8px solid #1e1d1c;
  border-radius: 26px;
  background: #1e1d1c;
}
.desk__phone--gy {
  height: 86cqh;
  top: 6cqh;
  inset-inline-end: 4cqw;
  rotate: -6deg;
}
.desk__phone--js {
  height: 80cqh;
  top: 10cqh;
  inset-inline-end: 31cqw;
  rotate: 5deg;
}
.desk__statement {
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 54%;
  padding: 24px 26px 26px;
  background: var(--bg);
  border-start-end-radius: var(--radius);
  font-size: var(--step-lead);
  font-weight: 700;
  line-height: 1.35;
}

.hero__end {
  grid-column: 11 / span 2;
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr)) minmax(0, 1.4fr);
  gap: var(--gap);
}
.chip {
  padding: 18px 20px;
  font-size: var(--step-small);
  font-weight: 700;
  line-height: 1.45;
}
.chip--yellow { background: var(--yellow); }
.chip--peach { background: var(--peach); }
.chip--pink { background: var(--pink); }
.chip--stone { background: var(--stone); }
.chip--action { padding: 0; background: var(--accent); }
.chip--action a {
  display: flex;
  align-items: flex-end;
  height: 100%;
  padding: 18px 20px;
  color: var(--accent-ink);
  font-size: var(--step-lead);
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s;
}
.chip--action a::after { content: "↓"; margin-inline-start: 10px; transition: translate 0.25s var(--ease-out); }
.chip--action a:hover { background: var(--accent-press); }
.chip--action a:hover::after { translate: 0 4px; }

/* ---------- Product boards ---------- */

.board {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: var(--row);
  gap: var(--gap);
  padding: 0 var(--edge);
  margin-top: 160px;
}

.title-tile, .chalk { padding: 24px 28px; }
.board h2 {
  font-size: var(--step-head);
  font-weight: 800;
  line-height: 1.05;
}
.lead {
  margin-top: 12px;
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.35;
}
.text { padding: 24px 28px; }
.text p { max-width: 60ch; }
.text p + p { margin-top: 14px; }

.shot { position: relative; background: var(--cream); }
.shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}
.shot--contain img { object-fit: contain; padding: 24px 0 0; object-position: 50% 0; }

.note { padding: 22px 22px; font-size: var(--step-small); font-weight: 500; line-height: 1.6; }
.note--mint { background: var(--mint); }

.status {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  background: var(--stone);
}
.status__word { font-weight: 800; font-size: var(--step-body); }
.go {
  font-size: var(--step-small);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition: color 0.2s;
}
.go .latin { display: block; margin-top: 2px; font-size: var(--step-small); }
.go:hover { color: var(--accent); }

.gy-home    { grid-column: 1 / span 3;  grid-row: 1 / span 8; }
.gy-title   { grid-column: 4 / span 9;  grid-row: 1 / span 2; }
.gy-text    { grid-column: 4 / span 5;  grid-row: 3 / span 6; }
.gy-storage { grid-column: 9 / span 2;  grid-row: 3 / span 6; }
.gy-note    { grid-column: 11 / span 2; grid-row: 3 / span 4; }
.gy-status  { grid-column: 11 / span 2; grid-row: 7 / span 2; }

.chalk {
  position: relative;
  background: var(--chalk);
  color: var(--chalk-ink);
}
.chalk__logo {
  position: absolute;
  inset-inline-end: 18px;
  bottom: 14px;
  width: min(46%, 260px);
  rotate: -4deg;
}

.js-title   { grid-column: 1 / span 5;  grid-row: 1 / span 3; }
.js-play    { grid-column: 6 / span 7;  grid-row: 1 / span 5; }
.js-home    { grid-column: 1 / span 3;  grid-row: 4 / span 6; }
.js-vote    { grid-column: 4 / span 2;  grid-row: 4 / span 6; }
.js-text    { grid-column: 6 / span 4;  grid-row: 6 / span 4; }
.js-teacher { grid-column: 10 / span 3; grid-row: 6 / span 4; }
.js-text .status__word { margin-top: 14px; }
.js-teacher img { object-position: 50% 15%; }

/* The live thing: a page of JomleSazi's notebook. */
.play {
  position: relative;
  padding: 24px 28px;
  background: var(--paper);
  overflow: hidden;
}
.play__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.play h3 { font-size: var(--step-lead); font-weight: 800; line-height: 1.2; }
.play__date { font-size: var(--step-small); color: var(--muted); }
.play__words { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 16px; }
.word {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 150px;
  height: 72px;
  padding: 0 26px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  font-size: var(--step-body);
  font-weight: 800;
  transition: rotate 0.3s var(--ease-out), scale 0.3s var(--ease-out);
}
.word--yellow { background-image: url("../img/note-yellow.webp"); rotate: 2deg; }
.word--pink { background-image: url("../img/note-pink.webp"); rotate: -1.5deg; }
.word--mint { background-image: url("../img/note-mint.webp"); rotate: 1deg; }
.word.is-used::before {
  content: "";
  position: absolute;
  top: -14px;
  inset-inline-end: -4px;
  width: 38px;
  height: 38px;
  background: url("../img/check.webp") center / contain no-repeat;
}
.word.is-used { scale: 1.04; }
.word.is-missing { animation: nudge 0.45s var(--ease-out); }

.play__sample { margin-top: 18px; font-weight: 500; }
.js .play__sample { display: none; }
.play__form { display: none; margin-top: 16px; }
.js .play__form { display: block; }
.play__form label { display: block; font-size: var(--step-small); font-weight: 700; }
.play__form textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px 14px;
  border: 0;
  border-radius: 6px;
  resize: none;
  font-size: var(--step-body);
  font-weight: 700;
  line-height: 1.7;
  background: #ffffff;
}
.play__form textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.play__count { margin-top: 6px; font-size: var(--step-small); color: var(--muted); }
.play__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.play__verdict { min-height: 1.6em; margin-top: 12px; font-weight: 700; }
.play__verdict.is-bad { color: #b3261e; }
.play__verdict.is-good { color: var(--accent); }
.play__stamp {
  position: absolute;
  inset-inline-end: 22px;
  bottom: 18px;
  width: 132px;
  opacity: 0;
  scale: 1.8;
  rotate: -14deg;
  pointer-events: none;
  transition: opacity 0.2s, scale 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.play__stamp.is-on { opacity: 1; scale: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, scale 0.12s;
}
.btn:active { scale: 0.96; }
.btn--action { background: var(--accent); color: var(--accent-ink); }
.btn--action:hover { background: var(--accent-press); }
.btn--plain { background: var(--surface); }
.btn--plain:hover { background: var(--stone); }
.btn--small { min-height: 40px; padding: 0 18px; font-size: var(--step-small); background: var(--bg); color: var(--ink); }
.btn--small:hover { background: var(--yellow); }

/* ---------- Marquee ---------- */

.marquee {
  margin-top: 160px;
  overflow: hidden;
  background: var(--ink);
  color: var(--bg);
  direction: ltr;
}
.marquee__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 26px 0.3em 34px;
  font-size: var(--step-head);
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.marquee__group span { direction: rtl; }
.marquee__group span::after { content: "·"; margin-inline-start: 0.6em; color: var(--yellow); }
.marquee__group .latin { direction: ltr; letter-spacing: -0.02em; }

/* ---------- Things: a shelf of book spines ---------- */

.things { margin-top: 160px; padding: 0 var(--edge); }
.things__head { display: flex; align-items: baseline; gap: 32px; padding-inline: var(--inset); }
.things__head h2 { font-size: var(--step-head); font-weight: 800; line-height: 1.05; flex: none; }
.things__head p { max-width: 46ch; }
.shelf { display: flex; gap: 6px; height: 440px; margin-top: 32px; padding-inline: var(--inset); }
.shelf li { flex: 1 1 0; min-width: 0; }
.spine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 100%;
  padding: 16px 0;
  border-radius: 4px;
  background: var(--spine);
  text-decoration: none;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  transition: background-color 0.2s, color 0.2s, translate 0.25s var(--ease-out);
}
@supports (writing-mode: sideways-lr) {
  .spine { writing-mode: sideways-lr; transform: none; }
}
.spine__name { font-size: var(--step-body); font-weight: 700; line-height: 1; white-space: nowrap; }
.spine__tag {
  padding: 8px 0;
  border-radius: 3px;
  font-size: var(--step-small);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.spine__tag--gy { background: var(--mint); }
.spine__tag--js { background: var(--yellow); }
.spine__tag--am { background: var(--pink); }
.shelf:hover .spine, .shelf:focus-within .spine { color: var(--muted); }
.shelf .spine:hover, .shelf .spine:focus-visible { background: var(--ink); color: var(--bg); translate: 0 -8px; }
.spine:hover .spine__tag, .spine:focus-visible .spine__tag { color: var(--ink); }

/* ---------- About ---------- */

.about { margin-top: 160px; padding: 0 var(--edge); }
.about h2 { padding-inline: var(--inset); font-size: var(--step-head); font-weight: 800; line-height: 1.05; }
.about__lead { max-width: calc(34em + 2 * var(--inset)); padding-inline: var(--inset); margin-top: 24px; font-size: var(--step-lead); font-weight: 500; line-height: 1.45; }
.about__tiles {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  margin-top: 72px;
}
.about__photo {
  position: relative;
  grid-column: 1 / span 8;
  aspect-ratio: 16 / 10;
}
.about__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}
.about__note {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 340px;
  padding: 20px 22px;
  background: var(--paper);
  border-end-end-radius: var(--radius);
  font-size: var(--step-small);
  font-weight: 500;
  line-height: 1.65;
}
.about__side { grid-column: 9 / span 4; display: flex; flex-direction: column; gap: 28px; }
.mirror {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 4 / 3;
  padding: 22px 24px;
  background: var(--pink);
}
.mirror__word {
  font-size: clamp(64px, 7.6vw, 124px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-align: center;
}
.mirror__line { font-weight: 700; }
.about__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; }
.about__facts dt { font-size: var(--step-small); color: var(--muted); }
.about__facts dd { font-size: var(--step-small); font-weight: 700; }

/* ---------- Footer ---------- */

.foot {
  margin-top: 200px;
  padding: 24px var(--edge) 20px;
  background: var(--ink);
  color: var(--bg);
}
/* The name built from blocks; heights and colours are symmetric about the middle block. */
.mark { display: block; width: 100%; height: auto; overflow: hidden; }
.mark--tall { display: none; }
.mark text { fill: var(--ink); font-family: var(--font-latin); font-weight: 700; text-anchor: middle; }
.mark--wide text { font-size: 168px; }
.mark--tall text { font-size: 236px; }
.mark__block { transform-box: fill-box; transform-origin: 50% 100%; }
.mark__block--mint rect { fill: var(--mint); }
.mark__block--pink rect { fill: var(--pink); }
.mark__block--yellow rect { fill: var(--yellow); }

.foot__cols, .foot__last { padding-inline: var(--inset); }
.foot__cols {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: 56px;
}
.foot__links { grid-column: 1 / span 8; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.foot__links li + li { margin-top: 8px; }
.foot__links a { font-size: var(--step-small); text-decoration: none; transition: color 0.2s; }
.foot__links a:hover { color: var(--yellow); text-decoration: underline; text-underline-offset: 5px; }
.foot__contact { grid-column: 9 / span 4; font-size: var(--step-small); }
.foot__last {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  font-size: var(--step-small);
}

/* ---------- Motion ---------- */

@keyframes drift { from { scale: 1.02; translate: 0 0; } to { scale: 1.1; translate: -1.5% 1%; } }
@keyframes marquee { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes nudge { 0%, 100% { translate: 0; } 30% { translate: -6px; } 60% { translate: 5px; } }

.js [data-reveal] { opacity: 0; translate: 0 24px; transition: opacity 0.7s var(--ease-out), translate 0.7s var(--ease-out); }
.js [data-reveal].is-in { opacity: 1; translate: 0 0; }
.js .board > [data-reveal]:nth-child(2) { transition-delay: 70ms; }
.js .board > [data-reveal]:nth-child(3) { transition-delay: 140ms; }
.js .board > [data-reveal]:nth-child(4) { transition-delay: 210ms; }
.js .board > [data-reveal]:nth-child(5) { transition-delay: 280ms; }
.js .board > [data-reveal]:nth-child(6) { transition-delay: 350ms; }
.js .about__side[data-reveal], .js .about__lead[data-reveal] { transition-delay: 90ms; }

.js .hero .desk__phone { animation: settle 1s var(--ease-out) both; }
.js .hero .desk__phone--js { animation-delay: 0.12s; }
@keyframes settle { from { opacity: 0; translate: 0 40px; } }
.js .hero__end .chip, .js .hero__links .link, .js .hero__start > * { animation: rise 0.7s var(--ease-out) both; }
.js .hero__links .link:nth-child(2), .js .hero__end .chip:nth-child(2) { animation-delay: 60ms; }
.js .hero__links .link:nth-child(3), .js .hero__end .chip:nth-child(3) { animation-delay: 120ms; }
.js .hero__links .link:nth-child(4), .js .hero__end .chip:nth-child(4) { animation-delay: 180ms; }
.js .hero__end .chip:nth-child(5) { animation-delay: 240ms; }
@keyframes rise { from { opacity: 0; translate: 0 18px; } }

.js .foot__mark.is-in .mark__block { animation: grow 0.8s var(--ease-out) backwards; }
.js .foot__mark.is-in .mark__block:nth-child(2), .js .foot__mark.is-in .mark__block:nth-child(4) { animation-delay: 80ms; }
.js .foot__mark.is-in .mark__block:nth-child(3) { animation-delay: 160ms; }
@keyframes grow { from { scale: 1 0.3; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .js [data-reveal] { opacity: 1; translate: none; }
  .marquee__track { transform: translateX(-25%); }
}

/* ---------- Narrower screens ---------- */

@media (max-width: 1180px) {
  .band__fa { font-size: clamp(1.75rem, 0.6rem + 3.4vw, 3rem); }
}

@media (max-width: 1023px) {
  :root { --edge: 10px; --gap: 6px; --inset: 8px; --step-display: 24vw; }

  .hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    min-height: 0;
  }
  .band {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 14px;
    padding: 22px 18px 18px;
  }
  .band__fa { font-size: var(--step-lead); }
  .band__name { font-size: var(--step-display); line-height: 0.76; margin: 0; align-self: center; }
  .hero__links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .link { padding: 16px 18px; }

  .desk { grid-column: 1 / -1; grid-row: 3; background: var(--bg); }
  .desk__scene { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); }
  .desk__statement {
    position: static;
    width: auto;
    padding: 16px var(--inset) 4px;
  }
  .desk__phone { border-width: 5px; border-radius: 16px; }
  .desk__phone--gy { inset-inline-end: 14cqw; }
  .desk__phone--js { inset-inline-end: 44cqw; }

  .hero__start { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .hero__start .pic { aspect-ratio: 1; }
  .hero__end {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
  }
  .chip { padding: 16px 18px; }
  .chip--action { grid-column: 1 / -1; }
  .chip--action a { min-height: 76px; align-items: center; }

  .board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    margin-top: 104px;
  }
  .board > * { grid-column: auto; grid-row: auto; }
  .gy-title, .gy-text, .js-title, .js-play, .js-text { grid-column: 1 / -1; }
  .gy-title { order: -2; }
  .gy-home { order: -1; aspect-ratio: 9 / 15; }
  .gy-storage { aspect-ratio: 9 / 15; }
  .gy-note, .gy-status { grid-column: 1 / -1; }
  .js-title { order: -2; min-height: 300px; }
  .js-play { order: -1; }
  .js-home, .js-vote { aspect-ratio: 9 / 14; }
  .js-teacher { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
  .js-teacher img { object-fit: contain; object-position: 50% 100%; }

  .marquee { margin-top: 104px; }
  .marquee__group { padding: 18px 0.3em 22px; }

  .things { margin-top: 104px; }
  .things__head { flex-direction: column; gap: 10px; }
  .shelf { display: block; height: auto; margin-top: 24px; padding-inline: var(--inset); line-height: 2.1; }
  .shelf li { display: inline-block; margin-block: 4px; }
  .spine {
    display: inline;
    padding: 0;
    background: none;
    writing-mode: horizontal-tb;
    transform: none;
    margin-inline-end: 10px;
  }
  @supports (writing-mode: sideways-lr) { .spine { writing-mode: horizontal-tb; } }
  .spine__name { white-space: normal; }
  .spine__tag { display: inline-block; padding: 2px 8px; margin-inline-start: 6px; }
  .shelf:hover .spine, .shelf:focus-within .spine { color: var(--ink); }
  .shelf .spine:hover, .shelf .spine:focus-visible { background: none; color: var(--accent); translate: none; }
  .spine:hover .spine__tag { color: var(--ink); }

  .about { margin-top: 104px; }
  .about__tiles { grid-template-columns: 1fr; gap: 16px; margin-top: 40px; }
  .about__photo, .about__side { grid-column: 1 / -1; }
  .about__photo { aspect-ratio: auto; display: flex; flex-direction: column; background: var(--paper); }
  .about__facts { padding-inline: var(--inset); }
  .about__photo img { position: static; aspect-ratio: 4 / 3; height: auto; }
  .about__note { position: static; width: auto; border-radius: 0; }
  .mirror { aspect-ratio: auto; gap: 24px; }
  .mirror__word { font-size: var(--step-display); }

  .foot { margin-top: 128px; }
  .mark--wide { display: none; }
  .mark--tall { display: block; }
  .foot__cols { grid-template-columns: 1fr; gap: 32px; margin-top: 40px; }
  .foot__links { grid-column: 1; grid-template-columns: 1fr 1fr; row-gap: 24px; }
  .foot__contact { grid-column: 1; }
  .foot__last { margin-top: 40px; }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .hero__end { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .chip--action { grid-column: 1 / -1; }
  .board { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gy-home, .gy-storage, .js-home, .js-vote { grid-column: span 2; }
  .gy-note, .gy-status { grid-column: span 2; }
}

/* ---------- 404 ---------- */

.lost {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  min-height: 100svh;
  padding: 24px max(var(--edge), 6vw);
}
.lost h1 { font-size: var(--step-head); font-weight: 800; line-height: 1.1; }
