/* Copyright (c) 2026 matoio.com. All rights reserved. */
/*
 * Every page of the website other than the homepage, in the homepage's comic look: cream halftone
 * paper, thick ink outlines, hard offset shadows, yellow captions, Bangers and 庆科黄油体 for
 * titles; night is the deep-blue print with cream ink. Load after /kit/base.css.
 */

: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;
  --red-ink: #d62a20;
  --leaf: #12c578;
  --leaf-ink: #0b8a55;
  --shade: #141414;
  --hard: 6px 6px 0 var(--shade);
  --hard-sm: 3px 3px 0 var(--shade);
  --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, as on the homepage. */
  --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);
  --p-wrap: min(1120px, calc(100% - 2 * var(--mo-gutter)));
}
: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);
  --red-ink: #ff7a6e;
  --leaf-ink: #4fe0a2;
  --shade: #07061a;
  --mo-line: rgb(246 238 219 / 0.16);
  --mo-on-accent: #fff;
}

body.page { display: flex; flex-direction: column; font-family: var(--b-body); background: var(--paper) radial-gradient(var(--dot) 1.1px, transparent 1.4px) 0 0 / 10px 10px; overflow-x: clip; }
.page main { flex: 1; width: var(--p-wrap); margin: 0 auto; padding: calc(var(--mo-nav-h) + clamp(36px, 8vh, 88px)) 0 clamp(64px, 12vh, 128px); }
.page .mo-header { background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: var(--bw) solid var(--ink); }
.page .mo-header .mo-btn, .page .mo-icon-btn { border-width: 2px; }
.page .mo-footer { border-top: var(--bw) solid var(--ink); }
[hidden] { display: none !important; }

/* Heads: a yellow tag, a big comic title, a line under it. */
.p-head { margin-bottom: clamp(30px, 5vh, 48px); }
.p-center { display: grid; justify-items: center; text-align: center; }
.p-center .p-sub { margin-inline: auto; }
.p-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 7px 14px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--yellow); color: #141414; box-shadow: var(--hard-sm);
  font: 800 13px/1 var(--b-body); letter-spacing: 0.06em; transform: rotate(-1.5deg);
}
:root[data-theme="dark"] .p-eyebrow { border-color: #141414; }
.p-title { margin: 0; font: 400 clamp(40px, 5.4vw, 76px)/1.08 var(--b-display); letter-spacing: 0.01em; text-wrap: balance; }
.p-title mark { background: none; color: inherit; position: relative; z-index: 0; white-space: nowrap; }
.p-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"] .p-title mark::before { opacity: 0.85; background: #e04f8f; }
.p-sub { margin: 16px 0 0; max-width: 38em; color: var(--ink-2); font-size: clamp(16px, 1.25vw, 19px); line-height: 1.65; text-wrap: pretty; }

/* A comic panel: ink outline, hard shadow, a yellow caption across the top. */
.p-panel { position: relative; width: 100%; max-width: 560px; border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--card); box-shadow: var(--hard); text-align: left; color: var(--ink); overflow: hidden; }
.p-panel-wide { max-width: none; }
.p-cap { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 16px; background: var(--yellow); border-bottom: var(--bw) solid var(--ink); color: #141414; font: 900 15px/1.2 var(--b-body); }
.p-cap .mo-num { font: 400 18px/1 "Bangers", sans-serif; letter-spacing: 0.06em; }
.p-cap[data-tone="sky"] { background: var(--sky); }
.p-cap[data-tone="leaf"] { background: var(--leaf); }
.p-cap[data-tone="pink"] { background: #ff8fc7; }
.p-body { display: grid; gap: 18px; padding: 24px clamp(18px, 4vw, 34px) 28px; }
.p-panel h2 { margin: 0; font: 400 clamp(26px, 2.6vw, 34px)/1.15 var(--b-display); }
.p-panel h3 { margin: 8px 0 0; font: 900 17px/1.3 var(--b-body); }
.p-foot { margin: 0; padding-top: 14px; border-top: 2.5px dashed var(--mo-line); color: var(--ink-3); font-size: 14px; }
.p-foot a, .p-msg a, .p-prose a { color: var(--red-ink); font-weight: 800; }

/* Buttons inside a page: thick outline, hard shadow, they press in. */
.page main .mo-btn {
  min-height: 50px; padding: 0 24px; border: var(--bw) solid var(--ink); border-radius: 14px;
  background: var(--card); color: var(--ink); box-shadow: var(--hard-sm); font: 800 15.5px/1.1 var(--b-body);
  transition: transform 0.15s, box-shadow 0.15s, background-color 0.2s;
}
.page main .mo-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--shade); }
.page main .mo-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--shade); }
.page main .mo-btn-primary { background: var(--red); color: #fff; }
.page main .mo-btn-lg { min-height: 56px; font-size: 17px; }
.page main .mo-btn[disabled], .page main .mo-btn[aria-disabled="true"] { opacity: 0.55; cursor: default; transform: none; box-shadow: var(--hard-sm); }
.page main .mo-btn-small { min-height: 38px; padding: 0 14px; border-width: 2px; border-radius: 10px; font-size: 13.5px; box-shadow: 2px 2px 0 var(--shade); }
.page main .mo-btn-google { background: #fff; color: #1f1f1f; }
.page main .mo-chip { min-height: 38px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--card); color: var(--ink); font: 900 14px/1 var(--b-body); }
.page main .mo-chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* Forms. */
.p-form { display: grid; gap: 14px; }
.p-field { display: grid; gap: 7px; }
.p-field > span { font: 800 13.5px/1.2 var(--b-body); color: var(--ink-2); }
.p-input {
  width: 100%; min-height: 50px; padding: 0 16px; border: var(--bw) solid var(--ink); border-radius: 12px;
  background: var(--paper); color: var(--ink); font: 700 16px/1 var(--b-body); transition: box-shadow 0.15s;
}
.p-input:focus { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--yellow) 70%, transparent); }
.p-input::placeholder { color: var(--ink-3); opacity: 0.8; }
.p-input.mo-num { letter-spacing: 0.4em; font-size: 24px; text-align: center; }
.p-select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.p-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.p-form > .mo-btn { width: 100%; }
.p-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.p-or { display: flex; align-items: center; gap: 14px; margin: 0; color: var(--ink-3); font-size: 13px; font-weight: 800; }
.p-or::before, .p-or::after { content: ""; flex: 1; height: 2.5px; background: var(--mo-line); }
.p-link { padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.p-link:hover { color: var(--ink); }
.p-msg { margin: 0; min-height: 1.4em; font-size: 14.5px; color: var(--ink-2); }
.p-msg:empty { min-height: 0; }
.p-msg[data-tone="error"] { color: var(--red-ink); font-weight: 800; }
.p-msg[data-tone="ok"] { color: var(--leaf-ink); font-weight: 800; }
.p-note { margin: 0; padding: 12px 14px; border: 2.5px solid var(--ink); border-radius: 12px; background: color-mix(in srgb, var(--leaf) 18%, var(--card)); font-weight: 800; }

/* Facts, badges, lists. */
.p-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 22px; margin: 0; }
.p-facts dt { color: var(--ink-3); font-size: 14px; font-weight: 700; }
.p-facts dd { margin: 0; font-weight: 800; overflow-wrap: anywhere; }
.p-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: var(--bw) solid var(--ink); border-radius: 12px; background: var(--card); color: var(--ink); box-shadow: var(--hard-sm); font: 400 22px/1 var(--b-display); transform: rotate(-1.5deg); }
.p-badge[data-state="full"] { background: var(--red); color: #fff; }
.p-badge[data-state="trial"] { background: var(--yellow); color: #141414; }
.p-badge[data-state="ended"], .p-badge[data-state="refunded"], .p-badge[data-state="suspended"] { background: var(--paper); color: var(--ink-2); }
.p-badge[data-state="none"] { background: var(--sky); color: #141414; }
.p-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.p-stack { display: grid; gap: 24px; }
.p-list { display: grid; margin: 0; padding: 0; list-style: none; }
.p-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 14px 0; border-top: 2.5px dashed var(--mo-line); }
.p-list li:first-child { border-top: 0; }
.p-list strong { font-weight: 900; }
.p-list small { display: block; color: var(--ink-3); font-size: 13px; font-weight: 700; }
.p-tag { display: inline-block; white-space: nowrap; padding: 3px 9px; border: 2px solid var(--ink); border-radius: 8px; background: var(--card); color: var(--ink); font: 900 12px/1.3 var(--b-body); }
.p-tag[data-tone="full"] { background: var(--red); color: #fff; }
.p-tag[data-tone="trial"] { background: var(--yellow); color: #141414; }
.p-tag[data-tone="leaf"] { background: var(--leaf); color: #fff; }
.p-tag[data-tone="warn"] { border-color: var(--red-ink); color: var(--red-ink); }
.p-tag[data-tone="muted"] { color: var(--ink-3); border-style: dashed; }

/* Pricing: two tickets, a currency switch, the notes. */
.p-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 30px; color: var(--ink-3); font: 900 13px/1 var(--b-body); letter-spacing: 0.06em; }
.p-tickets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: stretch; max-width: 920px; }
.p-ticket {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 32px 28px 28px; border: var(--bw) solid var(--ink); border-radius: 18px; background: var(--card); box-shadow: var(--hard);
  -webkit-mask: radial-gradient(circle 14px at 0 58%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 14px at 100% 58%, transparent 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 14px at 0 58%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 14px at 100% 58%, transparent 98%, #000) right / 51% 100% no-repeat;
}
.p-ticket.hot { background: var(--yellow); color: #141414; transform: rotate(-1deg); --ink-2: #3c3a36; --ink-3: #5a564e; }
.p-ticket h2 { margin: 0; padding-right: 90px; font: 400 32px/1.1 var(--b-display); }
.p-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 6px 0 18px; }
.p-price strong { font: 400 clamp(46px, 5vw, 64px)/1 "Bangers", var(--b-display); letter-spacing: 0.02em; }
.p-price span { color: var(--ink-3); font-weight: 800; font-size: 14px; }
.p-ticks { display: grid; gap: 10px; margin: 0 0 24px; padding: 18px 0 0; border-top: 2.5px dashed currentColor; list-style: none; font-weight: 700; }
.p-ticks li::before { content: "★ "; color: var(--red); }
.p-ticket .p-buy { display: grid; gap: 10px; margin-top: auto; }
.p-ticket .p-buy .mo-btn { width: 100%; }
.p-ticket.hot .mo-btn:not(.mo-btn-primary) { background: #fffdf6; color: #141414; border-color: #141414; }
.p-ticket.hot .mo-btn { border-color: #141414; box-shadow: 3px 3px 0 #141414; }
.p-ticket .p-msg { color: inherit; font-weight: 800; }
.p-stamp { position: absolute; right: 18px; top: 18px; padding: 6px 10px; border: 3px solid var(--red-ink); border-radius: 8px; color: var(--red-ink); font: 400 18px/1 "Bangers", "QingKe", sans-serif; letter-spacing: 0.06em; transform: rotate(12deg); }
.p-ticket.hot .p-stamp { color: #c5321f; border-color: #c5321f; }
.p-stamp[data-tone="leaf"] { color: var(--leaf-ink); border-color: var(--leaf-ink); }
.p-notes { max-width: 920px; margin-top: clamp(40px, 6vh, 64px); padding: 22px clamp(18px, 3vw, 28px); border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--card); box-shadow: var(--hard-sm); color: var(--ink-2); }
.p-notes h2 { margin: 0 0 12px; color: var(--ink); font: 400 26px/1.2 var(--b-display); }
.p-notes ul { display: grid; gap: 8px; margin: 0; padding-left: 1.2em; }
.p-notes a { color: var(--red-ink); font-weight: 800; }

/* Downloads. */
.p-downloads li { padding: 18px 0; }
.p-downloads strong .p-tag { margin-left: 10px; vertical-align: 2px; }

/* The code the desktop app shows, big enough to compare at a glance. */
.p-code { margin: 0; padding: 14px 10px; border: var(--bw) dashed var(--ink); border-radius: 12px; background: var(--paper); text-align: center; font: 400 clamp(36px, 6vw, 54px)/1 "Bangers", var(--mo-font-mono); letter-spacing: 0.14em; }

/* Terms, privacy, refund. */
.p-prose { max-width: 780px; padding: clamp(22px, 4vw, 44px); border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--card); box-shadow: var(--hard); color: var(--ink-2); }
.p-prose h2 { margin: 34px 0 10px; color: var(--ink); font: 900 clamp(19px, 1.7vw, 22px)/1.3 var(--b-body); }
.p-prose p { margin: 0 0 12px; }
.p-prose ul { display: grid; gap: 8px; margin: 0 0 12px; padding-left: 1.2em; }
.p-prose .p-lead { color: var(--ink); font-size: 17px; font-weight: 700; }
.p-prose mark { padding: 0 4px; border-radius: 4px; background: var(--yellow); color: #141414; font-weight: 800; }
.p-draft { display: inline-block; margin: 0 0 18px; padding: 6px 12px; border: 2.5px solid var(--red-ink); border-radius: 10px; color: var(--red-ink); font: 900 13px/1.3 var(--b-body); transform: rotate(-1deg); }

/* Mato TV: the set and a members' episode behind it. */
.p-video { display: block; width: 100%; aspect-ratio: 16 / 9; border: var(--bw) solid var(--ink); border-radius: 12px; background: #141414; }
.p-locked { display: grid; place-content: center; justify-items: center; gap: 16px; padding: 20px; color: #fffdf6; text-align: center; font-weight: 800; }
.p-locked p { margin: 0; }
.p-list strong .p-tag { margin-left: 4px; vertical-align: 2px; }

/* Admin console: wide tables. */
.p-table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.p-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.p-table th { text-align: left; padding: 10px 12px; color: var(--ink-3); font: 900 12px/1.2 var(--b-body); letter-spacing: 0.06em; border-bottom: var(--bw) solid var(--ink); white-space: nowrap; }
.p-table td { padding: 11px 12px; border-bottom: 2px dashed var(--mo-line); vertical-align: middle; white-space: nowrap; }
.p-table tr:last-child td { border-bottom: 0; }
.p-table td.p-wrap-cell { white-space: normal; min-width: 180px; max-width: 360px; overflow-wrap: anywhere; }
.p-cols { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }

/* The 404 page. */
.p-lost { display: grid; justify-items: center; gap: 22px; text-align: center; }
.p-lost-no { margin: 0; font: 400 clamp(120px, 22vw, 240px)/0.9 "Bangers", sans-serif; letter-spacing: 0.04em; color: var(--red); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 8px 8px 0 var(--shade); transform: rotate(-4deg); }
.p-balloon { position: relative; max-width: 520px; margin: 0; padding: 20px 26px; border: var(--bw) solid var(--ink); border-radius: 28px; background: var(--card); box-shadow: var(--hard); font: 400 clamp(22px, 2.6vw, 30px)/1.3 var(--b-display); }
.p-balloon::after { content: ""; position: absolute; left: 50%; bottom: -16px; width: 26px; height: 26px; margin-left: -13px; background: var(--card); border-right: var(--bw) solid var(--ink); border-bottom: var(--bw) solid var(--ink); transform: rotate(45deg); }

/* Narrow screens. */
@media (max-width: 760px) {
  .p-tickets { grid-template-columns: minmax(0, 1fr); }
  .p-ticket.hot { transform: none; }
}
@media (max-width: 520px) {
  .p-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .p-facts dd { margin-bottom: 10px; }
  .p-panel { box-shadow: var(--hard-sm); }
  .p-ticket { padding: 28px 20px 22px; }
}

/* Names and addresses stay in the reading face, never the comic one (as on the homepage). */
.p-panel h2.p-name { font: 900 clamp(20px, 2vw, 24px)/1.3 var(--b-body); overflow-wrap: anywhere; }
.p-input-auto { width: auto; max-width: 100%; }
