/* Copyright (c) 2026 matoio.com. All rights reserved. */
/*
 * Draft B, 漫画: the app's default theme as a comic book. Cream halftone paper, ink
 * outlines and hard offset shadows, yellow highlighter, 庆科黄油体 and Bangers for
 * headings (never for names: names stay in the reading face, as in the app). Night is
 * the app's deep-blue night print with cream ink.
 */

:root {
  --paper: #fff8e7;
  --card: #fffdf6;
  --ink: #141414;
  --ink-2: #3c3a36;
  --ink-3: #6a665e;
  --dot: rgb(20 20 20 / 0.09);
  --yellow: #ffd23f;
  --sky: #5cc8ff;
  --red: #ff3b30;
  --leaf: #12c578;
  --pink: #ff8fc7;
  --hard: 6px 6px 0 var(--ink);
  --hard-sm: 3px 3px 0 var(--ink);
  --bw: 3px;
  --b-display: "Bangers", "QingKe", var(--mo-font-cjk);
  --b-body: "Nunito", var(--mo-font-cjk);
  /* The kit's header and footer follow the comic paper. */
  --mo-bg: var(--paper); --mo-ink: var(--ink); --mo-ink-2: var(--ink-2); --mo-ink-3: var(--ink-3);
  --mo-line: rgb(20 20 20 / 0.14); --mo-line-strong: var(--ink); --mo-accent: var(--red); --mo-on-accent: #fff; --mo-surface-solid: var(--card);
  --mo-font-ui: var(--b-body);
}
/* In Chinese, the Latin words inside a heading (Mato TV, AI, Bot) take 庆科's own Latin, so they
   carry the same weight as the Chinese around them; English headings stay in Bangers. */
:root[lang="zh"] { --b-display: "QingKe", "Bangers", var(--mo-font-cjk); }
:root[data-theme="dark"] {
  --paper: #1c1936;
  --card: #26224a;
  --ink: #f6eedb;
  --ink-2: #d9d0bb;
  --ink-3: #a9a08c;
  --dot: rgb(246 238 219 / 0.07);
  --hard: 6px 6px 0 #07061a;
  --hard-sm: 3px 3px 0 #07061a;
  --mo-on-accent: #fff;
}

body { font-family: var(--b-body); background: var(--paper) radial-gradient(var(--dot) 1.1px, transparent 1.4px) 0 0 / 10px 10px; overflow-x: clip; }
.wrap { max-width: var(--mo-maxw); margin: 0 auto; padding: 0 var(--mo-gutter); }
[data-icon] svg { width: 18px; height: 18px; flex: none; }
.mo-header[data-solid="true"] { background: color-mix(in srgb, var(--paper) 90%, transparent); border-bottom: var(--bw) solid var(--ink); }
.mo-header .mo-btn, .mo-icon-btn { border-width: 2px; }

/* Buttons: thick outline, hard shadow, they press in. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px;
  border: var(--bw) solid var(--ink); border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: var(--hard-sm);
  font: 800 16px/1 var(--b-body); text-decoration: none; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn-hot { background: var(--red); color: #fff; }
:root[data-theme="dark"] .btn-hot { color: #fff; }
.btn-sq { min-height: 44px; width: 44px; padding: 0; }
.is-off { opacity: 0.55; pointer-events: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.fine { margin: 14px 0 0; color: var(--ink-3); font-size: 14px; }
.fine a { color: var(--red); font-weight: 800; }

.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 7px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--yellow); color: #141414; font: 800 13px/1 var(--b-body); letter-spacing: 0.06em; box-shadow: var(--hard-sm); transform: rotate(-1.5deg); }
.kicker .mo-num { font-family: "Bangers", sans-serif; font-size: 16px; letter-spacing: 0.06em; }
.sec { padding: clamp(80px, 11vw, 150px) 0; }
.sec-head { max-width: 820px; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-title { margin: 0; font: 400 clamp(40px, 5.6vw, 88px)/1.08 var(--b-display); letter-spacing: 0.01em; text-wrap: balance; }
.sec-title mark, .cover-title mark { background: none; color: inherit; position: relative; z-index: 0; white-space: nowrap; }
.sec-title mark::before, .cover-title mark::before { content: ""; position: absolute; z-index: -1; left: -0.08em; right: -0.08em; bottom: 0.06em; height: 0.42em; background: var(--yellow); transform: skew(-8deg) rotate(-1deg); }
:root[data-theme="dark"] mark::before { opacity: 0.85; background: #e04f8f; }
.sec-sub { margin: 18px 0 0; max-width: 620px; color: var(--ink-2); font-size: clamp(16px, 1.3vw, 19px); }
.sec-head.center .sec-sub { margin-inline: auto; }

/* Pop in, comic style: from small and tilted, with a spring. */
.is-moving .pop { animation: pop 0.8s var(--mo-spring) both; animation-delay: var(--d, 0s); }
.is-moving .pop-fig { animation: pop-fig 1s var(--mo-spring) 0.2s both; }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(0.92) rotate(-2deg); } }
@keyframes pop-fig { from { opacity: 0; transform: scale(0.7) rotate(-8deg); } }
.is-moving [data-reveal] { transform: translateY(30px) scale(0.96) rotate(-1deg); transition: opacity 0.6s var(--mo-ease), transform 0.8s var(--mo-spring); }

/* ---------- Cover ---------- */
.cover { min-height: 100svh; display: grid; align-items: center; padding: calc(var(--mo-nav-h) + 40px) 0 80px; }
.cover-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.cover-title { margin: 0; font: 400 clamp(52px, 7vw, 112px)/1.04 var(--b-display); }
.cover-sub { margin: 24px 0 34px; max-width: 520px; color: var(--ink-2); font-size: clamp(16px, 1.35vw, 20px); }

.issue {
  position: relative; aspect-ratio: 3 / 4; width: min(100%, 520px); margin-inline: auto; overflow: hidden;
  border: 4px solid var(--ink); border-radius: 10px; background: var(--sky); box-shadow: 12px 12px 0 var(--ink);
  transform: rotate(2deg); transition: transform 0.25s ease-out;
}
:root[data-theme="dark"] .issue { box-shadow: 12px 12px 0 #07061a; background: #3b2f86; }
.issue-sun { position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg at 50% 56%, rgb(255 255 255 / 0.28) 0deg 9deg, transparent 9deg 18deg); animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.issue-mast { position: absolute; left: 0; right: 0; top: 0; margin: 0; padding: 14px 18px 10px; display: flex; align-items: baseline; justify-content: space-between; background: var(--red); border-bottom: 4px solid #141414; color: #fff; }
.issue-mast b { font: 400 clamp(38px, 4.4vw, 62px)/1 "Bangers", sans-serif; letter-spacing: 0.04em; text-shadow: 3px 3px 0 #141414; }
.issue-mast span { font: 400 22px/1 "QingKe", var(--mo-font-cjk); }
.issue-no { position: absolute; left: 16px; top: 96px; display: grid; justify-items: center; padding: 8px 10px; background: #fff; border: 3px solid #141414; border-radius: 8px; color: #141414; transform: rotate(-6deg); }
.issue-no b { font: 400 26px/1 "Bangers", sans-serif; }
.issue-no small { font: 800 11px/1.2 var(--b-body); }
.issue-lead { position: absolute; left: 50%; top: 54%; width: 64%; aspect-ratio: 1; transform: translate(-50%, -50%); }
.issue-lead .mo-face { width: 100% !important; height: 100% !important; filter: drop-shadow(6px 8px 0 rgb(20 20 20 / 0.35)); }
.is-moving .issue-lead .mo-face { animation: bob 4.5s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }
.burst {
  position: absolute; right: 6%; top: 24%; display: grid; place-items: center; width: 132px; aspect-ratio: 1; padding: 18px; text-align: center;
  background: var(--yellow); color: #141414; font: 400 22px/1.05 "QingKe", "Bangers", var(--mo-font-cjk);
  clip-path: polygon(50% 0, 61% 18%, 82% 8%, 80% 30%, 100% 34%, 86% 50%, 100% 66%, 80% 70%, 82% 92%, 61% 82%, 50% 100%, 39% 82%, 18% 92%, 20% 70%, 0 66%, 14% 50%, 0 34%, 20% 30%, 18% 8%, 39% 18%);
  transform: rotate(10deg); animation: throb 2.4s ease-in-out infinite;
}
@keyframes throb { 50% { transform: rotate(14deg) scale(1.08); } }
.issue-peek { position: absolute; left: 0; right: 0; bottom: -26px; display: flex; justify-content: space-around; padding: 0 6px; }
.issue-peek > span { width: 22%; aspect-ratio: 1; animation: peek 3.6s var(--mo-ease) infinite; animation-delay: var(--d, 0s); }
.issue-peek .mo-face { width: 100% !important; height: 100% !important; }
@keyframes peek { 0%, 100% { transform: translateY(18%); } 45%, 70% { transform: translateY(0); } }
.issue-price { position: absolute; right: 14px; bottom: 30%; padding: 6px 10px; border: 3px solid #141414; border-radius: 50%; background: #fff; color: #141414; font: 400 24px/1 "Bangers", sans-serif; transform: rotate(-12deg); }

/* ---------- Tapes ---------- */
.tapes { padding: 30px 0 60px; overflow: hidden; }
.tape { position: relative; border-block: var(--bw) solid var(--ink); background: var(--yellow); color: #141414; overflow: hidden; }
.tape-1 { transform: rotate(-2deg); margin: 0 -40px; z-index: 1; }
.tape-2 { transform: rotate(1.4deg); margin: -10px -40px 0; background: var(--card); padding: 22px 0; }
.tape-row { display: flex; width: max-content; align-items: center; will-change: transform; }
.tape-1 .tape-row { gap: 26px; padding: 14px 0; font: 400 clamp(38px, 5vw, 72px)/1 var(--b-display); white-space: nowrap; }
.tape-1 .star { width: 1em; height: 1em; display: grid; animation: wobble 2.4s var(--mo-spring) infinite; animation-delay: var(--d, 0s); }
.tape-1 .star .mo-face { width: 100% !important; height: 100% !important; }
@keyframes wobble { 0%, 60%, 100% { transform: rotate(-8deg); } 75% { transform: translateY(-8px) rotate(8deg); } 88% { transform: scale(1.1, 0.9); } }
.stickers { list-style: none; margin: 0; padding: 0; gap: 22px; }
.sticker { flex: none; width: 260px; padding: 14px; border: var(--bw) solid var(--ink); border-radius: 14px; background: color-mix(in srgb, var(--w) 22%, var(--card)); box-shadow: var(--hard-sm); color: var(--ink); transform: rotate(var(--r, -2deg)); transition: transform 0.35s var(--mo-spring); }
.sticker:hover { transform: rotate(0deg) scale(1.05); }
.sticker .art { display: grid; place-items: center; height: 120px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); color: var(--ink); }
.sticker .art svg { height: 100%; }
.sticker b { display: block; margin-top: 12px; font: 900 17px/1.3 var(--b-body); }
.sticker small { color: var(--ink-3); font-weight: 700; }

/* ---------- The strip ---------- */
.strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.panel { display: flex; flex-direction: column; border: var(--bw) solid var(--ink); border-radius: 10px; background: var(--card); box-shadow: var(--hard); overflow: hidden; }
.panel:nth-child(odd) { transform: rotate(-0.8deg); }
.panel:nth-child(even) { transform: rotate(0.8deg); }
.is-moving .panel[data-reveal] { transform: translateY(40px) scale(0.9) rotate(-4deg); }
.is-moving .panel[data-reveal].is-in:nth-child(odd) { transform: rotate(-0.8deg); }
.is-moving .panel[data-reveal].is-in:nth-child(even) { transform: rotate(0.8deg); }
.cap { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--yellow); border-bottom: var(--bw) solid var(--ink); color: #141414; font: 900 16px/1.2 var(--b-body); }
.cap b { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid #141414; border-radius: 50%; background: #fff; font: 400 18px/1 "Bangers", sans-serif; }
.panel-art { position: relative; height: 230px; background: radial-gradient(var(--dot) 1.2px, transparent 1.5px) 0 0 / 8px 8px, color-mix(in srgb, var(--sky) 22%, var(--card)); border-bottom: var(--bw) solid var(--ink); overflow: hidden; }
.panel p { margin: 0; padding: 14px 16px 18px; color: var(--ink-2); font-size: 15px; }
.bal { position: absolute; padding: 10px 14px; border: 2.5px solid var(--ink); border-radius: 18px; background: #fff; color: #141414; font: 800 14px/1.4 var(--b-body); max-width: 78%; }
.bal::after { content: ""; position: absolute; width: 16px; height: 16px; background: inherit; border: inherit; border-top: 0; border-left: 0; bottom: -10px; left: 22px; transform: rotate(45deg) skew(8deg, 8deg); }
.bal.right::after { left: auto; right: 22px; }
.bal.up::after { bottom: auto; top: -10px; transform: rotate(225deg); }
.sfx { position: absolute; font: 400 34px/1 "Bangers", "QingKe", sans-serif; color: var(--red); text-shadow: 2px 2px 0 #141414, -1px -1px 0 #fff; transform: rotate(var(--r, -10deg)); animation: sfx 1.2s steps(2) infinite; }
@keyframes sfx { 50% { transform: rotate(calc(var(--r, -10deg) + 6deg)) scale(1.1); } }
.pa-face { position: absolute; }
.pa-face .mo-face { width: 100% !important; height: 100% !important; }
.speed { position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 60%, rgb(20 20 20 / 0.06) 0deg 3deg, transparent 3deg 9deg); }
.note-pad { position: absolute; right: 10px; top: 12px; width: 58%; padding: 10px 12px; border: 2.5px solid var(--ink); border-radius: 6px; background: #fffbe0; color: #141414; font: 800 12.5px/1.6 var(--b-body); transform: rotate(3deg); box-shadow: var(--hard-sm); }
.note-pad div { display: flex; align-items: center; gap: 6px; }
.note-pad .mo-face { width: 20px !important; height: 20px !important; }
.book { position: absolute; left: 14px; top: 30px; width: 46%; aspect-ratio: 1; border: 2.5px solid var(--ink); border-radius: 8px; background: #fff; color: #141414; transform: rotate(-6deg); box-shadow: var(--hard-sm); }
.book svg { width: 100%; height: 100%; }
.yes { position: absolute; right: 12px; bottom: 14px; display: flex; gap: 8px; }
.yes span { padding: 6px 12px; border: 2px solid var(--ink); border-radius: 10px; background: var(--leaf); color: #fff; font: 900 13px/1 var(--b-body); box-shadow: 2px 2px 0 var(--ink); }
.yes span + span { background: #fff; color: #141414; }

/* ---------- Mato TV ---------- */
.learn-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.tv { position: relative; padding: 18px 18px 0; border: 4px solid var(--ink); border-radius: 32px; background: var(--red); box-shadow: 10px 10px 0 var(--ink); }
:root[data-theme="dark"] .tv { box-shadow: 10px 10px 0 #07061a; }
.tv-ant { position: absolute; left: 50%; top: -54px; width: 120px; height: 54px; margin-left: -60px; }
.tv-ant::before, .tv-ant::after { content: ""; position: absolute; bottom: 0; width: 4px; height: 60px; background: var(--ink); transform-origin: bottom; border-radius: 4px; }
.tv-ant::before { left: 40px; transform: rotate(-30deg); }
.tv-ant::after { right: 40px; transform: rotate(30deg); }
.tv-screen { position: relative; aspect-ratio: 16 / 10; border: 4px solid #141414; border-radius: 22px; overflow: hidden; background: #141414; }
.tv-foot { display: flex; align-items: center; gap: 10px; padding: 12px 6px 14px; color: #fff; }
.tv-foot b { font: 400 22px/1 "Bangers", sans-serif; letter-spacing: 0.08em; margin-right: auto; }
.tv-foot i { width: 22px; height: 22px; border: 3px solid #141414; border-radius: 50%; background: var(--yellow); }
.ep-poster { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(16px, 2.6vw, 30px); color: #fff;
  background: radial-gradient(rgb(255 255 255 / 0.18) 1.4px, transparent 1.8px) 0 0 / 12px 12px, linear-gradient(140deg, var(--c1), var(--c2)); }
.ep-poster .rays { position: absolute; inset: -30%; background: repeating-conic-gradient(from 0deg at 70% 40%, rgb(255 255 255 / 0.14) 0deg 8deg, transparent 8deg 16deg); }
.ep-poster .cast { position: absolute; right: 6%; top: 10%; display: flex; }
.ep-poster .cast .mo-face { margin-left: -20px; filter: drop-shadow(4px 6px 0 rgb(20 20 20 / 0.4)); }
.ep-poster .ep { position: relative; align-self: flex-start; padding: 6px 12px; border: 2.5px solid #141414; border-radius: 8px; background: var(--yellow); color: #141414; font: 400 18px/1 "Bangers", "QingKe", sans-serif; transform: rotate(-3deg); }
.ep-poster h3 { position: relative; margin: 14px 0 16px; max-width: 12em; font: 400 clamp(26px, 3vw, 44px)/1.1 var(--b-display); text-shadow: 3px 3px 0 #141414; }
.ep-poster .go { position: relative; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 3px solid #141414; border-radius: 14px; background: #fff; color: #141414; font: 900 15px/1 var(--b-body); box-shadow: 3px 3px 0 #141414; cursor: pointer; transition: transform 0.15s; }
.ep-poster .go:hover { transform: translate(-2px, -2px); }
.ep-poster .go svg { width: 16px; height: 16px; color: var(--red); }
.episodes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.episode { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; width: 100%; padding: 12px 14px; border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: var(--hard-sm); transition: transform 0.15s, box-shadow 0.15s; }
.episode:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.episode[aria-current="true"] { background: var(--yellow); color: #141414; }
.episode b { display: block; font: 900 15px/1.35 var(--b-body); }
.episode small { color: inherit; opacity: 0.7; font-size: 12.5px; }
.tier { display: inline-block; padding: 4px 8px; border: 2px solid currentColor; border-radius: 8px; font: 900 11.5px/1 var(--b-body); }
.tier.free { color: #0d8a5c; background: #dcfbe9; }
.tier.member { color: #c5321f; background: #ffe2dc; }

/* ---------- Trading cards ---------- */
.market-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.market-head .sec-head { margin-bottom: 36px; }
.squad { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; padding: 10px 16px 10px 10px; border: var(--bw) solid var(--ink); border-radius: 999px; background: var(--card); box-shadow: var(--hard-sm); font: 800 14px/1.2 var(--b-body); }
.squad .faces { display: flex; }
.squad .faces .mo-face { margin-left: -10px; }
.squad .faces .mo-face:first-child { margin-left: 0; }
.deck { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; perspective: 900px; }
.tcard { position: relative; display: flex; flex-direction: column; border: var(--bw) solid var(--ink); border-radius: 18px; background: var(--card); box-shadow: var(--hard); overflow: hidden; transform-style: preserve-3d; transform: rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); transition: transform 0.2s ease-out; }
/* A light tint of the Bot's colour with its dots in full colour, so the Bot stands out from its card. */
.tcard-top { position: relative; height: 150px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(color-mix(in srgb, var(--c) 42%, transparent) 1.4px, transparent 1.7px) 0 0 / 9px 9px, color-mix(in srgb, var(--c) 14%, var(--card)); border-bottom: var(--bw) solid var(--ink); }
:root[data-theme="dark"] .tcard-top { background: radial-gradient(color-mix(in srgb, var(--c) 40%, transparent) 1.4px, transparent 1.7px) 0 0 / 9px 9px, color-mix(in srgb, var(--c) 18%, #f6eedb); }
.tcard-top::before { content: ""; position: absolute; width: 132px; height: 132px; border-radius: 50%; background: radial-gradient(circle, #fff 30%, transparent 70%); opacity: 0.7; }
.tcard-top .mo-face { width: 118px !important; height: 118px !important; filter: drop-shadow(4px 6px 0 rgb(20 20 20 / 0.3)); }
.tcard-top .tier { position: absolute; left: 10px; top: 10px; }
.tcard-top .no { position: absolute; right: 12px; top: 10px; font: 400 18px/1 "Bangers", sans-serif; color: color-mix(in srgb, var(--c) 70%, #141414); }
.tcard-top .mo-face { position: relative; }
.tcard-body { display: grid; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.tcard-body b { font: 900 18px/1.25 var(--b-body); }
.tcard-body small { color: var(--ink-3); font-weight: 800; font-size: 13px; }
.tcard-body p { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.tcard .join { margin: 0 16px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--paper); color: var(--ink); font: 900 14px/1 var(--b-body); cursor: pointer; box-shadow: 2px 2px 0 var(--ink); transition: transform 0.15s, background-color 0.2s; }
.tcard .join svg { width: 15px; height: 15px; }
.tcard .join:hover { transform: translate(-1px, -1px); }
.tcard .join[aria-pressed="true"] { background: var(--leaf); color: #fff; }
.more-row { display: flex; justify-content: center; margin-top: 40px; }

/* ---------- The whole crowd ---------- */
.team-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.powers { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.powers li { padding: 14px 16px; border: 2.5px solid var(--ink); border-radius: 14px; background: var(--card); box-shadow: var(--hard-sm); }
.powers b { display: block; font: 400 22px/1.15 var(--b-display); margin-bottom: 4px; }
.powers span { color: var(--ink-2); font-size: 14px; }
.crowd { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; padding: 20px; border: 4px solid var(--ink); border-radius: 16px; background: radial-gradient(var(--dot) 1.2px, transparent 1.5px) 0 0 / 8px 8px, var(--yellow); box-shadow: var(--hard); }
:root[data-theme="dark"] .crowd { background-color: #3b2f86; }
.crowd .mo-face { width: 100% !important; height: auto !important; aspect-ratio: 1; }
.crowd .lead-cell { grid-column: span 2; grid-row: span 2; }

/* ---------- Tickets ---------- */
.tickets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.ticket {
  position: relative; display: flex; flex-direction: column; padding: 34px 30px; border: var(--bw) solid var(--ink); border-radius: 18px; background: var(--card); box-shadow: var(--hard);
  -webkit-mask: radial-gradient(circle 14px at 0 62%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 14px at 100% 62%, transparent 98%, #000) right / 51% 100% no-repeat;
}
.ticket.hot { background: var(--yellow); color: #141414; transform: rotate(-1.2deg); }
.ticket h3 { margin: 0; font: 400 28px/1.1 var(--b-display); }
.ticket .price { margin: 10px 0 22px; font: 400 clamp(36px, 3.6vw, 54px)/1 "Bangers", var(--b-display); }
.ticket:not(:first-child) .price { font-size: clamp(26px, 2.4vw, 34px); }
.ticket ul { list-style: none; margin: 0 0 28px; padding: 18px 0 0; border-top: 2.5px dashed currentColor; display: grid; gap: 10px; font-weight: 700; }
.ticket li::before { content: "★ "; color: var(--red); }
.ticket .btn { margin-top: auto; }
.stamp { position: absolute; right: 18px; top: 18px; padding: 6px 10px; border: 3px solid var(--red); border-radius: 8px; color: var(--red); font: 400 18px/1 "Bangers", "QingKe", sans-serif; letter-spacing: 0.06em; transform: rotate(12deg); }

/* ---------- About ---------- */
.say-big { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: end; }
.say-face { width: clamp(120px, 14vw, 200px); aspect-ratio: 1; }
.say-face .mo-face { width: 100% !important; height: 100% !important; }
.balloon { position: relative; margin: 0; padding: clamp(24px, 3.4vw, 48px); border: 4px solid var(--ink); border-radius: 40px; background: var(--card); box-shadow: var(--hard); font: 400 clamp(26px, 3.2vw, 48px)/1.3 "QingKe", var(--mo-font-cjk); --mo-dim: color-mix(in srgb, var(--ink) 18%, transparent); }
:root[lang="en"] .balloon { font-family: var(--b-body); font-weight: 900; }
.balloon::after { content: ""; position: absolute; left: -26px; bottom: 34px; width: 40px; height: 34px; background: var(--card); border-left: 4px solid var(--ink); border-bottom: 4px solid var(--ink); transform: skewY(30deg); }
.balloon em .ch.on, .balloon b .ch.on { color: var(--red); }
.promises { list-style: none; margin: 60px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.promise { position: relative; padding: 110px 26px 26px; border: var(--bw) solid var(--ink); border-radius: 18px; background: var(--card); box-shadow: var(--hard); }
.promise-face { position: absolute; left: 22px; top: -30px; width: 120px; height: 120px; }
.promise-face .mo-face { width: 100% !important; height: 100% !important; }
.promise .stamp { color: var(--leaf); border-color: var(--leaf); }
.promise h3 { margin: 0 0 8px; font: 400 26px/1.15 var(--b-display); }
.promise p { margin: 0; color: var(--ink-2); }

/* ---------- Last page ---------- */
.finale-page { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding: clamp(28px, 5vw, 64px); border: 4px solid var(--ink); border-radius: 18px; background: radial-gradient(rgb(255 255 255 / 0.3) 1.4px, transparent 1.8px) 0 0 / 12px 12px, var(--sky); box-shadow: 12px 12px 0 var(--ink); color: #141414; }
:root[data-theme="dark"] .finale-page { background-color: #3b2f86; color: #fff; box-shadow: 12px 12px 0 #07061a; }
.finale-face { width: clamp(160px, 20vw, 280px); aspect-ratio: 1; }
.finale-face .mo-face { width: 100% !important; height: 100% !important; animation: bob 4s ease-in-out infinite; }
.finale-title { margin: 0; font: 400 clamp(48px, 6vw, 96px)/1.05 var(--b-display); }
.finale-copy > p { font-size: 18px; font-weight: 700; }
.finale-copy .fine { color: inherit; opacity: 0.8; }
.tbc { position: absolute; right: 24px; bottom: -22px; padding: 8px 14px; border: 3px solid var(--ink); border-radius: 10px; background: var(--yellow); color: #141414; font: 400 20px/1 "Bangers", "QingKe", sans-serif; transform: rotate(-3deg); }

/* ---------- Binder (the whole market) ---------- */
.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer[hidden] { display: none; }
.drawer-scrim { position: absolute; inset: 0; background: rgb(20 20 20 / 0.45); animation: fade 0.25s both; }
.drawer-panel { position: absolute; inset: 4vh 4vw; display: flex; flex-direction: column; border: 4px solid var(--ink); border-radius: 22px; background: var(--paper) radial-gradient(var(--dot) 1.1px, transparent 1.4px) 0 0 / 10px 10px; box-shadow: 12px 12px 0 #141414; animation: binder 0.5s var(--mo-spring) both; }
@keyframes fade { from { opacity: 0; } }
@keyframes binder { from { opacity: 0; transform: scale(0.9) rotate(-2deg); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px 8px; }
.drawer-head h2 { margin: 0; font: 400 clamp(30px, 3.4vw, 48px)/1.1 var(--b-display); }
.drawer-body { flex: 1; overflow: auto; padding: 8px 26px 30px; }
.drawer-tools { position: sticky; top: -8px; z-index: 2; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 0 18px; background: var(--paper); }
.search { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 220px; height: 48px; padding: 0 16px; border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--card); color: var(--ink-3); box-shadow: var(--hard-sm); }
.search svg { width: 18px; height: 18px; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 700 15px/1 var(--b-body); outline: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab { min-height: 40px; padding: 0 14px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--card); color: var(--ink); font: 900 14px/1 var(--b-body); cursor: pointer; }
.tab[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.drawer .deck { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.drawer .count { margin: 0 0 16px; color: var(--ink-3); font-weight: 800; }
.drawer .empty { padding: 40px 0; text-align: center; color: var(--ink-3); }

/* ---------- Mato TV: a channel that keeps going ---------- */
/* The channel's name inside a Chinese heading: Bangers, thickened to sit with 庆科's weight. */
.tv-word { font-family: "Bangers", sans-serif; font-size: 1.08em; letter-spacing: 0.03em; -webkit-text-stroke: 0.035em currentColor; paint-order: stroke fill; }
.onair { display: inline-flex; align-items: center; gap: 6px; padding-left: 10px; border-left: 2px solid #141414; }
.onair i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: blink 1.2s steps(2) infinite; }
.episodes-wrap { display: grid; gap: 12px; min-width: 0; }
.episode.show { grid-template-columns: auto minmax(0, 1fr) auto; padding: 10px 14px 10px 10px; }
.episode.show b { font: 400 21px/1.15 var(--b-display); }
.episode.show small { display: block; margin-top: 3px; opacity: 0.75; }
.show-face { width: 46px; height: 46px; }
.show-face .mo-face { width: 100% !important; height: 100% !important; }
.show-meta { display: grid; justify-items: end; gap: 5px; font-weight: 800; font-size: 13px; white-space: nowrap; }
.tv-go { display: grid; gap: 4px; justify-items: start; margin-top: 6px; }
.tv-go .fine { margin: 6px 0 0; }

/* ---------- Motion: comic beats ---------- */
/* The highlighter sweeps in under a heading once it shows. */
.is-moving mark::before { transform-origin: left center; transform: skew(-8deg) rotate(-1deg) scaleX(0); transition: transform 0.7s var(--mo-ease) 0.45s; }
.is-moving .is-in mark::before { transform: skew(-8deg) rotate(-1deg) scaleX(1); }
.is-moving .cover-title mark::before { animation: sweep 0.8s var(--mo-ease) 0.7s both; }
@keyframes sweep { from { transform: skew(-8deg) rotate(-1deg) scaleX(0); } to { transform: skew(-8deg) rotate(-1deg) scaleX(1); } }

/* Twinkles round the cover. */
.twinkle { position: absolute; width: 26px; height: 26px; color: var(--yellow); pointer-events: none; animation: twinkle 2.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
.twinkle svg { width: 100%; height: 100%; filter: drop-shadow(2px 2px 0 var(--ink)); }
@keyframes twinkle { 0%, 100% { transform: scale(0.3) rotate(0deg); opacity: 0; } 40%, 60% { transform: scale(1) rotate(45deg); opacity: 1; } }
.cover-copy { position: relative; }

/* Balloons and sound effects pop in after their panel lands. */
.is-moving .panel[data-reveal] :is(.bal, .note-pad, .sfx, .yes) { opacity: 0; transform: scale(0.4) rotate(-8deg); }
.is-moving .panel[data-reveal].is-in :is(.bal, .note-pad, .yes) { animation: pop-in 0.55s var(--mo-spring) both; animation-delay: calc(var(--d, 0s) + 0.45s); }
.is-moving .panel[data-reveal].is-in .sfx { opacity: 1; animation: pop-in 0.5s var(--mo-spring) both, sfx 1.2s steps(2) 1s infinite; animation-delay: calc(var(--d, 0s) + 0.6s), 1.2s; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.4) rotate(-8deg); } to { opacity: 1; transform: none; } }
.is-moving .panel.is-in .speed { animation: rush 0.9s linear infinite; }
@keyframes rush { 50% { opacity: 0.5; } }

/* A trading card catches the light as it tilts. */
.tcard::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity 0.3s;
  background: linear-gradient(115deg, transparent 30%, rgb(255 255 255 / 0.55) 45%, rgb(255 210 63 / 0.35) 52%, transparent 66%) var(--shine, 50%) 0 / 220% 100% no-repeat; mix-blend-mode: soft-light; }
.tcard:hover::after { opacity: 1; }
.tcard .join[aria-pressed="true"] svg { animation: tick 0.5s var(--mo-spring); }
@keyframes tick { from { transform: scale(0) rotate(-45deg); } }

/* Stamps slam down. */
.is-moving .is-in > .stamp, .is-moving .is-in .stamp { animation: slam 0.5s cubic-bezier(0.2, 2.2, 0.4, 1) 0.5s both; }
@keyframes slam { from { opacity: 0; transform: rotate(12deg) scale(2.6); } }

/* The crowd isn't still: one member hops now and then. */
.crowd > span { display: block; }
.crowd > span.hop { animation: crowd-hop 0.8s var(--mo-spring); }
@keyframes crowd-hop { 0% { transform: translateY(0); } 30% { transform: translateY(-14px) rotate(-8deg); } 60% { transform: translateY(0) scale(1.12, 0.88); } 100% { transform: none; } }

/* Mato TV: a burst of static when the channel changes. */
.tv-screen.static::after { content: ""; position: absolute; inset: 0; z-index: 3; background: repeating-linear-gradient(0deg, rgb(255 255 255 / 0.5) 0 2px, rgb(0 0 0 / 0.6) 2px 4px); animation: static 0.35s steps(4) both; }
@keyframes static { 0% { opacity: 1; transform: translateY(0); } 50% { opacity: 0.9; transform: translateY(-6px); } 100% { opacity: 0; transform: translateY(4px); } }
@keyframes blink { 50% { opacity: 0; } }

/* Buttons that want to be pressed. */
.is-moving .btn-hot:hover { animation: nudge 0.5s var(--mo-spring); }
@keyframes nudge { 30% { rotate: -3deg; } 60% { rotate: 2deg; } }
.is-moving .tbc { animation: swing 3s ease-in-out infinite; transform-origin: top center; }
@keyframes swing { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.is-moving .kicker:hover { animation: nudge 0.5s var(--mo-spring); }

/* ---------- Narrow screens ---------- */
@media (max-width: 1100px) {
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deck { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .cover-grid, .learn-grid, .team-grid, .tickets, .promises { grid-template-columns: minmax(0, 1fr); }
  .issue { width: min(100%, 420px); }
  .promises { gap: 50px; margin-top: 70px; }
}
@media (max-width: 640px) {
  .strip, .deck, .powers { grid-template-columns: minmax(0, 1fr); }
  .say-big, .finale-page { grid-template-columns: minmax(0, 1fr); }
  .balloon::after { display: none; }
  .crowd { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .drawer-panel { inset: 0; border-radius: 0; }
  .ep-poster .cast { display: none; }
}
