:root{color-scheme:dark;--paper:#fff4e7;--ink:#180e20;--muted:#d9cddb}
*,*::before,*::after{box-sizing:border-box}body{margin:0;background:var(--ink);color:var(--paper);font:16px/1.75 "Hiragino Sans","Yu Gothic",sans-serif}
main,footer{width:min(100% - 40px,1000px);margin:auto}
a{color:#ffb684;text-underline-offset:4px}a:hover{color:#fff}a:focus-visible{outline:3px solid #ffd284;outline-offset:2px}
section{padding:36px 0;border-bottom:1px solid #50374d;scroll-margin-top:16px}h2{line-height:1.35;margin:8px 0;font-size:clamp(22px,3vw,32px)}section p{color:var(--muted);max-width:66ch;margin:12px 0}strong{color:var(--paper)}footer{padding:24px 0 36px;color:var(--muted);font-size:.78rem}
@media(max-width:620px){section{padding:28px 0}}
.location-notes{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start;margin-top:16px}
.location-notes figure{margin:0}.location-notes img{display:block;width:100%;height:auto}.location-notes figcaption{color:var(--muted);font-size:.76rem;margin:6px 0}.location-notes p:first-child{margin-top:0}
@media(max-width:700px){.location-notes{grid-template-columns:1fr;gap:12px}}

.facts{border-collapse:collapse;width:100%;text-align:left}
.facts caption{text-align:left;color:var(--muted);font-size:.85rem;padding:4px 0 10px}
.facts th,.facts td{padding:12px 14px;border-bottom:1px solid #50374d;vertical-align:top}
.facts th{background:#291a32;color:#ffcfaa;width:10em}
.sources{font-size:.85rem}
@media(max-width:700px){.facts th,.facts td{padding:10px 8px}.facts th{width:6em}}

h2{font-family:"Hiragino Mincho ProN","Yu Mincho",serif;color:var(--paper)}
/* 解析の同意。表示中は analytics.js が帯の高さを --consent-space に入れ、その分だけページ下端に余白を足す。
   最下部までスクロールすれば、フッターのリンクや「Cookie設定」が帯の下に隠れない。 */
body{padding-bottom:var(--consent-space,0px)}
#analytics-choice{position:fixed;z-index:10;inset:auto 12px 12px auto;display:flex;flex-wrap:wrap;align-items:center;gap:10px;width:min(390px,calc(100% - 24px));max-height:calc(100% - 24px);overflow:auto;padding:14px 18px;background:#261b2c;color:var(--paper);border:1px solid #83677b;box-shadow:0 4px 20px #150b1b66;font-size:.85rem;line-height:1.55}
#analytics-choice[hidden]{display:none}
#analytics-choice p{flex:1 1 100%;margin:0}
/* 「許可する」「許可しない」は同じ大きさ・同じ見た目にする（どちらかへ誘導しない） */
#analytics-choice button{flex:1 1 7em;min-height:44px;font:inherit;color:var(--paper);background:transparent;border:1px solid #ab8f9c;border-radius:6px;padding:4px 12px;cursor:pointer}
#analytics-choice button[aria-pressed="true"]{border-color:#ffc59d;box-shadow:inset 0 0 0 1px #ffc59d;color:#ffd0aa}
#analytics-choice button:focus-visible{outline:3px solid #ffd284;outline-offset:2px}
#analytics-choice button:active{background:#3a2a40}
/* スマホ：画面下端いっぱいの帯にして行数を減らす */
@media(max-width:620px){#analytics-choice{inset:auto 0 0;width:auto;max-height:100%;padding:12px max(16px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));border-width:1px 0 0;box-shadow:0 -4px 20px #150b1b66}}
/* 高さの低い画面（横向きのスマホ、200%拡大のPC）：文とボタンを横一列に並べて薄くする */
@media(min-width:560px) and (max-height:520px){#analytics-choice{inset:auto 0 0;flex-wrap:nowrap;width:auto;max-height:100%;padding:8px max(16px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));border-width:1px 0 0;box-shadow:0 -4px 20px #150b1b66}#analytics-choice p{flex:1 1 auto}#analytics-choice button{flex:0 0 auto;min-width:6.5em}}
/* 極端に小さい画面（スマホの200%拡大など）では帯が画面の半分近くを占めるので、固定をやめてページ末尾に置く。
   「Cookie設定」を押すとここへ移動する。選ぶまで解析は始まらない。 */
@media(max-width:299px),(max-width:559px) and (max-height:299px){#analytics-choice{position:static;width:auto;max-height:none;margin:0 20px 24px;padding:14px 16px;border-width:1px;box-shadow:none}}
footer{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 16px}
/* フッターのリンクは語の途中で折り返さず、入らなければリンクごと次の行へ送る */
footer a{display:inline-block;padding-block:6px}
#analytics-settings{min-height:44px;font:inherit;color:inherit;background:transparent;border:0;padding:4px 0;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
#analytics-settings:focus-visible{outline:2px solid var(--paper);outline-offset:2px}

.home-directory { padding-block: clamp(20px, 4vw, 42px); }
.directory a {
  display: grid;
  grid-template-columns: minmax(8em, .65fr) 1.4fr auto;
  align-items: baseline;
  gap: 6px 24px;
  padding: 16px 4px;
  border-bottom: 1px solid #50374d;
  text-decoration: none;
  color: var(--paper);
}
.directory a::after { content: "→"; color: #ffc59d; }
.directory span { font-size: clamp(19px, 2.3vw, 28px); font-weight: 650; }
.directory small { color: var(--muted); font-size: .92rem; }
.directory a:hover span, .masthead a:hover { color: #ffc59d; }
.masthead, .category-nav { width: min(100% - 40px, 1000px); margin-inline: auto; }
.masthead { padding-block: 24px 12px; }
.masthead a { color: var(--paper); text-decoration: none; font-weight: 700; }
.category-nav { display: flex; flex-wrap: wrap; gap: 0 clamp(12px, 3vw, 32px); border-bottom: 1px solid #50374d; }
.category-nav a { padding: 10px 0; font-size: .9rem; color: var(--muted); text-decoration: none; }
.category-nav [aria-current="page"] { color: var(--paper); box-shadow: inset 0 -2px #ffb684; }
.category-page h1 { margin: 0; padding-top: clamp(28px, 5vw, 64px); font-size: clamp(34px, 5vw, 58px); line-height: 1.2; }
.category-page section { padding-top: 20px; }
.category-page ol { max-width: 66ch; padding-left: 1.7em; }
.category-page li + li { margin-top: .6em; }
.guide-language { font-size: .88rem; color: var(--muted); }
.home-directory > .guide-language { margin: 0 0 12px; text-align: right; }
@media (max-width: 620px) {
  .directory a { grid-template-columns: 1fr auto; }
  .directory small { grid-column: 1; font-size: .85rem; }
  .directory a::after { grid-column: 2; grid-row: 1 / 3; align-self: center; }
}
.language-switch { white-space: nowrap; font-size: .88rem; font-weight: 500; }
.masthead { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:4px 16px; }
.masthead .language-switch { text-decoration:underline; }

.editorial-skip {
  position: absolute;
  z-index: 30;
  inset: 8px auto auto 12px;
  clip-path: inset(50%);
  pointer-events: none;
  padding: 8px 14px;
  color: var(--paper);
  background: var(--ink, #241828);
}
.editorial-skip:focus-visible {
  clip-path: none;
  pointer-events: auto;
}

@media (max-width: 299px) {
  .hero .panel .title {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
