:root {
  --bg: #070b14;
  --surface: #0f172a;
  --surface-2: #1e293b;
  --border: #293548;
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #10b981;
  --accent-hi: #34d399;
  --accent-soft: rgba(16, 185, 129, 0.14);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.14);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.14);
  --info: #38bdf8;
  --info-soft: rgba(56, 189, 248, 0.12);
  --radius: 14px;
  --jp: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", Meiryo, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
[lang="ja"] { font-family: var(--jp); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #052e16; padding: 8px 12px; border-radius: 8px; z-index: 99; font-weight: 800; }
.skip-link:focus { left: 8px; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }

.top-strip {
  background: linear-gradient(90deg, #0f172a 0%, #064e3b 100%);
  border-bottom: 1px solid rgba(16,185,129,0.35);
  color: #d1fae5; font-size: 0.76rem; text-align: center; padding: 7px 14px;
}
.top-strip strong { color: #fff; }

header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(7, 11, 20, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; justify-content: space-between; align-items: center; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.12rem; letter-spacing: -0.02em; }
.brand-mark { width: 24px; height: 24px; color: var(--accent); filter: drop-shadow(0 0 6px rgba(16,185,129,0.5)); }
.badge-year {
  font-size: 0.64rem; font-weight: 800; background: var(--accent-soft); color: var(--accent-hi);
  border: 1px solid rgba(16,185,129,0.35); padding: 2px 7px; border-radius: 999px;
}
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-link { font-size: 0.84rem; color: var(--muted); font-weight: 600; }
.nav-link:hover { color: var(--text); }

.pro-btn, .ghost-btn, .scan-btn, .pro-cta-lg, .mini-btn, .chip-btn { cursor: pointer; border-radius: 9px; font-weight: 800; transition: transform .12s, background .15s, border-color .15s; }
.pro-btn { background: var(--accent); color: #052e16; font-size: 0.84rem; border: none; padding: 9px 14px; white-space: nowrap; }
.pro-btn:hover { background: var(--accent-hi); transform: translateY(-1px); }
.ghost-btn { background: transparent; color: var(--soft); border: 1px solid var(--border); padding: 9px 14px; font-size: 0.84rem; }
.ghost-btn:hover { border-color: var(--accent); color: #fff; }
.mini-btn { background: var(--surface-2); border: 1px solid var(--border); color: var(--accent-hi); padding: 0 10px; font-size: 0.75rem; }
.link-btn { background: none; border: none; color: var(--accent-hi); text-decoration: underline; cursor: pointer; padding: 0; font-weight: 700; font-size: inherit; }

/* Hero */
.hero { padding: 34px 0 22px; text-align: center; }
.eyebrow { color: var(--accent-hi); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; margin-bottom: 10px; }
.hero h1 { font-size: clamp(1.75rem, 5vw, 2.85rem); font-weight: 900; line-height: 1.1; letter-spacing: -0.03em; max-width: 820px; margin: 0 auto 12px; }
.hero h1 span { color: var(--accent); }
.lede { color: var(--muted); font-size: 0.98rem; max-width: 680px; margin: 0 auto 20px; }
.hero-points { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 860px; margin: 0 auto; }
.hero-points > div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.hero-points strong { font-size: 0.92rem; }
.hero-points span { font-size: 0.72rem; color: var(--muted); }

/* Tabs */
.tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  background: var(--surface); border: 1px solid var(--border); padding: 6px; border-radius: 14px; margin-bottom: 20px;
  position: sticky; top: 64px; z-index: 20;
}
.tab-btn {
  background: transparent; color: var(--muted); border: 1px solid transparent; border-radius: 10px;
  padding: 10px 6px; font-weight: 700; font-size: 0.88rem; cursor: pointer; transition: all .15s;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.tab-btn b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); font-size: 0.7rem; margin-bottom: 2px; }
.tab-btn small { font-size: 0.68rem; font-weight: 500; opacity: 0.85; }
.tab-btn.active { background: var(--surface-2); color: var(--text); border-color: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,0.25); }
.tab-btn.active b { background: var(--accent); color: #052e16; }

.panel { display: none; }
.panel.active { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.two-col { display: grid; grid-template-columns: 1.04fr 0.96fr; gap: 18px; margin-bottom: 28px; align-items: start; }
.box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.results { position: sticky; top: 140px; }
.box-title { font-size: 1.04rem; font-weight: 800; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

.pill { font-size: 0.7rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.pill-live { background: var(--accent-soft); color: var(--accent-hi); border: 1px solid rgba(16,185,129,0.35); }
.pill-warn { background: var(--warn-soft); color: #fcd34d; border: 1px solid rgba(245,158,11,0.4); }
.pill-bad { background: var(--danger-soft); color: #fca5a5; border: 1px solid rgba(239,68,68,0.45); }

fieldset { border: none; border-top: 1px solid var(--border); padding-top: 12px; margin-bottom: 6px; }
fieldset:first-of-type { border-top: none; padding-top: 0; }
legend { font-size: 0.72rem; font-weight: 800; color: var(--accent-hi); text-transform: uppercase; letter-spacing: 0.06em; padding-right: 8px; margin-bottom: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.field { margin-bottom: 12px; min-width: 0; }
.full { grid-column: 1 / -1; }
.field label { display: block; font-size: 0.76rem; font-weight: 700; color: var(--soft); margin-bottom: 5px; }
.field input, .field select, .field textarea, .save-row input {
  width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 10px 11px; font-size: 16px; outline: none; min-height: 42px;
}
.field textarea { line-height: 1.6; resize: vertical; font-family: var(--jp); }
.field input:focus, .field select:focus, .field textarea:focus, .save-row input:focus { border-color: var(--accent); }
.input-row { display: flex; gap: 6px; }
.input-row input { flex: 1; }
.hint { font-size: 0.7rem; color: var(--muted); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--soft); margin-bottom: 12px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.dest-note { font-size: 0.74rem; color: #a5b4c8; background: var(--info-soft); border: 1px solid rgba(56,189,248,0.25); border-radius: 9px; padding: 9px 11px; margin-bottom: 12px; }

.vol-box { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.vol-box summary { cursor: pointer; font-size: 0.8rem; font-weight: 700; color: var(--soft); }
.vol-box[open] summary { margin-bottom: 10px; }
.vol-result { font-size: 0.78rem; color: #7dd3fc; line-height: 1.6; }

/* Results */
.max-bid-card {
  background: linear-gradient(135deg, rgba(56,189,248,0.16), rgba(15,23,42,0.9));
  border: 1px solid rgba(56,189,248,0.45); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px;
}
.max-bid-main strong { color: #e0f2fe; font-size: 2rem; font-weight: 900; letter-spacing: -0.02em; }
.hero-kpi {
  background: linear-gradient(135deg, rgba(16,185,129,0.16) 0%, rgba(15,23,42,0.95) 100%);
  border: 1px solid rgba(16,185,129,0.45); border-radius: 12px; padding: 16px; margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 10px;
}
.hero-kpi.loss { background: linear-gradient(135deg, rgba(239,68,68,0.18) 0%, rgba(15,23,42,0.95) 100%); border-color: rgba(239,68,68,0.5); }
.kpi-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.kpi-big { font-size: 1.85rem; font-weight: 900; line-height: 1.15; }
.kpi-sub { font-size: 0.76rem; color: var(--soft); margin-top: 3px; }
.kpi-right { text-align: right; }
.kpi-mid { font-size: 1.3rem; font-weight: 800; }
.muted-inline { color: var(--muted); font-weight: 500; font-size: 0.82rem; }
.text-warn { color: #fbbf24; }
.text-accent { color: var(--accent-hi); }
.text-danger { color: #f87171; }

.breakdown-list { list-style: none; margin-bottom: 16px; }
.breakdown-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 0.84rem; }
.breakdown-list li span:first-child { color: var(--muted); }
.breakdown-list li.total { border-bottom: 1px dashed var(--border); border-top: 1px solid var(--border); margin-top: 4px; padding-top: 10px; font-weight: 800; font-size: 0.94rem; }
.breakdown-list li.total span:first-child { color: var(--text); }
.rule-note { display: block; font-size: 0.68rem; color: #64748b; }

.table-title { font-size: 0.78rem; font-weight: 800; color: var(--soft); margin: 14px 0 6px; }
.sens-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sens-cell { background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 7px 4px; text-align: center; display: flex; flex-direction: column; }
.sens-cell span { font-size: 0.64rem; color: var(--muted); }
.sens-cell strong { font-size: 0.8rem; }
.sens-cell.now { border-color: var(--accent); }

.table-scroll { overflow-x: auto; }
.proxy-table { width: 100%; border-collapse: collapse; font-size: 0.81rem; }
.proxy-table th, .proxy-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.proxy-table th { color: var(--muted); font-weight: 700; font-size: 0.68rem; text-transform: uppercase; }
.best-row { background: rgba(16,185,129,0.09); }
.sel-row td:first-child { box-shadow: inset 3px 0 0 var(--info); }
.best-badge { background: var(--accent); color: #052e16; font-size: 0.6rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; margin-left: 6px; }
.proxy-table .link-btn { color: var(--text); text-decoration: none; }
.save-row { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.save-row input { flex: 1 1 180px; width: auto; }

/* Scanner */
.intro-p { font-size: 0.84rem; color: var(--muted); margin-bottom: 12px; }
.intro-p em { font-style: normal; color: var(--soft); font-family: var(--jp); }
.sample-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip-btn { background: var(--surface-2); border: 1px solid var(--border); color: #e2e8f0; font-size: 0.76rem; font-weight: 600; padding: 7px 11px; }
.chip-btn:hover { border-color: var(--accent); color: #fff; }
.btn-row { display: flex; gap: 8px; margin: 6px 0 10px; flex-wrap: wrap; }
.scan-btn {
  flex: 1; background: var(--accent); color: #052e16; font-size: 0.95rem; border: none;
  padding: 12px; display: block; text-align: center;
}
.scan-btn:hover { background: var(--accent-hi); }
.scan-btn.disabled { background: var(--surface-2); color: var(--muted); cursor: default; }

.risk-meter { padding: 16px; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 14px; background: var(--bg); }
.risk-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.risk-score { font-size: 1.9rem; font-weight: 900; }
.meter { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 10px 0 8px; }
.meter-fill { height: 100%; width: 0; border-radius: 99px; transition: width .4s ease; border: none !important; }
.meter-fill.sev-critical { background: var(--danger); }
.meter-fill.sev-high { background: var(--warn); }
.meter-fill.sev-caution { background: var(--info); }
.meter-fill.sev-green { background: var(--accent); }
.risk-advice { font-size: 0.8rem; color: var(--soft); }
.risk-badge { padding: 5px 11px; border-radius: 999px; font-weight: 800; font-size: 0.74rem; text-transform: uppercase; white-space: nowrap; }
.sev-critical { background: var(--danger-soft); color: #fca5a5; border: 1px solid rgba(239,68,68,0.45); }
.sev-high { background: var(--warn-soft); color: #fcd34d; border: 1px solid rgba(245,158,11,0.45); }
.sev-caution { background: var(--info-soft); color: #7dd3fc; border: 1px solid rgba(56,189,248,0.4); }
.sev-info { background: var(--surface-2); color: var(--soft); border: 1px solid var(--border); }
.sev-green { background: var(--accent-soft); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.4); }
.sev-cleared { background: transparent; color: #6ee7b7; border: 1px dashed rgba(16,185,129,0.45); }

.hl-box { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px; font-size: 0.86rem; line-height: 1.9; white-space: pre-wrap; word-break: break-word; margin-bottom: 14px; max-height: 260px; overflow-y: auto; }
mark { border-radius: 4px; padding: 1px 2px; color: #fff; }
mark.hl-critical { background: rgba(239,68,68,0.45); }
mark.hl-high { background: rgba(245,158,11,0.45); }
mark.hl-caution { background: rgba(56,189,248,0.32); }
mark.hl-info { background: rgba(148,163,184,0.3); }
mark.hl-good { background: rgba(16,185,129,0.4); }
mark.hl-cleared { background: transparent; color: #6ee7b7; text-decoration: underline dotted; }

.ask-box { border: 1px solid rgba(16,185,129,0.45); background: rgba(16,185,129,0.06); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.ask-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.9rem; }
.ask-jp, .ask-en { white-space: pre-wrap; word-break: break-word; background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 11px; font-size: 0.84rem; line-height: 1.75; margin-top: 8px; }
.ask-en { font-family: inherit; color: var(--soft); }
.ask-box details summary { cursor: pointer; font-size: 0.78rem; color: var(--muted); margin-top: 8px; }

.flag-item { border-radius: 10px; padding: 12px; margin-bottom: 10px; font-size: 0.83rem; }
.flag-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 800; flex-wrap: wrap; font-family: var(--jp); }
.flag-tag { font-size: 0.68rem; font-weight: 700; opacity: 0.85; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif; }
.flag-found { margin-bottom: 6px; }
.jp-term { font-size: 0.84rem; background: rgba(0,0,0,0.35); padding: 2px 7px; border-radius: 6px; font-family: var(--jp); }
.flag-compare, .flag-real, .flag-act { font-size: 0.79rem; color: #e2e8f0; margin-top: 4px; }
.muted-label { display: inline-block; min-width: 92px; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.75; font-weight: 800; }
.sub-head { font-size: 0.76rem; font-weight: 800; color: var(--accent-hi); margin: 16px 0 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.empty-state { color: var(--muted); font-size: 0.85rem; padding: 18px; border: 1px dashed var(--border); border-radius: 10px; text-align: center; }

/* Sniper */
.mod-label { display: block; font-size: 0.76rem; font-weight: 700; color: var(--soft); margin: 4px 0 8px; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.mod-card { background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 9px 10px; cursor: pointer; font-size: 0.8rem; transition: all .12s; text-align: left; color: var(--text); }
.mod-card strong { display: block; font-size: 0.82rem; }
.mod-card span { color: var(--muted); font-size: 0.7rem; font-family: var(--jp); }
.mod-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.mod-card.excl.selected { border-color: var(--danger); background: var(--danger-soft); }
.query-output { background: var(--bg); border: 1px solid var(--accent); border-radius: 12px; padding: 14px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.query-string { font-size: 1.12rem; font-weight: 800; color: var(--accent-hi); word-break: break-all; }
.market-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.market-btn { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); padding: 12px 14px; border-radius: 10px; font-weight: 700; font-size: 0.85rem; transition: border-color .15s, transform .12s; }
.market-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.market-btn.sold { border-style: dashed; }
.market-btn em { font-style: normal; color: var(--accent-hi); }

/* Log */
.log-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.stat { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; }
.stat span { font-size: 0.7rem; color: var(--muted); }
.stat strong { font-size: 1.1rem; }
.log-item { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); }
.log-main { display: flex; flex-direction: column; min-width: 0; }
.log-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-num { font-weight: 800; }
.log-actions { display: flex; gap: 6px; }

/* FAQ */
.faq { margin: 8px 0 10px; }
.faq h2 { font-size: 1.3rem; margin-bottom: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 0.92rem; }
.faq p { color: var(--soft); font-size: 0.86rem; margin-top: 8px; }

.pro-banner { background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%); border: 1px solid rgba(16,185,129,0.45); border-radius: 16px; padding: 24px 22px; margin: 26px 0; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.pro-banner h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: 6px; }
.pro-banner p { color: var(--soft); font-size: 0.86rem; max-width: 640px; }
.pro-cta-lg { background: var(--accent); color: #052e16; font-weight: 900; padding: 13px 22px; border: none; font-size: 0.94rem; white-space: nowrap; }

footer { border-top: 1px solid var(--border); padding: 26px 0 42px; color: var(--muted); font-size: 0.76rem; }
.disclaimer { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; line-height: 1.6; }
.footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a, .underline-link { color: var(--soft); text-decoration: underline; }
.footer-links a:hover { color: var(--accent); }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.78); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 60; }
.modal-bg.open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; max-width: 500px; width: 100%; padding: 24px; position: relative; }
.modal-close { position: absolute; top: 14px; right: 14px; background: var(--surface-2); border: none; color: var(--text); width: 34px; height: 34px; border-radius: 8px; font-size: 1.1rem; cursor: pointer; }
.modal h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 8px; padding-right: 36px; }
.modal ul { margin: 12px 0 18px 18px; color: var(--soft); font-size: 0.86rem; }
.modal ul li { margin-bottom: 6px; }
.modal-note { font-size: 0.74rem; color: var(--muted); text-align: center; margin-top: 10px; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); background: #f8fafc; color: #0f172a; font-weight: 700; font-size: 0.85rem; padding: 10px 16px; border-radius: 10px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 80; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Legal & glossary pages */
.legal-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 30px; margin: 28px 0 44px; }
.legal-card h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; line-height: 1.2; }
.legal-card .updated { font-size: 0.82rem; color: var(--muted); margin-bottom: 22px; }
.legal-card h2 { font-size: 1.12rem; font-weight: 700; margin: 24px 0 8px; }
.legal-card p, .legal-card li { font-size: 0.9rem; color: var(--soft); margin-bottom: 8px; }
.legal-card ul { margin-left: 20px; margin-bottom: 12px; }
.legal-card a { color: var(--accent-hi); text-decoration: underline; }
.back-link { display: inline-block; margin-top: 20px; color: var(--accent) !important; font-weight: 700; font-size: 0.88rem; text-decoration: none !important; }
.gl-cat { margin-top: 28px; }
.gl-item { border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; background: var(--bg); }
.gl-item h3 { font-family: var(--jp); font-size: 1.05rem; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.gl-item p { margin-bottom: 4px; font-size: 0.86rem; }
.gl-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.gl-toc a { font-size: 0.78rem; text-decoration: none; background: var(--surface-2); border: 1px solid var(--border); padding: 5px 10px; border-radius: 8px; color: var(--soft); }

.mobile-bar { display: none; }
@media (max-width: 860px) {
  .mobile-bar {
    position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40;
    display: none; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: center; text-align: left;
    background: rgba(15,23,42,0.96); border: 1px solid var(--accent); border-radius: 14px; padding: 10px 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.5); cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  body.on-calc:not(.results-visible) .mobile-bar { display: grid; }
  .mobile-bar small { display: block; font-size: 0.62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
  .mobile-bar strong { font-size: 1.05rem; color: #e0f2fe; }
  .mb-go { font-size: 0.76rem; font-weight: 800; color: #052e16; background: var(--accent); padding: 7px 10px; border-radius: 8px; }
  footer { padding-bottom: 90px; }
  .two-col { grid-template-columns: 1fr; }
  .results { position: static; }
  .hero-points { grid-template-columns: repeat(2, 1fr); }
  .hide-sm { display: none; }
}
@media (max-width: 560px) {
  .hero { padding-top: 24px; }
  .tabs { grid-template-columns: repeat(4, 1fr); top: 60px; padding: 4px; gap: 4px; }
  .tab-btn { font-size: 0.72rem; padding: 7px 2px; }
  .tab-btn small { display: none; }
  .box { padding: 16px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .sens-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .sens-cell strong { font-size: 0.68rem; }
  .kpi-right { text-align: left; }
  .legal-card { padding: 20px; }
  .log-item { grid-template-columns: 1fr auto; }
  .log-actions { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
#scanResults, .results, .tabs { scroll-margin-top: 130px; }
.top-strip.stale { background: linear-gradient(90deg,#451a03,#78350f); color: #fde68a; border-bottom-color: rgba(245,158,11,.5); }
.crumbs { font-size: 0.78rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted) !important; text-decoration: none !important; }
.phrase h1 { font-family: var(--jp); font-size: clamp(2rem, 7vw, 3rem); margin-bottom: 10px; }
.phrase .risk-badge { display: inline-block; margin-bottom: 6px; }
.lead-p { font-size: 1.05rem !important; color: var(--text) !important; font-weight: 600; }
.ask-jp { font-family: var(--jp); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px; color: var(--text) !important; }
.cta-box { border: 1px solid rgba(16,185,129,.45); background: rgba(16,185,129,.07); border-radius: 14px; padding: 18px; margin: 24px 0 8px; }
.cta-box p { margin: 6px 0 14px; }
.cta-box .scan-btn { color: #052e16 !important; text-decoration: none !important; display: inline-block; padding: 12px 18px; }
.gl-item h3 a { color: var(--text) !important; text-decoration: none !important; border-bottom: 1px dashed var(--muted); }
