/* 單字學習室依可用空間排頁，每個內容區都具有明確的高度。 */
body.study-mode { height: 100dvh; min-height: 0; overflow: hidden; }
.study-mode #main, .study-mode #view-collection, .study-mode .has-generated { overflow: visible; min-height: 0; }
.study-mode #status:not([hidden]) { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 20; width:max-content; max-width: calc(100% - 24px); }
.study-mode .word-workspace { grid-template-columns: minmax(230px, 250px) minmax(0, 1fr); gap: 16px; height: 100%; }
.study-mode .library-panel { min-height: 0; padding: 16px; gap: 8px; }
.study-mode .library-heading { margin: 0; gap: 8px; }
.study-mode .library-heading h1 { font-size: 24px; }
.study-mode .library-heading .button { padding: 0 6px; }
.study-mode .library-controls { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.study-mode .library-toolbar { display: block; }
.study-mode .library-toolbar label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 16px; }
.study-mode .library-toolbar select { min-height: 44px; min-width: 0; font-size: 16px; padding: 6px; }
.study-mode .library-summary { min-height: 28px; padding: 0 4px; margin: 0; gap: 4px; }
.study-mode .library-summary .muted { font-size: 16px; }
.study-mode .word-index { --word-row-height: 72; flex: 1; min-height: 0; max-height: none; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; padding: 3px; }
.study-mode .word-choice { height: calc(3.2rem + 20px); min-height: calc(3.2rem + 20px); flex: 0 0 calc(3.2rem + 20px); padding: 8px 10px; gap: 0; margin: 0; }
.study-mode .word-choice strong, .study-mode .word-choice span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; line-height: 1.55; }
.study-mode .word-choice strong { font-size: 1.1rem; }
.study-mode .word-choice span { font-size: 1rem; }
.study-mode .word-index > .empty { padding: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; height: 100%; }
.study-mode .word-index > .empty .button { flex-shrink: 0; padding: 6px 10px; margin: 0; }
.study-mode .word-index > .empty p { margin: 0; font-size: 16px; }
.study-mode .library-pages { flex-shrink: 0; padding: 0; }
.study-mode .study-empty { padding: 24px; }
.study-mode #generated-workspace > .page-links { margin: 0; }

.study-room { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 18px 20px; gap: 16px; overflow: visible; container-type: normal; }
.study-room button, .study-reader button { font-size: 16px; min-height: 44px; min-width: 44px; }
.study-room :focus-visible, .study-reader :focus-visible, .library-pages :focus-visible { outline-offset: 1px; }
.study-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-shrink: 0; }
.study-identity { min-width: 0; flex: 1; }
.study-word { margin: 0; line-height: 1.2; }
.study-title-button { display: block; padding: 0; border: 0; background: transparent; font-weight: 750; font-size: clamp(28px, 1.75rem, 36px) !important; line-height: 1.3; width: 100%; min-height: 44px !important; text-align: left; }
.study-title-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.study-meaning { display: block; color: var(--muted); font-size: 1rem; font-weight: 400; min-height: 0 !important; margin-top: 4px; max-width: 100%; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
.study-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.study-sound { white-space: nowrap; padding-inline: 6px; flex-shrink: 0; }
.study-button, .study-icon, .page-arrow { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; font-weight: 600; line-height: 1.4; }
.study-button:hover, .study-icon:hover, .page-arrow:hover { background: var(--soft); border-color: var(--primary); }
.study-button.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.study-button.danger { color: var(--danger); }
.study-icon, .page-arrow { padding: 0 10px; }
.study-back { display: none; }
.study-menu { position: relative; }
.study-menu summary { list-style: none; font-size: 24px; line-height: 1; }
.study-menu summary::-webkit-details-marker { display: none; }
.study-menu-items { position: absolute; right: 0; top: calc(100% + 4px); z-index: 8; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 30px var(--shadow); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; width: 184px; }
.study-menu-items .study-button { border: 0; justify-content: start; }
.study-room .content-tabs { padding: 3px; margin: 0; gap: 2px; width: auto; flex: none; border-radius: 12px; }
.study-room .content-tabs [role=tab] { padding: 4px 16px; min-height: 44px; font-size: 16px; }
.study-room .tabbed-content { flex: 1; min-height: 0; gap: 0; }
.study-room .content-panel { flex: 1; min-height: 0; padding: 0; overflow: visible; }
.study-room .study-learning { display: grid; grid-template-rows: minmax(0, 1fr) min(50%, clamp(232px, 28dvh, 240px)); gap: 8px; }
.study-visual { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 22px; min-height: 0; }
.study-memory { display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; border-radius: 12px; }
.study-memory:not(.has-image) { background: var(--hover); padding: 12px; }
.study-memory-state { flex: 1; min-height: 0; }
.study-memory-actions { display: flex; flex-shrink: 0; justify-content: center; }
.study-memory-actions:empty { display: none; }
.study-memory-details { display: none; }
.is-short .study-memory:not(.has-image) .study-memory-state, .is-short .study-memory:not(.has-image) .study-memory-actions,
.is-tight .study-memory:not(.has-image) .study-memory-state, .is-tight .study-memory:not(.has-image) .study-memory-actions { display: none; }
.is-short .study-memory:not(.has-image) .study-memory-details, .is-tight .study-memory:not(.has-image) .study-memory-details { display: flex; margin: auto; }
.study-image-button { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; display: flex; align-items: flex-start; justify-content: center; }
.study-room .memory-image { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; min-height: 0; margin: 0; border-radius: 10px; object-fit: contain; object-position: center top; background: transparent; }
.study-association { display: flex; flex-direction: column; min-height: 0; min-width: 0; gap: 8px; padding: 0; }
.study-association > h3 { color: var(--primary); font-size: 1rem; line-height: 1.55; font-weight: 700; flex-shrink: 0; }
.study-mnemonic { flex: 1; min-height: 0; }
.study-mnemonic .page-text .page-block + .page-block { margin-top: 6px; }
.study-link { display: inline-flex; align-items: center; padding: 0 2px; min-height: 44px; border: 0; border-radius: 4px; color: var(--primary); background: transparent; font-size: 1rem; text-decoration: underline; text-underline-offset: 4px; }
.study-example { border-top: 1px solid var(--line); padding-top: 6px; min-height: 0; }
.study-example .page-text .example-english { font-size: 1rem; }
.study-example .page-text .page-block + .page-block { margin-top: 4px; }
.study-example-item { display: block; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; text-align: left; }
.study-example-item + .study-example-item { margin-top: 8px; }
.study-example-item .page-block { display: block; }
button.study-example-item { cursor: pointer; }
button.study-example-item:hover,button.study-example-item:focus-visible { background: var(--hover); }
.text-pager { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; gap: 4px; }
.page-text { flex: 1; min-height: 0; min-width: 0; padding: 2px 0; overflow: visible; }
.page-text .page-block { margin: 0; font-size: 1rem; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; font-weight: 400; }
.page-text .page-block + .page-block { margin-top: 8px; }
.page-text .heading { font-weight: 700; color: var(--primary); }
.page-text .example-english { font-size: 1.125rem; font-weight: 600; }
.page-text .translation { color: var(--muted); }
.page-text .speaking-feedback { padding: 12px; background: var(--soft); border-radius: 12px; }
.page-controls, .study-card-controls { display: flex; align-items: center; justify-content: end; gap: 8px; flex-shrink: 0; min-height: 44px; }
.page-controls > .study-button:first-child { margin-right: auto; }
.study-example .page-count { min-width: 0; white-space: normal; line-height: 1.3; }
.page-count { font-size: 16px; line-height: 1.4; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pager-font-probe { position: absolute; visibility: hidden; pointer-events: none; font-size: 1rem; line-height: 1; width: max-content; height: max-content; top: 0; left: 0; }
.study-card-controls { display: none; justify-content: center; }
.study-speaking, .study-speaking-layout { display: flex; flex-direction: column; min-height: 0; height: 100%; gap: 16px; }
.study-speaking-content { flex: 1; min-height: 0; max-width: 840px; width: 100%; margin: 0 auto; }
.study-room .speaking-actions { display: flex; flex-shrink: 0; flex-wrap: nowrap; gap: 12px; margin: 0; padding: 8px 0 0; border-top: 1px solid var(--line); }
.study-room .speaking-actions .button { margin: 0; background: var(--primary); color: var(--on-primary); font-size: 16px; padding: 6px 12px; }
.study-room .speaking-actions .text-button { font-size: 16px; }
.study-room .speaking-actions .study-link { margin-left: auto; }
.study-speaking-content > .page-controls { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.study-speaking-content .speaking-actions { display: contents; }
.study-speaking-content .speaking-actions .button { margin-right: auto; }
.study-speaking-content .speaking-actions .text-button { padding: 6px; }
.study-speaking-content .speaking-actions .study-link { margin-left: 0; }

.study-room.is-flip { padding: 12px; gap: 8px; }
.is-flip .study-header { gap: 4px 8px; flex-wrap: wrap; }
.is-flip .study-identity { flex: 1 1 100%; }
.is-flip .study-tools { justify-content: end; width: 100%; gap: 8px; }
.is-flip .study-back { margin-right: auto; }
.is-flip .study-title-button { min-height: 36px; }
.is-flip .study-meaning { min-height: 36px; }
.is-flip .study-learning { grid-template-rows: minmax(0, 1fr) 44px; gap: 8px; }
.is-flip .study-visual { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 0; }
.is-flip .study-association { gap: 4px; padding: 0; }
.is-flip .study-association > h3 { display: block; }
.is-flip .study-card-controls { display: flex; }
.is-flip .study-example { border: 0; padding-top: 4px; }
.is-flip[data-card="0"] .study-example, .is-flip[data-card="1"] .study-example,
.is-flip[data-card="0"] .study-association, .is-flip[data-card="1"] .study-memory,
.is-flip[data-card="2"] .study-visual { display: none; }
.is-flip .study-mnemonic > .page-controls,.is-flip .study-example > .page-controls { display:none; }
.is-flip .study-card-controls { justify-content:end; }
.study-room.is-short .study-header { flex-wrap: nowrap; }
.study-room.is-short .study-identity { flex: 1; }
.study-room.is-short .study-tools { width: auto; }
.study-room.is-flip.is-short .study-visual, .study-room.is-flip.is-tight .study-visual { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 0; }
.study-room.is-tight:not(.is-flip) .study-visual { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
.study-room.is-short .study-word { font-size: 24px; }
.study-room.is-short .study-title-button, .study-room.is-short .study-meaning { min-height: 32px; }
.study-room.is-tight .study-association > h3 { display: none; }

.study-reader { width: min(800px, calc(100vw - 24px)); height: min(680px, calc(100dvh - 24px)); max-width: none; max-height: none; padding: 24px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); overflow: visible; }
.study-reader[open] { display: flex; flex-direction: column; gap: 16px; }
.study-reader::backdrop { background: var(--backdrop); backdrop-filter: blur(3px); }
.study-reader-heading { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.study-reader-heading h2 { flex: 1; min-width: 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.study-reader-body { flex: 1; min-height: 0; }
.study-reader-actions { display: flex; justify-content: end; gap: 12px; flex-shrink: 0; }
.study-choice-list { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 8px; }
.study-choice-list > button { flex: 0 0 48px; height: 48px; justify-content: start; }
.study-reader > img { flex: 1; min-height: 0; max-width: 100%; object-fit: contain; }
.study-consent { width: min(620px, calc(100vw - 24px)); height: min(540px, calc(100dvh - 24px)); max-width: none; max-height: none; padding: 20px; overflow: visible; }
.study-consent[open] { display: flex; flex-direction: column; gap: 12px; }
.study-consent .study-reader-heading h2 { margin: 0; font-size: 1.25rem; }
.study-consent form { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 12px; }
.consent-reading { flex: 1; min-height: 0; }
.consent-step-choices { flex-shrink: 0; }
.study-consent .consent-choice { min-height: 44px; padding: 6px 0; margin: 0; font-size: 1rem; }
.study-consent .consent-choice strong { font-size: 1rem; }
.study-consent .optional-label { display: none; }
.consent-step-actions { display: flex; justify-content: end; align-items: center; flex-shrink: 0; gap: 8px; }
.consent-step-actions .button { padding: 6px 10px; min-height: 44px; font-size: 1rem; }
.consent-step-actions #voice-dialog-cancel { margin-right: auto; }

@media (max-width: 960px) {
  .study-mode .word-workspace { display: flex; }
  .study-mode .collection-detail .library-panel { display: none; }
  .study-mode #view-collection:not(.collection-detail) .study-pane,
  .study-mode .study-empty { display: none; }
  .study-back { display: inline-flex; }
}
@media (max-width: 700px) {
  .study-mode #status:not([hidden]) { bottom:calc(72px + env(safe-area-inset-bottom)); }
  .study-mode main { padding: 4px 4px calc(72px + env(safe-area-inset-bottom)); }
  .study-mode .library-panel { padding: 8px; }
  .study-mode .library-controls { flex-direction: row; align-items: center; }
  .study-mode .search-field { flex: 1; min-width: 0; }
  .study-mode .library-toolbar label { font-size: 0; gap: 0; }
  .study-room .content-tabs [role=tab] { padding: 4px 12px; }
  .study-reader { padding: 12px; gap: 8px; border-radius: 14px; }
  .study-reader[open] { gap: 8px; }
}
@media (max-height: 540px) {
  .study-mode .topbar { min-height: 48px; padding: 2px 12px; }
  .study-mode .topbar .brand img, .study-mode .topbar .brand small, .study-mode .workspace-name { display: none; }
  .study-mode .topbar .brand { font-size: 16px; min-width: 0; }
  .study-mode main { padding-top: 4px; }
  .study-mode .sidebar { padding-top: 8px; gap: 4px; }
  .study-mode .sidebar-label { display: none; }
  .study-mode .library-summary { display: none; }
  .study-mode .library-controls { flex-direction: row; }
  .study-mode .library-toolbar label { font-size: 0; gap: 0; }
  .study-mode .library-panel { padding: 8px; gap: 4px; display: grid; grid-template-columns: minmax(0, 1fr) 44px; grid-template-rows: 48px minmax(0, 1fr) auto; }
  .study-mode .library-heading { display: contents; }
  .study-mode .library-heading h1 { display: none; }
  .study-mode .library-heading button { grid-area: 1 / 2; width: 44px; padding: 0; font-size: 0; }
  .study-mode .library-heading button::after { content: '↻'; font-size: 24px; }
  .study-mode .library-controls { grid-area: 1 / 1; padding: 0; margin: 0; min-width: 0; align-items: center; }
  .study-mode .library-toolbar label { margin: 0; }
  .study-mode .search-field { flex: 1; min-width: 0; }
  .study-mode .search-label { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .study-mode .word-index { grid-area: 2 / 1 / 3 / 3; }
  .study-mode .library-pages { grid-area: 3 / 1 / 4 / 3; }
  .study-room { padding: 8px 12px; gap: 8px; }
  .study-room .study-header { gap: 8px; }
  .study-room.is-short .study-title-button, .study-room.is-short .study-meaning { min-height: 32px; }
  .study-room .speaking-actions { padding-top: 4px; gap: 8px; }
  .study-mode #generated-workspace > .page-links { height: 44px; }
}
@media (max-height: 540px) and (max-width: 700px) {
  .study-mode #status:not([hidden]) { bottom:calc(52px + env(safe-area-inset-bottom)); }
  .study-mode .sidebar nav { min-height: 48px; padding: 0; }
  .study-mode .nav-item { min-height: 48px; padding: 2px; }
  .study-mode .nav-icon { display: none; }
  .study-mode main { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
  .study-room.is-short .study-header { flex-wrap: wrap; }
  .study-room.is-short .study-identity { flex: 1 1 100%; }
  .study-room.is-short .study-word { min-width: 0; }
  .study-room.is-short .study-title-button { font-size: clamp(28px, 1.4rem, 32px) !important; }
  .study-room.is-short .study-tools { width: 100%; }
}
@media (max-width: 400px) {
  .is-flip .study-tools { gap: 4px; }
  .study-room .content-tabs [role=tab] { padding-inline: 8px; }
}
@media (max-height: 380px) and (min-width: 500px) {
  .study-room.is-short { padding: 6px 8px; gap: 4px; }
  .study-room.is-short .study-header { flex-wrap: nowrap; }
  .study-room.is-short .study-identity { flex: 1; }
  .study-room.is-short .study-tools { width: auto; }
  .study-room.is-short .study-title-button { font-size: 28px !important; line-height: 1.2; }
  .study-room.is-short .study-meaning { font-size: 16px; margin-top: 2px; }
  .study-room.is-short .study-learning { gap: 4px; }
  .study-room.is-short .study-association { padding: 0; }
}

/* 學習室共用設計語言，圖文與翻卡仍使用原本的尺寸計算。 */
.study-mode .library-panel { background: transparent; border: 0; padding: 12px 12px 8px 0; }
.study-mode .word-choice { border-color: transparent; }
.study-room .content-tabs { border: 0; border-radius: 10px; background: var(--hover); padding: 3px; margin: 0; }
.study-room .content-tabs [role=tab] { border: 0; border-radius: 8px; padding: 4px 14px; }
.study-room .content-tabs [role=tab][aria-selected=true] { background: var(--surface); color: var(--primary); }
.study-button,.study-icon,.page-arrow { color: var(--ink); background: var(--hover); border-color: transparent; }
.study-button:hover,.study-icon:hover,.page-arrow:hover:not(:disabled) { color: var(--primary); background: var(--soft); }
.study-button.primary { background: var(--primary); color: var(--on-primary); }
.study-association > h3,.page-text .page-block.heading { color: var(--primary); }
.has-generated > .section-heading { display: none; }
@media (max-width:960px) { .study-mode .library-panel { background: var(--surface); border: 1px solid var(--line); padding: 14px; } }
@media (max-width:700px) { .study-mode .sidebar { padding:0; }.study-mode .library-panel { padding:10px; }.study-room .content-tabs [role=tab] { padding-inline:12px; } }
@media (max-width:400px) { .study-room .content-tabs [role=tab] { padding-inline:8px; } }
@media (max-height:540px) { .study-mode .library-panel { padding:8px; } }
@media (min-height:541px) { .compact-ui.study-mode .word-choice { padding-block:4px; height:calc(3.2rem + 12px); min-height:calc(3.2rem + 12px); flex-basis:calc(3.2rem + 12px); } }
@media (max-height:540px) and (min-width:500px) {
  .study-mode .word-choice { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); align-items:center; column-gap:12px; height:calc(1.8rem + 20px); min-height:calc(1.8rem + 20px); flex-basis:calc(1.8rem + 20px); }
}
.speaking-activity { order:-1; flex-basis:100%; color:var(--muted); font-size:16px; line-height:1.5; }
.speaking-activity[data-phase=recording] { color:var(--danger); font-weight:600; }
.is-short .page-text .speaking-feedback,.is-tight .page-text .speaking-feedback { padding:4px 8px; }

/* 單字學習使用文件捲動，口說與其他工具維持各自的固定操作區。 */
body.word-reading { height:auto; min-height:100dvh; overflow:visible; overflow-anchor:none; }
.word-reading .topbar { position:sticky; top:0; z-index:10; }
.word-reading .layout { flex:none; min-height:calc(100dvh - var(--learn-topbar-height,64px)); align-items:start; margin:0 auto; }
.word-reading main { display:block; width:100%; }
.word-reading .sidebar { position:sticky; top:var(--learn-topbar-height,64px); height:calc(100dvh - var(--learn-topbar-height,64px)); }
.word-reading .word-workspace { height:auto; align-items:start; }
.word-reading .library-panel { position:sticky; top:calc(var(--learn-topbar-height,64px) + 16px); height:calc(100dvh - var(--learn-topbar-height,64px) - 40px); }
.word-reading .study-pane,.word-reading #spell-result { flex:none; width:100%; height:auto; }
.study-room.reading { padding:20px; gap:20px; }
.reading .study-header { align-items:start; }
.reading .study-title-text,.reading .study-meaning { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
.reading .tabbed-content,.reading .content-panel { flex:none; }
.study-room.reading .study-learning { display:flex; flex-direction:column; gap:24px; }
.reading .study-visual { grid-template-columns:minmax(0,1fr); align-items:start; gap:24px; }
.reading.reading-wide .study-visual { grid-template-columns:minmax(0,3fr) minmax(0,2fr); }
.reading .study-memory { align-self:start; width:100%; }
.reading .study-memory:not(.has-image) { padding:24px; min-height:180px; gap:16px; }
.reading .study-memory-state { flex:none; }
.reading .study-memory-state p { font-size:1rem; line-height:1.6; overflow-wrap:anywhere; }
.reading .study-image-button { position:static; display:block; width:100%; height:auto; min-height:0; line-height:0; }
.reading .memory-image { width:100%; height:auto; max-height:none; object-fit:contain; }
.reading.reading-wide .memory-image { width:auto; max-width:100%; max-height:min(440px,45dvh); margin-inline:auto; }
.reading .study-association,.reading .study-mnemonic { display:block; height:auto; }
.study-detail-group + .study-detail-group { margin-top:16px; }
.study-detail-group h3 { color:var(--primary); font-size:1rem; line-height:1.6; margin:0 0 6px; }
.study-detail-group p,.reading .study-mnemonic>p { font-size:1rem; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }
.study-detail-group p+p { margin-top:8px; }
.reading .study-example { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; padding-top:16px; }
.reading.reading-wide .study-example { grid-template-columns:repeat(3,minmax(0,1fr)); }
.reading .study-example-item { margin:0; padding:8px; align-self:start; min-width:0; font-size:1rem; line-height:1.6; }
.reading .study-example-item .page-block { white-space:pre-wrap; overflow-wrap:anywhere; }
.reading .study-example-item .example-english { font-weight:600; }
.reading .study-example-item .translation { margin-top:6px; color:var(--muted); }
.reading:not(.reading-wide) .study-header { flex-wrap:wrap; }
.reading:not(.reading-wide) .study-identity { flex-basis:100%; }
.reading:not(.reading-wide) .study-tools { width:100%; justify-content:end; }
.reading:not(.reading-wide) .study-back { margin-right:auto; }
@media (min-width:961px) {
  .word-reading .reading .study-header { position:sticky; top:var(--learn-topbar-height,64px); z-index:4; background:var(--surface); padding:12px 0; margin-top:-12px; }
}
@media (max-width:960px) { .word-reading .word-workspace { display:block; } }
@media (max-width:700px) {
  .word-reading .sidebar { position:static; height:0; padding:0; }
  .word-reading main { padding:8px 8px calc(88px + env(safe-area-inset-bottom)); }
  .study-room.reading { padding:16px 12px; gap:16px; }
  .reading .study-tools { gap:6px; }
  .reading .study-visual { gap:20px; }
  .reading .study-example { gap:12px; }
}
