/* フランスの101県をあそぼう！ — style.css (全ページ共通)
   ../world の style.css を手本に、落ち着いた配色 (深い青を基調に、赤を差し色に少し) に整えた。国旗の三色は、そのままは使わない。
   inline の style 属性・<style>・外部のフォント/画像は使わない (CSP は self だけ)。ブレークポイントは 640px と 900px。 */
:root {
  --bg: #ffffff; --paper: #ffffff; --surface: #f2f4f8; --surface-2: #e7ebf2;
  --ink: #1b2230; --ink-2: #435069; --ink-3: #5a6680;
  --line: #c9d1df; --line-soft: #e1e6ef;
  --accent: #1f3f7a; --accent-hover: #17315f; --on-accent: #ffffff;
  --red: #b9322a; --red-bg: #fbeceb;
  --link: #1d4a9e; --focus: #1d4a9e;
  --notice-bg: #eef3fb; --notice-edge: #1f3f7a;
  --ok: #176b45; --ng: #8a1f17;
  --map-bg: #e8ecf3; --map-land: #b9c4d8; --map-line: #ffffff; --map-near: #c9d1e1; --map-bg-dep: #d3d9e5; --map-frame: #6c7a96;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", Meiryo, sans-serif;
  --fs-xs: .8125rem; --fs-sm: .9375rem; --fs-md: 1rem; --fs-lg: 1.125rem; --fs-xl: 1.375rem;
  --fs-h2: clamp(1.3rem, 1.1rem + .9vw, 1.65rem); --fs-h1: clamp(1.65rem, 1.2rem + 2.2vw, 2.4rem);
  --lh: 1.7; --wrap: 1100px; --gutter: clamp(16px, 3vw, 28px); --tap: 44px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171d; --paper: #1a1f28; --surface: #1d232e; --surface-2: #262d3b;
    --ink: #e8ecf4; --ink-2: #b7c1d6; --ink-3: #98a4bd;
    --line: #3a4356; --line-soft: #2a3141;
    --accent: #3a64b3; --accent-hover: #4a74c4; --on-accent: #ffffff;
    --red: #ff8a7f; --red-bg: #3a1f1d;
    --link: #9dbcf5; --focus: #9dbcf5;
    --notice-bg: #1c2740; --notice-edge: #6f95e0;
    --ok: #6fd2a2; --ng: #ff9d94;
    --map-bg: #e8ecf3; --map-land: #aab7cf; --map-line: #ffffff; --map-near: #c9d1e1; --map-bg-dep: #d3d9e5; --map-frame: #55627d;
  }
}
:lang(ja) { --lh: 1.85; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: 16px; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-md); line-height: var(--lh); color: var(--ink); background: var(--bg); overflow-wrap: break-word; overflow-x: clip; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.3; text-wrap: balance; }
h1 { font-size: var(--fs-h1); margin: var(--s3) 0 var(--s3); }
h2 { font-size: var(--fs-h2); margin-bottom: var(--s3); }
h3 { font-size: var(--fs-lg); margin: var(--s4) 0 var(--s2); }
p { text-wrap: pretty; }
:lang(ja) :is(h1, h2, h3, .lead) { word-break: auto-phrase; }
a { color: var(--link); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
main.wrap { padding-bottom: var(--s7); }
.small { font-size: var(--fs-sm); color: var(--ink-3); margin-top: var(--s2); }
.lead { font-size: var(--fs-lg); color: var(--ink-2); max-width: 40em; }
.num { font-variant-numeric: tabular-nums; }
.skip { position: absolute; inset-inline-start: 8px; top: -80px; background: var(--ink); color: var(--bg); padding: 12px 16px; z-index: 100; }
.skip:focus { top: 8px; }
main > section, main > article > section { margin-top: var(--s7); border-top: 2px solid var(--accent); padding-top: var(--s4); }
main > article > header { padding-top: var(--s2); }
.kicker { display: block; }
.fr-name { font-size: .7em; font-weight: 400; color: var(--ink-3); margin-inline-start: .25em; white-space: nowrap; }
.todo { background: #fff3c4; color: #5c4400; padding: 0 6px; border: 1px dashed #b58a00; font-weight: 700; }
@media (prefers-color-scheme: dark) { .todo { background: #4a3d10; color: #ffe38a; border-color: #b58a00; } }

/* ヘッダー */
.site-head { background: var(--bg); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.head-in { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.logo { display: flex; align-items: center; gap: var(--s3); padding-block: var(--s3); color: var(--ink); text-decoration: none; font-weight: 800; font-size: var(--fs-lg); line-height: 1.3; }
.logo-mark { width: 36px; height: 36px; flex: none; display: block; }
.nav { display: flex; flex: 1; flex-wrap: wrap; gap: 0 var(--s1); }
.nav a { display: inline-flex; align-items: center; white-space: nowrap; padding: 0 var(--s3); min-height: 56px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: var(--fs-sm); }
.nav a:hover { color: var(--link); }
.nav a[aria-current] { box-shadow: inset 0 -4px 0 var(--red); }
.langmenu { position: relative; margin-inline-start: auto; }
.langmenu summary { display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--tap); padding: 4px var(--s3); font-size: var(--fs-sm); font-weight: 700; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); cursor: pointer; list-style: none; }
.langmenu summary::-webkit-details-marker { display: none; }
.langmenu summary:hover { background: var(--surface-2); }
.langmenu ul { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 30; list-style: none; margin: 0; padding: var(--s2); background: var(--paper); border: 2px solid var(--ink); display: grid; min-width: 11rem; }
.langmenu li a { display: flex; align-items: center; min-height: var(--tap); padding: 4px var(--s3); color: var(--ink); text-decoration: none; font-weight: 600; }
.langmenu li a:hover { background: var(--surface-2); }
.langmenu li a[aria-current] { font-weight: 800; background: var(--notice-bg); }
.ic { flex: none; vertical-align: -.2em; }
@media (max-width: 1000px) {
  .logo { flex: 1 1 0; min-width: 0; }
  .langmenu { order: 2; }
  .nav { order: 3; flex: 0 0 100%; border-top: 1px solid var(--line-soft); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--s2); }
  .nav a { min-height: 44px; padding: 0 var(--s2); }
}
@media (max-width: 760px) { .logo-text { font-size: var(--fs-md); } }
.crumbs { font-size: var(--fs-sm); color: var(--ink-2); padding-top: var(--s4); line-height: 1.4; }
.crumbs a { color: var(--ink-2); }

/* ボタン・チップ・札 */
.btn { display: inline-flex; align-items: center; gap: var(--s3); min-height: 48px; padding: 8px var(--s4); border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.big { min-height: 54px; padding-inline: var(--s5); font-size: var(--fs-lg); }
.btn.small { min-height: var(--tap); padding: 4px var(--s3); font-size: var(--fs-sm); margin-top: 0; color: var(--ink); }
.btn[aria-pressed='true'] { background: var(--ink); color: var(--bg); }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--tap); padding: 4px var(--s3); background: var(--surface); border: 1px solid var(--line-soft); color: var(--ink); font-weight: 700; font-size: var(--fs-sm); line-height: 1.35; text-decoration: none; }
.chip:hover { background: var(--surface-2); }
.dcode { display: inline-block; min-width: 2.2em; padding: 0 6px; font-size: var(--fs-xs); font-weight: 800; text-align: center; color: var(--on-accent); background: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.7; }
.dcode.big { font-size: var(--fs-md); padding: 2px 10px; }
.pill { display: inline-block; padding: 0 8px; font-size: var(--fs-xs); font-weight: 700; line-height: 1.6; background: var(--red-bg); color: var(--red); border: 1px solid var(--red); white-space: nowrap; }
.notice { padding: var(--s3) var(--s4); background: var(--notice-bg); border-inline-start: 4px solid var(--notice-edge); margin-top: var(--s3); }
.ainotice { font-size: var(--fs-sm); color: var(--ink-2); padding: var(--s2) var(--s3); background: var(--surface); border-inline-start: 4px solid var(--red); margin-block: var(--s3); max-width: 46em; }
.prose { max-width: 46em; }
.prose p, .prose ul, .prose ol { margin-block: var(--s3); }
.prose li { margin-block: var(--s2); }
.factlist { padding-inline-start: 1.2em; max-width: 46em; }
.factlist li { margin-block: var(--s2); }

/* ホーム */
.hero { border-top: 0 !important; margin-top: var(--s4) !important; }
.hero h1 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3rem); margin-top: var(--s4); }
.mapbox { max-width: 720px; margin-inline: auto; background: var(--map-bg); border: 1px solid var(--line); }
.mapbox.mini { max-width: 220px; }
.map-caption { min-height: 1.7em; text-align: center; font-weight: 700; margin-top: var(--s2); }
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.card { display: flex; flex-direction: column; gap: var(--s2); height: 100%; padding: var(--s4); background: var(--surface); border-top: 4px solid var(--accent); color: var(--ink); text-decoration: none; }
.card:hover { background: var(--surface-2); border-top-color: var(--red); }
.card b { font-size: var(--fs-lg); }
.card span { font-size: var(--fs-sm); color: var(--ink-2); }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }

/* 地図 */
.map { display: block; width: 100%; height: auto; }
.map use { stroke: var(--map-line); stroke-width: .7px; }
.map .dep { fill: var(--map-land); }
.map a:hover .dep, .map a:focus-visible .dep { fill: var(--red); }
.map .dep-bg { fill: var(--map-bg-dep); }
.map .dep-self { fill: var(--red); stroke: #000; stroke-width: 1.2px; }
.map .dep-near { fill: var(--map-near); }
.map a:hover .dep-near, .map a:focus-visible .dep-near { fill: #9fb0cf; }
.map-choro a:hover use, .map-choro a:focus-visible use { stroke: #000; stroke-width: 2px; }
.map a:focus-visible { outline: none; }
.map a:focus-visible use { stroke: #000; stroke-width: 2.5px; }
.inset-frame { stroke: var(--map-frame); stroke-width: 1px; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.ring { fill: none; stroke: var(--red); stroke-width: 2.5px; vector-effect: non-scaling-stroke; }
.dot { fill: #fff; stroke: #000; stroke-width: 2px; vector-effect: non-scaling-stroke; }
.mapduo { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: flex-start; }
.mapduo .mapbox { margin-inline: 0; flex: 1 1 260px; }
.mapduo .mapbox.mini { flex: 0 1 180px; }
.legend h3 { margin-top: var(--s4); }
.legend-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: var(--fs-sm); }
.legend-list li { display: inline-flex; align-items: center; gap: var(--s2); }
.sw { border: 1px solid var(--ink-3); flex: none; }

/* 一覧 */
.controls { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: end; margin-block: var(--s3); }
.controls .grow { flex: 1; min-width: 220px; display: grid; }
.controls input { font: inherit; width: 100%; min-height: 48px; padding: 8px var(--s4); border: 2px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); }
.group + .group { margin-top: var(--s5); }
.group h3 a { color: var(--ink); text-decoration: none; }
.group h3 a:hover { text-decoration: underline; }
.dgrid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 var(--s4); }
.dcard { display: flex; align-items: center; gap: var(--s3); min-height: 52px; padding: var(--s2) var(--s2); border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; font-weight: 700; }
.dcard:hover { background: var(--surface); }
.rgrid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s4); }
.rcard { padding: var(--s4); background: var(--surface); border-top: 4px solid var(--accent); }
.rcard h3 { margin-top: 0; }
.rcard h3 a { color: var(--ink); }
.rlist { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 var(--s4); }
.rlist li > a { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s2); border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; line-height: 1.4; }
.rlist li > a:hover { background: var(--surface); }
.rlist li > a span { color: var(--ink-3); font-size: var(--fs-sm); white-space: nowrap; }

/* 県・地域圏のページ */
.dsplit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--s5) var(--s6); align-items: start; margin-top: var(--s5); }
.dsplit > section { margin: 0 !important; border-top: 2px solid var(--accent); padding-top: var(--s4); }
@media (max-width: 900px) { .dsplit { grid-template-columns: 1fr; } }
.facts { display: grid; gap: 0; }
.facts > div { display: grid; grid-template-columns: minmax(7em, 34%) minmax(0, 1fr); gap: var(--s3); padding: var(--s3) var(--s1); border-bottom: 1px solid var(--line-soft); line-height: 1.5; align-items: baseline; }
.facts dt { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); }
.srcblock { padding: var(--s4); margin-top: var(--s4); background: var(--surface); border-top: 4px solid var(--accent); }
.srcblock h3 { margin-top: 0; }
.srcblock p { margin-top: var(--s2); }

/* 表 */
.tablewrap { overflow-x: clip; border-top: 2px solid var(--ink); background: var(--paper); }
.table { border-collapse: collapse; width: 100%; line-height: 1.4; }
.table th, .table td { padding: var(--s3) var(--s3); border-bottom: 1px solid var(--line-soft); text-align: start; vertical-align: middle; }
.table thead th { font-size: var(--fs-sm); font-weight: 800; color: var(--ink-2); border-bottom: 1px solid var(--ink); white-space: nowrap; }
.table tbody tr:hover { background: var(--surface); }
.table .num { text-align: end; font-variant-numeric: tabular-nums; }
.table .code { font-variant-numeric: tabular-nums; font-weight: 800; width: 4.5em; }
.table th[scope='row'] { font-weight: 700; }
.table th[scope='row'] a { color: var(--ink); text-decoration: none; }
.table th[scope='row'] a:hover { text-decoration: underline; }
.table .grp th { background: var(--surface); font-size: var(--fs-sm); letter-spacing: .02em; }
.table .yr { color: var(--ink-3); font-size: var(--fs-sm); }
.table .rk.top { font-weight: 800; color: var(--red); }
.table .missing { color: var(--ink-3); }
.nd { font-style: italic; }
.fn a { font-size: .8em; padding: 0 2px; }
.ranktable .rank { width: 4.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ranktable .rank.top { color: var(--red); font-size: var(--fs-lg); }
.tie { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 400; margin-inline-start: 2px; }
.notes { padding-inline-start: 1.4em; max-width: 46em; }
.notes li { margin-block: var(--s2); }
.factstrip { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); font-size: var(--fs-sm); }
.factstrip li { padding: 2px var(--s3); background: var(--surface); border: 1px solid var(--line-soft); font-weight: 700; }
.rnote { background: var(--surface); padding: var(--s4) var(--s5) var(--s5) !important; border-top: 4px solid var(--accent) !important; }
.rnote > * { max-width: 46em; }
.rnote p { margin-top: var(--s2); }
.summary { list-style: none; padding: 0; display: grid; gap: var(--s2); max-width: 46em; }
.summary li { padding: var(--s3) var(--s4); background: var(--surface); border-inline-start: 4px solid var(--accent); font-weight: 700; }
.samelink { margin-top: var(--s5); }
@media (max-width: 640px) {
  .table th, .table td { padding: var(--s2) var(--s2); }
  .stats thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stats tbody tr:not(.grp) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s3); padding: var(--s2) var(--s2); border-bottom: 1px solid var(--line-soft); }
  .stats tbody tr > * { border: 0; padding: 1px 0; }
  .stats tbody tr:not(.grp) > th { grid-column: 1 / -1; }
  .stats .rk { grid-column: 1; }
  .stats td.val { grid-column: 1; text-align: start; font-weight: 700; }
  .stats td.yr { grid-column: 2; grid-row: 2 / span 2; align-self: end; }
  .stats .grp, .stats .grp th { display: block; }
  .facts > div { grid-template-columns: 6.5em minmax(0, 1fr); }
  .rnote { padding: var(--s3) var(--s4) var(--s4) !important; }
}

/* フッター */
.totop { position: fixed; inset-inline-end: 12px; bottom: 12px; display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; background: var(--ink); color: var(--bg); text-decoration: none; opacity: .85; z-index: 15; }
.site-foot { background: var(--surface); border-top: 1px solid var(--line); padding-block: var(--s6); margin-top: var(--s6); font-size: var(--fs-sm); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s5); }
.foot-grid h2 { font-size: var(--fs-sm); margin-bottom: var(--s2); color: var(--ink-2); }
.foot-grid ul { list-style: none; padding: 0; }
.foot-grid li a { display: inline-block; padding: 3px 0; color: var(--ink); }
.foot-name { font-weight: 800; }
.foot-desc { color: var(--ink-2); margin-top: var(--s1); }
.foot-notes { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); color: var(--ink-2); display: grid; gap: var(--s2); max-width: 60em; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }

/* ルート・404 */
.rootpage { text-align: center; padding-top: var(--s7); }
.rootpage .logo-mark { width: 72px; height: 72px; margin-inline: auto; }
.rootpage .lead { margin-inline: auto; }
.langgrid { list-style: none; padding: 0; margin: var(--s5) auto 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s3); max-width: 720px; }
.langgrid a { display: flex; flex-direction: column; gap: 2px; padding: var(--s4); background: var(--surface); border-top: 4px solid var(--accent); color: var(--ink); text-decoration: none; }
.langgrid a:hover { background: var(--surface-2); border-top-color: var(--red); }
.langgrid a span { font-size: var(--fs-sm); color: var(--ink-2); }

/* お問い合わせフォーム (PHP が差しこむ) */
.cf-form { display: grid; gap: var(--s4); max-width: 40em; }
.cf-field { display: grid; gap: var(--s1); }
.cf-field label { font-weight: 700; }
.cf-field input, .cf-field select, .cf-field textarea { font: inherit; width: 100%; padding: 10px var(--s3); border: 2px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); }
.cf-field small { color: var(--ink-3); }
.cf-req { font-size: var(--fs-xs); background: var(--red); color: #fff; padding: 1px 6px; margin-inline-start: 6px; }
.cf-opt { font-size: var(--fs-xs); background: var(--surface-2); padding: 1px 6px; margin-inline-start: 6px; }
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-error { padding: var(--s3) var(--s4); background: var(--red-bg); border-inline-start: 4px solid var(--red); }
.cf-ok { padding: var(--s3) var(--s4); background: var(--notice-bg); border-inline-start: 4px solid var(--ok); }

/* フランス語はサイト名が長いので、デスクトップ幅でも、ロゴ + 言語メニューの 1 行と、ナビの 1 行に分ける */
html:not([lang="ja"]) .logo { flex: 1 1 0; min-width: 0; }
html:not([lang="ja"]) .langmenu { order: 2; }
html:not([lang="ja"]) .nav { order: 3; flex: 0 0 100%; flex-wrap: wrap; border-top: 1px solid var(--line-soft); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--s2); }
html:not([lang="ja"]) .nav a { min-height: 44px; padding: 0 var(--s2); }
@media (min-width: 1001px) { html:not([lang="ja"]) .nav { margin-inline: 0; padding-inline: 0; } html:not([lang="ja"]) .nav a:first-child { padding-inline-start: 0; } }

/* 同意バナー (EU圏の閲覧者にだけ、public/analytics.js が出す。「同意する」と「同意しない」は同じ見た目) */
.consent { position: fixed; inset-inline: var(--s3); bottom: var(--s3); z-index: 90; max-width: 760px; margin-inline: auto; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); padding: var(--s4); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); font-size: var(--fs-sm); line-height: 1.6; }
.consent p { flex: 1 1 320px; }
.consent-btns { display: flex; gap: var(--s2); margin-inline-start: auto; }
.consent-btns .btn { min-width: 104px; justify-content: center; }
body:has(.consent) .totop { bottom: 112px; }
@media print { .consent { display: none; } }
.facts dd small { display: block; margin-top: var(--s1); color: var(--ink-2); font-size: var(--fs-sm); }

/* ───────── ゲーム (src/client/games.js) ───────── */
.gamecards .gplay { margin-top: auto; font-weight: 800; color: var(--accent); }
.gameapp { max-width: 760px; }
.gsetup { display: grid; gap: var(--s4); justify-items: start; padding: var(--s4) 0; }
.gfield { display: grid; gap: var(--s2); }
.gfield-l { font-weight: 700; }
.gfield select { min-height: 48px; font: inherit; padding: 4px var(--s3); border: 2px solid var(--ink); background: var(--paper); color: var(--ink); max-width: 100%; }
.ghead { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; font-weight: 800; padding-bottom: var(--s2); border-bottom: 2px solid var(--line); margin-bottom: var(--s3); }
.gq-s { font-variant-numeric: tabular-nums; }
.gprompt { font-size: var(--fs-lg); font-weight: 800; line-height: 1.4; margin-bottom: var(--s3); }
.gchoices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.gchoice { justify-content: center; text-align: center; min-height: 56px; width: 100%; }
.gchoice:disabled { cursor: default; }
.gchoice.is-ok { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.gchoice.is-bad { background: var(--ng); border-color: var(--ng); color: var(--bg); }
.gfeedback { margin-top: var(--s3); min-height: 3em; }
.gok { font-weight: 800; color: var(--ok); }
.gng { font-weight: 800; color: var(--ng); }
.gfeedback + .btn { margin-top: var(--s3); }
.gvalues p { margin: 0; }
.gresult { text-align: center; padding: var(--s5) 0; display: grid; gap: var(--s3); justify-items: center; }
.gscore { font-size: var(--fs-xl, 1.5rem); font-weight: 800; }
.grow { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.gbest { color: var(--ink-2); }
.gholding { min-height: 1.6em; font-weight: 700; }
.gameapp + .gamemap { margin-top: var(--s4); }
.gamemap { max-width: 760px; margin-inline: 0; }
.map-game .dep { cursor: pointer; }
.map-game .dep:hover { fill: #9fb0cf; }
.map-game .dep.is-off { opacity: .35; pointer-events: none; }
.map-game .dep.is-bad { fill: var(--ng); }
.map-game .dep.is-target { fill: var(--ok); }
.map-game .dep.is-sel { fill: #e6a23c; stroke-width: 2px; }
.gcheck { margin-top: var(--s3); }
.pzlist { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s3); width: 100%; }
.pzreg { flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; height: 100%; text-align: start; }
.pzreg span { font-weight: 600; font-size: var(--fs-sm); }
.pz { background: var(--map-bg); border: 1px solid var(--line); margin-top: var(--s2); }
.pz-svg { display: block; width: 100%; height: auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.pz-slot { fill: var(--map-bg-dep); stroke: var(--map-frame); stroke-width: 1px; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.pz-slot.is-done { fill: none; stroke: none; }
.pz-slot.is-hint { fill: #ffe38a; stroke: #b58a00; stroke-dasharray: none; }
.pz-piece { cursor: grab; }
.pz-piece.is-drag { cursor: grabbing; }
.pz-pc { fill: var(--map-land); stroke: var(--ink); stroke-width: 1.4px; vector-effect: non-scaling-stroke; }
.pz-piece:hover .pz-pc { fill: #9fb0cf; }
.pz-piece.is-placed { cursor: default; }
.pz-piece.is-placed .pz-pc { fill: var(--ok); stroke: var(--bg); }
.pz-piece.is-hint .pz-pc { fill: #ffe38a; stroke: #b58a00; stroke-width: 3px; }
.pz-label { fill: var(--ink); font-weight: 700; pointer-events: none; }
@media (max-width: 600px) { .gchoices { grid-template-columns: 1fr; } .gpair { grid-template-columns: 1fr 1fr; } }
