/* Shared finishing layer: calm surfaces, consistent controls, readable mobile tools. */
:root {
  --ink:#252735; --heading:#202231; --muted:#626574;
  --paper:#f6f7f9; --surface:#fff; --soft:#f2effa; --line:#dfe1e9;
  --accent:#7050bd; --accent-strong:#5838a3;
}
html { scroll-padding-top:88px; }
body[data-app-design='top-menu'] { background:#f6f7f9; color:var(--ink); font-size:1rem; line-height:1.6; }
body[data-app-design='top-menu'] > header { background:#fff; box-shadow:none; border-bottom:1px solid var(--line); }
body[data-app-design='top-menu'] main { padding-block:28px; }
body[data-app-design='top-menu'] footer { background:transparent; border-top:1px solid var(--line); padding-block:24px; margin-top:32px; }
body[data-app-design='top-menu'] footer nav { gap:10px 24px; }
body[data-app-design='top-menu'] footer a { display:inline-flex; align-items:center; min-height:44px; font-size:.875rem; }
body :is(main,section,aside,h2)[tabindex='-1']:focus { outline:none; }
body[data-app-design='top-menu'] :is(button,.button,select) { min-height:44px; line-height:1.45; font-size:.875rem; }
body[data-app-design='top-menu'] :is(button,.button) { border-radius:11px; }
body[data-app-design='top-menu'] summary { min-height:44px; align-content:center; line-height:1.5; }
body[data-app-design='top-menu'] :is(input:not([type='range']):not([type='checkbox']):not([type='radio']),textarea,select) { font-size:1rem; border-radius:11px; }
body[data-app-design='top-menu'] :is(button,.button,a,select,input,textarea,summary):focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
body[data-app-design='top-menu'] button:disabled { cursor:not-allowed; }
body[data-app-design='top-menu'] :is(.field-help,.editor-help,.photo-preview-note) { line-height:1.6; }
body[data-app-design='top-menu'] :is(.feedback,.field-help,[role='status']):empty { display:none; }
body[data-app-design='top-menu'] :is(.creator-card,.hub-tools-panel,.hub-utility,.account-content,.saved-character-card,.ready-compose) { box-shadow:none; border-color:var(--line); }
body[data-app-design='top-menu'] .account-profile { background:#fff; border-bottom:1px solid var(--line); }
body[data-app-design='top-menu'] .billing-balance-card { background:#fff; color:var(--ink); border:1px solid var(--line); }
body[data-app-design='top-menu'] #billing-credits { color:var(--accent-strong); }
body[data-app-design='top-menu'] #billing-credit-note { color:var(--muted); }
body[data-app-design='top-menu'] .billing-dashboard-heading { align-items:start; }
body[data-app-design='top-menu'] :is(.billing-overview,.account-page-heading,.section-heading) { gap:16px; }

/* Preserve useful imagery, remove the colored backdrop beneath every control. */
body[data-app-design='top-menu'] .studio-hub { max-width:1100px; padding:24px; border:1px solid var(--line); border-radius:20px; background:#fff; color:var(--ink); }
body[data-app-design='top-menu'] .hub-hero { display:grid; grid-template-columns:1fr 1fr; grid-template-areas:'top top' 'copy image'; gap:20px 28px; margin:0; padding:0; min-height:0; }
body[data-app-design='top-menu'] .hub-hero::after { display:none; }
body[data-app-design='top-menu'] .hub-hero>img { grid-area:image; position:static; z-index:auto; width:100%; height:280px; object-fit:cover; object-position:50% 42%; border-radius:16px; }
body[data-app-design='top-menu'] .hub-top { grid-area:top; }
body[data-app-design='top-menu'] .hub-plan { display:inline-flex; align-items:center; min-height:44px; padding:8px 14px; border:1px solid var(--line); background:#fff; color:var(--ink); border-radius:11px; box-shadow:none; font-size:.875rem; }
body[data-app-design='top-menu'] .hub-search { background:#f2effa; color:var(--accent-strong); border:1px solid #e5dff1; border-radius:11px; }
body[data-app-design='top-menu'] .hub-hero-copy { grid-area:copy; align-self:center; margin:0; max-width:none; color:var(--ink); text-shadow:none; }
body[data-app-design='top-menu'] .hub-hero-copy h1 { font-size:clamp(1.5rem,3vw,2.25rem); line-height:1.3; letter-spacing:-.025em; color:var(--heading); margin:0 0 12px; }
body[data-app-design='top-menu'] .hub-hero-copy>p:first-child { display:none; }
body[data-app-design='top-menu'] .hub-hero-copy p { font-size:1rem; font-weight:400; color:var(--muted); margin:0 0 10px; }
body[data-app-design='top-menu'] .hub-hero-copy a { min-height:44px; display:inline-flex; align-items:center; color:var(--accent-strong); font-size:.9375rem; }
body[data-app-design='top-menu'] .hub-carousel { grid-area:image; position:relative; inset:auto; z-index:1; align-self:end; justify-self:center; gap:0; padding:0 4px; margin:0 0 10px; border-radius:24px; background:#fffffff2; }
body[data-app-design='top-menu'] .hub-carousel button { width:44px; height:44px; min-height:44px; margin:0; padding:0; border-radius:50%; }
body[data-app-design='top-menu'] .hub-carousel button::before { inset:19px 15px; background:#b8aecb; border-radius:8px; }
body[data-app-design='top-menu'] .hub-carousel button[aria-pressed='true']::before { background:var(--accent-strong); }
body[data-app-design='top-menu'] .hub-actions { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:24px 0; }
body[data-app-design='top-menu'] .hub-actions>a { min-height:112px; gap:10px; padding:18px; border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:none; color:var(--ink); }
body[data-app-design='top-menu'] .hub-actions>a:first-child { background:#f2effa; border-color:#dfd7f0; color:var(--accent-strong); }
body[data-app-design='top-menu'] .hub-actions strong { font-size:1.0625rem; line-height:1.4; }
body[data-app-design='top-menu'] .hub-tool-grid { gap:12px; align-items:stretch; }
body[data-app-design='top-menu'] .hub-tool { flex-direction:row; justify-content:flex-start; text-align:left; gap:12px; padding:14px; border:1px solid var(--line); border-radius:13px; background:#fff; color:var(--ink); min-height:80px; }
body[data-app-design='top-menu'] .hub-tool>span { width:36px; min-width:36px; min-height:36px; border:0; border-radius:0; background:transparent; color:var(--accent-strong); }
body[data-app-design='top-menu'] .hub-tool:hover { background:#f8f7fb; border-color:#c5b8df; }
body[data-app-design='top-menu'] .hub-tool:hover>span { background:transparent; transform:none; }
body[data-app-design='top-menu'] .hub-tool svg { width:26px; height:26px; }
body[data-app-design='top-menu'] .hub-tool strong { font-size:.875rem; font-weight:600; line-height:1.5; overflow-wrap:normal; word-break:normal; hyphens:auto; }
body[data-app-design='top-menu'] .hub-inspiration { padding-top:24px; margin-top:24px; border-top:1px solid var(--line); }
body[data-app-design='top-menu'] .hub-inspiration-card { background:#fff; border-color:var(--line); border-radius:14px; }
body[data-app-design='top-menu'] .hub-inspiration-card small { color:var(--muted); font-size:.875rem; }
body[data-app-design='top-menu'] .caption-entry { background:#fff; border:1px solid var(--line); }
body[data-app-design='top-menu'] #hub-caption-availability { font-size:.875rem; color:var(--muted); }
body[data-app-design='top-menu'] .video-template-art { background:#f2effa; }
body[data-app-design='top-menu'] .video-template-card[data-template-tone] .video-template-art { background:#f2effa; }

/* Content creation: one form, regular controls, price stays beside its action. */
body[data-app-design='top-menu'][data-studio-view='create'] .studio-welcome { background:#fff; border:1px solid var(--line); }
body[data-app-design='top-menu'][data-studio-view='create'] .studio-welcome::after { background:linear-gradient(90deg,#fff 0%,#fff 39%,#ffffff00 78%); }
body[data-app-design='top-menu'][data-studio-view='create'] .creator-kind-buttons { padding:4px; background:#f1f2f5; border-radius:12px; }
body[data-app-design='top-menu'][data-studio-view='create'] .creator-kind-buttons button { min-height:44px; padding:8px 6px; line-height:1.4; }
body[data-app-design='top-menu'][data-studio-view='create'] .creator-kind-buttons button::before { display:none; }
body[data-app-design='top-menu'][data-studio-view='create'] .creator-kind-buttons button[aria-pressed='true'] { box-shadow:0 1px 4px #20223112; }
body[data-app-design='top-menu'] .creator-card #customer-prompt { font-size:1rem; line-height:1.7; }
body[data-app-design='top-menu'] #creator-more { border-color:var(--line); }
body[data-app-design='top-menu'] .creator-tools { gap:8px; }
body[data-app-design='top-menu'] :is(.creator-tools,.creator-tool-buttons) button { font-size:.875rem; }
body[data-app-design='top-menu'] #customer-generate { min-height:48px; height:auto; padding:11px 18px; font-size:.9375rem; line-height:1.45; }
body[data-app-design='top-menu'] .creator-action-bar #customer-generate { min-height:48px; height:auto; padding:11px 18px; font-size:.9375rem; line-height:1.45; }
body[data-app-design='top-menu'] .creator-action-bar { box-shadow:none; border-color:var(--line); }
body[data-app-design='top-menu'] .history-filters>summary { min-height:44px; }
body[data-app-design='top-menu'] .account-profile-identity { overflow-wrap:anywhere; }
body[data-app-design='top-menu'] .ready-card strong { font-size:.9375rem; }
body[data-app-design='top-menu'] .video-template-name { font-size:.9375rem; }
body[data-app-design='top-menu'] .video-template-description { font-size:.875rem; }

/* Editors retain a dark media stage; controls remain legible and reachable. */
body[data-app-design='top-menu'] .focused-editor :is(button,select,input:not([type='range'])) { min-height:44px; font-size:.875rem; }
body[data-app-design='top-menu'] .focused-editor :is(input:not([type='range']),textarea,select) { font-size:1rem; }
body[data-app-design='top-menu'] .focused-editor :is(label,summary,.field-help,.editor-help) { font-size:.875rem; }
body[data-app-design='top-menu'] .focused-editor .editor-toolstrip>button { min-width:84px; min-height:64px; font-size:.875rem; }
body[data-app-design='top-menu'] .montage-clip-tabs>button { min-height:44px; }
body[data-app-design='top-menu'] .montage-timeline { overscroll-behavior-x:contain; }
body[data-app-design='top-menu'] #studio-montage .montage-lane { height:46px; }
body[data-app-design='top-menu'] #studio-montage .montage-lane button { min-height:44px; height:44px; font-size:.8125rem; }
body[data-app-design='top-menu'] .montage-editor .editor-toolstrip { scrollbar-color:#60566f #191922; }
body[data-app-design='top-menu'] .montage-editor .editor-toolstrip::-webkit-scrollbar { height:4px; background:#191922; }
body[data-app-design='top-menu'] .montage-editor .editor-toolstrip::-webkit-scrollbar-thumb { background:#60566f; border-radius:4px; }
body[data-app-design='top-menu'] .montage-preview .field-help { font-size:.8125rem; }
body[data-app-design='top-menu'] .photo-row button { font-size:.875rem; }
body[data-app-design='top-menu'] .auto-item-actions button { min-height:44px; font-size:.8125rem; }
body[data-app-design='top-menu'] .editor-export-dialog { max-height:calc(100dvh - 32px); overflow:auto; }

@media(min-width:761px) and (min-height:501px) {
  body[data-app-design='top-menu'] .main-nav { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:4px; }
  body[data-app-design='top-menu'] .main-nav>a { display:flex; flex-direction:column; justify-content:center; text-align:center; gap:6px; padding:10px 3px; font-size:.875rem; line-height:1.4; min-width:0; min-height:68px; }
  body[data-app-design='top-menu'] .main-nav svg { width:20px; height:20px; }
  body[data-app-design='top-menu'] .main-nav span { overflow-wrap:normal; }
}
@media(max-width:760px),(max-width:1024px) and (max-height:500px) {
  html { scroll-padding-top:76px; }
  body[data-app-design='top-menu'] > header { min-height:64px; padding-inline:max(16px,env(safe-area-inset-left,0px)) max(16px,env(safe-area-inset-right,0px)); }
  body[data-app-design='top-menu'] main,
  body[data-app-design='top-menu'][data-studio-view='home'] main { padding:20px 16px; }
  body[data-app-design='top-menu'] .studio-hub { padding:0; border:0; border-radius:0; background:transparent; }
  body[data-app-design='top-menu'] .hub-hero { grid-template-columns:minmax(0,1fr); grid-template-areas:'top' 'image' 'copy'; gap:16px; }
  body[data-app-design='top-menu'] .hub-hero>img { height:210px; border-radius:16px; }
  body[data-app-design='top-menu'] .hub-hero-copy h1 { font-size:1.5rem; margin-bottom:8px; max-width:24ch; }
  body[data-app-design='top-menu'] .hub-hero-copy p { font-size:.9375rem; }
  body[data-app-design='top-menu'] .hub-actions { gap:12px; margin:20px 0; }
  body[data-app-design='top-menu'] .hub-actions>a { min-height:112px; padding:14px 10px; }
  body[data-app-design='top-menu'] .hub-actions strong { font-size:1rem; }
  body[data-app-design='top-menu'] .hub-tool-grid,
  body[data-app-design='top-menu'] .hub-tool-category .hub-tool-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  body[data-app-design='top-menu'] .hub-tool { padding:12px 10px; gap:8px; min-height:86px; }
  body[data-app-design='top-menu'] .hub-tool>span { width:26px; min-width:26px; min-height:32px; }
  body[data-app-design='top-menu'] .hub-tool strong { font-size:.875rem; }
  body[data-app-design='top-menu'] .hub-inspiration-card strong { font-size:1rem; }
  body[data-app-design='top-menu'] .studio-dock { background:#fff; box-shadow:none; backdrop-filter:none; gap:0; padding-top:6px; border-color:var(--line); }
  body[data-app-design='top-menu'] .studio-dock a { font-size:.75rem; line-height:1.3; gap:4px; min-height:56px; padding:4px 2px; color:var(--muted); }
  body[data-app-design='top-menu'] .studio-dock a>span { max-width:100%; overflow-wrap:anywhere; }
  body[data-app-design='top-menu'] .studio-dock a[aria-current] { color:var(--accent-strong); }
  body[data-app-design='top-menu'] .studio-dock a[aria-current] svg { background:var(--soft); border-radius:6px; }
  body[data-app-design='top-menu'] .studio-dock svg { width:22px; height:22px; }
  body[data-app-design='top-menu'] .site-navigation { max-height:calc(100dvh - 76px); overflow:auto; overscroll-behavior:contain; background:#fff; }
  body[data-app-design='top-menu'][data-menu-open='true'] { overflow:hidden; }
  body[data-app-design='top-menu'] .main-nav a { min-height:48px; font-size:.9375rem; }
  body[data-app-design='top-menu'] :is(.site-language-picker,.site-account-menu)>summary { min-height:44px; }
  body[data-app-design='top-menu'] .site-utilities { gap:12px; }
  body[data-app-design='top-menu'] .creator-action-bar { padding:8px 16px; }
  body[data-app-design='top-menu'] .creator-action-bar #customer-generate { min-height:48px; height:auto; width:auto; max-width:100%; min-width:min(260px,100%); font-size:.875rem; }
  body[data-app-design='top-menu'] .creator-card { border-radius:16px; }
  body[data-app-design='top-menu'] .creator-card .creator-tools { display:flex; flex-wrap:wrap; }
  body[data-app-design='top-menu'] .creator-card .creator-tools button { flex:1 1 calc(50% - 8px); justify-content:flex-start; }
  body[data-app-design='top-menu'] .focused-editor .editor-heading { flex-wrap:wrap; gap:10px; }
  body[data-app-design='top-menu'] .focused-editor .editor-heading>h1 { font-size:1.125rem; }
  body[data-app-design='top-menu'] .montage-transport { flex-wrap:wrap; }
  body[data-app-design='top-menu'] .montage-editor .editor-toolstrip { padding-bottom:max(8px,env(safe-area-inset-bottom,0px)); }
  body[data-app-design='top-menu'] .photo-controls { gap:0 12px; }
  body[data-app-design='top-menu'] .ready-compose .editor-heading>button:not(.editor-back) { max-width:none; }
  body[data-app-design='top-menu'] footer { margin-top:28px; padding:18px 16px; }
}
@media(max-width:359px) {
  body[data-app-design='top-menu'] .hub-tool { flex-direction:column; text-align:center; justify-content:center; }
  body[data-app-design='top-menu'] .hub-plan { padding-inline:10px; }
  body[data-app-design='top-menu'] .hub-hero>img { height:185px; }
  body[data-app-design='top-menu'] .studio-dock a { font-size:.6875rem; }
}
@media(max-height:500px) and (min-width:600px) {
  body[data-app-design='top-menu'] .hub-hero { grid-template-columns:1fr 1fr; grid-template-areas:'top top' 'copy image'; }
  body[data-app-design='top-menu'] .hub-tool-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  body[data-app-design='top-menu'] .montage-preview :is(img,video) { max-height:55dvh; min-height:140px; }
}
@media(prefers-reduced-motion:reduce) {
  body[data-app-design='top-menu'] * { scroll-behavior:auto!important; }
}

/* Import feedback belongs beside the media, including on a phone. */
#studio-montage .montage-import-feedback{margin:0 0 12px;overflow-wrap:anywhere}
#studio-montage .montage-import-feedback:has(#montage-status:empty):has(#montage-import-name[hidden]){display:none}
#studio-montage #montage-status{margin:0;padding:10px 12px;border-left:3px solid #a995ff;background:#242132;border-radius:8px;color:#eee9ff;font-size:.875rem;line-height:1.5}
#studio-montage #montage-status[data-error=true]{border-color:#ef9ca9;background:#34232c;color:#ffe1e5}
#studio-montage #montage-status:empty{display:none}
#studio-montage #montage-import-name{margin:7px 0;color:#d3cede;font-size:.8125rem}
#studio-montage #montage-import-retry{margin:4px 0 0;min-height:44px}
#studio-montage #montage-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:16px;text-align:center}
#studio-montage #montage-empty p{margin:0}
#studio-montage #montage-empty[hidden]{display:none}
#studio-montage #montage-add-empty{min-height:44px;max-width:100%;white-space:normal}
#studio-montage #montage-import-progress{width:100%;height:8px;margin:6px 0;accent-color:#ae91f2}
