/* Shared palette with the Yurun-to Nanikiru Maker. */
:root{--paper:#fff7ef;--ink:#29201c;--muted-ink:#75645b;--pink:#e85268;--pink-dark:#ad3047;--pink-soft:#fde8e8;--line:#4f4038;--soft-line:#d9c9bf;--panel:#fffcf8}
body,body.home{background:var(--paper);color:var(--ink)}
h1,h2,h3,h4,.home .home-title,.home-title span{color:var(--ink)}
button,select{color:var(--ink)}button:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid var(--pink-dark);outline-offset:4px}
.home .home-title{text-shadow:0 3px 0 #fff}.home-kicker,.home-caption,.home .home-tabs span{color:var(--muted-ink)}
.home .home-tabs a{background:var(--panel);border:2px solid var(--line);color:var(--ink);border-radius:12px;box-shadow:0 5px 0 #e9dbd0}
.home .home-tabs a:hover{background:var(--pink-soft);border-color:var(--pink)}
.modes{background:#f1e7de;border:2px solid var(--line);border-radius:10px;padding:5px;gap:5px}.modes button{color:var(--muted-ink);border:2px solid transparent;border-radius:6px}.modes button.active{background:var(--pink);border-color:var(--line);color:#fff;box-shadow:none;font-size:15px}
.primary{background:var(--pink);color:#fff;border:2px solid var(--line);box-shadow:0 3px 0 #d9c5ba;border-radius:8px;font-size:19px}.primary:hover:not(:disabled){background:#d7435a}.primary:disabled{cursor:wait}
.quiet-button,.result-choice,.review-item{background:var(--panel);border:2px solid var(--line);color:var(--ink);border-radius:7px}.quiet-button:hover,.result-choice:hover{background:var(--pink-soft)}
.subtle,.back-home,header a{color:var(--muted-ink)}
.trainer-settings select,.status select{border:2px solid var(--line);background:#fff;color:var(--ink);border-radius:6px}.trainer-settings input,.save-review input{accent-color:var(--pink-dark)}
.table{background:#eddfd1;border:2px solid var(--line);box-shadow:none;color:var(--ink)}.table p,.table .shape{color:var(--ink)}.table .shape{opacity:.75}
.tile,.hand .tile,.after-hand .tile{border-color:#958378;background:#fffefa;box-shadow:0 3px 0 #c5b4a4,0 4px 3px #3c281322}.tile.called{background:#fff0bd;border-color:#c19432;outline-color:#d4a23f}
.answer-title small,.choice small,.solution-title span,.flow-block,.wait-tile,.all-forms-note,.selection-tools span{color:var(--muted-ink)}.status #score,.timer{color:var(--muted-ink)}
.choice.selected{background:var(--pink-soft);border-color:var(--pink-dark)}
/* Keep scoring colors distinct from the decorative pink palette. */
.choice.correct{background:#daeed9;border-color:#4b9156}.choice.missed{background:#fff1ca;border-color:#d7ad36}.choice.wrong{background:#f9e1dc;border-color:#b87467}
.test-intro,.test-result,.detail,.queue-item{background:var(--panel);border:2px solid var(--line);border-radius:10px}.test-kicker,.test-note,.test-result>p,.rank-guide summary{color:var(--muted-ink)}.result-rank{color:var(--pink-dark)}.test-result[data-rank=S] .result-rank{color:#a47b1d}
.result-stats span,.review-note,#review-empty,#review-count,.save-review{color:var(--muted-ink)}.result-open,.queue-open{color:var(--ink)}
.result-choice.active,.review-item[aria-pressed="true"]{background:var(--pink-soft);border-color:var(--pink-dark);box-shadow:0 0 0 1px var(--pink-dark)}.result-choice.best{border-top-color:#c19a36}.call-group h3{color:var(--ink)}
.result-review,.wait-line,.call-variant,.alternative,.rank-guide th,.rank-guide td,.rules{border-color:var(--soft-line)}
.about-page h1,.about-page h2,.about-page h3,.about-page h4{color:var(--ink)}.about-page section{border-color:var(--soft-line)}
.about-page section>h2{background:var(--pink-soft);border:1px solid #e7b8b6;color:var(--ink)}.about-page section>h3{border-left-color:var(--pink);color:var(--ink)}.about-page section>h4{border-bottom-color:#e7b8b6;color:var(--ink)}
.about-page a,.site-footer a{color:var(--pink-dark)}.site-footer{border-color:var(--soft-line)}.site-footer small,.about-back{color:var(--muted-ink)}
@media(max-width:400px){.actions{gap:8px}.primary{padding:13px 16px}.modes button.active{font-size:14px}}
/* Quiet document palette, matching the Nanikiru Maker help page. */
body.about-body{background:#fffdfa;color:#29201c}
.about-body .about-page section{border-top:1px solid #4f4038}
.about-body .about-page section>h2{background:#f3eee8;border:1px solid #d8ccc0;border-radius:5px;color:#29201c}
.about-body .about-page section>h3{border-left-color:#5a473b;color:#29201c}
.about-body .about-page section>h4{border-bottom-color:#cbbcaf;color:#29201c}
.about-body .about-page a,.about-body .site-footer a{color:#49352b;text-decoration:underline;text-underline-offset:3px}
.about-body .about-page section.about-materials{background:#f3eee8;border:1px solid #d0c4b9;border-radius:6px;padding:20px;margin-top:32px}
.about-body .about-page section.about-materials>h2{background:transparent;border:0;padding:0;margin-bottom:18px}
.about-body .site-footer{border-top-color:#cbbcaf}
.rank-guide>summary{font-weight:700;color:var(--ink);padding:12px 0;border-bottom:1px solid var(--soft-line)}.rank-intro{font-size:12px;color:var(--muted-ink);margin:14px 0}.rank-guide-cards{display:grid;gap:12px;margin:16px 0 4px}.rank-card{display:grid;grid-template-columns:50px minmax(0,1fr);gap:16px;background:var(--panel);border:1px solid #c9b7a9;border-radius:9px;padding:18px 16px;align-items:start}.rank-letter{display:flex;align-items:center;justify-content:center;width:50px;height:56px;border-right:1px solid var(--soft-line);font-family:Georgia,serif;font-size:36px;line-height:1;font-weight:700;color:var(--ink);padding-right:12px}.rank-card[data-rank=S]{background:#fff8e7;border:2px solid #b38a3b}.rank-card[data-rank=S] .rank-letter{color:#8a641e}.rank-card-content h3{font-size:17px;line-height:1.6;margin:0 0 8px;color:var(--ink)}.rank-card-content .rank-condition{font-size:12px;font-weight:700;line-height:1.8;margin:0 0 10px;padding-bottom:10px;border-bottom:1px solid var(--soft-line);color:#69503d}.rank-card-content .rank-description{font-size:12px;line-height:1.9;color:var(--muted-ink);margin:0}.test-result .rank-result-description{max-width:480px;margin:18px auto;padding:16px;border-top:1px solid var(--soft-line);border-bottom:1px solid var(--soft-line);font-size:13px;line-height:1.9;color:var(--ink)}@media(max-width:400px){.rank-card{grid-template-columns:36px minmax(0,1fr);gap:12px;padding:15px 12px}.rank-letter{width:36px;font-size:29px;padding-right:9px}.rank-card-content h3{font-size:16px}}

/* Rank descriptions are revealed with the completed test result. */
.rank-guide .rank-card-content .rank-condition{margin-bottom:0;padding-bottom:0;border-bottom:0}

/* Quiet navigation with a comfortable touch target. */
.back-home,.about-body .about-page .back-home,.about-body .about-page .page-top-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 4px;border:0;border-radius:0;background:transparent;color:var(--muted-ink);font-size:14px;font-weight:500;line-height:1.5;text-decoration:none}
.back-home{margin-bottom:20px}
.back-home:hover,.about-body .about-page .back-home:hover,.about-body .about-page .page-top-link:hover{background:transparent;color:var(--pink-dark)}
.back-home:focus-visible,.page-top-link:focus-visible{outline:3px solid var(--pink-dark);outline-offset:3px}
/* Keep restart readable and easy to tap, including narrow screens. */
header{gap:12px;flex-wrap:wrap}
#reset{min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--ink);font-size:13px;font-weight:700;line-height:1.5;white-space:nowrap;margin-left:auto}
#reset:hover{background:var(--pink-soft)}
