/* Expert editor embedded into a copy of the homepage. */
.voice-bridge-mode .studio { visibility: hidden !important; }
html.expert-frame-mode, .expert-frame-mode body { height: auto; overflow: visible; background: transparent !important; }
.expert-frame-mode .studio { display: block; height: auto; min-height: 0; background: transparent !important; }
.expert-frame-mode .topbar, .expert-frame-mode .library, .expert-frame-mode .workspace-divider,
.expert-frame-mode .player, .expert-frame-mode .composer-head, .expert-frame-mode #normalPane { display: none !important; }
.expert-frame-mode .workspace { display: block !important; height: auto; padding: 0 !important; margin: 0 !important; border: 0 !important; background: transparent !important; overflow: visible !important; }
.expert-frame-mode .workspace::before { display: none !important; }
.expert-frame-mode .composer { display: block !important; width: 100% !important; height: auto !important; min-height: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; overflow: visible !important; }
.expert-frame-mode .composer-scroll { min-height: 0; overflow: visible !important; padding: 4px 8px 16px !important; }
.expert-frame-mode #expertPane { display: block !important; max-width: 900px; margin: 0 auto; }
.expert-frame-mode #expertPane > .section-title,
.expert-frame-mode #expertPane .style-editor > summary > b,
.expert-frame-mode #expertPane #studioOptions > summary { font-size: .85rem; }
.expert-frame-mode .composer-footer { flex: none; margin: 0 !important; padding: 12px 8px 4px !important; background: transparent !important; box-shadow: none !important; }
.expert-frame-mode .create-btn { max-width: 900px; display: block; margin: auto; }
.expert-frame-mode .add-own-voice { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; max-width: 900px; min-height: 46px; margin: 0 auto 10px; border: 1px solid #dfe0e8; border-radius: 12px; background: #f5f5f8; color: #282934; font-size: 13px; font-weight: 700; cursor: pointer; }
.expert-frame-mode .add-own-voice:hover, .expert-frame-mode .add-own-voice:focus-visible { border-color: #a99cff; background: #f0edff; }
.expert-frame-mode .add-own-voice img { width: 30px; height: 30px; object-fit: contain; }
.expert-frame-mode .create-btn .create-note { width: 22px; height: 22px; object-fit: contain; }
.expert-frame-mode .composer[data-mode="normal"] .add-own-voice { display: none; }
/* The iframe expands to the viewport for dialogs; keep its editor in the original slot. */
html.expert-frame-mode:has(dialog[open]) .studio {
  position: absolute !important;
  left: var(--aura-origin-left, 0px) !important;
  top: var(--aura-origin-top, 0px) !important;
  width: var(--aura-origin-width, 100%) !important;
}
.expert-frame-mode .quick-actions { display: none !important; }
.expert-frame-mode .studio-options .accordion-content { padding: 0 12px 10px; }
.expert-frame-mode .studio-options .studio-setting { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(0, 2fr) minmax(76px, .75fr); gap: 8px; min-height: 42px; border-top: 1px solid #ececf1; }
.expert-frame-mode .studio-quick-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.expert-frame-mode .studio-quick-choices button { min-width: 0; padding: 6px 4px; border: 1px solid #e4e4ed; border-radius: 9px; background: #f8f8fb; color: #4d5060; font-size: 10px; font-weight: 600; cursor: pointer; }
.expert-frame-mode .studio-quick-choices button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; }
.expert-frame-mode .studio-quick-icon, .expert-frame-mode .studio-more-icon { display: block; width: 15px; height: 15px; flex: none; object-fit: contain; }
.expert-frame-mode .studio-quick-choices button:hover, .expert-frame-mode .studio-quick-choices button[aria-pressed="true"] { border-color: #9484f7; background: #f1eeff; color: #6550dc; }
.expert-frame-mode .studio-quick-choices button[aria-pressed="true"],
.expert-frame-mode .studio-options .studio-select[data-selected="true"],
.expert-frame-mode .vocal-popover .vocal-choice[aria-pressed="true"],
.expert-frame-mode .vocal-popover .vocal-effects label:has(input:checked),
.expert-frame-mode .vocal-popover .mood-effects label:has(input:checked),
.expert-frame-mode .vocal-popover .tempo-effects label:has(input:checked) {
  border-color: transparent;
  background: linear-gradient(110deg,#833adf,#e63eb5);
  color: #fff;
  box-shadow: 0 3px 10px #b13bbc24;
}
.expert-frame-mode .studio-quick-choices button[aria-pressed="true"] img,
.expert-frame-mode .studio-options .studio-select[data-selected="true"] img,
.expert-frame-mode .vocal-popover .vocal-choice[aria-pressed="true"] img,
.expert-frame-mode .vocal-popover label:has(input:checked) img { filter: brightness(0) invert(1); }
.expert-frame-mode .vocal-popover .vocal-effects label:has(input:checked),
.expert-frame-mode .vocal-popover .mood-effects label:has(input:checked),
.expert-frame-mode .vocal-popover .tempo-effects label:has(input:checked) { border-radius: 9px; padding-inline: 6px; }
.expert-frame-mode .vocal-popover label input:checked + i { border-color: #fff; background: #fff; box-shadow: inset 0 0 0 4px #a946d4; }
.expert-frame-mode .style-mood-chip[data-style] img { display: block; width: 15px; height: 15px; flex: none; object-fit: contain; }
.expert-frame-mode .studio-options .studio-select { width: 100%; min-width: 0; min-height: 30px; gap: 4px; padding: 6px 8px; font-size: 10px; justify-content: center; overflow: hidden; white-space: nowrap; }
.expert-frame-mode .studio-more-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.expert-frame-mode .choice-dialog-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.expert-frame-mode .choice-close { display: grid; place-items: center; width: 27px; height: 27px; padding: 0; border: 1px solid #e6e5ed; border-radius: 50%; background: #f6f6fa; color: #343444; cursor: pointer; }
.expert-frame-mode .choice-close:hover { background: #ece9ff; border-color: #bdb2ff; }
.expert-frame-mode .choice-close span { display: block; font: 400 22px/1 Arial, sans-serif; transform: translateY(-1px); }
.expert-frame-mode .studio-extra-settings { border-top: 1px solid #ececf1; }
.expert-frame-mode .studio-extra-settings > summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 3px; color: #646576; font-size: 11px; cursor: pointer; }
.expert-frame-mode .studio-extra-settings > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.expert-frame-mode .studio-extra-settings[open] > summary::after { transform: rotate(225deg); }
.expert-frame-mode #openCover { display: none !important; }
.expert-frame-mode .quick-actions .quick-action { min-height: 124px; }
.expert-frame-mode #openVoices .quick-action-copy { display: flex; flex-direction: column; align-items: center; gap: 3px; line-height: 1.15; }
.expert-frame-mode #openVoices .quick-action-copy strong { font-size: inherit; font-weight: 700; }
.expert-frame-mode #openVoices .quick-action-copy small { font-size: 10px; font-weight: 500; line-height: 1.25; opacity: .75; }
.expert-frame-mode .quick-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-height: 106px; padding: 12px 8px; background: #f5f5f7 !important; border: 1px solid #dfe0e4 !important; border-radius: 16px; color: #202127 !important; font-size: 13px; font-weight: 700; transition: background .15s, border-color .15s, transform .15s; }
.expert-frame-mode .quick-action:hover, .expert-frame-mode .quick-action:focus-visible { background: #f0eff8 !important; border-color: #a99cff !important; transform: translateY(-2px); }
.expert-frame-mode .quick-action[aria-expanded="true"] { background: #eeebff !important; border-color: #8d7bfa !important; }
.expert-frame-mode .quick-action-icon { display: none; }
.expert-frame-mode .quick-action::before { content: ""; display: block; width: 34px; height: 34px; flex: none; background: linear-gradient(135deg,#3e83f3 0%,#a65ade 52%,#ff7a63 100%); -webkit-mask: var(--quick-icon) center / contain no-repeat; mask: var(--quick-icon) center / contain no-repeat; }
.expert-frame-mode .quick-action:nth-child(1) { --quick-icon: url('img/lucide/audio-lines.svg'); }
.expert-frame-mode .quick-action:nth-child(2) { --quick-icon: url('img/lucide/mic-vocal.svg'); }
.expert-frame-mode .quick-action:nth-child(3) { --quick-icon: url('img/lucide/repeat.svg'); }
.expert-frame-mode .voice-create #voicePrepare { width: 100%; margin-top: 14px; }
@media(max-width:650px) {
  .expert-frame-mode:has(#voiceLibrary[open], #voiceCreate[open], #voiceSongDialog[open]) .studio { visibility: hidden; }
  .expert-frame-mode .voice-library,
  .expert-frame-mode .voice-create,
  .expert-frame-mode .voice-song {
    width: min(470px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    min-height: 0;
  }
  .expert-frame-mode .voice-library .voice-list { min-height: 120px; }
  .expert-frame-mode .voice-create .voice-source-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expert-frame-mode .voice-create #voicePickSource { grid-column: 1 / -1; }
  .expert-frame-mode .voice-create .audio-dialog-head { position: sticky; top: -16px; z-index: 2; padding: 8px 0; background: var(--panel); }
  .expert-frame-mode body { overflow: visible; }
  .expert-frame-mode .workspace { overflow: visible !important; }
  .expert-frame-mode .composer { min-height: 0 !important; }
  .expert-frame-mode .composer-scroll { padding: 4px 2px 12px !important; overflow: visible !important; }
  .expert-frame-mode .quick-actions { gap: 6px; }
  .expert-frame-mode .quick-action { min-height: 84px; padding: 8px 3px; border-radius: 13px; font-size: 11px; gap: 6px; }
  .expert-frame-mode .quick-actions .quick-action { min-height: 100px; }
  .expert-frame-mode #openVoices .quick-action-copy small { font-size: 9px; }
  .expert-frame-mode .idea-tabs { max-width: 100%; }
  .expert-frame-mode .idea-tab { min-width: 0; padding: 5px 7px; font-size: 10px; }
  .expert-frame-mode .quick-action::before { width: 27px; height: 27px; }
  .expert-frame-mode .studio-options .studio-setting { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 9px 2px; }
  .expert-frame-mode .studio-options .studio-setting > span { grid-column: 1 / -1; grid-row: 1; }
  .expert-frame-mode .studio-quick-choices { grid-column: 1 / 3; grid-row: 2; }
  .expert-frame-mode .studio-options .studio-select { grid-column: 3; grid-row: 2; }
  .expert-frame-mode .studio-quick-choices button { font-size: 9px; }
  .expert-frame-mode .studio-quick-icon, .expert-frame-mode .studio-more-icon { width: 13px; height: 13px; }
}
