/* B＝パタパタ案内盤。キーワードの枠・質問数・返事が、文字の板が回って止まる表示。質問でキーワードに触れると、その枠の板が回って語で止まる */
@import url("https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@500;700;900&display=swap");
:root {
  --case: #1d2023; --panel: #191b1e; --edge: #2d3136; --flap: #161718; --txt: #f1eee6; --dim: #858a92;
  --amber: #ffb21e; --yes: #3bd67f; --no: #ff4b4b; --part: #ffb21e; --none: #5d636b; --blue: #7cc4ff; --enamel: #eeece4;
  --font: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; color: var(--txt); font-family: var(--font); font-weight: 500; line-height: 1.7;
  height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, #2a2e33, transparent 70%), #121315; }
button { font: inherit; cursor: pointer; color: inherit; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
a { color: var(--amber); }
.err { color: var(--no); margin: .3em 0 0; font-size: 13px; font-weight: 700; }
.err:empty { display: none; }

.top { display: flex; align-items: center; gap: 1em; padding: .5em 28px; }
.logo { font-weight: 900; font-size: 19px; letter-spacing: .12em; color: var(--txt); text-decoration: none; white-space: nowrap; }
.logo i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--amber); margin-right: .6em; box-shadow: 0 0 10px var(--amber); vertical-align: .05em; }
.pages { display: flex; gap: 2px; margin-left: .6em; }
.pages a { color: var(--dim); text-decoration: none; font-size: 14px; font-weight: 700; padding: .15em .8em; border-radius: 4px; letter-spacing: .1em; white-space: nowrap; }
.pages a:hover { color: var(--txt); background: #24272b; }
.pages a.on { color: #111; background: var(--amber); }
.acts button { background: #24272b; border: 1px solid #3a3f45; border-radius: 4px; padding: .1em .9em; font-size: 13px; font-weight: 700; }
.acts button:hover { border-color: var(--amber); }
#head-info { font-size: 13px; }
#head-info .err { margin: 0; }
.acts { display: flex; gap: .5em; margin-left: auto; }

/* 遊ぶ前の3画面（トップ・問題一覧・遊び方）。盤・札・ランプの部品で組む */
main.page { display: block; min-height: 0; overflow-y: auto; padding: 18px 28px 28px; }
.page-wrap { max-width: 1160px; margin: 0 auto; }
.pno { font-size: 13px; font-weight: 900; color: #111; background: var(--enamel); border-radius: 3px; padding: 0 .55em; letter-spacing: .08em; white-space: nowrap; }
.genre { font-size: 12px; font-weight: 900; color: var(--amber); border: 1px solid var(--amber); border-radius: 3px; padding: 0 .6em; letter-spacing: .15em; white-space: nowrap; }
.diff { display: inline-flex; align-items: center; gap: .5em; font-size: 12px; color: var(--dim); letter-spacing: .1em; white-space: nowrap; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: #2a2c2f; box-shadow: inset 0 1px 2px #000; }
.dots i.on { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.page-title { margin: 0; font-size: 24px; font-weight: 900; letter-spacing: .15em; }

/* トップ（設計部の試作 2026-11-15_umigame_top_mock を本体へ）。入口・1問のぞく・問題を選ぶ・遊び方の3手順・問題を作る・足元 */
main.page.home-top { padding: 0; scroll-behavior: smooth; }
body.page-home::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(12, 13, 14, .82), rgba(12, 13, 14, .93)), url("/img/bg/station") center / cover; filter: blur(3px); transform: scale(1.03); }
.home-top .wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.home-top .btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; border: none; border-radius: 6px; padding: .65em 1.6em; font-weight: 900; font-size: 16px; letter-spacing: .15em; text-decoration: none; white-space: nowrap; cursor: pointer; }
.home-top .btn.go { background: var(--amber); color: #111; box-shadow: 0 4px 0 #a86f00; }
.home-top .btn.sub { background: var(--enamel); color: #111; box-shadow: 0 4px 0 #9e9b91; }
.home-top .btn.ghost { background: #24272b; color: var(--txt); border: 1px solid #3a3f45; box-shadow: none; font-size: 14px; padding: .5em 1.2em; white-space: normal; letter-spacing: .08em; }
.home-top .btn.ghost:hover { border-color: var(--amber); }
.home-top .btn:active { translate: 0 3px; box-shadow: none; }
.home-top .btn.big { font-size: 18px; padding: .75em 2em; }
.home-top .board { background: #0c0d0e; border-radius: 10px; box-shadow: inset 0 2px 12px #000, 0 0 0 6px #2a2d32, 0 0 0 7px #3b4046, 0 14px 30px rgba(0, 0, 0, .5); }

/* 1. 入口（待合室の絵・サイト名・すぐ遊ぶ・語り部） */
.home-top .hero { position: relative; min-height: min(calc(100vh - 54px), 800px); overflow: hidden; background: url("/img/bg/station") center 40% / cover; }
.home-top .hero::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10, 11, 12, .94) 0%, rgba(10, 11, 12, .82) 38%, rgba(10, 11, 12, .2) 70%, rgba(10, 11, 12, .1)), linear-gradient(transparent 70%, #121315); }
.home-top .hero .wrap { position: relative; height: 100%; min-height: inherit; display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 1fr); align-items: center; gap: 24px; }
.home-top .hero-copy { padding: 56px 0 72px; animation: rise .5s; }
.home-top .eyebrow { margin: 0 0 14px; font-size: 14px; font-weight: 900; color: var(--amber); letter-spacing: .3em; }
.home-top .titleboard { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 8px; background: #000; border-radius: 8px; box-shadow: 0 0 0 5px #2a2d32, 0 0 0 6px #3b4046, 0 14px 30px rgba(0, 0, 0, .6); }
.home-top .titleboard .cell { width: 52px; height: 70px; }
.home-top .titleboard .cell b { font-size: 40px; }
.home-top .tagline { margin: 14px 0 0; font-size: 15px; font-weight: 900; color: #d9d6cd; letter-spacing: .2em; }
.home-top .lead { margin: 22px 0 0; font-size: 26px; font-weight: 900; letter-spacing: .1em; line-height: 1.55; }
.home-top .desc { margin: 12px 0 0; font-size: 16px; line-height: 1.95; color: #d9d6cd; max-width: 34em; }
.home-top .hero-acts { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.home-top .hero-note { margin: 12px 0 0; font-size: 13px; color: var(--dim); }
.home-top .hero-ans { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.home-top .hero-ans .lab { font-size: 13px; color: var(--dim); letter-spacing: .15em; margin-right: 4px; }
.home-top .hero-ans .ans { height: 32px; padding: 0 10px; gap: 7px; }
.home-top .hero-ans .ans b { font-size: 14px; }
.home-top .hero-ans .ans .lamp { width: 9px; height: 9px; }
.home-top .host { position: relative; align-self: end; height: min(calc(100vh - 54px), 800px); margin: 0; display: flex; justify-content: center; align-items: flex-end; }
.home-top .host img { height: 92%; max-width: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .6)); animation: rise .7s; }
.home-top .say { position: absolute; left: 50%; bottom: 7%; translate: -50% 0; width: min(440px, 100%); background: #0b0c0d; border-radius: 10px; padding: 0 20px 16px;
  box-shadow: inset 0 2px 12px #000, 0 0 0 5px #2a2d32, 0 0 0 6px #3b4046, 0 14px 30px rgba(0, 0, 0, .6); animation: rise .6s .4s backwards; }
.home-top .say .nameplate { position: static; display: inline-block; margin-top: 10px; background: var(--amber); color: #111; font-weight: 900; padding: .1em 1.1em; border-radius: 3px; letter-spacing: .3em; font-size: 13px; }
.home-top .say p { margin: .5em 0 0; font-size: 16px; font-weight: 700; line-height: 1.8; }

/* 見出し */
.home-top section.band { padding: 72px 0 8px; }
.home-top .sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1em; flex-wrap: wrap; margin-bottom: 22px; }
.home-top .sec-head h2 { display: flex; align-items: center; gap: .6em; margin: 0; font-size: 24px; font-weight: 900; letter-spacing: .15em; }
.home-top .sec-head h2::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.home-top .sec-head p { margin: 0; color: var(--dim); font-size: 14px; }

/* 2. 1問のぞく */
.home-top .pick { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; padding: 26px 32px 28px; align-items: center; }
.home-top .pick-meta { display: flex; align-items: center; gap: .9em; flex-wrap: wrap; }
.home-top .pick-title { margin: .35em 0 .25em; font-size: 32px; font-weight: 900; letter-spacing: .14em; line-height: 1.3; }
.home-top .pick-story { margin: 0; white-space: pre-line; font-size: 17px; line-height: 2; color: #e4e1d8; }
.home-top .pick-side { display: flex; flex-direction: column; gap: 14px; }
.home-top .pick-side .btn { width: 100%; }
.home-top .pick-side small { color: var(--dim); font-size: 12px; text-align: center; }
.home-top .pick.fresh .pick-main { animation: rise .4s; }

/* 3. 問題を選ぶ（カードは問題一覧と同じ .pcard に、遊ぶの印と「問題を作る」の札を足す） */
.home-top .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.home-top .pcard-go { margin: auto 18px 0; font-size: 13px; font-weight: 900; color: var(--amber); letter-spacing: .15em; }
.home-top .pcard.make-card { border-style: dashed; border-color: #4a4f55; background: rgba(25, 27, 30, .5); grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; text-align: center; padding: 16px 18px; gap: 6px 14px; color: var(--txt); text-decoration: none; }
.home-top .pcard.make-card:hover { border-color: var(--amber); }
.home-top .pcard.make-card .plus { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 900; color: #111; background: var(--amber); box-shadow: 0 3px 0 #a86f00; }
.home-top .pcard.make-card strong { font-size: 18px; letter-spacing: .12em; }
.home-top .pcard.make-card span { font-size: 13px; color: var(--dim); }
.home-top .more, .home-top .howto-more { margin-top: 18px; text-align: right; }

/* 4. 遊び方の3手順 */
.home-top .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.home-top .step { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px; }
.home-top .step h3 { display: flex; align-items: center; gap: .6em; margin: 0; font-size: 18px; font-weight: 900; letter-spacing: .1em; }
.home-top .step h3 .no { display: grid; place-items: center; width: 30px; height: 40px; border-radius: 3px; background: linear-gradient(#202124 0 50%, #18191b 50%); color: var(--amber); font-size: 22px; position: relative; flex: none; }
.home-top .step h3 .no::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - .5px); height: 1px; background: #000; }
.home-top .step p { margin: 0; font-size: 14.5px; line-height: 1.85; color: #d9d6cd; }
.home-top .vis { margin-top: auto; padding: 14px; background: #000; border-radius: 6px; min-height: 120px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.home-top .mini-odai { position: relative; background: var(--enamel); color: #121315; border-radius: 5px; padding: 16px 14px 10px; font-size: 13px; font-weight: 700; line-height: 1.7; box-shadow: 0 3px 0 #a4a196; }
.home-top .mini-odai::before { content: ""; position: absolute; left: calc(50% - 6px); top: 5px; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffd27a, var(--amber) 55%, #8a5400); }
.home-top .demo-ans { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; align-items: center; margin: 0; }
.home-top .demo-ans dt { margin: 0; }
.home-top .demo-ans .ans { height: 30px; padding: 0 9px; gap: 7px; width: 100%; }
.home-top .demo-ans .ans b { font-size: 13px; flex: 1; text-align: center; }
.home-top .demo-ans .ans .lamp { width: 8px; height: 8px; }
.home-top .demo-ans dd { margin: 0; font-size: 12.5px; color: #c9c5b8; line-height: 1.5; }
.home-top .demo-frames { display: flex; flex-direction: column; gap: 9px; }
.home-top .demo-blank { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 4px 8px 4px 4px; background: #111; border-radius: 6px; }
.home-top .demo-blank .reel { display: inline-flex; gap: 3px; }
.home-top .demo-blank .cell { width: 22px; height: 30px; }
.home-top .demo-blank .cell b { font-size: 15px; color: #5f646b; }
.home-top .demo-blank.on .cell b { color: var(--txt); }
.home-top .demo-blank.on .lamp { background: var(--yes); box-shadow: 0 0 10px var(--yes); }
.home-top .vis .cap { font-size: 12px; color: var(--dim); }

/* 5. 問題を作る */
.home-top .makeband { position: relative; display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 0 36px 0 20px; overflow: hidden; }
.home-top .makeband img { display: block; width: 100%; height: 230px; object-fit: cover; object-position: top; margin-top: 18px; }
.home-top .makeband h2 { margin: 0; font-size: 24px; font-weight: 900; letter-spacing: .12em; }
.home-top .makeband p { margin: .5em 0 0; color: #d9d6cd; font-size: 15px; line-height: 1.9; }
.home-top .makeband ul { margin: .6em 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.home-top .makeband li { font-size: 12px; font-weight: 700; color: var(--amber); border: 1px solid #4a3a16; background: #17140c; border-radius: 3px; padding: 0 .7em; }

/* 足元 */
.home-top .site-foot { margin-top: 80px; padding: 26px 0 40px; border-top: 1px solid #24272b; background: rgba(12, 13, 14, .7); }
.home-top .site-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 1em 2em; }
.home-top .site-foot .logo small { display: block; font-size: 11px; font-weight: 700; color: var(--dim); letter-spacing: .15em; }
.home-top .site-foot nav { display: flex; flex-wrap: wrap; gap: .4em 1.4em; }
.home-top .site-foot nav a { color: var(--dim); text-decoration: none; font-size: 13px; }
.home-top .site-foot nav a:hover { color: var(--txt); }

@media (max-width: 1100px) {
  .home-top .pgrid, .home-top .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-top .steps .step:last-child { grid-column: 1 / -1; }
  .home-top .makeband { grid-template-columns: 180px minmax(0, 1fr); }
  .home-top .makeband > :last-child { grid-column: 2; padding-bottom: 24px; }
}

/* 問題一覧: 行き先札のような格子 */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 1em; flex-wrap: wrap; margin-bottom: 16px; }
.sorts { display: flex; align-items: center; gap: .4em; color: var(--dim); font-size: 13px; }
.sorts button { background: #24272b; border: 1px solid #3a3f45; border-radius: 4px; padding: .15em .9em; font-size: 13px; font-weight: 700; }
.sorts button.on { background: var(--amber); color: #111; border-color: var(--amber); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; gap: 10px; text-align: left; padding: 0 0 16px; border: 1px solid var(--edge); border-radius: 8px; background: var(--panel); overflow: hidden; transition: translate .12s, border-color .12s; }
.pcard:hover { border-color: var(--amber); translate: 0 -2px; }
.pcard-meta { display: flex; align-items: center; gap: .7em; flex-wrap: wrap; padding: 12px 18px; background: #0c0d0e; box-shadow: inset 0 -1px 0 #24272b; }
.pcard-title { padding: 0 18px; font-size: 21px; font-weight: 900; letter-spacing: .12em; }
.pcard-story { padding: 0 18px; font-size: 14px; color: var(--dim); line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 遊び方: 目次と本文 */
.howto { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.toc { position: sticky; top: 0; background: var(--panel); border: 1px solid var(--edge); border-radius: 8px; padding: 14px 12px; }
.toc-lab { color: var(--dim); font-size: 12px; letter-spacing: .3em; padding: 0 .6em .5em; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc button { display: block; width: 100%; text-align: left; background: none; border: none; border-radius: 4px; padding: .45em .7em; color: var(--dim); font-size: 14px; font-weight: 700; }
.toc button:hover { color: var(--txt); background: #24272b; }
.toc button.on { color: #111; background: var(--amber); }
.doc { background: #0c0d0e; border-radius: 10px; padding: 18px 32px 24px; box-shadow: inset 0 2px 12px #000, 0 0 0 6px #2a2d32, 0 0 0 7px #3b4046; }
.doc section { padding: 16px 0 10px; border-bottom: 1px solid #1f2225; scroll-margin-top: 8px; }
.doc h2 { display: flex; align-items: center; gap: .6em; margin: 0 0 .3em; font-size: 19px; font-weight: 900; letter-spacing: .1em; }
.doc h2::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.doc p, .doc li { font-size: 15.5px; line-height: 1.9; color: #e4e1d8; }
.doc p { margin: .3em 0; }
.doc ul { margin: .3em 0; padding-left: 1.3em; }
.ansdoc { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 16px; align-items: center; margin: .6em 0; }
.ansdoc dd { margin: 0; font-size: 15px; }
.doc-end { margin-top: 16px; }

/* 遊ぶ画面（配置は stage.css）。駅の案内盤の部品で組む: お題＝琺瑯の札、質問帳と窓＝黒い盤、わかったこと＝パタパタの盤 */
main.stage { --scene: radial-gradient(ellipse 60% 55% at 50% 40%, rgba(255, 178, 30, .12), transparent 70%), linear-gradient(#22262c, #121315 60%, #0b0c0d); }
.plab { display: inline-block; background: var(--amber); color: #111; font-weight: 900; padding: 0 .7em; border-radius: 3px; letter-spacing: .15em; font-size: 12px; }
.plab b { font-size: 14px; }
.stagebar { padding: 6px 14px; background: rgba(12, 13, 14, .88); border-radius: 8px; box-shadow: 0 0 0 1px var(--edge); }
.stagebar .back { background: #24272b; border: 1px solid #3a3f45; border-radius: 4px; padding: .1em .8em; font-size: 13px; font-weight: 700; white-space: nowrap; }
.stagebar .back:hover { border-color: var(--amber); }
.stagebar h1 { font-size: 20px; font-weight: 900; letter-spacing: .12em; }
.qlab { color: var(--dim); font-size: 12px; letter-spacing: .2em; }
#qn { display: inline-flex; gap: 3px; padding: 4px; background: #000; border-radius: 5px; }
#qn .cell { width: 30px; height: 40px; }
#qn .cell b { font-size: 26px; color: var(--amber); }

/* お題（琺瑯の札をピンで留める） */
.odai { background: var(--enamel); color: #121315; border-radius: 6px; padding: 24px 18px 16px; box-shadow: 0 3px 0 #a4a196, 0 12px 24px rgba(0, 0, 0, .6); }
.pin { position: absolute; left: calc(50% - 7px); top: 7px; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffd27a, var(--amber) 55%, #8a5400); box-shadow: 0 2px 3px rgba(0, 0, 0, .5); }
.odai .plab { background: #121315; color: var(--amber); }
#story { margin: .5em 0 0; white-space: pre-line; font-size: 15px; line-height: 1.95; font-weight: 700; }

/* 質問帳（質問と返事の一覧） */
.qbook { background: rgba(25, 27, 30, .94); border: 1px solid var(--edge); border-radius: 8px; padding: 12px 14px; }
#qlog { margin-top: 8px; }
.qrow { padding: .45em 0; border-bottom: 1px solid #24272b; font-size: 13.5px; line-height: 1.5; }
.qno { color: var(--amber); font-weight: 900; font-size: 12px; font-variant-numeric: tabular-nums; }
.qt { overflow-wrap: anywhere; }
.qrow .ans { height: 26px; padding: 0 7px; gap: 6px; }
.qrow .ans b { font-size: 12px; }
.qrow .ans .lamp { width: 8px; height: 8px; }
.qempty { color: var(--dim); font-size: 13px; padding: .4em 0; }

/* わかったこと（行き先の一覧のような盤。キーワードの枠もここ） */
.ledger { background: #0c0d0e; border-radius: 10px; padding: 14px 16px; box-shadow: inset 0 2px 12px #000, 0 0 0 5px #2a2d32, 0 0 0 6px #3b4046, 0 14px 30px rgba(0, 0, 0, .55); }
.frames { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding: 24px 0 10px; }
.blank { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 5px 8px 5px 5px; vertical-align: middle;
  background: #000; border-radius: 6px; line-height: 1; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
.blank::before { content: attr(data-hint); position: absolute; left: 6px; top: -17px; font-size: 11px; font-weight: 700; color: var(--amber); letter-spacing: .2em; line-height: 1; }
.blank.fixed { cursor: default; }
.blank.given .cell b { color: #8d8a80; }
.blank.just { animation: lockin .6s; }
@keyframes blinkline { 50% { outline-color: transparent; } }
@keyframes lockin { 0% { box-shadow: 0 0 0 0 rgba(59, 214, 127, .9); } 100% { box-shadow: 0 0 0 16px rgba(59, 214, 127, 0); } }
.reel { display: inline-flex; gap: 3px; }
.cell { position: relative; display: grid; place-items: center; width: 27px; height: 38px; border-radius: 3px; overflow: hidden;
  background: linear-gradient(#202124 0 50%, #18191b 50%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.cell::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - .5px); height: 1px; background: #000; }
.cell b { font-size: 20px; font-weight: 900; color: var(--txt); }
.cell.flip b { animation: flap .2s ease-in; }
.spinning .cell.flip b { animation-duration: .07s; }
@keyframes flap { 0% { transform: scaleY(1); } 45% { transform: scaleY(.06); filter: brightness(.4); } 100% { transform: scaleY(1); } }
.lamp { width: 12px; height: 12px; border-radius: 50%; background: #2a2c2f; box-shadow: inset 0 1px 2px #000; flex: none; }
.blank.fixed .lamp { background: var(--yes); box-shadow: 0 0 10px var(--yes), 0 0 2px #fff inset; }
.blank.given .lamp { background: #6b5a2c; box-shadow: none; }
#found { margin-top: 4px; }
.fact { display: flex; align-items: center; gap: 10px; padding: .45em .1em; border-bottom: 1px solid #1f2225; font-size: 14px; font-weight: 700; line-height: 1.6; }
.fact::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--yes); box-shadow: 0 0 8px var(--yes); }
.fact.given { color: #a7a397; }
.fact.given::before { background: #6b5a2c; box-shadow: none; }
.fact.todo { color: #4a4f55; font-size: 16px; }
.fact.todo::before { background: #2a2c2f; box-shadow: inset 0 1px 2px #000; }
.fact.fresh { animation: rise .45s; }
.fact.fresh::before { animation: blinkline .12s steps(2) 5; }

/* 語り部の立ち絵（四角い絵のうちは、盤の額に入れる） */
.stand.framed img { border-radius: 8px; box-shadow: 0 0 0 5px #2a2d32, 0 0 0 6px #3b4046, 0 20px 40px rgba(0, 0, 0, .6); }
.stand:not(.framed) img { filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .6)); }

/* 会話の窓（黒い盤に、橙の名札） */
.window { background: #0b0c0d; border-radius: 10px; padding: 0 22px; box-shadow: inset 0 2px 12px #000, 0 0 0 5px #2a2d32, 0 0 0 6px #3b4046, 0 14px 30px rgba(0, 0, 0, .6); }
.wfoot { background: #0b0c0d; box-shadow: 0 -8px 10px -6px #0b0c0d; }
.nameplate { position: sticky; top: 0; z-index: 1; margin-top: 10px; background: var(--amber); color: #111; font-weight: 900; padding: .1em 1.1em; border-radius: 3px; letter-spacing: .3em; font-size: 14px; }
.you { margin: 0; color: var(--dim); font-size: 13px; overflow-wrap: anywhere; }
.wopen { margin: 0; color: var(--amber); font-size: 14px; font-weight: 900; letter-spacing: .05em; animation: rise .45s; } /* その質問で開いたキーワード */
.qopen { display: block; color: var(--amber); font-size: 12px; font-weight: 700; }
.wsay { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.7; overflow-wrap: anywhere; }
.wstory { margin: .2em 0 0; white-space: pre-line; font-size: 16px; line-height: 1.9; color: #e4e1d8; }
.wline .ans { flex: none; height: 44px; padding: 0 14px; }
.wline .ans b { font-size: 20px; }
.wline.fresh .wsay { animation: rise .35s; }
#start, #reveal { height: 44px; padding: 0 1.6em; white-space: nowrap; border: none; border-radius: 8px; background: var(--enamel); color: #111; font-weight: 900; font-size: 16px; letter-spacing: .3em;
  box-shadow: 0 5px 0 #9e9b91, 0 0 0 4px #2a2d32, 0 5px 0 4px #2a2d32; transition: translate .06s, box-shadow .06s; }
#reveal { background: var(--amber); box-shadow: 0 5px 0 #a86f00, 0 0 0 4px #2a2d32, 0 5px 0 4px #2a2d32; }
#start:active, #reveal:active { translate: 0 4px; box-shadow: 0 1px 0 #9e9b91, 0 0 0 4px #2a2d32, 0 1px 0 4px #2a2d32; }
.ans { display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 10px; background: #000; border-radius: 4px; box-shadow: inset 0 0 0 1px #24272b; }
.ans .lamp { width: 11px; height: 11px; }
.ans b { flex: 1; text-align: center; font-size: 17px; font-weight: 900; letter-spacing: .06em; white-space: nowrap; }
.ans.yes b { color: var(--yes); } .ans.yes .lamp { background: var(--yes); box-shadow: 0 0 8px var(--yes); }
.ans.no b { color: var(--no); } .ans.no .lamp { background: var(--no); box-shadow: 0 0 8px var(--no); }
.ans.part b { color: var(--part); } .ans.part .lamp { background: var(--part); box-shadow: 0 0 8px var(--part); }
.ans.none b { color: #8a8f97; }
.ans.wait b { color: #5f646b; animation: blinkline .5s steps(2) infinite; }
.ans.fresh b { animation: flap .16s ease-in 3; }
.ans.fresh .lamp { animation: blinkline .12s steps(2) 5; }
#left { margin: -4px 0 0; text-align: right; font-size: 12px; color: var(--dim); }
#left:empty { display: none; }
#q { flex: 1; min-width: 0; background: #0f1012; border: 1px solid #3a3f45; border-radius: 5px; padding: .55em .9em; font: inherit; font-size: 15px; color: var(--txt); outline: none; }
#q:focus { border-color: var(--amber); }
#q::placeholder { color: #5f646b; }
#q:disabled { opacity: .6; }
#ask button, #done button { background: var(--amber); color: #111; border: none; border-radius: 5px; padding: .55em 1.5em; font-weight: 900; letter-spacing: .2em; box-shadow: 0 3px 0 #a86f00; white-space: nowrap; }
#ask button:active:not(:disabled), #done button:active { translate: 0 2px; box-shadow: 0 1px 0 #a86f00; }
#ask button:disabled { opacity: .5; }
#done { display: flex; gap: 8px; align-items: center; padding-top: 10px; border-top: 1px solid var(--edge); }
#done span { font-weight: 700; }
#done button { margin-left: auto; }
.sentence { margin: .3em 0 0; font-size: 17px; font-weight: 900; line-height: 1.75; animation: rise .45s; }
#truth { padding: .5em 1em; border-left: 4px solid var(--amber); background: #17181a; animation: rise .45s; }
#truth .t { color: var(--amber); font-size: 12px; font-weight: 900; letter-spacing: .3em; }
#truth p { margin: 0; white-space: pre-line; font-size: 15px; line-height: 1.85; }
#big { padding: 5px; background: #000; border-radius: 6px; box-shadow: 0 0 0 4px #2a2d32, 0 10px 24px rgba(0, 0, 0, .6); }
#big .cell { width: 52px; height: 70px; }
#big .cell b { font-size: 40px; color: var(--yes); }
#big.gave .cell b { color: #c9c5b8; }
@keyframes rise { from { opacity: 0; translate: 0 8px; } }


/* 問題を作る: 案内盤の用紙 */
.make { max-width: 960px; }
.make-note { margin: .6em 0 1.2em; font-size: 14px; color: var(--dim); border-left: 4px solid var(--amber); padding: .2em 1em; background: #17181a; }
.mkform, .mk-done { background: #0c0d0e; border-radius: 10px; padding: 22px 30px 24px; animation: rise .45s;
  box-shadow: inset 0 2px 12px #000, 0 0 0 6px #2a2d32, 0 0 0 7px #3b4046; }
.mk-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px 100px; gap: 14px; }
.fld { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 13px; font-weight: 700; color: var(--dim); letter-spacing: .08em; }
.fld em { margin-left: .6em; font-style: normal; font-size: 11px; color: var(--amber); }
.fld small { margin-left: .6em; font-size: 11px; font-weight: 500; color: #5f646b; }
.fld input, .fld textarea, .fld select { width: 100%; padding: .5em .8em; border: 1px solid #3a3f45; border-radius: 5px; background: #0f1012; color: var(--txt); font: inherit; font-size: 15px; font-weight: 500; letter-spacing: 0; outline: none; }
.fld input:focus, .fld textarea:focus, .fld select:focus { border-color: var(--amber); }
.fld textarea { resize: vertical; line-height: 1.7; }
.kwgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.kwbox { min-width: 0; margin: 0 0 12px; padding: 8px 12px 0; border: 1px solid #2d3136; border-radius: 6px; background: #121315; }
.kwbox legend { padding: 0 .7em; border-radius: 3px; background: var(--amber); color: #111; font-size: 12px; font-weight: 900; letter-spacing: .15em; }
#makeForm .err { white-space: pre-line; font-size: 14px; }
.mk-done p { margin: 0 0 .4em; font-size: 17px; font-weight: 900; }
.form-acts { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.form-acts button { border: none; border-radius: 6px; padding: .6em 1.6em; font-weight: 900; font-size: 16px; letter-spacing: .15em; }
.form-acts .go { background: var(--amber); color: #111; box-shadow: 0 4px 0 #a86f00; }
.form-acts .sub { background: var(--enamel); color: #111; box-shadow: 0 4px 0 #9e9b91; }
.form-acts button:active { translate: 0 3px; box-shadow: none; }

@media (max-width: 900px) {
  .home-top .wrap { padding: 0 16px; }
  .home-top .hero { min-height: 0; background-position: 30% 40%; }
  .home-top .hero::before { background: linear-gradient(rgba(10, 11, 12, .82), rgba(10, 11, 12, .9) 60%, #121315); }
  .home-top .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .home-top .hero-copy { padding: 32px 0 8px; }
  .home-top .titleboard .cell { width: 40px; height: 54px; }
  .home-top .titleboard .cell b { font-size: 30px; }
  .home-top .lead { font-size: 20px; }
  .home-top .desc { font-size: 15px; }
  .home-top .hero-acts .btn { flex: 1 1 100%; }
  .home-top .host { height: auto; flex-direction: column; align-items: center; padding-bottom: 24px; }
  .home-top .host img { height: 300px; width: auto; }
  .home-top .say { position: relative; left: auto; bottom: auto; translate: none; margin-top: -40px; }
  .home-top section.band { padding-top: 52px; }
  .home-top .pick { grid-template-columns: minmax(0, 1fr); padding: 20px 18px 22px; }
  .home-top .pick-title { font-size: 24px; }
  .home-top .pick-story { font-size: 15px; }
  .home-top .pgrid, .home-top .steps { grid-template-columns: minmax(0, 1fr); }
  .home-top .steps .step:last-child { grid-column: auto; }
  .home-top .makeband { grid-template-columns: minmax(0, 1fr); padding: 0 18px 22px; gap: 14px; }
  .home-top .makeband img { height: 180px; width: 160px; margin: 14px auto 0; }
  .home-top .makeband > :last-child { grid-column: auto; padding-bottom: 0; }
  .home-top .makeband .btn { width: 100%; }
  .home-top .btn.big { font-size: 16px; padding: .7em 1em; }
  .mk-row, .kwgrid { grid-template-columns: minmax(0, 1fr); }
  .mkform, .mk-done { padding: 18px 16px; }
  .pages, .acts { margin-left: 0; }
  main.page { padding: 14px 12px 24px; }
  .howto { grid-template-columns: 1fr; }
  .toc { position: static; }
  .pgrid { grid-template-columns: minmax(0, 1fr); }
  .doc { padding: 16px 18px 22px; }
  body { height: auto; display: block; overflow: auto; }
  .top { flex-wrap: wrap; padding: .5em 12px; }
}
