.typing-page .game-wrapper { align-items: flex-start; }
.typing-page .game-layout { grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr); align-items: start; max-width: 980px; }
.typing-page .game-tips { max-width: 980px; text-align: center; }
.typing-page .side-column { grid-template-rows: auto auto; }
.typing-title-icon { font-family: 'Segoe UI Symbol', system-ui, sans-serif; }
.typing-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.typing-modes { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid #e5ebf3; border-radius: 11px; background: #f4f7fc; }
.typing-modes button { min-height: 36px; padding: 6px 15px; border: 0; border-radius: 7px; background: transparent; color: #315d8d; font-size: .9rem; font-weight: 600; }
.typing-modes button[aria-pressed="true"] { background: #006acd; color: #fff; }
.typing-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.typing-metrics .score-card { min-width: 0; padding: 9px 4px; background: #eef4fe; }
.typing-metrics .score-card > span { color: #52637a; }
.typing-metrics .best-card { background: #eaf8ef; }
.typing-metrics .score-card strong { font-size: clamp(1rem, 2.5vw, 1.35rem); }
.typing-stage { padding: 16px; border: 1px solid #e5ebf3; border-radius: 16px; background: #f8faff; }
#typingProgress { display: block; width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 6px; background: #e5edf7; color: #006acd; accent-color: #006acd; }
#typingProgress::-webkit-progress-bar { background: #e5edf7; }
#typingProgress::-webkit-progress-value { background: #006acd; }
#typingProgress::-moz-progress-bar { background: #006acd; }
.typing-prompt { display: grid; place-items: center; margin: 18px 0; min-height: 124px; text-align: center; }
.typing-prompt-label, .typing-prompt p { margin: 0; color: #52637a; font-size: .85rem; }
.typing-target { min-height: 1.2em; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 700; line-height: 1.2; letter-spacing: .05em; }
.typing-target .is-done { color: #16803d; }
.typing-target .is-current { color: #006acd; border-bottom: 3px solid currentColor; border-radius: 3px; background: #e6f1ff; }
.typing-input-label { display: block; margin-bottom: 6px; color: #315d8d; font-size: .85rem; font-weight: 600; }
.typing-input { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #cad9ec; border-radius: 10px; background: #fff; color: #0b1a33; font: inherit; }
.typing-input:focus-visible { outline: 3px solid #8ec7ff; outline-offset: 2px; }
.typing-input:disabled { background: #eef2f8; }
.typing-input.is-error { border-color: #d04c52; box-shadow: 0 0 0 2px #d04c5225; }
.typing-game-status, .typing-save { color: #52637a; font-size: .875rem; line-height: 1.65; }
.typing-game-status { min-height: 1.65em; margin: 14px 0 2px; }
.typing-save { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.typing-save .text-button { font-size: inherit; }
.typing-instructions ul { margin: 12px 0 0; padding-left: 20px; color: #52637a; font-size: .875rem; line-height: 1.8; }

@media (max-width: 850px) {
    .typing-page .game-layout { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
}
@media (max-width: 420px) {
    .typing-page .game-card { padding: 14px; }
    .typing-metrics { gap: 5px; }
    .typing-metrics .score-card > span { font-size: .7rem; }
}
