:root {
  --bg: #f6f1e7;
  --paper: #fffdf8;
  --ink: #26221d;
  --ink-soft: #6c655b;
  --line: #e2d9c8;
  --line-strong: #c9bca5;
  --accent: #b5462a;
  --accent-ink: #fff;
  --ok: #2f7d4a;
  --ok-bg: #e5f2e8;
  --bad: #b3261e;
  --bad-bg: #fbe7e5;
  --warn: #9a6200;
  --warn-bg: #fbf0d9;
  --c0: #d0461d;   /* 日 */
  --c1: #3557c9;   /* 月 */
  --c2: #2a8240;   /* 木 */
  --c3: #9a3bb8;   /* 人 */
  --c4: #6c655b;
  --shadow: 0 1px 2px rgba(60, 40, 10, .08), 0 4px 14px rgba(60, 40, 10, .07);
  --radius: 14px;
  --washi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .35 0 0 0 0 .2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  --jp: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1915; --paper: #26231e; --ink: #f0e9dc; --ink-soft: #b0a796;
    --line: #3a352d; --line-strong: #544c40; --accent: #e0714f; --accent-ink: #1b1915;
    --ok: #6cc28a; --ok-bg: #1f3326; --bad: #f08a80; --bad-bg: #3a2220; --warn: #e5b45a; --warn-bg: #3a2f1a;
    --c0: #f2774c; --c1: #7f9cf5; --c2: #5fc27a; --c3: #d07ae8; --c4: #b0a796;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1915; --paper: #26231e; --ink: #f0e9dc; --ink-soft: #b0a796;
  --line: #3a352d; --line-strong: #544c40; --accent: #e0714f; --accent-ink: #1b1915;
  --ok: #6cc28a; --ok-bg: #1f3326; --bad: #f08a80; --bad-bg: #3a2220; --warn: #e5b45a; --warn-bg: #3a2f1a;
  --c0: #f2774c; --c1: #7f9cf5; --c2: #5fc27a; --c3: #d07ae8; --c4: #b0a796;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--washi), var(--bg); color: var(--ink); font-family: var(--ui);
  font-size: 17px; line-height: 1.5; min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
.jp { font-family: var(--jp); }
.muted { color: var(--ink-soft); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }

/* ---------- header ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px; cursor: pointer; border-radius: 8px; }
.brand-mark {
  font-family: var(--jp); font-size: 18px; width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); border-radius: 7px;
  box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 0 3.5px color-mix(in srgb, var(--accent-ink) 70%, transparent);
  transform: rotate(-4deg);
}
.brand-name { font-weight: 650; font-size: 15px; }
.progress { flex: 1; display: flex; gap: 4px; min-width: 0; }
.progress .seg { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.progress .seg.done { background: var(--accent); }
.progress .seg.now { background: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.report-btn {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  border: 1px solid var(--line-strong); background: var(--paper); border-radius: 999px;
  padding: 6px 12px; font-size: 14px; cursor: pointer;
}
.report-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.report-btn .short { display: none; }
@media (max-width: 560px) {
  .brand-name { display: none; }
  .report-btn .long { display: none; }
  .report-btn .short { display: inline; }
}

/* ---------- layout ---------- */
main { max-width: 640px; margin: 0 auto; padding: 20px 16px 120px; outline: none; }
.screen { animation: in .25s ease-out; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen, .shake { animation: none !important; } }
.stage-label {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 6px;
}
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.footer-actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.footer-actions .inner { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; }
.footer-actions .btn { flex: 1; }

.btn {
  border: 1px solid var(--line-strong); background: var(--paper); border-radius: 12px;
  padding: 12px 18px; font-weight: 600; cursor: pointer; min-height: 48px;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .45; cursor: default; }
.btn:focus-visible, .opt:focus-visible, .ktile:focus-visible, .tile:focus-visible, .brand:focus-visible, .report-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px;
}
.link { background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 0; }

/* ---------- kanji svg ---------- */
.kanji-svg { display: block; width: 100%; height: auto; }
.kanji-svg path { fill: none; stroke: var(--ink); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; }
.kanji-svg .hl0 { stroke: var(--c0); } .kanji-svg .hl1 { stroke: var(--c1); }
.kanji-svg .hl2 { stroke: var(--c2); } .kanji-svg .hl3 { stroke: var(--c3); } .kanji-svg .hl4 { stroke: var(--c4); }
.kanji-svg .faint { stroke: var(--line-strong); }
.kanji-svg .ghost { stroke: transparent; }
.txt-c0 { color: var(--c0); } .txt-c1 { color: var(--c1); } .txt-c2 { color: var(--c2); } .txt-c3 { color: var(--c3); } .txt-c4 { color: var(--c4); }

/* ---------- meet ---------- */
.illus {
  position: relative; width: 100%; min-height: 190px; border-radius: var(--radius); overflow: hidden;
  display: grid; grid-template-columns: 1fr; align-items: center; justify-items: center; gap: 8px; padding: 16px;
  background:
    radial-gradient(120% 90% at 20% 10%, color-mix(in srgb, var(--paper) 100%, transparent), transparent 70%),
    var(--washi), color-mix(in srgb, var(--paper) 75%, var(--bg));
  border: 1px solid var(--line); box-shadow: inset 0 0 0 6px color-mix(in srgb, var(--paper) 60%, transparent), var(--shadow);
}
.illus.has-pic { grid-template-columns: 1fr 1fr; }
.illus.has-pic::after {
  content: ""; position: absolute; top: 18%; bottom: 18%; left: 50%; border-left: 1px dashed var(--line-strong);
}
.illus-pic { width: min(150px, 100%); }
.illus-glyph { display: grid; justify-items: center; gap: 6px; }
.illus .glyph { width: 140px; }
.illus-char { font-size: 110px; line-height: 1.2; }
.pic { display: block; width: 100%; height: auto; fill: none; stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; --pc: var(--c4); }
.pic .t { fill: color-mix(in srgb, var(--pc) 24%, var(--paper)); }
.pic .f { fill: var(--ink); stroke: none; }
.pic .p { fill: var(--paper); }
.pic .s { opacity: .4; }
.pic-c0 { --pc: var(--c0); } .pic-c1 { --pc: var(--c1); } .pic-c2 { --pc: var(--c2); } .pic-c3 { --pc: var(--c3); } .pic-c4 { --pc: var(--c4); }
.pic-sm { width: 54px; margin-left: auto; }
.illus-pic .pic { animation: pic-in .5s ease-out both; }
@keyframes pic-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.kanji-svg.draw path { stroke-dasharray: 1 1; animation: draw .5s ease-in-out both; }
@keyframes draw { 0% { stroke-dashoffset: 1; opacity: 0; } 1% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }
.replay {
  font-size: 12px; color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line);
  padding: 3px 10px; border-radius: 999px; cursor: pointer;
}
.replay:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .kanji-svg.draw path, .illus-pic .pic, .seal, .opt.right { animation: none !important; stroke-dasharray: none; }
}
@media (max-width: 420px) { .illus .glyph { width: 112px; } .illus { min-height: 160px; } }
.meet-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.meet-char { font-family: var(--jp); font-size: 56px; line-height: 1; }
.meet-meaning { font-size: 1.5rem; font-weight: 650; }
.mnemonic { font-size: 1.1rem; border-left: 4px solid var(--accent); padding: 4px 0 4px 12px; margin: 0; }
.variant { display: flex; gap: 14px; align-items: center; }
.variant .vchar { font-family: var(--jp); font-size: 44px; line-height: 1; }
.mini-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mini { background: var(--bg); border-radius: 10px; padding: 6px; text-align: center; }
.mini .m { font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-pill { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.status-pill.reviewed { background: var(--warn-bg); color: var(--warn); }

/* ---------- spot ---------- */
.kgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ktile {
  position: relative; background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 10px; cursor: pointer; box-shadow: var(--shadow); touch-action: manipulation;
}
.ktile[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--paper)); }
.ktile .check {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line-strong); background: var(--paper); display: grid; place-items: center; font-size: 13px;
}
.ktile[aria-pressed="true"] .check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ktile .verdict { font-size: 12px; font-weight: 600; text-align: center; margin-top: 4px; min-height: 18px; }
.ktile .km { font-size: 12px; text-align: center; color: var(--ink-soft); }
.ktile.r-hit { border-color: var(--ok); background: var(--ok-bg); }
.ktile.r-miss { border-color: var(--warn); background: var(--warn-bg); }
.ktile.r-wrong { border-color: var(--bad); background: var(--bad-bg); }
.ktile.r-none { opacity: .75; }
.ktile:disabled { cursor: default; }
.r-hit .verdict { color: var(--ok); } .r-miss .verdict { color: var(--warn); } .r-wrong .verdict { color: var(--bad); }
@media (min-width: 560px) { .kgrid { gap: 16px; } }

/* ---------- options ---------- */
.opts { display: grid; gap: 10px; }
@media (min-width: 480px) { .opts.two { grid-template-columns: 1fr 1fr; } }
.opt {
  text-align: left; border: 2px solid var(--line); background: var(--paper); border-radius: 12px;
  padding: 12px 16px; cursor: pointer; font-size: 1.05rem; min-height: 52px; box-shadow: var(--shadow);
}
.opt.jpopt { text-align: center; font-family: var(--jp); font-size: 2rem; padding: 8px; }
.opt.right { border-color: var(--ok); background: var(--ok-bg); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt:disabled { cursor: default; }
.big-kanji { width: min(220px, 60vw); margin: 0 auto; }
.legend { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; font-size: 1.05rem; }
.legend .chip { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.legend .chip .jp { font-size: 1.4rem; }
.legend .plus { align-self: center; color: var(--ink-soft); }
.reveal { border-radius: 12px; padding: 14px 16px; }
.reveal.good { background: var(--ok-bg); } .reveal.bad { background: var(--bad-bg); }
.readings { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: .95rem; }
.readings .lab { color: var(--ink-soft); }
.readings .jp { font-size: 1.05rem; }
.oku { color: var(--ink-soft); }

/* ---------- build ---------- */
.board-wrap { width: min(300px, 78vw); margin: 0 auto; }
.board { display: block; width: 100%; height: auto; background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); touch-action: none; }
.board .grid { stroke: var(--line); stroke-width: .5; stroke-dasharray: 2 2; fill: none; }
.board .slot { fill: color-mix(in srgb, var(--accent) 5%, transparent); stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 2; rx: 4; transition: fill .15s, stroke .15s; }
.board .slot.over { fill: color-mix(in srgb, var(--accent) 16%, transparent); stroke: var(--accent); }
.board .slot.armed { stroke: var(--accent); }
.board .slot.filled { fill: transparent; stroke: transparent; }
.board path { fill: none; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; min-height: 76px; }
.tile {
  width: 68px; height: 68px; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--paper);
  font-family: var(--jp); font-size: 38px; line-height: 1; display: grid; place-items: center; cursor: grab;
  touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: var(--shadow);
}
.tile.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--paper)); }
.tile.used { visibility: hidden; }
.tile.dragging { opacity: .3; }
.drag-ghost {
  position: fixed; z-index: 50; pointer-events: none; width: 68px; height: 68px; border-radius: 14px;
  background: var(--paper); border: 2px solid var(--accent); font-family: var(--jp); font-size: 38px;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.2); transform: translate(-50%, -60%) scale(1.06);
}
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.hint { text-align: center; min-height: 1.5em; font-size: .95rem; }
.hint.bad { color: var(--bad); }

/* ---------- misc ---------- */
.score { font-size: 3rem; font-weight: 700; color: var(--accent); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.credits h3 { margin-top: 1.2em; }
.credits p { margin: .3em 0; }
.credits a { color: var(--accent); }
.home-hero { text-align: center; padding: 18px 0 6px; }
.home-hero .glyphs { font-family: var(--jp); font-size: 52px; letter-spacing: .12em; }
.home-hero .glyphs span:nth-child(1) { color: var(--c0); } .home-hero .glyphs span:nth-child(2) { color: var(--c1); }
.home-hero .glyphs span:nth-child(3) { color: var(--c2); } .home-hero .glyphs span:nth-child(4) { color: var(--c3); }
.steps { counter-reset: s; padding: 0; list-style: none; margin: 0; }
.steps li { counter-increment: s; display: flex; gap: 12px; padding: 6px 0; }
.steps li::before {
  content: counter(s); flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--bg);
  border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 13px; font-weight: 700;
}

dialog {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink);
  padding: 20px; width: min(480px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
dialog::backdrop { background: rgba(20, 15, 5, .45); }
.report-form label { display: block; font-weight: 600; margin: 12px 0 6px; }
.report-form textarea { width: 100%; font: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); resize: vertical; }
.report-what { background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.report-form .row { margin-top: 16px; }
.toast {
  position: fixed; left: 50%; top: 64px; transform: translateX(-50%) translateY(-12px); opacity: 0;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; font-size: 14px;
  transition: opacity .2s, transform .2s; pointer-events: none; z-index: 60; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%); }
pre.json { white-space: pre-wrap; word-break: break-all; font-size: 12px; background: var(--bg); padding: 10px; border-radius: 10px; max-height: 240px; overflow: auto; }

/* ---------- Phase 3: spaced review + component map ---------- */
.pill { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--line); }
.pill.due { background: var(--accent); color: var(--accent-ink); }
.map-link { display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; cursor: pointer; font: inherit; color: inherit; }
.map-mini { display: grid; grid-template-columns: repeat(4, 18px); gap: 2px; flex-shrink: 0; font-size: 14px; line-height: 18px; text-align: center; }
.map-mini i { font-style: normal; color: var(--line-strong); }
.map-mini i.on { color: var(--accent); }
.mstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mstats > div { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); }
.mstats b { display: block; font-size: 1.6rem; color: var(--accent); line-height: 1.1; }
.mstats span { font-size: 13px; color: var(--ink-soft); }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.mtile {
  display: grid; justify-items: center; gap: 2px; padding: 8px 4px 6px; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--line); background: var(--paper); font: inherit; color: inherit; min-width: 0;
}
.mtile .mc { font-size: 30px; line-height: 1.15; }
.mtile .mm { font-size: 11px; line-height: 1.25; color: var(--ink-soft); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtile .mk { font-size: 10px; color: var(--ink-soft); }
.mtile.new { background: var(--bg); }
.mtile.new .mc { color: var(--ink-soft); }
.mtile.strong { border-color: var(--ok); }
.mtile.fading, .mtile.learning { border-color: var(--warn); }
.mtile.due { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--paper)); }
.meter { width: 80%; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 2px; }
.meter i { display: block; height: 100%; background: var(--ok); }
.mtile.fading .meter i, .mtile.learning .meter i { background: var(--warn); }
.mtile.due .meter i { background: var(--accent); }
.legend-line { font-size: 13px; margin: 0; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 8px; border: 2px solid; vertical-align: -1px; }
.lg.strong { border-color: var(--ok); } .lg.fading { border-color: var(--warn); } .lg.learning { border-color: var(--warn); background: var(--warn-bg); } .lg.due { border-color: var(--accent); }
.kchips { display: flex; flex-wrap: wrap; gap: 6px; }
.kchip { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.kchip .jp { font-size: 1.2rem; }
.kchip small { color: var(--ink-soft); font-size: 11px; }
.kchip.can { border-color: var(--ok); background: var(--ok-bg); }
.map-dialog { max-height: calc(100dvh - 32px); overflow: auto; }
.map-dialog h3 { font-size: 1rem; }
@media (max-width: 420px) { .mstats b { font-size: 1.3rem; } .mgrid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); } }

/* ---------- Phase 4: course list + sound detective ---------- */
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.schip {
  display: grid; justify-items: center; gap: 0; padding: 4px 2px 6px; border-radius: 10px; cursor: pointer;
  border: 2px solid var(--line); background: var(--paper); font: inherit; color: inherit; min-width: 0;
}
.schip small { font-size: 10px; color: var(--ink-soft); }
.schip .jp { font-size: 15px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; max-width: 100%; }
.schip.done { border-color: var(--ok); background: var(--ok-bg); }
.schip.next { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.schip.locked { opacity: .45; cursor: default; background: var(--bg); }
.sound-badge { width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; font-size: 26px; border-radius: 12px; background: color-mix(in srgb, var(--c1) 15%, var(--paper)); color: var(--c1); }
.map-link:disabled { opacity: .55; cursor: default; }

/* ---------- Phase 5: art pass ---------- */
.home-hero .glyphs.drawn { display: flex; justify-content: center; gap: 4px; }
.home-hero .glyphs.drawn .kanji-svg { width: 64px; }
.home-hero h1 { font-size: 1.9rem; letter-spacing: -.01em; }
.home-hero h1::after {
  content: ""; display: block; width: 64px; height: 5px; margin: 8px auto 0; border-radius: 3px;
  background: var(--accent); opacity: .85; clip-path: polygon(0 40%, 100% 0, 96% 100%, 2% 90%);
}
.seal {
  width: 132px; height: 132px; margin: 6px auto 0; border-radius: 50%; display: grid; place-items: center; align-content: center;
  border: 4px solid var(--accent); color: var(--accent); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 5px var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--paper)); transform: rotate(-6deg);
  animation: stamp .45s cubic-bezier(.2, 1.6, .4, 1) .1s both;
}
.seal .score { font-size: 2.2rem; line-height: 1; }
.seal small { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
@keyframes stamp { from { opacity: 0; transform: rotate(-6deg) scale(1.5); } to { opacity: 1; transform: rotate(-6deg) scale(1); } }
.opt.right { animation: pop .3s ease-out; }
@keyframes pop { 50% { transform: scale(1.03); } }
.home-hero .glyphs.drawn .kanji-svg path { stroke-width: 4.6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pic .t { fill: color-mix(in srgb, var(--pc) 38%, var(--paper)); } }
:root[data-theme="dark"] .pic .t { fill: color-mix(in srgb, var(--pc) 38%, var(--paper)); }
