/* Duo Party / 双面派 — product, privacy and support pages.
   The print language follows the game and its App Store artwork:
   paper, halftone, two inks out of register, thick ink outlines, the seven-colour spine. */

:root {
  --paper: #F4ECDD;
  --paper-deep: #E9DCC4;
  --paper-shade: #DCCBAE;
  --ink: #1E1B18;
  --ink-soft: #5A5248;
  --stage: #1A1714;
  --tomato: #EE4B2B;
  --pink: #FF7AA8;
  --marigold: #F6B22D;
  --mint: #3DBE8B;
  --violet: #7C5CE0;
  --cobalt: #2F5FD0;
  --teal: #14A3B8;
  --tomato-deep: #C93A1C;

  --display: ui-rounded, "SF Pro Rounded", Nunito, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  --folio: ui-serif, "New York", "Iowan Old Style", "Songti SC", Georgia, serif;
  --label: ui-monospace, "SF Mono", Menlo, "PingFang SC", monospace;

  --stroke: 3px;
  --gutter: clamp(16px, 4vw, 56px);
  --spine: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper) url("img/paper.png") 0 0 / 400px 400px;
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
::selection { background: var(--marigold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The box lid's seven-colour spine, running down the left edge of every page. */
.spine-rail {
  position: fixed; inset: 0 auto 0 0; width: var(--spine); z-index: 30;
  background: linear-gradient(var(--tomato) 0 14.28%, var(--pink) 0 28.57%, var(--marigold) 0 42.85%, var(--mint) 0 57.14%, var(--violet) 0 71.42%, var(--cobalt) 0 85.71%, var(--teal) 0);
}
@media (max-width: 720px) {
  .spine-rail { inset: 0 0 auto 0; width: auto; height: 6px; position: absolute;
    background: linear-gradient(90deg, var(--tomato) 0 14.28%, var(--pink) 0 28.57%, var(--marigold) 0 42.85%, var(--mint) 0 57.14%, var(--violet) 0 71.42%, var(--cobalt) 0 85.71%, var(--teal) 0); }
}

/* Printed halftone fields. */
.halftone {
  background-image: radial-gradient(circle, var(--dot, rgba(30,27,24,.16)) 1.5px, transparent 2.1px);
  background-size: var(--pitch, 9px) var(--pitch, 9px);
}

/* ---------- Masthead ---------- */
.mast {
  position: relative; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter) 0 calc(var(--gutter) + var(--spine));
}
.mast .home {
  font-family: var(--label); font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.mast .home svg { width: 16px; height: 16px; }
.mast .home:hover { text-decoration: underline; }
.mast nav { display: flex; align-items: center; gap: 6px; font-family: var(--label); font-size: 13px; font-weight: 700; letter-spacing: .06em; }
.mast nav a { text-decoration: none; padding: 6px 10px; border-radius: 999px; }
.mast nav a:hover { background: var(--paper-deep); }
.mast nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.mast .lang { border: 2px solid var(--ink); }
@media (max-width: 720px) {
  .mast { padding: 16px var(--gutter) 0; }
  .mast nav .opt { display: none; }
}

/* ---------- Riso headline: two inks, slightly out of register ---------- */
.riso {
  position: relative; margin: 0;
  font-family: var(--display); font-weight: 900; line-height: 1.04; letter-spacing: -0.012em;
}
.riso .under, .riso .top { display: block; }
.riso .under {
  position: absolute; inset: 0; color: var(--under, var(--cobalt));
  transform: translate(var(--rx, 0.04em), var(--ry, 0.035em));
  user-select: none;
}
.riso .top { position: relative; mix-blend-mode: multiply; }
.riso em { font-style: normal; color: var(--accent, var(--tomato)); }
.riso .under em { color: inherit; }
.riso .line { display: block; }

.folio { font-family: var(--folio); font-style: italic; font-weight: 600; }
.label { font-family: var(--label); font-weight: 700; letter-spacing: .1em; font-size: 12px; text-transform: uppercase; }

/* Stickers: thick ink outline, hard offset shadow — the game's own UI language. */
.sticker {
  display: inline-block; border: var(--stroke) solid var(--ink); border-radius: 16px;
  background: var(--paper); box-shadow: 4px 5px 0 var(--ink);
  padding: 8px 16px 9px; font-family: var(--display); font-weight: 900; line-height: 1.15;
}
.sticker small { display: block; font-family: var(--label); font-weight: 700; font-size: 11px; letter-spacing: .1em; opacity: .78; margin-bottom: 2px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px;
  padding: 10px 22px; border: var(--stroke) solid var(--ink); border-radius: 16px;
  font-family: var(--display); font-weight: 900; font-size: 18px; text-decoration: none; color: var(--ink);
  background: var(--paper); box-shadow: 4px 5px 0 var(--ink); cursor: pointer;
  transition: transform .15s cubic-bezier(.2,.8,.2,1), box-shadow .15s cubic-bezier(.2,.8,.2,1);
}
.btn:hover { transform: translate(-1px, -2px); box-shadow: 5px 7px 0 var(--ink); }
.btn:active { transform: translate(3px, 4px); box-shadow: 1px 1px 0 var(--ink); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn.red { background: var(--tomato-deep); color: #fff; }
.btn.blue { background: var(--cobalt); color: #fff; }

/* The App Store slot. Until launch it is a printed "coming soon" stamp, not a dead link.
   At launch: replace the <span class="store-slot"> with an <a class="btn store" href="…">. */
.store-slot {
  display: inline-flex; align-items: center; gap: 12px; min-height: 52px;
  padding: 8px 20px 8px 14px; border: var(--stroke) dashed var(--ink); border-radius: 16px;
  font-family: var(--display); font-weight: 900; font-size: 17px; line-height: 1.15;
  background: repeating-linear-gradient(-45deg, transparent 0 7px, rgba(30,27,24,.06) 7px 9px);
}
.store-slot svg { width: 28px; height: 28px; flex: none; }
.store-slot small { display: block; font-family: var(--label); font-size: 11px; letter-spacing: .1em; font-weight: 700; color: var(--ink-soft); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: center; gap: clamp(16px, 3vw, 48px);
  padding: clamp(28px, 5vw, 64px) var(--gutter) clamp(48px, 7vw, 96px) calc(var(--gutter) + var(--spine));
  min-height: min(860px, calc(100svh - 60px));
}
.hero .copy { position: relative; z-index: 2; }
.hero .wordmark { width: clamp(150px, 15vw, 220px); margin-bottom: clamp(20px, 3vw, 36px); }
.hero h1 { font-size: clamp(46px, 6.2vw, 96px); }
.hero h1.zh { font-size: clamp(48px, 6.6vw, 104px); letter-spacing: 0.01em; }
.hero .lede { font-size: clamp(17px, 1.45vw, 21px); line-height: 1.55; max-width: 34em; margin: clamp(20px, 2.5vw, 32px) 0 28px; color: var(--ink); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }
.hero .facts { margin: 26px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.hero .facts li { font-family: var(--label); font-weight: 700; font-size: 12px; letter-spacing: .08em; padding: 5px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); }

.box-stage { position: relative; aspect-ratio: 1.18; }
.box-stage .sun {
  position: absolute; inset: 6% 4% 2% 8%; border-radius: 50%;
  background-color: var(--marigold); --dot: rgba(30,27,24,.14);
}
.box-stage img { position: absolute; }
.box-stage .closed {
  left: 0; right: 0; top: 18%; width: 100%; transform: rotate(-5deg);
  filter: drop-shadow(0 26px 24px rgba(60,40,20,.28));
  transition: transform .8s cubic-bezier(.2,.9,.2,1), opacity .5s ease .25s;
  cursor: pointer;
}
.box-stage .open {
  left: 12%; width: 76%; top: 0; opacity: 0; transform: translateY(8%) scale(.9) rotate(3deg);
  filter: drop-shadow(0 26px 24px rgba(60,40,20,.28));
  transition: transform .9s cubic-bezier(.2,.9,.2,1) .2s, opacity .4s ease .2s;
}
.box-stage .tear {
  position: absolute; z-index: 3; right: 2%; bottom: 6%; transform: rotate(4deg);
  background: var(--marigold);
}
.box-stage.is-open .closed { transform: translate(-6%, 70%) rotate(-12deg) scale(.86); opacity: 0; pointer-events: none; }
.box-stage.is-open .open { opacity: 1; transform: none; }
.box-stage.is-open .tear { opacity: 0; pointer-events: none; }
.box-stage .tear { transition: opacity .3s; }
.box-stage .note {
  position: absolute; z-index: 3; left: -2%; bottom: 2%; transform: rotate(-3deg);
  font-family: var(--display); font-weight: 900; font-size: 15px; opacity: 0; transition: opacity .4s ease 1s;
}
.box-stage.is-open .note { opacity: 1; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 24px; }
  .box-stage { max-width: 560px; width: 100%; margin: 8px auto 0; }
}
@media (max-width: 520px) {
  .hero h1 { font-size: clamp(40px, 12.5vw, 56px); }
  .hero .actions { flex-direction: column; align-items: stretch; }
  .hero .actions > * { justify-content: center; }
}

/* ---------- Section rhythm ---------- */
.section { position: relative; padding: clamp(64px, 9vw, 128px) var(--gutter) clamp(64px, 9vw, 128px) calc(var(--gutter) + var(--spine)); }
@media (max-width: 720px) { .section { padding-left: var(--gutter); } }
.section-head { max-width: 760px; margin: 0 0 clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: clamp(36px, 4.8vw, 72px); }
.section-head p { font-size: clamp(17px, 1.4vw, 20px); margin: 18px 0 0; max-width: 36em; }
.section-head .folio { font-size: clamp(20px, 2vw, 26px); display: block; margin-bottom: 10px; }

/* ---------- Two sides ---------- */
.sides { background: var(--stage); color: var(--paper); overflow: hidden; }
.sides .riso { --under: var(--tomato); }
.sides .riso .top { mix-blend-mode: normal; color: var(--paper); }
.sides .section-head p { color: #E9DCC4; }
.sides-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(20px, 3vw, 48px); align-items: end; }
.side { position: relative; border-radius: 28px; padding: clamp(20px, 3vw, 40px); }
.side.inner { background-color: var(--tomato); --dot: rgba(30,27,24,.2); }
.side.cover { background-color: var(--cobalt); --dot: rgba(30,27,24,.24); }
.side .screen { border: var(--stroke) solid var(--ink); background: #000; overflow: hidden; box-shadow: 0 18px 30px rgba(0,0,0,.35); }
.side.inner .screen { border-radius: 26px; max-width: 360px; margin: 0 auto; aspect-ratio: 2007 / 2853; }
.side.cover .screen { border-radius: 24px; aspect-ratio: 2034 / 1398; }
.side .screen img { width: 100%; height: 100%; object-fit: cover; }
.side .sticker { position: absolute; z-index: 2; font-size: clamp(20px, 2vw, 28px); color: #fff; }
.side.inner .sticker { background: var(--tomato-deep); top: -22px; left: -10px; transform: rotate(-3deg); }
.side.cover .sticker { background: var(--cobalt); top: -22px; right: -6px; transform: rotate(2deg); }
.side .mascot { position: absolute; width: clamp(90px, 10vw, 150px); }
.side .mascot { z-index: 1; }
.side.inner .mascot { right: -34px; top: -64px; transform: rotate(10deg); }
.side.cover .mascot { left: -30px; top: -70px; transform: rotate(-9deg); }
@media (max-width: 620px) { .side .mascot { width: 84px; } .side.inner .mascot { right: -8px; top: -58px; } .side.cover .mascot { left: auto; right: -8px; top: auto; bottom: -34px; } }
.side figcaption { margin-top: 18px; font-size: 16px; line-height: 1.5; color: #fff; max-width: 30em; }
.side.inner figcaption { color: var(--ink); font-weight: 600; }
.sides .posture { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.sides .posture li { list-style: none; border-top: 2px solid rgba(244,236,221,.35); padding-top: 14px; font-size: 16px; color: #E9DCC4; }
.sides .posture li b { display: block; font-family: var(--display); font-weight: 900; font-size: 20px; color: var(--paper); margin-bottom: 4px; }
.sides .posture { padding: 0; margin-bottom: 0; }
@media (max-width: 900px) {
  .sides-grid { grid-template-columns: 1fr; gap: 56px; }
  .sides .posture { grid-template-columns: 1fr; }
}

/* ---------- Games: the tray and the stage ---------- */
.games { padding-bottom: 0; }
.tray {
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: clamp(6px, 1vw, 14px);
  padding: 22px clamp(10px, 1.6vw, 22px) 26px; margin: 0;
  border-radius: 28px; background: var(--paper-deep);
  box-shadow: inset 0 3px 0 rgba(30,27,24,.08), inset 0 -2px 0 rgba(255,255,255,.4);
  list-style: none;
}
.tray li { display: contents; }
.tray button {
  appearance: none; border: 0; padding: 0; background: none; cursor: pointer; position: relative;
  transform: rotate(var(--tilt, 0deg)); transition: transform .35s cubic-bezier(.2,.9,.2,1), filter .35s;
  filter: drop-shadow(0 6px 6px rgba(60,40,20,.18));
  border-radius: 14px;
}
.tray button img { width: 100%; height: auto; }
.tray button:hover { transform: translateY(-8px) rotate(var(--tilt, 0deg)); }
.tray button[aria-selected="true"] { transform: translateY(-18px) rotate(0deg) scale(1.04); filter: drop-shadow(0 16px 14px rgba(60,40,20,.28)); }
.tray li:nth-child(odd) button { --tilt: -2deg; }
.tray li:nth-child(even) button { --tilt: 1.5deg; }
@media (max-width: 900px) {
  .tray {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 30%;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1); border-radius: 0; padding: 26px var(--gutter) 22px;
  }
  .tray::-webkit-scrollbar { display: none; }
  .tray button { scroll-snap-align: center; }
}
@media (max-width: 520px) { .tray { grid-auto-columns: 38%; } }

.stages { position: relative; }
.stage {
  position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 64px); align-items: center;
  margin: 0 calc(var(--gutter) * -1) 0 calc((var(--gutter) + var(--spine)) * -1);
  padding: clamp(48px, 6vw, 88px) var(--gutter) clamp(56px, 7vw, 96px) calc(var(--gutter) + var(--spine));
  background-color: var(--c); --dot: rgba(30,27,24,.16);
  color: var(--on, var(--ink));
}
.js .stage[hidden] { display: none; }
.stage + .stage { border-top: var(--stroke) solid var(--ink); }
.js .stage + .stage { border-top: 0; }
@media (max-width: 720px) { .stage { margin-left: calc(var(--gutter) * -1); padding-left: var(--gutter); } }
.stage .folio { font-size: clamp(22px, 2.4vw, 32px); }
.stage h3 { font-size: clamp(44px, 6vw, 88px); margin: 6px 0 0; --under: var(--ink); }
.stage .riso .top { mix-blend-mode: normal; }
/* Text on the seven colour fields: ink where the colour is light, paper where it is deep. */
.field-light { --on: var(--ink); }
.field-light .riso .top { color: var(--ink); }
.field-light .riso .under { color: var(--paper); }
.field-dark-title { --on: var(--ink); }
.field-dark-title .riso .top, .field-dark .riso .top { color: #fff; }
.field-dark-title .riso .under, .field-dark .riso .under { color: var(--ink); }
.field-dark { --on: #fff; }
.stage .tagline { font-family: var(--display); font-weight: 800; font-size: clamp(20px, 2vw, 28px); line-height: 1.3; margin: 22px 0 18px; max-width: 22em; }
.stage .meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.stage .meta li { font-family: var(--label); font-weight: 700; font-size: 13px; letter-spacing: .06em; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 5px 12px; }
.stage dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 16px; max-width: 30em; }
.stage dt { font-family: var(--label); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding-top: 3px; }
.stage dd { margin: 0; }
.stage .extra { margin-top: 18px; font-size: 15px; max-width: 32em; }

/* A pair of real screens: you (inner, portrait) and them (cover, landscape). */
.duo { position: relative; display: grid; grid-template-columns: 0.62fr 1fr; gap: clamp(14px, 2vw, 28px); align-items: center; }
.duo figure { margin: 0; position: relative; }
.duo .shot { border: var(--stroke) solid var(--ink); background: #111; overflow: hidden; box-shadow: 6px 8px 0 var(--ink); }
.duo .you .shot { border-radius: 22px; aspect-ratio: 2007 / 2853; }
.duo .them .shot { border-radius: 20px; aspect-ratio: 2034 / 1398; }
.duo .shot img { width: 100%; height: 100%; object-fit: cover; }
.duo figcaption { margin-top: 12px; font-family: var(--label); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.duo .flip { display: none; }
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  /* On phones, show one face at a time and let the reader turn the phone around. */
  .js .duo { grid-template-columns: 1fr; }
  .js .duo .flip {
    display: inline-flex; justify-self: start; align-items: center; gap: 8px; padding: 8px 14px; min-height: 44px;
    border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink);
    font-family: var(--display); font-weight: 900; font-size: 15px; cursor: pointer;
  }
  .js .duo .flip svg { width: 18px; height: 18px; }
  .js .duo[data-face="you"] .them, .js .duo[data-face="them"] .you { display: none; }
  .js .duo .you .shot { max-width: 300px; }
}
.shots-note { font-size: 13px; margin-top: 16px; opacity: .85; }

/* Shuffle Party: a slot-machine reel of the seven glyphs. */
.stage.shuffle { background-image: repeating-linear-gradient(-45deg, var(--marigold) 0 22px, #F8C35A 22px 44px); }
.reel-wrap { display: grid; justify-items: center; gap: 22px; }
.reel {
  display: flex; gap: 12px; padding: 16px; border: var(--stroke) solid var(--ink); border-radius: 24px; background: var(--paper);
  box-shadow: 6px 8px 0 var(--ink);
}
.reel .win { width: clamp(76px, 9vw, 120px); height: clamp(76px, 9vw, 120px); overflow: hidden; border: var(--stroke) solid var(--ink); border-radius: 16px; background: #fff; position: relative; }
.reel .strip { display: flex; flex-direction: column; animation: spin var(--dur, 2.6s) cubic-bezier(.2,.75,.25,1) infinite; }
.reel .strip img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 18%; }
.reel .win:nth-child(2) .strip { --dur: 3.1s; animation-delay: -.6s; }
.reel .win:nth-child(3) .strip { --dur: 3.7s; animation-delay: -1.3s; }
@keyframes spin { 0%, 12% { transform: translateY(0); } 100% { transform: translateY(-85.714%); } }
.reel-wrap .mascot { width: clamp(160px, 18vw, 240px); }
@media (prefers-reduced-motion: reduce) { .reel .strip { animation: none; } }

/* ---------- On the side of the box ---------- */
.boxside { padding-top: clamp(72px, 9vw, 128px); }
.panel {
  border: var(--stroke) solid var(--ink); border-radius: 28px; overflow: hidden; background: var(--paper);
  box-shadow: 0 30px 40px -24px rgba(60,40,20,.45);
}
.panel .band {
  background: var(--tomato); color: var(--ink); padding: 16px clamp(18px, 3vw, 36px);
  font-family: var(--label); font-weight: 700; letter-spacing: .08em; font-size: clamp(13px, 1.3vw, 16px);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.panel .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel .cell { padding: clamp(20px, 2.6vw, 34px); border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.panel .cell:nth-child(3n) { border-right: 0; }
.panel .cell:nth-last-child(-n+3) { border-bottom: 0; }
.panel .cell svg { width: 40px; height: 40px; margin-bottom: 12px; }
.panel .cell b { display: block; font-family: var(--display); font-weight: 900; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.05; }
.panel .cell span { display: block; margin-top: 6px; font-size: 16px; color: var(--ink-soft); }
.panel .fine { padding: 16px clamp(18px, 3vw, 36px); border-top: 2px solid var(--ink); font-size: 14px; color: var(--ink-soft); background: var(--paper-deep); }
@media (max-width: 820px) {
  .panel .grid { grid-template-columns: 1fr 1fr; }
  .panel .cell, .panel .cell:nth-child(3n), .panel .cell:nth-last-child(-n+3) { border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
  .panel .cell:nth-child(2n) { border-right: 0; }
  .panel .cell:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 420px) {
  .panel .cell { padding: 18px 16px; }
  .panel .cell b { font-size: 24px; }
  .panel .cell span { font-size: 14px; }
}

/* ---------- App Store artwork, fanned like catalogue pages ---------- */
.catalogue { overflow: hidden; }
.pages { display: flex; justify-content: center; gap: 0; padding: 20px 0 40px; }
.pages img {
  width: min(30%, 340px); border-radius: 10px; box-shadow: 0 20px 30px -10px rgba(60,40,20,.4);
  transform: rotate(var(--r)) translateY(var(--y, 0)); margin: 0 -2%;
  transition: transform .4s cubic-bezier(.2,.9,.2,1);
}
.pages img:nth-child(1) { --r: -6deg; --y: 18px; }
.pages img:nth-child(2) { --r: 0deg; z-index: 1; }
.pages img:nth-child(3) { --r: 6deg; --y: 18px; }
.pages img:hover { transform: rotate(0) translateY(-10px); z-index: 2; }
@media (max-width: 620px) {
  .pages { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding: 10px 0 30px; margin: 0 calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .pages img { width: 72%; flex: none; margin: 0; transform: none; scroll-snap-align: center; }
}

/* ---------- Closing ---------- */
.close { text-align: center; padding-bottom: clamp(48px, 6vw, 80px); }
.close .mascot { width: clamp(180px, 20vw, 260px); margin: 0 auto 18px; }
.close h2 { font-size: clamp(36px, 5vw, 72px); display: inline-block; }
.close p { font-size: 18px; margin: 16px auto 26px; max-width: 30em; }
.close .actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }

.foot {
  border-top: var(--stroke) solid var(--ink); background: var(--paper-deep);
  padding: 28px var(--gutter) 34px calc(var(--gutter) + var(--spine));
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 32px; font-size: 15px;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 600; }
.foot .by { color: var(--ink-soft); }
.foot .by a { color: var(--ink); font-weight: 700; }
@media (max-width: 720px) { .foot { padding-left: var(--gutter); flex-direction: column; } }

/* ================================================================
   Reading pages: privacy and support. Clarity first.
   ================================================================ */
.doc-wrap {
  display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 68ch); gap: clamp(28px, 5vw, 80px);
  padding: clamp(28px, 5vw, 64px) var(--gutter) clamp(64px, 8vw, 112px) calc(var(--gutter) + var(--spine));
  justify-content: start;
}
.doc-side { position: sticky; top: 24px; align-self: start; }
.doc-side img.mark { width: 150px; margin-bottom: 18px; }
.doc-side .mascot { width: 130px; margin-top: 24px; }
.doc-side nav ol { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.doc-side nav li { border-bottom: 1px solid var(--paper-shade); }
.doc-side nav a { display: block; padding: 9px 2px; text-decoration: none; font-size: 15px; font-weight: 600; }
.doc-side nav a:hover { color: var(--tomato); }
.doc-side .label { display: block; margin: 0 0 10px; color: var(--ink-soft); }

.doc { font-size: 18px; line-height: 1.72; }
.doc h1 { font-family: var(--display); font-weight: 900; font-size: clamp(34px, 4.4vw, 56px); line-height: 1.08; margin: 0 0 14px; letter-spacing: -0.01em; }
.doc .standfirst { font-size: 19px; color: var(--ink-soft); margin: 0 0 8px; }
.doc .stamp { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0 8px; padding: 12px 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); font-size: 14px; color: var(--ink-soft); }
.doc .stamp b { color: var(--ink); }
.doc h2 { font-family: var(--display); font-weight: 900; font-size: clamp(23px, 2.2vw, 28px); line-height: 1.25; margin: 2.2em 0 .5em; scroll-margin-top: 20px; }
.doc h2 .num { display: inline-block; min-width: 1.6em; color: var(--tomato); }
.doc h3 { font-family: var(--display); font-weight: 800; font-size: 20px; margin: 1.6em 0 .3em; scroll-margin-top: 20px; }
.doc p, .doc ul, .doc ol { margin: 0 0 1em; }
.doc ul, .doc ol { padding-left: 1.2em; }
.doc li { margin-bottom: .35em; }
.doc a { color: var(--cobalt); font-weight: 600; }
.doc kbd, .doc .ui { font-family: var(--text); font-weight: 700; background: var(--paper-deep); border: 1px solid var(--paper-shade); border-radius: 6px; padding: 0 6px; font-size: .92em; white-space: nowrap; }
.doc .callout { border: var(--stroke) solid var(--ink); border-radius: 20px; background: #FFFAF0; padding: 22px 24px; margin: 28px 0; box-shadow: 4px 5px 0 var(--ink); }
.doc .callout h2 { margin-top: 0; }
.doc .callout p:last-child { margin-bottom: 0; }
.doc .contact-row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.doc .contact-row .addr { font-family: var(--label); font-size: 15px; word-break: break-all; }
.doc details { border-bottom: 1px solid var(--paper-shade); padding: 4px 0; }
.doc summary { cursor: pointer; font-weight: 700; padding: 10px 0; list-style: none; display: flex; gap: 10px; align-items: baseline; }
.doc summary::-webkit-details-marker { display: none; }
.doc summary::before { content: "+"; font-family: var(--label); font-weight: 700; color: var(--tomato); width: 1em; flex: none; }
.doc details[open] summary::before { content: "−"; }
.doc details > div { padding: 0 0 12px 1.6em; }
.doc .policy-source { margin-top: 3em; padding-top: 16px; border-top: 2px solid var(--ink); font-size: 14px; color: var(--ink-soft); }

@media (max-width: 860px) {
  .doc-wrap { grid-template-columns: 1fr; padding-left: var(--gutter); }
  .doc-side { position: static; }
  .doc-side .mascot { display: none; }
  .doc-side nav { display: none; }
  .doc-side img.mark { width: 120px; margin-bottom: 0; }
  .doc { font-size: 17px; }
}

@media print {
  .spine-rail, .mast nav, .doc-side nav, .doc-side .mascot, .foot { display: none; }
  body { background: #fff; }
  .doc-wrap { display: block; padding: 0; }
}
