/* 英単語当て固有の見た目（共通は ../common/base.css） */
:root { --slot: 40px; --key: 50px; }
[hidden] { display: none !important; }

.status .sub-st { margin-left: auto; font-weight: 400; font-size: 15px; color: var(--ink-sub); white-space: nowrap; }

/* ---------- 絵と情報 ---------- */
.board-wrap { min-height: 300px; }
.scene { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 12px 16px; align-items: center; background: var(--board); color: #1F2328; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; }
.art { width: 100%; max-width: 200px; margin: 0 auto; }
.art svg { display: block; width: 100%; height: auto; }
.art.happy svg { animation: sway 1.2s ease-in-out 2; transform-origin: 50% 90%; }
@keyframes sway { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-3deg); } 70% { transform: rotate(3deg); } }
.info { min-width: 0; }
.info p { margin: 0 0 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; font-size: 14px; font-weight: 700; padding: 1px 10px; border-radius: 999px; border: 1.5px solid #2F5D8A; color: #2F5D8A; background: #FFFFFF; white-space: nowrap; }
.tag rt { font-size: 10px; font-weight: 400; }
.tag.sub { border-color: #858891; color: #5B616B; }
.clue { background: #FFFFFF; border: 2px solid #D9D6CE; border-radius: var(--radius); padding: 6px 10px; margin: 0 0 8px; font-size: 1.15rem; font-weight: 700; line-height: 1.8; }
.clue .lab { display: block; font-size: 13px; font-weight: 700; color: #5B616B; line-height: 1.4; }
.clue rt { font-size: 10px; font-weight: 400; color: #5B616B; }
.clue.en-def { font-size: 1rem; line-height: 1.5; font-weight: 600; }
.left { font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.left .dots { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.left .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #5A4032; background: #F2A5B6; }
.left .dot.used { background: transparent; border-style: dashed; border-color: #9A8F86; }
.balloon-mode .left .dot { background: #7FAEDC; }
.misses { font-size: 15px; color: #5B616B; min-height: 1.6em; }
.misses b { font-size: 18px; letter-spacing: .12em; color: #B23A3A; font-family: var(--font); }

/* ---------- 単語 ---------- */
.word { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin: 14px 0 6px; min-height: 64px; font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; }
.word .w { display: flex; gap: 6px; }
.slot { width: var(--slot); height: 56px; display: inline-flex; align-items: flex-end; justify-content: center; font-size: 32px; font-weight: 700; color: var(--ink); border-bottom: 4px solid var(--ink); line-height: 1.2; padding-bottom: 2px; }
.slot.fixed { border-bottom-color: transparent; }
.slot.in { animation: drop .28s ease-out both; animation-delay: calc(var(--i, 0) * 70ms); }
.slot.reveal { color: var(--ng); }
.slot.win { color: var(--ok); }
@keyframes drop { 0% { transform: translateY(-14px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.word.shake { animation: shake .3s linear; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

/* ---------- A〜Z のボタン ---------- */
.keys { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; max-width: 520px; margin: 10px auto 0; }
.key {
  appearance: none; font: inherit; font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; font-size: 24px; font-weight: 700; min-height: var(--key);
  border-radius: var(--radius); border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; padding: 0;
}
.key:active:not(:disabled) { transform: translateY(1px); }
.key:focus-visible { outline: 3px solid var(--warn); outline-offset: 2px; }
.key:disabled { cursor: not-allowed; }
.key.hit { background: var(--ok); border-color: var(--ok); color: #FFFFFF; opacity: .9; }
.key.miss { background: var(--bg); color: var(--ink-sub); border-style: dashed; text-decoration: line-through; text-decoration-thickness: 2px; }
.key.off:not(.hit):not(.miss) { opacity: .4; }
.key.vowel:not(.hit):not(.miss) { border-color: var(--accent); }

.wordbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px auto 0; max-width: 520px; }
.wordbar input, .duo input { font: inherit; font-size: 20px; min-height: 48px; padding: 4px 12px; border: 2px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); min-width: 0; }
.wordbar input { flex: 1 1 200px; letter-spacing: .06em; }
.wordbar input:focus-visible, .duo input:focus-visible { outline: 3px solid var(--warn); outline-offset: 1px; }
.btn[aria-pressed="true"] { background: var(--accent-soft); }
.linkbtn { display: inline-flex; align-items: center; text-decoration: none; }

/* ---------- 2人で: 単語を入れる ---------- */
.duo { margin-top: 12px; border: 2px solid var(--accent); border-radius: var(--radius); padding: 12px 16px; background: var(--surface); }
.duo-who { font-weight: 700; font-size: 1.1rem; margin: 0 0 8px; }
.duo-label { display: block; font-weight: 700; margin: 8px 0 4px; }
.duo-row { display: flex; gap: 8px; }
.duo-row input { flex: 1; letter-spacing: .1em; }
.duo input[type=search] { width: 100%; }
.duo-err { color: var(--ng); font-weight: 700; min-height: 1.5em; margin: 8px 0 0; }
.duo .controls { margin-top: 4px; }

/* ---------- 結果（盤の上に重ねる） ---------- */
.result-box { inset: 4% 4% auto; z-index: 2; padding: 16px 16px 18px; }
.result-box h2 { margin-bottom: 6px; }
.result-box .answer { font-size: 34px; font-weight: 700; letter-spacing: .08em; margin: 0; font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; word-break: break-word; }
.result-box .ipa { font-size: 20px; margin: 0 0 4px; color: var(--ink-sub); font-family: "Segoe UI", "Lucida Sans Unicode", "Arial Unicode MS", "Noto Sans", sans-serif; }
.result-box .mean { font-size: 1.2rem; font-weight: 700; margin: 0 0 8px; line-height: 1.9; }
.result-box .mean rt { font-size: 10px; font-weight: 400; }
.result-box .mean.en-def { font-size: 1.05rem; font-weight: 600; line-height: 1.5; }
.result-box p:empty { display: none; }
.callout { z-index: 3; top: 30%; }

@media (max-width: 480px) {
  .scene { grid-template-columns: 124px 1fr; gap: 8px 12px; padding: 6px 8px; }
  .keys { gap: 4px; }
  .key { font-size: 21px; min-height: 46px; }
  .clue { font-size: 1.05rem; }
  .result-box .answer { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .slot.in, .word.shake, .art.happy svg { animation: none; }
}
/* ダーク: 絵と情報の地（--board）は明るいまま。単語の下線と字は画面の色 */

/* iPhone の「連絡先を自動入力」を出さないため入力欄は type=search（要望No.87）。検索欄の見た目は消す */
input[type=search]{-webkit-appearance:none;appearance:none}
input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{display:none;-webkit-appearance: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: 11px; }
@media (min-width: 375px) { .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1; } }
@media (min-width: 641px) { .turnbar { --tb-msg-lines: 1; --tb-st-lines: 1; } }
:root:lang(en) .turnbar { --tb-msg-lines: 3; --tb-st-lines: 1; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { :root:lang(en) .turnbar { --tb-msg-lines: 3; --tb-st-lines: 1; } }
@media (min-width: 641px) { :root:lang(en) .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1; } }
/* 上のバーの高さ ここまで */
