/*
 * 二人麻将3D 下载落地页。颜色与 docs/client/DESIGN_TOKENS.md（UITokens.cs）同名同值；
 * 版式参考 art/landing_src/mockups 下的 codex 设计稿。
 */
:root {
  --ink: #3B2A1C;
  --ink-soft: #5E4A36;
  --hint: #6E5E4A;
  --cream: #FFF6DE;
  --cream-dim: #E9DDBE;
  --paper: #F5ECD7;
  --card: #FCF6E8;
  --gold: #E3BD64;
  --gold-deep: #B8862E;
  --gold-line: rgba(184, 134, 46, .38);
  --jade: #2E7A60;
  --jade-deep: #1D5042;
  --brand: #163A31;
  --night: #0F2A23;
  --felt: #22705C;
  --red: #C4432E;

  --serif: "M2P Serif TC", "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --kai: "M2P Kai", "LXGW WenKai TC", "Kaiti TC", "STKaiti", "KaiTi", var(--serif);
  --script: "M2P Script", "Brush Script MT", cursive;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --nav-h: 68px;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shot-ratio: 2868 / 1320;
  --frame-corners:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' fill='none' stroke='%23B8862E' stroke-width='1.6'%3E%3Cpath d='M3 34V12q0-9 9-9h22'/%3E%3Cpath d='M10 24v-6q0-8 8-8h6'/%3E%3Ccircle cx='10' cy='10' r='2' fill='%23B8862E' stroke='none'/%3E%3C/svg%3E") left top no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' fill='none' stroke='%23B8862E' stroke-width='1.6'%3E%3Cg transform='translate(44 0) scale(-1 1)'%3E%3Cpath d='M3 34V12q0-9 9-9h22'/%3E%3Cpath d='M10 24v-6q0-8 8-8h6'/%3E%3Ccircle cx='10' cy='10' r='2' fill='%23B8862E' stroke='none'/%3E%3C/g%3E%3C/svg%3E") right top no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' fill='none' stroke='%23B8862E' stroke-width='1.6'%3E%3Cg transform='translate(0 44) scale(1 -1)'%3E%3Cpath d='M3 34V12q0-9 9-9h22'/%3E%3Cpath d='M10 24v-6q0-8 8-8h6'/%3E%3Ccircle cx='10' cy='10' r='2' fill='%23B8862E' stroke='none'/%3E%3C/g%3E%3C/svg%3E") left bottom no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' fill='none' stroke='%23B8862E' stroke-width='1.6'%3E%3Cg transform='translate(44 44) scale(-1 -1)'%3E%3Cpath d='M3 34V12q0-9 9-9h22'/%3E%3Cpath d='M10 24v-6q0-8 8-8h6'/%3E%3Ccircle cx='10' cy='10' r='2' fill='%23B8862E' stroke='none'/%3E%3C/g%3E%3C/svg%3E") right bottom no-repeat;
}
html[lang="zh-CN"] { --serif: "M2P Serif SC", "Noto Serif SC", "Songti SC", "SimSun", serif; }
html[data-shot-ratio="16x9"] { --shot-ratio: 16 / 9; }
@media (min-width: 768px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 8px);
}
body {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 1.1em; height: 1.1em; flex: none; }
.ic--sm { width: .9em; height: .9em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px; background: var(--cream); color: var(--ink);
  transition: top .2s;
}
.skip:focus { top: 12px; }

.container { width: min(1180px, 100% - var(--gutter) * 2); margin-inline: auto; }
.container--narrow { width: min(840px, 100% - var(--gutter) * 2); }

/* ------------------------------------------------------------------ nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: calc(var(--nav-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  color: var(--ink);
  background: linear-gradient(rgba(255, 250, 236, .72), rgba(255, 250, 236, 0));
  transition: background .35s, color .35s, box-shadow .35s, backdrop-filter .35s;
}
.nav.is-solid {
  color: var(--cream);
  background: rgba(15, 42, 35, .86);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(227, 189, 100, .28), 0 10px 30px -18px rgba(0, 0, 0, .6);
}
.nav__inner {
  height: var(--nav-h);
  width: min(1240px, 100% - var(--gutter) * 2);
  margin-inline: auto;
  display: flex; align-items: center; gap: 28px;
}
.nav__brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: .02em; white-space: nowrap;
}
.nav__brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.nav__links { display: none; gap: 28px; margin-left: 12px; }
.nav__links a {
  position: relative; text-decoration: none; font-size: 15px; font-weight: 600; opacity: .88; padding: 6px 0;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--gold); transform: scaleX(0); transition: transform .25s var(--ease);
}
.nav__links a:hover { opacity: 1; }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav__cta {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: 999px;
  font-weight: 800; font-size: 15px; text-decoration: none; color: var(--ink); white-space: nowrap;
  background: linear-gradient(180deg, #F8DE94, #E3BD64 55%, #CC9A3E);
  border: 1px solid #B8862E;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 6px 14px -6px rgba(140, 95, 20, .7);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.nav__cta:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 10px 18px -6px rgba(140, 95, 20, .8); }
@media (max-width: 420px) {
  .nav__cta span { display: none; }
  .nav__cta { width: 40px; padding: 0; justify-content: center; }
  .nav__brand { font-size: 16px; }
}
@media (min-width: 1024px) { .nav__links { display: flex; } }

.lang { position: relative; }
.lang__btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  font-size: 14px; font-weight: 700;
  background: rgba(255, 255, 255, .45);
  border: 1px solid rgba(59, 42, 28, .22);
  transition: background .2s, border-color .2s;
}
.nav.is-solid .lang__btn { background: rgba(255, 255, 255, .08); border-color: rgba(233, 221, 190, .35); }
.lang__btn:hover { background: rgba(255, 255, 255, .7); }
.nav.is-solid .lang__btn:hover { background: rgba(255, 255, 255, .16); }
.lang__menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px;
  margin: 0; padding: 6px; list-style: none;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--gold-line); border-radius: 14px;
  box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .45);
}
.lang__menu li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 0 14px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 15px;
}
.lang__menu li:hover, .lang__menu li.is-focus { background: rgba(46, 122, 96, .1); }
.lang__menu li[aria-selected="true"] { color: var(--jade-deep); }
.lang__menu li[aria-selected="true"]::after {
  content: ""; width: 16px; height: 9px; margin-top: -4px;
  border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg);
}

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(760px, 100svh);
  padding: calc(var(--nav-h) + env(safe-area-inset-top) + clamp(20px, 5vh, 56px)) 0 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  background: var(--paper);
}
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background: url("../img/hero-wide.webp") 50% 28% / cover no-repeat;
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 42% at 50% 24%, rgba(255, 251, 238, .55), rgba(255, 251, 238, 0) 70%),
    linear-gradient(180deg, rgba(246, 236, 214, 0) 52%, rgba(245, 236, 215, .55) 74%, var(--paper) 96%);
}
@media (max-aspect-ratio: 4/5) {
  .hero__bg { background-image: url("../img/hero-tall.webp"); background-position: 50% 0; }
}
.hero__inner { position: relative; z-index: 2; width: min(980px, 100% - var(--gutter) * 2); }
.hero__title { display: flex; flex-direction: column; align-items: center; font-weight: 400; }
.logo {
  font-family: var(--script);
  font-size: clamp(44px, min(13.5vw, 17vh), 156px);
  line-height: 1.02;
  white-space: nowrap;
  color: #1C4D40;
  letter-spacing: .01em;
  padding: 0 .12em;
  text-shadow:
    0 0 1px #FFF6DE, 2px 2px 0 #FFF6DE, -2px 2px 0 #FFF6DE, 2px -2px 0 #FFF6DE, -2px -2px 0 #FFF6DE,
    0 3px 0 #FFF6DE, 0 -3px 0 #FFF6DE, 3px 0 0 #FFF6DE, -3px 0 0 #FFF6DE,
    0 8px 22px rgba(22, 58, 49, .35);
}
.hero__name {
  display: inline-flex; align-items: center; gap: .45em;
  margin-top: clamp(2px, .6vw, 8px);
  font-family: var(--kai); font-weight: 700;
  font-size: clamp(26px, min(4.4vw, 7vh), 56px); line-height: 1.2; letter-spacing: .14em;
  color: #1C4D40;
  text-shadow: 0 0 2px #FFF6DE, 0 2px 0 #FFF6DE, 0 -2px 0 #FFF6DE, 2px 0 0 #FFF6DE, -2px 0 0 #FFF6DE, 0 6px 16px rgba(22, 58, 49, .25);
}
.hero__name > span { margin-right: -.14em; }
.orn { width: clamp(54px, 9vw, 120px); height: 16px; color: var(--gold-deep); filter: drop-shadow(0 1px 0 rgba(255, 246, 222, .9)); }
.orn--r { transform: scaleX(-1); }
.hero__tagline {
  display: inline-block; margin-top: clamp(12px, 2vh, 20px);
  padding: 8px 22px; border-radius: 999px;
  font-size: clamp(14px, 1.55vw, 18px); font-weight: 700; letter-spacing: .06em; color: var(--ink-soft);
  background: rgba(255, 249, 233, .84);
  border: 1px solid var(--gold-line);
  box-shadow: 0 6px 18px -10px rgba(59, 42, 28, .45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.hero__meta {
  list-style: none; padding: 0; margin: 16px 0 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px;
  font-size: 14px; font-weight: 700; color: var(--ink-soft);
  text-shadow: 0 0 6px rgba(255, 249, 233, .95), 0 0 2px rgba(255, 249, 233, .95);
}
.hero__meta li { display: inline-flex; align-items: center; gap: 6px; }
.hero__meta .ic { color: var(--jade); width: 1em; height: 1em; }

.hero__stage {
  position: relative; z-index: 2;
  width: min(900px, 100% - var(--gutter) * 2 - 40px);
  margin: clamp(28px, 5vh, 52px) auto 0;
  padding-bottom: clamp(40px, 7vw, 88px);
  perspective: 1600px;
}
.phone--hero { transform: rotateX(9deg); transform-origin: 50% 100%; }

/* ------------------------------------------------------------------ download buttons */
.stores {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-top: clamp(22px, 3.4vh, 32px);
}
.store {
  position: relative;
  display: inline-flex; align-items: center; gap: 11px;
  min-width: 200px; height: 62px; padding: 0 22px 0 16px;
  border-radius: 14px; text-decoration: none; text-align: left;
  color: #fff; background: #0B0F0D;
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .6);
  transition: transform .2s var(--ease), box-shadow .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.store:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .65), 0 0 0 2px rgba(227, 189, 100, .75); }
.store:active { transform: scale(.97); }
.store__logo { width: 30px; height: 30px; flex: none; }
.store--ios .store__logo { width: 28px; height: 28px; margin-top: -3px; }
.store__text { display: flex; flex-direction: column; line-height: 1.12; }
.store__text small { font: 600 11.5px/1.25 var(--sans); letter-spacing: .03em; opacity: .9; white-space: nowrap; }
.store__text strong { font: 600 22px/1.12 var(--sans); letter-spacing: -.01em; white-space: nowrap; }
html[lang^="zh"] .store__text small { font-family: var(--serif); font-weight: 700; letter-spacing: .12em; }
.store--apk {
  background: linear-gradient(180deg, #34896B, #1D5042);
  border-color: rgba(227, 189, 100, .7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 12px 26px -12px rgba(22, 58, 49, .9);
}
.store--apk .store__logo { color: #8EE6A8; }
.store--apk .store__text strong { font-family: var(--serif); font-weight: 800; font-size: 20px; }
html[lang="en"] .store--apk .store__text strong { font-family: var(--sans); font-weight: 600; font-size: 21px; }
.store.is-soon { background: #2A302D; color: rgba(255, 255, 255, .78); }
.store.is-soon.store--apk { background: linear-gradient(180deg, #4C6A60, #34504A); }
.store.is-soon .store__logo { opacity: .7; }
.store.is-soon::after {
  content: attr(data-soon);
  position: absolute; top: -9px; right: -6px;
  padding: 1px 9px; border-radius: 999px;
  font: 800 11px/18px var(--serif); letter-spacing: .06em; color: var(--ink);
  background: linear-gradient(180deg, #F8DE94, #E3BD64);
  border: 1px solid #B8862E;
}
/* 当前设备的商店排第一。 */
html[data-platform="ios"] .store--ios,
html[data-platform="android"] .store--android { order: -2; }
html[data-platform="android"] .store--apk { order: -1; }
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding-top: calc(var(--nav-h) + 8px); }
  .hero__tagline { margin-top: 8px; padding: 5px 16px; }
  .stores { margin-top: 14px; }
  .store { height: 54px; min-width: 180px; }
}
@media (max-width: 640px) {
  .stores { flex-direction: column; align-items: stretch; width: min(340px, 100%); margin-inline: auto; }
  .store { justify-content: center; height: 58px; }
}

/* ------------------------------------------------------------------ phone frame */
.phone {
  position: relative;
  padding: clamp(6px, 1.05vw, 13px);
  border-radius: clamp(22px, 3.4vw, 46px);
  background: linear-gradient(140deg, #3A413E 0%, #121614 35%, #0A0D0C 70%, #2A302D 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .14),
    0 0 0 1px rgba(0, 0, 0, .65),
    0 2px 0 2px rgba(150, 160, 155, .22),
    0 40px 70px -28px rgba(10, 30, 24, .75),
    0 18px 30px -18px rgba(0, 0, 0, .5);
}
.phone::before {
  content: ""; position: absolute; top: -3px; left: 22%; width: 9%; height: 3px; border-radius: 3px 3px 0 0;
  background: linear-gradient(#5A625F, #2A302D);
}
.phone__screen {
  position: relative; overflow: hidden;
  aspect-ratio: var(--shot-ratio);
  border-radius: clamp(15px, 2.5vw, 34px);
  background: var(--brand);
}
.phone__screen img { width: 100%; height: 100%; object-fit: cover; }
.phone__screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .04) 24%, rgba(255, 255, 255, 0) 38%);
}

/* ------------------------------------------------------------------ 3D tiles (real glyphs from the game's tile atlas) */
.tile3d {
  --tw: clamp(64px, 10vw, 128px);
  position: absolute; z-index: 3;
  width: var(--tw); aspect-ratio: 256 / 352;
  filter: drop-shadow(0 calc(var(--tw) * .16) calc(var(--tw) * .14) rgba(18, 40, 32, .42));
  animation: bob 6.5s ease-in-out infinite alternate;
}
.tile3d span {
  position: absolute; inset: 0;
  border-radius: 15% / 11%;
  background: #FBF6EA center / cover no-repeat;
  box-shadow:
    inset 0 2px 1px rgba(255, 255, 255, .95),
    inset 0 -3px 6px rgba(120, 100, 60, .16),
    calc(var(--tw) * .035) calc(var(--tw) * .045) 0 0 #ECE2CB,
    calc(var(--tw) * .07) calc(var(--tw) * .09) 0 0 #2F8E68,
    calc(var(--tw) * .08) calc(var(--tw) * .105) 0 0 #1C5D44;
}
.face-wan_1 span { background-image: url("../img/tiles/wan_1.webp"); }
.face-zi_fa span { background-image: url("../img/tiles/zi_fa.webp"); }
.face-tiao_2 span { background-image: url("../img/tiles/tiao_2.webp"); }
.tile3d--l { left: -6.5%; bottom: 14%; transform: rotate(-13deg); }
.tile3d--r1 { --tw: clamp(62px, 9.4vw, 120px); right: -5%; bottom: 10%; transform: rotate(11deg); animation-delay: -2.2s; }
.tile3d--r2 { --tw: clamp(50px, 7.6vw, 98px); right: 5.5%; bottom: 3%; transform: rotate(-8deg); animation-delay: -4.1s; z-index: 2; }
@keyframes bob {
  from { translate: 0 0; }
  to { translate: 0 -10px; }
}
@media (max-width: 640px) {
  .tile3d { --tw: 58px; }
  .tile3d--l { left: -7%; bottom: 22%; }
  .tile3d--r1 { --tw: 56px; right: -6%; bottom: 26%; }
  .tile3d--r2 { --tw: 44px; right: 7%; bottom: 12%; }
}

/* ------------------------------------------------------------------ petals */
.petals { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.petal {
  position: absolute; top: -60px; width: var(--s, 22px);
  opacity: .9;
  animation: fall var(--d, 14s) linear var(--delay, 0s) infinite;
  will-change: transform;
}
@keyframes fall {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  8% { opacity: .95; }
  50% { transform: translate3d(var(--sway, 60px), 50vh, 0) rotate(200deg); }
  90% { opacity: .85; }
  100% { transform: translate3d(calc(var(--sway, 60px) * -.4), 105vh, 0) rotate(420deg); opacity: 0; }
}

/* ------------------------------------------------------------------ sections */
.section { position: relative; padding: clamp(72px, 9vw, 128px) 0; }
.section--paper {
  color: var(--ink);
  background: var(--paper) url("../img/paper.webp") 0 0 / 512px repeat;
}
.section--jade {
  color: var(--cream);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(15, 42, 35, .55), rgba(15, 42, 35, .2) 30%, rgba(15, 42, 35, .45)),
    var(--brand) url("../img/jade-bg.webp") center / cover no-repeat;
}
.ink {
  position: absolute; left: 0; right: 0; bottom: 0; height: clamp(110px, 16vw, 230px);
  pointer-events: none; opacity: .5;
  background: url("../img/ink-mountains.webp") center bottom / auto 100% repeat-x;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}
.section--paper > .container { position: relative; z-index: 1; }

.sec-head { text-align: center; max-width: 760px; margin: 0 auto clamp(40px, 5.5vw, 64px); }
.eyebrow {
  font-size: 14px; font-weight: 800; letter-spacing: .32em; color: var(--gold-deep);
  margin-bottom: 10px;
}
html[lang="en"] .eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: 13px; }
.sec-title {
  font-family: var(--kai); font-weight: 700;
  font-size: clamp(32px, 4.3vw, 52px); line-height: 1.25; letter-spacing: .05em;
  color: var(--ink);
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
html[lang="en"] .sec-title { font-family: var(--serif); font-weight: 800; letter-spacing: -.005em; }
.divider { display: block; width: 210px; height: 16px; margin: 16px auto 0; color: var(--gold-deep); }
.divider--start { margin-left: 0; }
.sec-lead { margin-top: 16px; font-size: clamp(15px, 1.45vw, 18px); color: var(--ink-soft); text-wrap: pretty; }
.sec-head--light .sec-title { color: var(--cream); text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.sec-head--light .eyebrow, .sec-head--light .divider { color: var(--gold); }
.sec-head--light .sec-lead { color: var(--cream-dim); }

/* ------------------------------------------------------------------ features */
.features {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: clamp(14px, 2vw, 22px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.feature {
  position: relative;
  padding: 34px 26px 30px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 252, 243, .95), rgba(251, 243, 224, .95));
  border: 1px solid var(--gold-line);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 #fff, 0 22px 44px -30px rgba(59, 42, 28, .55);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.feature::before {
  content: ""; position: absolute; inset: 6px; border-radius: 17px; pointer-events: none;
  border: 1px solid rgba(184, 134, 46, .16);
}
.feature:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 #fff, 0 30px 50px -28px rgba(59, 42, 28, .6); }
.feature__icon {
  display: grid; place-items: center;
  width: 74px; height: 74px; margin: 0 auto 18px; border-radius: 50%;
  color: var(--cream);
  background: radial-gradient(circle at 34% 28%, #44A07F, #23624E 58%, #17463A);
  box-shadow: 0 0 0 3px #F7E9C3, 0 0 0 4.5px rgba(184, 134, 46, .7), 0 12px 20px -8px rgba(22, 58, 49, .6);
}
.feature__icon svg { width: 38px; height: 38px; }
.feature h3 { font-size: 20px; font-weight: 800; line-height: 1.4; letter-spacing: .02em; word-break: keep-all; overflow-wrap: anywhere; }
.feature p { margin-top: 8px; font-size: 15.5px; color: var(--ink-soft); text-wrap: pretty; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .features { grid-template-columns: 1fr; }
  .feature {
    display: grid; grid-template-columns: 64px 1fr; column-gap: 16px; align-items: center;
    padding: 18px 18px; text-align: left; border-radius: 18px;
  }
  .feature::before { border-radius: 13px; }
  .feature__icon { grid-row: span 2; width: 60px; height: 60px; margin: 0; }
  .feature__icon svg { width: 30px; height: 30px; }
  .feature h3 { font-size: 17.5px; align-self: end; }
  .feature p { margin-top: 2px; font-size: 14.5px; align-self: start; }
}

/* ------------------------------------------------------------------ gallery */
.deco { position: absolute; pointer-events: none; z-index: 0; }
.deco--bamboo { top: -10px; right: -40px; width: clamp(200px, 26vw, 400px); opacity: .9; }
.deco--bamboo-left { right: auto; left: -50px; transform: scaleX(-1); }
.deco--branch { left: -30px; bottom: -40px; width: clamp(200px, 24vw, 360px); opacity: .95; }
#screens .container, .gallery { position: relative; z-index: 1; }
.gallery { --slide-w: min(860px, 80vw); }
.gallery__track {
  display: flex; gap: clamp(14px, 3vw, 44px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 10px calc(50% - var(--slide-w) / 2) 6px;
  scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track:focus-visible { outline-offset: -3px; }
.slide {
  flex: 0 0 var(--slide-w); margin: 0;
  scroll-snap-align: center;
  opacity: .42; transform: scale(.9);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.slide.is-active { opacity: 1; transform: none; }
.slide figcaption { margin-top: 20px; text-align: center; }
.slide strong {
  display: block; font-weight: 800; font-size: clamp(20px, 2.3vw, 28px); letter-spacing: .04em; color: var(--cream);
  word-break: keep-all; overflow-wrap: anywhere;
}
.slide strong b { color: var(--gold); font-weight: inherit; }
.slide figcaption span { display: block; margin-top: 4px; font-size: 15px; color: var(--cream-dim); }
.gallery__controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 26px; }
.gallery__nav {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  color: var(--gold); background: rgba(10, 30, 24, .55);
  border: 1.5px solid rgba(227, 189, 100, .85);
  transition: background .2s, transform .2s var(--ease);
}
.gallery__nav:hover { background: rgba(227, 189, 100, .18); transform: scale(1.06); }
.gallery__nav svg { width: 22px; height: 22px; }
.gallery__nav--prev svg { transform: scaleX(-1); }
.gallery__dots { display: flex; gap: 8px; }
.gallery__dots button {
  width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(233, 221, 190, .38); transition: width .3s var(--ease), background .3s;
}
.gallery__dots button[aria-current="true"] { width: 28px; background: var(--gold); }
@media (max-width: 640px) {
  .gallery { --slide-w: 86vw; }
  .gallery__nav { display: none; }
  .slide { transform: scale(.94); }
}

/* ------------------------------------------------------------------ 3D table showcase */
.showcase { display: grid; grid-template-columns: 1.12fr 1fr; gap: clamp(36px, 5vw, 76px); align-items: center; }
.showcase__media { position: relative; }
.frame {
  padding: 9px; border-radius: 24px;
  background: linear-gradient(145deg, #F6DE9E, #C99A45 45%, #F0D48C 70%, #A97A2C);
  box-shadow: 0 36px 64px -30px rgba(59, 42, 28, .65);
}
.frame img {
  width: 100%; aspect-ratio: 2868 / 1320; object-fit: cover; border-radius: 16px; background: var(--felt);
  box-shadow: 0 0 0 2px rgba(255, 246, 222, .8);
}
.showcase__cluster {
  position: absolute; right: -13%; bottom: -22%; width: 24%;
  filter: drop-shadow(0 22px 24px rgba(30, 40, 30, .35));
  animation: bob 7s ease-in-out infinite alternate;
}
.showcase__copy .eyebrow { text-align: left; }
.chips { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  padding: 7px 16px; border-radius: 999px; font-size: 15px; font-weight: 700; color: var(--jade-deep);
  background: rgba(46, 122, 96, .09); border: 1px solid rgba(46, 122, 96, .32);
}
@media (max-width: 900px) {
  .showcase { grid-template-columns: 1fr; }
  .showcase__copy { text-align: center; }
  .showcase__copy .eyebrow { text-align: center; }
  .divider--start { margin-left: auto; }
  .chips { justify-content: center; }
  .showcase__cluster { right: -4%; bottom: -18%; width: 26%; }
}

/* ------------------------------------------------------------------ download card */
.section--cta { padding-block: clamp(80px, 10vw, 136px); }
.section--cta .container { position: relative; z-index: 1; }
.cta {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 4vw, 56px); align-items: center;
  padding: clamp(28px, 4.6vw, 60px);
  color: var(--ink);
  background: var(--card) url("../img/paper.webp") 0 0 / 512px;
  border: 1px solid #C9A257;
  border-radius: 28px;
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .75), inset 0 1px 0 #fff;
}
.cta::before {
  content: ""; position: absolute; inset: 10px; border-radius: 20px; pointer-events: none;
  border: 1.5px solid rgba(184, 134, 46, .55);
}
.cta::after {
  content: ""; position: absolute; inset: 4px; pointer-events: none;
  background: var(--frame-corners);
}
.cta__main, .cta__qr { position: relative; z-index: 1; min-width: 0; }
.cta__head { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 26px); }
.cta__icon {
  width: clamp(84px, 9vw, 112px); height: auto; aspect-ratio: 1; border-radius: 24%;
  box-shadow: 0 0 0 3px #F7E9C3, 0 0 0 4.5px rgba(184, 134, 46, .6), 0 16px 26px -12px rgba(59, 42, 28, .7);
}
.cta .eyebrow { margin-bottom: 4px; }
.cta .sec-title { font-size: clamp(30px, 3.6vw, 46px); }
.cta__tags { margin-top: 6px; font-weight: 800; color: var(--jade); letter-spacing: .1em; }
html[lang="en"] .cta__tags { letter-spacing: .02em; }
.cta__desc { margin-top: 20px; color: var(--ink-soft); word-break: keep-all; overflow-wrap: anywhere; }
.stores--cta { justify-content: flex-start; margin-top: 20px; }
.cta__req {
  list-style: none; padding: 0; margin: 22px 0 0;
  display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 14px; color: var(--hint);
}
.cta__req li { display: inline-flex; align-items: center; gap: 8px; }
.cta__req li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold-deep); transform: rotate(45deg); border-radius: 1px; }
.cta__fine { margin-top: 6px; font-size: 13px; color: var(--hint); }
.cta__qr {
  width: 228px; padding: 20px 18px 18px; text-align: center;
  background: #fff; border-radius: 20px;
  border: 1px solid var(--gold-line);
  box-shadow: 0 20px 36px -24px rgba(59, 42, 28, .6);
}
.qr { position: relative; width: 184px; aspect-ratio: 1; margin: 0 auto 12px; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr img {
  position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 22%; box-shadow: 0 0 0 4px #fff;
}
.cta__qr strong { display: block; font-size: 17px; font-weight: 800; }
.cta__qr span { display: block; font-size: 13px; color: var(--hint); }
html[data-platform="ios"] .cta__qr, html[data-platform="android"] .cta__qr { display: none; }
@media (max-width: 860px) {
  .cta { grid-template-columns: minmax(0, 1fr); }
  .cta__qr { display: none; }
}
@media (max-width: 640px) {
  .cta__head { flex-direction: column; text-align: center; }
  .cta__desc, .cta__fine { text-align: center; }
  .cta__req { justify-content: center; }
  .stores--cta { justify-content: center; }
}

.apk {
  margin-top: 18px; padding: 14px 18px; border-radius: 14px; font-size: 14px;
  background: rgba(46, 122, 96, .07); border: 1px dashed rgba(46, 122, 96, .4);
}
.apk__info { font-weight: 700; color: var(--jade-deep); }
.apk__sha { display: flex; align-items: center; gap: 10px; margin-top: 6px; color: var(--hint); }
.apk__sha span { font: 700 12px/1 var(--sans); letter-spacing: .04em; flex: none; }
.apk__sha code {
  min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 12px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--ink-soft);
}
.apk__copy {
  display: inline-flex; align-items: center; gap: 4px; flex: none; cursor: pointer;
  height: 30px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 700;
  background: #fff; border: 1px solid var(--gold-line); color: var(--ink-soft);
}
.apk__copy svg { width: 14px; height: 14px; }
.apk__v7a { display: inline-block; margin-top: 6px; color: var(--jade); font-weight: 700; }
.howto { margin-top: 8px; }
.howto summary { cursor: pointer; font-weight: 800; color: var(--jade-deep); }
.howto ol { margin: 8px 0 6px; padding-left: 1.4em; color: var(--ink-soft); }
.howto p { color: var(--hint); font-size: 13px; }

/* ------------------------------------------------------------------ FAQ */
.section--faq { padding-bottom: clamp(140px, 16vw, 220px); }
.faq { display: grid; gap: 14px; }
.faq__item {
  padding: 0 24px;
  background: rgba(255, 252, 243, .92);
  border: 1px solid var(--gold-line); border-radius: 18px;
  box-shadow: 0 14px 30px -26px rgba(59, 42, 28, .6);
  transition: box-shadow .3s;
}
.faq__item[open] { box-shadow: 0 20px 40px -28px rgba(59, 42, 28, .7); }
.faq__item summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 19px 40px 19px 0; font-size: 17px; font-weight: 800;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::before, .faq__item summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 16px; height: 2px; border-radius: 2px;
  background: var(--gold-deep); transition: transform .3s var(--ease);
}
.faq__item summary::after { transform: rotate(90deg); }
.faq__item[open] summary::after { transform: rotate(0deg); }
.faq__item p { padding-bottom: 20px; margin-top: -4px; color: var(--ink-soft); }

/* ------------------------------------------------------------------ footer */
.footer {
  position: relative;
  padding: 52px 0 calc(44px + env(safe-area-inset-bottom));
  text-align: center; font-size: 14px; color: var(--cream-dim);
  background: var(--night);
  border-top: 1px solid rgba(227, 189, 100, .28);
}
.footer__brand { display: inline-flex; align-items: center; gap: 14px; text-align: left; }
.footer__brand img { width: 48px; height: 48px; border-radius: 12px; }
.footer__brand strong { display: block; font-size: 18px; color: var(--cream); }
.footer__slogan { display: block; font-family: var(--kai); color: var(--gold); letter-spacing: .14em; }
html[lang="en"] .footer__slogan { font-family: var(--serif); font-style: italic; letter-spacing: .02em; }
.seal {
  display: inline-grid; grid-template-columns: 1fr 1fr; place-items: center;
  width: 46px; height: 46px; padding: 3px; margin-left: 8px;
  font-family: var(--kai); font-weight: 700; font-size: 17px; line-height: 1; color: #FBE9DA;
  background: #A92E28; border-radius: 5px;
  box-shadow: inset 0 0 0 2px #A92E28, inset 0 0 0 3.2px rgba(251, 233, 218, .65);
  transform: rotate(-5deg);
}
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 26px; margin: 24px 0 18px; }
.footer__links a { color: var(--cream); text-decoration: underline 1px rgba(227, 189, 100, .55); text-underline-offset: 4px; }
.footer__links:not(:has(a:not([hidden]))) { display: none; }
.footer__disclaimer { max-width: 760px; margin: 18px auto 10px; font-size: 13px; color: rgba(233, 221, 190, .78); }
.footer__copy, .footer__tm { font-size: 12px; color: rgba(233, 221, 190, .58); margin-top: 4px; }

/* ------------------------------------------------------------------ sticky download bar (phones) */
.sticky {
  position: fixed; z-index: 60;
  left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 12px; border-radius: 18px;
  color: var(--cream);
  background: rgba(15, 42, 35, .93);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(227, 189, 100, .4);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .7);
  transform: translateY(calc(100% + 30px));
  transition: transform .4s var(--ease);
}
.sticky.is-on { transform: none; }
.sticky img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.sticky__text { flex: 1; min-width: 0; line-height: 1.3; }
.sticky__text strong { display: block; font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky__text span { display: block; font-size: 12px; color: var(--cream-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky__btn {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 44px; padding: 0 18px; border-radius: 999px;
  font-weight: 800; color: var(--ink); text-decoration: none;
  background: linear-gradient(180deg, #F8DE94, #E3BD64 55%, #CC9A3E);
  border: 1px solid #B8862E;
}
@media (min-width: 900px) and (hover: hover) { .sticky { display: none; } }
@media (max-width: 899px), (hover: none) { .footer { padding-bottom: calc(110px + env(safe-area-inset-bottom)); } }

/* ------------------------------------------------------------------ toast & dialog */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 80;
  max-width: min(92vw, 420px); padding: 12px 20px; border-radius: 14px;
  font-weight: 700; font-size: 15px; text-align: center; color: var(--cream);
  background: rgba(22, 30, 27, .92); border: 1px solid rgba(227, 189, 100, .45);
  box-shadow: 0 16px 36px -14px rgba(0, 0, 0, .7);
  opacity: 0; pointer-events: none; translate: -50% 12px;
  transition: opacity .25s, translate .25s var(--ease);
}
.toast.is-on { opacity: 1; translate: -50% 0; }
.modal {
  width: min(360px, 100% - 32px); padding: 26px 24px 22px; border-radius: 22px;
  color: var(--ink); text-align: center;
  background: var(--card) url("../img/paper.webp") 0 0 / 512px;
  border: 1px solid #C9A257;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7);
}
.modal::backdrop { background: rgba(13, 20, 18, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal h3 { font-family: var(--kai); font-size: 26px; font-weight: 700; }
.modal p { margin-top: 10px; color: var(--ink-soft); font-size: 15px; }
.modal form { margin: 18px 0 0; }
.btn-gold {
  min-width: 160px; height: 46px; padding: 0 22px; border-radius: 999px; cursor: pointer;
  font-weight: 800; color: var(--ink);
  background: linear-gradient(180deg, #F8DE94, #E3BD64 55%, #CC9A3E);
  border: 1px solid #B8862E;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

/* ------------------------------------------------------------------ reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.features .reveal:nth-child(3n + 2) { transition-delay: .08s; }
.features .reveal:nth-child(3n + 3) { transition-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .petals { display: none; }
}

/* ------------------------------------------------------------------ legal pages (terms.html / privacy.html) */
.legal-page { background: var(--paper) url("../img/paper.webp") 0 0 / 512px repeat; }
.legal-page main { position: relative; }
.legal-page .footer { padding-bottom: calc(44px + env(safe-area-inset-bottom)); }
.legal-hero {
  position: absolute; inset: 0 0 auto; z-index: 0;
  height: clamp(320px, 40vw, 480px);
  background: url("../img/hero-wide.webp") 50% 34% / cover no-repeat;
}
.legal-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 250, 236, .3), rgba(245, 236, 215, .62) 58%, var(--paper) 100%);
}
@media (max-aspect-ratio: 4/5) {
  .legal-hero { background-image: url("../img/hero-tall.webp"); background-position: 50% 22%; }
}
.legal-wrap {
  position: relative; z-index: 1;
  padding: calc(var(--nav-h) + env(safe-area-inset-top) + clamp(18px, 3.5vw, 40px)) 0 clamp(64px, 8vw, 112px);
}

.legal-switch {
  display: flex; gap: 4px; width: max-content; max-width: 100%;
  margin: 0 auto clamp(18px, 2.6vw, 26px); padding: 5px; border-radius: 999px;
  background: rgba(255, 249, 233, .86);
  border: 1px solid var(--gold-line);
  box-shadow: 0 8px 20px -14px rgba(59, 42, 28, .6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.legal-switch a {
  padding: 7px 18px; border-radius: 999px; white-space: nowrap;
  font-size: 15px; font-weight: 700; text-decoration: none; color: var(--ink-soft);
  transition: background .2s, color .2s;
}
.legal-switch a:hover { color: var(--jade-deep); }
.legal-switch a[aria-current="page"] {
  color: var(--cream);
  background: linear-gradient(180deg, #34896B, #1D5042);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}

/* With scripts, only the article in <html data-lang> shows; without, all four follow each other. */
.js .legal { display: none; }
html[data-lang="zh-TW"] .legal[data-doc-lang="zh-TW"],
html[data-lang="zh-HK"] .legal[data-doc-lang="zh-HK"],
html[data-lang="zh-CN"] .legal[data-doc-lang="zh-CN"],
html[data-lang="en"] .legal[data-doc-lang="en"] { display: block; }
.legal + .legal { margin-top: 72px; }

.legal { font-family: "M2P Legal TC", var(--serif); }
.legal[lang="zh-CN"] { font-family: "M2P Legal SC", "M2P Serif SC", "Noto Serif SC", "Songti SC", serif; }
.legal__head { text-align: center; margin-bottom: clamp(22px, 3vw, 34px); }
.legal__head .eyebrow { font-family: var(--serif); }
.legal__title {
  font-family: var(--kai); font-weight: 700;
  font-size: clamp(30px, 4.4vw, 54px); line-height: 1.25; letter-spacing: .06em;
  color: #1C4D40;
  text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere;
  text-shadow: 0 0 2px #FFF6DE, 0 2px 0 #FFF6DE, 0 -2px 0 #FFF6DE, 2px 0 0 #FFF6DE, -2px 0 0 #FFF6DE, 0 6px 18px rgba(22, 58, 49, .22);
}
.legal[lang="en"] .legal__title { font-family: "M2P Legal TC", var(--serif); font-weight: 800; letter-spacing: -.005em; }
.legal__updated {
  display: inline-block; margin-top: 12px; padding: 4px 14px; border-radius: 999px;
  font-family: var(--serif); font-size: 14px; font-weight: 600; color: var(--hint);
  background: rgba(255, 249, 233, .86); border: 1px solid var(--gold-line);
}

.legal__card {
  position: relative;
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(28px, 4vw, 60px);
  padding: clamp(22px, 4.4vw, 60px);
  background: var(--card) url("../img/paper.webp") 0 0 / 512px;
  border: 1px solid #C9A257; border-radius: 28px;
  box-shadow: 0 44px 80px -48px rgba(59, 42, 28, .6), inset 0 1px 0 #fff;
}
.legal__card::before {
  content: ""; position: absolute; inset: 10px; border-radius: 20px; pointer-events: none;
  border: 1.5px solid rgba(184, 134, 46, .45);
}
.legal__card::after { content: ""; position: absolute; inset: 4px; pointer-events: none; background: var(--frame-corners); }
.toc, .legal__body { position: relative; z-index: 1; min-width: 0; }

.toc details { position: sticky; top: calc(var(--nav-h) + 24px); }
.toc summary {
  list-style: none; margin-bottom: 12px;
  font-family: var(--serif); font-size: 13px; font-weight: 800; letter-spacing: .24em; color: var(--gold-deep);
}
.toc summary::-webkit-details-marker { display: none; }
.toc ol {
  list-style: none; margin: 0; padding: 0;
  max-height: calc(100vh - var(--nav-h) - 120px); overflow: auto; overscroll-behavior: contain;
  border-left: 1px solid var(--gold-line);
}
.toc a {
  display: block; margin-left: -1px; padding: 6px 0 6px 14px;
  border-left: 2px solid transparent;
  font-size: 14px; line-height: 1.45; text-decoration: none; color: var(--ink-soft);
  transition: color .2s, border-color .2s;
}
.toc a:hover { color: var(--jade-deep); }
.toc a[aria-current] { color: var(--jade-deep); border-left-color: var(--gold-deep); font-weight: 800; }

.legal__body { max-width: 780px; font-size: 16.5px; line-height: 1.9; color: var(--ink); }
.legal__body p { margin: 0 0 14px; }
.legal__intro p:first-child { font-size: 17.5px; }
.legal__sec {
  margin-top: 18px; padding-top: 22px;
  border-top: 1px solid rgba(184, 134, 46, .24);
  scroll-margin-top: calc(var(--nav-h) + 18px);
}
.legal__sec h2 { margin: 0 0 12px; font-size: clamp(19px, 2vw, 22px); font-weight: 800; line-height: 1.45; color: var(--jade-deep); }
.legal__body h3 { margin: 20px 0 8px; font-size: 17px; font-weight: 800; color: var(--ink); }
.legal__body ul, .legal__body ol { margin: 0 0 14px; padding-left: 1.35em; }
.legal__body li { margin: 5px 0; padding-left: .2em; }
.legal__body li::marker { color: var(--gold-deep); font-weight: 800; }
.legal__body strong { font-weight: 800; }
.legal__body a { color: var(--jade); text-decoration: underline 1px rgba(46, 122, 96, .45); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal__body a:hover { text-decoration-color: currentColor; }
/* Apple's EULA terms: set apart so reviewers and players can find them. */
.legal__sec[id$="--apple-eula"] {
  margin-top: 30px; padding: 24px clamp(18px, 3vw, 30px) 8px;
  border: 1px solid rgba(46, 122, 96, .32); border-radius: 18px;
  background: rgba(46, 122, 96, .06);
}
.todo {
  padding: 1px 6px; border-radius: 6px; font-weight: 800; color: #9B2C1D;
  background: #FCE3DC; border: 1px dashed var(--red);
}
.contact-card {
  display: grid; gap: 4px; margin: 4px 0 14px; padding: 16px 20px;
  font-style: normal; border-radius: 14px;
  background: rgba(255, 255, 255, .62); border: 1px solid var(--gold-line);
}
.contact-card strong { font-size: 17px; }
.contact-card__k { display: inline-block; min-width: 5em; margin-right: 8px; font-size: 14px; color: var(--hint); }

@media (max-width: 1023px) {
  .legal__card { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .toc details {
    position: static; padding: 12px 18px; border-radius: 14px;
    background: rgba(255, 252, 243, .92); border: 1px solid var(--gold-line);
  }
  .toc summary { display: flex; align-items: center; justify-content: space-between; margin: 0; cursor: pointer; }
  .toc summary::after {
    content: ""; width: 8px; height: 8px; margin-right: 4px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); transition: transform .25s var(--ease);
  }
  .toc details[open] summary::after { transform: rotate(-135deg); }
  .toc details[open] summary { margin-bottom: 8px; }
  .toc ol { max-height: none; border-left: 0; }
  .toc a { padding: 7px 0; border-left: 0; margin: 0; }
  .legal__body { font-size: 16px; line-height: 1.85; }
}
@media (max-width: 640px) {
  .legal__card { border-radius: 22px; padding: 22px 18px 26px; }
  .legal__card::before { inset: 7px; border-radius: 16px; }
  .legal-switch a { padding: 7px 14px; font-size: 14px; }
}

.to-top {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40;
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  color: var(--gold); background: rgba(15, 42, 35, .88);
  border: 1.5px solid rgba(227, 189, 100, .85);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, .6);
  opacity: 0; pointer-events: none; translate: 0 10px;
  transition: opacity .25s, translate .25s var(--ease);
}
.to-top.is-on { opacity: 1; pointer-events: auto; translate: 0 0; }
.to-top svg { width: 20px; height: 20px; transform: rotate(-90deg); }

@media print {
  .nav, .footer, .to-top, .legal-hero, .legal-switch, .toc, .skip { display: none !important; }
  .legal-page { background: #fff; }
  .legal-wrap { padding: 0; }
  .legal__card { display: block; padding: 0; border: 0; box-shadow: none; background: none; }
  .legal__card::before, .legal__card::after { display: none; }
  .legal__title { color: #000; text-shadow: none; }
  .legal__body, .legal__body a, .legal__sec h2 { color: #000; }
  .legal__sec[id$="--apple-eula"] { border: 0; background: none; padding: 0; }
}
