/* Game presentation keeps score and next-question progress in stable positions. */
body.ui-refresh .game-interface {
  --board-width: 100%;
  --compose-width: 100%;
  --board-axis-width: 9px;
  --board-column-gap: 5px;
  --board-cell-gap: 3px;
  --range-line-size: 4px;
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 0 20px 56px;
}
body.ui-refresh .game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 14px 0 2px;
}
body.ui-refresh .game-brand { --interface-brand-size:14px; }
body.ui-refresh .game-end-button {
  position: relative;
  width: auto;
  min-height: 32px;
  padding: 4px 9px;
  border: 1px solid #bdcbc4;
  border-radius: 999px;
  background: #f0f4ee;
  color: #34554e;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
body.ui-refresh .game-end-button::after { content: ""; position: absolute; top: 50%; left: -1px; right: -1px; height: 44px; transform: translateY(-50%); border-radius: inherit; }
body.ui-refresh .game-end-button:hover { background: #e7eee6; }
body.ui-refresh .game-end-button:disabled { opacity: .45; cursor: default; }
body.ui-refresh .game-heading { margin: 12px 0 0; }
body.ui-refresh .game-interface .compose-topic { margin: 0; font-size: 21px; line-height: 1.4; font-weight: 700; letter-spacing: 0; overflow-wrap: anywhere; }
body.ui-refresh .game-interface .compose-topic #topicName { color: var(--ink); font-family: var(--font-ui); font-size: inherit; font-weight: 700; }
body.ui-refresh .game-interface .compose-topic small { display: block; margin: 3px 0 0; font-size: 12px; font-weight: 400; line-height: 1.5; color: var(--muted); }
body.ui-refresh .game-interface .play-progress { display: block; max-width: none; margin: 12px 0 20px; padding: 0; border: 0; border-radius: 0; background: transparent; }
body.ui-refresh .game-interface .play-progress-stats { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 12px; color: var(--muted); line-height: 1.5; }
body.ui-refresh .game-interface .total-progress-stat,
body.ui-refresh .game-interface .answer-progress-stat { min-width: 0; text-align: left; white-space: nowrap; }
body.ui-refresh .game-interface .play-progress-stats strong { display: inline; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: inherit; }
body.ui-refresh .game-interface .play-progress-stats strong:not([class*="score-tier-"]) { color: var(--ink); }
body.ui-refresh .game-interface .total-progress-stat > span,
body.ui-refresh .game-interface .game-status-divider { display: inline; font-size: inherit; font-weight: 400; }
body.ui-refresh .game-interface .total-progress-stat small { margin-left: 2px; font-size: 11px; }
body.ui-refresh .game-interface .inventory-panel { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body.ui-refresh .game-interface .compose-score-grid { display: block; max-width: none; margin: 0; }
body.ui-refresh .game-interface .compose-panel { width: 100%; }
body.ui-refresh .game-composer { margin: 0; padding: 12px 14px; border: 1px solid #e1e5df; border-radius: 12px; background: #fff; }
body.ui-refresh .game-composer:has(.word-drop-zone.typing, .word-drop-zone:focus) { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }
/* Keep the native focus order input → submit → edit controls. */
body.ui-refresh .game-input-line { display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "word edits" "score score"; gap: 0 6px; align-items: start; }
body.ui-refresh .game-input-line > .word-drop-zone { grid-area: word; }
body.ui-refresh .game-input-line > .keyboard-actions { grid-area: edits; }
body.ui-refresh .game-input-line > .game-score-submit { grid-area: score; }
body.ui-refresh .game-interface .word-drop-zone { position: relative; min-width: 0; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: text; }
body.ui-refresh .game-interface .word-drop-zone:focus,
body.ui-refresh .game-interface .word-drop-zone.typing { outline: none; }
body.ui-refresh .game-interface .word-drop-zone.drag-over { outline: 2px dashed var(--accent); outline-offset: 3px; background: #edf5ed; }
/* Keep two rows available through blur so a pressed control cannot move before click. */
body.ui-refresh .game-interface .built-word { position: relative; display: flex; flex-wrap: wrap; align-items: center; align-content: start; gap: 0; min-height: 88px; padding: 0; font-family: var(--font-ui); font-size: 28px; line-height: 1.5; font-weight: 800; overflow-wrap: anywhere; }
body.ui-refresh .game-interface .built-word.is-long { font-size: 22px; }
body.ui-refresh .game-interface .built-letter { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: auto; min-width: 0; height: auto; min-height: 44px; margin: 0; padding: 0 1px; border: 0; border-radius: 0; background: transparent; font: inherit; line-height: inherit; color: var(--ink); }
body.ui-refresh .game-interface .built-letter.borrowed { color: var(--borrowed); }
body.ui-refresh .game-interface .built-letter.own { color: var(--own); }
body.ui-refresh .game-interface .built-letter.free-letter { color: #6d7778; }
body.ui-refresh .game-interface .built-letter.chain-hot { text-decoration: underline; text-decoration-color: #b58b19; text-decoration-thickness: 3px; text-underline-offset: 6px; }
body.ui-refresh .game-interface .built-letter.special { padding-inline: 4px; border-radius: 5px; color: #fff; background: var(--special); }
body.ui-refresh .game-interface .typing-placeholder { position: absolute; inset: 0 0 auto; min-height: 44px; display: flex; align-items: center; color: #7b8988; font-size: 14px; font-weight: 400; pointer-events: none; }
body.ui-refresh .game-interface .typing .typing-placeholder { padding-left: 6px; }
body.ui-refresh .game-interface .typing-caret { width: 2px; height: 1.2em; flex: 0 0 2px; margin-left: 1px; border-radius: 2px; }
body.ui-refresh .game-interface .typing-preview { display: inline; min-width: 0; min-height: 0; max-width: 100%; margin: 0; padding: 0; border: 0; border-bottom: 1px dashed var(--accent); border-radius: 0; color: var(--accent); background: transparent; font: inherit; line-height: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
body.ui-refresh .game-interface .type-capture { position: absolute; top: 0; left: 0; transform: none; width: 1px; height: 1px; padding: 0; font-size: 16px; }
body.ui-refresh .game-interface .type-capture:focus-visible { outline: none; }
body.ui-refresh .game-interface .keyboard-actions { display: flex; align-items: center; gap: 4px; margin: 0; }
body.ui-refresh .game-interface .keyboard-actions button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: #647474; font-size: 22px; line-height: 1.5; box-shadow: none; }
body.ui-refresh .game-interface .keyboard-actions #undoButton { width: 44px; height: 44px; flex: 0 0 44px; }
body.ui-refresh .game-interface .keyboard-actions .undo-icon { display: block; width: 28px; height: 28px; flex: none; pointer-events: none; }
body.ui-refresh .game-interface .keyboard-actions #clearButton { min-width: 56px; font-size: 13px; font-weight: 500; white-space: nowrap; }
body.ui-refresh .game-interface .keyboard-actions button:disabled { opacity: .35; cursor: default; }
body.ui-refresh .game-score-submit { display: grid; grid-template-columns: minmax(0,1fr) 108px; gap: 16px; align-items: center; margin-top: 8px; }
body.ui-refresh .game-interface .live-score-panel { position: static; display: block; width: auto; min-width: 0; padding: 0; margin: 0; justify-self: stretch; }
body.ui-refresh .game-interface .simple-score-panel { display: block; width: 100%; }
body.ui-refresh .game-interface .game-preview-label { display: block; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.4; }
body.ui-refresh .game-interface .simple-score-line { justify-content: flex-start; flex-wrap: nowrap; gap: 2px; min-width: 0; line-height: 1.25; text-align: left; }
body.ui-refresh .game-interface .simple-score-total { font-size: 28px; line-height: 1.25; font-weight: 800; letter-spacing: 0; }
body.ui-refresh .game-interface .simple-score-total:not([class*="attempt-score-tier-"]) { color: var(--ink); }
body.ui-refresh .game-interface .simple-score-line > small { font-size: 12px; font-weight: 500; color: inherit; }
body.ui-refresh .game-interface .simple-score-total.score-number-compact { font-size: 22px; }
body.ui-refresh .game-interface .simple-score-total.score-number-dense { font-size: 18px; }
body.ui-refresh .game-interface .submit-strip { margin: 0; padding: 0; }
body.ui-refresh .game-interface .submit-actions,
body.ui-refresh .game-interface .submit-primary { display: block; }
body.ui-refresh .game-interface .submit-actions #submitButton { width: 100%; min-height: 48px; padding: 8px 12px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font-size: 17px; font-weight: 700; line-height: 1.4; }
body.ui-refresh .game-interface .submit-actions #submitButton:disabled:not(.is-submitting) { background: #8cabb0; color: #fff; opacity: .7; }
body.ui-refresh .game-interface .submit-sub-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body.ui-refresh .game-interface .submit-actions #submitButton.is-submitting { font-size: 13px; }
body.ui-refresh .game-interface .score-breakdown-panel { display: block; min-height: 0; margin: 8px 0 0; }
body.ui-refresh .game-interface .next-multiplier-preview { margin-top: 40px; }
body.ui-refresh .game-interface .multiplier-summary-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
body.ui-refresh .game-interface .current-multiplier { display: inline-flex; align-items: baseline; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; }
body.ui-refresh .game-interface #currentMultiplierValue { color: var(--accent); font-size: 28px; line-height: 1.25; font-weight: 800; font-variant-numeric: tabular-nums; }
body.ui-refresh .game-interface .effective-character-count { display: inline; flex: 0 0 auto; color: var(--ink); font-size: 13px; font-weight: 700; }
body.ui-refresh .game-interface .next-multiplier-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #e5ebe5; font-size: 13px; line-height: 1.6; }
body.ui-refresh .game-interface .next-multiplier-preview[data-preview-state="unsupported"] .next-multiplier-line { margin-top: 0; padding-top: 0; border-top: 0; }
body.ui-refresh .game-interface .next-multiplier-preview[data-preview-state="unsupported"] .next-multiplier-target { display: none; }
body.ui-refresh .game-interface .next-multiplier-target { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; color: var(--ink); font-weight: 500; }
body.ui-refresh .game-interface #nextMultiplierValue { font-size: 16px; line-height: 1.4; font-weight: 700; font-variant-numeric: tabular-nums; }
body.ui-refresh .game-interface .next-multiplier-hint { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.6; }
body.ui-refresh .game-interface .next-multiplier-hint:empty { display: none; }
body.ui-refresh .game-interface .score-view-actions { display: flex; justify-content: flex-end; margin: 2px 0 -6px; }
body.ui-refresh .game-interface .score-view-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 6px 0 6px 12px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; box-shadow: none; }
body.ui-refresh .game-interface .score-view-toggle::after { content: "⌄"; font-size: 15px; }
body.ui-refresh .game-interface .score-view-toggle[aria-expanded="true"]::after { content: "⌃"; }
body.ui-refresh .game-interface .score-detail-panel { position: static; width: 100%; margin: 6px 0 0; padding: 10px 0 2px; border: 0; border-top: 1px solid #e5ebe5; border-radius: 0; background: transparent; }
body.ui-refresh .game-interface :is(.score-formula, .bonus-formula) { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 8px 0 0; }
body.ui-refresh .game-interface :is(.score-formula, .bonus-formula) > .operator { display: none; }
body.ui-refresh .game-interface .score-box { min-width: 0; padding: 8px; background: #f7f9f5; border-color: #e1e5df; }
body.ui-refresh .game-interface .score-box strong { font-size: 20px; overflow-wrap: anywhere; }
body.ui-refresh .game-interface .score-box small { font-size: 10px; font-weight: 400; overflow-wrap: anywhere; }
body.ui-refresh .game-interface .special-score :is(span,strong) { color: var(--special); }
body.ui-refresh .game-interface .special-score small { color: var(--muted); }
body.ui-refresh .game-interface .simple-score-term { cursor: default; }
body.ui-refresh.tutorial-preview-active .game-interface .score-view-actions,
body.ui-refresh.tutorial-preview-active .game-interface :is(.score-formula, .bonus-formula) { display: none; }
body.ui-refresh.tutorial-preview-active .game-interface .score-detail-panel { display: none; }
body.ui-refresh .game-interface .simple-score-formula { justify-content: flex-start; gap: 0 6px; margin: 0; line-height: 1.6; }
body.ui-refresh .game-interface .simple-score-term { font-size: 12px; font-weight: 400; line-height: 1.6; }
body.ui-refresh .game-interface .simple-score-term:not(.combo) { padding: 0; border: 0; background: transparent; }
body.ui-refresh .game-interface .simple-score-sp { padding: 0 4px; border-radius: 3px; background: var(--special); color: #fff; font-size: 12px; white-space: nowrap; }
body.ui-refresh .game-interface .simple-score-operator { font-size: 12px; color: #a6aeaa; }
body.ui-refresh .game-interface .simple-score-term.red { color: var(--borrowed); }
body.ui-refresh .game-interface .simple-score-term.black { color: var(--ink); }
body.ui-refresh .game-interface .simple-score-term.yellow { color: #795913; }
body.ui-refresh .game-interface .simple-score-term.chain { color: #34546a; }
body.ui-refresh .game-interface .simple-score-term.combo { padding: 0; min-height: 18px; border: 0; border-radius: 0; background: transparent; color: #6b5384; font-weight: 600; box-shadow: none; animation: none; }
body.ui-refresh .game-interface .check-result:empty { display: none; }
body.ui-refresh .game-interface .game-board { margin-top: 20px; }
body.ui-refresh .game-interface .board-control-strip { justify-content: space-between; gap: 12px; max-width: none; margin: 0 0 10px; padding: 0; }
body.ui-refresh .game-interface .inventory-legend { justify-content: flex-start; gap: 3px; }
body.ui-refresh .game-interface .legend-item { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: #60716c; font-size: 13px; font-weight: 400; box-shadow: none; }
body.ui-refresh .game-interface .legend-item.borrowed { color: var(--borrowed); }
body.ui-refresh .game-interface .legend-item.own { color: var(--ink); }
body.ui-refresh .game-interface .legend-item.active { font-weight: 700; }
body.ui-refresh .game-interface .legend-item.active::after { content: ""; position: absolute; bottom: 4px; left: 10px; right: 10px; height: 2px; border-radius: 2px; background: currentColor; }
body.ui-refresh .game-interface .red-progress-stat { min-width: 0; }
body.ui-refresh .game-interface .red-progress-label { justify-content: flex-end; gap: 4px; white-space: nowrap; }
body.ui-refresh .game-interface .red-progress-label > span { font-size: 11px; font-weight: 400; }
body.ui-refresh .game-interface .red-progress-label strong { font-size: 15px; font-weight: 600; color: var(--borrowed); }
body.ui-refresh .game-interface .red-progress-label b { font: inherit; }
body.ui-refresh .game-interface .red-progress-label small,
body.ui-refresh .game-interface .red-progress-label small span { display: inline; margin-left: 2px; font-size: 11px; font-weight: 400; color: var(--muted); }
body.ui-refresh .game-interface .red-progress-track { display: none; }
body.ui-refresh .game-interface .range-visual { gap: 3px; margin: 0 0 5px; }
body.ui-refresh .game-interface .range-segment,
body.ui-refresh .game-interface .vertical-segment { border-radius: 2px; background: #deded6; }
body.ui-refresh .game-interface .range-row.borrowed .range-segment.active,
body.ui-refresh .game-interface .vertical-axis.borrowed .vertical-segment.active { background: var(--borrowed); }
body.ui-refresh .game-interface .range-row.own .range-segment.active,
body.ui-refresh .game-interface .vertical-axis.own .vertical-segment.active { background: var(--own); }
body.ui-refresh .game-interface .kana-board-with-axis { margin: 0; }
body.ui-refresh .game-interface .kana-panel { grid-template-rows: repeat(5,minmax(44px,auto)); }
body.ui-refresh .game-interface .kana-cell { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 44px; height: 44px; aspect-ratio: auto; padding: 1px 0 8px; border: 1px solid #cbd4cc; border-radius: 5px; background: #fff; color: var(--ink); font-size: 20px; font-weight: 700; line-height: 1; }
body.ui-refresh .game-interface .kana-cell.borrowed { border-color: var(--borrowed); color: var(--borrowed); }
body.ui-refresh .game-interface .kana-cell.borrowed-used { box-shadow: inset 0 0 0 1px var(--borrowed); }
body.ui-refresh .game-interface .kana-cell.own-used { border-color: var(--own); box-shadow: inset 0 0 0 1px var(--own); }
body.ui-refresh .game-interface .kana-cell.borrowed-used.own-used { border-color: #b88b21; box-shadow: inset 1px 0 var(--borrowed),inset -1px 0 var(--own); }
body.ui-refresh .game-interface .kana-cell.overlap-in-range { background: #fff176; }
body.ui-refresh .game-interface .kana-cell.special { background: var(--special); color: #fff; border-color: var(--special); }
body.ui-refresh .game-interface .kana-cell.empty { background: #f3f2ed; border-color: #e2e2d8; }
body.ui-refresh .game-interface div.kana-cell.empty { opacity: 1; }
body.ui-refresh .game-interface button.kana-cell.empty { color: #9ca5a1; opacity: .45; }
body.ui-refresh .game-interface .kana-cell .count { bottom: 3px; right: 2px; font-size: 9px; font-weight: 400; }
body.ui-refresh .game-interface .used-marker { position: absolute; z-index: 2; bottom: 3px; left: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--borrowed); }
body.ui-refresh .game-interface .used-marker.own { left: 9px; background: var(--own); }
body.ui-refresh .game-interface .special-keys { margin: 8px 0 0; padding: 0; }
body.ui-refresh .game-interface .special-key { min-width: 0; height: 44px; min-height: 44px; padding: 4px; border: 1px solid #d8ded8; border-radius: 6px; background: transparent; color: #556366; font-size: 21px; font-weight: 500; line-height: 1; }
body.ui-refresh .game-interface .game-supplement { display: block; margin-top: 24px; padding-bottom: 32px; }
body.ui-refresh .game-interface .dictionary-panel { border: 0; padding: 0; background: transparent; }
body.ui-refresh .game-interface .history-panel { margin: 0; padding: 0; border: 0; background: transparent; }
body.ui-refresh .game-interface .history-panel summary { min-height: 44px; padding: 10px 0; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
body.ui-refresh .game-interface .history-panel summary span { display: inline; font: inherit; color: inherit; }
body.ui-refresh .game-interface .history-panel .answer-history { max-height: none; margin: 8px 0 20px; }
body.ui-refresh .game-interface .history-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 0; background: transparent; }
body.ui-refresh .game-interface .history-card strong { margin-top: 4px; font-size: 20px; font-weight: 600; }
body.ui-refresh .game-interface .history-card .history-letter { display: inline; font: inherit; }
body.ui-refresh .game-interface .history-letter.borrowed { color: var(--borrowed); }
body.ui-refresh .game-interface .history-letter.own { color: var(--ink); }
body.ui-refresh .game-interface .history-empty { border: 0; padding: 12px 0; background: transparent; font-weight: 400; }
body.ui-refresh .game-interface .play-how-to-button { width: auto; min-height: 44px; margin: 12px 0 0; padding: 6px 0; border: 0; background: transparent; font-size: 14px; color: var(--muted); }
body.ui-refresh .game-interface .game-dev-tools { margin-top: 16px; }
body.ui-refresh .game-interface .game-dev-tools[hidden] { display: none; }
body.ui-refresh .game-interface .game-dev-tools summary { min-height: 44px; padding: 10px 0; font-size: 12px; color: var(--muted); cursor: pointer; }
body.ui-refresh .game-interface .game-dev-tools .debug-button { width: auto; margin-top: 8px; }
body.ui-refresh .game-interface .app-legal-links { margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--line); }
body.ui-refresh .game-exit-card { width: min(100%,440px); }
body.ui-refresh .game-exit-card h2 { margin: 0 0 20px; font-size: 22px; line-height: 1.5; }
body.ui-refresh .game-exit-speech { display: grid; grid-template-columns: 88px minmax(0,1fr); align-items: center; gap: 12px; }
body.ui-refresh .game-exit-speech img { width: 100%; height: auto; }
body.ui-refresh .game-exit-speech p { margin: 0; color: var(--muted); font-size: 14px; font-weight: 700; line-height: 1.8; }
body.ui-refresh .game-exit-score { margin: 24px 0 16px; text-align: center; }
body.ui-refresh .game-exit-score > span { display: block; color: var(--muted); font-size: 13px; }
body.ui-refresh .game-exit-score strong { display: inline-block; margin-top: 4px; font-size: 38px; line-height: 1.3; font-variant-numeric: tabular-nums; }
body.ui-refresh #gameExitScore[class*="score-tier-"] { color: var(--score-tier-color); }
body.ui-refresh .game-exit-score small { margin-left: 4px; font-size: 13px; }
body.ui-refresh .game-exit-note { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
body.ui-refresh .game-exit-card .modal-actions { display: grid; gap: 12px; margin-top: 24px; }
body.ui-refresh .judgement-card { width: min(100%,480px); }
body.ui-refresh .judgement-card .judgement-header { grid-template-columns: 104px minmax(0,1fr); gap: 16px; min-height: 84px; }
body.ui-refresh .judgement-card .judgement-character { grid-column: 1; grid-row: 1; width: 104px; margin: 0; }
body.ui-refresh .judgement-card .judgement-character img { width: 104px; height: auto; }
body.ui-refresh .judgement-card .judgement-character .gojuo-name-tag { display: none; }
body.ui-refresh .judgement-card .judgement-heading { grid-column: 2; grid-row: 1; }
body.ui-refresh .judgement-card h2 { font-size: 22px; line-height: 1.5; }
body.ui-refresh .judgement-card .judgement-word { margin: 24px 0 12px; font-family: var(--font-ui); font-size: 30px; font-weight: 700; line-height: 1.7; }
body.ui-refresh .judgement-card.valid .judgement-word { text-align: center; }
body.ui-refresh .judgement-card.valid .judgement-score { text-align: center; font-size: clamp(36px,10vw,44px); font-weight: 700; line-height: 1.4; }
body.ui-refresh .judgement-card #judgementReason { font-size: 14px; font-weight: 400; line-height: 1.8; }
body.ui-refresh .judgement-card .modal-actions { gap: 12px; margin-top: 24px; }
body.ui-refresh .judgement-card .modal-actions > button { min-height: 48px; border-radius: 12px; }
body.ui-refresh .judgement-card.valid #judgementCloseButton { background: var(--accent); color: #fff; box-shadow: none; }
body.ui-refresh .judgement-card .judgement-report-action { margin-top: 24px; }
body.ui-refresh.tutorial-preview-active .game-end-button,
body.ui-refresh.tutorial-preview-active .game-heading,
body.ui-refresh.tutorial-preview-active .game-interface .play-progress,
body.ui-refresh.tutorial-preview-active .game-interface .inventory-legend,
body.ui-refresh.tutorial-preview-active .game-interface .red-progress-stat,
body.ui-refresh.tutorial-preview-active .game-interface .game-supplement { display: none; }
body.ui-refresh.tutorial-preview-active .game-interface .typing-caret,
body.ui-refresh.tutorial-preview-active .game-interface .typing-placeholder { display: none; }
body.ui-refresh.tutorial-preview-active .game-interface .game-board { margin-top: 20px; }
body.ui-refresh.tutorial-preview-active .game-interface .submit-primary #submitButton { flex-direction: column; font-size: 14px; }
@media (min-width:600px) {
  body.ui-refresh .game-interface .compose-topic { font-size: 23px; }
  body.ui-refresh .game-interface .built-word { min-height: 94px; font-size: 31px; }
  body.ui-refresh .game-interface .built-word.is-long { font-size: 25px; }
  body.ui-refresh .game-interface .kana-cell { font-size: 23px; }
  body.ui-refresh .game-interface .play-progress-stats strong { font-size: 15px; }
}
@media (max-width:359px) {
  body.ui-refresh .game-interface { padding-inline: 16px; }
  body.ui-refresh .game-interface .built-word { font-size: 26px; }
  body.ui-refresh .game-input-line { grid-template-columns: minmax(0,1fr); grid-template-areas: "word" "edits" "score"; gap: 0; }
  body.ui-refresh .game-interface .keyboard-actions { justify-self: end; }
  body.ui-refresh .game-composer { padding-inline: 12px; }
  body.ui-refresh .game-score-submit { grid-template-columns: minmax(0,1fr) 98px; }
  body.ui-refresh .game-interface .simple-score-total { font-size: 24px; }
  body.ui-refresh .game-interface .simple-score-total.score-number-compact { font-size: 19px; }
  body.ui-refresh .game-interface .simple-score-total.score-number-dense { font-size: 16px; }
  body.ui-refresh .game-interface .simple-score-term { font-size: 11px; }
  body.ui-refresh .game-interface .simple-score-formula { gap: 0 4px; }
  body.ui-refresh .game-interface .kana-cell { font-size: 18px; }
}

/* Put the guide below the factors, so it never covers the answer or the score. */
body.ui-refresh .game-interface .acquisition-bubble.acquisition-guide {
  display: block; position: relative; inset: auto; z-index: auto; box-sizing: border-box;
  width: min(100%, 420px); max-width: 100%; min-height: 90px; margin-top: 12px;
  padding: 16px 14px 16px 83px; border: 1px solid #cddbd4; border-radius: 14px;
  background: #fffdf7; color: var(--ink); font-size: 13px; font-weight: 700;
  line-height: 1.7; white-space: pre-line; box-shadow: 0 4px 18px #152d3120;
}
body.ui-refresh .game-interface .acquisition-guide::before {
  content: ""; position: absolute; left: 8px; top: 50%; width: 66px; height: 72px;
  transform: translateY(-50%); background: url("assets/character/gojuo-v2/gojuo-thinking.png?v=2611a8eac9e7ee3f") center / contain no-repeat;
}
body.ui-refresh .game-interface .acquisition-guide.acquisition-guide-celebrating::before {
  background-image: url("assets/character/gojuo-v2/gojuo-ok.png?v=90b13108917f9c2b");
}
body.ui-refresh .game-interface .acquisition-guide::after { display: none; }
body.ui-refresh .judgement-card #judgementReason .judgement-recognized-answer {
  display: inline; margin: 0; padding: 0;
  font-family: var(--font-ui); font-size: inherit; line-height: inherit;
  font-weight: 700; color: var(--ink);
}
/* Keep yellow visible between broad, gentle sweeps; keep kana above the light. */
body.ui-refresh .game-interface .kana-cell.overlap-in-range:not(.special)::before {
  content: ""; display: block; position: absolute; inset: 0; z-index: 0;
  border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, transparent 27%, #fff8d0b3 38%, #fffffff5 47%, #fffffff5 53%, #fff8d0b3 62%, transparent 73%);
  background-size: 300% 100%; background-position: 100% 0;
  animation: overlap-diagonal-sheen 3200ms ease-in-out var(--overlap-delay, 0ms) infinite both;
}
body.ui-refresh .game-interface .kana-cell.overlap-in-range > span { position: relative; z-index: 1; }
body.ui-refresh .game-interface .kana-cell.overlap-in-range > .count { position: absolute; }
@keyframes overlap-diagonal-sheen {
  0% { background-position: 100% 0; opacity: 0; }
  10% { opacity: 1; }
  56% { opacity: 1; }
  68%, 100% { background-position: 0% 0; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  body.ui-refresh .game-interface .kana-cell.overlap-in-range:not(.special)::before { display: none; animation: none; }
}

/* Separate skipping from submission while keeping a full touch target. */
body.ui-refresh .game-interface .skip-topic-button {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; width: auto; min-height: 44px; margin-left: auto; padding: 4px 8px; border: 0; border-radius: 6px;
  background: transparent; color: #546a66; box-shadow: none;
  font-size: 11px; font-weight: 500; line-height: 1.5; white-space: nowrap;
}
body.ui-refresh .game-interface .skip-topic-button:hover:not(:disabled) { background: #f0f4ee; color: var(--accent); }
body.ui-refresh .game-interface .skip-topic-button:disabled { opacity: .4; cursor: default; }
body.ui-refresh.tutorial-preview-active .game-interface .skip-topic-button { display: none; }
body.ui-refresh .topic-skip-card { width: min(100%,440px); }
body.ui-refresh .topic-skip-card h2 { margin: 0 0 16px; font-size: 22px; line-height: 1.5; }
body.ui-refresh .topic-skip-card p { margin: 0; color: var(--muted); font-size: 14px; }
body.ui-refresh .topic-skip-card .modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
body.ui-refresh .topic-skip-card .modal-actions > button { min-height: 48px; padding: 10px 8px; border-radius: 12px; font-size: 14px; }
@media (max-width:359px) {
  body.ui-refresh .game-interface .skip-topic-button { font-size: 10px; }
  body.ui-refresh .topic-skip-card h2 { font-size: 20px; }
  body.ui-refresh .topic-skip-card .modal-actions { grid-template-columns: 1fr; }
}
