:root {
  --bg: #FFFFFF; --surface: #FFFFFF; --card: #FFFFFF; --panel: #F6F8FD; --ice: #CADCFC; --ice-lt: #EEF3FF;
  --ink: #24263B; --head: #1E2761; --muted: #5B6172; --line: #E2E7F0; --dash: #8A90A2;
  --navy: #1E2761; --navy-dark: #10142E; --on-navy: #FFFFFF;
  --teal: #17B0B4; --fill: #0E8286; --on-fill: #FFFFFF; --teal-soft: #DDF4F4; --glow: rgba(23, 176, 180, .35);
  --ok: #0B7A4B; --bad: #C0392B; --bad-soft: #FDECEA;
  --shadow: 0 10px 30px rgba(30, 39, 97, .10); --shadow-lg: 0 20px 50px rgba(16, 20, 46, .18);
  --body: 'Noto Sans JP', system-ui, 'Hiragino Sans', 'Yu Gothic', sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Noto Sans JP', monospace;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-weight: 400; font-size: 16px; line-height: 1.75; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
h1, h2, h3, p, ul, ol { margin: 0; }
h1, h2, h3 { word-break: auto-phrase; }
ul { padding: 0; list-style: none; }
.mono { font-family: var(--mono); }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px; }

/* ===== シリーズのバー（1段・固定しない） ===== */
.bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 19px; color: var(--head); text-decoration: none; }
.logo { width: 26px; height: 26px; border-radius: 50%; border: 5px solid var(--teal); flex: none; }
.nav { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 300px; font-size: 13px; font-weight: 500; }
.nav span, .nav a { padding: 5px 14px; border-radius: 999px; text-decoration: none; }
.nav a.go { border: 1.5px solid var(--line); color: var(--head); font-weight: 700; }
.nav a.go:hover { border-color: var(--teal); }
.nav .on { background: var(--navy); color: var(--on-navy); font-weight: 700; }
.nav .off { border: 1.5px dashed var(--line); color: var(--muted); }
.bar .jump { color: var(--fill); font-weight: 700; font-size: 14px; text-decoration: none; }

main.wrap { padding-block: 28px 64px; display: flex; flex-direction: column; gap: 28px; }
.hero { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: flex-end; justify-content: space-between; background: var(--navy); color: var(--on-navy); border-radius: 16px; padding: clamp(24px, 4vw, 44px); }
.hero > div:first-child { flex: 999 1 480px; min-width: 0; }
.hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; padding: 4px 14px; margin-bottom: 14px; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
h1 { font-weight: 900; font-size: clamp(32px, 5.6vw, 58px); line-height: 1.28; letter-spacing: -.01em; text-wrap: balance; }
.lead { margin-top: 10px; font-size: clamp(15px, 1.9vw, 18px); font-weight: 500; color: #CADCFC; }
.howto { margin-top: 14px; font-size: 14px; color: #CADCFC; display: flex; flex-direction: column; gap: 4px; }
.howto .demo-w { border-bottom: 2px dotted var(--teal); color: #fff; font-weight: 700; }
.rec-btn { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; font-size: 13px; font-weight: 700; }

.map-scroll { overflow-x: auto; padding-bottom: 8px; }
.map { position: relative; min-width: 900px; padding: 84px 0 18px; }
.zone { position: absolute; top: 66px; bottom: 0; border-radius: 16px; }
.zone.home { left: 0.6%; width: 13%; border: 1.5px dashed var(--dash); }
.zone.srv { left: 43.4%; right: 0.4%; background: var(--ice-lt); }
.zone-label { position: absolute; top: 54px; font-size: 12px; font-weight: 700; background: var(--navy); color: var(--on-navy); border-radius: 999px; padding: 2px 12px; line-height: 20px; white-space: nowrap; z-index: 1; }
.packet { position: absolute; top: 4px; transform: translateX(-50%); transition: left .7s cubic-bezier(.5,0,.2,1); background: var(--fill); color: var(--on-fill); font-family: var(--mono); font-weight: 700; font-size: 13px; padding: 5px 14px; border-radius: 999px; white-space: nowrap; z-index: 3; box-shadow: 0 8px 20px var(--glow); }
.packet[hidden] { display: none; }
.packet.bad { background: var(--bad); color: #fff; box-shadow: none; }
.stations { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding-top: 6px; }
.st { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 0 4px; }
.st .dot { width: 88px; height: 66px; border-radius: 16px; background: var(--card); border: 1.5px solid var(--line); color: var(--head); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); transition: background .3s, border-color .3s; }
.st.on .dot { background: var(--teal-soft); border: 2.5px solid var(--teal); }
.st.on.bad .dot { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.flow-map .st:not(:last-child)::before { content: ""; position: absolute; right: -6px; top: 31.5px; width: 26px; height: 3px; background: var(--teal); z-index: 2; }
.flow-map .st:not(:last-child)::after { content: ""; position: absolute; right: -18px; top: 25px; border-block: 8px solid transparent; border-left: 12px solid var(--teal); z-index: 2; }
.ico { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.st .code { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .06em; line-height: 1.3; color: var(--muted); }
.st .jp { font-weight: 700; font-size: 14px; line-height: 1.3; color: var(--head); }
.scroll-hint { display: none; font-size: 12px; color: var(--muted); text-align: right; }
@media (max-width: 940px) { .scroll-hint { display: block; } }

.chapters { position: relative; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--card); color: var(--muted); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.chip .mono { font-size: 12px; }
.chip[aria-pressed="true"] { background: var(--fill); border-color: var(--fill); color: var(--on-fill); }

.alert { display: flex; gap: 12px; background: var(--bad-soft); color: var(--bad); border-radius: 16px; padding: 14px 18px; font-weight: 700; }
.alert .ico { flex: none; width: 24px; height: 24px; margin-top: 3px; stroke-width: 2.2; }

/* ===== むずかしい言葉（タップで意味と語源） ===== */
.w { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; line-height: inherit; letter-spacing: inherit; text-align: inherit; cursor: help; border-bottom: 2px dotted var(--teal); border-radius: 0; }
.w:hover, .w[aria-expanded="true"] { background: var(--teal-soft); }
.st .w.code { color: var(--muted); }
.pop { position: absolute; z-index: 60; width: min(360px, calc(100vw - 32px)); background: var(--card); border: 1.5px solid var(--teal); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; line-height: 1.7; }
.pop[hidden] { display: none; }
.pop .ph b { font-size: 18px; font-weight: 900; color: var(--head); margin-right: 8px; }
.pop .ph span { font-size: 12.5px; color: var(--muted); }
.pop .po { font-weight: 700; color: var(--head); }
.pop .pe { background: var(--ice-lt); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; }
.pop .pe span, .ety-box .k, .term-card .ety small { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; color: var(--fill); margin-right: 6px; }
.pop .pl { align-self: flex-start; background: none; border: 0; padding: 0; color: var(--fill); font-weight: 700; font-size: 13.5px; }

.slide { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); display: flex; flex-wrap: wrap; overflow: hidden; scroll-margin-top: 16px; }
.words { flex: 1 1 400px; min-width: 0; padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 16px; }
.count { font-size: 13px; font-weight: 700; color: var(--fill); letter-spacing: .08em; }
h2 { font-weight: 900; font-size: clamp(28px, 4vw, 40px); line-height: 1.3; color: var(--head); text-wrap: balance; }
.reading { font-size: 14px; color: var(--muted); margin-top: 2px; }
.tag { align-self: flex-start; font-size: 13px; font-weight: 700; background: var(--ice-lt); color: var(--head); border-radius: 999px; padding: 3px 14px; }
.ety-box { border: 1.5px dashed var(--ice); border-radius: 14px; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.ety-parts { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.ety-parts span { background: var(--ice-lt); border-radius: 10px; padding: 4px 12px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.ety-parts span.plus { background: none; padding: 0; }
.ety-parts b { display: block; font-family: var(--mono); font-size: 15px; color: var(--head); }
.ety-box p { font-size: 14.5px; font-weight: 700; color: var(--head); }
.analogy { background: var(--ice-lt); color: var(--head); border-radius: 16px; padding: 14px 18px; font-weight: 900; font-size: 19px; line-height: 1.6; }
.points { display: flex; flex-direction: column; gap: 10px; }
.points li { display: flex; gap: 12px; font-size: 16.5px; font-weight: 700; line-height: 1.65; }
.points li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); margin-top: 9px; }
.biz { border-left: 4px solid var(--teal); background: var(--panel); border-radius: 0 12px 12px 0; padding: 10px 16px; font-size: 14.5px; }
.biz b { display: block; font-size: 12px; color: var(--fill); letter-spacing: .06em; }
.deep { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; font-size: 15px; }
.deep summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--fill); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.deep summary::-webkit-details-marker { display: none; }
.deep summary::after { content: "＋"; flex: none; }
.deep[open] summary::after { content: "－"; }
.deep ul { list-style: disc; padding-left: 20px; margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.deep p { margin-top: 10px; font-size: 14px; }
.deep p.note { color: var(--muted); font-size: 13px; }
.video summary { cursor: pointer; font-weight: 700; color: var(--fill); }
.video .vf { margin-top: 10px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; }
.used { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.used button { min-height: 44px; padding: 0 14px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--card); color: var(--head); font-size: 14px; font-weight: 700; }
.pager { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.btn { min-height: 48px; padding: 0 26px; border-radius: 999px; border: 1.5px solid var(--fill); background: var(--fill); color: var(--on-fill); font-weight: 700; font-size: 15px; box-shadow: 0 8px 20px var(--glow); }
.btn.ghost { background: var(--card); border-color: var(--line); color: var(--head); box-shadow: none; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.dark { background: var(--navy); border-color: var(--navy); color: var(--on-navy); min-height: 44px; padding: 0 20px; font-size: 14px; box-shadow: none; }

.scene { flex: 1.2 1 440px; min-width: 0; background: var(--panel); border-left: 1px solid var(--line); padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.scene .k { font-size: 12px; font-weight: 700; color: var(--fill); letter-spacing: .08em; }
.box { background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 16px; font-weight: 700; color: var(--head); box-shadow: var(--shadow); }
.ends { display: flex; justify-content: space-between; gap: 12px; }
.msg { display: flex; align-items: center; transition: opacity .4s; }
.msg.wait { opacity: .25; }
.msg i { flex: 1; height: 3px; background: var(--teal); min-width: 10px; }
.msg b { flex: none; width: 0; height: 0; border-block: 8px solid transparent; }
.msg.r b.l, .msg.l b.r { visibility: hidden; }
.msg b.r { border-left: 12px solid var(--teal); }
.msg b.l { border-right: 12px solid var(--teal); }
.msg .say { background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 6px 14px; text-align: center; font-weight: 700; font-size: 14px; line-height: 1.45; margin-inline: 6px; }
.msg .say strong { font-family: var(--mono); font-size: 16px; display: block; color: var(--head); }
.msg .say small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); margin-bottom: 2px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.status { font-weight: 700; font-size: 15px; }
.status.ok { color: var(--ok); } .status.bad { color: var(--bad); }
.check { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; font-weight: 700; cursor: pointer; }
.check input { width: 22px; height: 22px; flex: none; accent-color: var(--teal); }
.trio { display: flex; flex-wrap: wrap; gap: 8px; }
.trio .box { flex: 1 1 130px; min-width: 0; padding: 10px 12px; }
.trio small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.trio code { font-family: var(--mono); font-size: 14px; font-weight: 700; word-break: break-all; color: var(--ink); }
.trio .spy { background: var(--ice-lt); border-style: dashed; border-color: var(--dash); box-shadow: none; }
.trio .spy.bad { background: var(--bad-soft); border-color: var(--bad); }
.trio .spy.bad code { color: var(--bad); }
.fw-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--muted); }
.fw { display: flex; align-items: center; gap: 8px; }
.fw .port { flex: none; width: 124px; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 5px 10px; line-height: 1.35; font-size: 12px; font-weight: 700; }
.fw .port strong { font-family: var(--mono); font-size: 15px; display: block; color: var(--head); }
.fw i { flex: 1; height: 3px; background: var(--teal); min-width: 8px; }
.fw i.cut { background: transparent; }
.fw label { flex: none; width: 62px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--navy); border: 2px solid var(--navy); cursor: pointer; }
.fw label.open { background: var(--card); border: 2px dashed var(--teal); }
.fw input { width: 24px; height: 24px; accent-color: var(--teal); }
.fw .res { flex: none; width: 52px; text-align: center; font-weight: 900; }
.lb { display: flex; align-items: center; gap: 10px; }
.lb .box.main { font-weight: 900; text-align: center; line-height: 1.4; padding: 14px 12px; }
.lb .arrow { flex: none; width: 34px; height: 16px; fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.lb .servers { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.lb .sv { display: flex; justify-content: space-between; gap: 8px; background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 8px 14px; font-weight: 700; color: var(--head); transition: border-color .25s, background .25s; }
.lb .sv.last { border-color: var(--teal); background: var(--teal-soft); }
.lb .sv.down { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.lb .sv span:last-child { font-family: var(--mono); font-size: 14px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick button { min-height: 44px; padding: 0 16px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--card); color: var(--muted); font-weight: 700; font-size: 14px; }
.pick button[aria-pressed="true"] { background: var(--fill); border-color: var(--fill); color: var(--on-fill); }
.http { background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.http small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.http code { font-family: var(--mono); font-weight: 700; font-size: 15px; }
.http .big { font-size: 22px; }
.http.ok { border-color: var(--ok); } .http.bad { border-color: var(--bad); }
.http.ok .big { color: var(--ok); } .http.bad .big { color: var(--bad); }
.yaku { display: block; margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.yaku::before { content: "訳："; font-weight: 700; color: var(--fill); }
.sql { background: var(--navy-dark); color: #FFFFFF; border-radius: 12px; padding: 10px 16px; font-family: var(--mono); font-size: 14px; font-weight: 700; word-break: break-word; }
.sql .yaku { color: #CADCFC; font-family: var(--body); font-weight: 500; }
.sql .yaku::before { color: var(--teal); }
.tbl { background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.tbl div { display: grid; grid-template-columns: var(--cols, 76px 1fr 112px); transition: opacity .25s, background .25s; }
.tbl div + div { border-top: 1px solid var(--line); }
.tbl span { padding: 7px 14px; }
.tbl span:last-child { text-align: right; }
.tbl .hd { font-family: var(--mono); font-size: 13px; background: var(--ice-lt); color: var(--head); }
.tbl .hd small { font-family: var(--body); font-weight: 500; color: var(--muted); }
.tbl .hit { background: var(--teal-soft); }
.tbl .miss { opacity: .35; }
.parts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 900; color: var(--head); }
.parts .box { padding: 6px 14px; line-height: 1.4; font-size: 12px; }
.parts .box strong { font-family: var(--mono); font-size: 15px; display: block; }
.browser { background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.browser .bar2 { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--ice-lt); font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--head); }
.browser .bar2 u { width: 10px; height: 10px; border-radius: 50%; background: var(--ice); }
.browser .page { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.browser .page strong { font-weight: 900; font-size: 20px; color: var(--head); }
.browser .page s { display: block; height: 10px; border-radius: 5px; background: var(--line); }

/* ===== まとめ・早見表 ===== */
.summary { display: flex; flex-direction: column; gap: 18px; }
.sec-head h2 { font-size: clamp(24px, 3.2vw, 32px); }
.sec-head p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.flow { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding: 0; list-style: none; counter-reset: f; }
.flow li { counter-increment: f; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 14px 56px; position: relative; box-shadow: var(--shadow); font-size: 14.5px; }
.flow li::before { content: counter(f, decimal-leading-zero); position: absolute; left: 16px; top: 14px; font-family: var(--mono); font-weight: 700; color: var(--fill); font-size: 15px; }
.flow li b { display: block; color: var(--head); font-size: 16px; }
.trouble { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 18px; }
.tr-list { display: flex; flex-direction: column; gap: 10px; }
.tr-list details { border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); }
.tr-list summary { cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--head); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.tr-list summary::-webkit-details-marker { display: none; }
.tr-list summary::after { content: "＋"; color: var(--fill); flex: none; }
.tr-list details[open] summary::after { content: "－"; }
.tr-list .ans { padding: 0 18px 16px; font-size: 15px; }
.tr-list .ans .where { display: inline-block; font-size: 12px; font-weight: 700; background: var(--teal-soft); color: var(--fill); border-radius: 999px; padding: 1px 12px; margin-bottom: 6px; }
.tr-list .ans button { margin-top: 8px; background: none; border: 0; padding: 0; color: var(--fill); font-weight: 700; text-decoration: underline; }

/* ===== 用語じてん ===== */
.gloss { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 16px; }
.gloss-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; }
.gloss h2 { font-size: clamp(24px, 3.2vw, 32px); }
.gloss-head p { font-size: 14px; color: var(--muted); }
.search { flex: 1 1 280px; max-width: 420px; }
.search label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); }
.search input { width: 100%; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-size: 16px; }
.tgroups { display: flex; flex-direction: column; gap: 12px; }
.tg { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tgl { flex: 0 0 150px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.terms { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 300px; }
.terms .chip { min-height: 40px; font-size: 13.5px; }
@media (max-width: 640px) { .tgl { flex-basis: 100%; } }
.term-card { display: flex; flex-wrap: wrap; gap: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 20px; scroll-margin-top: 16px; }
.term-card > div { min-width: 0; }
.term-card .a { flex: 1 1 380px; }
.term-card .b { flex: 1 1 260px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.term-card h3 { font-weight: 900; font-size: 28px; line-height: 1.3; display: inline; margin-right: 10px; color: var(--head); }
.term-card .one { font-weight: 700; font-size: 19px; margin-top: 8px; color: var(--head); }
.term-card .more { margin-top: 8px; max-width: 62ch; }
.term-card .ety { margin-top: 12px; background: var(--ice-lt); border-radius: 12px; padding: 10px 16px; max-width: 62ch; font-size: 15px; }
.key { background: var(--ice-lt); border-radius: 12px; padding: 10px 16px; width: 100%; }
.key small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.key code { font-family: var(--mono); font-weight: 700; font-size: 15px; color: var(--head); }
.disclaimer { font-size: 13px; color: var(--muted); text-align: center; }

.foot { border-top: 1px solid var(--line); padding: 24px 0 36px; font-size: 13px; color: var(--muted); }
.foot a { color: var(--fill); font-weight: 700; text-decoration: none; }

/* ===== 収録モード（YouTube用の画面録画向け） ===== */
#rec-exit { display: none; }
.rec .bar, .rec .hero, .rec .summary, .rec .trouble, .rec .gloss, .rec .foot, .rec .disclaimer, .rec .scroll-hint, .rec .pop .pl, .rec .used { display: none !important; }
.rec main.wrap { max-width: 1440px; padding-block: 24px; gap: 20px; }
.rec .points li { font-size: 19px; }
.rec .analogy { font-size: 22px; }
.rec #rec-exit { display: block; position: fixed; right: 12px; bottom: 12px; z-index: 70; opacity: .15; transition: opacity .2s; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 12px; font-weight: 700; color: var(--muted); }
.rec #rec-exit:hover, .rec #rec-exit:focus-visible { opacity: 1; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ===== 追加の部品（データベース編・データレイク編） ===== */
.duo { display: flex; flex-wrap: wrap; gap: 10px; }
.duo > div { flex: 1 1 180px; min-width: 0; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.duo small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.duo b { display: block; font-size: 15px; color: var(--head); line-height: 1.5; margin-top: 2px; }
.duo .ok { border-color: var(--ok); } .duo .ok b { color: var(--ok); }
.duo .bad { border-color: var(--bad); background: var(--bad-soft); } .duo .bad b { color: var(--bad); }
.codebox { background: var(--navy-dark); color: #fff; border-radius: 12px; padding: 10px 16px; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; margin: 0; }
.codebox mark { background: rgba(23, 176, 180, .35); color: #fff; border-radius: 4px; padding: 0 2px; }
.codebox .yaku { color: #CADCFC; font-family: var(--body); white-space: normal; }
.codebox .yaku::before { color: var(--teal); }
.tbl-wrap { overflow-x: auto; }
.tbl .ch { background: #FFF6D6; }
.tbl .tc { font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 14px 2px; }
.steps2 { display: flex; flex-direction: column; gap: 6px; }
.steps2 div { display: flex; justify-content: space-between; gap: 8px; background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; padding: 7px 12px; font-weight: 700; font-size: 14px; }
.steps2 .done { border-color: var(--ok); } .steps2 .fail { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.steps2 .undo { border-style: dashed; color: var(--muted); }
.acct { display: flex; gap: 10px; }
.acct .box { flex: 1; text-align: center; }
.acct .box strong { display: block; font-family: var(--mono); font-size: 20px; }
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter div { display: grid; grid-template-columns: 110px 1fr 70px; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.meter i { display: block; height: 14px; border-radius: 7px; background: var(--teal); min-width: 4px; transition: width .4s; }
.meter i.bad { background: var(--bad); }
.meter span:last-child { font-family: var(--mono); text-align: right; }
.stepper { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); font-size: 20px; font-weight: 700; color: var(--head); }
.stepper button:disabled { opacity: .4; cursor: default; }
.viz { width: 100%; height: auto; display: block; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; }
.viz text { font-family: var(--body); font-size: 12px; font-weight: 700; fill: var(--head); }
.viz .dim { opacity: .3; }
.qa { display: flex; flex-direction: column; gap: 6px; }
.qa > b { font-size: 14px; color: var(--head); }
.result { background: var(--teal-soft); border: 1.5px solid var(--teal); border-radius: 12px; padding: 12px 16px; }
.result b { display: block; font-size: 18px; color: var(--head); }
.result span { font-size: 14px; }
.files { display: flex; flex-direction: column; gap: 6px; }
.files div { display: flex; justify-content: space-between; gap: 8px; background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; padding: 7px 12px; font-size: 14px; font-weight: 700; }
.files .mono { color: var(--head); }
.files .ok { color: var(--ok); } .files .ng { color: var(--bad); }
.ctbl-wrap { overflow-x: auto; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); }
.ctbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 520px; }
.ctbl th, .ctbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.5; }
.ctbl thead th { background: var(--ice-lt); color: var(--head); font-size: 13px; white-space: nowrap; }
.ctbl tbody th { color: var(--head); white-space: nowrap; font-size: 13px; }
.ctbl tbody th small { white-space: normal; }
.ctbl td div + div { margin-top: 4px; }
.ctbl tr:last-child th, .ctbl tr:last-child td { border-bottom: 0; }
.ctbl.one { font-size: 15px; }
.kpi { display: flex; flex-wrap: wrap; gap: 10px; }
.kpi div { flex: 1 1 120px; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 14px; }
.kpi small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.kpi strong { font-family: var(--mono); font-size: 20px; color: var(--head); }
.mini-note { font-size: 12px; color: var(--muted); }
.slide.wide .words, .slide.wide .scene { flex-basis: 100%; }
.slide.wide .scene { border-left: 0; border-top: 1px solid var(--line); }

/* ===== RDBの製品（データベース編） ===== */
.prod { background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.prod-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.prod-head b { font-size: 20px; font-weight: 900; color: var(--head); }
.prod-head span { font-size: 13px; color: var(--muted); font-weight: 700; }
.spec { margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.spec div { display: grid; grid-template-columns: 84px 1fr; gap: 8px; }
.spec dt { font-size: 12px; font-weight: 700; color: var(--fill); padding-top: 2px; }
.spec dd { margin: 0; }

/* ===== スマホ：箱を画面の端まで広げ、入れ子の余白を詰める ===== */
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .wrap { padding-inline: 16px; }
  .bar .wrap { gap: 8px 12px; padding-block: 10px; }
  .bar .jump { margin-left: auto; font-size: 13px; }
  .nav { order: 3; flex: 0 0 auto; width: calc(100% + 32px); margin-inline: -16px; padding: 2px 16px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar, .chapters::-webkit-scrollbar { display: none; }
  .nav span, .nav a { flex: none; white-space: nowrap; }

  main.wrap { padding-block: 0 40px; gap: 20px; }
  .hero, .slide, .trouble, .gloss { margin-inline: -16px; border-radius: 0; border-inline: 0; box-shadow: none; }
  .hero { padding: 24px 16px 20px; gap: 16px; }
  .hero-side { width: 100%; align-items: stretch; }
  .rec-btn { display: none; }
  h1 { font-size: 32px; }

  .map-scroll { margin-inline: -16px; padding-inline: 16px; }
  .chapters { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 2px 16px; scrollbar-width: none; scroll-padding-inline: 16px; }
  .chip { flex: none; white-space: nowrap; }
  .terms .chip { flex: 0 1 auto; white-space: normal; }

  .words, .scene { flex-basis: 100%; padding: 20px 16px; gap: 14px; }
  .scene { border-left: 0; border-top: 1px solid var(--line); }
  h2 { font-size: 26px; }
  .ety-box, .biz, .deep { padding: 10px 12px; }
  .analogy { padding: 12px 14px; font-size: 17px; }
  .points li { font-size: 15.5px; }
  .pager .btn { flex: 1; padding: 0 12px; }
  .box, .prod, .http, .duo > div { padding-inline: 12px; }

  .trouble, .gloss { padding: 24px 16px; }
  .tr-list summary { padding: 12px 14px; }
  .tr-list .ans { padding: 0 14px 14px; }
  .term-card { padding: 16px; gap: 14px; }
  .term-card h3 { font-size: 24px; }
  .flow li { padding: 12px 14px 12px 48px; }
  .flow li::before { left: 14px; top: 12px; }
}

/* ===== IT全般編 ===== */
.series-link { align-self: flex-start; border: 1.5px solid var(--teal); border-radius: 999px; padding: 8px 18px; color: var(--fill); font-weight: 700; font-size: 14px; text-decoration: none; }
.series-link:hover { background: var(--teal-soft); }
.stack { display: flex; flex-direction: column; gap: 6px; }
.stack .box { text-align: center; }
.stack small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.stack .os { background: var(--navy); border-color: var(--navy); color: #fff; }
.stack .os small { color: #CADCFC; }
.gantt { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.gantt > div { display: grid; grid-template-columns: 128px 1fr; align-items: center; gap: 8px; }
.gantt b { display: block; position: relative; height: 14px; background: var(--line); border-radius: 7px; }
.gantt i { position: absolute; top: 0; bottom: 0; border-radius: 7px; background: var(--teal); }
.gantt i.rel { background: var(--navy); }
.gantt .axis { font-size: 11px; color: var(--muted); font-weight: 500; }
.gantt .axis b { background: none; height: auto; display: flex; justify-content: space-between; }

/* ===== 検索エンジン向けの静的ページ（章ページ・用語集・目次） ===== */
main.article { max-width: 860px; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--fill); font-weight: 700; text-decoration: none; }
.article article { display: flex; flex-direction: column; gap: 14px; }
.article h1 { color: var(--head); font-size: clamp(30px, 5vw, 44px); }
.article h2 { font-size: 22px; margin-top: 18px; }
.article .count { margin-bottom: -6px; }
.demo-cta { align-self: flex-start; display: inline-flex; align-items: center; text-decoration: none; }
.gl { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.gl > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; scroll-margin-top: 16px; }
.gl dt { font-weight: 900; font-size: 18px; color: var(--head); }
.gl dt small { font-weight: 500; font-size: 13px; color: var(--muted); margin-left: 6px; }
.gl dd { margin: 6px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.gl .one { font-weight: 700; color: var(--head); }
.gl .key-l { font-size: 13.5px; color: var(--muted); }
.gl .ety { background: var(--ice-lt); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.gl .ety small { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; color: var(--fill); margin-right: 6px; }
.gl-link a, .toc-more a, .pager2 a { color: var(--fill); font-weight: 700; text-decoration: none; }
.gl-index { display: flex; flex-wrap: wrap; gap: 8px; }
.gl-index a { border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 700; color: var(--head); text-decoration: none; }
.gl-sec { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 16px; }
.pager2 { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: 14px; }
.toc-static { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: clamp(20px, 3vw, 28px); display: flex; flex-direction: column; gap: 12px; }
.toc-static h2 { font-size: 22px; }
.toc-static ol { margin: 0; padding-left: 1.6em; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 24px; }
.toc-static li { font-weight: 700; }
.toc-static li a { color: var(--head); text-decoration: none; border-bottom: 1.5px solid var(--ice); }
.toc-static li a:hover { border-color: var(--teal); }
.toc-static li small { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); }
.rec .toc-static { display: none !important; }
@media (max-width: 640px) {
  .toc-static { margin-inline: -16px; border-radius: 0; border-inline: 0; padding: 24px 16px; }
  .gl > div { padding: 12px 14px; }
}
