/* Black, brand green, monospace. Brutalist and minimal: no lines, no boxes, small text, uppercase labels
   (typography after THE-BUNKER, board-games).
   Japanese and English share the rows of one grid, so their blocks line up.
   --rows on .split = blocks per half (set by the build script, must match in both halves). */
* { box-sizing: border-box; }
html {
  background: #000;
  color: #00ff00;
  color-scheme: dark;
  /* named Japanese fonts too: Pretext measures with the same list the browser paints with */
  font-family: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, monospace;
  font-size: 12px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip; /* flying letters and the character never widen the page (phones would zoom out) */
}
body { margin: 0; padding-bottom: 64px; }
a { text-underline-offset: 2px; } /* browser link colours (dark scheme: blue, visited lilac): they stand out from the green */
a[aria-current] { color: #ff0; } /* the page you are on (its section, for the song pages) */
/* the sound switch: a speaker in the bottom right corner (on black, over the text), with waves when on, crossed out when off */
.snd { all: unset; position: fixed; bottom: 12px; right: 12px; z-index: 40; padding: 6px; background: #000; color: #00ff00; cursor: pointer; line-height: 0; }
.snd:focus-visible { outline: 1px dashed currentColor; outline-offset: 2px; }
.snd svg { display: block; }
.mute .snd .w, html:not(.mute) .snd .x { display: none; }
.mute .snd { opacity: 0.5; }
a:focus-visible { outline: 1px dashed currentColor; outline-offset: 2px; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
  max-width: 760px; /* narrow: compact text, the character fills more of it */
  margin: 0 auto;
  padding: 0 16px 24px;
}
/* each half spans all the rows and shares them (subgrid): block N of one half sits on row N of the other */
.split > div { display: grid; grid-template-rows: subgrid; grid-row: 1 / span var(--rows); }
header, main, footer, main > ul, main > dl { display: contents; }
.split * { margin: 0; min-width: 0; }
/* English on the left, Japanese on the right (the source order). */
.split > [lang="en"] { grid-column: 1; }
.split > [lang="ja"] { grid-column: 2; }

nav { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 0; }
nav a { text-decoration: none; }
nav a:hover { text-decoration: underline; }

h2, h3 { font-size: 11px; font-weight: normal; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.6; padding: 24px 0 4px; }
h1, [lang="ja"] main > h2:first-child { font-size: 18px; font-weight: normal; letter-spacing: -0.5px; text-transform: none; opacity: 1; padding: 24px 0 8px; }

p, blockquote { font-size: 13px; padding: 6px 0; }
blockquote p { padding: 0; }
blockquote + p { font-size: 11px; opacity: 0.6; padding-top: 0; }
li { list-style: none; font-size: 13px; padding: 2px 0; }
dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.6; padding-top: 8px; }
dd { font-size: 13px; }
/* lists of releases (past projects): some room between one release and the next */
dd + dd, .releases li + li { padding-top: 10px; }

footer p { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 0; }
footer p:first-child { margin-top: 40px; }
/* social links: a touch apart from the other links (cyan, dotted underline), colour only so Pretext's measures hold */
.social a, .social a:visited { color: #00e5ff; text-decoration-style: dotted; }
.social a:hover { text-decoration-style: solid; }

/* One half leads, the other is its dark echo. English leads by default;
   .ja-on on .split (a click in the Japanese half, src/main.js) swaps them. Two columns on phones too. */
.split > [lang] { transition: opacity 0.3s; }
:is(.split:not(.ja-on) > [lang="ja"], .split.ja-on > [lang="en"]) { opacity: 0.22; }
/* in the leading half the body text is lit only near the character (opacity per line, src/main.js light()) */

/* the logo, last thing on the page, under the footer (outside .split: it stays across page changes) */
.logo { max-width: 760px; margin: 0 auto; padding: 48px 16px 0; }
.logo img { display: block; width: 100%; height: auto; } /* edge to edge across both columns, a signature */

/* (ง ツ)ว (src/, built into koobcew.js): the character walks in the page, the text makes room for it. */
#kc-svg { position: absolute; left: 0; top: 0; width: 100%; height: 1px; overflow: visible; /* no clip here: Safari would clip the svg to its 1px */ /* height 0 would not be painted */ pointer-events: none; z-index: 30; }
.kc-flow { position: relative; }
.kc-ln { position: absolute; white-space: pre; }
#kc-debris { position: absolute; left: 0; top: 0; width: 100%; height: 1px; overflow-x: clip; overflow-y: visible; /* never wider than the page */ pointer-events: none; }
#kc-debris { z-index: 25; }
/* letters knocked off the text (src/debris.js) */
.kc-bit { position: absolute; white-space: pre; will-change: transform; }
/* the hint over its head at the start (src/main.js): green on black turned round, both languages, a tail down to it */
.kc-bubble { position: absolute; left: 0; top: 0; z-index: 35; margin: 0; padding: 6px 8px;
  background: #00ff00; color: #000; font-size: 11px; line-height: 1.4; text-transform: uppercase; letter-spacing: 0.06em;
  pointer-events: none; transition: opacity 0.3s; }
.kc-bubble span { display: block; white-space: nowrap; }
.kc-bubble span + span { text-transform: none; letter-spacing: 0; }
.kc-bubble::after { content: ""; position: absolute; top: 100%; left: var(--tail, 50%); margin-left: -6px;
  border: 6px solid transparent; border-top-color: #00ff00; }
.kc-bubble.kc-out { opacity: 0; }
.kc-drag { user-select: none; -webkit-user-select: none; cursor: grabbing; }
