@import url("./voxmundi-brand.css");

/* Shared, opaque reading surfaces for the web app and embedded study modules. */
body[data-theme="study"], body[data-theme="study-dark"], body[data-theme="synthwave"] {
 --bg:#f5f3ee; --panel:#ffffff; --canvas:#fafbf9; --text:#24312d; --muted:#52615b;
 --line:#c4cec8; --line-bright:#24675c; --blue:#24675c; --cyan:#24675c;
 --green:#24675c; --yellow:#785511; --pink:#675777; --red:#a33535;
 --inset:#eef2ed; --selected:#ddece4; --on-accent:#ffffff;
 --body-image:none; --body-overlay:none;
 background:var(--bg) !important; color:var(--text) !important;
 font-family:Segoe UI,Roboto,Arial,sans-serif;
}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) :is(.app,.module-frame) {filter:none;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) :is(.app-menu,.session-bar,.input-card,.canvas,.desktop-surface,.entry,.sent-card,.word-row,.word-card,.module-card,.module-topbar,.top-tab-content,.help-container,.analytics-card,dialog,.dialog-head,.lang-menu,.session-library-dialog,.word-hover-popup) {
 background:var(--panel) !important; color:var(--text) !important; border-color:var(--line) !important; box-shadow:none !important;
}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) :is(button,select,input,textarea,.btn,.lang-picker,.session-library-button) {
 background:var(--canvas) !important; color:var(--text) !important; border-color:var(--line) !important;
 text-transform:none !important; letter-spacing:normal !important; font-weight:600; box-shadow:none !important;
}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) :is(.primary,.tab.active,.lang-option.active,.btn.master.active) {
 background:var(--blue) !important; color:var(--on-accent) !important; border-color:var(--blue) !important;
}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) :is(button:hover,.word-chip.selected-word,.word-chip.pending) {
 background:var(--selected) !important; color:var(--text) !important; border-color:var(--line-bright) !important;
}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) :is(.red,.delete) {
 background:var(--panel) !important; color:var(--red) !important; border-color:var(--line) !important;
}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) :is(.trans,.status,.empty,.meta,.word-detail-meta,.analytics-label,.analytics-list,.word-hover-meta,.word-hover-context) {color:var(--muted) !important;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) :is(.src,.word-detail-head,.word-hover-word,.word-hover-translation,.analytics-value,label) {color:var(--text) !important;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) :is(.rt-word-detail,.word-detail-pill,.word-hover-pill,.analytics-bar) {background:var(--inset) !important;color:var(--text) !important;border-color:var(--line) !important;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) .analytics-bar>span {background:var(--blue) !important;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) :is(.word-chip,.src) {font-weight:600;line-height:1.65;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) .entry {border-left-color:var(--green) !important;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) .empty {border-color:var(--line);}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) .tab {font-weight:600;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) :focus-visible {outline:2px solid var(--line-bright) !important;outline-offset:3px;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) ::placeholder {color:var(--muted);opacity:1;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) button:disabled {opacity:.6;cursor:wait;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) dialog::backdrop {background:rgba(24,36,29,.35);}
#rtTranslateStatus {margin:0 0 8px;line-height:1.5;}
#rtMicStatus {margin:0 0 6px;line-height:1.4;}
.rt-speech-captions:not([hidden]) {display:grid;gap:6px;margin-top:6px;}
#realtime .canvas:has(.rt-speech-captions:not([hidden])) #rtFeed > .empty {display:none;}
.speech-caption, .speech-draft {
  --speech-ink:var(--vm-draft);
  background:var(--vm-card);
  border:1px solid var(--vm-border);
  border-inline-start:3px solid var(--speech-ink);
  border-radius:var(--vm-radius);
  color:var(--speech-ink);
  min-width:0;
  padding:8px 10px;
  overflow-wrap:anywhere;
}
.speech-caption[data-state="final"] {--speech-ink:var(--vm-speech);}
.speech-caption-label {font-size:.72rem;color:var(--vm-text-soft);}
.speech-caption-text {font-size:1rem;line-height:1.5;font-weight:650;white-space:pre-wrap;}
#rtFeed .entry[data-speech="final"] {border-inline-start:3px solid var(--vm-speech) !important;}
#rtFeed .entry[data-speech="final"] .src,
#rtFeed .entry[data-speech="final"] .src .word-chip:not(:hover):not(.selected-word) {color:#735200 !important;}
body:not([data-theme="study"]) #rtFeed .entry[data-speech="final"] .src,
body:not([data-theme="study"]) #rtFeed .entry[data-speech="final"] .src .word-chip:not(:hover):not(.selected-word) {color:var(--vm-speech) !important;}
#rtFeed .entry[data-speech="final"] .trans .word-chip {font:inherit;}
.mic-review {margin:0 0 12px;padding:8px;border:1px solid var(--line);border-radius:var(--vm-radius);}
.mic-review summary {cursor:pointer;font-weight:650;}
.mic-review label {margin-top:6px;}
.mic-review textarea {display:block;width:100%;margin:6px 0;}

/* Legacy modules contain their own inline palettes; normalize their reading surfaces. */
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) .module-frame :is(div,section,article,table,thead,tbody,tr,th,td,details,summary,p,span,label,h1,h2,h3,h4,li,a) {
 color:var(--text) !important; border-color:var(--line) !important;
}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) .module-frame :is(section,article,.table-wrap,.card,.review-card,.panel,.container,th) {
 background:var(--panel) !important; background-image:none !important; box-shadow:none !important;
}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) .module-frame :is(.summary,.translation,.progress,.hint) {color:var(--muted) !important;}

/* Readable vocabulary cards and dictionary details. */
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) .word-row { padding:18px 16px; border:1px solid var(--line); margin-bottom:10px; gap:12px; align-items:start; }
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) .word-main button {background:transparent !important; font-size:1.08rem; line-height:1.5;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) .word-main > span {color:var(--text) !important; font-size:1rem;line-height:1.6;margin-top:5px;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) .word-main small {display:block;line-height:1.6;margin-top:4px;font-size:.88rem;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) .check {color:var(--blue);padding-top:5px;}
.word-extra {margin-top:12px;min-width:0;}
.word-detail-result {font-size:1rem;line-height:1.65;overflow-wrap:anywhere;}
.word-detail-head {font-size:1.12rem;line-height:1.5;}
.dictionary-section {margin-top:16px;padding-top:12px;border-top:1px solid var(--line);}
.dictionary-section h4 {margin:0 0 7px;font-size:.9rem;font-weight:700;color:var(--text);}
.dictionary-section p {margin:4px 0;}
.dictionary-section ol {margin:6px 0;padding-left:22px;}
.dictionary-section li {margin:6px 0;}
.word-detail-pill {display:inline-block;padding:5px 10px;border-radius:8px;line-height:1.5;}
@media(max-width:600px) {.word-row {grid-template-columns:12px minmax(0,1fr) auto;}.word-extra {grid-column:1 / -1;}}

.word-extra .word-detail-head, .word-extra .word-detail-result > .word-detail-meta {display:none;}
.word-extra .dictionary-section:first-of-type {margin-top:0;}

.dictionary-section {padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--canvas);margin-top:8px;}
.word-form {padding:6px 10px;border:1px solid var(--line);border-radius:8px;margin:3px;cursor:pointer;}
.form-result {border-left:3px solid var(--blue);padding:12px;background:var(--selected);border-radius:6px;}
#micText {display:block;width:100%;min-height:150px;margin:8px 0;padding:12px;line-height:1.6;}
.transcript-controls {display:flex;gap:8px;}
.mic-auto {display:flex;gap:10px;align-items:center;margin:16px 0;line-height:1.5;}
#micDestination {width:100%;margin-top:8px;}

/* Content roles keep the same colors wherever they appear. */
body[data-theme="study"] {--meaning-bg:#edf5ef;--definition-bg:#faf4e8;--forms-bg:#f2eff7;--context-bg:#edf3f7;}
body[data-theme="study-dark"] {--meaning-bg:#293b31;--definition-bg:#39362c;--forms-bg:#34313e;--context-bg:#293740;}
.dictionary-section[data-kind="meaning"] {background:var(--meaning-bg,var(--canvas));}
.dictionary-section[data-kind="definition"] {background:var(--definition-bg,var(--canvas));}
.dictionary-section[data-kind="forms"] {background:var(--forms-bg,var(--canvas));}
.dictionary-section[data-kind="context"] {background:var(--context-bg,var(--canvas));}
.practice-guide {margin:0;padding:8px 16px 12px;color:var(--muted);font-size:.92rem;line-height:1.5;}
.reading-label {color:var(--muted);font-size:.75rem;font-weight:700;margin:12px 0 3px;letter-spacing:.03em;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) .app-menu {display:flex;flex-wrap:wrap;gap:8px;padding:12px;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) .menu-btn {min-height:40px;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) .tab.active {box-shadow:inset 0 -3px 0 var(--on-accent) !important;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) .entry .trans {background:var(--meaning-bg);color:var(--text) !important;padding:10px 12px;border-radius:8px;line-height:1.65;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) .word-form {background:var(--panel) !important;border-color:var(--line-bright) !important;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) .word-form:hover {background:var(--selected) !important;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) :is(.dialog-body,.session-bar) {line-height:1.55;}
:is(body[data-theme="study"],body[data-theme="study-dark"],body[data-theme="synthwave"]) textarea {font-weight:400;line-height:1.65;}

/* Phone-sized Canvas: reserve space for the active lesson and touch targets. */
@media(max-width:600px){body,.app{height:100dvh}.app{padding:6px;padding-bottom:max(6px,env(safe-area-inset-bottom))}.app-menu{padding:6px!important;gap:5px!important}.app-menu button{min-height:44px!important}.practice-guide{display:none}.control-strip{gap:4px!important}.tabs .tab{font-size:14px!important;padding:10px 5px!important;min-height:44px}.module-shell{gap:6px!important}.embedded-module iframe{min-height:250px}}

/* Responsive containment applies to every theme, including legacy palettes. */
.app, .module-shell, .panel, .word-main, .word-actions, .input-card {min-width:0;}
.app :is(button,.src,.trans,.word-main,.dialog-body) {overflow-wrap:anywhere;}
.app .empty, .app .meta {color:var(--muted);}
.app .word-main > span {color:var(--text);}
body[data-theme="study"] #rtInput, body[data-theme="study-dark"] #rtInput {
 background:var(--canvas);color:var(--text);border-color:var(--line);
}
body[data-theme="study"] .app-menu .menu-btn {
 background:var(--canvas);color:var(--text);
}
.app button {white-space:normal;}
.transcript-controls {flex-wrap:wrap;}
dialog {max-width:calc(100vw - 24px);box-sizing:border-box;}
@media(max-width:760px){
 .control-strip {grid-template-columns:repeat(4,minmax(0,1fr));}
 .control-strip .module-picker,.control-strip .session-bar.active > div {grid-column:1/-1;}
 .control-strip .module-picker select {width:100%;min-width:0;}
 .control-strip select {text-overflow:ellipsis;}
}
@media(max-width:600px){
 .embedded-module iframe {min-height:0;}
 .app-menu {flex-wrap:wrap;}
 .word-actions {display:flex;flex-wrap:wrap;gap:4px;}
}
/* Short windows need page scrolling as well as the lesson's own scrolling. */
@media(max-height:700px){
 body {overflow:auto;height:auto;min-height:100dvh;}
 .app {height:auto;min-height:100dvh;overflow:visible;}
 .module-shell {flex:none;grid-template-rows:auto auto minmax(320px,1fr);}
 .module-shell > .panel {min-height:320px;}
 .embedded-module {height:65dvh;min-height:320px;}
 .embedded-module iframe {min-height:0;}
}

/* A compact header leaves the reading area and composer room in WebViews. */
.compact-menu {position:relative;margin-left:auto;}
.compact-menu > summary {list-style:none;cursor:pointer;display:grid;place-items:center;min-width:44px;min-height:44px;}
.compact-menu > summary::-webkit-details-marker {display:none;}
.compact-menu-items {position:absolute;right:0;top:calc(100% + 8px);z-index:100;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:12px;width:min(280px,calc(100vw - 28px));border:1px solid var(--line);border-radius:12px;background:var(--panel);box-shadow:0 8px 24px #0003;}
.compact-menu:not([open]) .compact-menu-items {display:none;}
@media(max-width:760px), (max-height:700px){
 body {height:var(--visible-height,100dvh);min-height:0;overflow:hidden;}
 .app {height:var(--visible-height,100dvh);min-height:0;overflow:hidden;padding:4px;}
 .app-menu {display:flex;flex-wrap:nowrap!important;margin-bottom:4px;padding:4px!important;gap:4px!important;}
 .app-menu > .menu-btn {padding:6px 8px;min-width:0;}
 .module-shell {flex:1 1 auto;min-height:0;grid-template-rows:auto auto minmax(0,1fr);gap:4px!important;}
 .module-shell > .panel {min-height:0;}
 .practice-guide {display:none;}
 .tabs {margin-bottom:0;gap:4px;}
 .control-strip {grid-template-columns:minmax(0,1fr) repeat(4,44px);gap:4px!important;}
 .control-strip .module-picker {grid-column:1/-1;}
 .control-strip .session-bar.active > div {grid-column:1;}
 .control-strip .session-action {width:44px;height:44px;min-width:44px;min-height:44px;}
 #realtime .canvas,#words .canvas,#sentences .canvas {min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;margin-bottom:4px;}
 #realtime .input-card {padding:6px;display:grid;grid-template-columns:minmax(0,1fr);gap:4px;padding-bottom:max(6px,env(safe-area-inset-bottom));}
 #rtInput {min-height:52px;height:64px;max-height:20vh;max-height:20dvh;resize:none;overflow-y:auto;touch-action:pan-y;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;font-size:16px;padding:8px;}
 #realtime .rt-actions {display:grid;grid-template-columns:minmax(0,1fr) 44px;margin:0;gap:4px;}
 #realtime .rt-actions .btn {min-height:44px;}
 .embedded-module {height:100%;min-height:0;}
}
.app.compact-composer {height:var(--visible-height,100dvh);min-height:0;overflow:hidden;}
.app.compact-composer > .app-menu,
.app.compact-composer > .learning-start,
.app.compact-composer > .focus-restore,
.app.compact-composer .module-shell > .module-rail,
.app.compact-composer .module-shell > .control-strip {display:none!important;}
.app.compact-composer .module-shell {grid-template-rows:minmax(0,1fr);gap:0!important;}
.app.compact-composer .module-shell > #realtime {grid-row:1;}
.app.compact-composer #realtime .rt-actions {
 grid-template-columns:repeat(2,minmax(0,1fr)) 44px auto;
}
#rtDoneTyping[hidden] {display:none;}
.compact-menu > summary.menu-btn {background:var(--canvas);color:var(--text);border-color:var(--line);}

#quickHelpDialog {width:min(560px,calc(100vw - 24px));max-height:85vh;max-height:85dvh;padding:0;overflow:auto;border:1px solid var(--line);border-radius:14px;}
#quickHelpDialog .dialog-head {position:sticky;top:0;z-index:1;gap:12px;}
#quickHelpDialog .dialog-body {padding:16px;line-height:1.65;overflow-wrap:anywhere;}
.quick-help-steps {padding-left:24px;margin:0;}
.quick-help-steps li {padding-left:4px;margin:0 0 16px;}
@media(max-width:760px), (max-height:700px){
 .app-menu > #languageMenuButton {flex:1 1 auto;}
 .app-menu > #micMenuButton {flex:0 0 44px;min-width:44px;}
 .app-menu > #micMenuButton .mic-menu-label {display:none;}
 .compact-menu {margin-left:0;flex:0 0 44px;}
 .tabs .tab {min-width:0;overflow-wrap:normal;}
 .control-strip .session-library-button {min-width:0;width:100%;white-space:normal;overflow-wrap:anywhere;}
}

/* Both conversation directions stay available beside the draft. */
#realtime .rt-actions {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px;gap:4px;}
#realtime .rt-actions .btn {min-width:0;min-height:44px;padding:6px;}
#realtime .rt-actions :is(.icon-only,#rtDoneTyping) {min-width:44px;}


/* Paper, Dark and Synth share the same readable layout and content roles. */
body[data-theme="study"] {color-scheme:light;}
body[data-theme="study-dark"] {
 color-scheme:dark;
 --bg:var(--vm-bg);--panel:var(--vm-card);--canvas:var(--vm-inset);--text:var(--vm-text);--muted:var(--vm-muted);
 --line:var(--vm-border);--line-bright:var(--vm-focus);--blue:var(--vm-active);--cyan:var(--vm-focus);--green:var(--vm-active);
 --yellow:var(--vm-speech);--pink:#f472b6;--red:#fb7185;
 --inset:var(--vm-surface);--selected:var(--vm-raised);--on-accent:var(--vm-on-accent);
 --meaning-bg:#20372f;--definition-bg:#373226;--forms-bg:#302d40;--context-bg:#253443;
}
body[data-theme="study-dark"] :is(.app-menu,.session-bar,.input-card,.canvas,.entry,.sent-card,.word-row,dialog) {
 border-radius:var(--vm-radius);
}
body[data-theme="study-dark"] .tabs .tab.active:hover {
 background:var(--vm-active) !important;
 color:var(--vm-on-accent) !important;
}
body[data-theme="study-dark"] .tabs .tab:not(.active) {background:var(--vm-card) !important;}
body[data-theme="study-dark"] .tabs .tab:not(.active):hover {background:var(--vm-raised) !important;}
#micMenuButton {display:inline-flex;justify-content:center;align-items:center;gap:6px;}
#micMenuButton.is-recording {box-shadow:inset 0 0 0 2px var(--vm-on-accent);}
body[data-theme="study-dark"] #micMenuButton,
body[data-theme="study-dark"] #micStart {
 background:var(--vm-speech) !important;
 border-color:var(--vm-speech) !important;
 color:var(--vm-on-accent) !important;
}
body[data-theme="study-dark"] :is(#micMenuButton,#micStart):hover:not(:disabled) {
 background:var(--vm-speech-hover) !important;
}
body[data-theme="synthwave"] {
 color-scheme:dark;
 --bg:#171126;--panel:#241b37;--canvas:#1d162e;--text:#f6f0ff;--muted:#c7b8dc;
 --line:#695180;--line-bright:#e5a4ff;--blue:#e5a4ff;--cyan:#83dfec;--green:#83dfec;
 --yellow:#f3d18b;--pink:#f4a6cf;--red:#ffadb5;--inset:#302342;--selected:#47305c;--on-accent:#281237;
 --meaning-bg:#213b40;--definition-bg:#3d3040;--forms-bg:#38284e;--context-bg:#2a294b;
 background:radial-gradient(ellipse at top right,#39234e 0,transparent 65%),var(--bg)!important;
}
body[data-theme="synthwave"] .app-menu {border-top-color:var(--pink)!important;}

/* Backgrounds sit behind opaque reading surfaces; portrait artwork on phones. */
body.desktop-background {background-image:linear-gradient(#11182738,#11182738),var(--scene-wide)!important;background-size:cover!important;background-position:center!important;background-attachment:fixed!important;}
body.desktop-background .app {background:transparent;}
body.desktop-background .canvas {background:transparent!important;}
body.desktop-background .empty {background:var(--panel);}
@media(orientation:portrait){body.desktop-background{background-image:linear-gradient(#11182738,#11182738),var(--scene-tall)!important;background-attachment:scroll!important;}}
.vhs-option {display:flex;align-items:center;gap:10px;margin-top:18px;min-height:44px;}
body.vhs-enabled::after {content:'';position:fixed;inset:0;z-index:9999;pointer-events:none;background:repeating-linear-gradient(0deg,#00000013 0px,#00000013 1px,transparent 1px,transparent 4px),repeating-linear-gradient(93deg,#ffffff05 0px,transparent 2px,transparent 7px);box-shadow:inset 0 0 65px #00000038;animation:vhs-tracking 14s steps(1,end) infinite;}
body.vhs-enabled :is(.app-menu button,.app-menu summary,.tabs button,.control-strip select,.studio h2,.studio summary) {font-family:'Courier New',Courier,monospace!important;letter-spacing:.035em!important;text-shadow:-.5px 0 #ed68aa88,.5px 0 #58ddec88;}
@keyframes vhs-tracking {0%,94%,98%,100%{background-position:0 0;opacity:.7}95%,97%{background-position:0 2px;opacity:.9}96%{background-position:0 -1px;opacity:.75}}
@media(prefers-reduced-motion:reduce){body.vhs-enabled::after{animation:none;opacity:.6;}}
@media print{body.vhs-enabled::after{display:none;}}

/* The parent window supplies the tape overlay for embedded practice modes. */
body.embedded-studio.vhs-enabled::after { display: none; }

/* Keep the two selectors together; extra actions wrap below on narrow phones. */
.control-strip .module-picker {grid-column:1;grid-row:1;}
.control-strip .session-bar.active > div {grid-column:2;grid-row:1;min-width:0;}
.control-strip select {width:100%;min-width:0;}
@media(max-width:760px), (pointer:coarse) {
 #words .word-row {padding:12px;gap:8px;align-items:center;}
 #words .word-main [data-act="open"] {min-width:44px;min-height:44px;}
 #words .word-actions .btn.icon,
 .entry > .delete, .sent-card > .delete {
  width:44px;height:44px;min-height:44px;
 }
 #words .checks label {min-height:44px;align-items:center;}
 .entry > .actions {padding-inline-end:44px;}
 .entry .actions .btn, .sent-card .actions .btn {min-width:44px;min-height:44px;}
 .sent-card .sent-head {flex-direction:column;gap:6px;}
 .sent-card .sent-line {padding-inline-end:44px;}
 .sent-card .sent-head .actions {padding-inline-end:0;}
}
@media(max-width:760px), (max-height:700px) {
 .control-strip {
  grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr) repeat(4,44px);
 }
 .control-strip[data-active-tab="realtime"] {grid-template-columns:minmax(0,1fr) minmax(0,1fr) repeat(2,44px);}
 .control-strip[data-active-tab="sentences"] {grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr) repeat(3,44px);}
 .control-strip .module-picker {grid-column:1;grid-row:1;}
 .control-strip .session-bar.active > div {grid-column:2;grid-row:1;}
}
@media(max-width:480px) {
 .control-strip:not([data-active-tab="realtime"]) {grid-template-columns:repeat(4,minmax(0,1fr));}
 .control-strip:not([data-active-tab="realtime"]) .module-picker {grid-column:1/3;}
 .control-strip:not([data-active-tab="realtime"]) .session-bar.active > div {grid-column:3/5;}
 .control-strip select {padding-left:8px;padding-right:4px;font-size:14px;}
}
/* Use the selected scene inside the conversation, with solid reading cards. */
body.desktop-background #realtime .canvas {background:transparent!important;}
body.desktop-background #realtime .entry {background:var(--panel)!important;}
#settingsDialog .vhs-option {margin:0 0 8px;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--canvas);font-weight:600;}
#settingsDialog {max-height:calc(100dvh - 24px);overflow-y:auto;}
