/* する (suru) — site styles. Plain CSS, no build step. */

:root {
  --bg: #05070f;
  --bg-2: #0a0f1e;
  --panel: rgba(14, 22, 42, 0.78);
  --panel-solid: #0d1528;
  --line: rgba(94, 234, 255, 0.16);
  --line-strong: rgba(94, 234, 255, 0.38);
  --text: #e6ecff;
  --muted: #8f9bbd;
  --cyan: #5eeaff;
  --pink: #ff4f9a;
  --violet: #b28cff;
  --amber: #ffc46b;
  --green: #b8f28a;
  --font-sans: "Space Grotesk", "Zen Kaku Gothic New", system-ui, sans-serif;
  --font-jp: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-code: "M PLUS 1 Code", "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 14px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="ja"] body { font-family: var(--font-jp); }

/* faint grid over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(94, 234, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 234, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, rgba(0,0,0,.55) 55%, transparent 100%);
  z-index: 0;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.wrap { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(5, 7, 15, 0.72);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 50%;
  box-shadow: 0 0 14px rgba(94,234,255,.45);
}
.brand small { color: var(--muted); font-weight: 500; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.nav a { color: var(--muted); }
/* many links: keep each on one line, and scroll sideways instead of squeezing the brand */
.brand { flex: none; white-space: nowrap; }
.nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: none; white-space: nowrap; }
@media (max-width: 1360px) { .nav { gap: 16px; font-size: 14px; } }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

.lang {
  display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden;
  font-size: 13px; font-weight: 600; flex: none;
}
.lang a, .lang span { padding: 5px 12px; color: var(--muted); }
.lang a:hover { color: var(--text); text-decoration: none; background: rgba(94,234,255,.08); }
.lang [aria-current="true"] { color: var(--bg); background: var(--cyan); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 96px 0 72px; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: auto -20% -40% -20%; height: 70%;
  background: radial-gradient(ellipse at 30% 0%, rgba(94,234,255,.18), transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(255,79,154,.16), transparent 55%);
  filter: blur(20px); z-index: 0; pointer-events: none;
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-code); font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
h1 {
  font-size: clamp(40px, 6vw, 72px); line-height: 1.04; margin: 18px 0 22px; letter-spacing: -0.02em; font-weight: 700;
}
html[lang="ja"] h1 { letter-spacing: 0; line-height: 1.18; font-weight: 900; }
h1 .glow {
  background: linear-gradient(92deg, var(--cyan), var(--violet) 55%, var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 19px; color: #c3cbe6; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 10px;
  font-weight: 600; font-size: 16px; border: 1px solid var(--line-strong); color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(100deg, var(--cyan), #7aa8ff); color: #04101c; border-color: transparent;
  box-shadow: 0 0 24px rgba(94,234,255,.35);
}
.btn.primary:hover { box-shadow: 0 0 36px rgba(94,234,255,.55); }
.btn.ghost:hover { background: rgba(94,234,255,.07); }

.hero-art { position: relative; }
.kanji-bg {
  position: absolute; left: 50%; top: 50%; transform: translate(-6%, -50%); z-index: 0;
  font-family: var(--font-jp); font-weight: 900; font-size: 440px; line-height: 1; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.5px rgba(94,234,255,.16);
  text-shadow: 0 0 60px rgba(94,234,255,.10);
  user-select: none; pointer-events: none;
}
.hero .wrap { z-index: 1; }
.hud {
  position: absolute; right: -40px; top: 0; bottom: 0; writing-mode: vertical-rl;
  font-family: var(--font-jp); font-size: 13px; letter-spacing: .55em; color: rgba(94,234,255,.55);
  display: flex; align-items: center; gap: 14px;
}
.hud::before, .hud::after { content: ""; flex: 1; width: 1px; background: linear-gradient(var(--line-strong), transparent); }
.hud::before { background: linear-gradient(transparent, var(--line-strong)); }
.hero-art .window { position: relative; z-index: 1; }

/* ---------- code windows ---------- */
.window {
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(255,79,154,.06), 0 24px 60px rgba(0,0,0,.55), 0 0 40px rgba(94,234,255,.08);
  overflow: hidden; backdrop-filter: blur(6px);
}
.window-bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); font-family: var(--font-code); font-size: 12px; color: var(--muted);
}
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #29324d; display: inline-block; }
.window-bar i:first-child { background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.window-bar span { margin-left: 8px; }
pre {
  margin: 0; padding: 18px 20px; overflow-x: auto;
  font-family: var(--font-code); font-size: 15px; line-height: 1.75; color: #dfe6ff;
  tab-size: 4;
}
code { font-family: var(--font-code); }
:not(pre) > code {
  background: rgba(94,234,255,.08); border: 1px solid var(--line); border-radius: 6px;
  padding: 1px 6px; font-size: .9em; white-space: nowrap;
}
pre.out {
  border-top: 1px dashed var(--line); background: rgba(0,0,0,.25); color: var(--green); font-size: 14px;
  padding: 12px 20px;
}
pre.out::before { content: "▸ output"; display: block; color: var(--muted); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
html[lang="ja"] pre.out::before { content: "▸ 出力"; letter-spacing: .1em; }
pre.out.err { color: #ff8fb8; }
pre.sh { color: #cfd8f5; }
pre.sh .p { color: var(--pink); user-select: none; }

/* syntax colours (applied by site.js) */
.t-v { color: var(--cyan); }
.t-p { color: var(--pink); font-weight: 600; }
.t-k { color: var(--violet); }
.t-s { color: var(--amber); }
.t-n { color: #ffd9a8; }
.t-c { color: #66729a; font-style: italic; }
.t-q { color: #d8c7ff; }

/* ---------- sections ---------- */
section { position: relative; padding: 88px 0; }
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head .num {
  font-family: var(--font-code); color: var(--pink); font-size: 13px; letter-spacing: .2em;
}
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.15; margin: 10px 0 14px; letter-spacing: -0.01em; }
html[lang="ja"] h2 { letter-spacing: 0; line-height: 1.3; }
h2 .jp { font-family: var(--font-jp); color: var(--cyan); font-weight: 900; margin-right: .3em; text-shadow: 0 0 18px rgba(94,234,255,.45); }
.section-head p { color: #b9c2df; font-size: 18px; margin: 0; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }

/* particle table */
.particles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.particle {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: rgba(13,21,40,.55);
}
.particle b { font-family: var(--font-jp); font-size: 28px; color: var(--pink); text-shadow: 0 0 14px rgba(255,79,154,.5); display: block; line-height: 1.2; }
.particle span { color: var(--muted); font-size: 14px; }

/* feature cards */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card {
  position: relative; padding: 26px 24px 24px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16,25,48,.8), rgba(9,14,28,.8));
  border: 1px solid var(--line); overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card .glyph {
  font-family: var(--font-jp); font-weight: 900; font-size: 44px; line-height: 1; display: inline-block;
  color: transparent; -webkit-text-stroke: 1.2px var(--cyan); text-shadow: 0 0 18px rgba(94,234,255,.35);
  margin-bottom: 14px;
}
.card:nth-child(3n+2) .glyph { -webkit-text-stroke-color: var(--pink); text-shadow: 0 0 18px rgba(255,79,154,.35); }
.card:nth-child(3n) .glyph { -webkit-text-stroke-color: var(--violet); text-shadow: 0 0 18px rgba(178,140,255,.35); }
.card h3 { margin: 0 0 6px; font-size: 19px; }
.card p { margin: 0; color: #aeb8d8; font-size: 15.5px; }

.pill {
  display: inline-block; font-family: var(--font-code); font-size: 12px; letter-spacing: .08em;
  padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--cyan);
}
.pill.soon { color: var(--amber); border-color: rgba(255,196,107,.45); }

.libs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.libs code { font-family: var(--font-jp); }

/* install */
.install { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 28px; }
.install .card { padding: 18px 18px; }
.install .card h3 { font-size: 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.install .card p { font-size: 14px; }

.closing { text-align: center; padding: 110px 0 120px; }
.closing .big {
  font-family: var(--font-jp); font-weight: 900; font-size: clamp(64px, 14vw, 160px); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--cyan); text-shadow: 0 0 40px rgba(94,234,255,.3);
  letter-spacing: .1em;
}
.closing p { color: #b9c2df; font-size: 18px; }
.closing .cta { justify-content: center; }
.closing p.origin { max-width: 560px; margin: 56px auto 0; color: var(--muted); font-size: 13px; line-height: 1.9; }
.mascot { margin: 0 auto 28px; }
.mascot img { width: 240px; height: auto; filter: drop-shadow(0 0 6px rgba(94,234,255,.65)); }
.mascot figcaption { color: var(--muted); font-size: 15px; margin-top: 6px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 14px; position: relative; z-index: 1; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ---------- tutorial ---------- */
.doc { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; padding-top: 56px; padding-bottom: 96px; }
.toc { position: sticky; top: 88px; align-self: start; font-size: 14.5px; max-height: calc(100vh - 110px); overflow-y: auto; }
.toc p { font-family: var(--font-code); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--pink); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; border-left: 1px solid var(--line); }
.toc li { counter-increment: toc; }
.toc a { display: block; padding: 5px 0 5px 14px; color: var(--muted); border-left: 2px solid transparent; margin-left: -1px; }
.toc a::before { content: counter(toc, decimal-leading-zero) "  "; font-family: var(--font-code); font-size: 11px; color: #4d587a; }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.active { color: var(--cyan); border-left-color: var(--cyan); }
.article { min-width: 0; max-width: 780px; }
.article h1 { font-size: clamp(36px, 5vw, 54px); margin-top: 8px; }
.article h2 { font-size: 28px; margin: 64px 0 12px; padding-top: 8px; scroll-margin-top: 84px; }
.article h2 .n { font-family: var(--font-code); color: var(--pink); font-size: 15px; display: block; letter-spacing: .14em; }
.article h3 { font-size: 19px; margin: 28px 0 8px; }
.article p, .article li { color: #c9d1ec; }
.article .window { margin: 18px 0 22px; }
.note {
  border: 1px solid rgba(178,140,255,.35); background: rgba(178,140,255,.07);
  border-radius: 12px; padding: 14px 18px; margin: 20px 0; color: #d6cdf7; font-size: 15.5px;
}
.note b { color: var(--violet); }
table { width: 100%; border-collapse: collapse; margin: 16px 0 22px; font-size: 15px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
td code { white-space: nowrap; }
td:first-child { font-family: var(--font-jp); font-weight: 700; color: var(--pink); font-size: 18px; }
.table-scroll { overflow-x: auto; }
.next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.next a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: rgba(13,21,40,.55); }
.next a:hover { border-color: var(--line-strong); text-decoration: none; }
.next a span { display: block; color: var(--muted); font-size: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap, .split { grid-template-columns: minmax(0, 1fr); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .install { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
  .kanji-bg { font-size: 300px; left: 20%; top: 72%; }
  .hud { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav { display: none; }
  .lang { margin-left: auto; }
  .hero { padding: 56px 0 48px; }
  .grid, .install, .particles, .next { grid-template-columns: minmax(0, 1fr); }
  .particles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  section { padding: 64px 0; }
  pre { font-size: 13.5px; padding: 14px 14px; }
  .kanji-bg { font-size: 200px; left: 0; }
  .brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
}

.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.four { grid-template-columns: minmax(0, 1fr); } }

/* ---------- “Try it” links on code windows (site.js) ---------- */
.window-bar .try { margin-left: auto; font-size: 12px; color: var(--cyan); letter-spacing: .04em; }
.window-bar .try:hover { text-decoration: none; text-shadow: 0 0 8px var(--cyan); }

/* ---------- playground ---------- */
.playground { padding-top: 48px; padding-bottom: 80px; }
.pg-head h1 { font-size: clamp(32px, 4.4vw, 48px); margin: 8px 0 6px; line-height: 1.2; }
.pg-head .lead { margin: 0 0 24px; font-size: 17px; }
.pg-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.pg-toolbar .btn { padding: 9px 18px; font-size: 15px; cursor: pointer; font-family: inherit; }
.pg-toolbar .btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.pg-toolbar .btn.ghost { background: transparent; }
.pg-toolbar kbd { font-family: var(--font-code); font-size: 11px; opacity: .7; margin-left: 6px; }
.pg-select { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.pg-select select {
  background: var(--panel-solid); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 8px 10px; font: inherit; font-size: 14px; max-width: 60vw;
}
.pg-status { color: var(--muted); font-size: 14px; margin-left: auto; }
.pg-status.busy { color: var(--amber); }
.pg-status.bad { color: #ff8fb8; }
.pg-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.pg-side { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 18px; min-width: 0; }
.pg-side .window { display: flex; flex-direction: column; min-height: 0; }
.pg-version { margin-left: auto !important; }
/* the editor: a transparent textarea over the highlighted copy, with the same font and box */
.pg-code { position: relative; height: 480px; }
.pg-code textarea, .pg-code .pg-hl {
  position: absolute; inset: 0; margin: 0; border: 0; padding: 18px 20px;
  font-family: var(--font-code); font-size: 15px; line-height: 1.75; tab-size: 4;
  white-space: pre; overflow: auto; overflow-wrap: normal; letter-spacing: 0;
}
.pg-code .pg-hl { pointer-events: none; color: #dfe6ff; scrollbar-width: none; }
.pg-code .pg-hl::-webkit-scrollbar { display: none; }
.pg-code textarea {
  width: 100%; height: 100%; resize: none; background: transparent; color: transparent;
  caret-color: var(--cyan); outline: none;
}
.pg-code textarea::selection { background: rgba(94,234,255,.25); color: transparent; }
.pg-input {
  width: 100%; height: 92px; resize: vertical; border: 0; outline: none; background: transparent; color: var(--text);
  font-family: var(--font-code); font-size: 14px; line-height: 1.6; padding: 12px 20px;
}
.pg-input::placeholder { color: #5a6687; }
.pg-output {
  flex: 1; min-height: 200px; max-height: 360px; overflow: auto; color: var(--green); font-size: 14px;
  background: rgba(0,0,0,.25); white-space: pre-wrap; overflow-wrap: anywhere;
}
.pg-output .pg-err { color: #ff8fb8; }
.pg-output .pg-note { color: var(--muted); }
.pg-output .pg-in { color: var(--cyan); }
.playground .note { margin-top: 24px; }
@media (max-width: 960px) {
  .pg-grid { grid-template-columns: minmax(0, 1fr); }
  .pg-code { height: 360px; }
  .pg-output { max-height: 300px; }
}
@media (max-width: 640px) {
  .playground { padding-top: 32px; }
  .pg-code textarea, .pg-code .pg-hl { font-size: 13.5px; padding: 14px 14px; }
  .pg-status { margin-left: 0; width: 100%; }
}

/* ---------- keys (typing page) ---------- */
.article kbd {
  font-family: var(--font-code); font-size: .82em; padding: 1px 7px; border-radius: 6px; white-space: nowrap;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; background: rgba(13,21,40,.8); color: var(--text);
}
.joke { border-color: rgba(255,94,168,.45); background: rgba(255,94,168,.08); color: #f4d3e3; }
.joke b { color: var(--pink); }

/* ---------- playground: typing Japanese ---------- */
.pg-ime { margin-top: 24px; border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; background: rgba(13,21,40,.55); color: #c9d1ec; font-size: 15px; }
.pg-ime summary { cursor: pointer; padding: 14px 0; color: var(--text); font-weight: 600; }
.pg-ime[open] { padding-bottom: 8px; }
.pg-ime h3 { font-size: 16px; margin: 0 0 6px; color: var(--cyan); }
.pg-ime p { margin: 0 0 10px; }
.pg-ime-os { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.pg-ime-os > div { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.pg-ime kbd {
  font-family: var(--font-code); font-size: .82em; padding: 1px 6px; border-radius: 6px; white-space: nowrap;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; background: rgba(13,21,40,.8); color: var(--text);
}
.pg-ime td:nth-child(3) { font-family: var(--font-jp); font-weight: 700; color: var(--pink); font-size: 18px; }
@media (max-width: 760px) { .pg-ime-os { grid-template-columns: minmax(0, 1fr); } }

/* ---------- typing practice ---------- */
.tp-card { border: 1px solid var(--line); border-radius: 14px; background: rgba(13,21,40,.6); padding: 22px 24px; margin-top: 18px; }
.tp-progress { display: flex; align-items: center; gap: 12px; color: var(--muted); font-family: var(--font-code); font-size: 13px; }
.tp-bar { flex: 1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.tp-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--pink)); transition: width .3s; }
.tp-label { margin: 18px 0 0; color: var(--muted); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.article .tp-target { font-family: var(--font-jp); font-weight: 900; font-size: clamp(30px, 6vw, 46px); color: var(--text); margin: 4px 0 2px; line-height: 1.3; overflow-wrap: anywhere; }
.article .tp-meaning { color: var(--muted); margin: 0 0 16px; }
.tp-form { display: flex; gap: 10px; flex-wrap: wrap; }
.tp-input {
  flex: 1 1 240px; min-width: 0; font-family: var(--font-jp); font-size: 22px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: #060a16; color: var(--text); outline: none;
}
.tp-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(94,234,255,.15); }
.tp-input.ok { border-color: var(--green); }
.tp-input.bad { border-color: #ff8fb8; }
.tp-form .btn, .tp-actions .btn { cursor: pointer; font-family: inherit; font-size: 15px; padding: 10px 18px; }
.tp-form .btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.tp-actions .btn.ghost { background: transparent; }
.article .tp-result { min-height: 1.6em; margin: 12px 0 4px; font-weight: 600; }
.article .tp-result.ok { color: var(--green); font-size: 20px; }
.article .tp-result.bad { color: #ff8fb8; }
.tp-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tp-actions #tp-next { margin-left: auto; }
.article .tp-keys { margin: 12px 0 0; font-family: var(--font-code); color: var(--amber); }
.tp-reset { margin-top: 14px; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 5px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.tp-reset:hover { color: var(--text); }
.tp-card [hidden], .tp[hidden], .tp-done[hidden] { display: none !important; }
.tp-target-row { display: flex; align-items: center; gap: 12px; }
.tp-say { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(13,21,40,.8); font-size: 20px; cursor: pointer; }
.tp-say:hover { border-color: var(--cyan); }
.tp-chart { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.tp-chart-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 10px; }
.tp-tabs { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.tp-tabs button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; padding: 6px 14px; cursor: pointer; }
.tp-tabs button[aria-selected="true"] { background: var(--cyan); color: #04121a; font-weight: 600; }
.article .tp-chart-note { margin: 0; color: var(--muted); font-size: 14px; }
.tp-kana { width: auto; border-collapse: separate; border-spacing: 4px; margin: 0; }
.tp-kana td { padding: 0; border: 0; width: 56px; }
.tp-kana td:first-child { color: inherit; font-weight: inherit; font-size: inherit; }
.tp-kana button, .tp-kana span {
  display: flex; flex-direction: column; align-items: center; width: 100%; padding: 5px 0 4px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(6,10,22,.7); color: var(--text); font: inherit;
}
.tp-kana button { cursor: pointer; }
.tp-kana button:hover { border-color: var(--cyan); background: rgba(94,234,255,.08); }
.tp-kana b { font-family: var(--font-jp); font-size: 22px; line-height: 1.2; }
.tp-kana small { font-family: var(--font-code); font-size: 12px; color: var(--amber); }
.tp-combo td { width: 70px; }
.tp-more { margin-top: 10px; }
.tp-more summary { cursor: pointer; color: var(--cyan); font-size: 14px; }
.tp-more-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; margin-top: 8px; }
.article .tp-chart-extra { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
@media (max-width: 640px) { .tp-kana td { width: 48px; } .tp-kana b { font-size: 19px; } .tp-combo td { width: 60px; } .tp-card { padding: 18px 14px; } }

/* ---------- entry points to the typing practice ---------- */
.pg-head { display: flex; align-items: center; gap: 28px; }
.pg-head > div:first-child { flex: 1 1 auto; min-width: 0; }
.pg-learn {
  flex: 0 1 380px; display: flex; gap: 16px; align-items: center; margin-bottom: 24px; padding: 16px 20px; border-radius: 14px;
  border: 1px solid rgba(255,79,154,.5); background: linear-gradient(135deg, rgba(255,79,154,.14), rgba(94,234,255,.08)); color: var(--text);
  box-shadow: 0 0 28px rgba(255,79,154,.18); transition: transform .15s, box-shadow .15s;
}
.pg-learn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 0 36px rgba(255,79,154,.32); }
.pg-learn-kana { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; font-family: var(--font-jp); font-weight: 900; font-size: 34px; background: var(--pink); color: #fff; box-shadow: 0 0 20px rgba(255,79,154,.6); }
.pg-learn-text { font-size: 15px; color: #d9def3; line-height: 1.5; }
.pg-learn-text strong { display: block; color: var(--text); font-size: 17px; }
.pg-learn-go { display: block; margin-top: 4px; color: var(--cyan); font-weight: 600; }
@media (max-width: 860px) { .pg-head { flex-direction: column; align-items: stretch; gap: 0; } .pg-learn { flex-basis: auto; } }
.hero-typing { margin: 18px 0 0; color: var(--muted); font-size: 15px; }
.tp-setup { margin: 4px 0 18px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.tp-os { margin-bottom: 12px; flex-wrap: wrap; }
.tp-os button[aria-selected="true"] { background: var(--cyan); color: #04121a; font-weight: 600; }
.tp-steps { margin: 0 0 8px; padding-left: 22px; }
.tp-steps li { margin: 6px 0; }
.article .tp-setup-more { margin: 6px 0 8px; font-size: 14px; color: var(--muted); }

/* cheat sheet */
table.cheat td:first-child { font-family: inherit; font-weight: 400; font-size: 15px; color: inherit; width: 52%; }
table.cheat td:first-child code { white-space: normal; color: var(--pink); }
table.cheat.three td:first-child, table.cheat.three td:nth-child(2) { width: 30%; }
table.cheat.three td:nth-child(2) code { color: var(--cyan); }
