/* ことばさがし固有の見た目（共通は ../common/base.css） */
[hidden] { display: none !important; }

.board-wrap { min-height: 200px; }
.grid {
  display: block; width: min(100%, 560px); height: auto; margin: 0 auto; max-height: 78vh;
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; color: #1F2328;
}
.grid .bg { fill: #FFFFFF; stroke: #C9C4B8; stroke-width: 1.5; }
.grid.live { touch-action: none; cursor: pointer; }
.grid .letters text { pointer-events: none; }
.grid .anchor { fill: none; stroke: var(--accent); stroke-width: 3.5; }
.grid .hintring { fill: none; stroke: var(--warn); stroke-width: 4; animation: pulse 1.1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.grid .cursor { fill: none; stroke: #2F5D8A; stroke-width: 2.5; stroke-dasharray: 5 3; }
.grid.appear .letters { animation: fade-in .35s ease-out; }
.grid.won .bands { animation: glow .8s ease-out 2; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.88); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes glow { 50% { opacity: .55; } }

/* ---------- さがすことばのリスト ---------- */
.wordbox { max-width: 560px; margin: 12px auto 0; }
.wb-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 6px; font-weight: 700; }
.wb-count { font-variant-numeric: tabular-nums; color: var(--ink-sub); font-size: 15px; }
.words { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 6px 8px; }
.words li {
  display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 18px 4px 10px; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--surface); line-height: 1.25; flex-wrap: wrap; position: relative;
}
.words .w { font-size: 19px; font-weight: 700; letter-spacing: .04em; }
.words small { font-size: 14px; color: var(--ink-sub); }
.words .w { white-space: nowrap; }
.words .mk { display: none; position: absolute; top: 2px; right: 3px; width: 15px; height: 15px; }
.words .mk svg { display: block; width: 15px; height: 15px; fill: none; stroke: #1F2328; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.words li.found { background: var(--c); border-color: var(--c); color: #1F2328; }
.words li.found small { color: #4A4F57; }
.words li.found .w { text-decoration: line-through; text-decoration-thickness: 2px; }
.words li.found .mk { display: inline-block; }
.words li.missed { border-style: dashed; border-color: #9AA3AD; }
.words li.hinted:not(.found) { border-color: var(--warn); }
.words li.pop { animation: pop .5s ease-out; }
@keyframes pop { 40% { transform: scale(1.08); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.after { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.status { justify-content: space-between; }
.st-text { min-width: 0; }
.timer { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 18px; min-width: 56px; text-align: right; margin-left: auto; }
.linkbtn { display: inline-flex; align-items: center; text-decoration: none; }
.tag { display: inline-block; white-space: nowrap; font-size: 14px; font-weight: 700; padding: 0 8px; border-radius: 999px; border: 1.5px solid currentColor; margin-left: 6px; vertical-align: middle; color: var(--accent); }
.tag.best { color: var(--ok); }
.themes .choice span { white-space: nowrap; }

.think { margin: 10px auto 0; max-width: 640px; border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 14px; background: var(--surface); }
.think h3 { margin: 0 0 4px; font-size: 16px; }
.think p { margin: 0 0 6px; }
.think p:last-child { margin-bottom: 0; }
.callout { z-index: 3; }
/* 知らせの文は2行分の高さを取っておく（文の長さでマス目が上下に動かないように） */
.stage .message { margin-bottom: 0; }

@media (max-width: 480px) {
  .stage { padding: 8px; }
  .words { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 5px 6px; }
  .words li { padding: 3px 12px 3px 6px; min-height: 36px; column-gap: 4px; }
  .words .w { font-size: 16px; letter-spacing: 0; }
  .controls .btn.icon { padding: 0 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .grid .hintring, .grid.appear .letters, .grid.won .bands, .words li.pop { animation: none; }
}
/* 上のバーの高さを一定に（No.93。数字は一番長い文が画面の幅（360px・375px 以上・641px 以上）で何行になるか。--tb-rt はふりがなの分。base.css・turnbar.js） */
.turnbar { --tb-msg-lines: 2; --tb-st-lines: 1; --tb-rt: 11px; --tb-st-rt: 0px; }
@media (min-width: 375px) { .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1; } }
@media (min-width: 641px) { .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1; } }
/* 上のバーの高さ ここまで */
