/* Buddy waitlist. Design record: ../DESIGN.md
   Two voices: Bricolage Grotesque is the site talking, Fredoka is a pet talking.
   Shape rule: whatever speaks is a bubble, rounded except the corner its tail is on. */

@font-face {
  font-family: "Bricolage";
  src: url("fonts/bricolage-200_800-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}
/* Local fonts scaled to Bricolage's condensed display width, so display lines
   wrap the same before and after the web font arrives (no layout shift). */
@font-face { font-family: "Display Fallback A"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Arial"); size-adjust: 58.5%; }
@font-face { font-family: "Display Fallback R"; src: local("Roboto Bold"), local("Roboto-Bold"), local("Roboto"); size-adjust: 61%; }
@font-face {
  font-family: "Fredoka";
  src: url("fonts/fredoka-300_700-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --c-yellow: #ffc83d;
  --c-ink: #063b30;
  --c-muted: #2f5a4f;
  --c-paper: #fffbf0;
  --c-line: rgb(6 59 48 / 0.16);
  --c-mint: #8ef0d8;
  --c-error: #8a1c12;
  /* The current field. One variable, so every section and pet chapter agrees. */
  --field: #ffc83d;

  --f-display: "Bricolage", ui-sans-serif, system-ui, sans-serif;
  --f-poster: "Bricolage", "Display Fallback A", "Display Fallback R", sans-serif;
  --f-pet: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;

  --t-mega: clamp(3.3rem, 1rem + 9.2vw, 11.5rem);
  --t-xl: clamp(2.5rem, 1.3rem + 4.6vw, 6.25rem);
  --t-l: clamp(1.55rem, 1.15rem + 1.6vw, 2.6rem);
  --t-m: clamp(1.15rem, 1.02rem + 0.55vw, 1.5rem);
  --t-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --t-s: 0.9rem;

  --gutter: clamp(1rem, 0.6rem + 1.6vw, 2.5rem);
  --frame-h: 4.6rem;
  --tail: 0.3em;
  --round: 1.15em;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* ---------- foundation ---------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  background: var(--field);
  color: var(--c-ink);
  scroll-padding-top: var(--frame-h);
}
body {
  min-height: 100dvh;
  font-family: var(--f-display);
  font-size: var(--t-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
input, button { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: inherit; font-size: inherit; text-wrap: balance; }
p { text-wrap: pretty; }
ol, ul { list-style: none; padding: 0; }
::selection { background: var(--c-ink); color: var(--c-yellow); }

:focus-visible { outline: 3px solid var(--c-ink); outline-offset: 3px; border-radius: 4px; }
#main:focus { outline: none; }
.skip-link {
  position: fixed; left: var(--gutter); top: 0.75rem; z-index: 100;
  padding: 0.7em 1.1em; border-radius: 999px;
  background: var(--c-ink); color: var(--c-paper); font-weight: 650;
  translate: 0 -200%;
}
.skip-link:focus-visible { translate: 0 0; outline-color: var(--c-mint); }
.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;
}

/* The field: two fixed layers behind everything; a color change is an opacity
   crossfade on the GPU instead of a full-page repaint. Static pages don't use them. */
.fields { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.fields i { position: absolute; inset: 0; background: var(--c-yellow); }
.fields__b { opacity: 0; will-change: opacity; }
html:not(.motion) .fields { display: none; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }

/* Display voice */
.hero__title, .section-title, .join__title, .pet__name, .lost__title, .finale__word, .admin__title {
  font-family: var(--f-poster);
  font-weight: 800;
  font-stretch: 78%;
  font-variation-settings: "opsz" 96;
  letter-spacing: -0.035em;
  word-spacing: 0.06em;
  line-height: 0.9;
}
.section-title { font-size: var(--t-xl); }

/* Hidden until revealed (only when motion runs; content stays visible otherwise) */
.motion [data-split], .motion [data-reveal] { visibility: hidden; }
.split-line { padding-bottom: 0.08em; margin-bottom: -0.08em; }

/* ---------- primary action: label rolls, the mint dot travels ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.75em;
  min-height: 3.5rem; padding: 0 1.45em 0 1.6em;
  border-radius: 999px;
  background: var(--c-ink); color: var(--c-paper);
  font: 650 1.05rem/1 var(--f-display);
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: scale 0.16s var(--ease-soft);
}
.btn:active { scale: 0.97; }
.btn--small { min-height: 2.85rem; padding: 0 1.15em 0 1.3em; font-size: 0.95rem; }
.btn__roll { display: inline-grid; overflow: clip; }
.btn__roll > span { grid-area: 1 / 1; transition: translate 0.5s var(--ease-out); }
.btn__roll > span + span { translate: 0 115%; }
.btn__dot {
  width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--c-mint); flex: none;
  transition: translate 0.45s var(--ease-out), scale 0.45s var(--ease-out);
}
@media (hover: hover) {
  .btn:hover .btn__roll > span { translate: 0 -115%; }
  .btn:hover .btn__roll > span + span { translate: 0 0; }
  .btn:hover .btn__dot { translate: 0.3em 0; scale: 1.3; }
}
.btn:focus-visible .btn__roll > span { translate: 0 -115%; }
.btn:focus-visible .btn__roll > span + span { translate: 0 0; }
.btn:focus-visible .btn__dot { translate: 0.3em 0; scale: 1.3; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Nav and corner links: an underline draws. Inline links: underline at rest that rises. */
.draw {
  background: linear-gradient(currentColor 0 0) left 100% / 0% 2px no-repeat;
  padding-bottom: 0.15em;
  transition: background-size 0.45s var(--ease-out);
}
@media (hover: hover) { .draw:hover { background-size: 100% 2px; } }
.draw:focus-visible { background-size: 100% 2px; }
.link {
  background: linear-gradient(var(--c-mint) 0 0) left 100% / 100% 2px no-repeat;
  text-decoration: underline; text-decoration-color: transparent;
  padding-bottom: 0.05em;
  transition: background-size 0.4s var(--ease-out);
}
@media (hover: hover) { .link:hover { background-size: 100% 0.5em; } }
.link:focus-visible { background-size: 100% 0.5em; }

.arrow { display: inline-block; margin-left: 0.35em; transition: translate 0.4s var(--ease-out); }
@media (hover: hover) { a:hover > .arrow { translate: 0 0.2em; } }

/* ---------- the frame (four corners) ---------- */

.frame {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: 1.8rem;
  height: var(--frame-h);
  padding: 0 var(--gutter);
  translate: 0 0;
  transition: translate 0.6s var(--ease-out), background-color 0.3s;
}
html.is-scrolled .frame { background: var(--frame-bg, var(--field)); box-shadow: 0 1px 0 var(--c-line); }
html.frame-away .frame { translate: 0 -105%; }
.frame__brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; min-height: 44px; }
.frame__mark { width: 2.9rem; height: 2.9rem; margin: -0.2rem -0.15rem; }
.frame__nav { margin-left: auto; display: flex; gap: 1.8rem; font-weight: 600; font-size: var(--t-s); }

/* ---------- typing dots and messages ---------- */

.typing {
  display: inline-flex; align-items: center; gap: 0.28em;
  padding: 0.95em 1.05em;
  border-radius: var(--round) var(--round) var(--round) var(--tail);
  background: var(--c-paper);
}
.typing i { width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--c-ink); opacity: 0.3; animation: typing 1.1s var(--ease-soft) infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; translate: 0 0; } 30% { opacity: 0.95; translate: 0 -0.22em; } }
html:not(.motion) .msg__typing, html:not(.motion) .say__typing, html:not(.motion) .stage__typing { display: none; }

.thread { display: flex; flex-direction: column; gap: 0.55rem; }
.msg { display: flex; align-items: flex-end; gap: 0.6rem; max-width: 36rem; }
.msg__avatar {
  width: 2.7rem; height: 2.7rem; flex: none; border-radius: 50%;
  background: var(--pet-field, var(--c-paper)); border: 2px solid var(--c-paper);
}
.msg--pet + .msg--pet .msg__avatar { visibility: hidden; }
.msg__body { position: relative; min-width: 0; }
.msg__bubble {
  display: inline-block;
  font: 500 var(--t-m)/1.35 var(--f-pet);
  letter-spacing: 0.005em;
  padding: 0.6em 0.95em 0.68em;
  border-radius: var(--round) var(--round) var(--round) var(--tail);
  background: var(--c-paper); color: var(--c-ink);
}
.msg__typing { position: absolute; left: 0; bottom: 0; }
.msg--you { margin-left: auto; justify-content: flex-end; }
.msg--you .msg__bubble { background: var(--c-ink); color: var(--c-paper); border-radius: var(--round) var(--round) var(--tail) var(--round); }
.motion [data-msg] .msg__bubble { visibility: hidden; }
/* Replies already in the join thread (a no-JS signup) show at once; new ones animate in from code. */
.motion .join__thread [data-msg] .msg__bubble, .motion .lost [data-msg] .msg__bubble { visibility: visible; }
.motion .msg__typing { opacity: 0; }

/* ---------- 1. hero: poster + scene ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: 1fr auto auto auto;
  column-gap: var(--gutter);
  padding: calc(var(--frame-h) + 3vh) var(--gutter) calc(var(--gutter) * 1.2);
}
.hero__title { grid-column: 1 / 9; grid-row: 1; align-self: end; font-size: var(--t-mega); margin-left: -0.055em; position: relative; z-index: 2; }
.hero__lede { grid-column: 1 / 7; grid-row: 2; margin-top: 1.8rem; max-width: 36ch; font-size: var(--t-m); line-height: 1.45; color: var(--c-muted); }
.hero__actions { grid-column: 1 / 7; grid-row: 3; margin-top: 2rem; }
.hero__status, .hero__next { grid-row: 4; margin-top: 7vh; font-weight: 600; font-size: var(--t-s); align-self: end; min-height: 44px; display: inline-flex; align-items: center; }
.hero__status { grid-column: 1 / 7; }
.hero__next { grid-column: 9 / 13; justify-self: end; }
.hero__pet { grid-column: 8 / 13; grid-row: 1 / 4; align-self: end; position: relative; z-index: 1; }
.hero__lean { will-change: transform; }
.hero__img { width: 100%; max-height: 74svh; object-fit: contain; object-position: center bottom; }
/* Pengu's first text sits off his head, its tail toward him; the headline keeps its own space. */
.say { position: absolute; top: -6%; left: 54%; z-index: 3; }
.say__text {
  display: block; width: max-content; max-width: 11ch;
  font: 600 var(--t-l)/1.08 var(--f-pet);
  padding: 0.5em 0.75em 0.58em;
  border-radius: var(--round) var(--round) var(--round) var(--tail);
  background: var(--c-paper);
}
.say__typing { position: absolute; left: 0; bottom: 0; font-size: 1.25rem; }
.motion .say__text { visibility: hidden; }
.motion .say__typing { opacity: 0; }

/* ---------- 2. the pets: sticky stage + chapters ---------- */

.pets { padding: 18vh var(--gutter) 6vh; }
.pets__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.pets__head .section-title { grid-column: 1 / 10; }
.pets__intro { grid-column: 1 / 6; margin-top: 1.6rem; font-size: var(--t-m); color: var(--c-muted); max-width: 34ch; }
.pets__body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); margin-top: 6vh; }
.stage { grid-column: 1 / 7; grid-row: 1; position: sticky; top: 0; height: 100svh; display: grid; place-items: center; }
.stage__inner { position: relative; width: 100%; height: 74svh; }
.stage__pet { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; opacity: 0; }
.stage__pet:first-child { opacity: 1; }
.stage__typing { position: absolute; top: 6%; left: 8%; font-size: 1.35rem; }
.pets__list { grid-column: 7 / 13; grid-row: 1; }
.pet { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-block: 10vh; }
.pet__figure { display: none; }
.pet__name { font-size: var(--t-xl); }
.pet__meta {
  align-self: flex-start; margin-top: 1rem;
  padding: 0.35em 0.85em; border-radius: 999px;
  background: var(--c-paper); font-weight: 650; font-size: var(--t-s);
}
.pet__about { margin-top: 1.2rem; max-width: 40ch; color: var(--c-muted); }
.pet .thread { margin-top: 2.2rem; }

/* ---------- 3. one day: index rows ---------- */

.day { padding: 16vh var(--gutter) 14vh; }
.day__rows { margin-top: 7vh; border-top: 1px solid var(--c-line); }
.row {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  padding-block: clamp(1.8rem, 1rem + 2.4vw, 3.4rem);
  border-bottom: 1px solid var(--c-line);
  align-items: start;
}
.row__time { grid-column: 1 / 3; grid-row: 1; font: 750 var(--t-l)/1 var(--f-display); font-stretch: 85%; font-variant-numeric: tabular-nums; letter-spacing: -0.035em; padding-top: 0.2rem; }
.row__thread { grid-column: 3 / 10; grid-row: 1; }
.row__label { grid-column: 10 / 13; grid-row: 1; text-align: right; font-weight: 600; font-size: var(--t-s); line-height: 1.4; color: var(--c-muted); padding-top: 0.5rem; }

/* ---------- 4. with a friend: asymmetric pair ---------- */

.friends {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  align-items: end; min-height: 100svh; padding: 12vh var(--gutter);
}
.friends__art { grid-column: 1 / 8; position: relative; height: min(76svh, 46rem); overflow: clip; }
.friends__pet { position: absolute; bottom: 0; width: auto; max-width: 58%; object-fit: contain; object-position: bottom; }
.friends__pet--pengu { left: 2%; height: 70%; }
.friends__pet--capy { left: 42%; height: 86%; }
.friends__chat { margin-top: 2rem; max-width: 30rem; }
.friends__chat .msg__bubble { font-size: var(--t-body); }
.friends__text { grid-column: 9 / 13; padding-bottom: 4vh; }
.friends__text .section-title { font-size: clamp(2.3rem, 1.2rem + 3.2vw, 4.6rem); }
.friends__text p { margin-top: 1.3rem; color: var(--c-muted); max-width: 38ch; }

/* ---------- 5. join: the reply composer ---------- */

.join {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  padding: 16vh var(--gutter) 18vh;
}
.join__title { grid-column: 1 / 13; font-size: var(--t-mega); margin-left: -0.055em; }
.join__body { grid-column: 1 / 7; margin-top: 1.8rem; font-size: var(--t-m); color: var(--c-muted); max-width: 34ch; }
.composer { grid-column: 1 / 10; margin-top: 3.4rem; }
.composer[hidden] { display: none; }
.picker { border: 0; padding: 0; min-width: 0; }
.picker__legend, .field__label { font-weight: 650; font-size: var(--t-s); }
.picker__legend { margin-bottom: 0.9rem; }
.picker__chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  position: relative; display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.35rem 1.15rem 0.35rem 0.35rem; border-radius: 999px;
  background: var(--c-paper); cursor: pointer;
  font: 600 1.05rem/1 var(--f-pet);
  transition: background-color 0.25s, color 0.25s, scale 0.16s var(--ease-soft);
}
.chip:active { scale: 0.97; }
.chip__input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.chip__head {
  width: 2.7rem; height: 2.7rem; border-radius: 50%; background: var(--pet-field);
  transition: rotate 0.45s var(--ease-out), scale 0.45s var(--ease-out);
}
.chip:has(.chip__input:checked) { background: var(--c-ink); color: var(--c-paper); }
.chip:has(.chip__input:checked) .chip__head { rotate: -8deg; scale: 1.06; }
.chip:has(.chip__input:focus-visible) { outline: 3px solid var(--c-ink); outline-offset: 3px; }
@media (hover: hover) { .chip:hover .chip__head { rotate: -8deg; scale: 1.06; } }
.composer__row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 0.8rem; align-items: end; margin-top: 1.8rem; }
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field__input {
  height: 3.5rem; width: 100%;
  padding: 0 1.3rem; border-radius: 999px;
  border: 2px solid transparent; background: var(--c-paper); color: var(--c-ink);
  font: 500 1.05rem/1 var(--f-display);
  transition: border-color 0.2s;
}
.field__input::placeholder { color: var(--c-muted); opacity: 0.75; }
.field__input:focus-visible { outline: none; border-color: var(--c-ink); }
.field__input[aria-invalid="true"] { border-color: var(--c-error); }
.btn--send { min-height: 3.5rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.composer__error { margin-top: 1rem; font-weight: 650; font-size: var(--t-s); color: var(--c-error); }
.composer__error[hidden] { display: none; }
.composer__fine { margin-top: 1.2rem; font-size: var(--t-s); color: var(--c-muted); }
.composer__fine .link { display: inline-block; padding-block: 0.25em; }
.join__thread { grid-column: 1 / 10; margin-top: 2.4rem; max-width: 40rem; }
.join__thread:focus { outline: none; }

/* ---------- 6. finale ---------- */

.finale {
  background: var(--c-ink); color: var(--c-yellow);
  padding: 12vh var(--gutter) calc(var(--gutter) + env(safe-area-inset-bottom));
  overflow: clip;
}
.finale__word { font-size: clamp(6rem, 0.5rem + 29vw, 29rem); font-stretch: 75%; line-height: 0.8; letter-spacing: -0.03em; margin-left: -0.06em; white-space: nowrap; }
.finale__row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.4rem;
  margin-top: 6vh; padding-top: 1.4rem; border-top: 1px solid rgb(255 200 61 / 0.25);
  font-weight: 600; font-size: var(--t-s);
}
.finale__brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.2rem; min-height: 44px; }
.finale__mark { width: 2.1rem; height: 2.1rem; }
.finale__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; }
.finale__links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.3em; transition: text-decoration-color 0.3s; }
@media (hover: hover) { .finale__links a:hover { text-decoration-color: currentColor; } }
.finale__copy { margin-left: auto; color: rgb(255 200 61 / 0.8); }
.finale :focus-visible { outline-color: var(--c-mint); }

/* ---------- 404 ---------- */

.lost { min-height: 100svh; display: grid; align-content: center; justify-items: start; gap: 2.4rem; padding: calc(var(--frame-h) + 6vh) var(--gutter) 10vh; }
.lost__title { font-size: var(--t-mega); margin-left: -0.055em; }

/* ---------- static version (no JS or reduced motion): designed, not broken ---------- */

html:not(.motion) [data-field] { background: var(--sf, transparent); }
html:not(.motion) .stage { display: none; }
html:not(.motion) .pets__list { grid-column: 1 / 13; }
html:not(.motion) .pet {
  min-height: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  margin-inline: calc(var(--gutter) * -1); padding: 10vh var(--gutter);
  background: var(--pet-field);
}
html:not(.motion) .pet > * { grid-column: 7 / 13; }
html:not(.motion) .pet__figure { display: block; grid-column: 1 / 6; grid-row: 1 / span 5; align-self: center; }
html:not(.motion) .pet__figure img { max-height: 60svh; width: auto; margin-inline: auto; }

/* ---------- phones ---------- */

@media (max-width: 899px) {
  :root { --frame-h: 4rem; }
  .frame__nav { display: none; }
  .frame .btn--small { margin-left: auto; }

  .hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; padding-top: calc(var(--frame-h) + 1.2rem); align-content: start; }
  .hero__title { grid-column: 1; grid-row: 1; font-size: clamp(3.05rem, 13.6vw, 5.6rem); }
  .hero__pet { grid-column: 1; grid-row: 2; justify-self: end; width: min(68%, 22rem); margin-top: -0.6rem; }
  .hero__img { max-height: 44svh; }
  .say { left: auto; right: 74%; top: 6%; }
  .say__text { font-size: clamp(1.25rem, 5.4vw, 1.7rem); border-radius: var(--round) var(--round) var(--tail) var(--round); }
  .say__typing { left: auto; right: 0; border-radius: var(--round) var(--round) var(--tail) var(--round); }
  .hero__lede { grid-column: 1; grid-row: 3; margin-top: 1.2rem; }
  .hero__actions { grid-column: 1; grid-row: 4; margin-top: 1.5rem; }
  .hero__status { grid-column: 1; grid-row: 5; margin-top: 2.4rem; }
  .hero__next { grid-column: 1; grid-row: 5; margin-top: 2.4rem; }

  .pets { padding-top: 12vh; }
  .pets__head .section-title, .pets__intro { grid-column: 1 / 13; }
  .stage { display: none; }
  .pets__list { grid-column: 1 / 13; }
  .pet { min-height: 0; padding-block: 8vh; }
  .pet__figure { display: block; margin-bottom: 1.6rem; }
  .pet__figure img { max-height: 46svh; width: auto; }
  html:not(.motion) .pet { display: flex; }
  html:not(.motion) .pet__figure img { margin-inline: 0; }

  .row { grid-template-columns: auto 1fr; row-gap: 1rem; }
  .row__time { grid-column: 1; }
  .row__label { grid-column: 2; align-self: center; padding-top: 0; }
  .row__thread { grid-column: 1 / 3; grid-row: 2; }

  .friends { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .friends__art { grid-column: 1; height: 56svh; min-height: 22rem; }
  .friends__pet--pengu { left: 0; height: 64%; max-width: 54%; }
  .friends__pet--capy { left: auto; right: 0; height: 84%; max-width: 54%; }
  .friends__text { grid-column: 1; margin-top: 3rem; }

  .join__title, .join__body, .composer, .join__thread { grid-column: 1 / 13; }
  .composer__row { grid-template-columns: minmax(0, 1fr); }
  .btn--send { justify-self: start; }

  .finale__copy { margin-left: 0; }
}

/* ---------- reduced motion: keep the states, drop the movement ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .btn__roll > span + span { visibility: hidden; }
  .btn:focus-visible .btn__roll > span, .btn:focus-visible .btn__roll > span + span { translate: none; }
  .btn:focus-visible { outline-offset: 4px; text-decoration: underline; }
}
@media (prefers-reduced-motion: reduce) and (hover: hover) {
  .btn:hover .btn__roll > span, .btn:hover .btn__roll > span + span { translate: none; }
  .btn:hover { text-decoration: underline; text-underline-offset: 0.25em; }
}

/* ---------- admin ---------- */

body.admin { background: var(--c-paper); }
.admin__bar { display: flex; align-items: center; gap: 1.2rem; padding: 0.8rem var(--gutter); border-bottom: 1px solid var(--c-line); }
.admin__where { font-weight: 650; color: var(--c-muted); }
.admin__bar form { margin-left: auto; }
.admin__link { font-weight: 650; text-decoration: underline; text-underline-offset: 0.25em; min-height: 44px; padding: 0 0.4rem; }
.admin__main { padding: 6vh var(--gutter) 10vh; max-width: 80rem; }
.admin__main--login { max-width: 28rem; }
.admin__title { font-size: clamp(2.2rem, 1.4rem + 3vw, 4rem); }
.admin__sub, .admin__note { margin-top: 0.8rem; color: var(--c-muted); }
.admin__login { margin-top: 2rem; display: grid; gap: 1.1rem; }
.admin__login .field__input, .admin__search .field__input { background: #fff; border-color: var(--c-line); }
.admin__login .field__input:focus-visible, .admin__search .field__input:focus-visible { border-color: var(--c-ink); }
.admin__login .btn { justify-self: start; }
.admin__stats { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.8rem; }
.admin__stat { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.3rem 1rem 0.3rem 0.3rem; border-radius: 999px; background: var(--pet-field); font-weight: 650; }
.admin__stat img { width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--c-paper); }
.admin__stat-num { font-variant-numeric: tabular-nums; }
.admin__tools { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-top: 2.2rem; }
.admin__search { display: flex; align-items: end; gap: 0.6rem; }
.admin__search .field__input { height: 2.85rem; }
.admin__table-wrap { margin-top: 1.6rem; overflow-x: auto; border: 1px solid var(--c-line); border-radius: 1rem; background: #fff; }
.admin__table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.admin__table th, .admin__table td { text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid var(--c-line); white-space: nowrap; }
.admin__table th { font-weight: 650; color: var(--c-muted); background: var(--c-paper); }
.admin__table tr:last-child td { border-bottom: 0; }
.admin__table time { font-variant-numeric: tabular-nums; }
.admin__empty { color: var(--c-muted); text-align: center !important; padding: 2.4rem !important; }
