/* Hallmark · macrostructure: Marquee Hero · tone: early-web JP / Y2K
 * anchor hue: orange · nav: N6 topbar masthead · footer: Ft4 colophon
 * enrichment: none (SVG ornaments) · audit-fix pass 2026-10-13
 * Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4
 */

:root {
  --bg: #0F0E0C;
  --surface: #171512;
  --elevated: #1D1A16;
  --raised: #24201B;
  --border: #33302A;
  --border-strong: #5C554B;
  --text: #F1EDE6;
  --muted: #A8A096;

  --accent: #FF6B35;
  --accent-dim: #C45528;
  --gold: #C9A55C;
  --sakura: #D4A0AA;
  --aqua: #7EB6CC;
  --green: #7FBF95;
  --error: #D97B84;

  --led: #E8C547;
  --led-bg: #14110A;

  --font-display: "VT323", "Courier New", monospace;
  --font-jp: "DotGothic16", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, monospace;
  --font-body: "IBM Plex Mono", "Menlo", "Consolas", monospace;

  --page-w: 900px;
  --shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
  --shadow-ink: rgba(0, 0, 0, 0.5);
  --shadow-deep: rgba(0, 0, 0, 0.65);

  --accent-hover: #FF8250;
  --on-accent: #1A0C05;
  --code-bg: #12100E;
  --led-cell: #1A1608;
  --led-cell-edge: #2E2810;
  --spark-peach: #FFB08A;

  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --z-sparkle: 50;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(color-mix(in srgb, var(--text) 3%, transparent) 1px, transparent 1.5px);
  background-size: 26px 26px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  overflow-x: hidden;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: var(--aqua); text-decoration-color: color-mix(in srgb, var(--aqua) 40%, transparent); }
a:hover { color: var(--text); text-decoration-color: var(--accent); }
code { font-family: var(--font-body); color: var(--gold); }

::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--text); }

/* ---------- background canvas ---------- */
#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
}

/* ---------- side rails ---------- */
.rail {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--font-jp);
  font-size: 12px;
  letter-spacing: 0.35em;
  color: color-mix(in srgb, var(--muted) 30%, transparent);
  z-index: 5;
  pointer-events: none;
  user-select: none;
}
.rail-left  { left: 12px; }
.rail-right { right: 12px; }

/* ---------- page shell ---------- */
.page {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 28px 16px 72px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* ==========================================================================
   WINDOW PANELS
   ========================================================================== */
.window {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
}

.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  background: var(--raised);
  border-bottom: 1px solid var(--border);
  user-select: none;
}

.titlebar-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.05em;
}
.window--hero .titlebar-text { color: var(--accent); }

.titlebar-btns { display: inline-flex; gap: 3px; flex: none; }
.titlebar-btns i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 13px;
  font-style: normal;
  font-size: 9px;
  font-family: var(--font-body);
  background: var(--border);
  color: var(--muted);
  border: 1px solid var(--border-strong);
  line-height: 1;
}
.titlebar-btns i.tb-close { color: var(--accent); }

.window--thin .titlebar { padding: 4px 10px; }

/* ==========================================================================
   TOPBAR
   ========================================================================== */
.topbar-body {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.crumb b { color: var(--text); }
.topbar-date { font-family: var(--font-jp); }

/* ==========================================================================
   TICKER
   ========================================================================== */
.ticker {
  overflow: hidden;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.ticker--big {
  border: 1px solid var(--border);
  background: var(--surface);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
  font-family: var(--font-jp);
  font-size: 12px;
  color: var(--muted);
  padding: 5px 0;
  white-space: nowrap;
}
.ticker--big .ticker-track { font-size: 13px; padding: 7px 0; color: var(--text); }
.ticker-track--rev { animation-direction: reverse; animation-duration: 42s; }
.ticker:hover .ticker-track { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero-body {
  position: relative;
  padding: 52px 28px 44px;
  text-align: center;
  overflow: hidden;
}

.hero-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
}

.hero-icon {
  width: 72px;
  height: 72px;
  image-rendering: pixelated;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  background: var(--bg);
}

.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(60px, 11vw, 96px);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--text);
  text-shadow: 2px 2px 0 var(--shadow-deep);
  overflow-wrap: anywhere;
  min-width: 0;
}

.cursor-block {
  color: var(--accent);
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-jp {
  font-family: var(--font-jp);
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--sakura);
  margin: 12px 0 22px;
}

.tagline { margin: 0 0 16px; }
.tagline-line {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(24px, 4.2vw, 34px);
  line-height: 1.15;
  letter-spacing: 0.06em;
  color: var(--text);
}
.tagline-line--accent { color: var(--accent); }
.tagline-line { overflow-wrap: anywhere; min-width: 0; }

.hero-sub {
  color: var(--muted);
  margin: 0 0 26px;
  font-size: 14px;
}

.blink-badge {
  display: inline-block;
  font-family: var(--font-jp);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent);
  background: transparent;
  padding: 4px 14px;
  border: 1px solid var(--accent-dim);
  margin-bottom: 26px;
}

.cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 13px 44px;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  box-shadow: var(--shadow);
  transition: transform 120ms var(--ease-out), box-shadow 120ms var(--ease-out), background 120ms var(--ease-out);
  margin-bottom: 18px;
}
.cta:hover, .cta:focus-visible {
  background: var(--accent-hover);
  color: var(--on-accent);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--shadow-ink);
}
.cta:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--shadow-ink); }
.cta-jp { font-family: var(--font-jp); font-size: 14px; letter-spacing: 0.18em; }
.cta-en { font-family: var(--font-display); font-size: 24px; line-height: 1; letter-spacing: 0.14em; }

.hero-meta { font-size: 12px; color: var(--muted); margin: 0; }

/* hero ornaments */
.orn { position: absolute; pointer-events: none; image-rendering: pixelated; opacity: 0.35; }
.orn-torii { width: 56px; left: 28px; top: 26px; }
.orn-floppy { width: 38px; right: 34px; top: 32px; }
.orn-sakura { width: 18px; left: 12%; bottom: 20px; }
.orn-sakura-2 { width: 14px; right: 14%; bottom: 44px; left: auto; }

.float-a { animation: floaty 6.5s var(--ease-in-out) infinite; }
.float-b { animation: floaty 7.5s var(--ease-in-out) infinite 0.8s; }
.float-c { animation: floaty 6s var(--ease-in-out) infinite 1.6s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* ==========================================================================
   SHARED SECTION BITS
   ========================================================================== */
.jp-label {
  font-family: var(--font-jp);
  letter-spacing: 0.25em;
  color: var(--muted);
  margin: 0 0 10px;
  font-size: 13px;
}
.hl-aqua   { color: var(--aqua); }
.hl-yellow { color: var(--gold); }

/* ==========================================================================
   PITCH
   ========================================================================== */
.pitch-body { padding: 18px 28px 28px; }
.pitch-copy { max-width: 60ch; margin: 0 auto 24px; }
.pitch-copy p { margin: 0 0 14px; }
.pitch-official { font-size: 12px; color: var(--muted); }

/* lesson excerpt — typographic frame (rules + label), not window chrome */
.fakeui {
  max-width: 540px;
  margin: 0 auto 28px;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  background: var(--code-bg);
  text-align: left;
}
.fakeui-caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 12px;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.fakeui-tag {
  color: var(--error);
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.fakeui-code {
  margin: 0;
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
  color: var(--text);
}
.tok-k  { color: var(--accent); font-weight: 700; }
.tok-t  { color: var(--aqua); }
.tok-s  { color: var(--green); }
.tok-c  { color: var(--muted); font-style: italic; }
.tok-err { color: var(--error); text-decoration: underline wavy var(--error) 1px; }
.tok-err-msg { color: var(--error); }
.fakeui-status {
  border-top: 1px solid var(--border);
  padding: 9px 12px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-jp);
}
.fakeui-status b { color: var(--gold); }
.status-dot {
  width: 7px; height: 7px;
  background: var(--gold);
  flex: none;
}

/* stats */
.stats {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  max-width: 640px;
  background: var(--border);
  border: 1px solid var(--border);
}
.stat {
  background: var(--elevated);
  padding: 16px 8px 12px;
  text-align: center;
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
  color: var(--text);
}
.stat-num--text { color: var(--accent); font-size: 30px; }
.stat-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}
.stat-label i { font-style: normal; font-family: var(--font-jp); color: var(--muted); font-size: 10px; opacity: 0.75; }

/* the page's one asymmetric break: copy left, live lesson excerpt right */
@media (min-width: 821px) {
  .pitch-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    column-gap: 36px;
    align-items: start;
  }
  .pitch-copy { grid-column: 1; margin: 0; max-width: none; }
  .fakeui { grid-column: 2; margin: 4px 0 0; max-width: none; }
  .stats { grid-column: 1 / -1; margin-top: 22px; }
}

/* ==========================================================================
   FEATURES
   ========================================================================== */
.features-body { padding: 20px 28px 30px; }

.feature-grid {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.feature {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  column-gap: 13px;
  align-items: start;
  background: var(--raised);
  padding: 16px 18px 15px;
  transition: box-shadow 140ms var(--ease-out);
}
.feature:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.feature-icon { grid-column: 1; grid-row: 1; width: 26px; height: 26px; opacity: 0.8; align-self: center; }
.feature-icon svg { width: 100%; height: 100%; }
.feature-name {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  align-self: center;
  font-family: var(--font-jp);
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.06em;
  min-width: 0;
}
.feature-name span {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.feature p { grid-column: 1 / -1; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.feature p code { font-size: 12px; }

.pro-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px dashed var(--border-strong);
  background: transparent;
  padding: 14px 16px;
}
.pro-flag {
  flex: none;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 5px 9px;
  letter-spacing: 0.08em;
}
.pro-note p { margin: 0; font-size: 13px; color: var(--muted); }
.pro-note p b { color: var(--text); }

/* ==========================================================================
   CURRICULUM
   ========================================================================== */
.curriculum-body { padding: 20px 28px 28px; }

.module-list {
  list-style: none;
  margin: 0 auto 16px;
  padding: 0;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.module {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 12px;
  background: var(--elevated);
  padding: 11px 14px;
  transition: background 130ms var(--ease-out);
}
.module:hover { background: var(--raised); }

.module-num {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--muted);
  text-align: center;
  line-height: 1;
}
.module--free .module-num { color: var(--accent); }

.module-name { font-size: 14px; font-weight: 600; }
.module-name i {
  display: block;
  font-style: normal;
  font-family: var(--font-jp);
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.14em;
  margin-top: 2px;
  opacity: 0.8;
}
.module-tag {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--muted);
  border: 1px solid var(--border-strong);
  padding: 2px 9px;
  letter-spacing: 0.08em;
}
.module-tag--free { color: var(--green); border-color: color-mix(in srgb, var(--green) 50%, transparent); }

.curriculum-more {
  text-align: center;
  font-family: var(--font-jp);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin: 0;
}

/* ==========================================================================
   DOWNLOAD
   ========================================================================== */
.download-body { padding: 20px 26px 30px; text-align: center; }

.prerelease-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--gold);
  padding: 3px 12px;
  margin: 0 0 14px;
}
.prerelease-badge span { color: var(--text); }

.os-status {
  font-family: var(--font-jp);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  min-height: 1.4em;
  margin: 0 0 20px;
}
.os-status b { color: var(--text); }

.os-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  text-align: left;
  margin-bottom: 20px;
}

.os-card {
  border: none;
  background: var(--raised);
  padding: 16px 14px 14px;
  position: relative;
  transition: box-shadow 140ms var(--ease-out);
}
.os-card.is-detected { box-shadow: inset 0 0 0 1px var(--accent-dim); }

.os-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; position: relative; }
.os-logo { width: 22px; height: 22px; flex: none; opacity: 0.75; }
.os-logo svg { width: 100%; height: 100%; }
.os-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--text);
  overflow-wrap: anywhere;
  min-width: 0;
}

.os-ribbon {
  position: absolute;
  top: -10px;
  right: 0;
  font-family: var(--font-jp);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--raised);
  border: 1px solid var(--accent-dim);
  padding: 1px 6px;
  white-space: nowrap;
}
.os-ribbon[hidden] { display: none; }

.os-arch {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 12px;
}

.dl-btn {
  display: block;
  text-decoration: none;
  text-align: center;
  border: 1px solid var(--border-strong);
  background: var(--raised);
  padding: 10px 8px 8px;
  margin-bottom: 8px;
  color: var(--text);
  transition: border-color 110ms var(--ease-out), background 110ms var(--ease-out);
}
.dl-btn b {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0.06em;
}
.dl-btn b em {
  font-style: normal;
  font-family: var(--font-jp);
  font-size: 10px;
  color: var(--muted);
  margin-left: 4px;
  vertical-align: middle;
}
.dl-btn span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.02em;
  margin-top: 3px;
  word-break: break-all;
  color: var(--muted);
}
.dl-btn:hover, .dl-btn:focus-visible {
  border-color: var(--text);
  color: var(--text);
}
.dl-btn:hover span { color: var(--muted); }

.dl-btn.is-picked {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.dl-btn.is-picked span { color: color-mix(in srgb, var(--on-accent) 75%, transparent); }
.dl-btn.is-picked b em { color: color-mix(in srgb, var(--on-accent) 80%, transparent); }
.dl-btn.is-picked:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }

.dl-btn--ghost {
  background: transparent;
  border-style: dashed;
}
.dl-btn--ghost.is-picked {
  background: var(--accent);
  border-style: solid;
}

.os-note {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin: 6px 0 0;
}
.os-note b { color: var(--text); font-weight: 600; }

.sha-line {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.sha-line a { color: var(--gold); }

/* ==========================================================================
   RELATED LINKS
   ========================================================================== */
.related-body { padding: 20px 26px 26px; }

.linkbar {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.linkbar a {
  display: block;
  text-decoration: none;
  background: var(--raised);
  padding: 12px 12px 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  transition: box-shadow 120ms var(--ease-out);
  height: 100%;
}
.linkbar a span {
  display: block;
  font-family: var(--font-jp);
  font-weight: 400;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.06em;
  opacity: 0.85;
}
.linkbar a:hover { box-shadow: inset 0 0 0 1px var(--accent-dim); color: var(--text); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-body {
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.counter-label {
  font-family: var(--font-jp);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 0 0 10px;
}
.counter {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  background: var(--led-bg);
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 0 8px color-mix(in srgb, var(--led) 7%, transparent);
}
.counter span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 30px;
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  color: var(--led);
  background: var(--led-cell);
  border: 1px solid var(--led-cell-edge);
}
.counter-since { font-size: 10px; color: var(--muted); margin: 10px 0 0; letter-spacing: 0.08em; }

.guestbook {
  border: 1px dashed var(--border-strong);
  padding: 14px 18px;
  background: transparent;
  text-align: left;
  max-width: 400px;
  width: 100%;
}
.guestbook-title {
  font-family: var(--font-jp);
  font-size: 12px;
  color: var(--text);
  margin: 0 0 10px;
  letter-spacing: 0.1em;
}
.guestbook-title span { color: var(--muted); font-size: 10px; margin-left: 6px; }
.guestbook label {
  display: block;
  font-family: var(--font-jp);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}
.guestbook input {
  width: 100%;
  margin-top: 3px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12px;
  padding: 5px 7px;
}
.guestbook button {
  font-family: var(--font-jp);
  font-size: 12px;
  padding: 4px 14px;
  background: var(--raised);
  color: var(--border-strong);
  border: 1px solid var(--border-strong);
  cursor: not-allowed;
  margin-top: 4px;
}

/* 88x31 badges — desaturated */
.badges88 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 620px;
}
.badge88 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 31px;
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1.05;
  text-align: center;
  letter-spacing: 0.04em;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  background: var(--elevated);
  user-select: none;
  transition: border-color 120ms var(--ease-out), color 120ms var(--ease-out);
}
.badge88:hover { border-color: var(--muted); color: var(--text); }

.b-rust, .b-inside { color: var(--accent); }
.b-new { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 50%, transparent); }

.construction {
  font-family: var(--font-jp);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  padding: 5px 14px;
  margin: 0;
}

.footer-credit { display: flex; align-items: center; gap: 16px; }
.orn-crab { width: 52px; flex: none; opacity: 0.75; animation: floaty 5.5s ease-in-out infinite; }
.footer-credit p { margin: 0; font-size: 13px; }
.footer-credit b { color: var(--accent); }
.credit-jp { font-family: var(--font-jp); font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }

.best-viewed {
  font-size: 10px;
  color: var(--muted);
  max-width: 56ch;
  margin: 0;
  letter-spacing: 0.04em;
  opacity: 0.8;
}
.best-viewed b { color: var(--text); }

/* ==========================================================================
   CURSOR SPARKLES (spawned by main.js)
   ========================================================================== */
.sparkle {
  position: fixed;
  width: 7px;
  height: 7px;
  pointer-events: none;
  z-index: var(--z-sparkle);
  background: var(--text);
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
  animation: sparkle-out 0.6s var(--ease-out) forwards;
  will-change: transform, opacity;
}
.sparkle--b { background: var(--spark-peach); }
.sparkle--c { background: var(--gold); }
@keyframes sparkle-out {
  0%   { transform: translate(-50%, -50%) scale(1) rotate(0deg);    opacity: 0.8; }
  100% { transform: translate(-50%, -110%) scale(0.15) rotate(90deg); opacity: 0; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1120px) {
  .rail { display: none; }
}

@media (max-width: 820px) {
  .os-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .linkbar { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero-body { padding: 36px 16px 32px; }
  .orn-torii { width: 40px; left: 10px; top: 14px; }
  .orn-floppy { width: 28px; right: 12px; top: 16px; }
  .pitch-body, .features-body, .curriculum-body, .download-body { padding-inline: 16px; }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  .page { padding-inline: 8px; gap: 20px; }
  .hero-mark { flex-direction: column; gap: 12px; }
  .linkbar { grid-template-columns: 1fr; }
  .module { grid-template-columns: 40px 1fr; }
  .module-tag { grid-column: 2; justify-self: start; }
  .footer-credit { flex-direction: column; }
  .cta { padding: 12px 28px; width: 100%; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ticker-track { animation: none !important; transform: none !important; }
  .cursor-block { opacity: 1 !important; }
  .float-a, .float-b, .float-c, .orn-crab { animation: none !important; }
  .sparkle { display: none !important; }
}
