:root { color-scheme: dark; font-family: Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; color: #f3f3f3; background: #000; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; min-height: 100vh; display: flex; flex-direction: column; }
button, select { font: inherit; }
button { color: #f3f3f3; background: #242323; border: 0; border-radius: 0; cursor: pointer; }
button:hover { background: #444; }
button:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #6dff4a; outline-offset: 3px; }
a { color: #b5ffa5; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: absolute; top: -60px; left: 10px; padding: 10px; background: #000; z-index: 5; }
.skip-link:focus { top: 5px; }
.common-nav { display: flex; align-items: center; justify-content: center; gap: 14px; width: min(100%, 980px); padding: 14px 16px; margin: 0 auto; }
.brand { font-size: clamp(19px, 3.5vw, 30px); white-space: nowrap; }
.icon-button { flex: 0 0 38px; height: 42px; background: #000; font-size: 29px; line-height: 1; }
.common-nav .icon-button:first-child { margin-right: auto; }
.common-nav .bookmark { margin-left: auto; }
.bookmark[aria-pressed="true"] { color: #6dff4a; }
select { min-width: 0; color: #fff; border: 1px solid #666; background: #111; padding: 7px 8px; border-radius: 0; }
#date-select { font-size: clamp(14px, 2.5vw, 22px); max-width: 155px; }
.main-container { width: 90%; max-width: 880px; margin: 0 auto; flex: 1 0 auto; }
.demo-note { color: #aaa; text-align: center; margin: 3px 0 19px; font-size: 13px; }
.lesson-tools { display: flex; align-items: center; gap: 9px; font-size: 13px; margin-bottom: 13px; }
#lesson-select { flex: 1; width: 100%; max-width: 570px; }
.lesson-progress { white-space: nowrap; color: #bbb; }
.question-data { background: #6dff4a; color: #080808; padding: 16px; font-style: italic; overflow-wrap: anywhere; }
.question-data h1 { font-size: clamp(21px, 3.4vw, 30px); line-height: 1.3; margin: 0 0 24px; }
.question-data p { font-size: clamp(19px, 3.2vw, 28px); line-height: 1.4; margin: 0; }
.exercise-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; }
.exercise-heading p { color: #ccc; font-size: 13px; line-height: 1.5; margin: 0; }
.text-button { white-space: nowrap; font-size: 13px; padding: 8px; text-decoration: underline; }
.answer-data { background: #111; padding: 10px; margin-top: 10px; }
.answer-row + .answer-row { border-top: 1px solid #aaa; margin-top: 13px; padding-top: 12px; }
.answer-row h2, .word-banks h2 { font-size: 12px; font-weight: normal; color: #a7a7a7; margin: 0 0 8px; }
.token-zone { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; min-height: 55px; }
.token { padding: 10px 12px; min-height: 43px; font-size: clamp(17px, 2.7vw, 24px); font-weight: 600; max-width: 100%; overflow-wrap: anywhere; }
.selected-zone .token { cursor: grab; }
.selected-zone .token:active { cursor: grabbing; }
.selected-zone.drag-over { outline: 2px dashed #6dff4a; outline-offset: 3px; }
.empty-hint { align-self: center; color: #777; margin: 0; font-size: 14px; padding: 6px; }
.help { color: #929292; font-size: 12px; line-height: 1.6; margin: 10px 0; }
.feedback { min-height: 25px; margin: 12px 0; line-height: 1.6; font-size: 14px; }
.feedback[data-kind="success"] { color: #6dff4a; }
.feedback[data-kind="error"] { color: #ffb7ab; }
.answer-reveal { border: 1px solid #555; padding: 12px; margin-bottom: 18px; }
.answer-reveal h2 { font-size: 16px; margin: 0; color: #6dff4a; }
.answer-reveal p { line-height: 1.7; margin: 8px 0 0; }
.bottom { width: 100%; margin-top: 22px; background: #181818; padding: 14px max(5%, calc((100% - 880px) / 2)); }
.word-banks section + section { border-top: 1px solid #333; margin-top: 13px; padding-top: 12px; }
.word-bank { justify-content: center; }
.word-bank .token { font-weight: normal; }
.answer-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 20px; }
.answer-buttons button { font-size: clamp(20px, 3.1vw, 28px); min-height: 60px; }
.storage-status { font-size: 12px; color: #999; line-height: 1.5; margin: 12px 0 4px; text-align: center; }
.storage-status[data-warning="true"] { color: #ffcb8c; }
.project-link { display: block; text-align: center; font-size: 12px; padding: 5px; color: #bbb; }
.menu-panel { margin: 0 auto 0 0; padding: 20px; height: 100dvh; max-height: 100dvh; width: min(340px, 92vw); color: #eee; background: #101010; border: 1px solid #555; overflow: auto; }
.menu-panel::backdrop { background: rgb(0 0 0 / 72%); }
.menu-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.menu-header h2 { font-size: 20px; margin: 0; }
.menu-header button { padding: 10px; }
.menu-panel h3 { color: #6dff4a; font-size: 17px; margin-top: 30px; }
.menu-panel p { line-height: 1.7; font-size: 14px; }
.saved-lesson { display: block; text-align: left; width: 100%; margin: 8px 0; padding: 10px; line-height: 1.5; }
.noscript { background: #6dff4a; color: #000; padding: 15px; }
@media (max-width: 480px) {
  .common-nav { gap: 5px; padding: 10px 8px; flex-wrap: wrap; }
  .brand { font-size: 20px; }
  .brand span { display: none; }
  #date-select { max-width: 120px; font-size: 14px; }
  .icon-button { flex-basis: 30px; font-size: 25px; }
  .main-container { width: 92%; }
  .question-data { padding: 12px; }
  .question-data h1 { margin-bottom: 20px; }
  .lesson-tools { flex-wrap: wrap; }
  #lesson-select { flex-basis: calc(100% - 43px); }
  .lesson-progress { width: 100%; text-align: right; }
  .bottom { padding: 12px 4%; }
  .token { font-size: 18px; padding: 9px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
