:root {
  color-scheme: light;
  --canvas: #f5f6ef;
  --paper: #fffefa;
  --white: #ffffff;
  --ink: #20382c;
  --body: #30473b;
  --subtle: #617365;
  --forest: #224337;
  --forest-deep: #16352a;
  --leaf: #dfebcd;
  --lime: #d8ec9e;
  --haze: #eef2e7;
  --line: #dce3d7;
  --ochre: #785518;
  --ochre-light: #faefd4;
  --danger: #9a4339;
  --danger-bg: #fbebe7;
  --shadow: 0 4px 14px #213c2b08, 0 1px 2px #213c2b0a;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'PingFang SC', 'Noto Sans CJK SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; }
button, select, input[type=range] { cursor: pointer; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
svg { flex: 0 0 auto; vertical-align: middle; }
:focus-visible { outline: 3px solid #63844d; outline-offset: 3px; }
[disabled] { cursor: default; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.boot { padding: 3rem; color: var(--subtle); }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: min(1200px, calc(100% - 80px)); min-height: 73px; margin: auto; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--forest-deep); text-decoration: none; font-size: 21px; font-weight: 760; letter-spacing: .02em; white-space: nowrap; }
.brand img { flex: 0 0 38px; border-radius: 10px; }
.top-nav { display: flex; align-items: center; gap: 9px; }
.top-nav a { display: flex; align-items: center; gap: 8px; padding: 10px 14px; min-height: 44px; text-decoration: none; white-space: nowrap; color: var(--subtle); font-size: 14px; font-weight: 650; border-radius: 9px; }
.top-nav a:hover, .top-nav a.current { color: var(--forest-deep); background: var(--haze); }
.top-nav a.current { font-weight: 750; }
.shell { width: min(1200px, calc(100% - 80px)); margin: 0 auto; padding: 43px 0 48px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 33px; }
.page-heading h1 { font-size: clamp(30px, 3.1vw, 43px); font-weight: 760; letter-spacing: -.055em; line-height: 1.16; }
.page-heading p { margin-top: 10px; font-size: 15px; color: var(--subtle); line-height: 1.6; }
.heading-actions, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.heading-actions { justify-content: flex-end; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 15px; min-height: 43px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); text-decoration: none; white-space: nowrap; font-size: 14px; font-weight: 690; color: var(--ink); line-height: 1.2; transition: background .15s, border-color .15s, color .15s; }
.button:hover:not(:disabled) { background: var(--haze); border-color: #c3cfc0; }
.button:disabled { opacity: .48; }
.button.primary { color: var(--white); border-color: var(--forest); background: var(--forest); }
.button.primary:hover:not(:disabled) { background: var(--forest-deep); border-color: var(--forest-deep); }
.button.soft { background: var(--haze); border-color: var(--haze); }
.button.soft:hover:not(:disabled) { border-color: #c7d5bf; background: #e4edda; }
.button.quiet, .button.danger-quiet { border-color: transparent; background: transparent; }
.button.quiet { color: var(--subtle); }
.button.danger, .button.danger-quiet { color: var(--danger); }
.button.danger { border-color: #e7beb7; background: var(--danger-bg); }
.button.danger:hover:not(:disabled), .button.danger-quiet:hover:not(:disabled) { color: #7d2d24; background: var(--danger-bg); border-color: #e7beb7; }
.button.compact { font-size: 13px; min-height: 37px; padding: 8px 10px; }
.button.compact svg { width: 16px; height: 16px; }
.button.text { border: 0; padding: 3px 5px; min-height: 24px; background: transparent; text-decoration: underline; }
.button.icon-button { width: 42px; padding: 0; }
.button.settings-button { background: var(--white); border-color: var(--line); padding-inline: 15px; }
.surface { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.muted, .field-help { color: var(--subtle); }
.badge { display: inline-flex; align-items: center; width: fit-content; padding: 4px 8px; border-radius: 7px; font-size: 12px; line-height: 1.25; font-weight: 680; color: var(--subtle); background: var(--haze); white-space: nowrap; }
.badge.downloaded { color: #34553e; background: var(--leaf); }
.badge.practice-tag { color: var(--ochre); background: var(--ochre-light); }
.badge.failed { color: var(--danger); background: var(--danger-bg); }
.field { display: grid; gap: 7px; min-width: 0; font-size: 13px; color: var(--body); font-weight: 660; }
input:not([type=range], [type=file]), select, textarea { min-width: 0; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--white); min-height: 43px; font-size: 14px; font-weight: 500; }
textarea { resize: vertical; line-height: 1.6; }
input:disabled, textarea:disabled { background: var(--haze); }
input::placeholder { color: #708173; }
.select-wrap { position: relative; min-width: 0; }
.select-wrap select { appearance: none; padding-right: 35px; overflow: hidden; text-overflow: ellipsis; }
.select-wrap svg { position: absolute; top: 50%; right: 11px; transform: translateY(-50%); pointer-events: none; color: var(--subtle); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.section-head h2 { font-size: 20px; line-height: 1.35; }
.section-head h3 { font-size: 17px; }
.section-head p { color: var(--subtle); font-size: 13px; margin-top: 6px; line-height: 1.55; }
.empty-symbol { display: grid; place-items: center; background: var(--leaf); color: var(--forest); width: 61px; height: 61px; border-radius: 19px; }
.centered { display: grid; place-items: center; gap: 16px; padding: 46px 23px; text-align: center; }
.centered h2 { font-size: 25px; }
.centered p { color: var(--subtle); }
.notice { display: flex; align-items: start; gap: 9px; border-radius: 9px; padding: 11px 13px; background: var(--haze); color: var(--body); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.notice svg { margin-top: 2px; }
.notice.error { background: var(--danger-bg); color: var(--danger); }
.notice.success { background: var(--leaf); color: var(--forest-deep); }
.learn-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 34px; align-items: start; }
.lesson-sidebar { display: grid; gap: 14px; }
.picker, .mode-panel { padding: 19px; }
.side-heading { display: flex; align-items: center; gap: 8px; color: var(--forest); }
.side-heading h2, .mode-panel h2 { line-height: 1.2; font-size: 16px; font-weight: 730; }
.picker .field { margin-top: 15px; }
.local-label { display: flex; align-items: center; gap: 7px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 12px; }
.local-label .version { margin-left: auto; color: var(--subtle); font-variant-numeric: tabular-nums; }
.mode-buttons { display: grid; gap: 6px; margin-top: 12px; }
.mode-option { display: grid; grid-template-columns: 34px 1fr 16px; align-items: center; text-align: left; gap: 10px; border: 1px solid transparent; padding: 8px; min-height: 54px; background: transparent; border-radius: 10px; }
.mode-option:hover, .mode-option.selected { background: var(--haze); }
.mode-option.selected { border-color: #cdddc2; }
.mode-icon { display: grid; place-items: center; width: 34px; height: 34px; color: var(--forest); border-radius: 8px; background: #f1f3eb; }
.mode-option.selected .mode-icon { background: var(--leaf); }
.mode-text { display: grid; gap: 2px; line-height: 1.25; }
.mode-text strong { font-size: 14px; }
.mode-text small { font-size: 11px; color: var(--subtle); }
.mode-check { display: grid; place-items: center; color: var(--forest); }
.rating-panel { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; justify-content: space-between; margin-inline: 3px; }
.rating-count { display: inline-flex; align-items: center; gap: 5px; padding: 6px; font-size: 13px; white-space: nowrap; color: var(--subtle); }
.button.due-button { padding: 7px 8px; min-height: 40px; font-size: 13px; }
.lesson-stage { min-width: 0; }
.learn-layout.no-picker { grid-template-columns: minmax(0, 1fr); }
.learn-layout.no-picker .lesson-sidebar { display: none; }
.lesson-heading { display: flex; gap: 16px; justify-content: space-between; align-items: baseline; min-height: 29px; margin-bottom: 13px; }
.lesson-title { display: flex; gap: 11px; align-items: center; min-width: 0; }
.lesson-title h2 { font-size: 24px; line-height: 1.3; overflow-wrap: anywhere; }
.lesson-count { color: var(--subtle); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lesson-count strong { font-size: 23px; color: var(--ink); }
.lesson-progress { background: #e4eadf; border-radius: 99px; height: 7px; overflow: hidden; margin-bottom: 18px; }
.lesson-progress > div { background: #759455; height: 100%; border-radius: inherit; transition: width .18s ease-out; }
.flashcard { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); align-items: stretch; padding: 16px; min-height: 392px; border: 1px solid var(--line); border-radius: 21px; background: var(--paper); box-shadow: var(--shadow); }
.card-media { display: grid; place-items: center; aspect-ratio: 1; width: 100%; align-self: center; overflow: hidden; border-radius: 13px; position: relative; background: #f3ede3; }
.card-media img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; }
.card-content { display: flex; gap: 17px; flex-direction: column; align-items: stretch; justify-content: center; min-width: 0; position: relative; padding: 19px 17px 19px 32px; }
.word-answer { display: grid; gap: 6px; }
.word-line { display: flex; gap: 8px; align-items: start; flex-wrap: wrap; }
.word-line h3 { font-family: var(--serif); font-size: clamp(38px, 5.45vw, 79px); font-weight: 650; line-height: 1.08; letter-spacing: -.07em; overflow-wrap: anywhere; }
.word-line .badge { margin-top: 8px; }
.ipa { color: #697d69; font-family: var(--serif); font-size: 22px; line-height: 1.35; overflow-wrap: anywhere; }
.meaning { font-size: clamp(18px, 1.9vw, 24px); font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.example { margin-top: 20px; background: var(--haze); border-radius: 0 9px 9px 0; border-left: 3px solid #a2b680; padding: 12px 13px; color: var(--body); overflow-wrap: anywhere; }
.example p[lang=en] { font: 600 18px/1.38 var(--serif); }
.example p + p { margin-top: 6px; color: var(--subtle); font-size: 13px; line-height: 1.5; }
.voice-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.voice-controls:empty, .flow-feedback:empty { display: none; }
.flow-feedback { display: grid; gap: 6px; }
.audio-gate:not(:empty) { margin-bottom: 12px; }
.enable-sound { width: fit-content; color: var(--forest-deep); border-color: #bad284; background: var(--lime); }
.enable-sound:hover:not(:disabled) { background: #cce386; }
.audio-error { display: flex; align-items: center; gap: 7px; font-size: 12px; line-height: 1.35; }
.audio-error { color: var(--ochre); flex-wrap: wrap; }
.card-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 16px; }
.card-actions .button { min-height: 49px; }
.rating-actions { display: flex; gap: 9px; }
.rating-actions .button { min-width: 105px; }
.button.review-action { background: var(--ochre-light); border-color: #ebdeb8; color: #6c4810; }
.button.review-action:hover:not(:disabled) { background: #f6e6bd; border-color: #e2ce9c; }
.page-prev { justify-self: start; }
.page-next { justify-self: end; flex-direction: row-reverse; }
.sound-art { width: 100%; height: 100%; min-height: 140px; display: grid; place-items: center; background: #e9efdc; color: var(--forest); }
.sound-rings { width: 126px; height: 126px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); box-shadow: 0 0 0 22px #d7e6b8, 0 0 0 44px #dfeacc; }
.question { display: grid; gap: 8px; }
.question-symbol { display: grid; place-items: center; background: var(--leaf); border-radius: 11px; width: 43px; height: 43px; margin-bottom: 3px; color: var(--forest); }
.question h3 { font-size: clamp(20px, 2.6vw, 31px); line-height: 1.3; }
.question p { color: var(--subtle); font-family: var(--serif); font-size: 19px; }
.timer, .timer-spacer { width: 80px; height: 80px; border-radius: 50%; margin-top: 10px; }
.timer { display: grid; place-items: center; background: conic-gradient(#77a050 calc(var(--remaining, 1) * 1turn), #e6ebdf 0turn); }
.timer span { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 28px; font-family: var(--serif); font-variant-numeric: tabular-nums; }
.complete-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; min-height: 380px; text-align: center; }
.complete-card .empty-symbol { width: 76px; height: 76px; border-radius: 23px; margin-bottom: 6px; }
.complete-card h3 { font-size: 28px; }
.complete-card p { color: var(--subtle); }
.complete-card .actions { margin-top: 6px; justify-content: center; }
.dialog { background: var(--paper); color: var(--ink); padding: 23px; border: 1px solid var(--line); border-radius: 19px; box-shadow: 0 18px 90px #122c2340; max-width: min(480px, calc(100% - 26px)); width: 100%; }
.dialog::backdrop { background: #182f26aa; }
.dialog-heading { display: flex; align-items: center; gap: 16px; justify-content: space-between; margin-bottom: 20px; }
.dialog-heading h2 { font-size: 21px; }
.dialog-actions { justify-content: flex-end; margin-top: 20px; }
.dialog-copy { font-size: 14px; color: var(--body); line-height: 1.65; margin-bottom: 17px; }
.range-field { display: grid; gap: 9px; margin-top: 18px; }
.range-field > span { display: flex; justify-content: space-between; font-size: 14px; }
.range-field input { width: 100%; accent-color: var(--forest); }
.field-help { margin-top: 7px; font-size: 12px; line-height: 1.6; }
.library-heading { margin-bottom: 17px; }
.library-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; margin-bottom: 20px; border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.library-toolbar .heading-actions:empty { display: none; }
.library-toolbar .top-nav a.current { background: var(--leaf); }
.library-top { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(260px, 1fr); gap: 22px; margin-bottom: 26px; }
.upload-panel, .storage-panel { padding: 21px; }
.dropzone { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 100px; margin-top: 15px; padding: 14px; border: 1px dashed #aebca7; border-radius: 12px; background: #f7f9f1; }
.dropzone.dragover { background: var(--leaf); border-color: var(--forest); }
.upload-symbol, .pack-symbol, .storage-symbol { display: grid; place-items: center; flex: 0 0 auto; width: 43px; height: 43px; border-radius: 11px; background: var(--leaf); color: var(--forest); }
.drop-copy { flex: 1 1 160px; }
.drop-copy strong { font-size: 15px; }
.drop-copy p { margin-top: 4px; font-size: 12px; color: var(--subtle); }
.upload-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.selected-file { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 12px; color: var(--body); }
.selected-file strong { overflow-wrap: anywhere; }
.upload-progress { width: 100%; margin-top: 11px; accent-color: var(--forest); }
.upload-details:not(:empty), .admin-report:not(:empty), .library-report:not(:empty) { margin-bottom: 15px; }
.upload-details:not(:empty) { margin: 12px 0 0; }
.storage-panel { background: var(--forest); color: white; }
.storage-symbol { color: var(--lime); background: #3b5948; margin-bottom: 13px; }
.storage-panel h2 { font-size: 16px; font-weight: 670; }
.storage-value { font-size: 35px; font-family: var(--serif); margin-top: 4px; font-variant-numeric: tabular-nums; }
.storage-panel p { font-size: 13px; color: #e0ebdc; margin: 6px 0 0; }
.storage-panel p.storage-status { display: flex; gap: 7px; align-items: center; margin: 16px 0 6px; }
.storage-panel .danger-quiet { color: #f5d7d0; margin-left: -9px; padding-inline: 8px; }
.pack-list { display: grid; gap: 14px; }
.list-title { justify-content: flex-start; font-size: 13px; }
.pack-card { overflow: hidden; }
.pack-heading { display: flex; align-items: center; gap: 12px; padding: 17px 20px; }
.pack-name { flex: 1 1 auto; min-width: 0; }
.pack-name > div, .title-line { display: flex; gap: 8px; align-items: center; }
.pack-name h3 { font-size: 17px; overflow-wrap: anywhere; }
.pack-name p { margin-top: 4px; color: var(--subtle); font-size: 12px; }
.pack-actions { justify-content: flex-end; }
.unit-list { padding: 0; margin: 0; list-style: none; }
.unit-list > li { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(170px, auto); align-items: center; gap: 12px; border-top: 1px solid var(--line); padding: 11px 20px; }
.unit-title { display: grid; gap: 4px; min-width: 0; }
.unit-title strong { font-size: 15px; overflow-wrap: anywhere; }
.unit-title .muted { font-size: 12px; }
.unit-actions { justify-content: flex-end; }
.unit-results { list-style: none; margin: 11px 0 0; padding: 0; font-size: 13px; display: grid; gap: 5px; max-height: 300px; overflow: auto; }
.unit-results > li { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.result-unit { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.unit-results details { margin-top: 5px; color: var(--subtle); line-height: 1.6; }
.field-error { margin: 6px 0 0; color: var(--danger); }
.login-panel { max-width: 440px; padding: 27px; margin: 8px auto; }
.login-panel h2 { margin-top: 15px; font-size: 25px; }
.login-panel p { color: var(--subtle); font-size: 14px; margin-top: 7px; }
.login-form { display: grid; gap: 15px; margin-block: 20px; }
.login-form button { justify-self: start; padding-inline: 20px; }
.login-back, .unit-link { display: inline-flex; align-items: center; gap: 7px; color: var(--forest); text-decoration: none; font-size: 13px; }
.login-back:hover, .unit-link:hover { text-decoration: underline; }
.admin-upload { margin-bottom: 19px; }
.admin-layout { display: grid; grid-template-columns: 212px minmax(0, 1fr); gap: 20px; align-items: start; }
.versions-panel { padding: 16px; min-width: 0; }
.release-group { margin-top: 17px; }
.release-group h3 { font-size: 13px; overflow-wrap: anywhere; }
.release-origin { font-size: 11px; color: var(--subtle); margin-top: 4px; }
.release-item { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; text-align: left; min-height: 39px; padding: 6px 7px; border: 1px solid transparent; border-radius: 8px; background: transparent; margin-top: 5px; font-size: 12px; }
.release-item[aria-pressed=true], .card-item[aria-pressed=true] { background: var(--haze); border-color: #cedbc8; }
.release-item:hover, .card-item:hover { background: var(--haze); }
.release-item span:not(.badge) { color: var(--subtle); white-space: nowrap; }
.release-item .badge { padding: 4px; font-size: 10px; }
.editor-area { display: grid; gap: 16px; min-width: 0; }
.release-toolbar { padding: 18px; }
.release-actions { margin-top: 14px; }
.card-editor { display: grid; grid-template-columns: 185px minmax(0, 1fr); overflow: clip; }
.editor-picker { min-width: 0; padding: 16px 12px; background: #f9faf4; border-right: 1px solid var(--line); }
.editor-picker h3 { font-size: 16px; margin-bottom: 12px; }
.editor-picker .field { margin-bottom: 10px; }
.editor-picker input[type=search] { margin-bottom: 9px; }
.unit-link { margin-bottom: 10px; }
.card-index { margin: 0; padding: 0; list-style: none; max-height: 590px; overflow: auto; }
.card-item { display: flex; align-items: start; flex-wrap: wrap; gap: 4px 7px; width: 100%; text-align: left; min-height: 43px; border-radius: 8px; padding: 8px; border: 1px solid transparent; background: transparent; }
.card-item strong { font-family: var(--serif); font-size: 16px; overflow-wrap: anywhere; }
.card-item small { color: var(--subtle); font-size: 11px; }
.card-item .badge { font-size: 10px; }
.editor-body { padding: 18px; min-width: 0; }
.editor-body .stable-id { font-size: 11px; overflow-wrap: anywhere; }
.card-form { display: grid; gap: 13px; margin-top: 14px; }
.field-grid { display: grid; gap: 11px 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-wide { grid-column: 1 / -1; }
.editor-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.media-edit { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 11px; display: grid; align-content: start; gap: 8px; }
.media-edit h4 { font-size: 13px; }
.media-edit audio { max-width: 100%; width: 100%; height: 39px; }
.media-edit img { max-width: 114px; width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 7px; background: var(--canvas); }
.media-edit.image-edit { grid-row: span 2; }
.media-edit .muted { font-size: 12px; }
.form-footer { align-items: center; }
.form-dirty { font-size: 12px; }

@media (max-width: 1000px) {
  .top-inner, .shell { width: calc(100% - 48px); }
  .learn-layout { grid-template-columns: 219px minmax(0, 1fr); gap: 20px; }
  .picker, .mode-panel { padding: 15px; }
  .flashcard { min-height: 310px; padding: 12px; }
  .card-content { padding: 12px 9px 12px 19px; gap: 12px; }
  .rating-actions .button { min-width: auto; }
  .admin-layout { grid-template-columns: 172px minmax(0, 1fr); gap: 13px; }
  .card-editor { grid-template-columns: 154px minmax(0, 1fr); }
  .release-item .badge { display: none; }
}
@media (max-width: 760px) {
  .top-inner, .shell { width: calc(100% - 32px); }
  .top-inner { min-height: 62px; gap: 8px; }
  .top-nav { gap: 2px; }
  .top-nav a { padding: 9px 8px; }
  .shell { padding-top: 26px; }
  .page-heading { margin-bottom: 20px; }
  .page-heading p { font-size: 13px; margin-top: 7px; }
  .learn-layout { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .lesson-sidebar { display: grid; grid-template-columns: 1fr; gap: 9px; }
  .picker { display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; padding: 11px; }
  .picker .side-heading { grid-column: 1; }
  .picker .side-heading h2 { font-size: 14px; }
  .picker .field { margin: 0; grid-row: 2; gap: 4px; }
  .picker .local-label { grid-column: 2; margin: 0; padding: 0; justify-content: flex-end; border: 0; font-size: 11px; }
  .local-label .version { margin-left: 0; }
  .mode-panel { padding: 0; background: transparent; box-shadow: none; border: 0; }
  .mode-panel h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mode-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; gap: 7px; }
  .mode-option { grid-template-columns: auto 1fr; min-height: 47px; gap: 4px; border-color: var(--line); background: var(--paper); padding: 5px; }
  .mode-option.selected { background: var(--leaf); }
  .mode-icon { width: 30px; height: 30px; background: transparent; }
  .mode-check { display: none; }
  .mode-text strong { font-size: 13px; }
  .mode-text small { font-size: 10px; white-space: nowrap; }
  .rating-panel { min-height: 30px; }
  .rating-count { padding: 4px; }
  .button.due-button { min-height: 35px; }
  .lesson-heading { margin-bottom: 9px; }
  .lesson-title h2 { font-size: 19px; }
  .lesson-count strong { font-size: 20px; }
  .lesson-progress { margin-bottom: 11px; }
  .flashcard { min-height: 260px; }
  .library-top { grid-template-columns: 1fr; gap: 12px; }
  .unit-list > li { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 11px 14px; }
  .unit-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .pack-heading { padding: 13px; flex-wrap: wrap; }
  .pack-actions { flex-basis: 100%; justify-content: flex-start; }
  .admin-layout { grid-template-columns: 1fr; }
  .versions-panel { display: flex; flex-wrap: wrap; align-items: start; gap: 10px 16px; }
  .versions-panel .side-heading { flex-basis: 100%; }
  .release-group { margin: 0; min-width: 96px; }
  .release-item .badge { display: inline-flex; }
  .card-editor { grid-template-columns: minmax(135px, 1fr) minmax(0, 2.5fr); }
}
@media (max-width: 520px) {
  .brand { font-size: 17px; gap: 7px; }
  .brand img { width: 32px; height: 32px; flex-basis: 32px; }
  .top-nav a { font-size: 12px; padding-inline: 7px; }
  .top-nav a svg { display: none; }
  .shell { padding-top: 20px; }
  .page-heading { align-items: start; gap: 6px; }
  .page-heading h1 { font-size: 29px; }
  .heading-actions { gap: 4px; }
  .heading-actions .button, .page-heading > .button { font-size: 12px; padding-inline: 8px; }
  .heading-actions .button svg, .page-heading > .button svg { display: none; }
  .flashcard { grid-template-columns: 1fr; gap: 0; padding: 10px; }
  .card-media { aspect-ratio: 1.54; }
  .card-content { padding: 15px 8px 8px; gap: 11px; }
  .word-line h3 { font-size: clamp(42px, 11vw, 54px); }
  .word-answer { gap: 2px; }
  .ipa { font-size: 18px; }
  .meaning { margin-top: 1px; font-size: 17px; }
  .example { margin-top: 11px; padding: 8px 10px; }
  .example p[lang=en] { font-size: 16px; }
  .example p + p { margin-top: 3px; }
  .voice-controls .button { min-height: 44px; }
  .question { position: relative; min-height: 88px; padding-right: 65px; }
  .question-symbol { width: 33px; height: 33px; margin-bottom: 0; }
  .question-symbol svg { width: 17px; height: 17px; }
  .question p { font-size: 15px; }
  .timer { position: absolute; right: 3px; top: 4px; width: 62px; height: 62px; }
  .timer span { width: 50px; height: 50px; font-size: 23px; }
  .timer-spacer { display: none; }
  .sound-rings { transform: scale(.78); }
  .card-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card-actions .button { min-height: 46px; }
  .page-prev, .page-next { justify-self: stretch; }
  .rating-actions { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: 1fr 1fr; }
  .complete-card { min-height: 260px; }
  .complete-card h3 { font-size: 24px; }
  .card-editor { grid-template-columns: 1fr; }
  .editor-picker { border-right: 0; border-bottom: 1px solid var(--line); }
  .card-index { max-height: 160px; }
  .editor-media { grid-template-columns: 1fr; }
  .media-edit.image-edit { grid-row: auto; }
  .editor-body, .release-toolbar { padding: 13px; }
  .upload-panel, .storage-panel { padding: 14px; }
  .upload-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
