/* ============ LeakTrace スタイル（白地・細い罫線・明朝見出し・青1色） ============ */
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1d2433;
  --sub: #5f6b7d;
  --line: #e2e6ed;
  --line-strong: #cdd4df;
  --track: #e9ecf2;
  --accent: #2c5ec9;
  --accent-ink: #224aa3;
  --accent-soft: #eef3fd;
  --accent-line: #c9d7f3;
  --attack: #b83a32;
  --attack-soft: #fbefee;
  --defend: #2c5ec9;
  --defend-soft: #eef3fd;
  --ok: #2b7a47;
  --ok-soft: #edf6f0;
  --ng: #b83a32;
  --warn: #8a5a00;
  --warn-soft: #fbf5e9;
  --radius: 10px;
  --serif: "Noto Serif JP", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "BIZ UDPMincho", serif;
  --sans: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, "Courier New", monospace;
  --bb-h: 72px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 16px; scroll-padding-top: 110px; scroll-padding-bottom: calc(var(--bb-h) + 24px); }
html.font-lg { font-size: 19px; }
body { margin: 0; font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.85; -webkit-tap-highlight-color: transparent; }
body.has-bottombar { padding-bottom: calc(var(--bb-h) + env(safe-area-inset-bottom)); }
a { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.45; margin: 0 0 .5em; letter-spacing: .02em; }
h1 { font-size: 1.65rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.06rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 .9em; }
ul, ol { margin: 0 0 .9em; padding-left: 1.4em; }
li { margin: .3em 0; }
code, .mono { font-family: var(--mono); font-size: .92em; }
code { background: #f0f2f6; padding: 1px 6px; border-radius: 4px; word-break: break-all; }
small, .small { font-size: .86rem; color: var(--sub); }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #9db6ec; outline-offset: 2px; border-radius: 4px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.mt { margin-top: 16px; }
.mb0 { margin-bottom: 0 !important; }
.muted { color: var(--sub); }
.big { font-size: 1.5rem; font-weight: 700; font-family: var(--serif); }
.huge { font-size: 2.1rem; font-weight: 700; font-family: var(--serif); line-height: 1.25; }
.kicker { font-size: .8rem; font-weight: 700; letter-spacing: .14em; color: var(--accent); margin-bottom: 4px; }

/* ---------- 上部 ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 960px; margin: 0 auto; padding: 10px 16px 4px; display: flex; align-items: center; gap: 12px; }
.brand { text-decoration: none; color: var(--text); display: flex; align-items: baseline; gap: 12px; flex: 1; min-width: 0; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--accent-ink); }
.brand-sub { font-size: .78rem; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { border: 1px solid var(--line-strong); background: #fff; border-radius: 6px; height: 34px; padding: 0 10px; font: inherit; font-size: .8rem; cursor: pointer; color: var(--sub); }
.icon-btn small { font-size: .9em; margin-left: 1px; color: inherit; }
.icon-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.topnav { max-width: 960px; margin: 0 auto; padding: 0 10px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { padding: 8px 10px 9px; text-decoration: none; color: var(--sub); white-space: nowrap; font-size: .88rem; border-bottom: 2px solid transparent; }
.topnav a:hover { color: var(--text); }
.topnav a.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.nav-sep { flex: none; width: 1px; background: var(--line); margin: 8px 6px; }
@media (max-width: 560px) { .brand-sub { display: none; } }

.app { max-width: 920px; margin: 0 auto; padding: 26px 16px 48px; }
.narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.footer { text-align: center; color: var(--sub); font-size: .76rem; padding: 12px 16px 32px; line-height: 1.7; border-top: 1px solid var(--line); max-width: 920px; margin: 0 auto; }

/* ---------- カード ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px; }
.card > :last-child { margin-bottom: 0; }
.card.attack { border-top: 3px solid var(--attack); }
.card.defend { border-top: 3px solid var(--defend); }
.card.note { background: var(--warn-soft); border-color: #eadfc4; }
.card.ok { background: var(--ok-soft); border-color: #cfe5d7; }
.card .card { padding: 16px 18px; }
.card-label { font-size: .78rem; font-weight: 700; letter-spacing: .12em; color: var(--accent); margin-bottom: 6px; }
.card .q { font-size: 1.04rem; font-weight: 700; }
.card.predict { border-left: 3px solid var(--accent); }
.card.write { border-left: 3px solid var(--line-strong); }
details.card > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before { content: "▸"; color: var(--sub); }
details.card[open] > summary::before { content: "▾"; }
h2.inline { display: inline; margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 720px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.sec, .section-title { font-family: var(--serif); font-size: 1.2rem; margin: 34px 0 14px; padding-left: 12px; border-left: 4px solid var(--accent); line-height: 1.4; color: var(--text); }

/* ---------- ボタン・入力 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; color: var(--text); font: inherit; font-size: .97rem; font-weight: 700; cursor: pointer; min-height: 46px; text-decoration: none; line-height: 1.3; transition: background .12s; }
.btn:hover { background: #f4f6f9; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-ink); }
.btn.attack { background: var(--attack); color: #fff; border-color: var(--attack); }
.btn.attack:hover { background: #9a2f28; }
.btn.defend { background: var(--defend); color: #fff; border-color: var(--defend); }
.btn.defend:hover { background: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--sub); }
.btn.ghost:hover { background: #eef0f4; }
.btn.danger { color: var(--ng); border-color: #e7c3c0; }
.btn.sm { padding: 6px 12px; min-height: 38px; font-size: .88rem; }
.btn.lg { padding: 13px 26px; font-size: 1.04rem; min-height: 52px; }
.btn.block { width: 100%; }
input[type=text], input[type=password], input[type=email], select, textarea { font: inherit; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 8px; width: 100%; background: #fff; color: var(--text); min-height: 46px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-weight: 700; margin-bottom: 6px; font-size: .93rem; }
input[type=range] { width: 100%; height: 32px; accent-color: var(--accent); }
input[type=radio], input[type=checkbox] { accent-color: var(--accent); }

.choices { display: grid; gap: 8px; }
.choice { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; background: #fff; }
.choice:hover { border-color: var(--accent-line); background: #fafbfe; }
.choice input { margin: 6px 0 0; flex: none; width: 18px; height: 18px; }
.choice .mark { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: var(--sub); font-family: var(--serif); }
.choices .choice input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice.correct { border-color: var(--ok); background: var(--ok-soft); }
.choice.correct .mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.choice.wrong { border-color: var(--ng); background: var(--attack-soft); }
.choice.wrong .mark { background: var(--ng); border-color: var(--ng); color: #fff; }
.choice.agree { margin-top: 16px; font-weight: 700; }
.choice .why { display: block; width: 100%; font-size: .82rem; margin-top: 4px; }
.choice:has(.why) { flex-wrap: wrap; }
.feedback { margin-top: 12px; padding: 12px 16px; border-radius: 8px; border: 1px solid var(--line); }
.feedback.ok { background: var(--ok-soft); border-color: #cfe5d7; }
.feedback.ng { background: var(--warn-soft); border-color: #eadfc4; }
.feedback.warn { background: #fff8e6; border-color: #eadfc4; }
.toggle { display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; cursor: pointer; min-height: 46px; font-weight: 600; user-select: none; }
.toggle input { width: 20px; height: 20px; }
.toggle.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- タグ・バッジ ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .74rem; padding: 1px 8px; border: 1px solid var(--accent-line); color: var(--accent); border-radius: 4px; background: #fff; line-height: 1.7; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 4px; font-size: .76rem; font-weight: 700; white-space: nowrap; line-height: 1.7; border: 1px solid transparent; }
.badge.attack, .badge.ng { color: var(--attack); border-color: #e7c3c0; background: #fff; }
.badge.defend { color: var(--accent); border-color: var(--accent-line); background: #fff; }
.badge.ok { color: var(--ok); border-color: #bcdcc7; background: #fff; }
.badge.warn { color: var(--warn); border-color: #e6d3a8; background: #fff; }
.badge.gray { color: var(--sub); border-color: var(--line-strong); background: #fff; }
.badge.accent { color: #fff; background: var(--accent); }
.ok-mark { color: var(--ok); font-weight: 800; }
.term { border-bottom: 1.5px dotted var(--accent); cursor: help; color: inherit; }
.glossary-pop { position: fixed; z-index: 50; max-width: 340px; background: #fff; color: var(--text); border: 1px solid var(--line-strong); padding: 12px 16px; border-radius: 8px; font-size: .9rem; line-height: 1.7; box-shadow: 0 8px 24px rgba(20,30,50,.14); }
.glossary-pop b { color: var(--accent-ink); font-family: var(--serif); }
.toast { position: fixed; left: 50%; bottom: calc(var(--bb-h) + 16px); transform: translateX(-50%); background: #1d2433; color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 60; font-size: .92rem; animation: fadein .2s ease; max-width: calc(100% - 32px); text-align: center; }

/* ---------- ホーム ---------- */
.hero { padding: 6px 0 4px; }
.hero h1 { font-size: 1.9rem; line-height: 1.5; }
.lead { color: #3a4456; max-width: 46em; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 26px; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; }
.stat-v { font-family: var(--serif); font-size: 2rem; font-weight: 700; color: var(--accent); line-height: 1.3; }
.stat-v small { font-size: .5em; color: var(--accent); margin-left: 2px; }
.stat-k { font-size: .8rem; color: var(--sub); line-height: 1.55; margin-top: 4px; }
.stage-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 680px) { .stage-grid { grid-template-columns: 1fr; } }
.stage-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; text-decoration: none; color: inherit; transition: border-color .12s; }
.stage-card:hover { border-color: var(--accent-line); }
.stage-card.next { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sc-top { display: flex; justify-content: space-between; align-items: center; }
.sc-no { font-family: var(--serif); font-size: 1.6rem; color: var(--accent); line-height: 1.2; }
.sc-next { font-size: .74rem; font-weight: 700; color: #fff; background: var(--accent); padding: 1px 8px; border-radius: 4px; }
.sc-done { font-size: .74rem; font-weight: 700; color: var(--ok); border: 1px solid #bcdcc7; padding: 0 8px; border-radius: 4px; }
.stage-card h3 { margin: 4px 0 4px; }
.stage-card p { font-size: .86rem; color: var(--sub); margin: 0 0 10px; line-height: 1.7; flex: 1; }
.sc-prog { display: flex; gap: 4px; align-items: center; margin-top: 12px; font-size: .74rem; color: #a2abba; }
.sc-prog span { padding: 0 6px; border-bottom: 2px solid var(--track); }
.sc-prog span.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.sc-prog .sc-min { margin-left: auto; border: 0; color: var(--sub); }
.link-list { display: grid; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.link-list a { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding: 13px 18px; text-decoration: none; color: var(--text); border-top: 1px solid var(--line); }
.link-list a:first-child { border-top: 0; }
.link-list a:hover { background: #fafbfd; }
.link-list a b { color: var(--accent-ink); }
.link-list a span { font-size: .84rem; color: var(--sub); }
.link-list a::after { content: "›"; margin-left: auto; color: var(--sub); }
.research-box { margin-top: 26px; border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 12px 16px; background: #fff; }
.research-box > summary { cursor: pointer; font-size: .9rem; color: var(--sub); list-style: none; }
.research-box > summary::-webkit-details-marker { display: none; }
.research-box > summary::before { content: "▸ "; }
.research-box[open] > summary::before { content: "▾ "; }
.research-box .link-list { margin-top: 8px; }
ol.promise { counter-reset: p; list-style: none; padding: 0; text-align: left; }
ol.promise li { counter-increment: p; position: relative; padding: 12px 12px 12px 48px; border-top: 1px solid var(--line); margin: 0; }
ol.promise li::before { content: counter(p); position: absolute; left: 8px; top: 12px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: .85rem; }

/* ---------- ステージ ---------- */
.stage-head { margin-bottom: 14px; }
.stage-head h1 { margin-bottom: 8px; }
.h-sub { font-size: .62em; color: var(--sub); font-weight: 400; margin-left: 4px; }
.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tab { position: relative; display: flex; flex-direction: column; padding: 8px 18px 10px 0; margin-right: 22px; text-decoration: none; color: var(--sub); border-bottom: 2px solid transparent; margin-bottom: -1px; line-height: 1.4; white-space: nowrap; }
.tab-n { font-family: var(--serif); font-size: .86rem; }
.tab-l { font-weight: 700; font-size: 1rem; }
.tab-h { font-size: .74rem; }
.tab-ok { position: absolute; right: 0; top: 8px; color: var(--ok); font-weight: 800; font-size: .8rem; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
@media (max-width: 560px) { .tab-h { display: none; } .tab { margin-right: 12px; padding-right: 14px; } }
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.bb-inner { max-width: 920px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.bb-inner .btn.primary { margin-left: auto; }
.bb-pos { font-size: .82rem; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .bb-pos { display: none; } .bb-inner .btn { font-size: .9rem; padding: 10px 12px; } }

/* ---------- 実際の事件（要旨ボックス風） ---------- */
.case { background: #f4f7fd; border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 18px; }
.case > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.case > summary::-webkit-details-marker { display: none; }
.case-tag { font-weight: 700; font-size: .82rem; letter-spacing: .1em; color: var(--accent); }
.case-tag::before { content: "▾ "; }
.case:not([open]) .case-tag::before { content: "▸ "; }
.case-when { font-size: .78rem; color: var(--sub); }
.case-title { margin: 10px 0 8px; font-size: 1.08rem; }
.case-facts { margin-bottom: 10px; font-size: .93rem; }
.case-src { font-size: .78rem; color: var(--sub); display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--accent-line); padding-top: 8px; }
.case-src b { color: var(--accent); }
.case-src a { color: var(--sub); word-break: break-all; }
.case-note { font-size: .8rem; color: var(--sub); margin: 8px 0 0; }

/* ---------- もっと深く ---------- */
details.deeper { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin: 0 0 16px; }
details.deeper > summary { cursor: pointer; padding: 12px 18px; font-weight: 700; color: var(--accent-ink); list-style: none; font-size: .95rem; }
details.deeper > summary::-webkit-details-marker { display: none; }
details.deeper > summary::before { content: "＋ "; color: var(--accent); }
details.deeper[open] > summary::before { content: "－ "; }
.deeper-body { padding: 0 20px 14px; font-size: .94rem; }
.card details.deeper { background: #fafbfd; }

/* ---------- 表・その他 ---------- */
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { border-bottom: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: middle; }
th { background: #f4f7fd; font-weight: 700; font-size: .84rem; color: var(--accent-ink); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.table-wrap table tr:last-child td { border-bottom: 0; }
.xray { background: #1d2433; color: #d5e1f5; border-radius: 8px; padding: 12px 16px; font-family: var(--mono); font-size: .8rem; line-height: 1.65; max-height: 340px; overflow: auto; white-space: pre-wrap; }
.xray::before { content: "透視ビュー（裏側で起きていること）"; display: block; color: #8d9bb5; font-family: var(--sans); font-size: .74rem; margin-bottom: 4px; }
.xray .ok { color: #8fd4a3; } .xray .ng { color: #f2998f; } .xray .hl { color: #f0cf7a; } .xray .dim { color: #7d8aa3; }
.progress { height: 6px; background: var(--track); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.progress.attack > div { background: var(--attack); }
.chart { width: 100%; height: auto; display: block; }
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 640px) { .vs { grid-template-columns: 1fr; } }
.vs > div { border-radius: 8px; padding: 14px; border: 1px solid var(--line); }
.vs .no { background: var(--attack-soft); border-color: #ecd0cd; }
.vs .yes { background: var(--accent-soft); border-color: var(--accent-line); }
.vs h4 { margin-bottom: 4px; }
.timer { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; }
.timer.low { color: var(--ng); }
.ext-warn { color: var(--ng); font-weight: 700; }
.mapwrap svg { width: 100%; height: auto; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .84rem; color: var(--sub); }
.legend i { display: inline-block; width: 22px; height: 3px; vertical-align: middle; margin-right: 6px; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.export-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.export-grid .btn { flex-direction: column; gap: 0; padding: 10px 6px; font-size: .86rem; }
@media (max-width: 720px) { .export-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .export-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: #fff; }
.stat .v { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; line-height: 1.3; color: var(--accent); }
.stat .k { font-size: .78rem; color: var(--sub); font-weight: 700; }
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.likert label { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; font-size: .72rem; color: var(--sub); text-align: center; line-height: 1.3; }
.likert label b { font-size: 1.05rem; color: var(--text); font-family: var(--serif); }
.likert input { position: absolute; opacity: 0; pointer-events: none; }
.likert label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.qnum { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font-weight: 700; font-size: .8rem; margin-right: 8px; font-family: var(--serif); }
dl.gloss { margin: 0; }
dl.gloss dt { font-family: var(--serif); font-weight: 700; margin-top: 14px; color: var(--accent-ink); }
dl.gloss dt:first-child { margin-top: 0; }
dl.gloss dd { margin: 2px 0 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }

/* ---------- メール・SMS・ブラウザ ---------- */
.mail { border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: #fff; }
.mail .hd { background: #f7f8fa; padding: 12px 16px; font-size: .9rem; border-bottom: 1px solid var(--line); }
.mail .hd div { margin: 2px 0; }
.mail .hd .subj { font-size: 1.02rem; font-weight: 700; margin-bottom: 6px; }
.mail .avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #d7dce5; color: #fff; font-weight: 700; font-size: .8rem; margin-right: 8px; vertical-align: middle; }
.mail .bd { padding: 16px; white-space: pre-wrap; }
.mail .link, .sms .link { color: var(--accent); text-decoration: underline; word-break: break-all; }
.flag { outline: 2px solid var(--ng); outline-offset: 2px; border-radius: 3px; }
.flag-n { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ng); color: #fff; font-size: .7rem; font-weight: 800; margin-left: 6px; vertical-align: 1px; font-family: var(--sans); }
.sms { max-width: 420px; border: 1px solid var(--line-strong); border-radius: 18px; padding: 14px; background: #f3f4f7; }
.sms-hd { text-align: center; font-weight: 700; margin-bottom: 10px; display: flex; flex-direction: column; align-items: center; }
.sms-bubble { background: #fff; border-radius: 16px 16px 16px 4px; padding: 12px 14px; line-height: 1.7; border: 1px solid var(--line); }
.urlbox { font-family: var(--mono); font-size: 1rem; padding: 11px 14px; background: #f7f8fa; border-radius: 8px; border: 1px solid var(--line); word-break: break-all; }
.urlbox .sch, .urlbox .path { color: #8a94a6; }
.urlbox .subd { color: var(--warn); }
.urlbox .dom { color: var(--accent-ink); font-weight: 800; background: var(--accent-soft); padding: 0 3px; border-radius: 3px; }
.browser { border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: #fff; max-width: 560px; }
.br-bar { display: flex; align-items: center; gap: 10px; background: #eef0f4; padding: 8px 12px; }
.br-dots i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #c9cfd9; margin-right: 4px; }
.br-url { flex: 1; background: #fff; border-radius: 99px; padding: 5px 14px; font-family: var(--mono); font-size: .8rem; word-break: break-all; }
.br-body { padding: 18px; }
.br-banner { background: #fbefee; color: var(--ng); font-weight: 700; font-size: .86rem; padding: 10px 12px; border-radius: 6px; margin-bottom: 12px; }
.br-logo { font-weight: 800; font-size: 1.15rem; margin-bottom: 4px; }
.br-text { font-size: .9rem; margin-bottom: 10px; }
.br-field { font-size: .84rem; font-weight: 700; margin-bottom: 8px; }
.br-field span { display: block; height: 36px; border: 1px solid var(--line-strong); border-radius: 6px; margin-top: 3px; }
.br-btn { background: #e08a1e; color: #fff; font-weight: 800; text-align: center; padding: 9px; border-radius: 6px; margin-top: 6px; }
.spot { cursor: pointer; border-radius: 6px; display: block; transition: box-shadow .2s; }
.br-url.spot { display: inline-block; }
.spot:hover { box-shadow: 0 0 0 2px var(--accent-line); }
.spot.found { box-shadow: 0 0 0 2px var(--ng); }
.spot.hint { animation: hint .5s ease 3; }
@keyframes hint { 50% { box-shadow: 0 0 0 3px #e9c46a; } }
.spot-list li { margin-bottom: 8px; }

/* ---------- 図・体験の部品 ---------- */
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: 210px 1fr; gap: 12px; align-items: center; }
.hbar-k { font-weight: 700; font-size: .9rem; line-height: 1.35; display: flex; flex-direction: column; }
.hbar-track { position: relative; background: var(--track); border-radius: 4px; height: 26px; }
.hbar-fill { height: 100%; border-radius: 4px; transition: width .6s ease; }
.hbar-v { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: .82rem; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3); white-space: nowrap; }
@media (max-width: 600px) { .hbar { grid-template-columns: 1fr; gap: 4px; } }
.sort-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 10px; background: #fff; }
.sort-q { font-weight: 700; margin-bottom: 10px; }
.sort-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.sort-btns .btn { flex: 1 1 140px; }
.sort-btns .btn.right { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); opacity: 1; }
.sort-btns .btn.picked:not(.right) { border-color: var(--ng); background: var(--attack-soft); color: var(--ng); opacity: 1; }
.cia { border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 4px; background: #fff; }
.cia b { font-family: var(--serif); font-size: 1.1rem; color: var(--accent-ink); }
.cia span { font-size: .86rem; color: var(--sub); }
.day { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
@media (max-width: 640px) { .day { grid-template-columns: repeat(2, 1fr); } }
.day-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; font: inherit; color: var(--text); cursor: pointer; line-height: 1.4; }
.day-item.on { border-color: var(--accent); background: var(--accent-soft); }
.day-t { font-size: .76rem; font-weight: 700; color: var(--sub); font-family: var(--serif); }
.day-i { font-size: 1.2rem; }
.day-s { font-size: .86rem; font-weight: 700; }
.day-d { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chip { display: inline-block; font-size: .72rem; padding: 1px 7px; border-radius: 4px; background: #fff; border: 1px solid var(--accent-line); color: var(--accent-ink); }
.fp-wrap { max-width: 640px; margin: 0 auto; }
.chain-step { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; transition: all .25s; }
.chain-step.hit { border-color: #ecd0cd; background: var(--attack-soft); }
.chain-step.cut { border-color: var(--accent); background: var(--accent-soft); }
.chain-step.safe { opacity: .5; }
.chain-icon { flex: none; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; font-size: 1.15rem; background: #f3f5f8; }
.chain-arrow { text-align: center; color: #b4bcc9; line-height: 1.3; font-size: .85rem; }
.choice-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 16px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; font: inherit; color: var(--text); cursor: pointer; line-height: 1.6; }
.choice-card:hover:not(:disabled) { border-color: var(--attack); }
.choice-card.picked { border-color: var(--attack); background: var(--attack-soft); }
.choice-card:disabled:not(.picked) { opacity: .45; }
.def-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 720px) { .def-grid { grid-template-columns: repeat(2, 1fr); } }
.def { display: flex; align-items: center; gap: 8px; text-align: left; padding: 9px 12px; min-height: 52px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; color: var(--text); line-height: 1.35; }
.def span { font-size: 1.15rem; }
.def.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.def:disabled { opacity: .4; cursor: not-allowed; }
.impact { display: grid; gap: 8px; }
.impact-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px; line-height: 1.5; font-size: .9rem; border: 1px solid var(--line); }
.impact-item > span { font-size: 1.3rem; }
.impact-item.bad { background: var(--attack-soft); border-color: #ecd0cd; }
.impact-item.warn { background: var(--warn-soft); border-color: #eadfc4; }
.impact-item.good { background: var(--ok-soft); border-color: #cfe5d7; }
.ransom { background: #2b1416; color: #f3d6d4; border-radius: 8px; padding: 14px 18px; margin-top: 14px; }
.ransom-hd { font-weight: 800; color: #f2998f; margin-bottom: 6px; }
.ransom p { margin: 0; font-size: .9rem; }
.relay { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fafbfd; }
.relay-cols { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; font-weight: 700; font-size: .86rem; margin-left: 30px; padding-bottom: 8px; border-bottom: 1px dashed var(--line-strong); }
.relay-row { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; margin-top: 8px; }
.relay-no { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font-size: .74rem; font-weight: 700; display: grid; place-items: center; margin-top: 2px; font-family: var(--serif); }
.relay-lane { position: relative; height: 18px; }
.relay-arrow { position: absolute; top: 8px; height: 2px; background: var(--accent); }
.relay-arrow::after { content: ""; position: absolute; right: -2px; top: -5px; border: 6px solid transparent; border-left: 8px solid var(--accent); border-right: 0; }
.relay-arrow.rev::after { right: auto; left: -2px; border-left: 0; border-right: 8px solid var(--accent); }
.relay-arrow.bad { background: var(--ng); }
.relay-arrow.bad::after { border-left-color: var(--ng); }
.relay-dot { position: absolute; top: 4px; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%; background: var(--accent); }
.relay-t { font-size: .88rem; line-height: 1.5; }
.relay-t.bad { color: var(--ng); font-weight: 700; }
.auth-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 6px; margin-top: 12px; }
.auth-h { font-weight: 700; text-align: center; font-size: .86rem; line-height: 1.4; padding: 6px; }
.auth-h small { font-weight: 400; }
.auth-m { display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 10px; background: #f7f8fa; border-radius: 6px; }
.auth-r { display: grid; place-items: center; border-radius: 6px; font-weight: 700; font-size: .88rem; padding: 10px 4px; text-align: center; }
.auth-r.ok { background: var(--ok-soft); color: var(--ok); }
.auth-r.ng { background: var(--attack-soft); color: var(--ng); }
.auth-note { grid-column: 1 / -1; font-size: .84rem; color: var(--sub); padding: 0 6px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.mailer { border: 1px solid var(--line-strong); border-radius: 8px; padding: 14px; background: #fff; }
.mailer-row { display: grid; grid-template-columns: 52px 1fr; gap: 8px; margin-bottom: 12px; }
.file-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 640px) { .file-pick { grid-template-columns: 1fr; } }
.file { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; line-height: 1.4; }
.file input { position: absolute; opacity: 0; pointer-events: none; }
.file:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.file-icon { font-size: 1.4rem; }
.file-name { font-weight: 700; font-size: .88rem; display: block; word-break: break-all; }
.file small { font-size: .74rem; }
.share-dlg { border: 1px solid var(--line-strong); border-radius: 8px; padding: 14px; background: #fff; }
.share-hd { font-weight: 700; margin-bottom: 10px; font-size: .93rem; }
.share-opt { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line-strong); border-radius: 8px; margin-bottom: 8px; cursor: pointer; font-weight: 600; }
.share-opt input { width: 20px; height: 20px; }
.share-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.share-i { font-size: 1.15rem; }

.fade-in { animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.case > summary { display: grid; grid-template-columns: 1fr auto; row-gap: 2px; }
.case > summary .case-title { grid-column: 1 / -1; margin: 4px 0 0; font-family: var(--serif); font-weight: 700; font-size: 1.05rem; color: var(--text); }
.case-more { grid-column: 1 / -1; font-size: .8rem; color: var(--accent); }
.case[open] .case-more { display: none; }
.case[open] > summary { margin-bottom: 10px; }

/* ---------- リセット ---------- */
.link-btn { background: none; border: 0; padding: 4px 2px; font: inherit; font-size: .84rem; color: var(--sub); text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--accent); }
.link-btn[data-armed] { color: var(--ng); font-weight: 700; }
.reset-panel { margin-top: 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; padding: 16px 18px; max-width: 640px; }
.reset-panel h3 { font-size: 1rem; }
.reset-opt { display: grid; grid-template-columns: 210px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.reset-opt .btn { width: 100%; }
.btn[data-armed] { background: var(--ng); color: #fff; border-color: var(--ng); }
@media (max-width: 560px) { .reset-opt { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- 攻撃経路マップ ---------- */
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 7px 14px; font: inherit; font-size: .86rem; color: var(--sub); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button.on { background: var(--accent); color: #fff; font-weight: 700; }
.edge-draw { stroke-dasharray: 100; stroke-dashoffset: 100; animation: edgeDraw .8s ease forwards; }
@keyframes edgeDraw { to { stroke-dashoffset: 0; } }
.cut-pop { opacity: 0; animation: cutPop .4s ease forwards; }
@keyframes cutPop { to { opacity: 1; } }
.node-danger rect { animation: danger 1.6s ease-in-out infinite; }
.edge-label { pointer-events: none; }
@keyframes danger { 50% { stroke-opacity: .25; } }
.map-caption { margin-top: 12px; padding: 12px 16px; border: 1px solid var(--accent-line); background: #f4f7fd; border-radius: 8px; animation: fadein .25s ease; }
.map-key { display: grid; gap: 8px; }
.map-key > div { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: start; font-size: .92rem; }
.map-key svg { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .edge-draw { stroke-dashoffset: 0; } .cut-pop { opacity: 1; } }

.edge-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 720px) { .edge-list { grid-template-columns: 1fr; } }
.edge-list li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; padding: 8px 6px; border-top: 1px solid var(--line); cursor: pointer; margin: 0; }
.edge-list li:hover, .edge-list li.on { background: var(--accent-soft); }
.edge-list .en { width: 24px; height: 24px; border-radius: 50%; border: 2px solid; display: grid; place-items: center; font-size: .74rem; font-weight: 700; margin-top: 2px; }
.edge-list .et { display: flex; flex-direction: column; line-height: 1.5; font-size: .9rem; }
.edge-list .et small { font-size: .78rem; }
.edge-list .badge { margin-top: 2px; }

/* ---------- 章立て（1ページで進む） ---------- */
.chapter-rail { position: sticky; top: 92px; z-index: 18; display: flex; align-items: center; gap: 0; background: rgba(255,255,255,.95); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px; margin-bottom: 22px; box-shadow: 0 2px 10px rgba(20,30,50,.05); }
.cr { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; font: inherit; font-size: .86rem; color: var(--sub); padding: 6px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.cr-n { font-family: var(--serif); }
.cr.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.cr.done .cr-n { color: var(--ok); }
.cr-line { flex: 1; height: 1px; background: var(--line); min-width: 8px; }
@media (max-width: 560px) { .chapter-rail { top: 88px; } .cr-l { display: none; } .cr { padding: 8px 10px; } .cr.on .cr-l { display: inline; } }

.chapter { scroll-margin-top: 150px; }
.chapter-head { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 14px; }
.ch-badge { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; padding: 2px 14px; border-radius: 999px; color: #fff; }
.ch-badge.ch-see { background: #5a6b86; }
.ch-badge.ch-break { background: var(--attack); }
.ch-badge.ch-defend { background: var(--accent); }
.ch-hint { font-size: .86rem; color: var(--sub); }
.chapter-join { text-align: center; color: var(--line-strong); font-size: 1.6rem; line-height: 1; margin: 2px 0 10px; }
.chapter-join span { display: inline-block; animation: joinBob 1.8s ease-in-out infinite; }
@keyframes joinBob { 50% { transform: translateY(5px); } }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } .chapter-join span { animation: none; } }

/* ---------- 没入シミュレーション（スマホ） ---------- */
.sim-card { background: linear-gradient(180deg, #f7f9fd, #fff); }
.phone { width: 300px; max-width: 100%; margin: 18px auto; aspect-ratio: 9 / 18; background: #0d1220; border-radius: 34px; border: 9px solid #0d1220; box-shadow: 0 10px 34px rgba(13,18,32,.28); position: relative; overflow: hidden; color: #1d2433; font-size: .9rem; }
.phone::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 120px; height: 22px; background: #0d1220; border-radius: 0 0 14px 14px; z-index: 5; }
.phone.wall { background: linear-gradient(160deg, #2c5ec9, #6a3fb5); }
.phone.app, .phone.end { background: #eef1f6; }
.ph-status { display: flex; justify-content: space-between; color: #fff; font-size: .72rem; padding: 7px 18px 0; }
.ph-clock { text-align: center; color: #fff; margin-top: 26px; }
.ph-time { font-size: 2.8rem; font-weight: 300; letter-spacing: 1px; }
.ph-date { font-size: .8rem; opacity: .9; }
.ph-notif { position: absolute; left: 12px; right: 12px; top: 150px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-radius: 16px; padding: 10px 13px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.pn-top { display: flex; justify-content: space-between; font-size: .68rem; color: #5f6b7d; margin-bottom: 2px; }
.pn-title { font-weight: 700; font-size: .84rem; }
.pn-body { font-size: .8rem; line-height: 1.5; margin-top: 2px; }
.ph-tap { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0 auto; width: 80%; background: rgba(255,255,255,.22); color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 10px; font: inherit; font-size: .82rem; cursor: pointer; }
.ph-tap:hover { background: rgba(255,255,255,.34); }
.pop-in { animation: popIn .45s cubic-bezier(.2,.9,.3,1.2); }
@keyframes popIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
.ph-bar, .ph-urlbar { display: flex; align-items: center; gap: 8px; background: #fff; padding: 12px 14px 10px; font-size: .86rem; border-bottom: 1px solid #e2e6ed; margin-top: 18px; }
.ph-bar b { flex: 1; text-align: center; }
.ph-back { color: var(--accent); font-size: 1.2rem; }
.ph-urlbar { gap: 6px; }
.ph-lock { font-size: .8rem; }
.ph-url { background: #eef1f6; border-radius: 99px; padding: 4px 12px; font-family: var(--mono); font-size: .74rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-thread { padding: 14px 12px; }
.ph-sender { text-align: center; font-size: .68rem; color: #8a94a6; margin-bottom: 10px; }
.ph-bubble { background: #fff; border: 1px solid #e2e6ed; border-radius: 4px 16px 16px 16px; padding: 11px 13px; font-size: .82rem; line-height: 1.6; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.ph-link { color: var(--accent); word-break: break-all; cursor: pointer; text-decoration: underline; }
.ph-choices { position: absolute; left: 12px; right: 12px; bottom: 16px; display: flex; gap: 8px; }
.ph-choices .btn { flex: 1; min-height: 42px; }
.ph-loading { height: 3px; background: #dbe0e8; margin-top: 2px; }
.ph-progress { height: 100%; width: 4%; background: var(--accent); transition: width 1s ease; }
.ph-loadmsg { text-align: center; color: #8a94a6; font-size: .78rem; margin-top: 20px; }
.ph-site { padding: 16px 16px 14px; }
.site-logo { font-weight: 800; font-size: 1.1rem; text-align: center; margin-bottom: 10px; }
.site-warn { background: #fbefee; color: var(--ng); font-size: .72rem; font-weight: 700; padding: 7px 9px; border-radius: 6px; margin-bottom: 12px; }
.site-field { display: block; font-size: .72rem; font-weight: 700; color: #5f6b7d; margin-bottom: 9px; }
.site-input { display: block; margin-top: 3px; background: #fff; border: 1px solid #cdd4df; border-radius: 6px; padding: 8px 10px; font-family: var(--mono); font-size: .82rem; color: #1d2433; }
.site-btn { width: 100%; background: #e08a1e; color: #fff; border: 0; border-radius: 8px; padding: 11px; font: inherit; font-weight: 800; cursor: pointer; margin-top: 2px; }
.site-btn:hover { background: #cf7c13; }
.ph-cancel { width: 100%; margin-top: 8px; }
.steal-stage { position: absolute; inset: 18px 0 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; place-items: center; gap: 4px; padding: 10px; }
.steal-stage > div[class^="steal-"]:not([class*="packet"]) { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; text-align: center; color: #1d2433; }
.steal-stage > div[class^="steal-"] { font-size: 1.7rem; }
.steal-you { grid-area: 1 / 1; } .steal-fake { grid-area: 1 / 2; } .steal-real { grid-area: 2 / 2; } .steal-att { grid-area: 2 / 1; }
.steal-packet { position: absolute; font-size: .64rem !important; background: var(--ng); color: #fff; padding: 2px 7px; border-radius: 99px; white-space: nowrap; opacity: 0; }
.steal-packet.p1 { top: 26%; left: 20%; animation: pkt1 2.2s ease forwards; }
.steal-packet.p2 { top: 50%; right: 14%; animation: pkt2 2.2s ease .7s forwards; }
@keyframes pkt1 { 0% { opacity: 0; left: 24%; } 20% { opacity: 1; } 80% { opacity: 1; left: 56%; } 100% { opacity: 0; left: 60%; } }
@keyframes pkt2 { 0% { opacity: 0; top: 34%; } 20% { opacity: 1; } 80% { opacity: 1; top: 62%; } 100% { opacity: 0; top: 66%; } }
.phone.end { display: grid; place-items: center; }
.ph-result { text-align: center; padding: 20px; }
.pr-icon { font-size: 3rem; }
.phone.end.good .pr-icon { filter: none; }
.pr-title { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; margin: 8px 0 4px; }
.phone.end.bad .pr-title { color: var(--ng); }
.phone.end.good .pr-title { color: var(--ok); }
.pr-sub { font-size: .78rem; color: #5f6b7d; margin-bottom: 16px; line-height: 1.6; }
.sim-note { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .pop-in, .steal-packet { animation: none; opacity: 1; } }

/* ---------- リスト型攻撃のスキャン演出 ---------- */
#leakTable tr.scan { background: #fff6e8; }
#leakTable tr.scan td { animation: scanPulse .7s ease-in-out infinite; }
#leakTable tr.hit { background: var(--attack-soft); }
#leakTable tr.hit td { transition: background .3s; }
@keyframes scanPulse { 50% { background: #fde8c8; } }
@media (prefers-reduced-motion: reduce) { #leakTable tr.scan td { animation: none; } }

/* ---------- 監視画面の再現（ステージ3） ---------- */
.replay { border: 1px solid #2a3245; border-radius: 10px; background: #141a28; color: #d5e1f5; padding: 14px; margin-top: 8px; }
.replay-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.replay-clock { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 1.15rem; font-weight: 700; color: #fff; }
.replay-clock .small { color: #8d9bb5; font-family: var(--sans); font-weight: 400; font-size: .78rem; }
.rc-dot { width: 9px; height: 9px; border-radius: 50%; background: #e2564b; box-shadow: 0 0 0 0 rgba(226,86,75,.6); animation: rcPulse 1.4s infinite; }
@keyframes rcPulse { 70% { box-shadow: 0 0 0 8px rgba(226,86,75,0); } 100% { box-shadow: 0 0 0 0 rgba(226,86,75,0); } }
.replay-ctrl { display: flex; gap: 6px; flex-wrap: wrap; }
.replay .btn.sm { min-height: 34px; }
.replay .btn:not(.primary) { background: #1f2738; color: #d5e1f5; border-color: #33405a; }
.replay .btn.ghost { background: transparent; border-color: transparent; color: #8d9bb5; }
.replay-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; }
@media (max-width: 760px) { .replay-grid { grid-template-columns: 1fr; } }
.replay-net { background: #fff; border-radius: 8px; padding: 8px; }
.rp-label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; color: #8d9bb5; margin-bottom: 6px; }
.replay-net .rp-label { color: #5f6b7d; }
.replay-log { background: #0b0f19; border: 1px solid #2a3245; border-radius: 6px; height: 170px; overflow-y: auto; font-family: var(--mono); font-size: .76rem; padding: 6px; }
.rl-empty { color: #5f6b7d; padding: 8px; font-family: var(--sans); }
.rl-row { display: grid; grid-template-columns: 44px 40px 1fr; gap: 6px; padding: 5px 6px; border-bottom: 1px solid #1c2333; animation: rlIn .35s ease; line-height: 1.5; }
@keyframes rlIn { from { opacity: 0; background: #2a2010; } to { opacity: 1; } }
.rl-t { color: #8d9bb5; }
.rl-lv { font-weight: 700; font-family: var(--sans); font-size: .7rem; text-align: center; border-radius: 3px; align-self: start; padding: 1px 0; }
.rl-warn .rl-lv { background: #5a4310; color: #f0cf7a; }
.rl-bad .rl-lv { background: #5a1c18; color: #f2998f; }
.rl-bad .rl-msg { color: #ffd1cc; }
.replay-meters { display: grid; gap: 8px; }
.rp-meter { font-size: .78rem; }
.rpm-top { display: flex; justify-content: space-between; margin-bottom: 3px; color: #b8c4da; }
.rpm-top b { color: #8fd4a3; }
.rpm-top b.ng { color: #f2998f; }
.rpm-bar { height: 6px; background: #232b3d; border-radius: 99px; overflow: hidden; }
.rpm-bar > div { height: 100%; transition: width .8s ease, background .4s; }
.rp-node-hit rect { animation: nodeHit 1.2s ease-in-out infinite; }
@keyframes nodeHit { 50% { stroke-opacity: .35; } }
.replay #rpResult .impact { margin-top: 12px; color: var(--text); }
.replay #rpResult .small, .replay #rpResult .feedback { color: var(--text); }
.replay #rpResult .small { color: #b8c4da; }
/* ステージ3②の監視ログ（明るい背景のカード内） */
.card .replay-grid > .replay-side { background: #141a28; border-radius: 8px; padding: 10px; }
@media (prefers-reduced-motion: reduce) { .rc-dot, .rp-node-hit rect, .rl-row { animation: none; } }

/* ---------- 中継型フィッシングの自動再生 ---------- */
.relay2 { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: #fafbfd; }
.relay-stage { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); height: 110px; align-items: center; }
.actor { display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .2s; }
.actor-ic { width: 54px; height: 54px; border-radius: 14px; background: #fff; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-size: 1.7rem; transition: border-color .2s, box-shadow .2s; }
.actor-t { font-size: .8rem; font-weight: 700; color: var(--sub); }
.actor.on .actor-ic { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.actor.on .actor-t { color: var(--accent-ink); }
.relay-packet { position: absolute; top: 50%; transform: translate(-50%, -50%); background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; white-space: nowrap; box-shadow: 0 3px 10px rgba(44,94,201,.35); z-index: 2; }
.relay-packet.bad { background: var(--ng); box-shadow: 0 3px 10px rgba(184,58,50,.4); }
.relay-caption { min-height: 2.6em; font-size: .92rem; line-height: 1.5; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.relay-caption.bad { border-color: #e7c3c0; background: var(--attack-soft); color: var(--ng); font-weight: 600; }
.relay-track { display: flex; gap: 6px; margin-top: 8px; }
.rt-dot { width: 100%; height: 5px; border-radius: 99px; background: var(--accent); opacity: .3; }
.rt-dot.on { opacity: 1; }
.rt-dot.bad { background: var(--ng); }

/* ---------- 見た目の仕上げ（動き・表） ---------- */
/* 棒グラフの棒が下から伸びる（ステージ1・4のグラフ） */
#chart svg rect { transform-box: fill-box; transform-origin: center bottom; animation: growY .7s cubic-bezier(.2,.8,.3,1) both; }
#chart svg rect:nth-of-type(2) { animation-delay: .06s; } #chart svg rect:nth-of-type(3) { animation-delay: .12s; } #chart svg rect:nth-of-type(4) { animation-delay: .18s; }
#chart svg rect:nth-of-type(5) { animation-delay: .24s; } #chart svg rect:nth-of-type(6) { animation-delay: .30s; } #chart svg rect:nth-of-type(7) { animation-delay: .36s; }
#chart svg text { animation: fadein .5s .35s both; }
@keyframes growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
/* 横棒（導入の原因別・被害メーター）はすでに width で伸びる */
/* 章の中のカードを順にふわっと */
.chapter.in > div > .card, .chapter.in > div > details.deeper { animation: cardIn .45s ease both; }
.chapter.in > div > .card:nth-child(2) { animation-delay: .08s; } .chapter.in > div > .card:nth-child(3) { animation-delay: .16s; } .chapter.in > div > .card:nth-child(4) { animation-delay: .24s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* 値が変わったときの光り */
.flash { animation: flashBg .7s ease; }
@keyframes flashBg { 0% { background: #fff4bf; } 100% { background: #f7f8fa; } }
/* 表：しま模様と行の強調 */
.table-wrap tr:nth-child(even) td { background: #fafbfd; }
.table-wrap tr:hover td { background: #f1f5fc; }
.table-wrap th { position: sticky; top: 0; z-index: 1; }
/* タイマーの残りを示すバー */
.timer-bar { height: 6px; background: var(--track); border-radius: 99px; overflow: hidden; margin: 6px 0 12px; }
.timer-bar > div { height: 100%; background: var(--accent); transition: width .1s linear, background .3s; }
.timer-bar > div.low { background: var(--ng); }
.timer.low { animation: timerPulse .6s ease-in-out infinite; }
@keyframes timerPulse { 50% { opacity: .45; } }
/* データの足あと：線が引かれる */
.fp-wrap line { stroke-dasharray: 400; stroke-dashoffset: 400; animation: fpDraw .8s ease forwards; }
.fp-wrap rect, .fp-wrap text { animation: fadein .5s ease both; }
@keyframes fpDraw { to { stroke-dashoffset: 0; } }
/* 共有範囲の同心円がふわっと広がる */
#rings circle { transform-box: fill-box; transform-origin: center; animation: ringIn .5s ease both; }
@keyframes ringIn { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
/* 被害の表示（ステージ3）が順に出る */
.impact-item { animation: cardIn .4s ease both; }
.impact-item:nth-child(2) { animation-delay: .12s; } .impact-item:nth-child(3) { animation-delay: .24s; }
/* 統計カードの数字 */
.stat-v span[data-count] { font-variant-numeric: tabular-nums; }
/* 問題カード（仕分け・CIA）の正解・不正解の反応 */
.sort-btns .btn.right { animation: popOk .35s ease; }
.sort-btns .btn.picked:not(.right) { animation: shake .35s ease; }
@keyframes popOk { 50% { transform: scale(1.05); } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.choice.correct { animation: popOk .35s ease; }
.choice.wrong { animation: shake .35s ease; }
@media (prefers-reduced-motion: reduce) {
  #chart svg rect, #chart svg text, .chapter.in > div > .card, .chapter.in > div > details.deeper, .flash, .timer.low, .fp-wrap line, .fp-wrap rect, .fp-wrap text, #rings circle, .impact-item, .sort-btns .btn, .choice { animation: none !important; }
  .fp-wrap line { stroke-dashoffset: 0; }
}

/* ---------- 段階ごとのページ（スライドで切り替わる） ---------- */
.step-view { animation: stepIn .35s ease both; }
@keyframes stepIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.chapter-rail a.cr { text-decoration: none; }
.cr.done .cr-n { color: var(--ok); font-weight: 700; }
.bb-steps { display: flex; gap: 6px; }
.bb-steps span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.bb-steps span.done { background: var(--ok); }
.bb-steps span.on { width: 26px; border-radius: 99px; background: var(--accent); }
@media (max-width: 560px) { .bb-steps { display: none; } }
/* スタート前は操作できない（ステージ4） */
.mailer { position: relative; }
.mailer.gated > :not(.start-gate) { filter: blur(2px); pointer-events: none; user-select: none; }
.start-gate { position: absolute; inset: 0; z-index: 3; display: grid; place-items: start center; padding-top: 40px; background: rgba(255,255,255,.6); border-radius: 8px; }
.sg-box { position: sticky; top: 150px; }
.sg-box { background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; padding: 20px 24px; text-align: center; box-shadow: 0 10px 30px rgba(20,30,50,.12); }
.sg-t { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) { .step-view { animation: none; } }
.step-inner > .card, .step-inner > details.deeper { animation: cardIn .45s ease both; }
.step-inner > .card:nth-child(2) { animation-delay: .08s; } .step-inner > .card:nth-child(3) { animation-delay: .16s; } .step-inner > .card:nth-child(4) { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .step-inner > .card, .step-inner > details.deeper { animation: none; } }
