/* marshmob.app: the game's Bubbly Candy look (client/Assets/Game/UI/Candy): pastel sky, grape ink, bubblegum pink,
   cream plates, a dark grape footer. No menu bar: the footer holds every link and the language switch.
   Display faces are the game's own, SIL Open Font License 1.1 (client/Assets/Game/UI/Fonts, art/fonts): Lilita One
   (EN), Jua (KO), M PLUS Rounded 1c ExtraBold (JA), subset by web/tools/fonts.py. Body text is the system face.
   Asset URLs (the asset scheme) are rewritten by web/build.py to the fingerprinted file. No inline styles anywhere (CSP). */

@font-face { font-family: "Lilita One"; src: url("/assets/lilita.9d256a925c.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Jua"; src: url("/assets/jua.6083b08d73.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "M PLUS Rounded 1c"; font-weight: 800; src: url("/assets/mplus.576398cfc2.woff2") format("woff2"); font-display: swap; }

:root {
  --ink: #2b1458;
  --ink-2: #4a3a7a;
  --grape: #6a32d6;
  --grape-deep: #3a1d78;
  --pink: #ff4fa3;
  --pink-ink: #d0186f;
  --lime: #48e06e;
  --cream: #fffaf4;
  --foam: #fbf0ff;
  --blush: #ffe8f5;
  --peach: #fff0e3;
  --night: #2b1458;
  --row: #f7f0ff;
  --line: #ecdfff;
  --dev: #ffcf0d;
  --r-sr: #3e8bff;
  --r-ssr: #a35bff;
  --r-ur: #ffc23d;
  --r-ur-2: #ff9f1a;
  --r-mr: #7fe7ff;
  --r-mr-2: #c9a7ff;
  --r-mr-3: #9ff5c8;
  --display: "Lilita One", ui-rounded, system-ui, sans-serif;
  --dw: 400;
  --body: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Noto Sans KR",
    "Malgun Gothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  --gutter: 16px;
  --wrap: 1180px;
  --sticker: 0 3px 0 #fff, 3px 0 0 #fff, -3px 0 0 #fff, 0 -3px 0 #fff, 2px 2px 0 #fff, -2px 2px 0 #fff, 2px -2px 0 #fff,
    -2px -2px 0 #fff, 0 8px 0 rgba(123, 63, 228, .2);
  color-scheme: light;
}
.lang-ko { --display: "Jua", "Lilita One", ui-rounded, system-ui, sans-serif; }
.lang-ja { --display: "M PLUS Rounded 1c", "Lilita One", "Hiragino Maru Gothic ProN", ui-rounded, system-ui, sans-serif; --dw: 800; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--foam);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
.lang-ko body { word-break: keep-all; overflow-wrap: anywhere; }
.lang-ja body { line-break: strict; }
h1, h2, h3, .disp { font-family: var(--display); font-weight: var(--dw); font-synthesis: none; }
.ph { display: inline-block; }
.lang-ja :is(h1, h2, h3, .disp) { word-break: auto-phrase; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--grape); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--grape-deep); outline-offset: 3px; border-radius: 8px; }
main:focus { outline: none; }
.skip {
  position: absolute; left: 8px; top: -80px; z-index: 100; padding: 10px 16px; border-radius: 12px;
  background: #fff; color: var(--grape-deep); font-weight: 800; box-shadow: 0 8px 20px -8px rgba(43, 20, 88, .5);
}
.skip:focus { top: 8px; }
.devchip + main .doc-head { padding-top: 52px; }
.devchip {
  position: absolute; z-index: 60; top: max(10px, env(safe-area-inset-top)); left: 10px; margin: 0; padding: 3px 10px;
  font-size: 12px; font-weight: 800; line-height: 1.5; color: #2a2000; background: var(--dev); border-radius: 999px;
  box-shadow: 0 4px 12px -4px rgba(43, 20, 88, .45); pointer-events: none;
}

/* ---------------------------------------------------------------- shared type */

.sticker-h {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 50px);
  line-height: 1.08;
  color: var(--grape-deep);
  text-shadow: var(--sticker);
  text-wrap: balance;
}
.candy-h {
  margin: 0;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.04;
  color: #fff;
  text-wrap: balance;
  text-shadow:
    0 3px 0 var(--grape-deep), 3px 0 0 var(--grape-deep), -3px 0 0 var(--grape-deep), 0 -3px 0 var(--grape-deep),
    2px 2px 0 var(--grape-deep), -2px 2px 0 var(--grape-deep), 2px -2px 0 var(--grape-deep), -2px -2px 0 var(--grape-deep),
    0 7px 0 var(--grape-deep), 0 12px 22px rgba(43, 20, 88, .35);
}
.sec-sub { margin: 12px 0 0; max-width: 32em; font-size: 17px; color: var(--ink-2); text-wrap: pretty; }
.sec-head { text-align: center; }
.sec-head .sec-sub { margin-left: auto; margin-right: auto; }

/* The one edge: a row of foam bubbles (hero bottom, footer top). */
.edge, .foot::before {
  -webkit-mask: url("/assets/foam.8f0d9a5e7f.svg") repeat-x 0 100% / 400px 56px;
  mask: url("/assets/foam.8f0d9a5e7f.svg") repeat-x 0 100% / 400px 56px;
}

/* Rarity pills (the game's colours): the landing's cards and the odds page. */
.pill { flex: none; display: inline-block; font-family: var(--body); font-weight: 900; font-size: 13px; line-height: 1.5; letter-spacing: .03em; color: #fff; padding: 1px 9px; border-radius: 999px; }
.pill-sr { background: #2563d6; }
.pill-ssr { background: #8a3fe8; }
.pill-ur { background: linear-gradient(180deg, var(--r-ur), var(--r-ur-2)); color: #3b2400; }
.pill-mr { background: linear-gradient(90deg, var(--r-mr), var(--r-mr-2), var(--r-mr-3)); color: #1d1a4a; }

/* ---------------------------------------------------------------- landing: hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(170deg, #d4c0ff 0%, #ecccf7 42%, #ffd9ea 70%, #ffe6dc 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 70% 42% at 50% 64%, rgba(255, 245, 252, .7), rgba(255, 245, 252, 0) 72%);
}
.hero-media {
  position: relative;
  height: clamp(300px, 50vh, 460px);
  height: clamp(300px, 50svh, 460px);
  -webkit-mask-image: linear-gradient(180deg, #000 56%, transparent 98%);
  mask-image: linear-gradient(180deg, #000 56%, transparent 98%);
}
.hero-poster, .hero-poster img, .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-poster img, .hero-video { object-fit: cover; object-position: 50% 0; max-width: none; } /* phones: a 1296x1440 take, near the box's shape; a short box (SE) keeps the top hive and its crown, and crops the bottom (under the logo) */
.hero-video { opacity: 0; transition: opacity .6s ease; }
.hero-media.is-playing .hero-video { opacity: 1; }
.vbtn {
  position: absolute; z-index: 6; top: max(12px, env(safe-area-inset-top)); right: 12px;
  width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  color: var(--grape-deep);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 3px 0 rgba(58, 29, 120, .22), 0 10px 20px -8px rgba(43, 20, 88, .55);
}
.vbtn[hidden] { display: none; }
.vbtn svg { width: 22px; height: 22px; fill: currentColor; }
.vbtn .i-pause, .vbtn[aria-pressed="true"] .i-play { display: none; }
.vbtn[aria-pressed="true"] .i-pause { display: block; }
.vbtn:focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px var(--grape-deep); }

.hero-in { position: relative; z-index: 3; margin-top: -104px; padding: 0 var(--gutter) 124px; text-align: center; }
.brand { margin: 0 auto; width: min(330px, 88%); }
.brand .logo { width: 100%; filter: drop-shadow(0 8px 14px rgba(58, 29, 120, .35)); }
.brand .ribbon { width: 76%; margin: -4px auto 0; filter: drop-shadow(0 5px 8px rgba(58, 29, 120, .22)); }
.lang-ko .brand { width: min(240px, 66%); }
.lang-ko .brand .ribbon { width: 92%; margin-top: -2px; }
.lede { margin: 14px auto 6px; font-size: 25px; line-height: 1.12; color: var(--grape-deep); text-wrap: balance; }
.lede > span { display: block; }
.lede .l2 { color: var(--pink-ink); }
.hero-lead { margin: 0 auto 16px; max-width: 30em; font-size: 16px; line-height: 1.5; font-weight: 600; color: var(--ink-2); text-wrap: pretty; }

/* Store badges: official artwork, unmodified (web/README.md "Store badges"). App Store first, both black and the same
   height; a quarter of the badge's height clear on every side (the padding); a solid cream plate behind. */
.get {
  display: inline-flex; flex-direction: column; align-items: center; max-width: 100%;
  padding: 10px 8px 12px; /* both Korean badges fit one row on a 375 px phone */
  background: var(--cream);
  border: 3px solid #fff;
  border-radius: 26px;
  box-shadow: 0 2px 0 rgba(255, 255, 255, .9) inset, 0 22px 40px -22px rgba(58, 29, 120, .6);
}
.soon { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; font-size: 19px; line-height: 1.2; color: var(--grape-deep); }
.soon-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(72, 224, 110, .28); }
.badges { display: flex; flex-wrap: wrap; justify-content: center; margin: 0; padding: 0; list-style: none; }
.badge { display: block; padding: 11px 6px; border-radius: 12px; }
.badge img { height: 44px; width: auto; }
.badges li { display: flex; flex-direction: column; align-items: center; }
.badge-soon { font-size: 12px; font-weight: 800; color: var(--ink-2); }
.get-fine { display: flex; flex-wrap: wrap; justify-content: center; margin: 0; padding: 0; list-style: none; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.get-fine li + li::before { content: "\00b7"; margin: 0 7px; color: var(--pink-ink); font-weight: 900; }

.hero-crits { position: absolute; z-index: 4; left: 0; right: 0; bottom: 24px; height: 0; width: min(100%, var(--wrap)); margin: 0 auto; pointer-events: none; }
.crit { position: absolute; bottom: 0; filter: drop-shadow(0 8px 8px rgba(58, 29, 120, .3)); }
.crit.c1 { left: 5%; width: 62px; }
.crit.c2 { right: 6%; width: 74px; }
.crit.c3 { right: 26%; width: 52px; bottom: -10px; }
.edge { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 3; height: 56px; background: var(--foam); }

@media (min-width: 600px) {
  .hero-media { height: min(56.25vw, 56vh); height: min(56.25vw, 56svh); }
  .hero-poster img, .hero-video { object-position: 50% 50%; }
  .hero-in { margin-top: -120px; padding-bottom: 136px; }
  .brand { width: min(440px, 80%); }
  .lang-ko .brand { width: min(320px, 60%); }
  .lede { font-size: 30px; }
  .hero-lead { font-size: 17px; }
  .crit.c1 { left: 8%; width: 84px; }
  .crit.c2 { right: 9%; width: 96px; }
  .crit.c3 { right: 22%; width: 66px; }
}

@media (min-width: 960px) {
  .hero { min-height: min(100vh, 880px); min-height: min(100svh, 880px); display: flex; align-items: center; }
  .hero::after { background: radial-gradient(ellipse 42% 60% at 22% 50%, rgba(255, 245, 252, .82), rgba(255, 245, 252, 0) 74%); }
  .hero-media {
    position: absolute; inset: 0 0 0 34%; height: auto;
    left: max(34%, calc(50% - var(--wrap) / 2 + 360px)); /* wider than 1440: keeps 1440's copy-to-video spacing (no hive under the copy) */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .45) 12%, #000 30%);
    mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .45) 12%, #000 30%);
  }
  .hero-poster img, .hero-video { object-position: 62% 0; } /* the top, right and lower-right hives whole beside the copy; a box wider than 16:9 (2700+ px screens) crops the bottom, not the crowned top hive */
  .vbtn { top: auto; bottom: 86px; right: 28px; width: 52px; height: 52px; }
  .hero-in { width: min(100%, var(--wrap)); margin: 0 auto; padding: 64px var(--gutter) 150px; text-align: left; }
  .hero-in > * { max-width: 540px; }
  .brand, .lang-ko .brand { margin: 0; }
  .brand { width: 500px; }
  .lang-ko .brand { width: 380px; }
  .lede { margin: 22px 0 8px; font-size: clamp(30px, 2.7vw, 38px); }
  .hero-lead { margin: 0 0 22px; font-size: 18px; max-width: 25em; }
  .get { align-items: flex-start; padding: 12px 14px 14px; }
  .soon { margin-left: 7px; }
  .badges { justify-content: flex-start; }
  .badge { padding: 13px 7px; }
  .badge img { height: 52px; }
  .get-fine { justify-content: flex-start; margin-left: 7px; font-size: 14px; }
  .hero-crits { bottom: 30px; }
  .crit.c1 { left: 24px; width: 92px; }
  .crit.c2 { left: 128px; right: auto; width: 110px; bottom: 6px; }
  .crit.c3 { left: 250px; right: auto; width: 74px; bottom: -8px; }
}

/* ---------------------------------------------------------------- landing: six hives */

.rivals { position: relative; padding: 36px var(--gutter) 76px; background: linear-gradient(180deg, var(--foam), var(--blush)); overflow: hidden; }
.rivals-in { width: min(100%, var(--wrap)); margin: 0 auto; display: grid; gap: 30px; }
.rivals-copy { text-align: center; }
.rivals-copy .sec-sub { margin-left: auto; margin-right: auto; }
.window {
  position: relative; margin: 0 auto; width: min(100%, 420px);
  padding: 10px;
  border-radius: 38px;
  background: linear-gradient(150deg, #ff8ccb 0%, #c27bff 50%, #7b8cff 100%);
  box-shadow: 0 0 0 5px #fff, 0 8px 0 5px #ecdcff, 0 36px 64px -26px rgba(58, 29, 120, .6);
  rotate: -1.5deg;
}
.window img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 52%; border-radius: 29px; }
.beats { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 14px; width: min(100%, 520px); }
.beats li {
  display: flex; gap: 14px; align-items: center;
  padding: 12px 18px 12px 12px;
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 4px 0 #f0dcff, 0 14px 26px -16px rgba(58, 29, 120, .45);
}
.beats img { width: 58px; flex: none; }
.beats h3 { margin: 0; font-size: 21px; line-height: 1.15; color: var(--grape-deep); }
.beats p { margin: 3px 0 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); }

@media (min-width: 900px) {
  .rivals { padding: 56px var(--gutter) 96px; }
  .rivals-in {
    grid-template-columns: minmax(0, 470px) minmax(0, 1fr);
    grid-template-areas: "win copy" "win beats";
    column-gap: 76px; row-gap: 28px; align-items: center;
  }
  .window { grid-area: win; width: 100%; }
  .window img { aspect-ratio: 900 / 1086; }
  .rivals-copy { grid-area: copy; align-self: end; text-align: left; }
  .rivals-copy .sec-sub { margin-left: 0; font-size: 19px; }
  .beats { grid-area: beats; align-self: start; margin: 0; }
}

/* ---------------------------------------------------------------- landing: collect */

.collect { padding: 52px var(--gutter) 60px; background: linear-gradient(180deg, var(--blush), var(--peach)); overflow: hidden; }
.fan { list-style: none; margin: 34px auto 0; padding: 0 0 30px; display: flex; justify-content: center; align-items: flex-end; }
.card { position: relative; flex: none; width: 112px; margin: 0 -6px; transform-origin: 50% 100%; transition: translate .25s ease; }
.card:nth-child(1), .card:nth-child(5) { display: none; }
.card:nth-child(2) { rotate: -7deg; translate: 0 14px; }
.card:nth-child(3) { z-index: 2; width: 136px; }
.card:nth-child(4) { rotate: 7deg; translate: 0 14px; }
.card-art { position: relative; aspect-ratio: 360 / 504; filter: drop-shadow(0 18px 18px rgba(58, 29, 120, .32)); }
.card-art::before { content: ""; position: absolute; inset: 3%; border-radius: 10%/7%; background: var(--well); }
.r-sr { --well: radial-gradient(circle at 50% 36%, #e3f0ff 0, #8fbaff 55%, #3f6fe0 100%); }
.r-ssr { --well: radial-gradient(circle at 50% 36%, #f3e6ff 0, #c39bff 55%, #7a3fd8 100%); }
.r-ur { --well: radial-gradient(circle at 50% 36%, #fff8d6 0, #ffd36a 55%, #f59a16 100%); }
.r-mr { --well: radial-gradient(circle at 50% 36%, #ffffff 0, #c9f3ff 35%, #d7b8ff 70%, #ffb8e2 100%); }
.card .unit { position: absolute; left: 6%; top: 7%; width: 88%; }
.card .frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.card-name {
  position: absolute; left: 7%; right: 7%; bottom: 6%; margin: 0; padding: 5px 4px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 1px; text-align: center;
  background: rgba(255, 250, 244, .96); border-radius: 12px; box-shadow: 0 3px 0 rgba(58, 29, 120, .12);
}
.card-name b { font-size: 14px; line-height: 1.1; color: var(--grape-deep); }
.card-name .role { font-size: 11px; font-weight: 700; line-height: 1.2; color: var(--ink-2); }
.card-name .pill { position: absolute; top: -11px; font-size: 11px; padding: 0 7px; box-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.odds-note { margin: 4px auto 0; max-width: 34em; text-align: center; font-size: 14px; font-weight: 600; color: var(--ink-2); }

@media (min-width: 700px) {
  .card:nth-child(1), .card:nth-child(5) { display: block; }
  .card { width: 164px; margin: 0 -12px; }
  .card:nth-child(1) { rotate: -13deg; translate: 0 34px; }
  .card:nth-child(2) { rotate: -6.5deg; translate: 0 8px; }
  .card:nth-child(3) { width: 196px; }
  .card:nth-child(4) { rotate: 6.5deg; translate: 0 8px; }
  .card:nth-child(5) { rotate: 13deg; translate: 0 34px; }
  .card-name b { font-size: 16px; }
  .card-name .role { font-size: 12px; }
}
@media (min-width: 1100px) {
  .card { width: 190px; margin: 0 -10px; }
  .card:nth-child(3) { width: 224px; }
  .card-name b { font-size: 18px; }
}
@media (hover: hover) {
  .card:hover { translate: 0 -10px; z-index: 3; }
  .card:nth-child(1):hover, .card:nth-child(5):hover { translate: 0 22px; }
}

/* ---------------------------------------------------------------- landing: finale */

.finale { padding: 10px var(--gutter) 110px; background: linear-gradient(180deg, var(--peach), var(--blush)); }
.finale-card {
  position: relative; isolation: isolate;
  width: min(100%, var(--wrap)); min-height: 430px; margin: 24px auto 0;
  display: flex; align-items: flex-end;
  border: 5px solid #fff;
  border-radius: 34px;
  box-shadow: 0 30px 60px -28px rgba(58, 29, 120, .7);
}
.finale-art { position: absolute; inset: 0; z-index: -2; border-radius: 29px; overflow: hidden; }
.finale-art img { width: 100%; height: 100%; object-fit: cover; object-position: 64% 30%; }
.finale-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 29px;
  background: linear-gradient(180deg, rgba(255, 236, 248, 0) 30%, rgba(255, 236, 248, .94) 70%);
}
.party { display: none; position: absolute; z-index: 2; filter: drop-shadow(0 12px 12px rgba(58, 29, 120, .35)); }
.finale-in { width: 100%; padding: 26px 20px 30px; text-align: center; }
.finale-in .candy-h { margin: 0 auto; max-width: 10em; }
.finale-in p { margin: 12px 0 0; font-size: 21px; line-height: 1.25; color: var(--grape-deep); }

@media (min-width: 760px) {
  .finale-card { min-height: 420px; margin-top: 40px; align-items: center; border-radius: 44px; }
  .finale-art, .finale-card::before { border-radius: 39px; }
  .finale-art img { object-position: 50% 40%; }
  .finale-card::before {
    background: radial-gradient(ellipse 52% 90% at 14% 50%, rgba(255, 238, 250, .95), rgba(255, 238, 250, .72) 46%, rgba(255, 238, 250, 0) 78%);
  }
  .finale { padding-top: 30px; }
  .party { display: block; width: 150px; right: 6%; top: -84px; rotate: 8deg; }
  .finale-in { width: auto; max-width: 600px; padding: 44px 54px; text-align: left; }
  .finale-in .candy-h { margin: 0; }
  .finale-in p { font-size: 24px; }
}

/* ---------------------------------------------------------------- footer (every link and the language switch) */

.foot { position: relative; color: #e9e0ff; background: var(--night); font-size: 15px; }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: -55px; height: 56px; background: var(--night); pointer-events: none; }
.foot-in { width: min(100%, var(--wrap)); margin: 0 auto; padding: 34px var(--gutter) 22px; display: grid; gap: 26px; }
.foot-logo { display: inline-block; border-radius: 12px; }
.foot-mark { width: 168px; }
.lang-ko .foot-mark { width: 124px; }
.foot-brand p { margin: 6px 0 0; color: #c2b3f0; }
.foot-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.foot h2 { margin: 0 0 2px; font-family: var(--body); font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #c2b3f0; }
.lang-ko .foot h2, .lang-ja .foot h2 { letter-spacing: 0; text-transform: none; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 12px 0 0; color: #fff; font-weight: 600; text-decoration: none; } /* 44 px targets */
.foot-nav a:hover, .foot-nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--pink); text-decoration-thickness: 2px; }
.foot :focus-visible { outline-color: #fff; }
.lang-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-pills a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 700; color: #fff; text-decoration: none;
  background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .2);
}
.lang-pills a[aria-current] { background: #fff; color: var(--grape-deep); box-shadow: 0 3px 0 #b9a6f0; }
.foot-legal {
  width: min(100%, var(--wrap)); margin: 0 auto; padding: 16px var(--gutter) max(30px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, .14); color: #bfb0ea; font-size: 13px; line-height: 1.55;
}
.foot-legal p { margin: 4px 0; }
.foot-legal a { color: #fff; font-weight: 700; }
.foot-legal .tm { color: #a898d6; font-size: 12px; }
@media (min-width: 760px) {
  .foot-in { grid-template-columns: 1fr 1.3fr 1fr; gap: 36px; padding-top: 40px; }
}

/* ---------------------------------------------------------------- odds, support and legal pages */

.doc-head {
  position: relative; padding: 26px var(--gutter) 100px; text-align: center;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #d4c0ff, #f3d4f3 62%, var(--foam));
}
.doc-logo { display: inline-block; border-radius: 14px; }
.doc-mark { width: 190px; filter: drop-shadow(0 6px 10px rgba(58, 29, 120, .3)); }
.lang-ko .doc-mark { width: 140px; }
.doc-head h1 { margin: 16px auto 0; max-width: 18em; font-size: clamp(34px, 5.4vw, 56px); line-height: 1.06; color: var(--grape-deep); text-shadow: var(--sticker); text-wrap: balance; }
.doc-head .eff { display: inline-block; margin: 16px 0 0; padding: 4px 14px; border-radius: 999px; background: rgba(255, 255, 255, .78); font-weight: 700; font-size: 15px; color: var(--grape-deep); }
.doc { padding: 0 var(--gutter) 110px; }
.paper {
  position: relative; z-index: 2;
  width: min(100%, 860px); margin: -60px auto 0;
  padding: 26px 20px 30px;
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 6px 0 #efdcff, 0 30px 60px -36px rgba(58, 29, 120, .55);
  font-size: 16.5px; line-height: 1.7;
}
@media (min-width: 760px) { .paper { padding: 40px 50px 46px; border-radius: 34px; } }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 1.9em 0 .5em; font-size: clamp(22px, 3vw, 27px); line-height: 1.2; color: var(--grape-deep); scroll-margin-top: 16px; }
.prose h3 { margin: 1.5em 0 .35em; font-family: var(--body); font-weight: 800; font-size: 18px; line-height: 1.35; color: var(--grape-deep); }
.prose p, .prose ul, .prose ol { margin: 0 0 .9em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--pink-ink); }
.prose a { color: var(--grape); font-weight: 700; }
.prose strong { font-weight: 800; }
.lead { font-size: 1.1em; }
.fine { font-size: 14.5px; color: var(--ink-2); }
.notice { border-left: 4px solid var(--pink); background: var(--row); padding: 10px 14px; border-radius: 0 12px 12px 0; font-weight: 600; }
.summary { margin: 1.2em 0 1.6em; padding: 6px 22px 8px; border-radius: 22px; background: linear-gradient(160deg, #fff4fb, #f4ecff); box-shadow: inset 0 0 0 2px #f0dcff; }
.summary h2 { margin: .8em 0 .2em; font-size: 20px; }
mark.todo { background: var(--dev); color: #2a2000; padding: 0 .3em; border-radius: 4px; font-weight: 700; }
.links { display: flex; flex-wrap: wrap; gap: 6px 14px; }

.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: .8em 0 1.2em; border-radius: 16px; box-shadow: inset 0 0 0 2px var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; }
th, td { text-align: left; padding: 9px 12px; vertical-align: top; }
thead th { background: var(--row); font-size: 13px; color: var(--grape-deep); font-weight: 800; white-space: nowrap; }
tbody tr + tr > * { border-top: 1px solid var(--line); }
tbody th { font-weight: 700; white-space: nowrap; color: var(--grape-deep); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th .sub { font-weight: 600; font-size: 11px; }
table.grid tbody tr:nth-child(odd) { background: #fcf9ff; }

.toc { background: var(--row); border-radius: 18px; padding: 4px 20px 10px; margin: 1.4em 0; }
.toc h2 { margin: 12px 0 4px; font-family: var(--body); font-weight: 800; font-size: 15px; color: var(--ink-2); }
.toc ol { columns: 2 220px; margin: 0; }
.tier { border-radius: 20px; margin: 14px 0; overflow: hidden; box-shadow: inset 0 0 0 2px var(--line); }
.tier header { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--row); }
.tier .tbl { box-shadow: none; border-radius: 0; margin: 0; }
.tier .fine { margin: 0; padding: 8px 14px 12px; }
.tier-note { flex: 1; font-size: 14.5px; color: var(--ink-2); line-height: 1.4; }
.tier-pct { font-size: 22px; font-weight: 800; color: var(--grape-deep); }
.rules li { margin: .45em 0; }
.rotation { columns: 2 200px; }
.snacks { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 0 18px; }
.snack h3 { margin-top: 1em; }
.source { margin-top: 2em; word-break: break-all; }
@media (max-width: 560px) {
  body { font-size: 16px; }
  th, td { padding: 8px 9px; }
  .tier header { flex-wrap: wrap; }
  .tier-note { order: 3; flex-basis: 100%; }
  .tier-pct { margin-left: auto; }
}

/* ---------------------------------------------------------------- motion (none for people who ask for less) */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  /* the critters hop in and settle within 5 s (WCAG 2.2.2: no endless decorative motion) */
  .hero .crit { animation: bounce-in .9s cubic-bezier(.2, 1.5, .45, 1) both, bob 1.6s .9s ease-in-out 2; }
  .hero .crit.c2 { animation-delay: .15s, 1.05s; }
  .hero .crit.c3 { animation-delay: .3s, 1.2s; }
}
@keyframes bounce-in { 0% { opacity: 0; transform: translateY(90px) scale(.7); } 60% { opacity: 1; transform: translateY(-14px) scale(1.04); } 100% { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

@media print {
  body { background: #fff; }
  .foot, .devchip, .vbtn, .skip, .hero-media, .hero-crits, .edge, .toc { display: none; }
  .doc-head { background: none; padding-bottom: 10px; }
  .paper { box-shadow: none; margin-top: 0; padding: 0; }
}
