@charset "UTF-8";
/* =========================================================
   SNIPER-JAPAN オンラインマニュアル 共通スタイル
   全製品のマニュアルで共用する（製品ごとの色は --accent だけ変える）
   ========================================================= */

:root {
    --navy: #0b1a30;
    --navy-2: #10233f;
    --navy-3: #1b3a63;
    --accent: #2f7bff;
    --accent-2: #19c3e6;
    --grad: linear-gradient(135deg, #2f7bff 0%, #19c3e6 100%);
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #eef2f8;
    --text: #18212f;
    --muted: #5e6b7e;
    --border: #dde3ec;
    --code-bg: #eef2f8;
    --pink: #ffd3dc;
    --ok: #12a46b;
    --warn: #e08a00;
    --danger: #e0344b;
    --shadow: 0 1px 2px rgba(16, 35, 63, .06), 0 8px 24px rgba(16, 35, 63, .08);
    --radius: 12px;
    --top-h: 60px;
    --side-w: 290px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0a1220;
        --surface: #101b2d;
        --surface-2: #16243a;
        --text: #e6ecf5;
        --muted: #93a1b5;
        --border: #22324b;
        --code-bg: #16243a;
        --pink: #5a2a37;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    }
}
:root[data-theme="dark"] {
    --bg: #0a1220;
    --surface: #101b2d;
    --surface-2: #16243a;
    --text: #e6ecf5;
    --muted: #93a1b5;
    --border: #22324b;
    --code-bg: #16243a;
    --pink: #5a2a37;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 16px); }
body {
    margin: 0;
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
    font-size: 15.5px;
    line-height: 1.85;
    color: var(--text);
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- 上の帯 ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    height: var(--top-h);
    display: flex; align-items: center; gap: 16px;
    padding: 0 20px;
    background: rgba(11, 26, 48, .92);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
}
.topbar::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: var(--grad); opacity: .9;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand small { display: block; font-size: 11px; font-weight: 500; letter-spacing: .12em; color: #9fb6d8; line-height: 1.2; }
.brand span { line-height: 1.2; }
.menu-btn {
    display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; border-radius: 8px;
}
.menu-btn:hover { background: rgba(255, 255, 255, .08); }
.search {
    position: relative; margin-left: auto; width: min(420px, 40vw);
}
.search input {
    width: 100%; height: 38px; padding: 0 70px 0 38px;
    border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .07); color: #fff; font: inherit; font-size: 14px;
}
.search input::placeholder { color: #8ea3c2; }
.search input:focus { outline: none; border-color: var(--accent-2); background: rgba(255, 255, 255, .12); }
.search svg { position: absolute; left: 12px; top: 11px; opacity: .7; }
.search kbd {
    position: absolute; right: 10px; top: 9px;
    font: 11px/18px ui-monospace, Consolas, monospace; padding: 0 6px;
    border: 1px solid rgba(255, 255, 255, .2); border-radius: 5px; color: #9fb6d8;
    background: transparent; box-shadow: none;
}
.search-results {
    position: absolute; top: 46px; left: 0; right: 0;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
    max-height: 60vh; overflow: auto; display: none; padding: 6px;
}
.search-results.open { display: block; }
.search-results a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); }
.search-results a:hover, .search-results a.sel { background: var(--surface-2); text-decoration: none; }
.search-results a b { display: block; font-size: 14px; }
.search-results a small { color: var(--muted); font-size: 12px; }
.search-results .none { padding: 12px; color: var(--muted); font-size: 14px; }
.icon-btn {
    background: none; border: 1px solid rgba(255, 255, 255, .14); color: #cfe0f7;
    width: 38px; height: 38px; border-radius: 10px; cursor: pointer; display: grid; place-items: center;
}
.icon-btn:hover { background: rgba(255, 255, 255, .08); }

/* ---------- 3段組 ---------- */
.layout {
    display: grid;
    grid-template-columns: var(--side-w) minmax(0, 1fr) 220px;
    max-width: 1480px; margin: 0 auto;
}
.sidebar {
    position: sticky; top: var(--top-h); align-self: start;
    height: calc(100vh - var(--top-h)); overflow-y: auto;
    padding: 22px 14px 40px 20px;
    border-right: 1px solid var(--border);
    scrollbar-width: thin;
}
.sidebar .chap { margin-bottom: 6px; }
.sidebar .chap > button {
    width: 100%; display: flex; align-items: center; gap: 10px;
    background: none; border: 0; padding: 8px 10px; border-radius: 8px;
    font: inherit; font-size: 13.5px; font-weight: 700; color: var(--text); cursor: pointer; text-align: left;
}
.sidebar .chap > button:hover { background: var(--surface-2); }
.sidebar .chap > button .no {
    flex: none; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
    font-size: 11px; color: #fff; background: var(--navy-3);
}
.sidebar .chap.open > button .no { background: var(--grad); }
.sidebar .chap > button .chev { margin-left: auto; transition: transform .2s; opacity: .5; }
.sidebar .chap.open > button .chev { transform: rotate(90deg); }
.sidebar ul { list-style: none; margin: 2px 0 8px; padding: 0 0 0 20px; display: none; border-left: 1px solid var(--border); margin-left: 21px; }
.sidebar .chap.open ul { display: block; }
.sidebar li a {
    display: block; padding: 5px 10px 5px 14px; font-size: 13.5px; color: var(--muted);
    border-radius: 0 8px 8px 0; margin-left: -1px; border-left: 2px solid transparent; line-height: 1.6;
}
.sidebar li a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.sidebar li a.current { color: var(--accent); border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); font-weight: 700; }
.sidebar li a.soon { opacity: .45; pointer-events: none; }
.sidebar li a.soon::after { content: "準備中"; white-space: nowrap; display: inline-block; line-height: 1.5; font-size: 10px; margin-left: 6px; padding: 0 5px; border: 1px solid var(--border); border-radius: 4px; }

main { padding: 34px 48px 80px; min-width: 0; }
.toc {
    position: sticky; top: var(--top-h); align-self: start;
    padding: 34px 20px 20px 0; font-size: 13px;
}
.toc h4 { margin: 0 0 10px; font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.toc a { display: block; padding: 4px 0 4px 12px; color: var(--muted); border-left: 2px solid var(--border); line-height: 1.5; }
.toc a.h3 { padding-left: 24px; }
.toc a.active { color: var(--accent); border-left-color: var(--accent); }
.toc a:hover { color: var(--text); text-decoration: none; }

/* ---------- 本文 ---------- */
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--muted); }
.crumbs span.sep { opacity: .5; }
.page-head { margin-bottom: 28px; }
.page-head .kicker {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; letter-spacing: .08em;
    color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent);
    padding: 3px 10px; border-radius: 99px; margin-bottom: 10px;
}
h1 { font-size: 30px; line-height: 1.35; margin: 0 0 12px; letter-spacing: .01em; }
.lead { font-size: 16.5px; color: var(--muted); margin: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
    font-size: 12px; padding: 3px 10px; border-radius: 99px;
    border: 1px solid var(--border); color: var(--muted); background: var(--surface);
}
h2 {
    font-size: 21px; margin: 48px 0 16px; padding-bottom: 10px;
    border-bottom: 1px solid var(--border); position: relative;
}
h2::before {
    content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 3px; border-radius: 3px; background: var(--grad);
}
h3 { font-size: 17px; margin: 30px 0 10px; }
p { margin: 0 0 14px; }
.btn-name {
    display: inline-block; font-size: .9em; font-weight: 700; padding: 0 8px; margin: 0 2px;
    border-radius: 6px; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 1px 0 var(--border);
    white-space: nowrap;
}
.tab-name { font-weight: 700; color: var(--accent); }
kbd {
    font: 12px ui-monospace, Consolas, monospace; padding: 1px 6px; border-radius: 5px;
    border: 1px solid var(--border); background: var(--surface); box-shadow: 0 1px 0 var(--border);
}

/* 画面写真＋番号 */
.shot {
    margin: 18px 0 8px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.shot-bar {
    display: flex; align-items: center; gap: 7px; padding: 9px 14px;
    background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--muted);
}
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; display: inline-block; }
.shot-bar i:nth-child(2) { background: #febc2e; }
.shot-bar i:nth-child(3) { background: #28c840; margin-right: 6px; }
.shot-body { position: relative; }
.shot-body img { width: 100%; cursor: zoom-in; }
.pin {
    position: absolute; transform: translate(-50%, -50%);
    width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center;
    font-size: 14px; font-weight: 800; color: #fff;
    background: var(--danger); border: 2px solid #fff;
    box-shadow: 0 0 0 4px rgba(224, 52, 75, .25), 0 4px 10px rgba(0, 0, 0, .35);
    cursor: pointer; transition: transform .15s, box-shadow .15s;
    text-decoration: none !important;
}
.pin:hover, .pin.hl { transform: translate(-50%, -50%) scale(1.18); box-shadow: 0 0 0 8px rgba(224, 52, 75, .3), 0 4px 10px rgba(0, 0, 0, .35); }
.area {
    position: absolute; border: 3px solid var(--danger); border-radius: 6px;
    background: rgba(224, 52, 75, .06); pointer-events: none; opacity: .0; transition: opacity .2s;
}
.area.hl, .shot:hover .area { opacity: 1; }
.caption { font-size: 12.5px; color: var(--muted); text-align: center; margin: 6px 0 22px; }

.legend { list-style: none; padding: 0; margin: 18px 0 26px; display: grid; gap: 10px; }
.legend li {
    display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start;
    padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
.legend li.hl { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(224, 52, 75, .12); }
.legend .n {
    width: 28px; height: 28px; border-radius: 50%; background: var(--danger); color: #fff;
    display: grid; place-items: center; font-weight: 800; font-size: 13px; margin-top: 2px;
}
.legend li > div > b { display: block; font-size: 15px; margin-bottom: 2px; }
.legend p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* 手順 */
.steps { counter-reset: st; list-style: none; padding: 0; margin: 18px 0 26px; }
.steps > li {
    counter-increment: st; position: relative; padding: 0 0 22px 52px; margin: 0;
}
.steps > li::before {
    content: counter(st); position: absolute; left: 0; top: 0;
    width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: #fff;
    display: grid; place-items: center; font-weight: 800;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 35%, transparent);
}
.steps > li::after {
    content: ""; position: absolute; left: 16px; top: 40px; bottom: 4px; width: 2px; background: var(--border);
}
.steps > li:last-child::after { display: none; }
.steps > li > b { display: block; font-size: 15.5px; margin-bottom: 2px; padding-top: 4px; }
.steps > li p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* 囲み */
.note {
    display: grid; grid-template-columns: 26px 1fr; gap: 12px;
    padding: 14px 18px; margin: 18px 0; border-radius: var(--radius);
    border: 1px solid; font-size: 14.5px;
}
.note p:last-child { margin: 0; }
.note b.t { display: block; margin-bottom: 2px; }
.note.point { border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.note.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.note.ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 7%, var(--surface)); }
.note svg { margin-top: 3px; }

/* 表 */
.tbl-wrap { overflow-x: auto; margin: 16px 0 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-size: 12.5px; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pinkcell { background: var(--pink); font-weight: 700; }
.graycell { background: #8a8f98; color: #fff; text-align: center; font-weight: 700; }

/* 数式 */
.formula {
    margin: 16px 0 20px; padding: 18px 22px; border-radius: var(--radius);
    background: linear-gradient(135deg, var(--navy-2), var(--navy-3)); color: #fff;
    font-size: 17px; text-align: center; letter-spacing: .02em; box-shadow: var(--shadow);
}
.formula small { display: block; font-size: 12.5px; color: #a9bfdf; margin-top: 6px; letter-spacing: 0; }

/* カード（トップの章一覧・関連項目） */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 18px 0 28px; }
.card {
    display: block; padding: 18px 18px 16px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); color: var(--text);
    transition: transform .15s, box-shadow .15s, border-color .15s; position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); text-decoration: none; }
.card .ic {
    width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
    background: var(--grad); color: #fff; margin-bottom: 12px; font-weight: 800;
}
.card b { display: block; font-size: 15.5px; margin-bottom: 4px; }
.card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.card .cnt { position: absolute; right: 14px; top: 14px; font-size: 11px; color: var(--muted); }

/* 前後ページ */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 50px; }
.pager a {
    display: block; padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--surface); color: var(--text);
}
.pager a:hover { border-color: var(--accent); text-decoration: none; }
.pager small { display: block; color: var(--muted); font-size: 12px; }
.pager b { font-size: 15px; }
.pager .next { text-align: right; grid-column: 2; }

.page-foot {
    margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--border);
    display: flex; flex-wrap: wrap; gap: 10px 18px; justify-content: space-between; font-size: 12.5px; color: var(--muted);
}

/* トップのヒーロー */
.hero {
    position: relative; overflow: hidden; border-radius: 18px; margin-bottom: 30px;
    padding: 42px 40px; color: #fff;
    background:
        radial-gradient(1000px 300px at 100% 0%, rgba(25, 195, 230, .35), transparent 60%),
        radial-gradient(700px 300px at 0% 100%, rgba(47, 123, 255, .45), transparent 60%),
        linear-gradient(135deg, #0b1a30, #13305a);
    box-shadow: var(--shadow);
}
.hero::after {
    content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 32px 32px; mask-image: linear-gradient(90deg, transparent, #000 60%);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); pointer-events: none;
}
.hero h1 { font-size: 34px; margin-bottom: 10px; position: relative; z-index: 1; }
.hero p { color: #c4d4ec; max-width: 640px; position: relative; z-index: 1; margin: 0; }
.hero .hero-ver { position: relative; z-index: 1; margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero .hero-ver span { font-size: 12px; padding: 4px 12px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); }
.hero .hero-logo { position: absolute; right: 34px; top: 50%; transform: translateY(-50%); width: 140px; opacity: .95; z-index: 1; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .4)); border-radius: 26px; }

/* 拡大表示 */
.zoom {
    position: fixed; inset: 0; z-index: 100; background: rgba(5, 10, 20, .88);
    display: none; place-items: center; padding: 24px; cursor: zoom-out;
}
.zoom.open { display: grid; }
.zoom img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1240px) {
    .layout { grid-template-columns: var(--side-w) minmax(0, 1fr); }
    .toc { display: none; }
}
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .menu-btn { display: block; }
    .sidebar {
        position: fixed; left: 0; top: var(--top-h); bottom: 0; width: 300px; height: auto; z-index: 60;
        background: var(--surface); transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow);
    }
    body.nav-open .sidebar { transform: none; }
    main { padding: 24px 16px 60px; }
    .brand small { display: none; }
    .search { width: auto; flex: 1; }
    .search kbd { display: none; }
    .search input { padding-right: 12px; }
    .hero { padding: 28px 22px; }
    .hero h1 { font-size: 26px; }
    .hero .hero-logo { display: none; }
    h1 { font-size: 24px; }
    .pin { width: 22px; height: 22px; font-size: 11px; border-width: 1.5px; }
    .pager { grid-template-columns: 1fr; }
    .pager .next { grid-column: auto; }
}
@media print {
    .topbar, .sidebar, .toc, .pager { display: none !important; }
    .layout { display: block; }
    main { padding: 0; }
}
