/* FrameForge Studio — presentation only.
   Loaded after style.css. Existing state classes, IDs and API wiring stay intact. */
:root {
  color-scheme: dark;
  --bg: #10181e;
  --panel: #18242c;
  --card2: #213039;
  --border: #30424d;
  --border-strong: #526974;
  --accent: #087f75;
  --accent2: #7cdec7;
  --text: #edf3f5;
  --sub: #adbec7;
  --green: #7adbb0;
  --red: #ff9eac;
  --orange: #f9bf85;
  --teal: #98c6ff;
  --pill-bg: #203e38;
  --pill-txt: #a1ead3;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, .12);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .2);
  --shadow-lg: 0 24px 72px rgba(0, 0, 0, .35);
  --glow: 0 0 0 3px rgba(8, 127, 117, .16);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --page-gutter: 32px;
}
html { scroll-padding-top: 120px; }
body { font-size: 14px; line-height: 1.55; }
button, input, select, textarea { font-family: inherit; }
button, a, summary, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a, summary { touch-action: manipulation; }
button, input, select, textarea, audio, video { max-width: 100%; }
button { white-space: normal; }
input, select, textarea { min-width: 0; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); flex-shrink: 0; }
input[type=file] { width: 100%; max-width: 360px; font-size: 13px; }
input[type=file]::file-selector-button {
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
  padding: 10px 12px; border-radius: 8px; margin-right: 10px; cursor: pointer;
}
textarea { line-height: 1.65; resize: vertical; }
textarea, input[type=text], input[type=number], input[type=password], select {
  background: var(--panel); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; padding: 10px 12px;
}
select { min-height: 44px; }
input::placeholder, textarea::placeholder { color: #91a6b0; opacity: 1; }
:focus-visible { outline: 3px solid #299e92; outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .5; }
[hidden] { display: none !important; }
.ui-icon { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 1000; transform: translateY(-160%);
  padding: 12px 18px; background: var(--panel); color: var(--accent); border-radius: 10px;
}
.skip-link:focus { transform: translateY(0); }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { background: #425a65; }
::-webkit-scrollbar-thumb:hover { background: #657f8b; }

/* Navigation */
.sidebar {
  --panel: #182c35; --card2: #233b44; --border: #304650; --border-strong: #526b74;
  --text: #eef5f7; --sub: #b0c2c9; --accent: #67d4ba; --accent2: #90e4ce;
  --pill-bg: #224a49; --pill-txt: #a6f0d8;
  --green: #88dfad; --red: #ffabb4; --orange: #ffcb95; --teal: #a2cbff;
  color-scheme: dark; width: 252px; min-width: 252px; padding-bottom: 12px;
  border-right: 0; box-shadow: none; overscroll-behavior: contain;
}
.sidebar .logo {
  background: none; justify-content: flex-start; gap: 12px; padding: 22px;
  height: auto; min-height: 100px; font-size: 21px; letter-spacing: -.7px;
}
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 12px; background: #a6f0d8; color: #163e39;
}
.brand-mark .ui-icon { width: 26px; height: 26px; }
.logo small { display: block; margin-top: 2px; font-size: 9px; color: var(--sub); letter-spacing: 1.6px; font-weight: 500; }
.nav-caption { padding: 20px 22px 6px; color: var(--sub); font-size: 10px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; }
.sidebar .nav { padding: 12px; gap: 5px; }
.nav-btn { display: flex; align-items: center; gap: 11px; min-height: 46px; font-size: 13px; padding: 10px 12px; }
.nav-btn:hover { transform: none; }
.nav-btn.active { box-shadow: inset 3px 0 #a6f0d8; }
.nav-btn .nav-badge { margin-left: auto; }
.gp-switcher { gap: 6px; }
.gp-pill { padding: 10px 12px; font-size: 12px; overflow-wrap: anywhere; }
.gp-pill.active { border-color: #456763; }
.notif-bell-wrap { margin-top: 0; }
.notif-bell-btn { min-height: 44px; gap: 11px; }
.notif-dropdown { position: relative; top: auto; left: auto; right: auto; width: 100%; max-height: 340px; }
.notif-dropdown-head { flex-wrap: wrap; gap: 6px; padding: 10px; }
.notif-item { font-size: 13px; padding: 12px; }
.notif-item .notif-time { font-size: 11px; }
.workspace-settings { margin: 4px 12px 16px; border: 1px solid var(--border); border-radius: 12px; }
.workspace-settings summary {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px;
  color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; list-style: none;
}
.workspace-settings summary::-webkit-details-marker { display: none; }
.details-chevron { margin-left: auto; transition: transform .15s; }
.workspace-settings[open] .details-chevron { transform: rotate(180deg); }
.settings-form { padding: 0 10px 14px; gap: 6px; }
.settings-form input, .settings-form select { height: auto; min-height: 42px; font-size: 13px; background: var(--card2); }
.settings-form input[type=radio] { min-height: 0; width: 18px; height: 18px; padding: 0; }
.field-label { display: block; font-size: 11px; letter-spacing: .3px; }
.settings-form .radio-row { gap: 12px; }
.radio-pill { min-height: 40px; gap: 6px; }
.api-status, #logo-status { font-size: 12px !important; }
.user-box { margin: auto 12px 0; padding: 16px 0 0; border-top: 1px solid var(--border); }
.user-name { font-size: 12px; padding: 0 4px; overflow-wrap: anywhere; }
.sidebar-footer { margin-top: 0; font-size: 10px; }
.topbar { background: #182c35; color: #eef5f7; border: 0; }
.topbar-title { display: flex; align-items: center; gap: 10px; }
.topbar-title .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
.topbar-title .ui-icon { width: 22px; height: 22px; }
.topbar-burger { color: #eef5f7; border-color: #526b74; width: 44px; height: 44px; }
.topbar-burger:hover { background: #233b44; }
.content { padding-bottom: 40px; }
.content > * { min-width: 0; }
.content :where(h1, h2, h3, .title, .name, .meta, .comment-body, .status-line) { overflow-wrap: anywhere; }

/* Shared controls and surfaces */
.accent-btn, .ghost-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; height: auto; padding: 10px 16px; font-size: 13px;
  font-weight: 600; line-height: 1.4; text-decoration: none; box-shadow: none; vertical-align: middle;
}
.accent-btn:hover { background: #7cdec7; box-shadow: var(--shadow-sm); transform: none; }
.accent-btn.green:hover { background: #0c613b; }
.accent-btn.orange:hover { background: #8d4009; }
.accent-btn.teal:hover { background: #20558a; }
.ghost-btn:hover { transform: none; }
.ghost-btn.small { min-height: 38px; height: auto; font-size: 12px; }
.sidebar .ghost-btn { background: transparent; }
.icon-btn { width: 38px; height: 38px; }
.btn-row { gap: 8px; }
.card, .form-card, .quick-card, .project-card, .gallery-card { box-shadow: var(--shadow-sm); }
.section-title { font-size: 15px; padding-bottom: 10px; }
.section-heading { font-size: 17px; padding: 0 var(--page-gutter); margin: 30px 0 14px; letter-spacing: -.3px; }
.page-title { font-size: clamp(22px, 2.5vw, 30px); line-height: 1.3; padding: 32px var(--page-gutter) 20px; letter-spacing: -.8px; }
.pill, .badge, .status-badge { font-size: 12px; }
.status-badge { padding: 5px 11px; }
.progress-bar-outer { height: 7px; background: var(--card2); }
.progress-bar-inner { background: var(--accent); }
.form-card { margin: 12px var(--page-gutter); padding: 24px; }
.form-row { gap: 20px; }
.form-col { min-width: min(100%, 250px); }
.form-card label.title { font-size: 14px; }
.form-card .hint { font-size: 13px; line-height: 1.65; margin-bottom: 12px; }
.params-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.params-grid > *, .split > *, .char-fields, .voice-name { min-width: 0; }
textarea.tall { min-height: 210px; }
textarea.med { min-height: 140px; }
textarea.small { min-height: 100px; }
.count-lbl, .cost-lbl, .status-line { font-size: 13px; }
.char-row { padding: 12px; gap: 12px; flex-wrap: wrap; }
.char-fields { flex: 1 1 150px; }
.char-fields input { min-height: 40px; font-size: 13px; }
.char-btns { flex-direction: row; flex-wrap: wrap; }
.style-pick-card { padding: 18px 12px; min-height: 76px; }
.style-pick-card .name { font-size: 13px; }
.template-btn { padding: 18px 12px; font-size: 13px; }
.templates-row { padding: 0 var(--page-gutter) 12px; }
.stepper-indicator { padding: 4px var(--page-gutter) 20px; gap: 8px; }
.stepper-step { min-width: 92px; min-height: 64px; opacity: .75; border-radius: 8px; }
.stepper-step .dot { width: 34px; height: 34px; font-size: 13px; }
.stepper-step .label { font-size: 12px; white-space: normal; }
.step-nav { padding: 16px var(--page-gutter) 24px; gap: 10px; flex-wrap: wrap; }
.step-nav .accent-btn, .step-nav .ghost-btn { min-height: 48px; }

/* Home */
.studio-hero {
  margin: 28px var(--page-gutter) 24px; padding: 36px;
  display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 28px;
  text-align: left; background: #1b332f; color: var(--text); box-shadow: none;
  border: 1px solid #35564b; position: relative; overflow: hidden; min-height: 250px;
}
.hero-copy { align-self: center; position: relative; z-index: 1; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.7px; text-transform: uppercase; color: #abd9c6; margin-bottom: 16px; }
.studio-hero h1 { font-size: clamp(26px, 3vw, 40px); line-height: 1.16; letter-spacing: -1.1px; margin-bottom: 16px; }
.studio-hero p { font-size: 15px; line-height: 1.65; opacity: 1; color: #bad0c6; max-width: 540px; }
.hero-caption { margin-top: 24px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: #abd9c6; }
.hero-caption > span { width: 6px; height: 6px; border-radius: 50%; background: #087f75; }
.hero-art { position: relative; width: 240px; min-height: 190px; align-self: center; }
.art-frame { position: absolute; width: 132px; height: 156px; border: 6px solid white; border-radius: 14px; box-shadow: 0 8px 24px #23483820; }
.art-frame-back { top: 0; left: 12px; transform: rotate(-12deg); background: #b2c9ba; }
.art-frame-front { top: 12px; right: 30px; transform: rotate(9deg); background: #e7d4ab; overflow: hidden; }
.art-sun { width: 36px; height: 36px; border-radius: 50%; position: absolute; top: 22px; right: 20px; background: #faf1db; }
.art-landscape { position: absolute; bottom: -45px; left: -15px; width: 180px; height: 120px; border-radius: 50%; background: #487c68; transform: rotate(-25deg); }
.art-frame-front > span { position: absolute; left: 40px; top: 48px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #ffffffcf; color: #254e41; }
.art-timeline { position: absolute; bottom: -4px; left: 28px; width: 174px; display: flex; gap: 5px; padding: 8px; background: white; border-radius: 9px; box-shadow: var(--shadow-md); transform: rotate(-3deg); }
.art-timeline i { flex: 1; height: 20px; background: #b2c9ba; border-radius: 3px; }
.art-timeline i:nth-child(2n) { background: #e7d4ab; }
.quick-actions { padding: 0 var(--page-gutter); gap: 16px; }
.quick-card { text-align: left; padding: 22px; min-width: 0; font: inherit; }
.quick-card:hover { transform: none; border-color: #699f8d; box-shadow: var(--shadow-md); }
.quick-card .icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: var(--card2); color: var(--accent); font-size: 23px; }
.quick-card .title { font-size: 15px; margin-top: 16px; }
.quick-card .desc { font-size: 13px; margin-top: 6px; line-height: 1.55; }
.quick-card-primary { border-color: #466f62; }
.quick-card-primary .icon { background: #25483d; }
.home-empty { padding: 48px 24px; margin: 24px var(--page-gutter); border: 1px dashed var(--border-strong); border-radius: 18px; }
.home-empty strong { display: inline-block; color: var(--text); font-weight: 600; margin-bottom: 6px; }
.project-card { margin: 10px var(--page-gutter); padding: 16px; gap: 16px; }
.project-card:hover { transform: none; }
.project-thumb { width: 68px; height: 68px; }
.project-info .name { font-size: 15px; }
.project-info .name a { color: inherit; text-decoration: none; }
.project-info .name a:hover { color: var(--accent); text-decoration: underline; }
.project-info .meta { font-size: 12px; line-height: 1.7; }
.project-actions { gap: 8px; flex-shrink: 0; }

/* Editor: horizontally scrollable steps, even on smaller desktops */
.editor-header { min-height: 84px; height: auto; padding: 20px var(--page-gutter); gap: 12px; flex-wrap: wrap; box-shadow: none; }
.editor-header .title { font-size: 21px; letter-spacing: -.6px; max-width: 100%; }
.editor-header .meta { font-size: 12px; }
.tabs-bar {
  position: sticky; top: 0; z-index: 8; padding: 10px var(--page-gutter);
  gap: 6px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; scroll-padding-inline: 16px;
}
.tab-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0;
  min-height: 44px; padding: 10px 14px; border: 1px solid transparent; border-radius: 10px;
  font-size: 13px; top: 0; white-space: nowrap;
}
.tab-btn .ui-icon { width: 17px; height: 17px; }
.tab-btn.active { background: var(--pill-bg); color: var(--pill-txt); border: 1px solid #466f62; }
.tab-panel { padding: 24px var(--page-gutter); }
.split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.split .card { padding: 18px; }
.split .section-title { padding: 0 0 14px; }
.split textarea { margin: 0 !important; width: 100%; min-height: 330px; }
.status-line { margin-left: 0; }
.gen-log { background: #182c35; color: #d5e5ea; padding: 20px; font-size: 13px; box-shadow: none; overflow-wrap: anywhere; }
.gallery-toolbar { height: auto; min-height: 64px; padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
.gallery-nav, .gallery-sel-row { flex-wrap: wrap; gap: 10px; }
.gallery-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.synchro-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 16px; }
.gallery-card { min-width: 0; padding: 12px; }
.gallery-card:hover { transform: none; }
.gallery-card.failed { border-color: #814755; background: #37222b; }
.gallery-card .img-wrap { background: #182c35; }
.gallery-card img { width: 100%; }
.gallery-card .words, .synchro-seg-text { font-size: 13px !important; line-height: 1.65 !important; overflow-wrap: anywhere; }
.gallery-card .btn-row { flex-wrap: wrap; }
.gallery-card .btn-row > .accent-btn { min-width: 120px; }
.gallery-card .img-wrap:hover img { transform: none; }
.nudge-btn { width: 36px; height: 40px; font-size: 14px; }
.synchro-reset-btn { min-width: 36px; min-height: 36px; }
.voice-row { padding: 12px; gap: 12px; }
.voice-row .voice-name { font-size: 14px; overflow-wrap: anywhere; }
.voice-list { max-height: 480px; gap: 8px; }
.comment { padding: 14px; background: #1d2d36; }
.comment-author { font-size: 12px; margin-bottom: 6px; }
.comment-body { font-size: 14px; }
.comment-timestamp { font-size: 12px; min-height: 32px; padding: 5px 8px; }
.admin-table { font-size: 13px; background: var(--panel); }
.admin-table th { font-size: 11px; background: #21343e; }
.admin-table th, .admin-table td { padding: 16px; }
.admin-table label { min-height: 36px; }
.table-scroll { scrollbar-width: thin; }
.table-hint { margin: 0 var(--page-gutter) 10px; color: var(--sub); font-size: 12px; }

/* Dialogs and public pages */
.modal-overlay { padding: 16px; }
.modal-box { background: var(--panel); max-width: 100%; max-height: calc(100dvh - 32px); padding: 28px; overscroll-behavior: contain; }
.modal-box h3 { font-size: 20px; line-height: 1.35; }
.variant-card { width: min(100%, 260px); }
.toast { max-width: calc(100vw - 32px); bottom: calc(20px + env(safe-area-inset-bottom)); overflow-wrap: anywhere; }
.lightbox-overlay { padding: 60px 16px 24px; }
.lightbox-close { width: 44px; height: 44px; right: 16px; top: 12px; }
.regen-queue-panel { max-height: 45dvh; bottom: calc(16px + env(safe-area-inset-bottom)); }
.regen-queue-dismiss { min-width: 36px; min-height: 36px; }
.login-body { padding: 32px 16px; min-height: 100dvh; background: #101b21; }
.login-card { width: 420px; max-width: 100%; padding: 40px; border: 1px solid #334b53; text-align: left; box-shadow: var(--shadow-lg); }
.login-logo { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--text); font-size: 26px; letter-spacing: -.8px; margin-bottom: 16px; overflow-wrap: anywhere; }
.login-sub { font-size: 14px; text-align: center; margin-bottom: 30px; }
.login-card .field-label { margin-top: 18px; font-size: 12px; }
.login-card input:not([type=checkbox]):not([type=radio]) { height: 48px; text-align: left; letter-spacing: normal; }
.login-card .accent-btn.full { min-height: 48px; margin-top: 24px; }
.review-card { width: 640px; text-align: center; }
.review-card .login-logo { font-size: 22px; }
.review-card input[type=checkbox] { width: 18px; height: 18px; margin: 0; }
.review-card .comment-thread { max-height: 360px; }

/* Narrow desktops/tablets: rows wrap before the sidebar crowds controls. */
@media (max-width: 1100px) {
  :root { --page-gutter: 24px; }
  .studio-hero { grid-template-columns: minmax(0, 1fr) 180px; padding: 28px; }
  .hero-art { transform: scale(.8); transform-origin: center; width: 180px; }
  .home-actions { flex-wrap: wrap; }
  .home-actions .quick-card { flex: 1 1 180px; }
  .params-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split textarea { min-height: 240px; }
  .responsive-row { flex-wrap: wrap; gap: 10px; }
  .responsive-row > :where(div, span, label) { min-width: 0; }
}
@media (max-width: 768px) {
  :root { --page-gutter: 18px; }
  .topbar { height: 64px; padding: 8px 16px; gap: 14px; }
  .sidebar { top: 64px; height: calc(100dvh - 64px); width: min(88vw, 320px); min-width: 0; padding-bottom: env(safe-area-inset-bottom); }
  .sidebar .logo { min-height: 80px; }
  .sidebar-overlay { top: 64px; }
  .sidebar:not(.open) { visibility: hidden; }
  .sidebar.open { visibility: visible; }
  .tabs-bar { top: 64px; padding: 8px 12px; }
  .content { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .studio-hero { grid-template-columns: 1fr; padding: 24px; margin-top: 18px; min-height: 0; }
  .hero-art { display: none; }
  .hero-caption { margin-top: 18px; }
  .studio-hero h1 { font-size: 30px; }
  .page-title { padding-top: 24px; }
  .editor-header { padding: 18px var(--page-gutter); }
  .editor-header .title { flex: 1 1 100%; font-size: 20px; }
  .editor-header .meta { flex: 1 1 140px; }
  .editor-header .spacer { display: none; }
  .gallery-toolbar .spacer { display: none; }
  .project-card { flex-wrap: wrap; }
  .project-info { flex: 1 1 140px; }
  .project-actions { margin-left: auto; }
  .form-card { padding: 20px; }
  .form-col { flex-basis: 100%; min-width: 0; }
  .stepper-indicator { padding-left: var(--page-gutter); padding-right: var(--page-gutter); }
  .step-nav { padding-left: var(--page-gutter); padding-right: var(--page-gutter); }
  .step-nav .spacer-flex { display: none; }
  .step-nav > :where(button, a) { flex: 1 1 135px; height: auto !important; }
  .step-nav > button[type=submit] { flex-basis: 100%; }
  .responsive-row > input:not([type=checkbox]):not([type=radio]):not([type=hidden]) { flex: 1 1 180px !important; min-width: 0 !important; }
  .responsive-row > audio { flex: 1 1 100%; width: 100%; min-height: 44px; }
  .responsive-row > button, .responsive-row > a { white-space: normal !important; height: auto !important; }
  .responsive-row > label { white-space: normal !important; }
  /* Inline styles predate the shared layout; constrain outer page gutters only. */
  .content [style*="margin:0 24px"], .content [style*="margin: 0 24px"] { margin-left: var(--page-gutter) !important; margin-right: var(--page-gutter) !important; }
  .content [style*="padding:0 24px"], .content [style*="padding: 0 24px"],
  .content [style*="padding:16px 24px"], .content [style*="padding: 16px 24px"] { padding-left: var(--page-gutter) !important; padding-right: var(--page-gutter) !important; }
  /* 16px inputs avoid automatic iOS zoom while typing. */
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]), select, textarea,
  .settings-form input, .settings-form select { font-size: 16px !important; }
  .accent-btn, .ghost-btn, .ghost-btn.small, .icon-btn, .nudge-btn { min-height: 44px; }
  .icon-btn, .nudge-btn { min-width: 44px; }
  .gallery-card .btn-row > :where(button, a) { height: auto !important; }
  .modal-box { padding: 20px; width: 100% !important; max-height: calc(100dvh - 32px); }
  .modal-box .responsive-row > button { flex: 1 1 150px; }
  .login-card { width: min(420px, 100%); padding: 28px; }
  .review-card { width: min(640px, 100%); }
  .review-card .responsive-row > button { flex: 1 1 100% !important; }
}
@media (max-width: 480px) {
  :root { --page-gutter: 14px; }
  .studio-hero { padding: 22px; }
  .studio-hero h1 { font-size: 27px; }
  .home-actions { flex-direction: column; }
  .home-actions .quick-card { flex: auto; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; padding: 18px; }
  .home-actions .icon { grid-row: 1 / 3; }
  .home-actions .title { margin: 0; align-self: end; }
  .home-actions .desc { margin-top: 3px; }
  .quick-actions:not(.home-actions) { flex-direction: column; }
  .params-grid { grid-template-columns: minmax(0, 1fr); }
  .gallery-grid, .synchro-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .gallery-card img { max-height: 420px; object-fit: contain; }
  .project-thumb { width: 52px; height: 60px; }
  .project-card { gap: 12px; padding: 14px; }
  .project-actions { width: 100%; }
  .project-actions > a { flex: 1; }
  .tab-panel { padding: 16px var(--page-gutter); }
  .form-card { padding: 16px; }
  .style-pick-card { min-width: 115px; }
  .split .card { padding: 16px; }
  .responsive-row > .accent-btn { flex: 1 1 100%; }
  .voice-row { flex-wrap: wrap; }
  .voice-row .voice-name { flex-basis: calc(100% - 44px); }
  .regen-queue-panel { left: 12px; right: 12px; width: auto; }
  .login-card { padding: 26px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 768px) {
  .accent-btn, .ghost-btn, .ghost-btn.small { height: auto !important; overflow-wrap: anywhere; }
  .sidebar .nav-badge { background: #ff9eac; color: white; }
}

/* Dark studio: separate readable status colors from filled action colors. */
.accent-btn { background: #087f75; color: #fff; }
.accent-btn:hover { background: #086e66; }
.accent-btn.green { background: #137749; color: #fff; }
.accent-btn.green:hover { background: #0c613b; }
.accent-btn.orange { background: #a94e0c; color: #fff; }
.accent-btn.orange:hover { background: #8d4009; }
.accent-btn.teal { background: #2769ac; color: #fff; }
.accent-btn.teal:hover { background: #20558a; }
.nav-badge, .sidebar .nav-badge { background: #bc3345; color: #fff; }
.gallery-card.failed .num-badge { background: #bc3345; color: #fff; }
.hero-caption > span { background: #7cdec7; }
.art-frame { border-color: #8aab9d; }
.art-timeline { background: #35564b; }
.music-track-row {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) minmax(160px, 300px);
  gap: 12px !important;
}
.music-track-row > span { overflow-wrap: anywhere; }
.music-track-row > audio { width: 100%; min-width: 0; height: 44px !important; }
.music-library-header { margin-bottom: 14px; }
.music-library-header .section-title { padding: 0 !important; }
@media (max-width: 640px) {
  .music-track-row { grid-template-columns: auto minmax(0, 1fr); }
  .music-track-row > audio { grid-column: 2; }
}

.stepper-step.done .dot { background: #137749; border-color: #137749; color: #fff; }

/* Category filters must override the music row grid, including !important. */
[data-music-category][hidden] { display: none !important; }
