/*
 * MYORA public website - CEL STUDIO.
 * Used only by projects/myora/layouts/application + layouts/share.
 * Tokens mirror clients/myora/lib/src/model/app_palette.dart (paper / ink).
 *
 * Copyright (c) 2026 Gefühlt Beta UG. All rights reserved.
 */

/* ---------- Fonts (self-hosted OFL) ----------
   "Myora Display" = Anton for Latin + Oswald Bold for Cyrillic (Anton has no
   Cyrillic). CJK / Arabic / Hebrew / Devanagari / Thai fall through to heavy
   system faces, see the :lang() block below. */
@font-face {
  font-family: "Myora Display";
  src: url(/assets/myora_site/Anton-Regular-91641e70e39c3a79394c83d6cd238e83bf6656a64d2175a0f295d1d0a237b46c.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Myora Display";
  src: url(/assets/myora_site/Oswald-Bold-Cyrillic-05992cf964c24d9fa1ccd55346a5a6d008ddcb652ad530a15e743077c3949782.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url(/assets/myora_site/IBMPlexSans-Variable-2c88c736da6ee10c5b90eb3772d2f98f701fb6b69a27ca6c73f47eff4d21f16c.woff2) format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url(/assets/myora_site/IBMPlexMono-Regular-791adb7ba8c19be7fc1cb6481ea76e54c8c1f840bfa57a291a6dba4126158ba9.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url(/assets/myora_site/IBMPlexMono-Medium-59855b4aa2dfb4386f9ee72871102363e106d1b5124880899c8f2ebe802e5b7d.woff2) format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  --vermilion: #E63B2E;
  --cta: #D7362A;
  --cta-press: #A82A1F;
  --cream: #F1EADB;
  --ink-true: #15130F;

  --paper: #F3EEE4;
  --card: #FAF7F0;
  --surface: #EAE3D6;
  --surface-alt: #E0D8C9;
  --ink: #1A1714;
  --ink-soft: #3B352E;
  --ink-muted: #675F55;
  --ink-faint: #A29A8D;
  --accent-text: #C9321F;
  --line: rgba(26, 23, 20, 0.15);
  --line-strong: rgba(26, 23, 20, 0.32);
  --peg: #F3EEE4;
  --peg-rim: rgba(26, 23, 20, 0.38);
  --hard: rgba(21, 19, 15, 0.20);
  --contact: rgba(21, 19, 15, 0.22);
  --grain: #3A2E22;
  --grain-opacity: 0.10;
  --error: #C0301F;
  --success: #2E7A4C;

  /* The inverted band: ink on paper pages, cream on ink pages. */
  --band: #15130F;
  --band-ink: #F1EADB;
  --band-muted: #BDB3A2;

  --font-display: "Myora Display", "Anton", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", "Noto Sans", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: 16px;
  --radius-cel: 3px;
  --shadow-cel: 0 1px 0 var(--contact), var(--hard-x, 7px) 8px 0 var(--hard);
  --shadow-cel-sm: 0 1px 0 var(--contact), 4px 5px 0 var(--hard);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15130F;
    --card: #221F1A;
    --surface: #1E1B17;
    --surface-alt: #2B2722;
    --ink: #F1EADB;
    --ink-soft: #DCD3C2;
    --ink-muted: #B0A695;
    --ink-faint: #6C655A;
    --accent-text: #F26450;
    --line: rgba(241, 234, 219, 0.14);
    --line-strong: rgba(241, 234, 219, 0.30);
    --peg: #15130F;
    --peg-rim: rgba(241, 234, 219, 0.35);
    --hard: #050403;
    --contact: rgba(0, 0, 0, 0.7);
    --grain: #F1EADB;
    --grain-opacity: 0.075;
    --error: #F26450;
    --success: #63C08E;

    --band: #F1EADB;
    --band-ink: #15130F;
    --band-muted: #5B5348;
  }
}

@media (min-width: 640px) {
  :root { --gutter: 28px; }
}
[dir="rtl"] { --hard-x: -7px; }
@media (prefers-color-scheme: dark) {
  .cel { outline: 1px solid rgba(241, 234, 219, 0.10); outline-offset: 0; }
}
@media (min-width: 1100px) {
  :root { --gutter: 48px; }
}

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

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.site {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Washi grain: one alpha tile, tinted per paper, fixed over the page colour. */
body.site::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--grain);
  opacity: var(--grain-opacity);
  -webkit-mask-image: url(/assets/myora_site/paper_grain-bd6c0a7a241a3e87ee1c3db7926bcdd69d2324892fe4a08421f36b12996e62f4.png);
  mask-image: url(/assets/myora_site/paper_grain-bd6c0a7a241a3e87ee1c3db7926bcdd69d2324892fe4a08421f36b12996e62f4.png);
  -webkit-mask-size: 128px 128px;
  mask-size: 128px 128px;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
}
body.site > * { position: relative; z-index: 1; }

::selection { background: var(--vermilion); color: #FFFFFF; }
html { scrollbar-color: var(--ink-faint) var(--paper); accent-color: var(--vermilion); caret-color: var(--vermilion); }

img { max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--vermilion);
  outline-offset: 3px;
  border-radius: 2px;
}

.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;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--wide { max-width: 1440px; }

/* Hugeicons (stroke-rounded, 1.5). */
.hi { width: 20px; height: 20px; flex: none; }
[dir="rtl"] .hi--flip { transform: scaleX(-1); }

/* ---------- Type ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  line-height: 0.92;
  letter-spacing: 0.004em;
  margin: 0;
  text-wrap: balance;
}
.display--hero { font-size: clamp(3.4rem, 8.4vw, 8.6rem); text-transform: uppercase; }
.display--xl { font-size: clamp(2.9rem, 9vw, 6rem); text-transform: uppercase; }
.display--lg { font-size: clamp(2.3rem, 5.4vw, 4.4rem); text-transform: uppercase; }
.display--md { font-size: clamp(1.8rem, 3.4vw, 2.6rem); text-transform: uppercase; }

.label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  line-height: 1.4;
}
.label--rule {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.label--rule::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--vermilion);
  flex: none;
}

.lead {
  text-wrap: pretty;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 34ch;
  margin: 0;
}

.link {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.link:hover { text-decoration-thickness: 2px; }

/* Scripts without Anton: heavy system faces at a calmer size, no uppercase tracking. */
:lang(ru) .display, :lang(uk) .display { line-height: 1.12; letter-spacing: 0.01em; padding-top: 0.04em; }
:lang(ru) .display--hero, :lang(uk) .display--hero { font-size: clamp(2.4rem, 4.7vw, 4.4rem); hyphens: manual; }
:lang(ru) .display--xl, :lang(uk) .display--xl { font-size: clamp(2.2rem, 6vw, 4.6rem); }

:lang(ja) .display, :lang(zh-Hans) .display, :lang(zh-Hant) .display, :lang(zh) .display, :lang(ko) .display {
  font-family: "Myora Display", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans CJK JP", "Noto Sans JP", "PingFang SC", "PingFang TC", "Apple SD Gothic Neo", "Noto Sans KR", "Yu Gothic", sans-serif;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
}
:lang(ja) .display--hero, :lang(zh-Hans) .display--hero, :lang(zh-Hant) .display--hero, :lang(ko) .display--hero { font-size: clamp(2.3rem, 4.6vw, 4.3rem); }
:lang(ja) .display--xl, :lang(zh-Hans) .display--xl, :lang(zh-Hant) .display--xl, :lang(ko) .display--xl { font-size: clamp(2rem, 6.4vw, 4.2rem); }
:lang(ja) .display--lg, :lang(zh-Hans) .display--lg, :lang(zh-Hant) .display--lg, :lang(ko) .display--lg { font-size: clamp(1.8rem, 4vw, 3.2rem); }
:lang(ja) .display--md, :lang(zh-Hans) .display--md, :lang(zh-Hant) .display--md, :lang(ko) .display--md { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
:lang(ja) body.site, :lang(zh-Hans) body.site, :lang(zh-Hant) body.site { line-break: strict; word-break: auto-phrase; }
:lang(ko) body.site { word-break: keep-all; }

:lang(ar) .display, :lang(he) .display, :lang(hi) .display, :lang(th) .display {
  font-family: "Myora Display", "Noto Kufi Arabic", "Geeza Pro", "Arial Hebrew", "Noto Sans Hebrew", "Kohinoor Devanagari", "Noto Sans Devanagari", "Thonburi", "Noto Sans Thai", sans-serif;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: 0;
}
:lang(ar) .display--hero, :lang(he) .display--hero, :lang(hi) .display--hero, :lang(th) .display--hero { font-size: clamp(2.5rem, 5vw, 4.6rem); }
:lang(ar) .display--xl, :lang(he) .display--xl, :lang(hi) .display--xl, :lang(th) .display--xl { font-size: clamp(2.2rem, 6.4vw, 4.4rem); }
:lang(ar) body.site { font-family: var(--font-body), "Geeza Pro", "Noto Sans Arabic", sans-serif; font-size: 1.12rem; }
:lang(ar) .legal, :lang(ar) .lead { font-size: 1.2rem; line-height: 1.75; }
:lang(ar) .legal li { margin-bottom: 6px; }
:lang(ar) .label, :lang(he) .label, :lang(hi) .label, :lang(th) .label {
  font-family: var(--font-body);
  letter-spacing: 0.01em;
  font-size: 0.82rem;
  text-transform: none;
}
:lang(ja) .label, :lang(zh-Hans) .label, :lang(zh-Hant) .label, :lang(ko) .label { letter-spacing: 0.08em; }
/* Production marks are Latin decoration in every locale. */
.cel__caption, .cel-marks__slate, .frames__head .label, .ora-band__slate, .faq-item__no {
  font-family: var(--font-mono) !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
}

/* ---------- Wordmark + lockup ---------- */
.wordmark { display: inline-flex; align-items: center; line-height: 0; text-decoration: none; }
.wordmark img { display: block; height: 40px; width: auto; }
.wordmark--sm img { height: 28px; }
@media (max-width: 479px) {
  .site-header .wordmark img { height: 32px; }
}
.lockup { display: flex; align-items: center; gap: 18px; min-width: 0; }
.lockup__rule { width: 1px; height: 34px; background: var(--ink); opacity: 0.55; flex: none; }
.lockup__tag { max-width: 21ch; line-height: 1.35; color: var(--ink); }
@media (max-width: 899px) {
  .lockup__rule, .lockup__tag { display: none; }
}

/* ---------- Buttons ---------- */
.btn-cta,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.15s ease, box-shadow 0.18s ease;
}
.btn-cta {
  background: var(--cta);
  color: #FFFFFF;
  border: 1px solid var(--cta);
  box-shadow: 0 3px 0 var(--cta-press);
}
.btn-cta:hover { background: #C4301F; border-color: #C4301F; transform: translateY(-1px); box-shadow: 0 4px 0 var(--cta-press); }
.btn-cta:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--cta-press); }
.btn-cta .hi, .btn-ghost .hi { width: 20px; height: 20px; }

.btn-cta__stack { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.btn-cta__small { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.04em; opacity: 0.9; }
.btn-cta__big { font-size: 1.05rem; font-weight: 600; }

.btn-ghost {
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: 0 3px 0 var(--hard);
}
.btn-ghost:hover { background: var(--surface); transform: translateY(-1px); }

.btn-cta--lg { min-height: 56px; padding: 14px 28px; font-size: 1.08rem; }

/* ---------- Header ---------- */
body.site > .site-header {
  z-index: 20;
  border-bottom: 1px solid var(--line);
}
.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 80px;
  padding-block: 14px;
}
.site-header__actions { display: flex; align-items: center; gap: 10px; }
@media (max-width: 479px) {
  .site-header__row { min-height: 68px; }
  .site-header__actions .btn-cta { padding: 8px 16px; min-height: 44px; }
  .site-header__actions .btn-cta__small { display: none; }
  .site-header__actions .btn-cta__big { font-size: 0.95rem; }
  .site-header__actions .btn-cta .hi { display: none; }
}

/* ---------- Language switcher ---------- */
.lang-dropdown { position: relative; }
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.9rem;
}
.lang-toggle:hover { background: var(--surface); }
.lang-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lang-toggle .lang-name { display: none; }
@media (min-width: 720px) { .lang-toggle .lang-name { display: inline; } }
.lang-toggle svg { width: 16px; height: 16px; transition: transform 0.15s ease; }

.lang-dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  z-index: 60;
  width: max-content;
  max-width: calc(100vw - 2 * var(--gutter));
  max-height: 70vh;
  overflow-y: auto;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-cel);
  box-shadow: var(--shadow-cel-sm);
}
.lang-dropdown.is-open .lang-dropdown-content { display: block; }
.lang-dropdown.is-open [data-lang-chevron] { transform: rotate(180deg); }

.lang-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 2px;
}
@media (min-width: 640px) {
  .lang-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}
.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 3px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  min-width: 0;
}
.lang-item .lang-code { color: var(--ink-faint); width: 5.2em; flex: none; white-space: nowrap; letter-spacing: 0.08em; }
.lang-item:hover { background: var(--surface); }
.lang-item .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-item.active-lang { background: var(--surface-alt); font-weight: 600; }
.lang-item.active-lang .lang-code { color: var(--accent-text); }

/* ---------- Cel card ---------- */
.cel {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-cel);
  box-shadow: var(--shadow-cel);
  padding: 30px 12px 12px;
}
/* Peg-bar registration holes, punched through to the paper: round, slot, round. */
.cel::before,
.cel::after {
  content: "";
  position: absolute;
  top: 10px;
  height: 10px;
  pointer-events: none;
}
.cel::before {
  inset-inline: 20px;
  background:
    radial-gradient(circle at 5px 5px, var(--peg) 3.6px, var(--peg-rim) 4.1px, var(--peg-rim) 4.6px, transparent 5px) left center / 10px 10px no-repeat,
    radial-gradient(circle at 5px 5px, var(--peg) 3.6px, var(--peg-rim) 4.1px, var(--peg-rim) 4.6px, transparent 5px) right center / 10px 10px no-repeat;
}
.cel::after {
  left: 50%;
  width: 36px;
  margin-left: -18px;
  border-radius: 999px;
  background: var(--peg);
  box-shadow: inset 0 0 0 1px var(--peg-rim), inset 0 1.5px 0 var(--peg-rim);
}
.sheet::before { top: 16px; height: 14px; inset-inline: 28px;
  background:
    radial-gradient(circle at 7px 7px, var(--peg) 5.4px, var(--peg-rim) 6px, var(--peg-rim) 6.6px, transparent 7px) left center / 14px 14px no-repeat,
    radial-gradient(circle at 7px 7px, var(--peg) 5.4px, var(--peg-rim) 6px, var(--peg-rim) 6.6px, transparent 7px) right center / 14px 14px no-repeat; }
.sheet::after { top: 16px; height: 14px; width: 52px; margin-left: -26px; }
.cel--caption { padding-bottom: 0; }
.cel__window {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  line-height: 0;
}
.cel__window picture { display: contents; }
.cel__window img { display: block; width: 100%; height: auto; }
.cel__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 34px;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
}
[dir="rtl"] .cel__caption { direction: ltr; }

/* Photo cels stay cream paper on both papers (the night-mode board keeps the polaroid frame light). */
.cel--photo {
  --card: #F6F1E6;
  --surface: #EAE3D6;
  --line: rgba(26, 23, 20, 0.15);
  --line-strong: rgba(26, 23, 20, 0.30);
  --ink-muted: #675F55;
  --peg-rim: rgba(26, 23, 20, 0.38);
  background: var(--card);
}

.cel-tag {
  position: absolute;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 2px;
  background: #F6F1E6;
  color: #1A1714;
  border: 0.8px solid rgba(26, 23, 20, 0.3);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.3;
  box-shadow: 2px 2px 0 rgba(21, 19, 15, 0.25);
}
.cel-tag--accent { background: var(--vermilion); color: #FFFFFF; border-color: var(--vermilion); }
:lang(ar) .cel-tag, :lang(he) .cel-tag { font-family: var(--font-body); letter-spacing: 0; font-size: 0.8rem; }

/* ---------- Production marks (decorative) ---------- */
.cel-marks { position: absolute; inset: 0; pointer-events: none; color: var(--ink-muted); z-index: 0; }
.cel-marks__cross { position: absolute; width: 22px; height: 22px; opacity: 0.75; }
.cel-marks__cross--tl { top: 18px; left: 18px; }
.cel-marks__cross--tr { top: 18px; right: 18px; }
.cel-marks__cross--bl { bottom: 18px; left: 18px; }
.cel-marks__cross--br { bottom: 18px; right: 18px; }
.cel-marks__slate {
  position: absolute;
  top: 20px;
  left: 56px;
  display: flex;
  gap: 18px;
  font-size: 0.66rem !important;
  color: var(--ink-muted);
}
[dir="rtl"] .cel-marks__slate { left: auto; right: 56px; }
[dir="rtl"] .cel-marks__slate { direction: ltr; }
@media (max-width: 639px) {
  .cel-marks__cross--bl, .cel-marks__cross--br { display: none; }
  .cel-marks__slate { left: 48px; gap: 12px; font-size: 0.6rem !important; }
  [dir="rtl"] .cel-marks__slate { left: auto; right: 48px; }
}

/* ---------- Main ---------- */
.site-main { flex: 1 0 auto; overflow-x: clip; }

.flash { margin-top: 20px; }
.alert {
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: var(--radius-cel);
  border: 1px solid var(--line-strong);
  background: var(--card);
}
.alert-success { border-color: var(--success); }
.alert-danger { border-color: var(--error); }
.alert-warning, .alert-info { border-color: var(--vermilion); }

/* ---------- The name story (おら) ---------- */
.ora-def {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
}
.ora-def__kana {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1;
  color: var(--vermilion);
}
.ora-def__gloss { text-transform: none; letter-spacing: 0.06em; color: var(--ink); font-size: 0.8rem; }
:lang(ar) .ora-def__gloss, :lang(he) .ora-def__gloss { font-size: 0.95rem; }

/* ---------- Landing hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 48px 48px;
}
@media (max-width: 959px) {
  .hero__grid { gap: 18px; }
  .hero__title { gap: 14px; }
  .hero__stage .cel-stack { width: min(100% + 16px, 50svh, 640px); margin-inline: auto; padding: 14px 6px 22px; }
  .hero__body { gap: 18px; }
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-areas: "title" "stage" "body";
  gap: 30px;
  align-items: center;
}
.hero__title { grid-area: title; display: flex; flex-direction: column; gap: 22px; }
.hero__stage { grid-area: stage; }
.hero__body { grid-area: body; display: flex; flex-direction: column; gap: 26px; }
@media (min-width: 960px) {
  .hero { padding-block: 80px 72px; }
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "title stage" "body stage";
    grid-template-rows: 1fr 1fr;
    column-gap: clamp(32px, 5vw, 88px);
    row-gap: 34px;
  }
  .hero__title { align-self: end; }
  .hero__body { align-self: start; }
}
.store-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.store-badge {
  display: inline-block;
  line-height: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.store-badge:hover { transform: translateY(-1px); opacity: 0.92; }
.store-badge img { height: 50px; width: auto; }
@media (min-width: 640px) { .store-badge img { height: 56px; } }

.cel-stack {
  position: relative;
  width: min(100%, 640px);
  margin-inline: auto;
  padding: 26px 16px 14px;
}
/* Swipe deck: every cel sits in one grid cell; depth decides the pose. */
.cel-deck { display: grid; touch-action: pan-y; outline: none; }
.cel-deck:focus-visible .deck-card[data-depth="0"] { outline: 3px solid var(--vermilion); outline-offset: 4px; }
.deck-card {
  grid-area: 1 / 1;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
  -webkit-user-select: none;
}
.deck-card img { -webkit-user-drag: none; }
.deck-card[data-depth="0"] { transform: rotate(2deg); cursor: grab; }
/* Stack order before the deck controller connects (it then sets z-index inline). */
.deck-card[data-depth="0"] { z-index: 4; }
.deck-card[data-depth="1"] { z-index: 3; }
.deck-card[data-depth="2"] { z-index: 2; }
.deck-card[data-depth="3"] { z-index: 1; }
.deck-card[data-depth="1"] { transform: rotate(-5deg) translate(-18px, 10px); }
.deck-card[data-depth="2"] { transform: rotate(4.5deg) translate(16px, 14px); }
.deck-card[data-depth="3"] { transform: rotate(-1deg) translate(0, 18px); visibility: hidden; }
.deck-card:not([data-depth="0"]) .cel-tag,
.deck-card:not([data-depth="0"]) .cel__caption { opacity: 0; }
.deck-card:not([data-depth="0"]) img { filter: saturate(0.85); }
.deck-card.is-dragging { transition: none; cursor: grabbing; will-change: transform; }
.deck-card.is-flying { transition: transform 0.24s cubic-bezier(0.3, 0, 0.8, 0.4); }
/* Swipe impact (cel_deck#impact): burst lines, pop, glare, stamp punch. */
.deck-burst {
  position: absolute;
  z-index: 0;
  inset: -10% -14%;
  pointer-events: none;
  opacity: 0;
  background: repeating-conic-gradient(from 4deg, var(--vermilion) 0deg 1.4deg, transparent 1.4deg 8deg);
  -webkit-mask: radial-gradient(closest-side, transparent 58%, #000 62%, #000 78%, transparent 100%);
  mask: radial-gradient(closest-side, transparent 58%, #000 62%, #000 78%, transparent 100%);
}
.deck-glare {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 252, 244, 0.8) 48%, rgba(255, 252, 244, 0.2) 56%, transparent 70%) no-repeat;
  background-size: 260% 100%;
  mix-blend-mode: screen;
}
.cel-deck.is-impact .deck-burst { animation: cel-burst 0.75s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.cel-deck.is-impact .deck-card[data-depth="0"] { animation: deck-pop 0.55s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
.cel-deck.is-impact .deck-card[data-depth="0"] .deck-glare { animation: cel-glare 0.8s ease-out 0.05s both; }
.cel-deck.is-impact .ink-stamp { animation: stamp-punch 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
@keyframes deck-pop {
  0% { transform: rotate(2deg) translateY(10px) scale(0.93); }
  60% { transform: rotate(1deg) translateY(-4px) scale(1.035); }
  100% { transform: rotate(2deg); }
}
@keyframes stamp-punch {
  0% { transform: rotate(9deg) scale(1); }
  35% { transform: rotate(3deg) scale(1.4); }
  70% { transform: rotate(11deg) scale(0.94); }
  100% { transform: rotate(9deg) scale(1); }
}
.cel-stack .cel-tag--photo { inset-inline-start: 12px; bottom: 12px; }
.cel-stack .cel-tag--anime { inset-inline-end: 12px; bottom: 12px; }
[dir="rtl"] .cel-stack .cel-tag--photo { inset-inline-start: auto; left: 12px; }
[dir="rtl"] .cel-stack .cel-tag--anime { inset-inline-end: auto; right: 12px; }
/* Swipe marker: a pill on the stack's caption strip, and a periodic nudge of
   the top cel (cel_deck#nudge) so the deck reads as draggable. */
.deck-hint {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: 14px;
  translate: -50% 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px 6px 8px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  color: #1A1714;
  background: rgba(246, 241, 230, 0.95);
  border: 1px solid rgba(26, 23, 20, 0.3);
  border-radius: 999px;
  box-shadow: 2px 2px 0 rgba(26, 23, 20, 0.22);
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.deck-hint__icon { width: 16px; height: 16px; color: var(--vermilion); }
.cel-deck.is-swiped .deck-hint { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  html.intro .deck-hint { opacity: 0; }
  .cel-deck.is-nudging .deck-hint__icon { animation: deck-hint-bob 1.1s ease-in-out both; }
  html .cel-deck .deck-card[data-depth="0"].is-nudging:not(.is-dragging) { animation: deck-nudge 1.1s cubic-bezier(0.35, 0, 0.25, 1) both; }
}
@keyframes deck-nudge {
  0% { translate: 0 0; rotate: 0deg; }
  30% { translate: 46px -6px; rotate: 5deg; }
  55% { translate: -14px 0; rotate: -1.5deg; }
  75% { translate: 6px 0; rotate: 0.6deg; }
  100% { translate: 0 0; rotate: 0deg; }
}
@keyframes deck-hint-bob {
  0%, 100% { translate: 0 0; }
  30% { translate: 4px 0; }
  55% { translate: -3px 0; }
}
.cel-stack .ink-stamp {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  top: -10px;
  right: 6px;
  transform: rotate(9deg);
}
[dir="rtl"] .cel-stack .ink-stamp { right: auto; left: 6px; transform: rotate(-9deg); }
@media (max-width: 959px) {
  .cel-stack .ink-stamp { top: -4px; right: 18px; }
  [dir="rtl"] .cel-stack .ink-stamp { right: auto; left: 18px; }
  .ink-stamp img { width: 68px; height: 68px; }
  html.intro .cel-stack .ink-stamp { animation-name: stamp-slam-sm; }
}
@keyframes stamp-slam-sm { from { scale: 1.7; rotate: 16deg; opacity: 0; } 30% { opacity: 1; } to { scale: 1; rotate: 0deg; opacity: 1; } }
.ink-stamp img { display: block; width: 84px; height: 84px; border-radius: 6px; box-shadow: 3px 4px 0 rgba(21, 19, 15, 0.3); }
@media (min-width: 960px) {
  .cel-stack { width: min(100%, 700px); }
  .ink-stamp img { width: 116px; height: 116px; }
}

/* ---------- ora band (inverted) ---------- */
.ora-band {
  position: relative;
  background: var(--band);
  color: var(--band-ink);
  overflow: hidden;
  --ink-soft: var(--band-ink);
  --ink-muted: var(--band-muted);
  --accent-text: var(--vermilion);
}
.ora-band__grid {
  position: relative;
  display: grid;
  gap: 8px 64px;
  padding-block: 64px 72px;
  align-items: center;
}
.ora-band__kana {
  margin: 0;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  font-weight: 700;
  font-size: clamp(7rem, 30vw, 17rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--vermilion);
}
.ora-band__text { display: flex; flex-direction: column; gap: 20px; }
.ora-band__slate { color: var(--band-muted); }
.ora-band .lead { max-width: 46ch; color: var(--band-ink); opacity: 0.9; }
.ora-band__tagline { color: var(--vermilion); }
@media (min-width: 960px) {
  .ora-band__grid { grid-template-columns: auto minmax(0, 1fr); padding-block: 96px 104px; }
}

/* ---------- Closing band ---------- */
.closing__grid { position: relative; display: grid; gap: 32px; align-items: center; padding-block: 72px 80px; }
.closing__text { display: flex; flex-direction: column; gap: 26px; align-items: flex-start; }
.closing__title { color: var(--band-ink); max-width: 14ch; }
@media (min-width: 960px) { .closing__title { font-size: clamp(4rem, 7.4vw, 8rem); } }
/* The table at the end of the shoot: four finished cels fanned out, the MY stamp slammed across them. */
.closing__table { position: relative; width: min(100%, 660px); aspect-ratio: 1.3; justify-self: center; direction: ltr; }
.closing__cel { position: absolute; width: 40%; margin: 0; padding: 20px 8px 8px; }
.closing__cel:nth-child(1) { left: 4%; top: 14%; rotate: -9deg; }
.closing__cel:nth-child(2) { left: 21%; top: 2%; rotate: -3deg; }
.closing__cel:nth-child(3) { left: 38%; top: 9%; rotate: 4deg; }
.closing__cel:nth-child(4) { left: 55%; top: 20%; rotate: 10deg; }
.closing__cel .cel__window img { aspect-ratio: 1; object-fit: cover; }
.closing__stamp { position: absolute; z-index: 5; right: 2%; bottom: -4%; }
.closing__stamp img { display: block; width: 120px; height: 120px; border-radius: 10px; transform: rotate(-8deg); box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.35); }
.closing__stamp::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: -1;
  border: 3px solid var(--vermilion);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
@media (max-width: 959px) {
  .closing__table { order: -1; width: min(100% - 8px, 440px); margin-bottom: -8px; }
  .closing__stamp img { width: 96px; height: 96px; }
  .closing__grid { padding-block: 56px 64px; }
}
@media (min-width: 960px) {
  .closing__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); padding-block: 96px 104px; }
  .closing__stamp img { width: 170px; height: 170px; }
}
.frames + .closing { margin-top: 0; }

/* ---------- Styles showcase (live catalog) ---------- */
.styles { position: relative; padding-block: 72px 24px; }
.styles__head { margin-bottom: 40px; }
.styles__title { max-width: 12ch; }
.styles__grid {
  list-style: none;
  margin-block: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 16px;
}
@media (min-width: 760px) { .styles__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px 32px; } }
/* Pose per card as variables, so the pointer tilt (--rx/--ry) composes with it. */
.style-cel {
  transform: perspective(900px) translateY(var(--y, 0px)) rotate(var(--r, 0deg)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
.style-cel:nth-child(4n+1) { --r: -3deg; }
.style-cel:nth-child(4n+2) { --r: 2deg; --y: 26px; }
.style-cel:nth-child(4n+3) { --r: -1.2deg; --y: -6px; }
.style-cel:nth-child(4n+4) { --r: 2.8deg; --y: 22px; }
@media (max-width: 759px) {
  .style-cel:nth-child(even) { --r: 2deg; --y: 18px; }
  .style-cel:nth-child(odd) { --r: -2deg; --y: 0px; }
}
.style-cel .cel__window img { aspect-ratio: 1; object-fit: cover; }
.styles__grid[data-collapsed] > li:nth-child(n+9) { display: none; }
.styles__more { display: flex; justify-content: center; margin-top: 64px; }
.btn-more {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 16px 28px;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-more:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--vermilion); }
.btn-more:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }

/* Two-sided style cel: the whole polaroid turns over to the photo it was
   made from. Hover on desktop, tap or Enter everywhere; the first card peeks
   once when the grid scrolls in, and every front carries a flip hint. */
.style-cel { padding: 0; perspective: 1400px; }
.style-cel__card {
  position: relative;
  display: grid;
  transform-style: preserve-3d;
  transition: transform 0.72s cubic-bezier(0.5, -0.2, 0.25, 1.35) 0.08s;
}
.style-cel__side {
  grid-area: 1 / 1;
  padding: 26px 9px 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.style-cel__side--back {
  transform: rotateY(180deg);
  --card: #ECE3D2;
  background:
    repeating-linear-gradient(-45deg, rgba(26, 23, 20, 0.035) 0 2px, transparent 2px 7px),
    var(--card);
}
.style-cel__side--back .cel__window img { filter: saturate(0.92) contrast(1.02); }
.style-cel__tape {
  position: absolute;
  z-index: 3;
  top: 14px;
  left: 50%;
  width: 74px;
  height: 22px;
  margin-left: -37px;
  transform: rotate(-4deg);
  background: rgba(241, 234, 219, 0.78);
  box-shadow: 0 1px 2px rgba(26, 23, 20, 0.18);
  clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 96%, 0 50%);
}
.style-cel .style-cel__back-tag { inset-inline-start: 10px; bottom: 10px; }
.style-cel__name--back { display: inline-flex; align-items: center; gap: 6px; color: #3B352E; }
.style-cel__arrow { width: 15px; height: 15px; flex: none; color: var(--vermilion); }
[dir="rtl"] .style-cel__arrow { transform: scaleX(-1); }
.style-cel--flip { cursor: pointer; outline: none; }
.style-cel--flip:focus-visible .style-cel__side { outline: 3px solid var(--vermilion); outline-offset: 3px; }
.style-cel--flip.is-flipped .style-cel__card { transform: rotateY(180deg); }
.style-cel--flip.is-peek .style-cel__card { animation: cel-peek 1.4s cubic-bezier(0.45, 0, 0.3, 1) both; }
@keyframes cel-peek {
  0%, 100% { transform: rotateY(0deg); }
  35%, 55% { transform: rotateY(-38deg); }
}

/* Flip hint: a small cream chip in the corner, icon spins on hover. */
.flip-hint {
  position: absolute;
  z-index: 2;
  top: 8px;
  inset-inline-end: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px 5px 6px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  color: #1A1714;
  background: rgba(246, 241, 230, 0.92);
  border: 1px solid rgba(26, 23, 20, 0.28);
  border-radius: 999px;
  box-shadow: 2px 2px 0 rgba(26, 23, 20, 0.22);
}
.flip-hint__icon { width: 13px; height: 13px; color: var(--vermilion); transition: transform 0.5s cubic-bezier(0.34, 1.36, 0.5, 1); }
.style-cel--flip:hover .flip-hint__icon,
.style-cel--flip.is-peek .flip-hint__icon { transform: rotate(180deg); }

/* The turn as a small scene: lift off the table, manga impact lines burst
   behind, a light sweep crosses the face, drop back with a bounce, and the
   PHOTO tag slams onto the back. */
.style-cel { position: relative; }
.style-cel.is-turning { z-index: 6; }
.style-cel.is-turning .style-cel__card { animation: style-turn-lift 0.95s cubic-bezier(0.3, 0.7, 0.2, 1) both; }
@keyframes style-turn-lift {
  0% { translate: 0 0; scale: 1; }
  28% { translate: 0 -26px; scale: 1.09; }
  70% { translate: 0 -18px; scale: 1.06; }
  86% { translate: 0 3px; scale: 0.99; }
  100% { translate: 0 0; scale: 1; }
}
.style-cel.is-turning .style-cel__side { box-shadow: 0 1px 0 var(--contact), 14px 30px 0 rgba(26, 23, 20, 0.22); transition: box-shadow 0.3s ease; }
.style-cel__burst {
  position: absolute;
  z-index: -1;
  inset: -22% -26%;
  pointer-events: none;
  opacity: 0;
  background: repeating-conic-gradient(from 3deg, var(--vermilion) 0deg 1.6deg, transparent 1.6deg 9deg);
  -webkit-mask: radial-gradient(closest-side, transparent 52%, #000 56%, #000 74%, transparent 100%);
  mask: radial-gradient(closest-side, transparent 52%, #000 56%, #000 74%, transparent 100%);
}
.style-cel.is-turning .style-cel__burst { animation: cel-burst 0.8s cubic-bezier(0.2, 0.8, 0.3, 1) 0.12s both; }
@keyframes cel-burst {
  0% { opacity: 0; transform: scale(0.72) rotate(0deg); }
  25% { opacity: 0.95; }
  100% { opacity: 0; transform: scale(1.22) rotate(10deg); }
}
.style-cel__glare {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 252, 244, 0.75) 48%, rgba(255, 252, 244, 0.2) 56%, transparent 70%) no-repeat;
  background-size: 260% 100%;
  mix-blend-mode: screen;
}
.style-cel.is-turning .style-cel__glare { animation: cel-glare 0.9s ease-out 0.1s both; }
@keyframes cel-glare {
  0% { opacity: 0; background-position: 120% 0; }
  30% { opacity: 1; }
  100% { opacity: 0; background-position: -60% 0; }
}
.style-cel.is-flipped.is-turning .style-cel__back-tag { animation: tag-slam 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) 0.62s both; }
@keyframes tag-slam {
  0% { opacity: 0; transform: scale(2.2) rotate(-14deg); }
  100% { opacity: 1; transform: scale(1) rotate(-3deg); }
}
@media (max-width: 479px) { .flip-hint__label { display: none; } .flip-hint { padding: 5px; } }
.style-cel__caption { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-height: 56px; padding: 9px 2px; }
.style-cel__name { font-weight: 600; font-size: 0.95rem; line-height: 1.25; color: #1A1714; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.style-cel__cut { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: #675F55; white-space: nowrap; }
@media (max-width: 479px) { .style-cel__cut { display: none; } }
.style-cel { transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease; }
.style-cel:hover { --r: 0deg; --y: -8px; z-index: 2; }
@media (hover: hover) and (pointer: fine) {
  .style-cel:hover { transition-duration: 0.12s, 0.35s; }
  .style-cel:hover .style-cel__side { box-shadow: 0 1px 0 var(--contact), var(--hard-x, 7px) 16px 0 var(--hard); }
}

/* ---------- Frames strip (store screenshots) ---------- */
.frames {
  position: relative;
  padding-block: 56px 40px;
}
.frames__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.frames__count { color: var(--ink); }
.swipe-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 26px calc(var(--gutter) + 8px) 34px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.swipe-row::-webkit-scrollbar { display: none; }
.swipe-row > * { scroll-snap-align: center; flex: none; }
.frame-cel {
  margin: 0;
  width: min(74vw, 300px);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
  --tilt: -2deg;
  transform: rotate(var(--tilt));
}
.frame-cel:nth-child(2) { --tilt: 1.6deg; }
.frame-cel:nth-child(3) { --tilt: -1deg; }
.frame-cel:nth-child(4) { --tilt: 2.2deg; }
.frame-cel:nth-child(5) { --tilt: -1.8deg; }
.frame-cel:nth-child(6) { --tilt: 1.2deg; }
.frame-cel:hover { transform: translateY(-10px) rotate(0deg); z-index: 5; }

/* Desktop: the six cels fan across the full width, overlapping like a pile on the light table. */
@media (min-width: 1100px) {
  .frames__count { display: none; }
  .swipe-row {
    overflow: visible;
    justify-content: center;
    gap: 0;
    padding: 40px var(--gutter) 30px;
    max-width: 1560px;
    margin-inline: auto;
  }
  .swipe-row > .frame-cel { width: clamp(160px, 14.6vw, 240px); margin-inline: 8px; }
  .frame-cel { --tilt-k: 1.6; }
  .frame-cel:nth-child(n) { transform: rotate(calc(var(--tilt) * 1.6)); }
  .frame-cel:hover { transform: translateY(-14px) rotate(0deg); }
  .frame-cel:nth-child(odd) { translate: 0 18px; }
}

/* ---------- Legal / support sheets ---------- */
.sheet-wrap { padding-block: 64px 64px; }
@media (min-width: 640px) { .sheet-wrap { padding-block: 88px 96px; } }
.sheet-hero {
  max-width: 860px;
  margin: 0 auto 40px;
  display: grid;
  gap: 32px;
  align-items: end;
}
.sheet-hero__title { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; min-width: 0; }
.display--sheet { overflow-wrap: break-word; max-width: 100%; }
@media (max-width: 639px) { .display--sheet { hyphens: auto; -webkit-hyphens: auto; } }
@media (max-width: 639px) {
  .display--sheet { font-size: clamp(2rem, 9.6vw, 3rem); }
  :lang(de) .display--sheet, :lang(ru) .display--sheet, :lang(uk) .display--sheet, :lang(pl) .display--sheet, :lang(nl) .display--sheet { font-size: clamp(1.8rem, 8.4vw, 2.6rem); }
  :lang(ja) .display--sheet, :lang(zh-Hans) .display--sheet, :lang(zh-Hant) .display--sheet, :lang(ko) .display--sheet { font-size: 1.9rem; word-break: keep-all; }
}
.sheet-hero__meta { margin: 0; }
.sheet-hero__cel { width: min(62vw, 260px); justify-self: end; transform: rotate(3deg); }
.sheet-hero--art .display--sheet { font-size: clamp(3.6rem, 12vw, 8.4rem); }
:lang(ru) .sheet-hero--art .display--sheet, :lang(uk) .sheet-hero--art .display--sheet { font-size: clamp(2.4rem, 5.6vw, 5.2rem); }
:lang(ja) .sheet-hero--art .display--sheet, :lang(ar) .sheet-hero--art .display--sheet, :lang(ko) .sheet-hero--art .display--sheet, :lang(zh-Hans) .sheet-hero--art .display--sheet, :lang(zh-Hant) .sheet-hero--art .display--sheet { font-size: clamp(2.8rem, 8vw, 5.6rem); }
.sheet-hero__cta { margin-top: 6px; }
@media (min-width: 820px) {
  .sheet-hero--art { grid-template-columns: minmax(0, 1fr) 340px; }
  .sheet-hero__cel { width: 100%; margin-bottom: -96px; margin-inline-end: -40px; z-index: 2; }
}
@media (max-width: 819px) {
  .sheet-hero__cel { width: min(76vw, 300px); justify-self: center; transform: rotate(-3deg); }
}
.wrap--sheet { max-width: 980px; position: relative; }
.sheet {
  --peg-d: 14px;
  max-width: 860px;
  margin-inline: auto;
  padding: 60px 24px 32px;
}
@media (min-width: 640px) { .sheet { padding: 72px 72px 52px; } }
/* Legacy in-card head (other pages that still carry it). */
.sheet__head {
  max-width: 68ch;
  margin: 0 auto 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.legal {
  max-width: 68ch;
  font-size: 1.0625rem;
  line-height: 1.72;
  color: var(--ink);
  counter-reset: legal;
}
.legal section { margin-top: 44px; }
.legal section:first-child { margin-top: 0; }
.legal h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 1.75rem;
  line-height: 1.12;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 14px;
  counter-increment: legal;
}
:lang(ja) .legal h2, :lang(zh-Hans) .legal h2, :lang(zh-Hant) .legal h2, :lang(ko) .legal h2,
:lang(ar) .legal h2, :lang(he) .legal h2, :lang(hi) .legal h2, :lang(th) .legal h2 {
  font-family: "Myora Display", "Hiragino Sans", "Noto Sans CJK JP", "PingFang SC", "Apple SD Gothic Neo", "Noto Kufi Arabic", "Geeza Pro", "Arial Hebrew", "Kohinoor Devanagari", "Thonburi", sans-serif;
  font-weight: 800;
  font-size: 1.45rem;
  line-height: 1.35;
}
:lang(ar) .legal h2, :lang(he) .legal h2 { font-size: 1.9rem; line-height: 1.3; }
:lang(ar) .legal h3, :lang(ar) .faq-item h3 { font-weight: 700; font-size: 1.2rem; }
.legal--numbered h2::before {
  content: counter(legal, decimal-leading-zero);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--accent-text);
}
.legal h3 {
  font-family: var(--font-body);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 24px 0 6px;
}
.legal p { margin: 0 0 14px; color: var(--ink); }
.legal ul { margin: 0 0 16px; padding-inline-start: 1.3em; }
.legal ul ul { margin: 8px 0 4px; }
.legal li { margin-bottom: 8px; padding-inline-start: 0.2em; }
.legal li::marker { color: var(--vermilion); }
.legal a:not(.btn-cta):not(.btn-ghost):not(.ext-link) {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.legal strong, .legal b { font-weight: 600; }
.legal .ext-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5em;
  height: 1.5em;
  margin-inline-start: 2px;
  vertical-align: -0.3em;
  color: var(--accent-text);
  border-radius: 2px;
}
.legal .ext-link .hi { width: 1.1em; height: 1.1em; }
.legal .ext-link:hover { background: var(--surface); }
[dir="rtl"] .legal .ext-link .hi { transform: scaleX(-1); }

.faq-item {
  display: grid;
  grid-template-columns: 2.6em minmax(0, 1fr);
  gap: 4px 12px;
  padding: 20px 0;
  border-top: 1px dashed var(--line-strong);
}
.faq-item:last-child { border-bottom: 1px dashed var(--line-strong); }
@media (max-width: 479px) {
  .faq-item { grid-template-columns: minmax(0, 1fr); }
}
.faq-item__no { color: var(--accent-text); font-size: 0.78rem; padding-top: 3px; }
.faq-item h3 { margin-top: 0; font-size: 1.2rem; margin-bottom: 8px; }
.faq-item p { margin-bottom: 0; color: var(--ink-soft); }
.sheet__back {
  max-width: 68ch;
  font-size: 1.0625rem;
  margin: 40px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
}
.back-link .hi { transform: scaleX(-1); }
[dir="rtl"] .back-link .hi { transform: none; }
.back-link:hover span { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Share page ---------- */
.share { position: relative; padding-block: 56px 72px; }
.share__grid {
  position: relative;
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 960px) {
  .share { padding-block: 72px 104px; }
  .share__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
}
.share-stage { width: min(100%, 620px); margin-inline: auto; }
.share-stage .cel { transform: rotate(-1.4deg); }
.share-image { position: relative; }
.share-image #transformed-image,
.share-image #original-image { transition: opacity 0.3s ease; }
.share-image #original-image {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}
.share-image #original-image img { width: 100%; height: 100%; object-fit: contain; }
.share-image img { display: block; width: 100%; height: auto; }
.watermark {
  position: absolute;
  z-index: 3;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 40px 14px 12px;
  background: linear-gradient(to top, rgba(10, 8, 6, 0.55), rgba(10, 8, 6, 0));
  pointer-events: none;
  direction: ltr;
}
.watermark img { height: 26px; width: auto; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35)); }
.watermark span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.share-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 30px;
}
@media (min-width: 480px) {
  .share-actions { grid-template-columns: auto 1fr; align-items: center; }
}
.flip {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 3px 0 var(--hard);
}
.flip__opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-height: 44px;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.flip__opt[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.flip__opt .hi { width: 18px; height: 18px; }
.cel__style { color: #1A1714; font-family: var(--font-body); font-weight: 600; letter-spacing: 0.02em; text-transform: none; font-size: 0.8rem; }
.share-error { text-align: center; padding: 40px 0; color: var(--ink-muted); }
.share-promo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.display--share { font-size: clamp(3.2rem, 7.4vw, 7.2rem); }
:lang(ja) .display--share, :lang(zh-Hans) .display--share, :lang(zh-Hant) .display--share, :lang(ko) .display--share { font-size: clamp(2.2rem, 3.8vw, 3.6rem); }
:lang(ru) .display--share, :lang(uk) .display--share { font-size: clamp(2.4rem, 4.8vw, 4.8rem); }

/* ---------- Share-link error: torn polaroid ---------- */
.error-stage { position: relative; padding-block: 64px 88px; flex: 1 0 auto; }
.error-stage__grid { position: relative; display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) {
  .error-stage { padding-block: 96px 120px; }
  .error-stage__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 96px); }
}
.torn-cel { width: min(88%, 480px); margin-inline: auto !important; transform: rotate(-3deg); }
.torn-cel__window { aspect-ratio: 1; }
.torn-cel__window {
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(26, 23, 20, 0.07) 31px 32px),
    #F1EADB;
}
.torn-cel__window .torn-cel__photo {
  position: absolute; inset: 0; display: block; overflow: hidden;
  clip-path: polygon(0 0, 60% 0, 55% 9%, 62% 17%, 53% 28%, 58% 38%, 50% 49%, 57% 58%, 48% 69%, 54% 79%, 46% 90%, 51% 100%, 0 100%);
  filter: drop-shadow(3px 0 0 rgba(21, 19, 15, 0.2));
}
.torn-cel__photo img { position: absolute; top: 0; left: -24%; width: 200% !important; max-width: none; height: 100% !important; object-fit: cover; object-position: left center; filter: grayscale(1) contrast(0.95) brightness(1.04); }
.torn-cel__stamp { position: absolute; right: 12%; top: 38%; width: 84px !important; height: 84px !important; transform: rotate(-12deg); opacity: 0.92; border-radius: 6px; }
[dir="rtl"] .torn-cel { transform: rotate(3deg); }

.error-copy { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.display--error { font-size: clamp(3.2rem, 8vw, 7.4rem); }
:lang(ja) .display--error, :lang(zh-Hans) .display--error, :lang(zh-Hant) .display--error, :lang(ko) .display--error { font-size: clamp(2.2rem, 4vw, 3.8rem); }
:lang(ru) .display--error, :lang(uk) .display--error { font-size: clamp(2.6rem, 5vw, 4.6rem); }
.error-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
@media (max-width: 479px) {
  .error-actions { flex-direction: column; align-self: stretch; }
  .error-actions > * { width: 100%; }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-block: 32px 36px;
}
.site-footer__row {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}
@media (min-width: 900px) {
  .site-footer__row { grid-template-columns: auto 1fr auto; justify-items: start; align-items: center; text-align: start; column-gap: 40px; }
  .site-footer nav { justify-content: center; justify-self: center; }
}
.site-footer nav { display: grid; grid-template-columns: auto; justify-content: center; gap: 2px; font-size: 0.95rem; }
@media (min-width: 900px) { .site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 24px; } }
.site-footer nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--vermilion); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.site-footer nav a { color: var(--ink-muted); text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.site-footer nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.site-footer__copy { margin: 0; letter-spacing: 0.1em; font-size: 0.72rem; white-space: nowrap; }
:lang(ar) .site-footer__copy, :lang(he) .site-footer__copy { font-family: var(--font-mono); text-transform: uppercase; }

/* ---------- Legacy classes (generic layouts/error_page inside this layout) ---------- */
.site-main .card {
  width: min(42rem, calc(100% - 2 * var(--gutter)));
  margin: 40px auto 48px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-cel);
  box-shadow: var(--shadow-cel);
  overflow: hidden;
}
.site-main .card-header { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.site-main .card-header h4 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; }
.site-main .card-header svg { width: 24px; height: 24px; color: var(--error); flex: none; }
.site-main .card-body { padding: 18px; }
.site-main .card-body p { margin: 0 0 12px; }
.site-main .card-body hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.site-main .card-footer { padding: 14px 18px; border-top: 1px solid var(--line); }
.site-main .text-screen-text-secondary { color: var(--ink-muted); }
.site-main .text-sm { font-size: 0.875rem; }
.site-main .btn {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 18px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card);
  color: var(--ink); text-decoration: none; font-weight: 600;
}
.site-main .btn:hover { background: var(--surface); }

/* ---------- Hero on a repeat visit this session: a short settle, no slate ---------- */
@media (prefers-reduced-motion: no-preference) {
  html:not(.intro-played) .cel-deck { animation: cel-settle 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
  html:not(.intro-played) .cel-stack .ink-stamp { animation: stamp-in 0.5s 0.35s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
}
@keyframes cel-settle { from { transform: rotate(3deg) translateY(22px); } to { transform: none; } }
@keyframes stamp-in { from { rotate: 15deg; scale: 1.9; opacity: 0; } to { opacity: 1; } }

/* =====================================================================
   CINEMA: slate entrance, ink pass, dealt cels, film strip, stamp press.
   Every default state below is the finished, static page; motion only
   ever runs from html.intro (slate, once per session) or data-scene
   (set by a live controller). Reduced motion: the global kill at the end.
   ===================================================================== */

/* ---------- Gate weave: the grain layer jitters like film in a gate ---------- */
@media (prefers-reduced-motion: no-preference) {
  body.site::before { inset: -64px; animation: gate-weave 0.72s steps(1) infinite; will-change: transform; }
}
@keyframes gate-weave {
  0% { transform: translate(0, 0); }
  17% { transform: translate(-23px, 11px); }
  33% { transform: translate(17px, -29px); }
  50% { transform: translate(-9px, 31px); }
  67% { transform: translate(29px, 5px); }
  83% { transform: translate(-31px, -17px); }
}

/* ---------- Slate intro (html.intro only; ~1.2s; any input skips) ---------- */
.slate-intro { display: none; }
html.intro .slate-intro {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #15130F;
  direction: ltr;
  animation: slate-lift 0.44s 0.5s cubic-bezier(0.72, 0, 0.24, 1) forwards;
}
html.intro body { overflow: hidden; }
html.intro body.site > .site-main { z-index: 40; }
.slate-intro__edge {
  position: absolute;
  inset-inline: 0;
  bottom: -10px;
  height: 10px;
  background: var(--vermilion);
  box-shadow: 0 18px 40px rgba(21, 19, 15, 0.35);
}
.slate {
  position: relative;
  width: min(84vw, 460px);
  width: clamp(280px, 42vw, 640px);
  max-width: 86vw;
  animation: slate-in 0.22s cubic-bezier(0.16, 1, 0.3, 1) both, slate-thud 0.16s 0.3s ease-out;
}
.slate__stick {
  position: relative;
  height: 46px;
  border-radius: 4px 4px 0 0;
  background: repeating-linear-gradient(-58deg, #F1EADB 0 22px, #E63B2E 22px 44px);
  border: 2px solid #F1EADB;
  transform-origin: 2px 100%;
  transform: rotate(-26deg);
  animation: slate-clap 0.34s cubic-bezier(0.55, 0, 0.9, 0.4) forwards;
}
.slate__board, .slate__stick { isolation: isolate; }
.slate__board {
  position: relative;
  margin-top: 6px;
  background-image: url(/assets/myora_site/paper_grain-bd6c0a7a241a3e87ee1c3db7926bcdd69d2324892fe4a08421f36b12996e62f4.png);
  background-size: 128px 128px;
  background-blend-mode: soft-light;
  padding: 58px 22px 20px;
  border: 2px solid #F1EADB;
  border-radius: 4px;
  background: #221F1A;
  color: #F1EADB;
}
.slate__board::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 44px;
  background: repeating-linear-gradient(-58deg, #15130F 0 22px, #F1EADB 22px 44px);
  border-bottom: 2px solid #F1EADB;
}
/* Peg-bar holes, like every cel in the studio. */
.slate__board::after {
  content: "";
  position: absolute;
  inset: auto 24px 12px;
  height: 14px;
  background:
    radial-gradient(circle at 7px 7px, #15130F 5px, rgba(241, 234, 219, 0.6) 5.6px, transparent 6.4px) left center / 14px 14px no-repeat,
    radial-gradient(circle at 7px 7px, #15130F 5px, rgba(241, 234, 219, 0.6) 5.6px, transparent 6.4px) right center / 14px 14px no-repeat,
    linear-gradient(#15130F, #15130F) center / 48px 12px no-repeat;
  border-radius: 999px;
}
.slate__board { padding-bottom: 44px; }
.slate__wordmark { display: block; height: clamp(52px, 6vw, 84px); width: auto; margin: 6px 0 22px; }
.slate__rows { display: grid; grid-template-columns: 1.3fr 1fr 1fr; border-top: 1.5px solid rgba(241, 234, 219, 0.5); }
.slate__rows span { display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 2px; }
.slate__rows span + span { border-left: 1.5px solid rgba(241, 234, 219, 0.5); }
.slate__rows small { font: 500 0.64rem/1 var(--font-mono); letter-spacing: 0.18em; text-transform: uppercase; color: #BDB3A2; }
.slate__rows b { font: 400 clamp(2rem, 3.6vw, 3.4rem)/1 var(--font-display); letter-spacing: 0.02em; }
.slate__rows b[lang="ja"] { font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; font-weight: 700; color: var(--vermilion); }
@keyframes slate-in { from { transform: scale(0.94) translateY(14px); } to { transform: none; } }
@keyframes slate-clap {
  0%, 30% { transform: rotate(-26deg); }
  88% { transform: rotate(0deg); }
  94% { transform: rotate(-2.5deg); }
  100% { transform: rotate(0deg); }
}
@keyframes slate-thud { 0% { translate: 0 0; } 40% { translate: 0 5px; } 100% { translate: 0 0; } }
@keyframes slate-lift { to { transform: translateY(calc(-100% - 40px)); visibility: hidden; } }

/* Headline inks in word by word as the slate lifts (RTL wipes from the right). */
.ink-words { display: inline; }
.ink-word { display: inline-block; }
.ink-word > span { display: inline-block; }
html.intro .ink-word > span {
  -webkit-mask: url(/images/site/fx/brush-wipe.svg) 100% 0 / 300% 100% no-repeat;
  mask: url(/images/site/fx/brush-wipe.svg) 100% 0 / 300% 100% no-repeat;
  animation: ink-in 0.46s calc(540ms + var(--i) * 80ms) cubic-bezier(0.55, 0, 0.2, 1) both;
}
@keyframes ink-in {
  from { -webkit-mask-position: 100% 0; mask-position: 100% 0; transform: translateX(-0.06em); }
  to { -webkit-mask-position: 0% 0; mask-position: 0% 0; transform: none; }
}
[dir="rtl"] .ink-word > span { animation-name: ink-in-rtl !important; }
html.intro[dir="rtl"] .ink-word > span {
  -webkit-mask: url(/images/site/fx/brush-wipe-rtl.svg) 0% 0 / 300% 100% no-repeat;
  mask: url(/images/site/fx/brush-wipe-rtl.svg) 0% 0 / 300% 100% no-repeat;
}
@keyframes ink-in-rtl {
  from { -webkit-mask-position: 0% 0; mask-position: 0% 0; transform: translateX(0.06em); }
  to { -webkit-mask-position: 100% 0; mask-position: 100% 0; transform: none; }
}
html.intro .hero .ora-def,
html.intro .hero__body { animation: rise-in 0.5s 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes rise-in { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Cels drop onto the table one by one, back to front: a whoosh (blur), the shadow lands, a small bounce.
   The top (LCP) cel only lifts off the table and lands; it never leaves the frame. */
html.intro .deck-card:not(.is-dragging) { animation: cel-drop 0.52s cubic-bezier(0.25, 0.9, 0.3, 1.18) both; }
html.intro .deck-card[data-depth="3"] { animation-delay: 0.4s; }
html.intro .deck-card[data-depth="2"] { animation-delay: 0.5s; }
html.intro .deck-card[data-depth="1"] { animation-delay: 0.6s; }
html.intro .deck-card[data-depth="0"]:not(.is-dragging) { animation: cel-land 0.5s 0.7s cubic-bezier(0.25, 0.9, 0.3, 1.18) both; }
@keyframes cel-drop {
  from { translate: 60px -80vh; rotate: -22deg; filter: blur(3px); box-shadow: 0 90px 60px rgba(21, 19, 15, 0.18); }
  45% { filter: blur(0); }
  to { box-shadow: var(--shadow-cel); }
}
@keyframes cel-land {
  from { translate: -10px -56px; rotate: 7deg; scale: 1.1; box-shadow: 0 70px 50px rgba(21, 19, 15, 0.2); }
  to { box-shadow: var(--shadow-cel); }
}

/* The MY stamp slams last: an ink splat bursts under it and the whole hero takes the hit. */
.ink-splat {
  position: absolute;
  inset: -18%;
  z-index: -1;
  border: 3px solid var(--vermilion);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
html.intro .cel-stack .ink-stamp { animation: stamp-slam 0.34s 0.98s cubic-bezier(0.5, 0, 0.75, 0) both; }
html.intro .ink-splat { animation: splat 0.42s 1.3s cubic-bezier(0.16, 1, 0.3, 1) both; }
html.intro .hero { animation: screen-shake 0.36s 1.3s linear; }
@keyframes stamp-slam {
  from { scale: 2.4; rotate: 22deg; opacity: 0; }
  30% { opacity: 1; }
  to { scale: 1; rotate: 0deg; opacity: 1; }
}
@keyframes splat { from { scale: 0.4; opacity: 0.9; border-width: 6px; } to { scale: 1.7; opacity: 0; border-width: 1px; } }
@keyframes screen-shake {
  0%, 100% { translate: 0 0; }
  15% { translate: -7px 5px; }
  30% { translate: 6px -4px; }
  45% { translate: -4px 3px; }
  60% { translate: 3px -1px; }
  80% { translate: -1px 1px; }
}
/* Film gate: flicker and a scratch while the slate is up. */
html.intro .slate-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 22%, rgba(241, 234, 219, 0.16) 22.1% 22.25%, transparent 22.4% 71%, rgba(241, 234, 219, 0.09) 71.1% 71.2%, transparent 71.3%),
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55));
  animation: gate-flicker 0.5s steps(1) infinite;
}
@keyframes gate-flicker {
  0% { opacity: 1; translate: 0 0; }
  20% { opacity: 0.6; translate: 3px 0; }
  40% { opacity: 1; translate: -2px 0; }
  60% { opacity: 0.8; translate: 5px 0; }
  80% { opacity: 1; translate: -4px 0; }
}
@keyframes table-thud { 0%, 100% { translate: 0 0; } 35% { translate: 0 4px; } 70% { translate: 0 -1px; } }

/* ---------- The ink pass (pinned, scroll-scrubbed; drag to compare) ---------- */
.reveal { position: relative; border-top: 1px solid var(--line); }
/* Reserve the pinned track from first paint (html.js is set in <head>), so nothing below shifts and
   far-away lazy images are not pulled in early; the controller confirms it with .is-scrubbed. */
.reveal.is-scrubbed { height: calc(var(--pairs, 3) * 85vh + 100vh); height: calc(var(--pairs, 3) * 85svh + 100svh); }
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { height: calc(var(--pairs, 3) * 85vh + 100vh); height: calc(var(--pairs, 3) * 85svh + 100svh); }
  html.js .reveal .reveal__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; padding-block: 40px 28px; }
}
.reveal__sticky { position: relative; display: flex; align-items: center; min-height: 100vh; min-height: 100svh; padding-block: 64px 48px; overflow: hidden; }
.reveal.is-scrubbed .reveal__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; padding-block: 40px 28px; }
/* Light table: warm light from under the cel. */
.reveal__sticky::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(60% 55% at 70% 55%, rgba(255, 244, 222, 0.75), transparent 70%);
}
[dir="rtl"] .reveal__sticky::before { background: radial-gradient(60% 55% at 30% 55%, rgba(255, 244, 222, 0.75), transparent 70%); }
@media (prefers-color-scheme: dark) {
  .reveal__sticky::before { background: radial-gradient(60% 55% at 70% 55%, rgba(255, 214, 160, 0.10), transparent 70%); }
}
.reveal__grid {
  position: relative;
  display: grid;
  grid-template-areas: "title" "stage" "cta";
  gap: 22px;
  align-items: center;
}
.reveal__title { grid-area: title; max-width: 10ch; }
.reveal__stage { grid-area: stage; justify-self: center; width: min(100%, calc(100svh - 330px), 600px); min-width: min(100%, 260px); }
.reveal__cta { grid-area: cta; display: flex; flex-direction: column; gap: 20px; }
.reveal__reel { display: flex; gap: 10px; }
.reveal__thumb {
  width: 64px;
  aspect-ratio: 1;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #F6F1E6;
  cursor: pointer;
  opacity: 0.55;
  transform: rotate(-2deg);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}
.reveal__thumb:nth-child(even) { transform: rotate(2deg); }
.reveal__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.reveal__thumb:hover { opacity: 0.85; }
.reveal__thumb.is-current { opacity: 1; transform: translateY(-4px) rotate(0deg); box-shadow: 0 0 0 2px var(--vermilion), 3px 4px 0 var(--hard); }
@media (max-width: 959px) {
  .reveal__cta { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
  .reveal__thumb { width: 48px; }
  .reveal.is-scrubbed .reveal__cta .store-badge img { height: 44px; }
}
@media (min-width: 960px) {
  .reveal__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "title stage" "cta stage";
    grid-template-rows: 1fr 1fr;
    column-gap: clamp(32px, 5vw, 88px);
    row-gap: 34px;
  }
  .reveal__title { align-self: end; }
  .reveal__cta { align-self: start; }
  .reveal__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .reveal__stage { width: min(100%, calc(100svh - 110px), 760px); }
}
.reveal__cel { transform: rotate(-1.5deg); }
.reveal__window { aspect-ratio: 1; --ink: 50; --paint: 50; touch-action: pan-y; container-type: inline-size; }
.reveal__pair { position: absolute; inset: 0; margin: 0; visibility: hidden; transform: scale(calc(1 + var(--ink) * 0.0004)); transform-origin: 50% 40%; }
.reveal__pair.is-current { visibility: visible; }
.reveal__pair img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Dry-brush edge: a solid block up to the brush, then the brush SVG (bristle gaps, specks, drips). */
.reveal__ink,
.reveal__paint {
  --edge: 110px;
  /* P: the brush's solid edge; 0 = fully off the left, 100 = fully past the right. */
  --p: calc(var(--at) * (1cqw + var(--edge) / 100) - var(--edge) * 0.44);
  -webkit-mask-image: url(/images/site/fx/brush-edge.svg), linear-gradient(#000, #000);
  mask-image: url(/images/site/fx/brush-edge.svg), linear-gradient(#000, #000);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: var(--edge) 100%, max(0px, calc(var(--p) - var(--edge) * 0.55)) 100%;
  mask-size: var(--edge) 100%, max(0px, calc(var(--p) - var(--edge) * 0.55)) 100%;
  -webkit-mask-position: calc(var(--p) - var(--edge) * 0.56) 0, 0 0;
  mask-position: calc(var(--p) - var(--edge) * 0.56) 0, 0 0;
}
.reveal__ink { --at: var(--ink); filter: grayscale(1) contrast(2.6) brightness(1.3) sepia(0.18); }
.reveal__ink--art { filter: none; }
.reveal__paint { --at: var(--paint); --edge: 150px; filter: saturate(1.06); }
[dir="rtl"] .reveal__ink,
[dir="rtl"] .reveal__paint {
  -webkit-mask-image: url(/images/site/fx/brush-edge-rtl.svg), linear-gradient(#000, #000);
  mask-image: url(/images/site/fx/brush-edge-rtl.svg), linear-gradient(#000, #000);
  -webkit-mask-position: calc(100cqw - var(--p) - var(--edge) * 0.44) 0, 100% 0;
  mask-position: calc(100cqw - var(--p) - var(--edge) * 0.44) 0, 100% 0;
}
/* Handle: a vermilion ink drop riding the brush edge; it nudges while nobody has touched it yet. */
.reveal__nib {
  position: absolute;
  z-index: 3;
  top: 50%;
  inset-inline-start: clamp(26px, var(--ink) * 1%, 100% - 26px);
  width: 48px;
  height: 48px;
  margin-top: -24px;
  margin-inline-start: -24px;
  border-radius: 50%;
  background: #F6F1E6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1714' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7C9 7 4 10.7 4 12C4 13.3 9 17 9 17'/%3E%3Cpath d='M15 7C15 7 20 10.7 20 12C20 13.3 15 17 15 17'/%3E%3C/svg%3E") center / 24px 24px no-repeat;
  border: 2px solid #1A1714;
  box-shadow: 3px 3px 0 var(--vermilion);
  pointer-events: none;
  transition: scale 0.15s ease, box-shadow 0.15s ease;
}
.reveal__window.is-moving .reveal__nib { scale: 1.12; }
.reveal__window.is-idle .reveal__nib { animation: nib-nudge 1.6s 0.4s ease-in-out infinite; }
@keyframes nib-nudge { 0%, 60%, 100% { translate: 0 0; } 70% { translate: 14px 0; } 80% { translate: 2px 0; } 88% { translate: 9px 0; } }
[dir="rtl"] .reveal__window.is-idle .reveal__nib { animation-name: nib-nudge-rtl; }
@keyframes nib-nudge-rtl { 0%, 60%, 100% { translate: 0 0; } 70% { translate: -14px 0; } 80% { translate: -2px 0; } 88% { translate: -9px 0; } }
/* Sparks: ink specks and vermilion glints thrown off the brush while it moves. */
.reveal__spark {
  position: absolute;
  z-index: 2;
  top: -10%;
  bottom: -10%;
  inset-inline-start: calc(var(--ink) * 1% - 6px);
  width: 64px;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle, #E63B2E 0 2.4px, transparent 3px) 0 0 / 38px 52px,
    radial-gradient(circle, #1A1714 0 1.6px, transparent 2.2px) 13px 21px / 29px 37px,
    radial-gradient(circle, #1A1714 0 2.6px, transparent 3.2px) 24px 9px / 43px 61px;
  transition: opacity 0.25s ease;
  -webkit-mask-image: linear-gradient(90deg, #000 20%, transparent);
  mask-image: linear-gradient(90deg, #000 20%, transparent);
}
[dir="rtl"] .reveal__spark { -webkit-mask-image: linear-gradient(270deg, #000 20%, transparent); mask-image: linear-gradient(270deg, #000 20%, transparent); }
.reveal__window.is-moving .reveal__spark { opacity: 1; animation: sparks 0.5s linear infinite; }
@keyframes sparks { to { background-position: 0 104px, 13px 95px, 24px 131px; } }
.reveal__range {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
  -webkit-appearance: none;
  appearance: none;
}
.reveal__window:has(.reveal__range:focus-visible) .reveal__nib { outline: 3px solid var(--ink-true); outline-offset: 3px; }
.reveal__window .cel-tag { bottom: 12px; transition: opacity 0.2s ease; }
.reveal__tag-anime { inset-inline-start: 12px; opacity: calc((var(--paint) - 88) * 0.1); }
.reveal__tag-photo { inset-inline-end: 12px; opacity: min(1, calc((90 - var(--ink)) * 0.15)); }
.reveal__now { margin: 0; color: var(--accent-text); min-height: 1.84em; display: flex; align-items: flex-end; }
@media (min-width: 960px) { .reveal__now { font-size: clamp(2.4rem, 4.4vw, 4.2rem); min-height: 0; } }
/* Finished cut: a vermilion frame flashes on the gate and the ANIME tag pops. */
.reveal__window::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  box-shadow: inset 0 0 0 0 var(--vermilion);
  opacity: 0;
}
.reveal__window.is-done::after { animation: done-flash 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal__window.is-done .reveal__tag-anime { animation: tag-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes done-flash {
  0% { opacity: 1; box-shadow: inset 0 0 0 14px var(--vermilion); background: rgba(230, 59, 46, 0.22); }
  100% { opacity: 0; box-shadow: inset 0 0 0 0 var(--vermilion); background: transparent; }
}
@keyframes tag-pop { from { transform: scale(1.8) rotate(-8deg); } to { transform: none; } }
/* Next cut: the cel is pulled off the pegs and the next one snaps on. */
.reveal__cel.is-swapping { animation: cel-swap 0.42s cubic-bezier(0.5, 0, 0.2, 1); }
/* In place: lifted straight up off the pegs, the next cel drops back onto them (no sideways travel over the copy). */
@keyframes cel-swap {
  0% { transform: rotate(-1.5deg); opacity: 1; }
  38% { transform: translateY(-34px) rotate(-3deg) scale(0.97); opacity: 0; }
  42% { transform: translateY(-34px) rotate(1deg) scale(0.97); opacity: 0; }
  82% { transform: translateY(5px) rotate(-1.8deg); opacity: 1; }
  92% { transform: translateY(-2px) rotate(-1.4deg); }
  100% { transform: rotate(-1.5deg); opacity: 1; }
}
.reveal__cutno { display: inline-block; }
.reveal__cel.is-swapping .reveal__cutno { animation: tick 0.3s 0.17s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
@keyframes tick { from { transform: translateY(-110%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Scene entrances (data-scene set only by a live controller) ---------- */
/* ora band: the kana is brushed on, left to right, and the text follows. */
.ora-intro[data-scene="pending"] .ora-band__kana { clip-path: inset(-10% 100% -10% 0); }
.ora-intro[data-scene="pending"] .ora-band__text { opacity: 0; }
.ora-intro[data-scene="in"] .ora-band__kana { animation: brush-on 0.9s cubic-bezier(0.65, 0, 0.35, 1) both; }
.ora-intro[data-scene="in"] .ora-band__text { animation: rise-in 0.6s 0.45s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes brush-on { from { clip-path: inset(-10% 100% -10% 0); } to { clip-path: inset(-10% -2% -10% 0); } }

/* Style cels are dealt onto the table. */
.styles__grid[data-scene="pending"] > li { opacity: 0; }
.styles__grid[data-scene="in"] > li { animation: deal 0.62s calc(var(--i, 0) * 65ms) cubic-bezier(0.2, 0.9, 0.3, 1.1) both; }
@keyframes deal {
  from { opacity: 0; translate: 0 -90px; rotate: 9deg; scale: 1.1; }
  45% { opacity: 1; }
  to { opacity: 1; translate: 0 0; rotate: 0deg; scale: 1; }
}
/* Glare follows the pointer across the cel. */
.style-cel .cel__window::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.34), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
@media (hover: hover) and (pointer: fine) {
  .style-cel:hover .cel__window::after { opacity: 1; }
}

/* Closing: the MY stamp comes down hard on the band. */
.closing[data-scene="pending"] .closing__cel,
.closing[data-scene="pending"] .closing__stamp { opacity: 0; }
.closing[data-scene="in"] .closing__cel { animation: closing-deal 0.5s calc(var(--i) * 90ms) cubic-bezier(0.25, 0.9, 0.3, 1.15) both; }
.closing[data-scene="in"] .closing__stamp { animation: stamp-slam 0.32s 0.56s cubic-bezier(0.5, 0, 0.75, 0) both; }
.closing[data-scene="in"] .closing__stamp::before { animation: splat 0.42s 0.86s cubic-bezier(0.16, 1, 0.3, 1) both; }
.closing[data-scene="in"] .closing__grid { animation: screen-shake 0.34s 0.86s linear; }
@keyframes closing-deal { from { opacity: 0; translate: 40px -60vh; scale: 1.1; filter: blur(2px); } 40% { opacity: 1; filter: blur(0); } to { opacity: 1; } }

/* ---------- Store frames as a film strip ---------- */
/* The band sits behind the cels as the row's own background: sprocket holes punched top and bottom. */
.frames { overflow: clip; }
.frames .swipe-row {
  --film: #221F1A;
  --hole: #F1EADB;
  background:
    linear-gradient(90deg, transparent 0 14px, var(--film) 14px 32px) 0 50% / 32px calc(100% - 6px) repeat-x,
    linear-gradient(to bottom, var(--film) 0 7px, var(--hole) 7px 17px, var(--film) 17px calc(100% - 17px), var(--hole) calc(100% - 17px) calc(100% - 7px), var(--film) calc(100% - 7px)) 0 50% / 100% calc(100% - 6px) no-repeat;
  box-shadow: inset 0 3px 0 var(--paper), inset 0 -3px 0 var(--paper);
}
.frames .frame-cel { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5), 6px 8px 0 rgba(0, 0, 0, 0.45); }

/* Pinned strip (phones/tablets, motion allowed): vertical scroll runs the film sideways, 1:1. */
.frames.is-pinned { height: calc(var(--travel, 0px) + 100vh); height: calc(var(--travel, 0px) + 100svh); padding-block: 0; }
.frames.is-pinned .frames__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.frames.is-pinned .swipe-row {
  width: max-content;
  overflow: visible;
  scroll-snap-type: none;
  will-change: transform;
}
.frames.is-pinned .swipe-row { max-width: none; margin: 0; justify-content: flex-start; padding: 26px calc(var(--gutter) + 8px) 34px; gap: 28px; }
.frames.is-pinned .swipe-row > .frame-cel { width: min(80vw, 340px, calc((100svh - 170px) * 0.44)); margin: 0; translate: none; }
/* Frames slide under a resting pointer while the strip runs: no hover lift there, or each one pops as it passes. */
.frames.is-pinned .frame-cel { transition: none; }
.frames.is-pinned .frame-cel:hover { transform: rotate(var(--tilt)); z-index: auto; }
@media (min-width: 1100px) { .frames.is-pinned .frame-cel:hover { transform: rotate(calc(var(--tilt) * 1.6)); } }
/* Scroll-driven strip: a view-timeline on the section moves the film on the compositor, in lockstep with the scroll
   (contain = from the section's top meeting the viewport top to its bottom meeting the viewport bottom). */
.frames.is-css-driven { view-timeline: --film-run block; }
.frames.is-css-driven .swipe-row {
  animation: film-run linear both;
  animation-timeline: --film-run;
  animation-range: contain 0% contain 100%;
}
@keyframes film-run { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(var(--film-x, 0px), 0, 0); } }

/* ---------- CTA stamp press: the impression stays on the button ---------- */
.btn-cta, .store-badge { position: relative; }
.stamp-press {
  position: absolute;
  z-index: 3;
  top: -14px;
  inset-inline-end: -12px;
  width: 36px;
  height: 36px;
  pointer-events: none;
  animation: stamp-press 0.5s cubic-bezier(0.3, 1.5, 0.55, 1) both;
}
.store-badge .stamp-press { top: calc(100% + 4px); inset-inline-end: 4px; width: 28px; height: 28px; }
.stamp-press img { display: block; width: 100%; height: 100%; border-radius: 4px; box-shadow: 2px 2px 0 rgba(21, 19, 15, 0.35); }
@keyframes stamp-press {
  from { transform: rotate(var(--r)) scale(2.6); opacity: 0; }
  40% { opacity: 1; }
  to { transform: rotate(var(--r)) scale(1); opacity: 0.94; }
}
.is-stamped { animation: badge-hit 0.3s 0.12s ease-out; }
@keyframes badge-hit { 0%, 100% { translate: 0 0; } 30% { translate: 0 3px; } 60% { translate: -2px -1px; } }
.btn-cta:active, .store-badge:active { transform: translateY(2px) scale(0.97); }
