/* 語源ゲームセンター */
.g-start { text-align: center; max-width: 560px; margin: 0 auto; padding: 10px 0; }
.g-how { font-size: 0.98rem; line-height: 1.9; margin-bottom: 18px; }
.g-lv { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 18px; }
.g-lv button { border: 2px solid var(--line); background: var(--paper); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 0.84rem; cursor: pointer; }
.g-lv button[aria-checked='true'] { background: var(--ink); color: var(--bg); }
.g-go { min-width: 200px; min-height: 52px; font-size: 1.1rem; }
.g-best { font-size: 0.86rem; color: var(--ink-2); margin-top: 12px; }

.g-hud { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; font-size: 0.86rem; font-weight: 700; color: var(--ink-2); }
.g-hud b { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
.g-score b { color: var(--root); }
.g-bar { height: 6px; border-radius: 99px; background: var(--paper-2); border: 1.5px solid var(--line-soft); margin: 8px 0 16px; overflow: hidden; }
.g-bar i { display: block; height: 100%; background: var(--root); transition: width 0.3s; }
.g-bar.time i { background: var(--pre); transition: width 0.1s linear; }
.g-q { text-align: center; }
.g-prompt { margin-bottom: 14px; }
.g-big { font-family: var(--serif); font-weight: 800; font-size: clamp(2rem, 8vw, 3rem); line-height: 1.1; letter-spacing: -0.01em; }
.g-ask { font-weight: 900; font-size: 1.05rem; margin: 10px 0 4px; }
.g-sub { color: var(--ink-2); font-size: 0.88rem; margin: 4px 0; }
.g-claim { font-size: 1.05rem; margin-top: 12px; background: var(--paper-2); border-radius: 14px; padding: 10px 14px; display: inline-block; }
.g-rimg { width: 110px; height: 110px; border-radius: 18px; border: 2px solid var(--line); margin: 0 auto 8px; }
.g-parts { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; align-items: center; margin: 10px 0; }
.g-parts i { font-style: normal; color: var(--ink-3); font-weight: 900; }
.gp { display: inline-flex; flex-direction: column; align-items: center; border: 2px solid var(--line); border-radius: 12px; padding: 4px 12px; background: var(--paper); }
.gp b { font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; }
.gp small { font-size: 0.74rem; font-weight: 700; color: var(--ink-2); }
.gp.k-pre { background: var(--pre-bg); } .gp.k-pre b { color: var(--pre); }
.gp.k-root { background: var(--root-bg); } .gp.k-root b { color: var(--root); }
.gp.k-suf { background: var(--suf-bg); } .gp.k-suf b { color: var(--suf); }
.gp.k-base { background: var(--base-bg); } .gp.k-base b { color: var(--base); }

.g-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 620px; margin: 0 auto; }
.g-opts button { min-height: 56px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); font-weight: 700; font-size: 0.95rem; cursor: pointer; box-shadow: var(--shadow); transition: transform 0.1s; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.g-opts button:hover:not(:disabled) { transform: translate(-1px, -1px); }
.g-opts button:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.g-opts button .en { font-family: var(--serif); font-size: 1.25rem; font-weight: 800; }
.g-opts button small { font-size: 0.74rem; color: var(--ink-2); font-weight: 500; }
.g-opts.big button { min-height: 72px; }
.g-opts.tf { grid-template-columns: 1fr 1fr; max-width: 420px; }
.g-opts.tf button { font-size: 1.15rem; min-height: 64px; }
.g-opts button.ok, .acc-pick button.ok { background: color-mix(in srgb, var(--ok) 20%, var(--paper)); border-color: var(--ok); }
.g-opts button.ng, .acc-pick button.ng { background: color-mix(in srgb, var(--ng) 16%, var(--paper)); border-color: var(--ng); }
@media (max-width: 520px) { .g-opts { grid-template-columns: 1fr; } .g-opts.tf { grid-template-columns: 1fr 1fr; } .game-stage { padding: 14px; } }
.g-explain { margin: 14px auto 0; max-width: 620px; background: var(--paper-2); border: 2px dashed var(--line-soft); border-radius: 14px; padding: 10px 14px; text-align: center; font-size: 0.92rem; line-height: 1.75; }
.g-explain a { color: var(--root); font-weight: 700; }
.g-next { margin-top: 14px; }

/* 結果 */
.g-result { text-align: center; padding: 10px 0; position: relative; }
.g-res-rank { font-size: clamp(1.6rem, 6vw, 2.2rem); font-weight: 900; color: var(--root); }
.g-res-score { font-family: var(--serif); font-size: 2.4rem; font-weight: 800; margin: 2px 0; }
.g-res-best { display: inline-block; background: var(--gold); color: #1a1a1a; font-weight: 900; border-radius: 999px; padding: 2px 14px; font-size: 0.86rem; }
.g-res-sub { font-size: 0.84rem; color: var(--ink-3); }
.g-res-xp { margin: 10px 0 16px; font-weight: 700; color: var(--pre); }
.g-res-xp small { color: var(--ink-2); font-weight: 500; }
.g-review { margin-top: 20px; text-align: left; }
.g-review > p { font-size: 0.8rem; font-weight: 900; color: var(--ink-3); margin: 0 0 6px; }
.g-rev-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.g-rev-list a { display: block; text-decoration: none; padding: 6px 10px; border-radius: 10px; border: 2px solid var(--line-soft); background: var(--paper); }
.g-rev-list a.ok { border-left: 5px solid var(--ok); }
.g-rev-list a.ng { border-left: 5px solid var(--ng); }
.g-rev-list b { font-family: var(--serif); display: block; }
.g-rev-list span { font-size: 0.74rem; color: var(--ink-2); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.g-confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: fall 2.2s ease-in forwards; }
@keyframes fall { to { top: 105%; transform: rotate(540deg); } }

/* ぶった切り */
.g-slice { display: flex; justify-content: center; align-items: stretch; margin: 18px auto; flex-wrap: wrap; row-gap: 8px; }
.sl-c { font-family: var(--serif); font-weight: 800; font-size: clamp(1.7rem, 7vw, 2.6rem); width: clamp(26px, 7vw, 40px); text-align: center; background: var(--paper-2); border-top: 2.5px solid var(--line); border-bottom: 2.5px solid var(--line); line-height: 1.5; }
.sl-c:first-child { border-left: 2.5px solid var(--line); border-radius: 12px 0 0 12px; }
.sl-c:last-child { border-right: 2.5px solid var(--line); border-radius: 0 12px 12px 0; }
.sl-gap { width: 14px; border: 0; padding: 0; background: var(--paper-2); border-top: 2.5px solid var(--line); border-bottom: 2.5px solid var(--line); cursor: pointer; position: relative; }
.sl-gap::after { content: ''; position: absolute; left: 50%; top: 18%; bottom: 18%; width: 2px; background: var(--line-soft); transform: translateX(-50%); }
.sl-gap:hover::after { background: var(--root); }
.sl-gap.on { background: var(--root); }
.sl-gap.on::after { background: #fff; width: 3px; top: -6px; bottom: -6px; }

/* 合体パズル・旅 */
.g-slots { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 16px 0; flex-wrap: wrap; }
.g-slots i { font-style: normal; font-weight: 900; color: var(--ink-3); }
.slot { min-width: 84px; height: 54px; border: 2.5px dashed var(--line-soft); border-radius: 14px; display: grid; place-items: center; background: var(--paper-2); }
.slot b { font-family: var(--serif); font-size: 1.5rem; }
.slot b.k-pre { color: var(--pre); } .slot b.k-root { color: var(--root); } .slot b.k-suf { color: var(--suf); } .slot b.k-base { color: var(--base); }
.g-tiles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0 14px; }
.tile-p { display: flex; flex-direction: column; align-items: center; min-width: 84px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); cursor: pointer; }
.tile-p b { font-family: var(--serif); font-size: 1.25rem; }
.tile-p small { font-size: 0.72rem; color: var(--ink-2); }
.tile-p.k-pre b { color: var(--pre); } .tile-p.k-root b { color: var(--root); } .tile-p.k-suf b { color: var(--suf); } .tile-p.k-base b { color: var(--base); }
.tile-p:disabled { opacity: 0.3; box-shadow: none; cursor: default; }
.g-path { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 0; margin: 12px 0; min-height: 52px; counter-reset: p; }
.g-path li { display: flex; flex-direction: column; align-items: center; padding: 4px 12px; border-radius: 12px; background: var(--root-bg); border: 2px solid var(--line); position: relative; }
.g-path li + li { margin-left: 18px; }
.g-path li + li::before { content: '→'; position: absolute; left: -18px; top: 50%; transform: translateY(-50%); color: var(--root); font-weight: 900; }
.g-path li small { font-size: 0.68rem; font-weight: 900; color: var(--ink-3); }
.g-path li b { font-family: var(--serif); }

/* 神経衰弱 */
.g-mem { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; perspective: 800px; }
.mem-c { position: relative; aspect-ratio: 4/3; border: 0; padding: 0; background: none; cursor: pointer; transform-style: preserve-3d; transition: transform 0.35s; }
.mem-c.open, .mem-c.done { transform: rotateY(180deg); }
.mem-back, .mem-face { position: absolute; inset: 0; border: 2px solid var(--line); border-radius: 14px; display: grid; place-items: center; backface-visibility: hidden; padding: 6px; }
.mem-back { background: var(--ink) repeating-linear-gradient(45deg, transparent 0 8px, rgba(255, 255, 255, 0.06) 8px 16px); }
.mem-face { background: var(--paper); transform: rotateY(180deg); font-weight: 700; font-size: 0.9rem; line-height: 1.35; }
.mem-face.en { font-family: var(--serif); font-size: 1.4rem; font-weight: 800; color: var(--root); }
.mem-c.done .mem-face { background: color-mix(in srgb, var(--ok) 18%, var(--paper)); border-color: var(--ok); }
@media (max-width: 520px) { .g-mem { grid-template-columns: repeat(3, 1fr); gap: 7px; } .mem-face { font-size: 0.78rem; } .mem-face.en { font-size: 1.15rem; } }

/* スピード */
.g-speed { text-align: center; padding: 18px; margin: 4px auto 16px; max-width: 460px; border: 2.5px solid var(--line); border-radius: 18px; background: var(--paper-2); }
.g-speed small { font-weight: 900; color: var(--pre); font-size: 0.8rem; }
.g-speed p { font-weight: 900; font-size: 1.1rem; margin: 6px 0 0; }
.g-timer b { color: var(--pre); }

/* ワードル */
.wd-grid { display: grid; gap: 6px; justify-content: center; margin: 4px 0 12px; }
.wd-row { display: grid; grid-template-columns: repeat(5, 52px); gap: 6px; }
.wd-c { height: 52px; border: 2.5px solid var(--line-soft); border-radius: 10px; display: grid; place-items: center; font-family: var(--serif); font-weight: 800; font-size: 1.6rem; text-transform: uppercase; background: var(--paper); }
.wd-c.typed { border-color: var(--line); }
.wd-c.hit { background: var(--pre); border-color: var(--pre); color: #fff; }
.wd-c.near { background: var(--gold); border-color: var(--gold); color: #1a1a1a; }
.wd-c.no { background: var(--ink-3); border-color: var(--ink-3); color: #fff; }
.wd-hints { text-align: center; font-size: 0.88rem; min-height: 2em; margin-bottom: 10px; }
.wd-hints p { margin: 2px 0; }
.wd-kb { display: grid; gap: 6px; }
.wd-kb > div { display: flex; justify-content: center; gap: 4px; }
.wd-kb button { min-width: 30px; height: 46px; border: 2px solid var(--line-soft); border-radius: 8px; background: var(--paper); font-weight: 700; cursor: pointer; flex: 1; max-width: 44px; padding: 0; }
.wd-kb button.wide { max-width: 64px; flex: 1.5; font-size: 0.78rem; }
.wd-kb button.hit { background: var(--pre); color: #fff; border-color: var(--pre); }
.wd-kb button.near { background: var(--gold); color: #1a1a1a; border-color: var(--gold); }
.wd-kb button.no { background: var(--ink-3); color: #fff; border-color: var(--ink-3); }
@media (max-width: 400px) { .wd-row { grid-template-columns: repeat(5, 46px); } .wd-c { height: 46px; } }

/* ラッシュ */
.rush-field { position: relative; height: 380px; border: 2.5px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, var(--paper-2), var(--paper)); overflow: hidden; margin: 10px 0; }
.rush-w { position: absolute; top: -40px; padding: 6px 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--paper); font-family: var(--serif); font-weight: 800; font-size: 1.05rem; cursor: pointer; animation: drop linear forwards; box-shadow: var(--shadow); }
.rush-w.ok { background: var(--ok); color: #fff; }
.rush-w.ng { background: var(--ng); color: #fff; }
@keyframes drop { to { top: 100%; } }

/* アクセント */
.acc-pick { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.acc-pick button { font-family: var(--serif); font-weight: 800; font-size: clamp(1.4rem, 6vw, 2rem); padding: 8px 16px; min-width: 60px; border: 2.5px solid var(--line); border-radius: 14px; background: var(--paper); cursor: pointer; box-shadow: var(--shadow); }
.acc-pick button:hover:not(:disabled) { background: var(--root-bg); }
.g-play { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; border: 2.5px solid var(--line); background: var(--ink); color: var(--bg); border-radius: 22px; padding: 16px 26px; cursor: pointer; font-weight: 700; font-size: 0.84rem; }
.g-play.playing { animation: pulse 0.9s infinite; }

/* 語源マップ */
.mp-top { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mp-find { display: flex; gap: 6px; }
.mp-find input { height: 38px; border: 2px solid var(--line); border-radius: 999px; padding: 0 14px; background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; width: 220px; }
.mp-wrap svg { width: 100%; height: auto; display: block; }
.mp-l { stroke: var(--line-soft); stroke-width: 2; }
.mp-n rect { fill: var(--paper); stroke: var(--line); stroke-width: 2; }
.mp-n text { fill: var(--ink); font-family: var(--serif); font-weight: 700; font-size: 17px; }
.mp-n circle { fill: var(--pre); }
.mp-n:hover rect, .mp-n.sel rect { fill: var(--root-bg); stroke: var(--root); stroke-width: 3; }
.mp-c circle { fill: var(--root); stroke: var(--line); stroke-width: 3; }
.mp-c text.r { fill: #fff; font-family: var(--serif); font-weight: 800; font-size: 28px; }
.mp-c text.m { fill: #fff; font-size: 13px; font-weight: 700; }
.mp-info { text-align: center; font-size: 0.9rem; border-top: 2px dashed var(--line-soft); padding-top: 12px; }
.mp-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--pre); margin: 0 2px; }
