/* 今日の犯人 — 色はすべてCSS変数 */
:root {
  --accent: #2f6b5a; --accent-ink: #ffffff; --accent-soft: #dcefe7;
  --paper: #fbf6ea; --paper-2: #efe5cf; --ink: #3b2f1f; --ink-sub: #8a7a5c; --wall: #a8946c;
  --skin: #f6dcc2; --cheek: #f3a59a; --lens: rgba(150, 205, 255, .35); --pud: #f2c14e; --pud-top: #8a4b1c;
  --ok: #3aa36b; --ng: #d9534f; --x-soft: #f6dcdc; --o-soft: #d8f0e2;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #7fd1b5; --accent-ink: #0f1a16; --accent-soft: #1d3a31;
    --paper: #221f19; --paper-2: #2d281f; --ink: #efe6d1; --ink-sub: #b3a582; --wall: #7d6d4d;
    --skin: #e9cfb4; --cheek: #e0897d; --lens: rgba(120, 170, 230, .22); --x-soft: #3e2224; --o-soft: #1d3a2b;
  }
}
:root[data-theme="dark"] {
  --accent: #7fd1b5; --accent-ink: #0f1a16; --accent-soft: #1d3a31;
  --paper: #221f19; --paper-2: #2d281f; --ink: #efe6d1; --ink-sub: #b3a582; --wall: #7d6d4d;
  --skin: #e9cfb4; --cheek: #e0897d; --lens: rgba(120, 170, 230, .22); --x-soft: #3e2224; --o-soft: #1d3a2b;
}

/* スタートの絵 */
.hn-hero { text-align: center; }
.hn-art { width: 100%; max-width: 330px; height: auto; }
.hn-plan { fill: var(--paper); stroke: var(--wall); stroke-width: 3; }
.hn-wall { stroke: var(--wall); stroke-width: 3; }
.hn-door { fill: var(--paper); }
.hn-room-t { fill: var(--ink-sub); font-size: 14px; font-weight: 700; text-anchor: middle; }
.hn-pud { fill: var(--pud); } .hn-pud-top { fill: var(--pud-top); } .hn-plate { fill: var(--wall); }
.hn-foot ellipse { fill: var(--ink-sub); opacity: .5; }
.hn-foot ellipse:nth-child(1) { animation: hn-step 2.4s infinite; } .hn-foot ellipse:nth-child(2) { animation: hn-step 2.4s .4s infinite; } .hn-foot ellipse:nth-child(3) { animation: hn-step 2.4s .8s infinite; }
@keyframes hn-step { 0%, 100% { opacity: .15; } 40% { opacity: .7; } }
.hn-lens { fill: var(--lens); } .hn-rim { fill: none; stroke: var(--ink); stroke-width: 7; } .hn-handle { fill: var(--ink); }
.hn-glass { animation: hn-scan 4s ease-in-out infinite; }
@keyframes hn-scan { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-90px, 6px); } }
.hn-q { fill: var(--accent); font-weight: 900; font-size: 26px; }

/* 人物 */
.hn-av { display: inline-block; flex: none; }
.hn-av svg { width: 100%; height: 100%; display: block; }
.hn-face { fill: var(--skin); }
.hn-hair { fill: var(--c); }
.hn-eye { fill: var(--ink); }
.hn-mouth { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.hn-cheek { fill: var(--cheek); opacity: .6; }

/* 捜査画面 */
.hn-top { display: flex; gap: 4px; align-items: baseline; }
.hn-clock { font-variant-numeric: tabular-nums; }
.hn-file { background: var(--paper); border: 1px solid var(--wall); border-radius: var(--radius); padding: 14px 16px; color: var(--ink); position: relative; }
.hn-file::before { content: ""; position: absolute; top: -9px; left: 18px; width: 90px; height: 12px; background: var(--paper-2); border: 1px solid var(--wall); border-bottom: 0; border-radius: 6px 6px 0 0; }
.hn-file-tag { font-size: 12px; letter-spacing: .12em; color: var(--ink-sub); margin: 0 0 2px; font-weight: 700; }
.hn-file-title { font-family: var(--font-serif); font-size: 24px; margin: 0 0 4px; }
.hn-file .mn-small { color: var(--ink-sub); }
.hn-plan-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; }
.hn-plan-svg { width: 100%; height: auto; display: block; }
.hn-room-n { fill: var(--ink); font-size: 15px; font-weight: 800; }
.hn-room-p { fill: var(--ink-sub); font-size: 11px; font-weight: 700; }
.hn-sus { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hn-sus-one { display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 4px; line-height: 1.35; }
.hn-items { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hn-evi { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-soft); border: 2px solid var(--warn); border-radius: 14px; padding: 10px 12px; }
.hn-evi p { margin: 0; font-weight: 700; }
.hn-evi-tag { flex: none; background: var(--warn); color: var(--surface); font-weight: 900; font-size: 13px; padding: 2px 8px; border-radius: 6px; margin-top: 2px; }
.hn-clues { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.hn-clue { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; }
.hn-clue-no { font-size: 12px; font-weight: 800; color: var(--accent); }
.hn-clue-body { display: flex; gap: 10px; align-items: flex-start; }
.hn-clue-body p { margin: 0; }
.hn-memo-ic { width: 30px; text-align: center; flex: none; }

/* メモ */
.hn-memo summary { font-weight: 700; cursor: pointer; }
.hn-memo-row { padding: 8px 0; border-top: 1px solid var(--line); }
.hn-memo-row:first-of-type { border-top: 0; }
.hn-memo-who { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
.hn-memo-g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 4px; }
.hn-chip { min-height: 38px; font-size: 13px; line-height: 1.25; padding: 4px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; position: relative; touch-action: manipulation; }
.hn-chip.is-x { background: var(--x-soft); color: var(--text-sub); text-decoration: line-through; }
.hn-chip.is-x::after { content: "✕"; position: absolute; right: 3px; top: 0; color: var(--ng); font-weight: 900; text-decoration: none; }
.hn-chip.is-o { background: var(--o-soft); border-color: var(--ok); font-weight: 800; }
.hn-chip.is-o::after { content: "○"; position: absolute; right: 3px; top: 0; color: var(--ok); font-weight: 900; }

/* 告発 */
.hn-accuse h3 { margin: 0; }
.hn-pick-l { font-weight: 800; margin: 0 0 4px; font-size: 14px; }
.hn-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hn-pick-btn { min-height: 48px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; font-size: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px; line-height: 1.3; touch-action: manipulation; }
.hn-pick-btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.hn-tries ul { list-style: none; padding: 0; margin: 6px 0; font-size: 14px; }
.hn-row { letter-spacing: 2px; }

/* 種明かし */
.hn-reveal { position: relative; display: inline-block; margin: 8px auto; animation: hn-rise .6s ease-out; }
@keyframes hn-rise { from { transform: translateY(20px) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
.hn-stamp { position: absolute; right: -40px; bottom: 0; border: 4px solid var(--ng); color: var(--ng); font-weight: 900; font-size: 22px; padding: 2px 10px; border-radius: 8px; transform: rotate(-14deg); background: var(--surface); animation: hn-stamp .45s .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.hn-reveal.ok .hn-stamp { border-color: var(--ok); color: var(--ok); }
@keyframes hn-stamp { from { transform: rotate(-14deg) scale(2.2); opacity: 0; } to { transform: rotate(-14deg); opacity: 1; } }

/* 結果 */
.hn-final .mn-big { display: flex; justify-content: center; align-items: baseline; gap: 4px; }
.hn-of { font-size: 22px; color: var(--text); }
.hn-meikyu { font-size: clamp(36px, 11vw, 56px); color: var(--text-sub); }
.hn-title-name { font-size: 20px; font-weight: 900; color: var(--accent); margin: 4px 0; }
.hn-rows { font-size: 24px; letter-spacing: 4px; line-height: 1.35; margin: 6px 0; }
.hn-bar { display: grid; grid-template-columns: 7.5em 1fr 3.4em; white-space: nowrap; gap: 8px; align-items: center; font-size: 14px; margin-top: 6px; }
.hn-bar-t { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.hn-bar-t i { display: block; height: 100%; background: var(--accent); }
.hn-bar b { text-align: right; }
.hn-explain summary { font-weight: 700; cursor: pointer; }
.hn-titles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hn-shelf { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.hn-fileb { width: 30px; height: 38px; border-radius: 4px 4px 2px 2px; background: var(--surface-2); color: var(--text-sub); font-size: 11px; display: grid; place-items: end center; padding-bottom: 2px; border: 1px solid var(--line); }
.hn-fileb.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.hn-past { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin-top: 6px; }
.hn-past-btn { min-height: 44px; font-size: 14px; padding: 6px; flex-direction: column; gap: 0; line-height: 1.2; }
.hn-ok { font-size: 11px; color: var(--ok); }
.mn-daily-num { white-space: nowrap; }
.hn-memo-ic svg { width: 30px; height: 30px; display: block; }
.hn-note { fill: var(--paper); stroke: var(--wall); stroke-width: 2; }
.hn-note-l { stroke: var(--ink-sub); stroke-width: 2; stroke-linecap: round; }
.hn-plan-note { margin: 2px 6px 0; }
.hn-rowc { display: inline-flex; gap: 5px; margin: 2px auto; }
.hn-rowc i { width: 26px; height: 26px; border-radius: 5px; display: block; }
.hn-rowc.sm i { width: 14px; height: 14px; border-radius: 3px; }
.hn-rowc.sm { vertical-align: middle; margin: 0 4px 0 0; }
.hn-rowc i.ok { background: var(--ok); } .hn-rowc i.ng { background: var(--ng); }
.hn-rows { display: flex; flex-direction: column; align-items: center; }
