/* Shared v3 presentation. All selectors are opt-in; legacy practice stays unchanged. */
.pte-modebar, .pte-card, .pte-attempts, .pte-dialog, .pte-popover { box-sizing: border-box; font-family: var(--font-body); color: var(--text-primary); }
.pte-modebar *, .pte-card *, .pte-attempts *, .pte-dialog *, .pte-popover * { box-sizing: border-box; }
.pte-modebar [hidden], .pte-card [hidden], .pte-attempts [hidden] { display: none !important; }
.pte-modebar { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 24px; background: var(--bg-surface); border-bottom: 1px solid var(--border-default); position: relative; margin-bottom: 28px; }
.pte-modebar__title { display: flex; align-items: baseline; gap: 8px; font-size: 18px; font-weight: 600; white-space: nowrap; }
.pte-modebar__title small { font-size: 12px; text-transform: uppercase; color: var(--skill-speaking); }
.pte-modebar .spc-picker-nav { min-width: 0; flex: 1; justify-content: center; margin-inline: auto; }
.pte-modebar .spc-picker-pill { max-width: 350px; min-width: 0; }
.pte-card { width: calc(100% - 48px); max-width: 940px; margin: 0 auto; border: 1px solid var(--border-default); border-radius: 20px; background: var(--bg-surface); box-shadow: var(--shadow-md); }
.pte-card--wide { max-width: 1200px; }
.pte-card__body { padding: 22px 34px 26px; min-width: 0; }
.pte-progress { display: flex; gap: 6px; padding: 14px 26px 0; }
.pte-progress > span { flex: 1; border-top: 4px solid var(--border-default); padding-top: 6px; border-radius: 2px; font-size: 12px; color: var(--text-secondary); }
.pte-progress > .is-now, .pte-progress > .is-done { border-color: var(--blue-600); color: var(--blue-600); }
.pte-dock { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 16px 26px; border-top: 1px solid var(--border-default); background: var(--bg-surface); border-radius: 0 0 20px 20px; position: sticky; bottom: 0; z-index: 4; }
.pte-dock__status { color: var(--text-muted); font-size: 13px; }
.pte-dock__actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; }
.pte-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 20px; border: 1px solid var(--gray-300); border-radius: 12px; background: var(--bg-surface); color: var(--text-primary); font: 600 15px var(--font-body); cursor: pointer; box-shadow: none; }
.pte-btn:focus-visible, .pte-menu-item:focus-visible, .pte-audio:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.pte-btn:disabled { opacity: .5; cursor: default; }
.pte-btn--primary { background: var(--blue-600); color: white; border-color: var(--blue-600); box-shadow: 0 1px 2px rgba(37,99,235,.25), 0 4px 12px -4px rgba(37,99,235,.45); }
.pte-btn--primary:hover { background: var(--blue-700); }
.pte-btn--ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.pte-btn--stop { background: var(--text-primary); color: white; }
.pte-btn--stop::before { content: ''; width: 10px; height: 10px; border-radius: 2px; background: var(--red-600); }
.pte-btn--helper { font-weight: 500; }
.pte-btn--icon { width: 40px; padding: 0; flex-shrink: 0; }
.pte-btn[aria-pressed="true"] { background: var(--blue-50); color: var(--blue-700); }
.pte-fb { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,1fr); gap: 30px; }
.pte-fb__right { border-left: 1px solid var(--border-default); padding-left: 28px; min-width: 0; }
.pte-fb__left { min-width: 0; }
.pte-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-default); }
.pte-tabs button { padding: 10px 14px; border: 0; background: transparent; font: 500 15px var(--font-body); color: var(--text-secondary); }
.pte-tabs button[aria-selected="true"] { color: var(--blue-600); border-bottom: 2px solid var(--blue-600); }
.pte-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid var(--border-default); border-radius: 16px; overflow: hidden; }
.pte-stats > div { padding: 12px; }
.pte-stats > div:first-child { background: var(--blue-50); }
.pte-stats small { display: block; font-size: 11.5px; text-transform: uppercase; color: var(--text-muted); }
.pte-stats strong { font-size: 24px; font-weight: 600; }
.pte-fixes > div { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; padding-block: 8px; }
.pte-listen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.pte-attempts { width: calc(100% - 48px); max-width: 940px; margin: 28px auto; }
.pte-attempts__header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.pte-attempts__header h2 { margin: 0; font-size: 18px; font-weight: 600; }
.pte-attempts__trend { font-size: 12px; color: var(--green-700); background: var(--green-50); padding: 5px 10px; border-radius: 999px; }
.pte-attempts__scope { margin-left: auto; display: flex; gap: 4px; }
.pte-attempts__scope .pte-btn { font-size: 13px; padding-inline: 12px; border-radius: 999px; font-weight: 400; }
.pte-attempts__list { border: 1px solid var(--border-default); border-radius: 16px; background: var(--bg-surface); overflow: hidden; }
.pte-attempts__row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border-default); }
.pte-attempts__row:last-child { border: 0; }
.pte-attempts__row.is-new { background: var(--blue-50); }
.pte-attempts__when { min-width: 160px; }
.pte-attempts__when small { display: block; color: var(--text-muted); font-size: 12px; margin-top: 3px; }
.pte-attempts__new, .pte-attempts__score { display: inline-block; border-radius: 999px; padding: 4px 8px; background: var(--gray-100); font-size: 12px; }
.pte-attempts__new { color: var(--blue-700); }
.pte-attempts__scores { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; }
.pte-attempts__duration { font-size: 12px; color: var(--text-muted); }
.pte-attempts__row .pte-btn { height: 34px; font-size: 12px; font-weight: 400; padding: 0 12px; border-radius: 999px; }
.pte-attempts__note { font-size: 12px; color: var(--text-muted); margin-top: 10px; }
.pte-attempts__empty { margin: 16px 18px; color: var(--text-muted); font-size: 14px; }
.pte-popover { position: absolute; top: calc(100% + 8px); right: 16px; z-index: 100; width: 340px; max-width: calc(100vw - 32px); padding: 16px; border: 1px solid var(--border-default); border-radius: 16px; background: var(--bg-surface); box-shadow: var(--shadow-lg); }
.pte-filter { border: 0; padding: 0; margin: 0 0 16px; display: flex; gap: 6px; flex-wrap: wrap; }
.pte-filter legend { font-size: 13px; margin-bottom: 8px; }
.pte-filter .pte-btn { padding-inline: 12px; font-size: 13px; }
.pte-menu-item { display: block; width: 100%; text-align: left; border: 0; background: none; border-radius: 8px; padding: 10px; font: 500 15px var(--font-body); cursor: pointer; color: var(--text-primary); }
.pte-menu-item:hover { background: var(--gray-100); }
.pte-menu-item small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.pte-dialog-overlay { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; background: rgba(15,23,42,.38); backdrop-filter: blur(2px); }
.pte-dialog { width: 400px; max-width: calc(100vw - 32px); padding: 22px 22px 18px; border-radius: 18px; background: var(--bg-surface); box-shadow: var(--shadow-lg); }
.pte-dialog h2 { font-size: 20px; margin: 0 0 12px; }
.pte-dialog p { font-size: 15px; line-height: 1.6; color: var(--text-secondary); }
.pte-dialog__actions { display: flex; justify-content: flex-end; gap: 8px; }
.pte-coach-drawer { width: 360px; max-width: 100%; padding: 20px; background: var(--bg-surface); border-left: 1px solid var(--border-default); }
.pte-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
body.pte-shell-v3.pte-focus .site-header { display: none; }

/* Read Aloud keeps its existing DOM/renderers; only the opted-in panel changes layout. */
#mode-read-aloud.ra-pte-v3 .ra-workbench { display: block; margin-bottom: 0; }
#mode-read-aloud.ra-pte-v3 .ra-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
#mode-read-aloud.ra-pte-v3[data-pte-coach="open"]:not([data-pte-phase="recording"]) .ra-split { grid-template-columns: minmax(0, 1fr) 360px; }
#mode-read-aloud.ra-pte-v3 .ra-split.pte-fb { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
#mode-read-aloud.ra-pte-v3 .ra-stage { min-width: 0; padding: 0; border: 0; background: transparent; gap: 0; }
#mode-read-aloud.ra-pte-v3 .pte-center { margin: 0 0 24px; }
body.pte-shell-v3 .pte-dock #ra-record-btn,
body.pte-shell-v3 .pte-dock #ra-stop-btn,
body.pte-shell-v3 .pte-dock #ra-retry-btn,
body.pte-shell-v3 .pte-dock #ra-play-recording-btn,
body.pte-shell-v3 .pte-dock #ra-check-btn { animation: none !important; transform: none !important; min-width: 0; }
body.pte-shell-v3 .pte-dock #ra-record-btn,
body.pte-shell-v3 .pte-dock #ra-check-btn { background: var(--blue-600); }
body.pte-shell-v3 .pte-dock #ra-stop-btn { background: var(--text-primary); }
body.pte-shell-v3 .pte-dock #ra-retry-btn { background: transparent; color: var(--text-primary); }
#mode-read-aloud.ra-pte-v3 .ra-guidebar,
#mode-read-aloud.ra-pte-v3 #ra-accuracy-readout,
#mode-read-aloud.ra-pte-v3 .ra-transcript-metrics,
#mode-read-aloud.ra-pte-v3 .ra-zone-actions-source,
#mode-read-aloud.ra-pte-v3 #ra-next-btn,
#mode-read-aloud.ra-pte-v3 #ra-history-action-host,
#mode-read-aloud.ra-pte-v3 #ra-history-content-host,
#mode-read-aloud.ra-pte-v3 .ra-pte-coach-hidden,
#mode-read-aloud.ra-pte-v3 #ra-speech-coach-toggle { display: none !important; }
#mode-read-aloud.ra-pte-v3 #ra-guide-instruction,
#mode-read-aloud.ra-pte-v3 #ra-status-message {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
#mode-read-aloud.ra-pte-v3 #ra-connected-speech-box { width: 100%; border: 0; box-shadow: none; border-radius: 0; background: transparent; padding: 0; }
#mode-read-aloud.ra-pte-v3 .ra-rail-header { flex-wrap: wrap; }
#mode-read-aloud.ra-pte-v3 #ra-prompt-guides-group { display: flex !important; width: 100%; flex-wrap: wrap; margin-top: 12px; }
#mode-read-aloud.ra-pte-v3 .ra-guide-chip-group { flex-wrap: wrap; }
#mode-read-aloud.ra-pte-v3 #ra-play-recording-btn { position: static !important; opacity: 1 !important; width: auto !important; height: 44px !important; overflow: visible !important; pointer-events: auto !important; }
#mode-read-aloud.ra-pte-v3 #ra-audio-player { display: none !important; }
#mode-read-aloud.ra-pte-v3[data-pte-phase="feedback"]:has(#ra-source-tab-sample.active) #ra-audio-player { display: block !important; }
#mode-read-aloud.ra-pte-v3:not([data-pte-phase="feedback"]) #ra-real-audio-player-wrapper { display: none !important; }
#mode-read-aloud.ra-pte-v3[data-pte-phase="feedback"] #ra-prompt-stage { display: none; }
#mode-read-aloud.ra-pte-v3 .ra-results-block { margin: 0; padding: 0; border: 0; }
#mode-read-aloud.ra-pte-v3 .pte-tabs { margin-bottom: 16px; background: var(--gray-100); border: 1px solid var(--border-default); border-radius: 999px; }
#mode-read-aloud.ra-pte-v3 .pte-tabs [aria-selected="true"] { background: white; border: 0; border-radius: 999px; }
#mode-read-aloud.ra-pte-v3 .pte-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#mode-read-aloud.ra-pte-v3 .pte-stats > div { min-width: 0; padding: 12px 8px; }
#mode-read-aloud.ra-pte-v3 .pte-stats small { font-size: 9.5px; letter-spacing: -0.01em; }
#mode-read-aloud.ra-pte-v3 .pte-stats strong { font-size: 22px; }
#mode-read-aloud.ra-pte-v3 .ra-pte-next-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 20px 0 8px; font-size: 14px; }
#mode-read-aloud.ra-pte-v3 #ra-show-advanced-container { margin: 0; }
#mode-read-aloud.ra-pte-v3 #ra-show-advanced-btn { padding: 0; border: 0; background: none; box-shadow: none; color: var(--blue-600); font-size: 12px; }
#mode-read-aloud.ra-pte-v3 .ra-pte-fix { border-bottom: 1px solid var(--border-default); font-size: 14px; }
#mode-read-aloud.ra-pte-v3 .ra-pte-fix p { margin: 4px 0; font-size: 12px; }
#mode-read-aloud.ra-pte-v3 .ra-pte-fix-actions { display: flex; flex-wrap: wrap; gap: 4px; }
#mode-read-aloud.ra-pte-v3 .ra-pte-fix .pte-btn { height: 30px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 400; }
#mode-read-aloud.ra-pte-v3 .ra-real-audio-player-wrapper { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
#mode-read-aloud.ra-pte-v3 .ra-source-tab { padding: 8px 10px; font-size: 12px; }
#mode-read-aloud.ra-pte-v3 .ra-source-tab .material-symbols-outlined { display: none; }
#mode-read-aloud.ra-pte-v3 #ra-player-section { min-width: 0; flex: 1; padding: 8px; gap: 8px; border: 0; box-shadow: none; border-radius: 999px; }
#mode-read-aloud.ra-pte-v3 .ra-volume-label,
#mode-read-aloud.ra-pte-v3 #ra-custom-volume { display: none; }
#mode-read-aloud.ra-pte-v3 .ra-audio-time { font-size: 12px; }
@media (max-width: 980px) {
  #mode-read-aloud.ra-pte-v3 .ra-split,
  #mode-read-aloud.ra-pte-v3[data-pte-coach="open"]:not([data-pte-phase="recording"]) .ra-split,
  #mode-read-aloud.ra-pte-v3 .ra-split.pte-fb { grid-template-columns: minmax(0, 1fr); }
  #mode-read-aloud.ra-pte-v3 .ra-pte-fix { grid-template-columns: 18px minmax(0, 1fr); }
  #mode-read-aloud.ra-pte-v3 .ra-pte-fix-actions { grid-column: 2; }
  #mode-read-aloud.ra-pte-v3 .pte-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) { .pte-fb { grid-template-columns: 1fr; } .pte-fb__right { border-left: 0; border-top: 1px solid var(--border-default); padding: 20px 0 0; } .pte-modebar { flex-wrap: wrap; } .pte-modebar .spc-picker-nav { order: 5; flex-basis: 100%; } }
@media (max-width: 600px) { .pte-modebar { padding: 10px; gap: 6px; } .pte-modebar__title { font-size: 16px; flex: 1; } .pte-modebar__title small { display: none; } .pte-modebar .pte-btn { padding-inline: 10px; } .pte-card, .pte-attempts { width: calc(100% - 20px); } .pte-card__body { padding: 18px 16px 22px; } .pte-progress { padding-inline: 16px; } .pte-dock { padding: 12px 16px; } .pte-dock__status { width: 100%; } .pte-dock .pte-btn { padding-inline: 12px; font-size: 14px; } .pte-attempts__scope { margin-left: 0; } .pte-attempts__when { min-width: 110px; } .pte-attempts__row .pte-btn { height: 44px; } .pte-stats > div { padding: 8px; } }

/* Repeat Sentence: restore all legacy presentation simply by removing the mode class. */
#mode-speak.speak-pte-v3 .speak-audio,
#mode-speak.speak-pte-v3 .practice-audio-meta,
#mode-speak.speak-pte-v3 #transcription-display,
#mode-speak.speak-pte-v3 #speak-practice-area > .input-label,
#mode-speak.speak-pte-v3 #score-speak,
#mode-speak.speak-pte-v3 #pron-rune-display { display: none !important; }
#mode-speak.speak-pte-v3 [hidden] { display: none !important; }
#mode-speak.speak-pte-v3 .pte-dock [data-pte-phases]:not([hidden]) { display: inline-flex !important; }
#mode-speak.speak-pte-v3 #speak-practice-area { min-width: 0; }
#mode-speak.speak-pte-v3 .pte-fb { margin-top: 22px; }
#mode-speak.speak-pte-v3 .speak-pte-caption { font-size: 12px; color: var(--text-muted); margin: 0 0 14px; }
#mode-speak.speak-pte-v3 #result { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
#mode-speak.speak-pte-v3 #result .correct-sentence,
#mode-speak.speak-pte-v3 #result > .ok,
#mode-speak.speak-pte-v3 #result > .errors { display: none; }
#mode-speak.speak-pte-v3 .speak-pte-legend { font-size: 12px; color: var(--text-muted); margin: 20px 0; }
#mode-speak.speak-pte-v3 #speak-pte-correction { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; }
#mode-speak.speak-pte-v3 #speak-pte-correction button { min-height: 36px; padding: 6px 10px; font-size: 12px; }
#mode-speak.speak-pte-v3 .pte-listen { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
#mode-speak.speak-pte-v3 .pte-listen audio { width: 260px; max-width: 100%; height: 40px; }
#mode-speak.speak-pte-v3 .pte-listen .pte-btn { font-size: 12px; padding: 0 10px; }
#mode-speak.speak-pte-v3 .pte-tabs { border-radius: 999px; background: var(--gray-100); margin-bottom: 16px; }
#mode-speak.speak-pte-v3 .pte-tabs button { font-size: 12px; }
#mode-speak.speak-pte-v3 .pte-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#mode-speak.speak-pte-v3 .pte-stats > div { min-width: 0; padding: 10px 6px; }
#mode-speak.speak-pte-v3 .pte-stats small { font-size: 9px; }
#mode-speak.speak-pte-v3 .pte-stats strong { font-size: 22px; }
#mode-speak.speak-pte-v3 .speak-pte-fix { border-bottom: 1px solid var(--border-default); padding: 8px 0; font-size: 14px; }
#mode-speak.speak-pte-v3 .speak-pte-fix p { margin: 0 0 6px; }
#mode-speak.speak-pte-v3 .speak-pte-fix button { height: 32px; font-size: 12px; margin-right: 6px; }
#mode-speak.speak-pte-v3 #pronunciation-practice,
#mode-speak.speak-pte-v3 #breakdown-mode,
#mode-speak.speak-pte-v3 .animation-panel { border: 0; box-shadow: none; padding: 0; margin: 12px 0; background: none; }
#mode-speak.speak-pte-v3:not([data-pte-phase="feedback"]) #speak-pte-feedback { display: none; }
@media (max-width: 600px) {
  #mode-speak.speak-pte-v3 .pte-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #mode-speak.speak-pte-v3 .pte-tabs { flex-wrap: wrap; }
}
.page-layout-wrapper > .container:has(#mode-speak.speak-pte-v3) { max-width: 1280px; padding-inline: 16px; }
#mode-speak.speak-pte-v3 .speak-word-token { padding: 1px 4px; margin: 0 2px 0 0; border: 0; border-radius: 4px; font-weight: 400; }
#mode-speak.speak-pte-v3 #speak-pte-correction button { background: var(--bg-surface); color: var(--text-secondary); border: 1px solid var(--border-default); border-radius: 999px; box-shadow: none; font-weight: 400; }
#mode-speak.speak-pte-v3 .pte-tabs [aria-selected="true"] { background: var(--bg-surface); border-radius: 999px; border-bottom: 0; }
#mode-speak.speak-pte-v3 .pte-fb__right h3 { font-size: 15px; margin: 20px 0 10px; }
#mode-speak.speak-pte-v3 #result .crm-transcript-hint { display: none; }
#mode-speak.speak-pte-v3 #same-vocab-speak { display: none !important; }
#mode-speak.speak-pte-v3 .pte-attempts { max-width: 1200px; }
body:has(#mode-speak.speak-pte-v3) .spc-sheet[aria-hidden="true"] { visibility: hidden; pointer-events: none; }
@media (max-width: 600px) {
  #mode-speak.speak-pte-v3 .pte-dock { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  /* Keep the open menu above the fixed site header (1100), below dialogs. */
  #mode-speak.speak-pte-v3 .pte-modebar:has(.pte-popover) { z-index: 1200; }
  #mode-speak.speak-pte-v3 .pte-popover {
    position: fixed; inset: 16px 16px auto; width: auto; max-width: none;
    max-height: calc(100dvh - 32px); overflow-y: auto;
  }
}

/* Describe Image v3 */
#mode-describe-image.di-pte-v3 .question-selector,
#mode-describe-image.di-pte-v3 #difficulty-filter-container-di,
#mode-describe-image.di-pte-v3 #di-image-preview,
#mode-describe-image.di-pte-v3 #di-start-controls,
#mode-describe-image.di-pte-v3 #di-step-progress,
#mode-describe-image.di-pte-v3 .notes-step-header,
#mode-describe-image.di-pte-v3 .di-progress-bar,
#mode-describe-image.di-pte-v3 #di-record-status,
#mode-describe-image.di-pte-v3 .notes-results-controls,
#mode-describe-image.di-pte-v3 #di-step-prepare > .di-progress-bar,
#mode-describe-image.di-pte-v3 #di-step-record,
#mode-describe-image.di-pte-v3 #di-step-review,
#mode-describe-image.di-pte-v3 #di-step-results {
  display: none !important;
}

#mode-describe-image.di-pte-v3 #di-practice-area {
  display: block !important;
  min-width: 0;
}

#mode-describe-image.di-pte-v3 .di-pte-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin: 20px 0;
  min-width: 0;
}

#mode-describe-image.di-pte-v3 .di-pte-stage-media {
  flex: 1;
  max-width: 460px;
  min-width: 0;
}

#mode-describe-image.di-pte-v3 .di-image-container {
  position: relative;
  max-width: 460px;
  width: 100%;
  background: #ffffff;
  border: 1px solid #d6d6d6;
  border-radius: 12px;
  padding: 12px;
  box-sizing: border-box;
  margin: 0 auto;
}

#mode-describe-image.di-pte-v3 .di-image-container img {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  border-radius: 8px;
}

#mode-describe-image.di-pte-v3 .di-zoom-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  font-size: 15px;
  padding: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

#mode-describe-image.di-pte-v3 .di-zoom-btn:hover {
  background: #ffffff;
  transform: scale(1.05);
}

#mode-describe-image.di-pte-v3 .di-zoom-btn:focus-visible {
  outline: var(--focus-ring, 2px solid #2563eb);
  outline-offset: 2px;
}

#mode-describe-image.di-pte-v3 .di-pte-stage-rec {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 280px;
}

#mode-describe-image.di-pte-v3 .di-fb-image-container {
  max-width: 240px;
  margin: 0 0 16px;
}

#mode-describe-image.di-pte-v3 .di-transcript {
  font: 400 15px/1.6 var(--font-body, Arial, sans-serif);
  color: var(--text-secondary, #475569);
  margin: 8px 0 16px;
  background: var(--bg-canvas, #f8fafc);
  padding: 12px;
  border-radius: 8px;
}

#mode-describe-image.di-pte-v3 .di-keypoints-list {
  padding-left: 20px;
  margin: 12px 0 20px;
  color: var(--text-primary, #1e293b);
  font-size: 14px;
  line-height: 1.6;
}

#mode-describe-image.di-pte-v3 .di-keypoints-list li {
  margin-bottom: 6px;
}

#mode-describe-image.di-pte-v3 .di-ai-action {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#mode-describe-image.di-pte-v3 .di-ai-action small {
  color: var(--text-muted, #64748b);
  font-size: 12px;
}

#mode-describe-image.di-pte-v3 #di-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

#mode-describe-image.di-pte-v3 #di-zoom-image {
  position: relative;
  z-index: 1;
  max-width: calc(100vw - 12vw);
  max-height: calc(100vh - 12vh);
  border-radius: 14px;
  object-fit: contain;
  background: white;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
  #mode-describe-image.di-pte-v3 .di-pte-stage {
    flex-direction: column;
    gap: 20px;
  }
  #mode-describe-image.di-pte-v3 .di-image-container {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  #mode-describe-image.di-pte-v3 .pte-dock { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  #mode-describe-image.di-pte-v3 .pte-modebar:has(.pte-popover) { z-index: 1200; }
  #mode-describe-image.di-pte-v3 .pte-popover {
    position: fixed; inset: 16px 16px auto; width: auto; max-width: none;
    max-height: calc(100dvh - 32px); overflow-y: auto;
  }
}

/* ==========================================================================
   Phase 5 — Answer Short Question v3
   ========================================================================== */

#mode-asq.asq-pte-v3 .asq-audio,
#mode-asq.asq-pte-v3 #asq-status-message,
#mode-asq.asq-pte-v3 #asq-action-host,
#mode-asq.asq-pte-v3 #asq-result-box,
#mode-asq.asq-pte-v3 #asq-user-audio-box,
#mode-asq.asq-pte-v3 #asq-question-text {
  display: none !important;
}

#mode-asq.asq-pte-v3 #asq-practice-area {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#mode-asq.asq-pte-v3 .asq-pte-instruction {
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-main, #0f172a);
  margin-bottom: 8px;
}

#mode-asq.asq-pte-v3 .asq-pte-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

#mode-asq.asq-pte-v3 .asq-pte-feedback {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

#mode-asq.asq-pte-v3 .asq-fb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

#mode-asq.asq-pte-v3 .asq-fb-left,
#mode-asq.asq-pte-v3 .asq-fb-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#mode-asq.asq-pte-v3 .asq-fb-heading {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #64748b);
  margin: 0;
}

#mode-asq.asq-pte-v3 .asq-fb-question-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  line-height: 1.4;
  margin: 0;
}

#mode-asq.asq-pte-v3 .asq-fb-verdict {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
}

#mode-asq.asq-pte-v3 .asq-fb-verdict.correct {
  background: var(--green-50, #f0fdf4);
  color: var(--green-700, #15803d);
  border: 1px solid var(--green-200, #bbf7d0);
}

#mode-asq.asq-pte-v3 .asq-fb-verdict.incorrect {
  background: var(--red-50, #fef2f2);
  color: var(--red-700, #b91c1c);
  border: 1px solid var(--red-200, #fecaca);
}

#mode-asq.asq-pte-v3 .asq-fb-verdict span.asq-xp {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(21, 128, 61, 0.1);
  border-radius: 999px;
}

#mode-asq.asq-pte-v3 .asq-fb-you-said {
  font-size: 1rem;
  color: var(--text-main, #0f172a);
  line-height: 1.5;
  margin: 0;
}

#mode-asq.asq-pte-v3 .asq-fb-accepted {
  font-size: 0.95rem;
  color: var(--text-muted, #64748b);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 600px) {
  #mode-asq.asq-pte-v3 .asq-fb-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  #mode-asq.asq-pte-v3 .pte-dock {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}

/* Respond to a Situation v3 */
#mode-rts.rts-pte-v3 > .question-selector,
#mode-rts.rts-pte-v3 #rts-start-controls,
#mode-rts.rts-pte-v3 #rts-step-progress,
#mode-rts.rts-pte-v3 #rts-step-audio,
#mode-rts.rts-pte-v3 #rts-step-prep,
#mode-rts.rts-pte-v3 #rts-step-record,
#mode-rts.rts-pte-v3 #rts-step-results {
  display: none !important;
}

#mode-rts.rts-pte-v3 #rts-practice-area {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#mode-rts.rts-pte-v3 .rts-pte-instruction {
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-main, #0f172a);
  margin-bottom: 8px;
}

#mode-rts.rts-pte-v3 .rts-pte-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

#mode-rts.rts-pte-v3 .rts-pte-prompt-text {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-main, #0f172a);
  background: transparent;
  padding: 0;
  border: none;
  font-weight: 500;
}

#mode-rts.rts-pte-v3 .rts-pte-feedback {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

#mode-rts.rts-pte-v3 .rts-fb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

#mode-rts.rts-pte-v3 .rts-fb-left,
#mode-rts.rts-pte-v3 .rts-fb-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#mode-rts.rts-pte-v3 .rts-fb-heading {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #64748b);
  margin: 0;
}

#mode-rts.rts-pte-v3 .rts-v3-fb-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
  padding-bottom: 8px;
}

#mode-rts.rts-pte-v3 .rts-v3-fb-tab {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  transition: all 0.2s ease;
}

#mode-rts.rts-pte-v3 .rts-v3-fb-tab.active {
  background: var(--bg-primary, #ffffff);
  color: var(--primary, #2563eb);
  border-color: var(--border-light, #e2e8f0);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

#mode-rts.rts-pte-v3 .rts-v3-fb-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#mode-rts.rts-pte-v3 .rts-ai-empty {
  padding: 24px 16px;
  text-align: center;
  background: var(--bg-secondary, #f8fafc);
  border-radius: 12px;
  border: 1px dashed var(--border-light, #e2e8f0);
}

#mode-rts.rts-pte-v3 .rts-ai-empty-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main, #0f172a);
  margin-bottom: 6px;
}

#mode-rts.rts-pte-v3 .rts-ai-empty-desc {
  font-size: 0.9rem;
  color: var(--text-muted, #64748b);
  line-height: 1.5;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  #mode-rts.rts-pte-v3 .rts-fb-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  #mode-rts.rts-pte-v3 .pte-dock {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================================================
   Summarize Group Discussion (SGD) v3
   ========================================================================== */

#mode-sgd.sgd-pte-v3 > .question-selector,
#mode-sgd.sgd-pte-v3 #play-sgd-btn,
#mode-sgd.sgd-pte-v3 #sgd-step-progress,
#mode-sgd.sgd-pte-v3 .notes-step-header,
#mode-sgd.sgd-pte-v3 #sgd-step-record,
#mode-sgd.sgd-pte-v3 #sgd-step-results,
#mode-sgd.sgd-pte-v3 .notes-submit-controls,
#mode-sgd.sgd-pte-v3 #sgd-next-step-btn,
#mode-sgd.sgd-pte-v3 #sgd-back-to-notes-btn {
  display: none !important;
}

#mode-sgd.sgd-pte-v3 #sgd-step-listen {
  display: block !important;
}

#mode-sgd.sgd-pte-v3 .sgd-pte-stage {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.sgd-pte-instruction {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-main, #0f172a);
  margin: 0 0 4px 0;
}

.sgd-audio-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.sgd-group-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary, #f1f5f9);
  border-radius: 12px;
  color: var(--text-muted, #64748b);
}

.sgd-audio-row .sgd-pte-audio-host {
  flex: 1;
  min-width: 0;
}

#mode-sgd.sgd-pte-v3 .sgd-notes-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

#mode-sgd.sgd-pte-v3 .sgd-notes-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main, #0f172a);
}

#mode-sgd.sgd-pte-v3 .sgd-notes-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
}

#mode-sgd.sgd-pte-v3 .sgd-speaker-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

#mode-sgd.sgd-pte-v3 .sgd-speaker-tab {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-light, #e2e8f0);
  background: var(--bg-secondary, #f8fafc);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  transition: all 0.15s ease;
}

#mode-sgd.sgd-pte-v3 .sgd-speaker-tab.active {
  background: var(--bg-primary, #ffffff);
  color: var(--primary, #2563eb);
  border-color: var(--primary, #2563eb);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
}

#mode-sgd.sgd-pte-v3 .sgd-note-textarea {
  width: 100%;
  min-height: 90px;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-light, #e2e8f0);
  background: var(--bg-primary, #ffffff);
  color: var(--text-main, #0f172a);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
}

#mode-sgd.sgd-pte-v3 .sgd-note-textarea:focus {
  outline: none;
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

#mode-sgd.sgd-pte-v3 .sgd-pte-feedback {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

#mode-sgd.sgd-pte-v3 .sgd-fb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

#mode-sgd.sgd-pte-v3 .sgd-fb-left,
#mode-sgd.sgd-pte-v3 .sgd-fb-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#mode-sgd.sgd-pte-v3 .sgd-fb-heading {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #64748b);
  margin: 0;
}

#mode-sgd.sgd-pte-v3 .sgd-v3-fb-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
  padding-bottom: 8px;
}

#mode-sgd.sgd-pte-v3 .sgd-v3-fb-tab {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  transition: all 0.2s ease;
}

#mode-sgd.sgd-pte-v3 .sgd-v3-fb-tab.active {
  background: var(--bg-primary, #ffffff);
  color: var(--primary, #2563eb);
  border-color: var(--border-light, #e2e8f0);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

#mode-sgd.sgd-pte-v3 .sgd-v3-fb-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sgd-matched-word {
  background-color: var(--green-100, #dcfce7);
  color: var(--green-700, #15803d);
  border-radius: 3px;
  padding: 0 3px;
  font-weight: 600;
}

@media (max-width: 600px) {
  #mode-sgd.sgd-pte-v3 .sgd-fb-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  #mode-sgd.sgd-pte-v3 .pte-dock {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}

/* ─────────────────────────────────────────────────────────────
   Retell Lecture (notes) v3
   ───────────────────────────────────────────────────────────── */
#mode-notes.notes-pte-v3 > .question-selector,
#mode-notes.notes-pte-v3 #notes-legacy-start-controls,
#mode-notes.notes-pte-v3 #play-notes-btn,
#mode-notes.notes-pte-v3 #notes-step-ready,
#mode-notes.notes-pte-v3 #notes-step-video,
#mode-notes.notes-pte-v3 #notes-step-results,
#mode-notes.notes-pte-v3 .notes-submit-controls,
#mode-notes.notes-pte-v3 #notes-step-audio > .notes-step-header,
#mode-notes.notes-pte-v3 #notes-audio-status,
#mode-notes.notes-pte-v3 #notes-retry-audio-btn {
  display: none !important;
}

#mode-notes.notes-pte-v3 #notes-practice-area {
  display: block !important;
}

#mode-notes.notes-pte-v3 .notes-pte-instruction {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary, #1e293b);
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary, #f8fafc);
  border-left: 4px solid var(--primary, #2563eb);
  border-radius: 4px;
}

#mode-notes.notes-pte-v3 .notes-pte-stage {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

#mode-notes.notes-pte-v3 .notes-audio-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

#mode-notes.notes-pte-v3 .notes-lecture-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--blue-50, #eff6ff);
  color: var(--primary, #2563eb);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

#mode-notes.notes-pte-v3 .notes-audio-row .notes-pte-audio-host {
  flex: 1;
  min-width: 0;
}

#mode-notes.notes-pte-v3 .notes-pte-rec-host {
  width: 100%;
}

#mode-notes.notes-pte-v3 .notes-v3-audio-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 10px;
  padding: 12px;
}

#mode-notes.notes-pte-v3 .notes-v3-audio-preview audio {
  width: 100%;
}

#mode-notes.notes-pte-v3 .notes-v3-spoken-transcript {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 10px;
  padding: 12px 14px;
}

#mode-notes.notes-pte-v3 .notes-v3-spoken-text {
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 6px 0 0;
  color: var(--text-primary, #0f172a);
}

#mode-notes.notes-pte-v3 .notes-v3-notes-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#mode-notes.notes-pte-v3 .notes-v3-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

#mode-notes.notes-pte-v3 .notes-v3-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
}

#mode-notes.notes-pte-v3 .notes-v3-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted, #64748b);
}

#mode-notes.notes-pte-v3 .notes-v3-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 140px;
  border-radius: 10px;
  border: 1px solid var(--border-light, #cbd5e1);
  padding: 12px 14px;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  background: var(--bg-surface, #ffffff);
  color: var(--text-primary, #0f172a);
  transition: border-color 0.2s, box-shadow 0.2s;
}

#mode-notes.notes-pte-v3 .notes-v3-textarea:focus {
  outline: none;
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

#mode-notes.notes-pte-v3 .notes-pte-feedback {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
  width: 100%;
}

#mode-notes.notes-pte-v3 .notes-fb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

#mode-notes.notes-pte-v3 .notes-fb-left,
#mode-notes.notes-pte-v3 .notes-fb-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#mode-notes.notes-pte-v3 .notes-fb-heading {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #64748b);
  margin: 0;
}

#mode-notes.notes-pte-v3 .notes-v3-matched-notes {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 10px;
  padding: 14px;
  font-size: 0.95rem;
  line-height: 1.6;
  min-height: 120px;
  max-height: 480px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

#mode-notes.notes-pte-v3 .notes-v3-fb-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
  padding-bottom: 8px;
}

#mode-notes.notes-pte-v3 .notes-v3-fb-tab {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  transition: all 0.2s ease;
}

#mode-notes.notes-pte-v3 .notes-v3-fb-tab.active {
  background: var(--bg-primary, #ffffff);
  color: var(--primary, #2563eb);
  border-color: var(--border-light, #e2e8f0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#mode-notes.notes-pte-v3 .notes-v3-fb-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#mode-notes.notes-pte-v3 .notes-v3-match-panel .notes-results-stats {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary, #2563eb);
  padding: 12px 16px;
  background: var(--blue-50, #eff6ff);
  border-radius: 8px;
}

#mode-notes.notes-pte-v3 .notes-transcript-display {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 10px;
  padding: 14px;
  font-size: 0.95rem;
  line-height: 1.6;
  max-height: 480px;
  overflow-y: auto;
}

.notes-matched {
  background-color: var(--green-100, #dcfce7);
  color: var(--green-700, #15803d);
  border-radius: 3px;
  padding: 0 3px;
  font-weight: 600;
}

/* Video modal */
.notes-video-dialog {
  width: 640px;
  max-width: calc(100vw - 32px);
  padding: 20px;
  border-radius: 16px;
  background: var(--bg-surface, #ffffff);
  box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.2));
}

.notes-video-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.notes-video-dialog-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-primary, #0f172a);
}

.notes-video-dialog-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-muted, #64748b);
  border-radius: 6px;
  padding: 4px 8px;
}

.notes-video-dialog-close:hover {
  background: var(--bg-secondary, #f1f5f9);
  color: var(--text-primary, #0f172a);
}

.notes-video-dialog-body {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}

.notes-video-dialog-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 600px) {
  #mode-notes.notes-pte-v3 .notes-fb-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
