/* Shared by the three looks: the pixel font, the reset, focus, skip link, screenshots, hashes. */
@font-face {
  font-family: "wabun pixel";
  src: url("assets/fonts/wabun-pixel.woff2") format("woff2");
  font-display: block;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text);
}
img { max-width: 100%; height: auto; }
/* wabun's pixel font: only at 16, 24, 32 or 48 px (whole multiples of its 8 px grid). */
.px {
  font-family: "wabun pixel", monospace; font-weight: normal; font-style: normal; letter-spacing: 0;
  -webkit-font-smoothing: none; font-smooth: never;
}
code, kbd, pre, .mono {
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
  font-size: 16px;
}
.hash { overflow-wrap: anywhere; word-break: break-all; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.shot { image-rendering: pixelated; display: block; box-sizing: content-box; max-width: none; }
:lang(ja) { font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans CJK JP", "Noto Sans JP", sans-serif; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.skip {
  position: absolute; left: 8px; top: -200px; z-index: 9; padding: 10px 16px; min-height: 44px;
  background: var(--bg); color: var(--link); border: 2px solid var(--ring);
}
.skip:focus { top: 8px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
input, textarea, select, button { font: inherit; font-size: 16px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Round 2: the feel of a 2003 Japanese game site in the "Patch Club" layout. Used with ../base.css.
   Colour: one of .c-b, .c-y, .c-c, .c-f, .c-g (the blocks below). Lettering: .t-pop (Mochiy Pop One) or .t-pixel
   (wabun's pixel font, only at whole multiples of 8 px). Light and dark follow the system; .day on <html> keeps a page light. No JavaScript. */

:root {
  color-scheme: light dark;
  --hot: #ffd84a; --cart-body: #c9c5d6;
  --amber: #ffb81f; --lime: #a8dc2c; --sky: #4fcff5; --coral: #ff7a70; --lilac: #c9a2ff;
}
.day { color-scheme: light; }

/* ---- Colour b: water blue ---- */
.c-b {
  --field: #1db4e8; --field-dot: #5ccbf0; --on-field: #041a27; --on-field-link: #0b2a3f; --field-ring: #06202e;
  --paper: #ffffff; --text: #14212a; --muted: #4a5a65; --link: #095278; --ring: #095278;
  --edge: #0b2a3f; --line: #0b1f2c; --frame: #c9dae4; --dot: #159fcf; --cue: #095278;
  --bar: #0b1f2c; --mat: #e6f6fd;
  --grid: #0b2a3f; --th: #ffd84a; --th-text: #0b1f2c; --cell: #f2fbff;
  --pill: #0b1f2c; --pill-text: #ffffff; --pill-shadow: #9fb2bf; --pill2: #ffffff; --pill2-text: #0b1f2c;
  --letter: #0b2a3f; --letter-text: #eef9ff; --letter-head: #ffd84a; --letter-paper: #f2fbff;
  --word-fill: #0b2a3f; --word-stroke: #ffffff; --word-edge: #ffffff; --word-shadow: #06202e;
}
/* ---- Colour y: marigold and burgundy ---- */
.c-y {
  --field: #ffc72c; --field-dot: #ffd35c; --on-field: #3a0d16; --on-field-link: #7a1a2a; --field-ring: #3a0d16;
  --paper: #ffffff; --text: #3a0d16; --muted: #6b4a50; --link: #7a1a2a; --ring: #7a1a2a;
  --edge: #3a0d16; --line: #3a0d16; --frame: #f3e2b8; --dot: #bd8b00; --cue: #7a1a2a;
  --bar: #3a0d16; --mat: #fff4d0;
  --grid: #3a0d16; --th: #ffd84a; --th-text: #3a0d16; --cell: #fffaf0;
  --pill: #3a0d16; --pill-text: #ffffff; --pill-shadow: #c9a24a; --pill2: #ffffff; --pill2-text: #3a0d16;
  --letter: #4f111b; --letter-text: #fff6e0; --letter-head: #ffd84a; --letter-paper: #fffaf0;
  --word-fill: #7a1a2a; --word-stroke: #ffffff; --word-edge: #ffffff; --word-shadow: #3a0d16;
}
/* ---- Colour c: peach coral ---- */
.c-c {
  --field: #f9917e; --field-dot: #f27f6a; --on-field: #3a0d16; --on-field-link: #751a24; --field-ring: #3a0d16;
  --paper: #ffffff; --text: #3a0d16; --muted: #6b4a50; --link: #7e1c27; --ring: #7e1c27;
  --edge: #3a0d16; --line: #3a0d16; --frame: #f6d3cb; --dot: #f7654b; --cue: #7e1c27;
  --bar: #3a0d16; --mat: #ffe9e4;
  --grid: #3a0d16; --th: #ffd84a; --th-text: #3a0d16; --cell: #fff6f3;
  --pill: #3a0d16; --pill-text: #ffffff; --pill-shadow: #d47b6b; --pill2: #ffffff; --pill2-text: #3a0d16;
  --letter: #4f111b; --letter-text: #fff1ee; --letter-head: #ffd84a; --letter-paper: #fff6f3;
  --word-fill: #751a24; --word-stroke: #ffffff; --word-edge: #ffffff; --word-shadow: #3a0d16;
}
/* ---- Colour f: wisteria ---- */
.c-f {
  --field: #b3a8e8; --field-dot: #a398de; --on-field: #241440; --on-field-link: #4a2a8c; --field-ring: #241440;
  --paper: #ffffff; --text: #241440; --muted: #5e556d; --link: #4a2a8c; --ring: #4a2a8c;
  --edge: #241440; --line: #241440; --frame: #dcd6f3; --dot: #9788df; --cue: #4a2a8c;
  --bar: #241440; --mat: #efecfb;
  --grid: #241440; --th: #ffd84a; --th-text: #241440; --cell: #f8f6ff;
  --pill: #241440; --pill-text: #ffffff; --pill-shadow: #8f86c4; --pill2: #ffffff; --pill2-text: #241440;
  --letter: #2e1a5c; --letter-text: #f1eeff; --letter-head: #ffd84a; --letter-paper: #f8f6ff;
  --word-fill: #4a2a8c; --word-stroke: #ffffff; --word-edge: #ffffff; --word-shadow: #241440;
}
/* ---- Colour g: pond green ---- */
.c-g {
  --field: #1b6341; --field-dot: #165638; --on-field: #ffffff; --on-field-link: #e4f7a9; --field-ring: #ffffff;
  --paper: #ffffff; --text: #0b2a1b; --muted: #4c5c55; --link: #145236; --ring: #145236;
  --edge: #0b2a1b; --line: #0b2a1b; --frame: #cfe5d8; --dot: #1b6341; --cue: #145236;
  --bar: #0b2a1b; --mat: #e4f4ea;
  --grid: #0b2a1b; --th: #ffd84a; --th-text: #0b2a1b; --cell: #f3fbf6;
  --pill: #0b2a1b; --pill-text: #ffffff; --pill-shadow: #6aa384; --pill2: #ffffff; --pill2-text: #0b2a1b;
  --letter: #0b2a1b; --letter-text: #effaf3; --letter-head: #ffd84a; --letter-paper: #f3fbf6;
  --word-fill: #ffffff; --word-stroke: #0b2a1b; --word-edge: #ffffff; --word-shadow: #0b2a1b;
}
/* Dark: the field keeps its hue, deeper; the window goes dark. */
@media (prefers-color-scheme: dark) {
  .c-b:not(.day) {
    --field: #0b4a80; --field-dot: #1a62a0; --on-field: #eaf7fc; --on-field-link: #ffd84a; --field-ring: #eaf7fc;
    --paper: #0d1a24; --text: #eaf2f6; --muted: #b6c6d0; --link: #7fd8f7; --ring: #eaf2f6;
    --edge: #2ec4f0; --line: #eaf2f6; --frame: #2f4a5b; --dot: #2ec4f0; --cue: #2ec4f0;
    --bar: #000000; --mat: #172c39;
    --grid: #2ec4f0; --th: #ffd84a; --th-text: #0b1f2c; --cell: #172c39;
    --pill: #000000; --pill-text: #ffffff; --pill-shadow: #5d7482; --pill2: #0d1a24; --pill2-text: #eaf2f6;
    --letter: #123a52; --letter-text: #eef9ff; --letter-head: #ffd84a; --letter-paper: #172c39;
    --word-fill: #ffd84a; --word-stroke: #06202e; --word-edge: #ffffff; --word-shadow: #000000;
  }
  .c-y:not(.day) {
    --field: #4a2f00; --field-dot: #5c3d08; --on-field: #f4f6f7; --on-field-link: #ffd84a; --field-ring: #f4f6f7;
    --paper: #1e1508; --text: #eef2f4; --muted: #b9c3c8; --link: #ffc94d; --ring: #eef2f4;
    --edge: #e9aa3f; --line: #eef2f4; --frame: #4d3a1a; --dot: #e9aa3f; --cue: #e9aa3f;
    --bar: #000000; --mat: #2b2010;
    --grid: #e9aa3f; --th: #ffd84a; --th-text: #1b0b0e; --cell: #2b2010;
    --pill: #000000; --pill-text: #ffffff; --pill-shadow: #7f5f1b; --pill2: #1e1508; --pill2-text: #eef2f4;
    --letter: #3a2a10; --letter-text: #f6f6f6; --letter-head: #ffd84a; --letter-paper: #2b2010;
    --word-fill: #ffd84a; --word-stroke: #000000; --word-edge: #ffffff; --word-shadow: #000000;
  }
  .c-c:not(.day) {
    --field: #4a1a16; --field-dot: #5c2a24; --on-field: #f4f6f7; --on-field-link: #ffd84a; --field-ring: #f4f6f7;
    --paper: #22100e; --text: #eef2f4; --muted: #b9c3c8; --link: #ffa896; --ring: #eef2f4;
    --edge: #e98a78; --line: #eef2f4; --frame: #4e2c27; --dot: #e98a78; --cue: #e98a78;
    --bar: #000000; --mat: #341c19;
    --grid: #e98a78; --th: #ffd84a; --th-text: #1b0b0e; --cell: #341c19;
    --pill: #000000; --pill-text: #ffffff; --pill-shadow: #8a544b; --pill2: #22100e; --pill2-text: #eef2f4;
    --letter: #3d221e; --letter-text: #f6f6f6; --letter-head: #ffd84a; --letter-paper: #341c19;
    --word-fill: #ffd84a; --word-stroke: #000000; --word-edge: #ffffff; --word-shadow: #000000;
  }
  .c-f:not(.day) {
    --field: #2a1f55; --field-dot: #3a2d6c; --on-field: #f4f6f7; --on-field-link: #ffd84a; --field-ring: #f4f6f7;
    --paper: #140e26; --text: #eef2f4; --muted: #b9c3c8; --link: #c8bffa; --ring: #eef2f4;
    --edge: #a99cf0; --line: #eef2f4; --frame: #3d3566; --dot: #a99cf0; --cue: #a99cf0;
    --bar: #000000; --mat: #221b3d;
    --grid: #a99cf0; --th: #ffd84a; --th-text: #1b0b0e; --cell: #221b3d;
    --pill: #000000; --pill-text: #ffffff; --pill-shadow: #635b8b; --pill2: #140e26; --pill2-text: #eef2f4;
    --letter: #34296b; --letter-text: #f6f6f6; --letter-head: #ffd84a; --letter-paper: #221b3d;
    --word-fill: #ffd84a; --word-stroke: #000000; --word-edge: #ffffff; --word-shadow: #000000;
  }
  .c-g:not(.day) {  /* the pond stays green at night: the same field as in light, with a dark green window */
    --field: #1b6341; --field-dot: #237a51; --on-field: #ffffff; --on-field-link: #e4f7a9; --field-ring: #ffffff;
    --paper: #0f2a1d; --text: #eef5f0; --muted: #b7c9bf; --link: #9fe3b9; --ring: #eef5f0;
    --edge: #a8dc2c; --line: #eef5f0; --frame: #2f5a45; --dot: #a8dc2c; --cue: #a8dc2c;
    --bar: #000000; --mat: #173a2a;
    --grid: #66c48a; --th: #ffd84a; --th-text: #1b0b0e; --cell: #173a2a;
    --pill: #000000; --pill-text: #ffffff; --pill-shadow: #3b6c52; --pill2: #0f2a1d; --pill2-text: #eef5f0;
    --letter: #1b6341; --letter-text: #ffffff; --letter-head: #ffd84a; --letter-paper: #173a2a;
    --word-fill: #ffffff; --word-stroke: #0b2a1b; --word-edge: #ffffff; --word-shadow: #0b2a1b;
  }
}

/* ---- Lettering ---- */
.t-pop {
  --display: "Mochiy Pop One", "Arial Rounded MT Bold", "Hiragino Maru Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  --fs-word: 88px; --fs-h: 28px; --fs-card: 24px; --fs-btn: 18px; --fs-tab: 18px; --fs-bar: 18px; --fs-num: 60px;
  --fs-letter: 38px; --word-stroke-w: 12px;
}
.t-pixel {
  --display: "wabun pixel", monospace;
  --fs-word: 96px; --fs-h: 24px; --fs-card: 24px; --fs-btn: 16px; --fs-tab: 16px; --fs-bar: 16px; --fs-num: 64px;
  --fs-letter: 32px; --word-stroke-w: 12px;
}
/* The pixel font is light, so it gets a bold: a copy a little to the right, short of closing the letters. */
.t-pixel :is(.frame > h2, .card h3, footer .name) { text-shadow: 2px 0 0 currentColor; letter-spacing: 2px; }
.t-pixel :is(.box > h2, .bubble, .pill, nav.carts a, .frame > h3, .letter .sign) { text-shadow: 1px 0 0 currentColor; letter-spacing: 1px; }
.t-pixel .titlebar h1 { text-shadow: 2px 0 0 currentColor; letter-spacing: 2px; }
.t-pixel .big { text-shadow: 4px 0 0 currentColor; letter-spacing: 4px; }
.t-pixel :is(.card h3 [lang="ja"], .titlebar h1 [lang="ja"], .pill .size) { text-shadow: none; letter-spacing: 0; }
.t-pop :is(.card h3 [lang="ja"], .titlebar h1 [lang="ja"]) { font-family: var(--display); }

/* ---- The field and the shell ---- */
body {
  background: var(--field) radial-gradient(circle, var(--field-dot) 3px, transparent 3.6px) 0 0 / 26px 26px;
  color: var(--text);
}
:root { --bg: var(--paper); }  /* base.css's skip link sits on this */
.skip { --ring: var(--field-ring); }
.shell { max-width: 1180px; margin: 0 auto; padding: 0 20px 32px; }
.px { font-size: 16px; }
a { color: var(--link); }
[id] { scroll-margin-top: 44px; }

/* ---- Masthead: the name, the mascot and its line, a few things from its pond ---- */
.mast {
  --ring: var(--field-ring);
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "word mascot" "say mascot";
  column-gap: 8px; align-items: end; padding-top: 30px; position: relative; z-index: 0;
}
.mast::before {
  content: ""; position: absolute; right: 150px; bottom: 6px; width: 600px; height: 225px; z-index: -1;
  background: url("assets/mascot/pond.svg") right bottom / contain no-repeat;
}
.wordmark { grid-area: word; margin: 0 0 6px; line-height: 1; }
.wordmark a {
  display: inline-block; text-decoration: none; padding: 6px 14px 10px 8px; transform: rotate(-2deg); transform-origin: left bottom;
  font-family: var(--display); font-size: var(--fs-word); line-height: 1.08;
  color: var(--word-fill);
  -webkit-text-stroke: var(--word-stroke-w) var(--word-stroke); paint-order: stroke fill;
  filter: drop-shadow(3px 0 0 var(--word-edge)) drop-shadow(-3px 0 0 var(--word-edge))
    drop-shadow(0 3px 0 var(--word-edge)) drop-shadow(0 -3px 0 var(--word-edge)) drop-shadow(6px 6px 0 var(--word-shadow));
}
.wordmark .w { display: inline-block; white-space: nowrap; }
.wordmark .w > span { display: inline-block; }
.wordmark .w > span:nth-child(odd) { transform: translateY(-3px) rotate(-3deg); }
.wordmark .w > span:nth-child(even) { transform: translateY(4px) rotate(2deg); }
.wordmark .w > span:nth-child(4) { transform: translateY(-6px) rotate(4deg); }

.say {
  grid-area: say; justify-self: end; position: relative; margin: 0 18px 46px 0; max-width: 350px; padding: 12px 18px 6px;
  font-size: 18px; font-weight: bold; line-height: 1.35;
  background: var(--paper); color: var(--text); border: 3px solid var(--line); border-radius: 22px;
}
.say::before, .say::after {  /* the bubble's tail, pointing at the mascot */
  content: ""; position: absolute; top: 34px; border-style: solid; border-color: transparent transparent transparent var(--line);
  right: -24px; border-width: 4px 0 18px 24px;
}
.say::after { border-left-color: var(--paper); right: -16px; top: 36px; border-width: 3px 0 12px 17px; }
.say { --ring: var(--link); }  /* the ring sits on the bubble's paper, not on the field */
.say a { display: inline-flex; align-items: center; min-height: 44px; }
.mascot { grid-area: mascot; align-self: end; width: 320px; height: 320px; margin-bottom: -58px; position: relative; z-index: 3; pointer-events: none; }
.mascot.wide { height: auto; margin-bottom: -30px; }  /* a pose that is wider than tall */
.titlebar .pose { height: auto; margin: -34px 0 -22px auto; width: 104px; }  /* the mascot at play, on a game's title bar */
/* A scene with the mascot standing in it */
.scene { position: relative; margin: 0 0 10px; border: 3px solid var(--line); border-radius: 12px; overflow: hidden; }
.scene picture { display: block; }
.scene .bg { display: block; width: 100%; height: auto; }
.scene .actor { position: absolute; right: 4%; bottom: -2%; height: 82%; width: auto; }
.scene.side { float: right; width: 300px; margin: 0 0 8px 16px; }

/* ---- The menu: game cartridges plugged into the window's top edge, each with its own label ---- */
nav.carts { --ring: var(--field-ring); position: relative; z-index: 0; margin-bottom: -12px; padding: 0 26px; }
nav.carts ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-end; gap: 10px; }
nav.carts a {
  display: block; position: relative; min-width: 104px; padding: 16px 8px 20px; text-align: center; text-decoration: none;
  font-family: var(--display); font-size: var(--fs-tab); line-height: 24px; color: #1b0b0e;
  background: var(--cart-body); border: 3px solid var(--line); border-radius: 12px 12px 0 0;
  box-shadow: inset 0 -14px 0 rgba(0, 0, 0, 0.18);
}
nav.carts a span { display: block; background: var(--cart); border: 2px solid #1b0b0e; border-radius: 6px; padding: 0 8px; white-space: nowrap; }
nav.carts a::before {  /* the grip ridges on a cartridge's top */
  content: ""; position: absolute; left: 50%; top: 5px; width: 34px; height: 6px; transform: translateX(-50%);
  background: repeating-linear-gradient(90deg, #1b0b0e 0 3px, transparent 3px 8px);
}
nav.carts li:nth-child(5n+1) a { --cart: var(--amber); }
nav.carts li:nth-child(5n+2) a { --cart: var(--coral); }
nav.carts li:nth-child(5n+3) a { --cart: var(--lime); }
nav.carts li:nth-child(5n+4) a { --cart: var(--sky); }
nav.carts li:nth-child(5n+5) a { --cart: var(--lilac); }
nav.carts a:hover, nav.carts a:focus-visible { padding-bottom: 28px; }  /* it rises out of the slot; its foot stays put */
nav.carts a:hover span, nav.carts a:focus-visible span { background: var(--hot); }
nav.carts a[aria-current] { padding-bottom: 12px; }                      /* the current one is pushed in */
nav.carts a[aria-current] span { background: #1b0b0e; color: #ffffff; }
nav.carts a[aria-current] span::before { content: "\25B8\00A0"; color: var(--hot); }

/* ---- The window ---- */
.window { position: relative; z-index: 1; background: var(--paper); border: 5px solid var(--edge); border-radius: 24px; padding: 22px; }
.cols { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 22px; align-items: start; }
.cols > .content { grid-column: 2; grid-row: 1; }
.cols > .index { grid-column: 1; grid-row: 1; position: sticky; top: 14px; }

/* A box with a black title bar and coloured lettering */
.box { border: 3px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--paper); margin: 0 0 16px; }
.box > h2 {
  margin: 0; padding: 6px 12px; background: var(--bar); color: var(--acc, var(--amber));
  font-family: var(--display); font-weight: normal; font-size: var(--fs-bar); line-height: 28px;
}
.box > .in { padding: 8px 12px 10px; }
.box > .in > :first-child { margin-top: 0; }
.box ul { list-style: none; margin: 0; padding: 0; }
.box li + li { border-top: 2px dotted var(--frame); }
.box li a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.box .count { font-family: "wabun pixel", monospace; font-size: 16px; }
.box .sub { margin: 8px 0 2px; color: var(--muted); }
.box .wb { display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 0; }
.box .wb img { width: 40px; height: 40px; flex: none; }
table.facts { width: 100%; border-collapse: separate; border-spacing: 2px; background: var(--grid); }
table.facts th, table.facts td { padding: 3px 8px; text-align: left; vertical-align: middle; background: var(--paper); color: var(--text); }
table.facts th { font-weight: normal; background: var(--cell); width: 1%; white-space: nowrap; }
.acc-amber { --acc: var(--amber); } .acc-coral { --acc: var(--coral); } .acc-lime { --acc: var(--lime); }
.acc-sky { --acc: var(--sky); } .acc-lilac { --acc: var(--lilac); } .acc-hot { --acc: var(--hot); }
.aside-say { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; }
.aside-say img { width: 56px; height: 56px; flex: none; }
.aside-say a { display: block; padding: 8px 12px; border: 3px solid var(--line); border-radius: 16px; font-weight: bold; text-decoration: none; background: var(--paper); color: var(--text); }
.aside-say a:hover, .aside-say a:focus-visible { background: var(--hot); color: #1b0b0e; }

/* ---- Sections. Three makes of frame, so the page is not one box repeated. ---- */
.frame { position: relative; margin: 44px 0 0; padding: 0 18px 18px; border: 3px solid var(--frame); border-radius: 8px; }
.frame > h2 {  /* in the flow and pulled up over the top edge, so a long heading wraps downward and pushes the text */
  display: table; margin: -22px auto 14px; padding: 0 14px; max-width: 94%; text-align: center; transform: rotate(-1.5deg);
  background: var(--paper); color: var(--text);
  font-family: var(--display); font-weight: normal; font-size: var(--fs-h); line-height: 40px;
}
.frame > h2::after {  /* the mascot looks in after the heading */
  content: ""; display: inline-block; width: 30px; height: 30px; margin-left: 8px; vertical-align: -6px;
  background: url("assets/mascot/faces/face-smile.svg") center / contain no-repeat;
}
.frame > :last-child { margin-bottom: 0; }
.frame.thick { border: 5px solid var(--dot); border-radius: 26px; }
.frame.thick > h2 {  /* a black bubble for a heading */
  margin-top: -26px; padding: 2px 22px 4px; border-radius: 999px; background: var(--bar); color: var(--acc, var(--amber)); transform: rotate(-2deg);
}
.frame.thick > h2::after { content: none; }
.frame.rule { border: 0; border-radius: 0; padding: 0 4px; margin-top: 30px; }
.frame.rule > h2 { display: block; margin: 0 0 6px; padding: 0; max-width: none; text-align: left; transform: none; background: none; }
.content > .frame:first-child { margin-top: 26px; }
.dots { height: 10px; margin: 30px 4px 0; background: radial-gradient(circle at 5px 5px, var(--dot) 4.4px, transparent 5px) 0 0 / 20px 10px repeat-x; }
.peek::before {  /* the mascot looking over a frame's top edge */
  content: ""; position: absolute; right: 22px; top: -37px; width: 56px; height: 34px;
  background: url("assets/mascot/head.svg") center top / 56px 56px no-repeat;
}
.frame > h3 { margin: 16px 0 6px; font-family: var(--display); font-weight: normal; font-size: var(--fs-bar); line-height: 28px; }
.frame > ul:not([class]) { padding-left: 22px; margin: 8px 0; }
.frame > ul:not([class]) > li { margin: 4px 0; }
.frame > ul.links { list-style: none; padding: 0; margin: 8px 0; }
.frame > ul.links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: bold; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
.muted { color: var(--muted); }

/* ---- Cards ---- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 8px; }
.card { position: relative; border: 3px solid var(--line); border-radius: 16px; padding: 22px 14px 16px; background: var(--paper); display: flex; flex-direction: column; }
.card .go { margin-top: auto; padding-top: 14px; }
.card h3 { margin: 10px 0 2px; font-family: var(--display); font-weight: normal; font-size: var(--fs-card); line-height: 32px; }
.card h3 [lang="ja"] { display: block; font-size: 16px; line-height: 24px; color: var(--muted); }
.card p { margin: 6px 0; }
.card .meta { color: var(--muted); }
.shotmat { background: var(--mat); border-radius: 10px; padding: 12px; display: flex; justify-content: center; }
.shot { border: 3px solid var(--line); }
.bubble {  /* a black speech bubble with coloured lettering, stuck on a card's corner */
  position: absolute; top: -16px; left: 12px; transform: rotate(-3deg); z-index: 2; margin: 0;
  padding: 2px 14px; background: var(--bar); color: var(--acc, var(--amber)); border: 2px solid var(--bar); border-radius: 16px;
  font-family: var(--display); font-size: var(--fs-bar); line-height: 28px;
}
.bubble::after { content: ""; position: absolute; left: 18px; bottom: -9px; border: 6px solid transparent; border-top-color: var(--bar); border-left-color: var(--bar); border-bottom-width: 4px; }
@media (prefers-color-scheme: dark) { :root:not(.day) .bubble, :root:not(.day) .frame.thick > h2 { outline: 2px solid var(--line); } }
.chip { display: inline-block; padding: 0 6px; border-radius: 4px; background: var(--cell); color: var(--text); font-family: "wabun pixel", monospace; font-size: 16px; line-height: 24px; white-space: nowrap; }
.card h3 .lead { display: block; font: bold 18px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif; text-shadow: none; letter-spacing: 0; }
.big { display: block; margin: 6px 0 4px; font-family: var(--display); font-size: var(--fs-num); line-height: 1; color: var(--text); }
ul.titles { list-style: none; margin: 8px 0; padding: 0; }
ul.titles li { padding: 6px 0; border-top: 2px dotted var(--frame); }
ul.titles [lang="ja"] { display: inline-block; color: var(--muted); }

/* ---- Buttons: a black pill with a hard shadow; the lettering turns yellow under the pointer or the keyboard ---- */
.go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin: 14px 0 0; }
.cue {  /* three hops toward the button */
  flex: none; width: 52px; height: 22px;
  background: radial-gradient(circle at 5px 15px, var(--cue) 4px, transparent 4.6px),
    radial-gradient(circle at 20px 9px, var(--cue) 6px, transparent 6.6px),
    radial-gradient(circle at 41px 11px, var(--cue) 9px, transparent 9.6px);
}
.pill {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 22px; text-decoration: none;
  font-family: var(--display); font-size: var(--fs-btn); line-height: 24px;
  background: var(--pill); color: var(--pill-text); border: 3px solid var(--line); border-radius: 999px;
  box-shadow: 4px 5px 0 var(--pill-shadow);
}
.pill:hover, .pill:focus-visible { color: var(--hot); }
.pill:active { transform: translate(3px, 4px); box-shadow: 1px 1px 0 var(--pill-shadow); }
.pill.alt { background: var(--pill2); color: var(--pill2-text); }
.pill.alt:hover, .pill.alt:focus-visible { background: var(--hot); color: #1b0b0e; }
.pill img { width: 30px; height: 30px; margin-left: -8px; flex: none; }
.pill .size { font-family: "wabun pixel", monospace; font-size: 16px; line-height: 24px; padding: 0 6px; border-radius: 4px; background: var(--hot); color: #1b0b0e; }

/* ---- The dated log ---- */
ul.log { list-style: none; margin: 0; padding: 0; }
ul.log li { display: grid; grid-template-columns: 8.5em auto minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 6px 2px; }
ul.log li + li { border-top: 2px dotted var(--frame); }
ul.log time { font-family: "wabun pixel", monospace; font-size: 16px; }
ul.log .chip { justify-self: start; }
ul.log a { display: inline-flex; align-items: center; min-height: 44px; font-weight: bold; }
ul.next { list-style: none; margin: 8px 0; padding: 0; }
ul.next li { padding: 8px 0; border-top: 2px dotted var(--frame); }

/* ---- Tables with a hard grid ---- */
table.grid { width: 100%; border-collapse: separate; border-spacing: 2px; background: var(--grid); border: 2px solid var(--grid); }
table.grid th, table.grid td { padding: 5px 10px; text-align: left; vertical-align: top; background: var(--cell); color: var(--text); }
table.grid th { width: 9.5em; font-weight: bold; background: var(--th); color: var(--th-text); }

/* ---- The letter: one speaker, a text block, the mascot standing in it ---- */
.letter { margin: 44px 0 0; border-radius: 20px; background: var(--letter); color: var(--letter-text); padding: 14px 16px 16px; }
.letter .hook { margin: 0 0 4px 6px; color: var(--letter-text); }
.letter h2 {
  margin: 0 6px 16px; font-family: var(--display); font-weight: normal; font-size: var(--fs-letter); line-height: 1.15; color: var(--letter-head);
  -webkit-text-stroke: 7px #1b0b0e; paint-order: stroke fill; filter: drop-shadow(3px 4px 0 #000000);
}
.letter .page { background: var(--letter-paper); color: var(--text); border-radius: 12px; padding: 16px 18px; }
.letter .page::after { content: ""; display: block; clear: both; }
.letter .page p { margin: 0 0 12px; max-width: 64ch; }
.letter .rider { float: right; width: 250px; height: auto; margin: -84px -4px 0 22px; shape-outside: inset(0 0 0 0 round 40%); shape-margin: 12px; }
.letter .sign { font-family: var(--display); font-size: var(--fs-bar); line-height: 28px; }

/* ---- The game page ---- */
.titlebar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 16px; padding: 10px 16px; border: 3px solid var(--line); border-radius: 16px; background: var(--cell); }
.titlebar h1 { margin: 0; font-family: var(--display); font-weight: normal; font-size: 32px; line-height: 40px; }
.titlebar h1 [lang="ja"] { display: block; font-size: 16px; line-height: 24px; color: var(--muted); }
.titlebar p { margin: 0; }
.detail {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); grid-template-rows: auto 1fr auto;
  grid-template-areas: "main dl" "main onpage" "specs specs"; gap: 16px 22px; align-items: start;
}
.detail > .dl { grid-area: dl; margin: 0; }
.detail > .main { grid-area: main; }
.detail > .onpage { grid-area: onpage; margin: 0; }
.detail > .specs { grid-area: specs; }
/* The game at a glance: labels and values in a hard grid, three pairs a row */
dl.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; margin: 0; padding: 2px; background: var(--grid); }
dl.specs > div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 2px; }
dl.specs dt, dl.specs dd { margin: 0; padding: 5px 10px; }
dl.specs dt { font-weight: bold; background: var(--th); color: var(--th-text); }
dl.specs dd { background: var(--cell); color: var(--text); }
.detail figure, .shots figure { margin: 0; }
.detail figcaption, .shots figcaption { color: var(--muted); margin-top: 4px; }
.detail .main p { max-width: 68ch; }
.shot.hero { width: 512px; height: 448px; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, 262px); gap: 14px 18px; justify-content: center; }
.dl .in p { margin: 6px 0; }
details.readme { margin-top: 12px; border: 3px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--paper); }
details.readme summary { font-weight: bold; }
details.readme summary::before { content: "+"; width: 24px; font-family: "wabun pixel", monospace; font-size: 24px; line-height: 24px; }
details.readme[open] summary::before { content: "-"; }
details.readme pre { padding: 8px 0 12px; }

/* ---- The sample report form ---- */
.note { border: 2px dashed var(--line); border-radius: 10px; padding: 6px 12px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin: 12px 0; }
.field label { display: block; font-weight: bold; }
.field .hint { display: block; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 44px; padding: 6px 10px; color: var(--text); background: var(--paper);
  border: 3px solid var(--line); border-radius: 10px;
}
.field textarea { min-height: 88px; }
button[disabled] { min-height: 48px; padding: 6px 22px; border: 3px dashed var(--line); border-radius: 999px; background: transparent; color: var(--muted); cursor: not-allowed; }

/* ---- Footer, on the field ---- */
footer { --ring: var(--field-ring); margin-top: 18px; padding: 0 8px; color: var(--on-field); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 14px 24px; align-items: end; }
footer .pond { margin: 0; }
footer p { margin: 0 0 4px; }
footer a { color: var(--on-field); display: inline-flex; align-items: center; min-height: 44px; font-weight: bold; }
footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 20px; align-items: center; }
footer .name { font-family: var(--display); font-size: var(--fs-card); color: var(--on-field-link); }

/* ---- Narrower screens ---- */
@media (max-width: 1099px) {
  .t-pop { --fs-word: 72px; --fs-letter: 32px; --word-stroke-w: 10px; } .t-pixel { --fs-word: 80px; --word-stroke-w: 10px; }
  .mast { grid-template-columns: minmax(0, 1fr) 240px; }
  .mast::before { right: 110px; width: 460px; height: 172px; }
  .mascot { width: 240px; height: 240px; margin-bottom: -44px; }
  .cols { grid-template-columns: 208px minmax(0, 1fr); gap: 18px; }
  .shot.hero { width: 256px; height: 224px; }
  .detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  nav.carts a { min-width: 88px; }
  ul.log li { grid-template-columns: auto minmax(0, 1fr); }
  ul.log li > span:last-child { grid-column: 1 / -1; }
  .letter .rider { width: 200px; margin-top: -66px; }
}
@media (max-width: 899px) {
  .cards, .two, dl.specs { grid-template-columns: minmax(0, 1fr); }
  .card + .card { margin-top: 10px; }
  .mast { grid-template-columns: minmax(0, 1fr) 200px; }
  .mascot { width: 200px; height: 200px; margin-bottom: -18px; }  /* clear of the menu */
}
@media (max-width: 767px) {
  .t-pop { --fs-word: 44px; --fs-num: 48px; --fs-letter: 28px; --word-stroke-w: 8px; } .t-pixel { --fs-word: 48px; --fs-num: 48px; --fs-letter: 24px; --word-stroke-w: 8px; }
  .t-pixel .big { text-shadow: 3px 0 0 currentColor; letter-spacing: 3px; }
  .shell { padding: 0 12px 24px; }
  .mast { grid-template-columns: minmax(0, 1fr) 132px; grid-template-areas: "word word" "say mascot"; padding-top: 16px; }
  .mast::before { content: none; }
  .say { margin: 0 18px 0 0; max-width: none; align-self: center; justify-self: stretch; font-size: 16px; padding: 10px 14px 4px; }
  .say::before { top: 26px; } .say::after { top: 28px; }
  .mascot { width: 132px; height: 132px; margin: 0; }
  .mascot.wide { margin: 0; }
  .wordmark { margin-bottom: 8px; }
  nav.carts { margin: 14px 0 10px; padding: 0; }
  nav.carts ul { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
  nav.carts li { grid-column: span 2; }
  nav.carts li:nth-child(n+4) { grid-column: span 3; }
  nav.carts a, nav.carts a:hover, nav.carts a:focus-visible, nav.carts a[aria-current] { min-width: 0; padding: 12px 6px 8px; border-radius: 10px; box-shadow: 3px 4px 0 var(--pill-shadow); }
  .window { padding: 14px 12px; border-width: 4px; border-radius: 18px; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .cols > .content, .cols > .index { grid-column: 1; grid-row: auto; position: static; }
  .cols > .index { margin-top: 26px; }
  .frame { padding: 0 8px 12px; }
  .frame > h2 { line-height: 32px; }
  .card { padding: 22px 10px 14px; }
  .detail { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "dl" "main" "onpage" "specs"; }
  .detail figure { display: flex; flex-direction: column; align-items: center; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  footer { grid-template-columns: minmax(0, 1fr); }
  .scene.side { float: none; width: auto; margin: 0 0 10px; }
  .letter .rider { width: 168px; margin-top: -58px; margin-left: 12px; }
  table.grid th { width: 7.5em; }
  .titlebar h1 { font-size: 24px; line-height: 32px; }
}
@media (max-width: 420px) {
  .t-pop { --fs-h: 22px; --fs-tab: 16px; }
  .mast { grid-template-columns: minmax(0, 1fr) 124px; }
  .mascot { width: 124px; height: 124px; }
  table.grid, table.grid tbody, table.grid tr, table.grid th, table.grid td { display: block; width: auto; }
  table.grid tr + tr th { margin-top: 2px; }
  .shots { grid-template-columns: 262px; }
  .pill { padding: 6px 16px; }
  .letter .page { padding: 12px 12px; }
  .letter .rider { float: none; display: block; width: 150px; margin: -6px auto 4px; }  /* too narrow to wrap text around it */
  .titlebar .pose { display: none; }
}
@media (max-width: 389px) {  /* small phones: trim the frames so a 256 px screenshot still fits whole */
  .shell { padding: 0 8px 20px; }
  .window { padding: 12px 6px; }
  .frame, .frame.thick { border-left: 0; border-right: 0; border-radius: 0; padding-left: 0; padding-right: 0; }
  .card { padding: 22px 4px 12px; }
  .shotmat { padding: 8px 0; }
  .mast { grid-template-columns: minmax(0, 1fr) 100px; }
  .mascot { width: 100px; height: 100px; }
  .t-pop { --fs-word: 36px; --word-stroke-w: 6px; } .t-pixel { --fs-word: 40px; --word-stroke-w: 6px; }
  nav.carts ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  nav.carts li, nav.carts li:nth-child(n+4) { grid-column: auto; }
  nav.carts li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media print {
  body { background: #ffffff; }
  nav.carts, .mascot, .rider, .dots, .cue, .skip, .scene, .pose, .mast::before { display: none; }
  footer, footer a, footer .name { color: #000000; }
  .pill, .bubble, .box > h2, .frame.thick > h2 { background: none; color: #000000; border-color: #000000; box-shadow: none; }
  .frame, .card { break-inside: avoid; }
}

/* The page shown before launch: the shop sign on its nail. Added after base.css and r2.css by tools/make_soon.py. */
.soon { text-align: center; padding-top: 0; }
.soon > p { max-width: 34em; margin: 0 auto 12px; }
.sign { position: relative; width: 320px; max-width: 100%; margin: -20px auto 8px; }
.sign .board { display: block; width: 100%; height: auto; }
/* It hangs from the nail: 160,28 in the drawing's 320 by 290. */
.swing { transform-origin: 50% 9.66%; animation: swing 4.2s ease-in-out infinite alternate; }
@keyframes swing { from { transform: rotate(-3.5deg); } to { transform: rotate(3deg); } }
.nail { position: absolute; left: 50%; top: 9.66%; width: 12.5%; height: auto; transform: translate(-50%, -50%); }
.plate { position: absolute; left: 0; right: 0; top: 61.4%; transform: translateY(-50%); margin: 0; color: #1b0b0e; line-height: 1; }
/* the board's own wood behind the words: unseen, but it holds if the drawing does not load */
.plate span { display: block; width: fit-content; margin: 0 auto; background: #f2bd5c; }
.plate [lang="ja"] { font-size: 48px; font-weight: 900; line-height: 56px; letter-spacing: 4px; }
.plate .en { margin-top: 4px; font-family: "wabun pixel", monospace; font-size: 24px; line-height: 32px; }
@media (min-width: 600px) {
  .sign { width: 400px; }
  .plate [lang="ja"] { font-size: 60px; line-height: 64px; }
  .plate .en { font-size: 32px; line-height: 40px; }
}
@media (max-width: 359px) {
  .plate [lang="ja"] { font-size: 40px; line-height: 48px; }
  .plate .en { font-size: 16px; line-height: 24px; }
}
@media (prefers-reduced-motion: reduce) { .swing { animation: none; transform: rotate(-2deg); } }
