
:root {
  color-scheme: dark;
  --bg: #0c0a08; --bg2: #15110d; --panel: #18130e; --panel2: #100d0a; --line: #6b5531; --line2: #3d3020;
  --gold: #d4af6a; --gold2: #f0d79a; --ink: #f1e6cd; --body: #dccfb4; --dim: #a8987b; --faint: #7d6f58;
  --red: #b8483a; --red2: #e08a6c; --steel: #8fa3b8;
  --mincho: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --cinzel: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
  --mono: "SF Mono", Menlo, ui-monospace, monospace;
  --corner: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Cpath d='M1.5 25V1.5H25' fill='none' stroke='%23d4af6a' stroke-width='1.4'/%3E%3Cpath d='M5 5.5v6M5.5 5h6' stroke='%23d4af6a' stroke-width='1' opacity='.6'/%3E%3Crect x='3.2' y='3.2' width='3.6' height='3.6' transform='rotate(45 5 5)' fill='%23f0d79a'/%3E%3C/svg%3E");
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); font-family: var(--mincho); font-weight: 500;
  background: radial-gradient(120% 80% at 50% 0%, #2a2016 0%, #15100c 45%, #0a0807 100%) fixed, var(--bg); }
a { color: inherit; }
button { font-family: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold2); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
/* 日本語は BudouX の切れ目（<wbr>）でだけ折る */
body { word-break: keep-all; overflow-wrap: anywhere; }
p { line-break: strict; }
.txt p, .about p, .note { text-wrap: pretty; }
[lang="is"] { word-break: normal; overflow-wrap: break-word; }
.nw { white-space: nowrap; }
img.snes, img.thumb { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }

/* 枠（金の細い二重線と角の飾り） */
.frame { position: relative; background: linear-gradient(180deg, rgba(31,25,18,.96), rgba(17,13,10,.97));
  border: 1px solid var(--line); box-shadow: inset 0 0 0 4px #0f0c09, inset 0 0 0 5px rgba(212,175,106,.26), 0 18px 44px rgba(0,0,0,.5); }
.frame::before, .frame::after { content: ""; position: absolute; width: 26px; height: 26px; background: var(--corner) no-repeat; pointer-events: none; z-index: 2; }
.frame::before { top: 5px; left: 5px; }
.frame::after { bottom: 5px; right: 5px; transform: rotate(180deg); }
.en { font-family: var(--cinzel); font-weight: 600; letter-spacing: .28em; color: var(--gold); font-size: 12px; }
.goldtext { background: linear-gradient(180deg, #fff4cf 0%, #f0d08a 38%, #c99a4c 70%, #8f6528 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #2b1f0f) drop-shadow(0 0 14px rgba(0,0,0,.75)); }
.rule { height: 18px; margin: 0 auto; max-width: 1200px; background:
  linear-gradient(90deg, transparent, var(--line) 18%, var(--line) 82%, transparent) center / 100% 1px no-repeat; position: relative; }
.rule::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; background: var(--gold); transform: translate(-50%, -50%) rotate(45deg); box-shadow: 0 0 0 3px var(--bg2); }

/* 左上の小さな行き先 */
.topnav { position: absolute; left: max(14px, env(safe-area-inset-left, 0px)); top: max(14px, env(safe-area-inset-top, 0px)); z-index: 30; display: flex; gap: 8px; }
.topnav a { text-decoration: none; font: 600 13px/1 var(--mincho); color: var(--gold2); letter-spacing: .08em; padding: 9px 14px; background: rgba(14,11,8,.82);
  border: 1px solid var(--line); box-shadow: inset 0 0 0 2px #0f0c09, inset 0 0 0 3px rgba(212,175,106,.22); backdrop-filter: blur(4px); }
.topnav a:hover { color: #fff; border-color: var(--gold); }

/* スーファミの画面（タイトル・章の頭） */
.screen { position: relative; display: block; background: #000; border: 1px solid var(--line); box-shadow: 0 0 0 5px #0f0c09, 0 0 0 6px rgba(212,175,106,.42), 0 30px 80px rgba(0,0,0,.75); }
.screen img.snes { width: 100%; height: auto; aspect-ratio: 256 / 224; }
/* ぼかした背景の絵（style= の書き方を使わないよう、絵の部品で置く 10-22） */
.blurbg { position: absolute; left: -60px; top: -60px; width: calc(100% + 120px); height: calc(100% + 120px); object-fit: cover; object-position: center; filter: blur(26px) brightness(.34) saturate(1.15); transform: scale(1.08); z-index: 0; pointer-events: none; }

/* タイトル画面 */
.title-screen { position: relative; overflow: hidden; display: grid; place-items: center; padding: 64px max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px)); }
.title-screen .stage { position: relative; z-index: 1; width: 100%; display: grid; justify-items: center; }
/* ロゴは絵の上の空に、メニューは絵の下に重ねる（スーファミのタイトル画面の形） */
.title-screen .logo { position: absolute; left: 0; right: 0; top: 0; z-index: 2; text-align: center; padding: 5% 16px 9%;
  background: linear-gradient(180deg, rgba(6,5,4,.7) 0%, rgba(6,5,4,.42) 60%, transparent 100%); }
.title-screen .mbox { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; text-align: center; padding: 12% 16px 4.5%;
  background: linear-gradient(180deg, transparent 0%, rgba(6,5,4,.72) 38%, rgba(6,5,4,.9) 100%); }
.logo .pre { display: block; font: 700 clamp(15px, 1.7vw, 22px)/1.4 var(--mincho); letter-spacing: .5em; text-indent: .5em; color: var(--gold2); text-shadow: 0 2px 6px #000; }
.logo h1 { margin: 2px 0 0; font: 800 clamp(56px, 8.2vw, 128px)/1.05 var(--mincho); letter-spacing: .12em; text-indent: .12em; }
.logo .en { display: block; margin-top: 10px; font-size: clamp(11px, 1vw, 14px); color: #d9c08e; }
.mbox .tag { margin: 12px auto 0; max-width: 34em; font-size: clamp(14px, 1.25vw, 17px); line-height: 1.8; color: var(--body); text-shadow: 0 1px 4px #000; }
.menu { margin: 18px auto 0; display: inline-grid; gap: 4px; text-align: left; }
.menu a { position: relative; display: block; padding: 6px 18px 6px 30px; text-decoration: none; font: 700 clamp(16px, 1.45vw, 20px)/1.4 var(--mincho); letter-spacing: .16em; color: var(--ink); text-shadow: 0 2px 4px #000; }
.menu a::before { content: ""; position: absolute; left: 6px; top: 50%; width: 0; height: 0; margin-top: -7px; border-left: 12px solid var(--gold2); border-top: 7px solid transparent; border-bottom: 7px solid transparent; opacity: 0; }
.menu a.sel, .menu a:hover, .menu a:focus-visible { color: var(--gold2); outline: none; }
.menu a.sel::before, .menu a:hover::before, .menu a:focus-visible::before { opacity: 1; animation: blink 1s steps(2, jump-none) infinite; }
/* 広い画面では、タイトルの絵を画面いっぱいに（スーファミのオープニングのように。絵の点は大きくするだけで、データはそのまま） */
@media (min-width: 861px) and (min-aspect-ratio: 1/1) {
  /* 高さは「画面の高さ」と「横幅の 16:9」の小さいほう（ページを埋めこむ窓の中では画面の高さの値が見えている高さより大きいので、横幅でも上限をかける 10-22） */
  .title-screen { padding: 0; height: min(100vh, 56.25vw); height: min(100svh, 56.25vw); min-height: 520px; }
  .title-screen .blurbg { display: none; }
  .title-screen .stage { position: absolute; inset: 0; }
  .title-screen .screen { position: absolute; inset: 0; width: auto !important; height: auto; border: 0; box-shadow: none; }
  .title-screen .screen img.snes { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: center 42%; }
  /* 広い画面では、上下が切れてもミズガルズオルムが残る構図の別の絵を出す（10-22） */
  .title-screen .screen:has(img.widepic) img.snes:not(.widepic) { display: none; }
  .title-screen .screen img.widepic { display: block; }
  
  body:has(.title-screen) .langpick { top: 30px; right: 32px; }
  .title-screen .screen::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(212,175,106,.55); box-shadow: inset 0 0 0 4px rgba(10,8,6,.55), inset 0 0 0 5px rgba(212,175,106,.22), inset 0 0 120px rgba(0,0,0,.55); pointer-events: none; z-index: 3; }
  /* 暗くするのは題とメニューの後ろの真ん中だけ（横いっぱいに暗くすると、右下のミズガルズオルムが見えなくなった 10-22） */
  .title-screen .logo { padding: 3.4% 16px 7%; background: radial-gradient(46% 100% at 50% 0%, rgba(6,5,4,.62) 0%, rgba(6,5,4,.32) 55%, transparent 100%); }
  .title-screen .mbox { padding: 9% 16px 3.6%; background: radial-gradient(34% 100% at 50% 100%, rgba(6,5,4,.86) 0%, rgba(6,5,4,.55) 55%, transparent 100%); }
  .logo h1 { font-size: clamp(60px, 8.4vw, 140px); }
}
.title-screen img.widepic { display: none; }
@keyframes blink { 0% { opacity: 1; } 100% { opacity: .15; } }

/* 目次のページ：エッダってなに？・章をえらぶ */
.sect { position: relative; max-width: 1200px; margin: 0 auto; padding: 72px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); }
.sect > .head { text-align: center; margin-bottom: 26px; }
.sect > .head h2 { margin: 10px 0 0; font: 700 clamp(26px, 2.6vw, 36px)/1.4 var(--mincho); color: var(--gold2); letter-spacing: .1em; }
.about { max-width: 880px; margin: 0 auto; padding: 36px clamp(20px, 4vw, 48px) 34px; }
.about p { margin: 0; font-size: 16.5px; line-height: 2.05; color: var(--body); }
.about p + p { margin-top: 14px; }
.cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.card { flex: 0 1 266px; display: flex; flex-direction: column; text-decoration: none; padding: 18px 16px 18px; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover, .card:focus-visible { transform: translateY(-4px); box-shadow: inset 0 0 0 4px #0f0c09, inset 0 0 0 5px rgba(240,215,154,.55), 0 22px 50px rgba(0,0,0,.6), 0 0 24px rgba(212,175,106,.18); outline: none; }
.card .num { text-align: center; font: 700 30px/1 var(--cinzel); letter-spacing: .08em; }
.card .chen { text-align: center; margin-top: 6px; font-size: 10.5px; }
.card .art { margin: 12px 0 0; border: 1px solid var(--line2); background: #000; }
.card .art img { width: 100%; height: auto; aspect-ratio: 256 / 224; }
.card h3 { margin: 14px 0 0; font: 700 19px/1.45 var(--mincho); color: var(--gold2); text-align: center; letter-spacing: .06em; }
.card p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.8; color: var(--body); }
.card .meta { margin-top: auto; padding-top: 10px; font-size: 12px; color: var(--dim); text-align: center; }
.card .sc { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 6px; justify-content: center; }
.card .sc span { font: 600 10.5px/1.6 var(--mono); color: var(--red2); border: 1px solid rgba(224,138,108,.45); padding: 0 6px; }

/* 章の頭 */
.chap-head { position: relative; overflow: hidden; padding: 84px max(16px, env(safe-area-inset-right, 0px)) 54px max(16px, env(safe-area-inset-left, 0px)); }
.chap-head .in { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) min(540px, 44%); gap: 40px; align-items: center; }
.chap-head .in > div:last-child { width: 100%; display: grid; justify-items: end; }
.chap-head h1 { margin: 12px 0 0; font: 800 clamp(44px, 6.4vw, 92px)/1.1 var(--mincho); letter-spacing: .08em; }
.chap-head .lead { margin: 18px 0 0; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.9; color: var(--ink); text-shadow: 0 1px 4px #000; }
.chap-head .meta { margin: 10px 0 0; color: var(--dim); font-size: 14px; }
.chap-head .en { font-size: 13px; }
.itemlist { max-width: 1200px; margin: 0 auto 30px; padding: 30px clamp(18px, 3vw, 36px) 26px; }
.itemlist h2 { margin: 0 0 16px; font: 700 20px/1.4 var(--mincho); color: var(--gold2); letter-spacing: .12em; text-align: center; }
.itemlist ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 26px; }
.itemlist li a { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 2px 10px; align-items: baseline; padding: 11px 4px 11px 0; text-decoration: none; border-bottom: 1px solid var(--line2); }
.itemlist li a b { font: 600 12px/1.9 var(--mono); color: var(--gold); }
.itemlist li a span { font-weight: 700; font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.itemlist li a i { font-style: normal; font-size: 11.5px; line-height: 1.6; color: var(--dim); }
.itemlist li a i em { font-style: normal; }
.itemlist li a:hover span { color: var(--gold2); }
@media (min-width: 861px) and (max-width: 1199px) { .itemlist ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 1 項 */
.item { max-width: 1200px; margin: 0 auto; padding: 44px max(16px, env(safe-area-inset-right, 0px)) 44px max(16px, env(safe-area-inset-left, 0px)); display: grid; grid-template-columns: minmax(0, 1fr) min(572px, 48%); gap: 32px; align-items: start; scroll-margin-top: 8px; }
.txt { padding: 30px clamp(20px, 2.6vw, 36px) 26px; min-width: 0; }
.txt .hd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.txt .no { font: 700 12px/1 var(--mono); letter-spacing: .08em; color: #1a130b; background: linear-gradient(180deg, #f0d79a, #c99a4c); padding: 5px 9px; }
.txt .src { font-size: 12.5px; color: var(--dim); }
.txt h2, .txt h1 { margin: 14px 0 0; font: 700 clamp(25px, 2.3vw, 33px)/1.4 var(--mincho); color: var(--gold2); letter-spacing: .04em; }
.txt .q { margin: 10px 0 0; font-weight: 700; font-size: 15.5px; line-height: 1.8; color: var(--red2); }
.txt p { margin: 14px 0 0; font-size: 16px; line-height: 2; color: var(--body); }
.txt strong, .about strong { color: var(--ink); font-weight: 700; background: linear-gradient(transparent 62%, rgba(212,175,106,.32) 62%); }
.note { margin-top: 16px; padding-left: 14px; border-left: 2px solid var(--gold); font-size: 13.5px; line-height: 1.85; color: var(--dim); }
.note b { color: var(--gold); margin-right: 8px; }
.tools { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.tools button, .tools a { font: 700 13px/1 var(--mincho); letter-spacing: .08em; color: var(--gold2); background: #120e0b; border: 1px solid var(--line); padding: 10px 16px; cursor: pointer; text-decoration: none;
  box-shadow: inset 0 0 0 2px #0f0c09, inset 0 0 0 3px rgba(212,175,106,.2); }
.tools button:hover, .tools a:hover, .tools button[aria-expanded="true"] { color: #fff; border-color: var(--gold); box-shadow: inset 0 0 0 2px #0f0c09, inset 0 0 0 3px rgba(240,215,154,.5), 0 0 16px rgba(212,175,106,.18); }
.tools a.scene { color: var(--red2); }
.more { display: none; }

/* 右の絵 */
.pic-col { position: sticky; top: 20px; min-width: 0; }
.pframe { padding: 12px; }
.pbar { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 4px 10px; }
.pbar .tag { font-size: 13px; color: var(--body); min-width: 0; }
.pbar .tag b { font: 700 11px/1 var(--mono); color: #fff; background: var(--red); padding: 4px 7px; margin-right: 8px; letter-spacing: .06em; }
.viewtabs { margin-left: auto; flex: none; display: inline-flex; border: 1px solid var(--line); background: #0f0c09; }
.viewtabs .vt { font: 700 12.5px/1 var(--mincho); letter-spacing: .08em; color: var(--dim); background: transparent; border: 0; padding: 8px 13px; cursor: pointer; }
.viewtabs .vt[aria-selected="true"] { color: #1a130b; background: linear-gradient(180deg, #f0d79a, #c99a4c); }
.pic { position: relative; display: grid; place-items: center; background: #050403; border: 1px solid var(--line2); }
.pic img.snes { width: 100%; height: auto; aspect-ratio: 256 / 224; }
.pic.show-old img.snes { visibility: hidden; }
.pic img.old { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #e9dfc8; }
.cicon { position: absolute; right: 10px; bottom: 10px; z-index: 3; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(14,11,8,.9); color: var(--gold2); display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 6px rgba(0,0,0,.5); }
.cicon:hover, .cicon[aria-expanded="true"] { border-color: var(--gold2); color: #fff; }
.cicon svg { width: 16px; height: 16px; display: block; }
.cpop { position: absolute; right: 10px; bottom: 48px; z-index: 4; width: min(26em, calc(100% - 20px)); max-height: calc(100% - 60px); overflow: auto; padding: 14px 16px; text-align: left; }
.cpop h5 { margin: 0 0 6px; font-size: 13px; color: var(--gold2); font-weight: 700; letter-spacing: .08em; }
.cpop p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.8; color: var(--body); }
.cpop .cr { display: flex; flex-wrap: wrap; gap: 0 10px; }
.cpop .ct { overflow-wrap: anywhere; }
.cpop a { color: var(--gold2); }
.cpop .x { position: absolute; top: 6px; right: 8px; border: 0; background: none; color: var(--dim); font-size: 17px; cursor: pointer; padding: 2px 6px; z-index: 3; }

/* 出典の窓 */
.src-sheet:not([hidden]) { position: fixed; inset: 0; z-index: 50; margin: 0; background: rgba(4,3,2,.72); display: flex; align-items: center; justify-content: center; padding: 4vh 16px; }
.sheet { width: min(760px, 100%); max-height: 88vh; overflow: auto; overscroll-behavior: contain; padding: 26px 28px 26px; }
.sheet h3 { margin: 0 44px 6px 0; font: 700 18px/1.5 var(--mincho); color: var(--gold2); letter-spacing: .06em; }
.sheet h3 span { display: block; font-size: 13px; font-weight: 600; color: var(--dim); letter-spacing: 0; }
.sheet .close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 36px; height: 36px; border: 1px solid var(--line); background: #0f0c09; color: var(--gold2); font-size: 19px; line-height: 1; cursor: pointer; }
.sheet .close:hover { border-color: var(--gold2); color: #fff; }
body.modal-open { overflow: hidden; }
.evs { display: grid; gap: 12px; margin-top: 14px; }
.ev { background: #0f0c09; border: 1px solid var(--line2); padding: 14px 16px; }
.ev .top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font: 12px var(--mono); color: var(--dim); }
.badge { display: inline-block; padding: 2px 9px; font: 700 11.5px/1.5 var(--mincho); letter-spacing: .06em; border: 1px solid currentColor; }
.cA { color: var(--gold2); } .cB { color: var(--red2); }
.ev h4 { margin: 8px 0 4px; font-size: 16px; line-height: 1.6; color: var(--ink); font-weight: 700; }
.ev h4 .or { font-weight: 500; color: var(--dim); margin-left: 10px; font-size: 13.5px; font-family: var(--cinzel); letter-spacing: .04em; }
.ev p { margin: 6px 0 0; font-size: 14px; line-height: 1.9; color: var(--body); }
.ev .on { font-family: Georgia, "Times New Roman", serif; font-style: italic; background: #1a140f; border-left: 2px solid var(--gold); padding: 8px 12px; color: var(--ink); }
.ev .cite { color: var(--dim); font-size: 12.5px; }
.ev a.go2 { color: var(--gold2); font-size: 14px; text-decoration: none; font-weight: 700; }
.ev a.go2:hover { text-decoration: underline; }

/* 章のいちばん下 */
.pager { max-width: 1200px; margin: 30px auto 0; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 20px max(16px, env(safe-area-inset-left, 0px)); display: flex; gap: 16px; flex-wrap: wrap; }
.pager a { flex: 1 1 220px; text-decoration: none; padding: 16px 20px; font-weight: 700; font-size: 16px; color: var(--gold2); }
.pager a small { display: block; margin-bottom: 6px; font: 600 11px/1 var(--cinzel); letter-spacing: .24em; color: var(--dim); }
.pager a:hover { color: #fff; }
.foot { max-width: 1200px; margin: 40px auto 0; padding: 26px max(16px, env(safe-area-inset-right, 0px)) 46px max(16px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--line2); color: var(--faint); font-size: 12.5px; line-height: 1.9; }
.foot p { margin: 0 0 8px; }
.foot b { color: var(--dim); margin-right: 10px; }

/* 原典を読むページ */
.gbwrap { max-width: 1100px; margin: 80px auto 0; padding: 34px clamp(18px, 3vw, 40px) 30px; }
.gbwrap h1 { margin: 0; font: 700 clamp(26px, 3vw, 38px)/1.4 var(--mincho); color: var(--gold2); }
.gbwrap .orig { margin: 4px 0 0; color: var(--dim); font-family: var(--cinzel); letter-spacing: .06em; }
.gbwrap .lead { color: var(--dim); font-size: 14px; line-height: 1.9; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.gb h2 { font: 700 15px/1.4 var(--mincho); color: var(--gold); margin: 26px 0 10px; letter-spacing: .12em; }
.gb h3 { font-size: 14px; color: var(--red2); margin: 18px 0 6px; }
.st { display: grid; grid-template-columns: 2.6em minmax(0, 1fr); gap: 8px; scroll-margin-top: 70px; padding: 3px 0; }
.st:target { background: rgba(212,175,106,.14); }
.st .n { font: 600 12px/2 var(--mono); color: var(--gold); }
.st p, .gb .pr { margin: 0; font-size: 14.5px; line-height: 1.9; color: var(--body); font-family: Georgia, "Times New Roman", var(--mincho), serif; }
.gb .pr { margin: 10px 0; color: var(--dim); }
/* 10-26 原典のページ：原文・英語・いまの言葉の訳をボタンで切りかえる（ボタンはページを下っても上に残る。選んだものは retro.js が覚える） */
.gbviews { position: sticky; top: 8px; z-index: 20; display: flex; flex-wrap: wrap; gap: 4px; width: fit-content; max-width: 100%; margin: 22px 0 4px; padding: 5px; background: rgba(14,11,8,.94); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.gbviews button { min-height: 40px; padding: 9px 16px; font: 600 13.5px/1.2 var(--mincho); letter-spacing: .06em; color: var(--dim); background: transparent; border: 1px solid transparent; cursor: pointer; }
.gbviews button:hover { color: var(--gold2); border-color: var(--line); }
.gbviews button[aria-pressed="true"] { color: #1b140c; background: linear-gradient(180deg, var(--gold2), var(--gold)); border-color: var(--gold); }
.gbnote { margin: 16px 0 12px; font-size: 12.5px; line-height: 1.8; color: var(--faint); }
.gbv .prs .pr { color: var(--body); }
.gbv .prs .pr:first-child { margin-top: 0; }
.st.hit, .prs.hit, .pr.hit { background: rgba(212,175,106,.14); }
html.latin .gbviews button { letter-spacing: .01em; }

@media (max-width: 860px) {
  .title-screen { min-height: 0; padding-top: 70px; padding-bottom: 40px; }
  .title-screen .logo { padding: 6% 8px 10%; }
  .title-screen .logo h1 { font-size: clamp(40px, 13vw, 72px); }
  .title-screen .mbox { position: static; padding: 20px 6px 0; background: none; }
  .menu { margin-top: 16px; }
  .sect { padding-top: 52px; }
  .about p { font-size: 15.5px; line-height: 1.95; }
  .cards { gap: 14px; }
  .card { flex: 1 1 calc(50% - 7px); padding: 14px 10px 14px; }
  .card h3 { font-size: 16px; }
  .card p { display: none; }
  .chap-head { padding-top: 70px; padding-bottom: 30px; }
  .chap-head .in { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .chap-head .in > div:last-child { justify-items: stretch; }
  .chap-head h1 { font-size: clamp(40px, 12vw, 64px); }
  .itemlist ol { grid-template-columns: minmax(0, 1fr); }
  .itemlist li a { padding: 8px 4px 8px 0; }
  .item { display: block; padding-top: 28px; padding-bottom: 28px; }
  .txt { padding: 22px 18px 18px; }
  .txt:not(.open) > :not(.hd):not(h2):not(h1):not(.more) { display: none !important; }
  .txt h2, .txt h1 { font-size: 24px; }
  .more { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font: 700 13.5px/1 var(--mincho); letter-spacing: .08em; color: var(--gold2); background: #120e0b; border: 1px solid var(--line); padding: 10px 16px; cursor: pointer; }
  .more::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
  .txt.open .more::after { transform: translateY(2px) rotate(-135deg); }
  .more .c, .txt.open .more .o { display: none; }
  .txt.open .more .c { display: inline; }
  .pic-col { position: static; margin-top: 14px; }
  .pframe { padding: 8px; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .gbwrap { margin-top: 64px; }
  .gbviews { top: 6px; }
  .gbviews button { padding: 9px 12px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .menu a::before { animation: none !important; } .card { transition: none; } }

/* 言葉の切りかえ（右上・3D のページと同じ地球のマーク＋言葉の名前） */
.langpick { position: fixed; top: 10px; right: 12px; z-index: 60; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.langpick-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: rgba(14, 10, 7, .82); color: var(--ink); border: 1px solid rgba(201, 162, 90, .55); border-radius: 3px; font: 500 12px/1.2 system-ui, -apple-system, sans-serif; letter-spacing: .02em; cursor: pointer; }
.langpick-btn:hover, .langpick-btn:focus-visible { border-color: var(--gold); outline: none; }
.langpick-list { position: absolute; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px 0; list-style: none; min-width: 190px; max-height: 70vh; overflow: auto; background: #120d09; }
.langpick-list li { padding: 7px 14px; font-size: 13px; color: var(--body); cursor: pointer; white-space: nowrap; }
.langpick-list li:hover, .langpick-list li:focus { background: #2a1f15; color: var(--ink); outline: none; }
.langpick-list li[aria-selected="true"] { color: var(--gold); }

/* 英字の言葉（英語・北欧の言葉・ドイツ語・古ノルド語）：日本語のための広い字間と大きな題をつめる */
html.latin .logo .pre { letter-spacing: .16em; text-indent: .16em; }
html.latin .logo h1 { font-size: clamp(40px, 6vw, 96px); letter-spacing: .02em; text-indent: 0; line-height: 1.1; }
html.latin .chap-head h1 { font-size: clamp(34px, 4.4vw, 64px); letter-spacing: .01em; }
html.latin .card h3, html.latin .txt h2, html.latin .txt h1, html.latin .head h2 { letter-spacing: 0; }
html.latin .card h3 { font-size: 17px; }
@media (max-width: 860px) {
  html.latin .title-screen .logo h1 { font-size: clamp(30px, 9.5vw, 56px); }
  html.latin .chap-head h1 { font-size: clamp(28px, 8.5vw, 44px); }
  html.latin .card h3 { font-size: 15px; }
}
/* 中国語：日本語のための「ことばのまとまりでだけ折る」をやめ、ふつうに 1 字ずつ折る（BudouX の切れ目は日本語だけに入る） */
html:lang(zh) body, html:lang(zh) body * { word-break: normal !important; overflow-wrap: anywhere; line-break: strict; }
/* スマホ：言葉のボタンは地球のマークだけにして、左上の行き先のリンクと重ならないようにする */
@media (max-width: 600px) {
  .langpick { top: max(14px, env(safe-area-inset-top, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); }
  .langpick-name { display: none; }
  .langpick-btn { padding: 9px 10px; }
  .topnav { right: 58px; }
  .topnav a { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topnav a:first-child { flex-shrink: 0; }
}
@media (max-width: 600px) { html.latin .topnav a { letter-spacing: 0; padding: 9px 9px; font-size: 12px; } html.latin .topnav { gap: 6px; } }
/* 英字の言葉のスマホ：項のページでは章へのリンクだけを出す（題が長い言葉で切れないように。いちばん上へは章のページから行ける） */
@media (max-width: 600px) { html.latin .topnav a.to3d + a:not(:last-child) { display: none; } } /* 10-25 3D のリンク（いちばん初め）は残し、その次の目次へのリンクを隠す */
