:root { color-scheme: light; font-family: system-ui, sans-serif; color: #2d3335; background: #f8f9fa; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header, main { max-width: 48rem; margin: auto; padding: 1.25rem; }
header { display: flex; gap: 1rem; align-items: center; }
header h1 { margin: 0; font-size: 1.3rem; }
header p { margin: .35rem 0 0; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1rem; }
p { line-height: 1.6; overflow-wrap: anywhere; }
button { font: inherit; min-height: 48px; border: 1px solid #d0d9e2; border-radius: .9rem; background: white; padding: .75rem 1rem; cursor: pointer; max-width: 100%; overflow-wrap: anywhere; }
button:hover:not(:disabled) { border-color: #0060ad; }
button:focus-visible { outline: 3px solid #0060ad; outline-offset: 3px; }
button:disabled { opacity: .5; cursor: default; }
.primary { background: #0060ad; color: white; border-color: #0060ad; }
.panel, .category { background: white; padding: 1.1rem; border: 1px solid #dce2e8; border-radius: 1.2rem; margin: 1rem 0; }
.category button { width: 100%; }
.category { padding: 0; border: 0; margin: .65rem 0; background: transparent; }
.meaning { color: #136d41; font-size: 1.25rem; font-weight: 700; }
mark { background: #fff0b0; color: #20472f; border-radius: .25rem; padding: 0 .2rem; }
.focus-word { border: 2px solid #b57700; font-weight: 700; }
#page-status:empty, #subtitle:empty, #audio-status:empty, #offline-status:empty, #offline-audio-status:empty, #offline-feedback:empty { display: none; }
.note { font-size: .85rem; color: #5a6062; }
.tiles, .controls { display: flex; flex-wrap: wrap; gap: .65rem; }
.tiles { min-height: 80px; }
.word-tile { background: #e7f1ff; color: #005899; }
.answer-slot { background: #0060ad; color: white; }
.controls { margin: 1.5rem 0; }
.controls button { flex: 1 1 140px; }
progress { width: 100%; accent-color: #0060ad; }
#feedback, #page-status:not(:empty) { padding: 1rem; border-radius: 1rem; background: #edf3fb; }
#feedback[data-kind=error], #page-status[data-kind=error] { background: #fff0ef; color: #8c2727; }
#feedback[data-kind=success] { background: #e6f4eb; color: #136d41; }
@media (max-width: 420px) { header, main { padding: 1rem; } header { align-items: flex-start; } }
