/* 猫語ほんやく検定 — 色はすべてCSS変数 */
:root {
  --accent: #2f7d6d; --accent-ink: #ffffff; --accent-soft: #dcefe9;
  --stage: #fbf3e4; --floor: #e9dcc4; --shadow-c: rgba(80, 60, 30, .14);
  --coat: #f0a04b; --coat2: #fff1dc; --coat-dark: #b8692a; --patch: #2b2b2b; --patch2: #f0a04b;
  --ink: #2b2420; --iris: #b9d25a; --pupil: #1b1a17; --nose: #e98a95; --inear: #f4b6bf; --wh: #6b5a4a;
  --pants: #4d6a9a; --shoe: #3a3a3a; --bub: #ffffff; --bub-ink: #2b2420; --heart: #e8708a; --motion: #a08c72;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #6fd0b9; --accent-ink: #0d2621; --accent-soft: #173a33;
    --stage: #22273d; --floor: #2e3450; --shadow-c: rgba(0, 0, 0, .35); --wh: #c9bba8; --bub: #2e3450; --bub-ink: #eef0f7; --motion: #8f8aa8; --ink: #1b1a17;
  }
}
:root[data-theme="dark"] {
  --accent: #6fd0b9; --accent-ink: #0d2621; --accent-soft: #173a33;
  --stage: #22273d; --floor: #2e3450; --shadow-c: rgba(0, 0, 0, .35); --wh: #c9bba8; --bub: #2e3450; --bub-ink: #eef0f7; --motion: #8f8aa8; --ink: #1b1a17;
}
.nk-coat-orange { --coat: #f0a04b; --coat2: #fff1dc; --coat-dark: #b8692a; }
.nk-coat-gray { --coat: #9aa3ad; --coat2: #eef0f2; --coat-dark: #6b737c; }
.nk-coat-black { --coat: #2e2c2b; --coat2: #4a4644; --coat-dark: #141312; --iris: #e6c84a; --wh: #d8d2c8; --inear: #8a6a70; }
.nk-coat-white { --coat: #fbfaf7; --coat2: #ffffff; --coat-dark: #d8d4cc; --iris: #7fb7e6; }
.nk-coat-calico { --coat: #fbfaf7; --coat2: #ffffff; --coat-dark: #d8d4cc; }
.nk-coat-brown { --coat: #a87a52; --coat2: #f1e2cf; --coat-dark: #6e4a2c; }

/* 猫の絵 */
.nk-stage { background: var(--stage); border-radius: 18px; border: 1px solid var(--line); padding: 6px 6px 0; position: relative; overflow: hidden; }
.nk-stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: var(--floor); }
.nk-cat { display: block; width: 100%; max-width: 380px; height: auto; margin: 0 auto; position: relative; z-index: 1; }
.nk-c { fill: var(--coat); stroke: var(--coat-dark); stroke-width: 1.5; }
.nk-c2 { fill: var(--coat2); }
.nk-ear { stroke-linejoin: round; }
.nk-inear { fill: var(--inear); }
.nk-shadow { fill: var(--shadow-c); }
.nk-tailp { fill: none; stroke: var(--coat); stroke-width: 11; stroke-linecap: round; }
.nk-puff .nk-tailp { stroke-width: 24; }
.nk-tailfur { fill: none; stroke: var(--coat-dark); stroke-width: 30; stroke-dasharray: 2 6; stroke-linecap: butt; opacity: .55; }
.nk-patch { fill: var(--patch); } .nk-patch2 { fill: var(--patch2); }
.nk-stripe { fill: none; stroke: var(--coat-dark); stroke-width: 6; stroke-dasharray: 4 9; }
.nk-pilo { fill: none; stroke: var(--coat-dark); stroke-width: 14; stroke-dasharray: 3 4; }
.nk-iris { fill: var(--iris); stroke: var(--ink); stroke-width: 1; }
.nk-pupil { fill: var(--pupil); } .nk-shine { fill: #fff; }
.nk-lid { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.nk-lid2 { opacity: .35; }
.nk-nose { fill: var(--nose); }
.nk-mouth { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
.nk-mouthopen { fill: #5a1f2a; } .nk-fang { fill: none; stroke: #fff; stroke-width: 1.6; }
.nk-wh { stroke: var(--wh); stroke-width: 1.4; stroke-linecap: round; }
.nk-pants { fill: var(--pants); } .nk-shoe { fill: var(--shoe); }
.nk-heart { fill: none; stroke: var(--heart); stroke-width: 3; stroke-linecap: round; }
.nk-motion { fill: none; stroke: var(--motion); stroke-width: 2.5; stroke-linecap: round; }
.nk-bub { fill: var(--bub); stroke: var(--line); stroke-width: 1.5; }
.nk-bubt { fill: var(--bub-ink); font-size: 15px; font-weight: 900; }
.nk-swish { animation: nk-swish 2.4s ease-in-out infinite; }
.nk-thump { animation: nk-thump .9s ease-in infinite; }
.nk-pop { animation: nk-pop 1.6s ease-out infinite; }
.nk-blink { animation: nk-blink .5s steps(2) infinite; }
.nk-lid2 { animation: nk-slow 3s ease-in-out infinite; }
@keyframes nk-swish { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(14deg); } }
@keyframes nk-thump { 0%, 100% { transform: rotate(-16deg); } 60% { transform: rotate(4deg); } }
@keyframes nk-pop { 0% { transform: scale(.85); } 30%, 100% { transform: scale(1); } }
@keyframes nk-blink { 50% { opacity: .3; } }
@keyframes nk-slow { 0%, 60%, 100% { opacity: 0; } 75% { opacity: .5; } }

/* スタートの絵 */
.nk-hero { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.nk-hero .nk-stage { padding: 2px 2px 0; border-radius: 12px; }
.nk-hero .nk-stage::after { height: 8px; }

/* プレイ */
.nk-play > * + * { margin-top: 10px; }
.nk-top { display: flex; align-items: center; gap: 8px; }
.nk-top b { font-size: 18px; }
.nk-cues { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.nk-cues li { font-size: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; }
.nk-q { font-weight: 800; margin: 4px 0 0; }
.nk-opt.is-good::before { content: "◯ "; color: var(--good); }
.nk-opt.is-bad::before { content: "✕ "; color: var(--bad); }
.nk-expl { border-radius: 14px; padding: 12px 14px; background: var(--surface-2); }
.nk-expl.ok { background: var(--good-soft); } .nk-expl.ng { background: var(--bad-soft); }
.nk-expl b { display: block; margin-bottom: 4px; }
.nk-expl p { margin: 0; font-size: 15px; }
.nk-expl small { display: block; color: var(--text-sub); margin-top: 6px; font-size: 12px; }
.nk-vet { font-size: 13px; color: var(--text-sub); border-left: 4px solid var(--warn); padding: 4px 10px; background: var(--warn-soft); border-radius: 0 10px 10px 0; }

/* 結果 */
.nk-pct { font-size: clamp(52px, 16vw, 80px); font-weight: 900; color: var(--accent); line-height: 1; }
.nk-pct small { font-size: .4em; }
.nk-level { font-size: clamp(24px, 7vw, 34px); font-weight: 900; line-height: 1.3; margin: 8px 0; }
.nk-marks { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; margin: 6px 0; }
.nk-marks span { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; background: var(--bad-soft); color: var(--bad); }
.nk-marks span.ok { background: var(--good-soft); color: var(--good); }
.nk-review { list-style: none; padding: 0; margin: 8px 0 0; }
.nk-review li { border-top: 1px solid var(--line); padding: 8px 0; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 2px 8px; }
.nk-review .m { font-weight: 900; } .nk-review .m.ok { color: var(--good); } .nk-review .m.ng { color: var(--bad); }
.nk-review small { grid-column: 2; color: var(--text-sub); }
.nk-zukan { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.nk-zukan > div { font-size: 11px; text-align: center; line-height: 1.35; color: var(--text-sub); }
.nk-zukan .nk-stage { padding: 0; border-radius: 10px; margin-bottom: 2px; }
.nk-zukan .nk-stage::after { height: 6px; }
.nk-zukan .lock { aspect-ratio: 260 / 190; background: var(--surface-2); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--text-sub); margin-bottom: 2px; }
