@font-face {
  font-family: "Mula Sans";
  src: url("./home/heartmula-assets/neue-regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Mula Sans";
  src: url("./home/heartmula-assets/neue-medium.woff") format("woff");
  font-weight: 500 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --paper: #07171c;
  --paper-deep: #0a2027;
  --surface: rgba(10, 31, 38, 0.68);
  --surface-solid: #0b2229;
  --panel: rgba(10, 31, 38, 0.72);
  --ink: #f1f5ec;
  --muted: #8ca39e;
  --line: rgba(225, 255, 247, 0.10);
  --line-strong: rgba(225, 255, 247, 0.18);
  --mint: #55efc4;
  --aqua: #59cce8;
  --violet: #9387ff;
  --lime: #55efc4;
  --lime-dark: #28aa8d;
  --lime-soft: rgba(85, 239, 196, 0.12);
  --coral: #c97d83;
  --blue: #59cce8;
  --purple: #9387ff;
  --green: #55efc4;
  --amber: #d6a95d;
  --red: #e77c79;
  --danger: #e77c79;
  --danger-soft: rgba(231, 124, 121, 0.12);
  --shadow: 0 22px 64px rgba(0, 0, 0, 0.20);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --side: 232px;
  --bottom: 72px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-family: "Mula Sans", "PingFang SC", "Microsoft YaHei", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(85, 239, 196, .28) rgba(5, 20, 25, .28);
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: rgba(5, 20, 25, .18); }
*::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(85,239,196,.48), rgba(89,204,232,.32)) padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(85,239,196,.68), rgba(89,204,232,.48)) padding-box; }
html { width: 100%; max-width: 100%; min-height: 100%; overflow-x: hidden; overflow-x: clip; background: var(--paper); }
body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

#ambient-canvas {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .88;
}
.ambient-fallback #ambient-canvas {
  background:
    radial-gradient(ellipse 58% 52% at 78% 20%, rgba(85, 239, 196, .055), transparent 72%),
    radial-gradient(ellipse 45% 44% at 20% 84%, rgba(89, 204, 232, .045), transparent 70%),
    var(--paper);
}
#app, .toast-region { position: relative; z-index: 1; }
#app, .app-shell, .main, .content { min-width: 0; max-width: 100%; }
img, video, canvas, svg { max-width: 100%; }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.52; }
a { color: inherit; }
a.nav-button, a.mobile-nav-button { text-decoration: none; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: clamp(1.55rem, 2.4vw, 2.25rem); font-weight: 500; letter-spacing: -0.045em; line-height: 1.08; }
h2 { font-size: clamp(1.3rem, 2vw, 1.9rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.14; }
h3 { margin-bottom: 8px; font-size: 1rem; font-weight: 500; letter-spacing: -0.015em; }
p { color: var(--muted); }

:focus-visible { outline: 1px solid rgba(85, 239, 196, 0.78); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; transform: translateY(-150%); border-radius: 8px; background: #dcebe5; color: #082129; }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); background: transparent; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 23px 15px 18px;
  border-right: 1px solid var(--line);
  background: rgba(6, 22, 27, 0.74);
  backdrop-filter: blur(22px);
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 11px; min-height: 42px; font-weight: 500; font-size: 1.12rem; letter-spacing: -0.025em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; border: 1px solid rgba(255,255,255,.16); border-radius: 11px; background: #080a0f url("./home/heartmula-assets/mula-mark-2026.svg") center / cover no-repeat; box-shadow: none; }
.brand-mark::before { content: ""; }
.sidebar-create-group { position: relative; z-index: 80; margin: 24px 0 18px; }
.sidebar-create { width: 100%; margin: 0; }
.sidebar-create > span:not(.icon) { flex: 1; text-align: left; }
.sidebar-create .icon-chevron-down { width: 14px; height: 14px; transition: transform 180ms ease; }
.sidebar-create-group.is-open .sidebar-create .icon-chevron-down { transform: rotate(180deg); }
.sidebar-create-menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  max-height: min(56vh, 430px);
  display: grid;
  gap: 2px;
  padding: 7px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(225,255,247,.085);
  border-radius: 13px;
  background: rgba(7,25,29,.97);
  box-shadow: 0 22px 54px rgba(0,0,0,.38), inset 0 1px rgba(255,255,255,.035);
  backdrop-filter: blur(22px);
}
.sidebar-create-option {
  min-height: 38px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #a8bcb7;
  text-align: left;
  font-size: .82rem;
  transition: color 160ms ease, background 160ms ease;
}
.sidebar-create-option:hover,
.sidebar-create-option:focus-visible { background: rgba(255,255,255,.055); color: #effffb; }
.sidebar-create-option.is-selected { background: rgba(85,239,196,.085); color: #dffff6; }
.sidebar-create-option > .icon { width: 16px; height: 16px; color: #75b8a8; }
.sidebar-create-option > .icon-check { width: 13px; height: 13px; justify-self: end; color: var(--mint); }
.sidebar-create-menu { scrollbar-width: thin; scrollbar-color: rgba(119,176,161,.36) transparent; }
.sidebar-create-menu::-webkit-scrollbar { width: 6px; }
.sidebar-create-menu::-webkit-scrollbar-track { background: transparent; }
.sidebar-create-menu::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(119,176,161,.32); }
.nav { min-height: 0; display: flex; flex-direction: column; gap: 3px; }
.nav-section { margin: 20px 11px 8px; color: #617c77; font-size: 0.64rem; font-weight: 500; letter-spacing: 0.13em; text-transform: uppercase; }
.nav-button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #8fa49f;
  text-align: left;
  font-weight: 400;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}
.nav-button:hover { background: rgba(255,255,255,.035); color: #dbe9e5; }
.nav-button:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; background: rgba(85,239,196,.07); color: #eafff9; }
.nav-button.active { background: rgba(85,239,196,.075); color: #ddfff5; box-shadow: inset 2px 0 var(--mint); }
.sidebar-create.active { box-shadow: inset 3px 0 #fff, 0 8px 22px rgba(85,239,196,.14); }
.nav-button.child { min-height: 36px; padding-left: 43px; color: var(--muted); font-size: 0.88rem; font-weight: 580; }
.nav-button.child.active { color: #dffbf3; background: rgba(85,239,196,.055); }
.recent-projects { min-height: 0; display: flex; flex-direction: column; margin-top: 15px; }
.recent-projects-heading {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #718b85;
  font-size: .69rem;
  font-weight: 500;
  letter-spacing: .09em;
  text-align: left;
}
.recent-projects-heading:hover { color: #b7cbc5; background: rgba(255,255,255,.025); }
.recent-projects-heading .icon { width: 15px; height: 15px; transition: transform 180ms ease; }
.recent-projects.collapsed .recent-projects-heading .icon { transform: rotate(-90deg); }
.recent-project-list {
  min-height: 0;
  max-height: clamp(132px, 43vh, 440px);
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 2px 3px 7px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(225,255,247,.17) transparent;
}
.recent-project-list::-webkit-scrollbar { width: 5px; }
.recent-project-list::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(225,255,247,.17); }
.recent-project-row { position: relative; min-width: 0; }
.recent-project { display: flex; align-items: center; gap: 8px; padding-left: 16px; padding-right: 37px; }
.recent-project > .icon-pin { width: 13px; height: 13px; color: var(--mint); }
.recent-project-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-project .project-spinner { margin-left: auto; }
.recent-project-menu-trigger {
  position: absolute;
  z-index: 2;
  top: 4px;
  right: 4px;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: rgba(8,27,33,.82);
  color: #a7bbb6;
  opacity: 0;
  transition: opacity 140ms ease, background 140ms ease, color 140ms ease;
}
.recent-project-menu-trigger .icon { width: 16px; height: 16px; }
.recent-project-row:hover .recent-project-menu-trigger,
.recent-project-row:focus-within .recent-project-menu-trigger,
.recent-project-row.menu-open .recent-project-menu-trigger { opacity: 1; }
.recent-project-menu-trigger:hover { color: var(--ink); background: rgba(255,255,255,.09); }
.recent-project-menu {
  position: absolute;
  z-index: 30;
  top: 36px;
  right: 3px;
  width: 170px;
  display: grid;
  gap: 3px;
  padding: 6px;
  border: 1px solid rgba(225,255,247,.14);
  border-radius: 11px;
  background: rgba(8,27,33,.97);
  box-shadow: 0 16px 38px rgba(0,0,0,.34);
  backdrop-filter: blur(20px);
}
.recent-project-menu.is-portal {
  position: fixed;
  z-index: 160;
  top: 0;
  right: auto;
  left: 0;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  visibility: hidden;
}
.recent-project-menu.is-portal.is-positioned { visibility: visible; }
.recent-project-menu-item {
  min-height: 35px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #c8d8d3;
  text-align: left;
  font-size: .82rem;
}
.recent-project-menu-item:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.recent-project-menu-item.danger { color: #efaaa6; }
.recent-project-menu-item .icon { width: 16px; height: 16px; }
.recent-project-delete-confirm { display: grid; gap: 8px; padding: 6px; color: #dbe8e4; font-size: .8rem; }
.recent-project-confirm-actions { display: flex; justify-content: flex-end; gap: 5px; }
.recent-project-empty { padding: 12px 10px; color: #617c77; font-size: .78rem; }
.project-spinner { width: 14px; height: 14px; flex: 0 0 auto; border: 2px solid var(--line); border-top-color: var(--lime); border-radius: 50%; animation: spin 800ms linear infinite; }
.project-spinner.large { width: 24px; height: 24px; border-width: 3px; border-color: var(--line); border-top-color: var(--lime); }
.activity-group { margin-bottom: 16px; }
.task-list { display: grid; gap: 10px; }
.task-row { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); text-align: left; color: var(--ink); }
.task-row:hover { border-color: rgba(225,255,247,.22); background: rgba(255,255,255,.03); }
.task-copy { display: grid; gap: 3px; }
.task-state-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--lime-soft); color: var(--mint); font-weight: 500; }
/* A job that did not finish is a neutral state, not an alarm: red is kept for destructive actions. */
.task-state-icon.failed { background: rgba(225,255,247,.06); color: var(--muted); }
.project-track-cover.project-track-failed-cover { display: grid; place-items: center; background: rgba(225,255,247,.04); }
.project-track-failed-cover .task-state-icon { width: 32px; height: 32px; border: 1px solid currentColor; background: transparent; }
.activity-task { min-width: 0; border-radius: 20px; background: var(--panel); overflow: hidden; }
.activity-task > .task-row { list-style: none; cursor: pointer; margin: 0; border: 0; border-radius: 20px; grid-template-columns: 28px minmax(0, 1fr) auto; }
.activity-task > summary::-webkit-details-marker { display: none; }
.activity-task > summary::marker { content: ""; }
.activity-task > summary:focus-visible { outline: 2px solid var(--mint); outline-offset: -2px; }
.activity-task .task-copy { min-width: 0; gap: 8px; }
.activity-task-title { overflow-wrap: anywhere; font-size: 17px; }
.activity-task-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; overflow-wrap: anywhere; }
.activity-task-stage { color: var(--mint); font-size: 13px; }
.activity-task-reason { color: var(--ink); line-height: 1.6; overflow-wrap: anywhere; }
.activity-task-status { display: flex; align-items: center; gap: 12px; }
.activity-task-status > .icon { width: 14px; height: 14px; }
.activity-task[open] .activity-task-status > .icon { transform: rotate(180deg); }
.activity-task-details { display: grid; gap: 16px; padding: 0 24px 24px 58px; }
.activity-task-times { display: flex; gap: 8px 24px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.activity-task-details h4 { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.activity-task-input { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow-y: auto; margin: 0; line-height: 1.6; }
@media (max-width: 600px) {
  .activity-task > .task-row { grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 16px; }
  .activity-task-status { grid-column: 2; justify-content: space-between; }
  .activity-task-details { padding: 0 16px 20px; }
}
.sidebar-spacer { flex: 1; }
.profile-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.profile-row .profile-nav { min-width: 0; }
.profile-copy { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-credit-link {
  min-width: 62px;
  min-height: 38px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0;
  padding: 4px 8px;
  border: 1px solid rgba(85, 239, 196, .12);
  border-radius: 10px;
  background: rgba(85, 239, 196, .055);
  color: #bcebdd;
  line-height: 1.1;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}
.sidebar-credit-link:hover { border-color: rgba(85, 239, 196, .28); background: rgba(85, 239, 196, .1); color: #e7fff8; }
.sidebar-credit-link.active { border-color: rgba(85, 239, 196, .34); background: rgba(85, 239, 196, .13); color: #effffb; box-shadow: inset 0 -2px rgba(85, 239, 196, .42); }
.sidebar-credit-link strong { font-size: .78rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.sidebar-credit-link span { color: #6f948a; font-size: .55rem; letter-spacing: .04em; text-transform: uppercase; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(85,239,196,.18); border-radius: 50%; color: var(--mint); background: rgba(85,239,196,.07); font-weight: 500; }

.main { min-width: 0; padding: 0 34px 132px; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; min-height: 86px; padding: 17px 2px; background: linear-gradient(180deg,rgba(7,23,28,.96) 0,rgba(7,23,28,.76) 68%,transparent 100%); }
.topbar h1 { margin-bottom: 4px; }
.breadcrumb { color: #6f8883; font-size: 0.72rem; letter-spacing: .035em; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.content { width: min(1180px, 100%); margin: 14px auto 0; }
.content.route-enter { animation: enter 260ms cubic-bezier(.22,.61,.36,1); }
.content.wide { width: min(1380px, 100%); }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border: 1px solid var(--line-strong); border-radius: 9px; background: rgba(255,255,255,.035); font-weight: 500; transition: border-color 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease; }
.button:hover:not(:disabled) { border-color: rgba(225,255,247,.28); background: rgba(255,255,255,.065); box-shadow: none; }
.button.primary { border-color: rgba(202,255,240,.26); background: #dcebe5; color: #082129; }
.button.accent { border-color: rgba(206,255,242,.36); background: #91e5cc; color: #08272d; box-shadow: 0 0 24px rgba(85,239,196,.08); }
.button.accent:hover:not(:disabled) { border-color: rgba(229,255,248,.64); background: #a1ead5; box-shadow: 0 0 30px rgba(85,239,196,.12); }
.button.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.button.danger { border-color: rgba(182,61,55,.32); color: var(--red); }
.button.small { min-height: 34px; padding: 6px 10px; border-radius: 8px; font-size: .8rem; }
.button.block { width: 100%; }
.icon { width: 18px; height: 18px; position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; }
.icon::before { content: none; }
.icon > svg { width: 100%; height: 100%; display: block; overflow: visible; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 14px 0 32px; }
.page-head p { max-width: 720px; margin-bottom: 0; }
.eyebrow { margin-bottom: 8px; color: var(--mint); font-size: .68rem; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; }
.hero { position: relative; overflow: hidden; padding: clamp(30px, 6vw, 70px); border: 1px solid var(--line); border-radius: var(--radius-xl); background: linear-gradient(135deg,rgba(12,42,49,.78),rgba(8,27,33,.74)); color: var(--ink); box-shadow: none; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 52% 90% at 100% 0,rgba(85,239,196,.07),transparent 72%); }
.hero h2 { max-width: 760px; font-size: clamp(2rem, 5vw, 4.6rem); line-height: .98; letter-spacing: -.065em; }
.hero p { max-width: 650px; color: var(--muted); font-size: 1.08rem; }
.hero-actions { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section { margin-top: 30px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.section-title h2, .section-title h3 { margin-bottom: 0; }

.panel, .card, .list-row {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: none;
}
.panel { padding: 19px; border-radius: var(--radius-lg); }
.panel, .card {
  border-color: transparent;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .038), rgba(255, 255, 255, .014)),
    rgba(7, 25, 30, .70);
  box-shadow: inset 0 1px rgba(255, 255, 255, .05);
}
.panel-head, .row-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.panel-head { margin-bottom: 13px; }
.panel-head h3 { margin: 0; }
.card { padding: 20px; border-radius: var(--radius-lg); }
.card.interactive { transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.card.interactive:hover { transform: translateY(-1px); border-color: transparent; background: rgba(255,255,255,.045); box-shadow: inset 0 1px rgba(255,255,255,.065); }
.card-icon { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.025); color: var(--mint); }
.card p { margin-bottom: 13px; font-size: .9rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.status { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 5px 8px; border-radius: 999px; font-size: .68rem; line-height: 1; font-weight: 500; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }
.status.available, .status.ready, .status.succeeded, .status.deliverable { color: #8be5cb; background: rgba(85,239,196,.09); }
.status.limited, .status.running, .status.validating { color: #86d9ee; background: rgba(89,204,232,.09); }
.status.experimental, .status.partial { color: #dec187; background: rgba(214,169,93,.10); }
.status.unavailable, .status.failed, .status.rejected, .status.blocked { color: #efa29e; background: rgba(231,124,121,.10); }
.status.neutral, .status.unreviewed { color: #91a6a1; background: rgba(255,255,255,.045); }

.tabs, .filters, .chips, .inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tabs { margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tab { min-height: 43px; padding: 8px 15px; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--muted); font-weight: 500; }
.tab.active { border-bottom-color: var(--mint); color: #e9f8f3; }
.filter, .chip { min-height: 32px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.025); color: var(--muted); font-size: .75rem; font-weight: 400; }
.filter:hover, .chip:hover { border-color: rgba(225,255,247,.22); color: #d8e8e3; }
.filter.active, .chip.active { border-color: rgba(85,239,196,.26); background: rgba(85,239,196,.08); color: #cffff0; }
.inline-actions { margin-top: 18px; }

.list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.list-row { width: 100%; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 15px 8px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; backdrop-filter: none; }
button.list-row:hover { border-color: var(--line); background: rgba(255,255,255,.025); }
.thumbnail { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid rgba(225,255,247,.12); border-radius: 12px; background: linear-gradient(145deg,rgba(89,204,232,.45),rgba(147,135,255,.38)); color: #ecf9f5; font-weight: 500; }
.thumbnail.lime { color: #eafff8; background: linear-gradient(145deg,rgba(85,239,196,.46),rgba(89,204,232,.27)); }
.thumbnail.coral { background: linear-gradient(145deg,rgba(201,125,131,.42),rgba(147,135,255,.30)); }
.row-title { overflow: hidden; margin: 0; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.meta { color: var(--muted); font-size: .76rem; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 3px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field { min-width: 0; display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .77rem; font-weight: 500; }
input, textarea, select {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255,255,255,.032);
  padding: 11px 12px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
input:focus, textarea:focus, select:focus { border-color: transparent; background: rgba(255,255,255,.052); outline: 0; box-shadow: inset 0 -1px rgba(85,239,196,.42), 0 12px 30px rgba(0,0,0,.09); }
select:not([multiple]) {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px;
  background-color: rgba(255,255,255,.035);
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(207, 255, 241, .72) 50%),
    linear-gradient(135deg, rgba(207, 255, 241, .72) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  cursor: pointer;
}
select:not([multiple]):hover { border-color: transparent; background-color: rgba(255,255,255,.055); }
select option { background: #0b2229; color: #eef8f4; }

.mula-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.mula-select-trigger {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .052), rgba(255, 255, 255, .018)),
    rgba(8, 28, 34, .74);
  color: var(--ink);
  text-align: left;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.mula-select-trigger:hover:not(:disabled) {
  border-color: transparent;
  background:
    linear-gradient(135deg, rgba(85, 239, 196, .07), rgba(89, 204, 232, .025)),
    rgba(8, 30, 36, .82);
}

.mula-select.is-open .mula-select-trigger,
.mula-select-trigger:focus-visible {
  border-color: transparent;
  box-shadow: inset 0 -1px rgba(85, 239, 196, .45), 0 10px 30px rgba(0, 0, 0, .15), inset 0 1px rgba(255, 255, 255, .05);
}

.mula-select-value {
  min-width: 0;
  overflow: hidden;
  color: #edf8f4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mula-select-chevron {
  width: 9px;
  height: 9px;
  justify-self: center;
  border-right: 1.5px solid rgba(191, 234, 224, .78);
  border-bottom: 1.5px solid rgba(191, 234, 224, .78);
  transform: translateY(-2px) rotate(45deg);
  transition: transform .18s ease, border-color .18s ease;
}

.mula-select.is-open .mula-select-chevron {
  border-color: var(--mint);
  transform: translateY(2px) rotate(225deg);
}

.mula-select-menu {
  position: fixed;
  z-index: 240;
  display: grid;
  align-content: start;
  gap: 3px;
  margin: 0;
  padding: 7px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(148, 222, 204, .19);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(20, 51, 57, .97), rgba(6, 24, 30, .985) 58%, rgba(8, 32, 38, .98)),
    #081d23;
  color: var(--ink);
  box-shadow: 0 26px 74px rgba(0, 0, 0, .48), inset 0 1px rgba(255, 255, 255, .07);
  -webkit-backdrop-filter: blur(28px) saturate(138%);
  backdrop-filter: blur(28px) saturate(138%);
  scrollbar-width: thin;
  scrollbar-color: rgba(85, 239, 196, .42) transparent;
}

.mula-select-menu:not(.is-positioned) { visibility: hidden; }
.mula-select-menu[hidden] { display: none; }
.mula-select-menu.is-positioned { animation: mula-select-in .14s ease-out both; }
.mula-select-menu[data-placement="top"].is-positioned { transform-origin: bottom center; }
.mula-select-menu[data-placement="bottom"].is-positioned { transform-origin: top center; }
.mula-select-menu::-webkit-scrollbar { width: 7px; }
.mula-select-menu::-webkit-scrollbar-track { margin: 7px 0; background: transparent; }
.mula-select-menu::-webkit-scrollbar-thumb { border: 2px solid transparent; background: rgba(85, 239, 196, .42) padding-box; }

.mula-select-option {
  width: 100%;
  min-height: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #c8dbd6;
  text-align: left;
  transition: color .14s ease, background .14s ease, border-color .14s ease;
}

.mula-select-option:hover:not(:disabled),
.mula-select-option:focus-visible {
  border-color: rgba(85, 239, 196, .10);
  outline: 0;
  background: linear-gradient(90deg, rgba(85, 239, 196, .11), rgba(89, 204, 232, .045));
  color: #f1fff9;
}

.mula-select-option.is-selected {
  border-color: rgba(85, 239, 196, .15);
  background: linear-gradient(90deg, rgba(85, 239, 196, .14), rgba(89, 204, 232, .055));
  color: #bcffe9;
}

.mula-select-option-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mula-select-check {
  justify-self: center;
  color: var(--mint);
  font-size: .82rem;
  line-height: 1;
  text-shadow: 0 0 16px rgba(85, 239, 196, .48);
}

.mula-select.is-disabled .mula-select-trigger { background: var(--paper-deep); color: var(--muted); }

@keyframes mula-select-in {
  from { opacity: 0; transform: translateY(-4px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
textarea { min-height: 116px; resize: none; line-height: 1.55; }
textarea.code { min-height: 320px; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; }
input:disabled, textarea:disabled, select:disabled { background: var(--paper-deep); color: var(--muted); }
.check-list { display: grid; gap: 9px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); }
.check-row input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); }
.check-row span { min-width: 0; }

.notice { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,255,255,.025); color: var(--muted); font-size: .84rem; }
.notice.warning { border-color: rgba(214,169,93,.20); background: rgba(214,169,93,.07); color: #d9bf8b; }
.notice.danger { border-color: rgba(231,124,121,.20); background: rgba(231,124,121,.07); color: #eaa09d; }
.notice.success { border-color: rgba(85,239,196,.18); background: rgba(85,239,196,.06); color: #9ee7d2; }

.chat { min-height: 330px; display: flex; flex-direction: column; gap: 12px; padding: 5px; }
.bubble { width: fit-content; max-width: 62%; padding: 11px 13px; border: 1px solid rgba(89,204,232,.20); border-radius: 12px 12px 12px 4px; background: linear-gradient(135deg, rgba(89,204,232,.18), rgba(147,135,255,.11)); color: #e7f5f1; font-size: .88rem; white-space: pre-wrap; }
.bubble.user { align-self: flex-end; border-radius: 12px 12px 4px 12px; border-color: rgba(85,239,196,.28); background: linear-gradient(135deg, rgba(85,239,196,.26), rgba(89,204,232,.16)); color: #f0fff9; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-top: 14px; }
.composer textarea { min-height: 74px; }
.live-brief { position: sticky; top: 105px; }
.brief-line { display: flex; gap: 9px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .84rem; }
.brief-line:last-child { border-bottom: 0; }

.steps { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; overflow-x: hidden; padding: 3px 1px 18px; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.step { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; color: var(--muted); font-size: .72rem; font-weight: 500; }
.step::after { content: "→"; color: var(--line-strong); }
.step:last-child::after { display: none; }
.step-dot { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(255,255,255,.025); }
.step.active { color: var(--ink); }
.step.active .step-dot { border-color: rgba(85,239,196,.45); background: rgba(85,239,196,.11); color: var(--mint); }
.step.done .step-dot { border-color: rgba(85,239,196,.18); background: rgba(85,239,196,.07); color: #9be3cf; }

.prompt-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.prompt-box { padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,255,255,.025); }
.prompt-box .language { margin-bottom: 8px; color: var(--muted); font-size: .68rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; }
.prompt-box p { margin: 0; color: var(--ink); white-space: pre-wrap; }
.prompt-box textarea { min-height: 150px; }
.prompt-output-box { min-height: 210px; }

.player { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(5,18,23,.76); color: var(--ink); }
.player-body { padding: 18px; }
.player p, .player .meta { color: rgba(255,255,255,.62); }
.player audio { width: 100%; margin-top: 13px; accent-color: var(--lime); }
.wave { height: 56px; display: flex; align-items: center; gap: 3px; margin: 15px 0; }
.wave span { flex: 1; min-width: 2px; border-radius: 4px; background: linear-gradient(var(--mint), rgba(89,204,232,.48)); }
.wave-editor { display: grid; gap: 12px; margin: 4px 0 20px; }
.wave-editor audio { width: 100%; accent-color: var(--lime); }
.wave-editor-canvas {
  display: block;
  width: 100%;
  height: 138px;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: ew-resize;
  touch-action: none;
  background: rgba(4,17,22,.82);
}
.wave-editor-canvas:focus { outline: 1px solid rgba(85,239,196,.52); outline-offset: 2px; }
.wave-editor-copy { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
.wave-editor-copy { align-items: center; }
.wave-editor-copy > .meta { flex-basis: 100%; }
.strength-control { display: grid; gap: 9px; padding: 12px 0; }
.compact-fields { margin-top: 12px; }
.candidate-card { min-width: 0; overflow: hidden; }
.candidate-card .candidate-top { padding: 18px 18px 0; }
.candidate-card .candidate-actions { display: flex; flex-wrap: wrap; gap: 7px; padding: 13px 18px 18px; }
.candidate-card.adopted { border-color: rgba(85,239,196,.32); box-shadow: inset 0 2px var(--mint); }
.lineage { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lineage-node { padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.025); font-size: .78rem; font-weight: 500; }
.lineage-arrow { color: var(--muted); }

.progress { height: 5px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.06); }
.progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--aqua)); transition: width 260ms ease; }
.timeline { position: relative; display: grid; gap: 16px; padding-left: 24px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 7px; bottom: 7px; width: 1px; background: var(--line-strong); }
.timeline-item { position: relative; }
.timeline-item::before { content: ""; position: absolute; left: -22px; top: 5px; width: 9px; height: 9px; border: 2px solid var(--paper); border-radius: 50%; background: var(--blue); }

.upload { display: grid; place-items: center; min-height: 210px; padding: 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: rgba(255,255,255,.02); text-align: center; }
.upload.drag { border-color: rgba(85,239,196,.4); background: rgba(85,239,196,.055); }
.upload input { position: absolute; opacity: 0; pointer-events: none; }
.artifact-grid { display: grid; gap: 9px; }
.artifact-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; }
.artifact-row input { width: 18px; height: 18px; }

.code-panel { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: rgba(4,17,22,.88); color: #dceae5; }
.code-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 10px 13px; border-bottom: 1px solid var(--line); color: #839994; font-size: .74rem; }
.code-panel pre { max-height: 380px; overflow: auto; margin: 0; padding: 14px; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.code-panel textarea { border: 0; border-radius: 0; background: transparent; color: #e9f0df; }

.empty-state { min-height: 250px; display: grid; place-items: center; align-content: center; gap: 5px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,255,255,.016); text-align: center; }
.empty-state .icon { width: 38px; height: 38px; border: 1px solid rgba(85,239,196,.16); border-radius: 11px; background: rgba(85,239,196,.07); color: var(--mint); }
.empty-state p { max-width: 460px; }
.blocked-hero { padding: 30px; border: 1px solid rgba(231,124,121,.18); border-radius: var(--radius-xl); background: rgba(231,124,121,.045); }
.blocked-hero .big-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 18px; border: 1px solid rgba(231,124,121,.16); border-radius: 14px; background: rgba(231,124,121,.08); color: var(--red); font-size: 1.4rem; }

.mobile-bar { display: none; }
.mobile-bar:has(> :nth-child(5)) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.toast-region { position: fixed; z-index: 120; right: 18px; bottom: calc(var(--dock-space, 0px) + 18px); display: grid; gap: 8px; width: min(360px, calc(100vw - 36px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(8,28,34,.95); color: var(--ink); box-shadow: 0 18px 48px rgba(0,0,0,.3); backdrop-filter: blur(18px); animation: toast 180ms ease-out; }
.toast.error { border-color: rgba(231,124,121,.28); background: rgba(54,25,27,.95); }
.toast-message { flex: 1; min-width: 0; }
.toast-action { flex: none; margin: -3px -4px -3px 4px; padding: 3px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.toast-action:hover, .toast-action:focus-visible { background: rgba(255,255,255,.08); }
.loading { min-height: 50vh; display: grid; place-items: center; color: var(--muted); }
.spinner { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin 800ms linear infinite; }
.account-identity { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.account-avatar { width: 48px; height: 48px; font-size: 1.05rem; }
.profile-setup-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  background: transparent;
}
.profile-setup-card {
  width: min(520px, 100%);
  padding: clamp(28px, 6vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(8,28,34,.78);
  box-shadow: 0 28px 80px rgba(0,0,0,.24);
  backdrop-filter: blur(24px);
}
.profile-setup-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 46px; font-size: 1.1rem; font-weight: 500; }
.profile-setup-card h1 { margin-bottom: 12px; font-size: clamp(2rem, 7vw, 3.4rem); }
.profile-setup-card > p { margin-bottom: 30px; }
.profile-setup-submit { margin: 24px 0 10px; }

@keyframes enter { from { transform: translateY(5px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toast { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1023px) {
  :root { --side: 84px; }
  .sidebar { padding: 20px 12px; }
  .brand { justify-content: center; }
  .brand > span:not(.brand-mark), .nav-button > span:not(.icon), .nav-section, .profile-row .profile-copy { display: none; }
  .nav-button { justify-content: center; padding: 10px; }
  .nav-button.child { display: none; }
  .recent-projects { display: none; }
  .sidebar-create-group { margin: 24px 0 18px; }
  .sidebar-create { padding: 8px; }
  .sidebar-create span:not(.icon) { display: none; }
  .sidebar-create .icon-chevron-down { display: none; }
  .sidebar-create-menu { top: 0; left: calc(100% + 10px); width: 224px; max-height: min(64vh, 430px); }
  .profile-row .nav-button { display: flex; }
  .profile-row { grid-template-columns: 1fr; justify-items: center; }
  .profile-row .profile-nav { width: 44px; }
  .sidebar-credit-link { width: 48px; min-width: 48px; }
  .sidebar-credit-link span { display: none; }
  .main { padding-inline: 22px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .creation-compose-pane { padding-top: 10px; }
  .creation-compose-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .creation-compose-head .steps { transform-origin: left center; }
  .ai-design-state { display: none; }
  .ai-design-chat .bubble { max-width: 92%; }
  .creation-results-pane { min-height: 340px; }
  /* leave room so the fixed player dock never covers the last list items */
  .creation-results-list { padding-bottom: calc(var(--bottom) + 88px + env(safe-area-inset-bottom)); }
  body { padding-bottom: env(safe-area-inset-bottom); }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main { padding: 0 15px calc(var(--bottom) + 112px + env(safe-area-inset-bottom)); }
  .topbar { min-height: 72px; padding: 12px 1px; }
  .topbar h1 { font-size: 1.45rem; }
  .breadcrumb { display: none; }
  .top-actions .desktop-only { display: none; }
  .mobile-bar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); min-height: var(--bottom); padding: 7px 6px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(6,22,27,.9); backdrop-filter: blur(22px); }
  .mobile-nav-button { display: grid; justify-items: center; align-content: center; gap: 3px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: .65rem; font-weight: 500; }
  .mobile-nav-button.active { color: #e8fbf5; background: rgba(85,239,196,.08); }
  .page-head { display: block; margin-bottom: 18px; }
  .page-head > .status { margin-top: 8px; }
  .hero { padding: 30px 22px; border-radius: 22px; }
  .hero h2 { font-size: 2.35rem; }
  .grid-2, .grid-3, .grid-4, .form-grid, .prompt-pair { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .panel, .card { padding: 16px; border-radius: 16px; }
  .list-row { grid-template-columns: auto minmax(0, 1fr); }
  .list-row > :last-child { grid-column: 2; justify-self: start; }
  .thumbnail { width: 46px; height: 46px; }
  .composer { grid-template-columns: 1fr; }
  .composer .button { width: 100%; }
  .live-brief { position: static; }
  .chat { min-height: 260px; }
  .inline-actions > .button { flex: 1 1 auto; }
  .account-identity { grid-template-columns: auto minmax(0, 1fr); }
  .account-identity .status { grid-column: 2; }
  .candidate-grid { display: grid; grid-template-columns: minmax(0, 1fr); overflow-x: hidden; padding: 2px 1px 14px; }
  .candidate-grid > * { min-width: 0; }
  .toast-region { bottom: calc(max(var(--dock-space, 0px), var(--bottom)) + 14px); }
}

@media (max-width: 379px) {
  .main { padding-inline: 11px; }
  .topbar { min-height: 64px; }
  .hero h2 { font-size: 2rem; }
  .button { padding-inline: 11px; }
  .status { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  #ambient-canvas { opacity: .72; }
}

/* Custom playback surfaces: the browser audio element stays hidden and the
   same controls are used inline and in the persistent bottom dock. */
.audio-engine,
.audio-metadata { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.inline-player {
  display: grid;
  grid-template-columns: 38px auto minmax(90px, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-top: 12px;
  padding: 7px 10px 7px 7px;
  border: 1px solid rgba(225,255,247,.08);
  border-radius: 999px;
  background: linear-gradient(100deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 8px 20px rgba(0,0,0,.1);
}
.inline-player-toggle,
.playback-toggle {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mint), var(--aqua));
  color: #05262c;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(85,239,196,.15), inset 0 1px rgba(255,255,255,.3);
}
.inline-player-toggle { width: 34px; height: 34px; }
.inline-player-toggle .icon { width: 15px; height: 15px; }
.inline-player time,
.playback-dock time { color: var(--muted); font: 11px/1 var(--mono); white-space: nowrap; }
.mula-range {
  --range-progress: 0%;
  --range-thumb-size: 14px;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  accent-color: var(--mint);
  appearance: none;
  -webkit-appearance: none;
  background:
    linear-gradient(90deg, var(--mint) 0 var(--range-progress), rgba(225,255,247,.16) var(--range-progress) 100%)
    center / calc(100% - var(--range-thumb-size)) 4px no-repeat;
}
.mula-range::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
}
.mula-range::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 0;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: #dffff5;
  box-shadow: 0 0 0 3px rgba(85,239,196,.12), 0 2px 8px rgba(0,0,0,.28);
}
.mula-range::-moz-range-track {
  width: calc(100% - var(--range-thumb-size));
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
}
.mula-range::-moz-range-progress {
  height: 4px;
  background: transparent;
}
.mula-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #dffff5;
  box-shadow: 0 0 0 3px rgba(85,239,196,.12), 0 2px 8px rgba(0,0,0,.28);
}
.mula-range:focus-visible { outline: none; }
.mula-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(85,239,196,.2), 0 2px 10px rgba(0,0,0,.3);
}
.mula-range:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(85,239,196,.2), 0 2px 10px rgba(0,0,0,.3);
}
.mula-range.is-live {
  cursor: wait;
  opacity: 1;
  background: linear-gradient(90deg, rgba(85,239,196,.12), var(--mint), var(--aqua), rgba(85,239,196,.12)) center / 220% 4px no-repeat;
  animation: playback-live-flow 1.35s linear infinite;
}
.mula-range.is-live::-webkit-slider-thumb { opacity: 0; }
.mula-range.is-live::-moz-range-thumb { opacity: 0; }
@keyframes playback-live-flow { to { background-position: -120% center; } }
.playback-dock {
  position: fixed;
  z-index: 80;
  left: max(24px, calc(var(--side) + 24px));
  right: 24px;
  bottom: 18px;
  display: grid;
  grid-template-columns: 48px minmax(160px, 240px) 40px auto minmax(140px, 1fr) auto 22px minmax(80px, 120px);
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 10px 16px 10px 10px;
  border: 1px solid transparent;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(16,46,54,.8), rgba(5,20,26,.84)) padding-box, linear-gradient(110deg, rgba(255,255,255,.2), rgba(225,255,247,.06) 38%, rgba(89,204,232,.16) 78%, rgba(255,255,255,.1)) border-box;
  box-shadow: inset 0 1px rgba(255,255,255,.13), 0 24px 60px rgba(0,0,0,.32);
  -webkit-backdrop-filter: blur(30px) saturate(145%);
  backdrop-filter: blur(30px) saturate(145%);
}
.playback-cover { width: 48px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 15px; background: linear-gradient(145deg, rgba(85,239,196,.35), rgba(89,204,232,.2) 52%, rgba(147,135,255,.35)); color: var(--mint); box-shadow: inset 0 1px rgba(255,255,255,.18), 0 0 24px rgba(85,239,196,.1); }
.playback-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.playback-copy { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.playback-copy strong, .playback-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playback-copy strong { color: var(--ink); font-size: .84rem; font-weight: 500; }
.playback-copy span { color: var(--muted); font-size: .7rem; }
.playback-toggle { width: 38px; height: 38px; }
.playback-toggle .icon { width: 16px; height: 16px; }
.playback-volume-icon { color: var(--muted); display: grid; place-items: center; }
.playback-volume-icon .icon { width: 16px; height: 16px; }
@media (max-width: 880px) {
  .playback-dock { left: 14px; right: 14px; grid-template-columns: 42px minmax(0, 1fr) 38px auto minmax(100px, 1fr) auto; gap: 9px; }
  .playback-volume-icon, .playback-volume { display: none; }
  .playback-cover { width: 42px; height: 42px; }
}
@media (max-width: 560px) {
  .inline-player { grid-template-columns: 34px auto minmax(70px, 1fr) auto; gap: 7px; padding-right: 8px; }
  .playback-dock { bottom: calc(var(--bottom) + 10px); min-height: 62px; padding: 8px 10px 8px 8px; border-radius: 20px; grid-template-columns: 36px minmax(0, 1fr) 34px; }
  .playback-cover { width: 36px; height: 36px; border-radius: 11px; }
  .playback-current, .playback-duration, .playback-dock > .playback-progress { display: none; }
}

.generation-status-dock {
  position: fixed;
  z-index: 79;
  right: 24px;
  bottom: 24px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
  width: min(390px, calc(100vw - 48px));
  min-height: 66px;
  padding: 10px 10px 10px 12px;
  border: 1px solid rgba(225,255,247,.10);
  border-radius: 21px;
  background: linear-gradient(135deg, rgba(17,48,55,.86), rgba(6,22,28,.91));
  box-shadow: inset 0 1px rgba(255,255,255,.10), 0 20px 54px rgba(0,0,0,.30);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
}
.generation-status-dock[hidden] { display: none !important; }
body:has(.playback-dock:not([hidden])) .generation-status-dock { bottom: calc(var(--dock-space, 82px) + 24px); }
.generation-status-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--mint);
  background: rgba(85,239,196,.09);
}
.generation-status-mark .icon { width: 18px; height: 18px; }
.generation-status-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(225,255,247,.20);
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: generation-status-spin .85s linear infinite;
}
.generation-status-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.generation-status-copy strong,
.generation-status-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.generation-status-copy strong { color: var(--ink); font-size: .84rem; font-weight: 600; }
.generation-status-copy small { color: var(--muted); font-size: .69rem; }
.generation-status-action,
.generation-status-dismiss {
  border: 0;
  color: var(--ink);
  cursor: pointer;
  background: rgba(225,255,247,.07);
}
.generation-status-action { min-height: 34px; padding: 0 13px; border-radius: 999px; font-size: .74rem; }
.generation-status-dismiss { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 50%; line-height: 0; }
.generation-status-dismiss > .icon { width: 15px; height: 15px; margin: 0; }
.generation-status-dock[data-phase="completed"] .generation-status-mark { color: #05262c; background: var(--mint); }
.generation-status-dock[data-phase="failed"] .generation-status-mark { color: var(--danger); background: rgba(231,124,121,.11); }
@keyframes generation-status-spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
  .generation-status-dock { left: 14px; right: 14px; bottom: calc(var(--bottom) + 12px); width: auto; }
  body:has(.playback-dock:not([hidden])) .generation-status-dock { bottom: calc(max(var(--dock-space, 0px), var(--bottom)) + 12px); }
}

.lyrics-review {
  display: block;
  width: 100%;
  min-height: 260px;
  margin: 0;
  padding: 18px;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(4,17,22,.82);
  color: var(--ink);
  font: 500 14px/1.7 var(--mono);
}

.lyrics-review:focus-visible {
  outline: 1px solid var(--mint);
  outline-offset: 3px;
}

/* Discover-inspired workspace ------------------------------------------------ */
.icon-search::before { content: none; }

.top-search {
  width: min(230px, 25vw);
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: var(--muted);
  transition: border-color .2s ease, background .2s ease;
}

.top-search:focus-within {
  border-color: rgba(85, 239, 196, .28);
  background: rgba(255, 255, 255, .055);
}

.top-search input {
  min-width: 0;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: .78rem;
}

.top-search input:focus { border: 0; background: transparent; box-shadow: none; }

.discover-workspace { padding: 0 0 70px; }

.discover-create {
  position: relative;
  isolation: isolate;
  width: min(1080px, 100%);
  margin: clamp(24px, 5vh, 56px) auto clamp(58px, 8vh, 92px);
  text-align: center;
}

.mula-aura-canvas {
  position: absolute;
  z-index: 0;
  top: -24%;
  left: -18%;
  width: 136%;
  height: 142%;
  pointer-events: none;
  opacity: .94;
}

.discover-create > :not(.mula-aura-canvas) { position: relative; z-index: 1; }

.discover-create::before {
  content: none;
}

.discover-kicker {
  margin-bottom: 12px;
  color: var(--mint);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.discover-create h2 {
  margin-bottom: 24px;
  font-size: clamp(2.25rem, 4.6vw, 4.25rem);
  line-height: .98;
  letter-spacing: -.06em;
}

.discover-composer {
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(225, 255, 247, .14);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(14, 38, 44, .88), rgba(7, 24, 29, .90));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .25), inset 0 1px rgba(255, 255, 255, .025);
  text-align: left;
  backdrop-filter: blur(28px);
}

.discover-create-input {
  min-height: 92px;
  padding: 8px 9px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.6;
  resize: none;
  box-shadow: none;
}

.discover-create-input::placeholder { color: #68817c; }
.discover-create-input:focus { border: 0; background: transparent; box-shadow: none; }
.discover-section { margin-top: 54px; }

.discover-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.discover-section-head .eyebrow { margin-bottom: 5px; }
.discover-section-head h2 { margin-bottom: 0; font-size: clamp(1.5rem, 2.3vw, 2.25rem); }

.project-discover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-loading-grid { min-height: 250px; }
.project-skeleton {
  min-width: 0;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(24, 30, 32, .58);
  box-shadow: inset 0 1px rgba(255, 255, 255, .028);
}
.project-skeleton-cover,
.project-skeleton-copy i {
  display: block;
  background: linear-gradient(100deg, rgba(255,255,255,.035) 20%, rgba(85,239,196,.09) 42%, rgba(255,255,255,.035) 64%);
  background-size: 240% 100%;
  animation: project-skeleton-shimmer 1.8s ease-in-out infinite;
}
.project-skeleton-cover { aspect-ratio: 1.72 / 1; }
.project-skeleton-copy { display: grid; gap: 10px; padding: 18px; }
.project-skeleton-copy i { height: 11px; border-radius: 999px; }
.project-skeleton-copy i:first-child { width: 64%; }
.project-skeleton-copy i:nth-child(2) { width: 42%; }
.project-skeleton-copy i:last-child { width: 78%; }
@keyframes project-skeleton-shimmer { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }

.project-discover-card {
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(10, 29, 35, .68);
  color: var(--ink);
  text-align: left;
  backdrop-filter: blur(18px);
  transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}

.project-discover-card[hidden] { display: none; }

.project-discover-card:hover {
  transform: translateY(-3px);
  border-color: rgba(225, 255, 247, .20);
  background: rgba(12, 34, 40, .82);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .22);
}

.project-cover {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  aspect-ratio: 1.72 / 1;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background-position: center;
  background-size: cover;
  background-image: linear-gradient(135deg, rgba(8, 27, 33, .22), rgba(8, 27, 33, .58));
  transition: background-image .45s ease;
}

.project-cover::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 12, 15, .08), rgba(3, 17, 20, .56));
}

.project-cover::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .20;
  background-image: repeating-radial-gradient(circle at 30% 20%, rgba(255,255,255,.7) 0 1px, transparent 1px 6px);
  background-size: 11px 11px;
  mix-blend-mode: soft-light;
}

.project-cover-0 { background-color: #0b2b2d; }
.project-cover-1 { background-color: #10242e; }
.project-cover-2 { background-color: #161f35; }
.project-cover-3 { background-color: #2b1e29; }

.project-cover[data-project-cover-loaded="true"] {
  background-color: #0b252b;
}

.project-cover-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(43%, 154px);
  aspect-ratio: 1;
  border: 1px solid rgba(229, 255, 248, .18);
  border-radius: 17px;
  object-fit: cover;
  box-shadow: 0 22px 46px rgba(0, 0, 0, .42), 0 0 0 1px rgba(255, 255, 255, .035);
  transform: translate(-50%, -50%) rotate(-2deg) scale(.97);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.project-discover-card:hover .project-cover-orbit {
  box-shadow: 0 26px 54px rgba(0, 0, 0, .48), 0 0 0 1px rgba(255, 255, 255, .055);
  transform: translate(-50%, -50%) rotate(0) scale(1.02);
}

.project-cover-action {
  position: absolute;
  right: 13px;
  bottom: 13px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  background: rgba(5, 20, 24, .62);
  color: #eafff8;
  backdrop-filter: blur(12px);
  transition: transform .2s ease, background .2s ease;
}

.project-discover-card:hover .project-cover-action { transform: scale(1.06); background: rgba(85, 239, 196, .18); }

.project-card-copy { min-width: 0; display: grid; gap: 6px; padding: 15px 16px 17px; }
.project-card-top { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-card-top .row-title { font-size: .96rem; }
.project-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; color: #6f8883; font-size: .7rem; }

.discover-empty {
  min-height: 150px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(10, 29, 35, .46);
}

.discover-empty h3, .discover-empty p { margin-bottom: 3px; }
.discover-empty-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: rgba(85, 239, 196, .09); color: var(--mint); }

.capability-discover-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.capability-discover-card {
  min-width: 0;
  display: grid;
  gap: 13px;
  padding: 10px 10px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(10, 29, 35, .52);
  color: var(--ink);
  text-align: left;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.capability-discover-card:hover { transform: translateY(-2px); border-color: rgba(225, 255, 247, .20); background: rgba(12, 35, 41, .76); }

.capability-art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1.38 / 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 13px;
  background-color: #0b252b;
}

.capability-art::before, .capability-art::after { content: ""; position: absolute; border-radius: 50%; filter: blur(1px); }
.capability-art::before { width: 70%; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 0 0 15px rgba(255,255,255,.025), 0 0 0 36px rgba(255,255,255,.018); }
.capability-art::after { width: 38%; aspect-ratio: 1; background: rgba(255,255,255,.05); }
.capability-art-0 { background: radial-gradient(circle at 70% 25%, rgba(85,239,196,.38), transparent 46%), #0a2b2d; }
.capability-art-1 { background: radial-gradient(circle at 30% 70%, rgba(89,204,232,.40), transparent 48%), #10242e; }
.capability-art-2 { background: radial-gradient(circle at 68% 68%, rgba(147,135,255,.40), transparent 46%), #161f35; }
.capability-art-3 { background: radial-gradient(circle at 28% 25%, rgba(201,125,131,.38), transparent 45%), #2b1e29; }
.capability-art-symbol { position: relative; z-index: 2; color: #edfff9; font-size: 1.45rem; text-shadow: 0 5px 24px rgba(0,0,0,.34); }

.capability-card-copy { min-width: 0; display: grid; gap: 6px; padding: 0 4px; }
.capability-card-copy strong { font-size: .96rem; }
.capability-card-copy > span:not(.capability-card-link) { min-height: 3.2em; color: var(--muted); font-size: .77rem; line-height: 1.55; }
.capability-card-link { margin-top: 3px; color: #9fe8d4; font-size: .72rem; }

@media (min-width: 1024px) {
  :root { --side: 248px; }
  .sidebar { padding-inline: 14px; }
  .nav-button.active { border-radius: 999px; box-shadow: none; }
  .content { width: min(1320px, 100%); }
}

@media (max-width: 1120px) {
  .project-discover-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capability-discover-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
  .top-search { display: none; }
  .discover-section-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 767px) {
  .discover-workspace { padding-bottom: 24px; }
  .discover-create { margin: 20px auto 54px; }
  .discover-create::before { width: 120vw; height: 280px; }
  .discover-create h2 { margin-bottom: 18px; font-size: 2.45rem; }
  .discover-section { margin-top: 42px; }
  .project-discover-grid { grid-template-columns: 1fr; }
  .capability-discover-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .capability-art { aspect-ratio: 1.18 / 1; }
  .discover-empty { grid-template-columns: auto minmax(0, 1fr); }
  .discover-empty > .button { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 479px) {
  .discover-create h2 { font-size: 2.05rem; }
  .capability-discover-grid { grid-template-columns: 1fr; }
  .capability-discover-card { grid-template-columns: 104px minmax(0, 1fr); align-items: center; padding: 9px; }
  .capability-art { aspect-ratio: 1; }
  .capability-card-copy > span:not(.capability-card-link) { min-height: 0; }
}

/* Glass / motion refinement --------------------------------------------------
   Keep this layer markup-agnostic: it refines the existing workspace, project
   cards, prompt review, and audio surfaces without introducing new controls. */
:root {
  --glass-fill: rgba(11, 32, 39, .48);
  --glass-fill-deep: rgba(5, 19, 25, .66);
  --glass-edge: rgba(225, 255, 247, .105);
  --glass-edge-soft: rgba(225, 255, 247, .065);
  --glass-highlight: rgba(255, 255, 255, .10);
  --glass-shadow: 0 20px 54px rgba(0, 0, 0, .19);
}

.panel,
.card,
.task-row,
.notice,
.prompt-box,
.project-discover-card,
.capability-discover-card,
.discover-empty,
.upload,
.empty-state,
.profile-setup-card,
.code-panel {
  border: 1px solid transparent;
  background:
    linear-gradient(140deg, rgba(18, 48, 55, .53), rgba(7, 24, 30, .36) 54%, rgba(8, 29, 35, .48)) padding-box,
    linear-gradient(118deg, rgba(255, 255, 255, .16), rgba(225, 255, 247, .055) 34%, rgba(89, 204, 232, .12) 72%, rgba(255, 255, 255, .08)) border-box;
  box-shadow: inset 0 1px var(--glass-highlight), inset 0 -1px rgba(0, 0, 0, .16), var(--glass-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(132%);
  backdrop-filter: blur(24px) saturate(132%);
}

.panel,
.card,
.task-row,
.project-discover-card,
.capability-discover-card,
.discover-empty,
.empty-state,
.profile-setup-card,
.code-panel {
  position: relative;
  isolation: isolate;
}

.panel:hover,
.card.interactive:hover,
.task-row:hover,
.project-discover-card:hover,
.capability-discover-card:hover {
  border-color: transparent;
  background:
    linear-gradient(140deg, rgba(21, 57, 63, .60), rgba(9, 30, 37, .43) 56%, rgba(10, 36, 43, .56)) padding-box,
    linear-gradient(118deg, rgba(255, 255, 255, .22), rgba(225, 255, 247, .08) 34%, rgba(89, 204, 232, .16) 72%, rgba(255, 255, 255, .12)) border-box;
  box-shadow: inset 0 1px rgba(255, 255, 255, .13), inset 0 -1px rgba(0, 0, 0, .14), 0 24px 64px rgba(0, 0, 0, .24);
}

.panel > *,
.card > *,
.task-row > *,
.project-discover-card > *,
.capability-discover-card > *,
.discover-empty > *,
.empty-state > *,
.profile-setup-card > *,
.code-panel > * {
  position: relative;
  z-index: 1;
}

.list-row {
  border-bottom-color: rgba(225, 255, 247, .065);
  background: linear-gradient(90deg, rgba(255, 255, 255, .018), transparent 72%);
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

button.list-row:hover {
  border-bottom-color: rgba(225, 255, 247, .11);
  background: linear-gradient(90deg, rgba(85, 239, 196, .065), rgba(255, 255, 255, .018) 72%);
}

.card-icon,
.empty-state .icon,
.discover-empty-mark,
.capability-art,
.thumbnail,
.step-dot,
.lineage-node,
.check-row {
  border-color: rgba(225, 255, 247, .09);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .018)) padding-box,
    linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(225, 255, 247, .035)) border-box;
  box-shadow: inset 0 1px rgba(255, 255, 255, .09), inset 0 -10px 24px rgba(0, 0, 0, .10);
}

.project-discover-card {
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(15, 43, 50, .58), rgba(7, 24, 30, .38) 58%, rgba(10, 32, 39, .50)) padding-box,
    linear-gradient(118deg, rgba(255, 255, 255, .17), rgba(225, 255, 247, .055) 34%, rgba(89, 204, 232, .13) 72%, rgba(255, 255, 255, .08)) border-box;
}

.project-discover-card:hover {
  background:
    linear-gradient(145deg, rgba(19, 53, 59, .68), rgba(8, 29, 35, .48) 58%, rgba(12, 39, 46, .60)) padding-box,
    linear-gradient(118deg, rgba(255, 255, 255, .24), rgba(225, 255, 247, .08) 34%, rgba(89, 204, 232, .18) 72%, rgba(255, 255, 255, .12)) border-box;
}

.project-cover {
  border-bottom-color: rgba(225, 255, 247, .07);
}

.project-cover-action {
  border-color: rgba(255, 255, 255, .12);
  background: linear-gradient(145deg, rgba(255, 255, 255, .14), rgba(6, 24, 29, .52));
  box-shadow: inset 0 1px rgba(255, 255, 255, .18), 0 10px 24px rgba(0, 0, 0, .20);
}

.project-discover-card:hover .project-cover-action {
  background: linear-gradient(145deg, rgba(85, 239, 196, .26), rgba(6, 24, 29, .46));
  box-shadow: inset 0 1px rgba(255, 255, 255, .24), 0 10px 28px rgba(0, 0, 0, .24), 0 0 24px rgba(85, 239, 196, .10);
}

/* The homepage composer uses the same soft focus as the creation workspace. */
.discover-composer {
  position: relative;
  isolation: isolate;
  border-color: transparent;
  background:
    linear-gradient(145deg, rgba(15, 47, 53, .62), rgba(6, 25, 31, .46) 58%, rgba(10, 35, 42, .52)) padding-box,
    linear-gradient(118deg, rgba(255, 255, 255, .20), rgba(225, 255, 247, .06) 36%, rgba(89, 204, 232, .16) 72%, rgba(255, 255, 255, .10)) border-box;
  box-shadow: inset 0 1px rgba(255, 255, 255, .12), inset 0 -1px rgba(0, 0, 0, .16), 0 24px 70px rgba(0, 0, 0, .24);
  -webkit-backdrop-filter: blur(30px) saturate(140%);
  backdrop-filter: blur(30px) saturate(140%);
}

.discover-composer::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -22% -8%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 46% 70% at 24% 42%, rgba(85, 239, 196, .16), transparent 72%),
    radial-gradient(ellipse 42% 68% at 82% 50%, rgba(89, 204, 232, .13), transparent 74%),
    radial-gradient(ellipse 35% 52% at 55% 100%, rgba(147, 135, 255, .08), transparent 76%);
  filter: blur(26px);
  opacity: .62;
  transform: scale(.96);
  animation: prompt-breathe 12s ease-in-out infinite;
}

.discover-composer::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, .065), transparent 28%, transparent 70%, rgba(117, 226, 222, .045));
  opacity: .72;
  animation: prompt-sheen 15s ease-in-out infinite;
}

.discover-composer > * {
  position: relative;
  z-index: 1;
}

.discover-composer:focus-within {
  border-color: transparent;
  box-shadow: inset 0 1px rgba(255, 255, 255, .16), inset 0 -1px rgba(0, 0, 0, .14), 0 26px 78px rgba(0, 0, 0, .27), 0 0 42px rgba(85, 239, 196, .10);
}

.lyrics-review {
  border-color: rgba(225, 255, 247, .075);
  background: rgba(2, 15, 20, .26);
  box-shadow: inset 0 1px rgba(255, 255, 255, .035), inset 0 0 36px rgba(85, 239, 196, .025);
}

.lyrics-review:focus {
  border-color: rgba(85, 239, 196, .22);
  background: rgba(2, 15, 20, .34);
  box-shadow: inset 0 1px rgba(255, 255, 255, .05), inset 0 0 42px rgba(85, 239, 196, .045), 0 0 24px rgba(85, 239, 196, .06);
}

/* Sticky glass player: stays available near the bottom while scrolling. */
.player {
  position: sticky;
  bottom: 16px;
  z-index: 9;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(19, 48, 55, .68), rgba(5, 20, 26, .76) 58%, rgba(10, 32, 39, .68)) padding-box,
    linear-gradient(110deg, rgba(255, 255, 255, .20), rgba(225, 255, 247, .06) 32%, rgba(89, 204, 232, .16) 76%, rgba(255, 255, 255, .10)) border-box;
  box-shadow: inset 0 1px rgba(255, 255, 255, .13), inset 0 -1px rgba(0, 0, 0, .22), 0 24px 60px rgba(0, 0, 0, .30);
  -webkit-backdrop-filter: blur(30px) saturate(145%);
  backdrop-filter: blur(30px) saturate(145%);
}

.player::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 48% 130% at 8% 100%, rgba(85, 239, 196, .11), transparent 70%),
    linear-gradient(110deg, rgba(255, 255, 255, .06), transparent 36%, rgba(89, 204, 232, .055));
}

.player > *,
.player-body > * {
  position: relative;
  z-index: 1;
}

.player-body { padding: 15px 18px 14px; }
.player .row-title { font-size: .92rem; }
.player .button.accent.small { width: 38px; height: 38px; padding: 0; border-radius: 50%; box-shadow: 0 0 22px rgba(85, 239, 196, .14), inset 0 1px rgba(255, 255, 255, .24); }
.player .wave { height: 42px; margin: 12px 0 9px; gap: 3px; opacity: .82; }
.player .wave span { background: linear-gradient(180deg, rgba(85, 239, 196, .92), rgba(89, 204, 232, .42)); box-shadow: 0 0 10px rgba(85, 239, 196, .06); }

.project-generation-player {
  min-height: 190px;
  background:
    radial-gradient(ellipse 72% 140% at 0 100%, rgba(85, 239, 196, .10), transparent 70%) padding-box,
    linear-gradient(145deg, rgba(14, 43, 50, .72), rgba(5, 20, 26, .80) 64%, rgba(12, 35, 43, .70)) padding-box,
    linear-gradient(110deg, rgba(255, 255, 255, .18), rgba(85, 239, 196, .08), rgba(89, 204, 232, .14)) border-box;
}
.project-generation-player .player-body { display: grid; gap: 14px; }
.project-generation-wave { margin: 8px 0 2px !important; opacity: .88 !important; }
.project-generation-player.is-active .project-generation-wave span {
  transform-origin: center;
  animation: project-generation-wave 1.45s ease-in-out infinite;
}
.project-generation-player.is-active .project-generation-wave span:nth-child(3n) { animation-delay: -.42s; }
.project-generation-player.is-active .project-generation-wave span:nth-child(4n) { animation-delay: -.78s; }
.project-generation-track {
  position: relative;
  overflow: hidden;
  height: 4px;
  border-radius: 999px;
  background: rgba(225, 255, 247, .08);
}
.project-generation-track span {
  position: absolute;
  inset: 0 auto 0 -36%;
  width: 36%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--mint), #59cce8, transparent);
  filter: drop-shadow(0 0 9px rgba(85, 239, 196, .36));
  animation: project-generation-track 1.7s ease-in-out infinite;
}
.project-generation-player.is-failed .project-generation-wave { opacity: .28 !important; }
@keyframes project-generation-wave {
  0%, 100% { transform: scaleY(.42); opacity: .36; }
  50% { transform: scaleY(1); opacity: 1; }
}
@keyframes project-generation-track {
  0% { transform: translateX(0); }
  100% { transform: translateX(380%); }
}

.player audio,
.candidate-card audio,
.wave-editor audio {
  display: block;
  width: 100%;
  height: 42px;
  margin-top: 10px;
  border: 1px solid rgba(225, 255, 247, .075);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .035));
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 8px 20px rgba(0, 0, 0, .10);
}

.player audio::-webkit-media-controls-enclosure,
.candidate-card audio::-webkit-media-controls-enclosure,
.wave-editor audio::-webkit-media-controls-enclosure {
  border-radius: 999px;
  background: transparent;
}

.player audio::-webkit-media-controls-panel,
.candidate-card audio::-webkit-media-controls-panel,
.wave-editor audio::-webkit-media-controls-panel {
  background: transparent;
}

.wave-editor-canvas {
  border-color: rgba(225, 255, 247, .075);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .025), transparent),
    rgba(3, 17, 22, .54);
  box-shadow: inset 0 1px rgba(255, 255, 255, .04), 0 12px 30px rgba(0, 0, 0, .12);
}

.wave-editor-canvas:focus {
  outline-color: rgba(85, 239, 196, .42);
  box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 0 28px rgba(85, 239, 196, .08);
}

.top-search,
.composer-tool,
.filter,
.chip,
.button,
.mobile-nav-button {
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  backdrop-filter: blur(16px) saturate(125%);
}

.button,
.composer-tool {
  border-color: rgba(225, 255, 247, .085);
  background: linear-gradient(145deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .025));
  box-shadow: inset 0 1px rgba(255, 255, 255, .075);
}

.button:hover:not(:disabled),
.composer-tool:hover {
  border-color: rgba(225, 255, 247, .18);
  background: linear-gradient(145deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04));
  box-shadow: inset 0 1px rgba(255, 255, 255, .12), 0 8px 24px rgba(0, 0, 0, .12);
}

.button.primary,
.button.accent {
  box-shadow: inset 0 1px rgba(255, 255, 255, .24), 0 8px 26px rgba(85, 239, 196, .08);
}

@keyframes prompt-breathe {
  0%, 100% { opacity: .48; transform: scale(.94) translate3d(-1%, 0, 0); }
  50% { opacity: .78; transform: scale(1.06) translate3d(1.5%, -1%, 0); }
}

@keyframes prompt-sheen {
  0%, 100% { opacity: .52; transform: translate3d(-1%, 0, 0); }
  50% { opacity: .82; transform: translate3d(1.5%, 0, 0); }
}

@media (max-width: 767px) {
  .player {
    bottom: calc(var(--bottom) + 10px);
    border-radius: 22px;
  }

  .player-body { padding: 13px 14px 12px; }
  .player .wave { height: 34px; margin: 10px 0 8px; }
  .player audio,
  .candidate-card audio,
  .wave-editor audio { height: 40px; }
  .discover-composer { border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .discover-composer::before,
  .discover-composer::after {
    animation: none;
  }
}

/* Continuous music workspace surfaces -------------------------------------
   Main surfaces should read as one dark canvas. Separation comes from tonal
   depth, spacing, and soft light rather than a visible outline around every
   component. Controls and focus states keep their own affordances. */
:root {
  --line: rgba(225, 255, 247, .042);
  --line-strong: rgba(225, 255, 247, .072);
  --surface: rgba(24, 30, 32, .66);
  --panel: rgba(24, 30, 32, .64);
  --glass-edge: rgba(225, 255, 247, .042);
  --glass-edge-soft: rgba(225, 255, 247, .024);
  --glass-highlight: rgba(255, 255, 255, .042);
  --glass-shadow: 0 20px 54px rgba(0, 0, 0, .15);
}

.sidebar {
  border-right-color: rgba(255, 255, 255, .028);
  background: rgba(5, 17, 20, .76);
}

.profile-row { border-top-color: rgba(255, 255, 255, .028); }

.hero,
.panel,
.card,
.task-row,
.notice,
.prompt-box,
.project-discover-card,
.capability-discover-card,
.discover-empty,
.upload,
.empty-state,
.profile-setup-card,
.code-panel,
.player,
.artifact-row,
.lyrics-review,
.check-row,
.bubble,
.blocked-hero,
.toast {
  border-color: transparent;
  box-shadow: inset 0 1px rgba(255, 255, 255, .025), 0 18px 48px rgba(0, 0, 0, .12);
}

.hero {
  background: linear-gradient(135deg, rgba(14, 35, 39, .72), rgba(9, 25, 29, .66));
}

.panel,
.card,
.task-row,
.project-discover-card,
.capability-discover-card,
.discover-empty,
.empty-state,
.profile-setup-card {
  background: rgba(24, 30, 32, .66);
}

.panel:hover,
.card.interactive:hover,
.task-row:hover,
.project-discover-card:hover,
.capability-discover-card:hover {
  border-color: transparent;
  background: rgba(31, 38, 39, .74);
  box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 22px 56px rgba(0, 0, 0, .17);
}

.notice { background: rgba(255, 255, 255, .022); }
.notice.warning { background: rgba(214, 169, 93, .065); }
.notice.danger { background: rgba(231, 124, 121, .065); }
.notice.success { background: rgba(85, 239, 196, .055); }

.list,
.tabs { border-color: transparent; }
.list-row,
button.list-row:hover { border-bottom-color: transparent; }
.list-row { background: rgba(255, 255, 255, .012); box-shadow: none; }
button.list-row:hover { background: rgba(255, 255, 255, .032); }

.project-discover-card,
.project-discover-card:hover,
.discover-composer,
.player {
  border-color: transparent;
}

.project-discover-card {
  background: rgba(24, 30, 32, .70);
  box-shadow: inset 0 1px rgba(255, 255, 255, .028), 0 18px 48px rgba(0, 0, 0, .14);
}

.project-discover-card:hover {
  background: rgba(31, 38, 39, .76);
  box-shadow: inset 0 1px rgba(255, 255, 255, .038), 0 22px 56px rgba(0, 0, 0, .18);
}

.discover-composer {
  background: rgba(17, 31, 34, .72);
  box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 22px 62px rgba(0, 0, 0, .16);
}

.player {
  background: rgba(25, 34, 36, .84);
  box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 22px 56px rgba(0, 0, 0, .20);
}

.player audio,
.candidate-card audio,
.wave-editor audio,
.wave-editor-canvas {
  border-color: rgba(225, 255, 247, .045);
}

.code-panel { background: rgba(8, 17, 19, .84); }
.code-panel-head { border-bottom-color: rgba(225, 255, 247, .035); }
.artifact-row { background: rgba(255, 255, 255, .018); }
.lyrics-review { background: rgba(2, 15, 20, .22); }
.check-row { background: rgba(255, 255, 255, .018); }
.bubble { background: rgba(255, 255, 255, .018); }
.bubble.user { background: rgba(85, 239, 196, .065); }

.project-cover { border-bottom-color: transparent; }

/* Keep small controls legible without making them look like separate cards. */
.filter,
.chip,
.top-search,
.composer-tool,
.button,
.mobile-nav-button {
  border-color: rgba(225, 255, 247, .055);
}

.button.ghost,
.mobile-nav-button { border-color: transparent; }

.button:hover:not(:disabled),
.composer-tool:hover,
.filter:hover,
.chip:hover {
  border-color: rgba(225, 255, 247, .12);
}

.upload { border-style: dashed; border-color: rgba(225, 255, 247, .10); }
.upload.drag { border-color: rgba(85, 239, 196, .32); }

.inline-player,
.playback-dock {
  border-color: transparent;
  background: rgba(25, 34, 36, .82);
  box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 18px 46px rgba(0, 0, 0, .18);
}

.candidate-card.adopted { border-color: rgba(85, 239, 196, .18); }

@media (prefers-reduced-motion: reduce) {
  .panel:hover,
  .card.interactive:hover,
  .task-row:hover,
  .project-discover-card:hover,
  .capability-discover-card:hover {
    transform: none;
  }
}

/* Shared Home / Studio composer --------------------------------------------
   The Projects entry point deliberately follows the public Home composer so
   users do not have to learn a second prompt interaction. */
.home-composer {
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: visible;
  width: 100%;
  min-height: 200px;
  padding: 24px;
  border: 1px solid transparent;
  border-radius: 23px;
  background: linear-gradient(145deg, rgba(10, 34, 40, .88), rgba(8, 27, 34, .80));
  box-shadow: inset 0 1px rgba(255, 255, 255, .07), 0 30px 70px rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(23px);
  backdrop-filter: blur(23px);
  text-align: left;
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}

.home-composer::before {
  content: none;
}

.home-composer::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 70% 145% at 0 28%, rgba(85, 239, 196, .085), rgba(85, 239, 196, .025) 46%, transparent 72%),
    radial-gradient(ellipse 68% 145% at 100% 24%, rgba(147, 135, 255, .085), rgba(89, 204, 232, .022) 48%, transparent 74%);
}

.home-composer:focus-within {
  background: linear-gradient(145deg, rgba(11, 38, 43, .92), rgba(9, 29, 37, .86));
  box-shadow: inset 0 1px rgba(255, 255, 255, .10), 0 35px 86px rgba(0, 0, 0, .34);
}

.home-composer:focus-within::before { opacity: .52; }
.home-composer > * { position: relative; z-index: 1; }

.home-task-picker {
  position: absolute;
  z-index: 12;
  top: 18px;
  right: 20px;
}

.home-task-trigger {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(186, 246, 230, .13);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(85, 239, 196, .085), rgba(89, 204, 232, .035));
  color: #b9d5ce;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .015em;
  list-style: none;
  box-shadow: inset 0 1px rgba(255, 255, 255, .04);
  transition: color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.home-task-trigger::-webkit-details-marker { display: none; }
.home-task-trigger::marker { content: ""; }
.home-task-trigger:hover,
.home-task-picker[open] .home-task-trigger {
  border-color: rgba(85, 239, 196, .30);
  background: linear-gradient(135deg, rgba(85, 239, 196, .15), rgba(89, 204, 232, .065));
  color: #effff9;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18), inset 0 1px rgba(255, 255, 255, .07);
}
.home-task-trigger .icon { width: 14px; height: 14px; }
.home-task-trigger .icon-chevron-down { width: 11px; height: 11px; color: #718d87; transition: transform .18s ease, color .18s ease; }
.home-task-picker[open] .home-task-trigger .icon-chevron-down { color: var(--mint); transform: rotate(180deg); }

.home-task-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 9px);
  right: 0;
  width: 224px;
  max-height: min(340px, 60vh);
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 7px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(171, 235, 218, .18);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(18, 49, 55, .98), rgba(6, 23, 29, .99) 62%, rgba(8, 32, 38, .98));
  box-shadow: 0 24px 68px rgba(0, 0, 0, .48), inset 0 1px rgba(255, 255, 255, .065);
  -webkit-backdrop-filter: blur(28px) saturate(135%);
  backdrop-filter: blur(28px) saturate(135%);
  scrollbar-width: thin;
  scrollbar-color: rgba(85, 239, 196, .38) transparent;
  animation: home-task-menu-in .15s ease-out both;
}

.home-task-menu::-webkit-scrollbar { width: 7px; }
.home-task-menu::-webkit-scrollbar-track { margin: 8px 0; background: transparent; }
.home-task-menu::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: rgba(85, 239, 196, .38) padding-box; }
.home-task-option {
  min-height: 39px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #b8cbc6;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  transition: color .14s ease, border-color .14s ease, background .14s ease, transform .14s ease;
}
.home-task-option:hover,
.home-task-option:focus-visible {
  border-color: rgba(85, 239, 196, .11);
  outline: 0;
  background: linear-gradient(90deg, rgba(85, 239, 196, .12), rgba(89, 204, 232, .04));
  color: #f2fff9;
  transform: translateX(2px);
}
.home-task-option .icon { width: 15px; height: 15px; color: #88cab9; }
.home-task-option .icon-arrow { width: 12px; height: 12px; justify-self: end; color: #55746d; }

@keyframes home-task-menu-in {
  from { opacity: 0; transform: translateY(-5px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.home-prompt-ideas {
  height: 25px;
  margin: 0 2px 12px;
  padding-right: 150px;
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.home-typed-idea {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #aabdb8;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: .015em;
  text-align: left;
  opacity: 1;
  transform: translateY(0);
  transition: color .2s ease, opacity .15s ease, transform .15s ease;
}

.home-typed-idea > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-typed-idea:hover { color: #e6f8f2; }
.home-typed-idea.is-switching { opacity: 0; transform: translateY(4px); }
.home-idea-prefix { flex: none; margin-right: 12px; color: var(--mint); font-size: 10px; font-weight: 600; letter-spacing: .14em; }
.home-idea-divider { flex: none; margin-right: 12px; color: rgba(180, 220, 210, .35); font-size: 12px; }
.home-typing-cursor { width: 1px; height: 15px; flex: none; background: var(--aqua); box-shadow: 0 0 8px rgba(89, 204, 232, .65); animation: studio-cursor-blink .72s steps(1) infinite; }

.home-composer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.home-composer-top > label { min-width: 0; }
.home-composer-input {
  display: block;
  width: 100%;
  height: 58px;
  min-height: 58px;
  max-height: 92px;
  padding: 7px 0;
  border: 0;
  border-radius: 0;
  resize: none;
  outline: 0;
  overflow: hidden;
  background: transparent;
  color: #effff9;
  font-size: 18px;
  line-height: 1.5;
  box-shadow: none;
}

.home-composer-input::placeholder { color: #78908c; }
.home-composer-input:focus { border: 0; background: transparent; box-shadow: none; }

.home-generate {
  height: 58px;
  min-width: 155px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(110deg, var(--mint), var(--aqua));
  color: #05262c;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 0 28px rgba(85, 239, 196, .14);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.home-generate:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(85, 239, 196, .25); }
.home-generate:disabled { cursor: not-allowed; opacity: .55; }

.home-composer-foot {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.home-composer-foot .home-generate { flex: none; align-self: flex-end; margin-left: auto; }

.home-style-chips {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.home-chip,
.home-randomize {
  height: 29px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: #849d98;
  cursor: pointer;
  font-size: 11px;
  transition: color .2s, border-color .2s, background .2s, transform .2s, opacity .16s ease;
}

.home-chip { padding: 0 11px; }
.home-chip:hover {
  border-color: rgba(85, 239, 196, .35);
  background: rgba(85, 239, 196, .09);
  color: #eafff7;
  transform: translateY(-1px);
}

.home-chip.is-replacing {
  opacity: 0;
  transform: translateY(-5px) scale(.92);
  pointer-events: none;
}

.home-randomize {
  width: 22px;
  padding: 0;
  border-color: transparent;
  border-radius: 0;
  background: transparent;
  color: #8da49f;
  font-size: 18px;
}

.home-randomize:hover { border-color: transparent; background: transparent; color: var(--mint); transform: rotate(28deg); }
.home-randomize:focus-visible { outline: 1px solid var(--mint); outline-offset: 3px; }

.guide-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(248px, 318px);
  align-items: start;
  gap: 20px;
}

/* Creation workspace: configuration stays visible beside live/history output. */
.content.create-content {
  width: min(1520px, 100%);
  margin-top: 0;
}

.creation-studio {
  min-height: calc(100vh - 190px);
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: start;
  gap: 0;
  border-top: 1px solid rgba(225, 255, 247, .065);
}

.creation-compose-pane {
  min-width: 0;
  max-width: 100%;
  display: grid;
  align-content: start;
  gap: 15px;
  padding: 18px 26px 42px 0;
  container: creation-compose / inline-size;
}

.creation-compose-head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.creation-compose-head .steps { margin: 0; }
.creation-compose-head .steps { transform: scale(.88); transform-origin: right center; }

.creation-editor {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.creation-editor > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
.creation-form-shell { min-width: 0; display: grid; gap: 12px; }
.creation-form-stack { min-width: 0; display: grid; gap: 12px; }
.creation-form-card {
  min-width: 0;
  padding: 19px 20px;
  border: 0;
  border-radius: 25px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .016)),
    rgba(7, 25, 30, .72);
  box-shadow: inset 0 1px rgba(255, 255, 255, .055), 0 18px 50px rgba(0, 0, 0, .08);
}
.creation-form-card-head { min-height: 27px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.creation-form-card-head h3 { margin: 0; color: #e6f3ef; font-size: .9rem; font-weight: 520; letter-spacing: -.01em; }
.creation-form-card-body { min-width: 0; max-width: 100%; }

.ai-design-section {
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 25px;
  background:
    radial-gradient(circle at 14% 10%, rgba(85, 239, 196, .08), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .014)),
    rgba(7, 25, 30, .72);
  box-shadow: inset 0 1px rgba(255, 255, 255, .055), 0 18px 50px rgba(0, 0, 0, .08);
}
.ai-design-summary {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: #d8ece6;
  cursor: pointer;
  list-style: none;
}
.ai-design-summary::-webkit-details-marker { display: none; }
.ai-design-summary::marker { content: ""; }
.ai-design-title { min-width: 0; display: inline-flex; align-items: center; gap: 9px; font-size: .88rem; font-weight: 500; }
.ai-design-title .icon { width: 17px; height: 17px; color: var(--mint); }
.ai-design-state { color: #6f8d86; font-size: .69rem; }
.ai-design-summary > .icon-chevron-down { width: 15px; height: 15px; color: #78938c; transition: transform 180ms ease; }
.ai-design-section[open] .ai-design-summary > .icon-chevron-down { transform: rotate(180deg); }
.ai-design-body { display: grid; gap: 10px; padding: 0 12px 12px; }
.ai-design-chat {
  min-height: 64px;
  max-height: 210px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 7px 2px 2px;
}
.ai-design-chat .bubble {
  width: fit-content;
  max-width: 78%;
  margin: 0;
  padding: 9px 12px;
  border: 0;
  border-radius: 14px 14px 14px 5px;
  background: rgba(89, 204, 232, .095);
  color: #dcece8;
  font-size: .78rem;
  line-height: 1.55;
}
.ai-design-chat .bubble.user {
  align-self: flex-end;
  border-radius: 14px 14px 5px 14px;
  background: rgba(85, 239, 196, .14);
  color: #f1fff9;
}
.ai-design-composer {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 0;
  padding: 7px;
  border-radius: 17px;
  background: rgba(2, 18, 23, .62);
}
.ai-design-composer textarea { min-height: 40px; max-height: 100px; padding: 8px 7px; font-size: .82rem; }
.ai-design-composer .composer-submit { width: 38px; height: 38px; min-height: 38px; }
.ai-design-actions { display: flex; justify-content: flex-end; gap: 8px; }

.creation-results-pane {
  position: sticky;
  top: 88px;
  min-width: 0;
  height: max(240px, calc(100dvh - 194px));
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 22px 0 24px 26px;
  border-left: 1px solid rgba(225, 255, 247, .075);
}
.creation-results-head {
  min-height: 55px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 0 8px 14px;
}
.creation-results-head .eyebrow { margin-bottom: 3px; }
.creation-results-head h2 { max-width: 34ch; margin: 0; overflow: hidden; font-size: 1.18rem; text-overflow: ellipsis; white-space: nowrap; }
.creation-results-pane .creation-results-list {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  touch-action: pan-y;
  padding-right: 8px;
  overscroll-behavior: contain;
  overflow-anchor: none;
}
.creation-results-list .project-track-row { min-height: 74px; padding-inline: 8px; }
.creation-history-row .project-track-action { min-width: 38px; }
.track-details-pane {
  position: fixed;
  z-index: 78;
  /* stops at the top of the playback dock (--dock-space, measured in app.js trackDockSpace) */
  inset: 0 0 var(--dock-space, 128px) auto;
  width: min(348px, 100vw);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--paper-deep);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 50px rgba(0, 0, 0, .2);
  animation: track-details-enter 160ms ease-out;
}
.track-details-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; color: var(--muted); font-size: .8rem; }
.track-details-close, .track-details-play {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 36px; height: 36px; min-height: 0; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255,255,255,.07); color: var(--ink);
}
.track-details-close .icon { width: 18px; height: 18px; }
.track-details-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 22px 28px; }
.track-details-artwork { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 18px; background: var(--surface); }
.track-details-artwork img { width: 100%; height: 100%; object-fit: cover; }
.track-details-play { position: absolute; right: 14px; bottom: 14px; width: 48px; height: 48px; color: var(--paper); background: var(--mint); box-shadow: 0 4px 20px #0004; }
.track-details-play .project-track-play-icon { position: static; inset: auto; width: auto; height: auto; display: grid; place-items: center; background: transparent; }
.track-details-play .icon { width: 22px; height: 22px; }
.track-details-scroll h2 { margin: 20px 0 14px; color: var(--ink); font-size: 1.25rem; line-height: 1.35; overflow-wrap: anywhere; }
.track-details-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.track-details-remix { flex: 1; border-radius: 24px; }
.track-details-date { margin: 20px 0; display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: .75rem; }
.track-details-author { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -6px 0 16px; min-width: 0; }
.track-details-author-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: .9rem; text-decoration: none; }
.track-details-author-name:hover, .track-details-author-name:focus-visible { text-decoration: underline; }
.track-details-follow { flex: none; min-height: 32px; padding: 0 16px; border-radius: 16px; font-size: .8rem; }
.track-details-kind { margin: -6px 0 16px; color: var(--muted); font-size: .8rem; }
.track-details-kind .project-track-meta { margin: 0; }
.track-details-note { margin: 12px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.6; }
.track-details-section { margin: 24px 0 0; }
.track-details-section h3 { margin: 0 0 9px; color: var(--muted); font-size: .8rem; font-weight: 500; }
.track-details-text { margin: 0; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; font-size: .87rem; line-height: 1.85; }
.track-details-loading { color: var(--muted); font-size: .85rem; }
@keyframes track-details-enter { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@media (min-width: 1500px) {
  body.has-track-details #app { margin-right: 348px; }
  body.has-track-details .creation-studio { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 760px) { .track-details-pane { bottom: calc(var(--bottom) + 110px); } }
@media (prefers-reduced-motion: reduce) { .track-details-pane { animation: none; } }
/* First-song next step: a card at the top of Recent works for new creators (app.js nextStepCard). */
.next-step-card {
  position: relative;
  display: grid;
  gap: 12px;
  margin: 2px 0 12px;
  padding: 16px 44px 16px 16px;
  border: 1px solid rgba(116, 214, 188, .28);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(116, 214, 188, .10), rgba(116, 214, 188, .03));
}
.next-step-copy h3 { margin: 0; color: var(--ink); font-size: .98rem; line-height: 1.35; }
.next-step-copy p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.next-step-copy .next-step-credits { color: var(--mint); }
.next-step-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.next-step-actions .button { min-height: 34px; border-radius: 17px; font-size: .8rem; }
.next-step-close {
  position: absolute; top: 10px; right: 10px;
  display: grid; place-items: center;
  width: 28px; height: 28px; min-height: 0; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted);
}
.next-step-close:hover, .next-step-close:focus-visible { background: rgba(255, 255, 255, .08); color: var(--ink); }
.next-step-close .icon { width: 16px; height: 16px; }
/* Phones and touch screens: a 44 px touch target around the small button. */
@media (max-width: 760px), (pointer: coarse) { .next-step-close::before { content: ""; position: absolute; inset: -8px; } }
@media (prefers-reduced-motion: no-preference) { .next-step-card { animation: next-step-enter 220ms ease-out; } }
@keyframes next-step-enter { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.creation-results-empty {
  min-height: 280px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: #637f78;
  font-size: .82rem;
}
.creation-results-empty .icon { width: 28px; height: 28px; color: #668e84; }

@media (max-width: 1260px) {
  .creation-studio { grid-template-columns: 1fr; }
  .creation-compose-pane { padding-right: 0; }
  .creation-results-pane {
    position: static;
    height: min(620px, max(280px, calc(100dvh - 194px)));
    min-height: 0;
    padding: 24px 0 20px;
    border-top: 1px solid rgba(225, 255, 247, .075);
    border-left: 0;
  }
  .creation-results-list { max-height: none; }
}

.guide-ai-panel {
  min-height: 610px;
  padding: 22px;
  border: 0;
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(20, 39, 42, .82), rgba(11, 29, 34, .72));
  box-shadow: inset 0 1px rgba(255, 255, 255, .045), 0 28px 72px rgba(0, 0, 0, .17);
}

.guide-dialogue {
  min-height: 564px;
  display: flex;
  flex-direction: column;
}

.guide-dialogue .chat {
  min-height: 398px;
  max-height: min(52vh, 570px);
  flex: 1;
  overflow-y: auto;
  padding: 6px 4px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .12) transparent;
}

.guide-dialogue .bubble {
  width: fit-content;
  max-width: min(58%, 470px);
  padding: 12px 15px;
  border: 1px solid rgba(89, 204, 232, .20);
  border-radius: 18px 18px 18px 6px;
  background: linear-gradient(135deg, rgba(89, 204, 232, .18), rgba(147, 135, 255, .11));
  color: #e8f6f2;
  box-shadow: inset 0 1px rgba(255, 255, 255, .045);
}

.guide-dialogue .bubble.user {
  border-radius: 18px 18px 6px 18px;
  border-color: rgba(85, 239, 196, .28);
  background: linear-gradient(135deg, rgba(85, 239, 196, .26), rgba(89, 204, 232, .16));
  color: #f2fff9;
}

.guide-dialogue .bubble.thinking {
  min-width: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding-block: 15px;
}

.guide-thinking-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #bceee0;
  opacity: .32;
  animation: guide-thinking 1.15s ease-in-out infinite;
}
.guide-thinking-dot:nth-child(2) { animation-delay: 140ms; }
.guide-thinking-dot:nth-child(3) { animation-delay: 280ms; }

@keyframes guide-thinking {
  0%, 60%, 100% { opacity: .28; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.composer {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 9px;
  border: 0;
  border-radius: 24px;
  background: rgba(3, 19, 23, .72);
  box-shadow: inset 0 1px rgba(255, 255, 255, .07), 0 18px 46px rgba(0, 0, 0, .18);
}

.composer textarea {
  min-height: 48px;
  max-height: 154px;
  padding: 11px 7px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  resize: none;
}

.composer textarea:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.composer-reference,
.composer-submit {
  position: relative;
  align-self: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  line-height: 0;
}

.composer-reference > .icon,
.composer-submit > .icon {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  transform: translate(-50%, -50%);
}

.composer-reference {
  background: rgba(255, 255, 255, .065);
  color: #b1c4bf;
}

.composer-submit {
  background: var(--mint);
  color: #05272c;
  box-shadow: 0 9px 25px rgba(85, 239, 196, .16);
}

.composer-reference:hover:not(:disabled) { background: rgba(255, 255, 255, .11); color: var(--ink); }
.composer-submit:hover:not(:disabled) { background: #79f2d1; }
.composer-submit.is-busy .icon { animation: none; opacity: .5; }
.composer.ai-design-composer {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 0;
}
.composer.ai-design-composer textarea { grid-column: 1; }
.composer.ai-design-composer .composer-submit { grid-column: 2; }
.composer-reference-state {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 4px 6px 0;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(85, 239, 196, .08);
  color: #bdebdc;
  font-size: .75rem;
}

.composer-reference-state .audio-source-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.has-audio-remove { position: relative; }
.composer-reference-state.has-audio-remove { padding-right: 28px; }
.audio-source-row.has-audio-remove { padding-right: 38px; }
.source-summary.has-audio-remove { padding-right: 30px; }
.audio-remove-badge {
  position: absolute;
  z-index: 3;
  top: -7px;
  right: -7px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(225, 255, 247, .18);
  border-radius: 50%;
  background: rgba(8, 28, 34, .94);
  color: #c7d9d4;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .28);
  opacity: 0;
  pointer-events: none;
  transform: scale(.78);
  transition: opacity 140ms ease, transform 180ms cubic-bezier(.2, .8, .2, 1), border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}
.has-audio-remove:hover > .audio-remove-badge,
.has-audio-remove:focus-within > .audio-remove-badge,
.audio-remove-badge:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
.audio-remove-badge .icon,
.audio-remove-badge .icon svg {
  width: 13px;
  height: 13px;
  display: block;
}
.audio-remove-badge:hover:not(:disabled) {
  border-color: rgba(231, 124, 121, .45);
  background: rgba(63, 29, 31, .96);
  color: #ffb8b4;
}
.audio-remove-badge:focus-visible {
  outline: 2px solid rgba(85, 239, 196, .58);
  outline-offset: 2px;
}
.audio-remove-badge:disabled { cursor: wait; }
.has-audio-remove:hover > .audio-remove-badge:disabled,
.has-audio-remove:focus-within > .audio-remove-badge:disabled { opacity: .58; }

@media (hover: none), (pointer: coarse) {
  .audio-remove-badge {
    opacity: .64;
    pointer-events: auto;
    transform: none;
  }
}

.live-brief {
  position: sticky;
  top: 105px;
  padding: 18px 4px 18px 20px;
  border-left: 1px solid rgba(255, 255, 255, .075);
  color: #dce9e5;
}

.live-brief-head { margin-bottom: 14px; }
.live-brief-head .eyebrow { margin-bottom: 4px; }
.live-brief-head h3 { font-size: 1.18rem; }
.live-brief .brief-line { padding: 11px 0; border-bottom-color: rgba(255, 255, 255, .055); }
.live-brief .brief-line > div { min-width: 0; }
.profile-showcase {
  width: min(680px, 100%);
  margin: clamp(30px, 8vh, 86px) auto 0;
  padding: 34px 20px;
  text-align: center;
}

.profile-avatar {
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(85, 239, 196, .24), rgba(89, 204, 232, .12));
  color: #eafff8;
  box-shadow: inset 0 1px rgba(255, 255, 255, .18), 0 24px 62px rgba(0, 0, 0, .2);
  font-size: 2.8rem;
  font-weight: 500;
}

.profile-showcase h2 { margin-bottom: 4px; font-size: clamp(2rem, 5vw, 3.25rem); }
.profile-email { color: var(--muted); font-size: .88rem; }
.profile-editor {
  width: min(470px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 38px auto 0;
  text-align: left;
}
.profile-editor label { grid-column: 1 / -1; color: var(--muted); font-size: .75rem; }
.profile-editor input { min-height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .045); }
.profile-editor .button { min-height: 46px; border-radius: 14px; }
.identity-settings{width:min(100%,620px);margin-top:8px;padding:22px;border:1px solid var(--line);border-radius:20px;background:rgba(255,255,255,.025);text-align:left}.identity-settings-head h3{margin:0 0 5px}.identity-settings-head p{margin:0 0 18px;color:var(--muted);font-size:.82rem;line-height:1.5}.identity-method-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 0;border-top:1px solid var(--line)}.identity-method-copy{display:grid;gap:3px}.identity-method-copy small{color:var(--muted)}.identity-password-link{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;margin-top:14px}.identity-password-link input{min-width:0}.identity-password-control{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px}.identity-password-control .button{padding-inline:10px}
.profile-subscription-link {
  width: min(470px, 100%);
  min-height: 70px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin: 12px auto 0;
  padding: 13px 15px;
  border: 1px solid rgba(85, 239, 196, .12);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(85, 239, 196, .075), rgba(89, 204, 232, .035));
  color: var(--ink);
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}
.profile-subscription-link:hover { border-color: rgba(85, 239, 196, .28); background: linear-gradient(135deg, rgba(85, 239, 196, .12), rgba(89, 204, 232, .055)); transform: translateY(-1px); }
.profile-subscription-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: rgba(85, 239, 196, .1); color: var(--mint); }
.profile-subscription-copy { min-width: 0; display: grid; gap: 2px; }
.profile-subscription-copy strong { font-weight: 500; }
.profile-subscription-copy > span { overflow: hidden; color: var(--muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.profile-subscription-link > .icon { color: #75938b; }
.profile-logout { margin-top: 18px; }

.project-destination {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: 13px;
  margin: 0;
}

.project-destination-single { grid-template-columns: 1fr; }
.form-grid > .project-destination { margin-bottom: 0; }
.project-destination .field { margin: 0; }
.project-destination-current {
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
}
.project-destination-current .field-label { color: var(--muted); font-size: .72rem; }
.project-destination-current strong { color: var(--ink); font-size: .92rem; font-weight: 500; }
.control-brief-layout { min-width: 0; display: grid; gap: 18px; }
.brief-compact-row {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  column-gap: 22px;
  row-gap: 10px;
}
.brief-compact-row > .project-destination {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  margin: 0 0 2px;
  padding-bottom: 12px;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: 22px;
  border-bottom: 1px solid rgba(225, 255, 247, .055);
}
.brief-compact-row > .project-destination-single { grid-template-columns: 1fr; }
.brief-compact-row > .creation-title-field { grid-column: 1 / -1; min-width: 0; }
.creation-title-input { width: 100%; min-width: 0; }
.project-select-menu { display: flex; flex-direction: column; overflow: hidden; }
.project-select-menu[hidden], .project-select-menu .mula-select-option[hidden] { display: none; }
.project-select-search-region, .project-select-create-region { flex: 0 0 auto; padding: 8px; border-bottom: 1px solid var(--line); }
.project-select-search { width: 100%; min-width: 0; background: transparent; border: 0; color: var(--ink); padding: 8px; }
.project-select-create { width: 100%; text-align: left; padding: 9px; background: transparent; border: 0; border-radius: 10px; color: var(--ink); cursor: pointer; }
.project-select-create:hover { background: rgba(71, 231, 195, .12); }
.project-select-options-region { overflow-y: auto; min-height: 0; padding: 4px; }
.project-name-dialog { width: min(380px, calc(100vw - 32px)); padding: 24px; color: var(--ink); background: #10272b; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 20px 60px #0008; }
.project-name-dialog::backdrop { background: #00151999; backdrop-filter: blur(5px); }
.project-name-dialog h3 { margin: 0 0 20px; }
.project-name-dialog input { width: 100%; border: 0; border-radius: 14px; background: #ffffff09; padding: 14px; color: var(--ink); }
.project-name-dialog .inline-actions { margin-top: 22px; justify-content: flex-end; }
.action-confirm-dialog { width: min(460px, calc(100vw - 32px)); }
.action-confirm-mark { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 50%; background: rgba(85,239,196,.1); color: var(--mint); }
.action-confirm-dialog.is-danger .action-confirm-mark { background: rgba(231,124,121,.11); color: var(--red); }
.action-confirm-message { margin: 0; line-height: 1.65; }
.action-confirm-dialog .action-confirm-remember { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--muted, #9aa4b2); font-size: 13px; cursor: pointer; white-space: nowrap; }
/* The dialog's text-field rule must not stretch the checkbox. */
.action-confirm-dialog .action-confirm-remember input { width: 16px; height: 16px; flex: none; margin: 0; padding: 0; border-radius: 4px; accent-color: var(--mint, #55efc4); }
.action-confirm-actions { display: flex; flex-wrap: wrap; }
.action-confirm-actions .button { min-height: 42px; }
.lyrics-import-dialog fieldset { margin: 18px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.lyrics-import-dialog legend { padding: 0 6px; color: var(--muted); font-size: .82rem; }
.lyrics-import-dialog .check-row { margin-top: 10px; }
.lyrics-import-dialog input[type="checkbox"],.lyrics-import-dialog input[type="radio"] { width: auto; }
.project-name-error { color: #ff9b9b; }
.project-track-row[tabindex] { cursor: pointer; }
.project-track-row[tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.original-creation-info { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; min-width: 0; }
.original-creation-info summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; color: var(--muted); list-style: none; }
.original-creation-info summary::-webkit-details-marker { display: none; }
.original-creation-info .library-trace-list { max-height: 360px; overflow: auto; margin-top: 16px; }
.original-creation-info dd { white-space: pre-wrap; overflow-wrap: anywhere; }
.brief-copy-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
}
.brief-copy-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.brief-inline-fields.is-single { grid-template-columns: minmax(0, 1fr); }
.control-capability-select .mula-select-trigger { min-width: 0; }
.brief-main-fields { display: grid; align-content: start; gap: 17px; }
.brief-main-fields,
.brief-inline-fields,
.brief-lyrics-column,
.field { min-width: 0; }
.brief-inline-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(145px, .55fr); gap: 13px; }
.brief-lyrics-column,
.brief-lyrics-column > .field { height: 100%; }
.brief-style-input { min-height: 76px; max-height: 262px; }
.brief-exclude-input { min-height: 76px; }
.brief-lyrics-input { min-height: 360px; height: 100%; }
.live-brief-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.live-brief-actions .button { width: 100%; }
.live-brief-plan-action { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .06); }
.live-brief-plan-action .button { width: 100%; }
.live-brief-project-name { border: 0; border-radius: 0; background: transparent; padding: 0; color: var(--ink); font-size: 1.08rem; font-weight: 500; }
.live-brief-project-name:focus { background: transparent; box-shadow: inset 0 -1px rgba(85,239,196,.35); }
.upload.is-uploading { border-style: solid; border-color: rgba(85,239,196,.28); pointer-events: none; }
.creation-form-card .field { min-width: 0; max-width: 100%; gap: 4px; }
.creation-form-card .field > label {
  color: #819b94;
  font-size: .69rem;
  font-weight: 480;
  letter-spacing: .015em;
}
.creation-form-card .creation-primary-field > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.creation-form-card input:not([type="range"]):not([type="checkbox"]):not([type="file"]),
.creation-form-card textarea,
.creation-form-card select:not([multiple]) {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  background: transparent;
  background-image: none;
  box-shadow: none;
  outline: 0;
}
.creation-form-card input:not([type="range"]):not([type="checkbox"]):not([type="file"]) {
  min-height: 36px;
  padding: 5px 0;
}
.creation-form-card textarea { padding: 5px 1px; border-radius: 0; }
.creation-form-card input::placeholder,
.creation-form-card textarea::placeholder {
  color: #6f8882;
  opacity: 1;
}
.creation-form-card input:not([type="range"]):not([type="checkbox"]):not([type="file"]):hover,
.creation-form-card input:not([type="range"]):not([type="checkbox"]):not([type="file"]):focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.creation-form-card textarea:hover { border: 0; background: transparent; box-shadow: none; }
.creation-form-card textarea:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.creation-form-card .mula-select-trigger {
  min-width: 0;
  max-width: 100%;
  min-height: 36px;
  padding: 5px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.creation-form-card .mula-select-trigger:hover:not(:disabled),
.creation-form-card .mula-select.is-open .mula-select-trigger,
.creation-form-card .mula-select-trigger:focus-visible {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.creation-form-card .field:focus-within > label { color: #b8f9e6; }
.creation-form-card .field:focus-within input,
.creation-form-card .field:focus-within textarea,
.creation-form-card .field:focus-within .mula-select-value { color: #f3fff9; }
.creation-editor-scroll-scope {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}
.creation-editor-scroll-scope textarea {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
}
.creation-form-card .creation-counted-field { position: relative; padding-bottom: 18px; }
.creation-character-count {
  position: absolute;
  right: 0;
  bottom: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 14px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  user-select: none;
}
.creation-character-count[hidden] { display: none; }
.creation-character-count.is-at-limit { color: var(--mint); }
.creation-character-count.is-over-limit { color: #f1a39b; }
.creation-form-card-setup { padding-block: 16px; }
.creation-form-card-setup .creation-form-card-head { margin-bottom: 10px; }
.creation-form-card-direction .brief-style-input { min-height: 100px; }
.creation-form-card-direction .brief-exclude-input { min-height: 54px; }
.creation-form-card-lyrics { min-height: 460px; display: flex; flex-direction: column; }
.creation-form-card-lyrics .creation-form-card-body,
.creation-form-card-lyrics .creation-primary-field { min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; }
.creation-form-card-lyrics .brief-lyrics-input { min-height: 330px; }
.creation-operation-fields { display: grid; gap: 14px; padding-top: 2px; }

.creation-audio-section {
  justify-self: start;
  width: auto;
  max-width: 100%;
  margin-top: 0;
  padding: 8px;
  border-radius: 18px;
  transition: width 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.creation-audio-section.has-source { justify-self: stretch; width: 100%; padding: 12px; }
.creation-audio-section.is-disabled {
  background: rgba(75, 91, 95, .16);
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
  filter: saturate(.22);
}
.creation-audio-section.drag {
  background: rgba(85, 239, 196, .09);
  box-shadow: inset 0 0 0 1px rgba(85, 239, 196, .26), 0 16px 44px rgba(0, 0, 0, .12);
}
.creation-reference-upload {
  min-width: 0;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 9px 5px 6px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, .035);
  color: #c8dad5;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, transform 150ms ease;
}
.creation-reference-upload:hover { background: rgba(255, 255, 255, .065); color: #f0fff9; }
.creation-reference-upload:disabled { opacity: .45; cursor: not-allowed; }
.creation-reference-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.creation-audio-section.has-source .creation-reference-actions { margin-top: 10px; }
.creation-reference-upload.is-uploading { cursor: wait; pointer-events: none; }
.creation-reference-upload.is-disabled {
  background: rgba(131, 145, 149, .055);
  color: #758783;
  cursor: not-allowed;
  pointer-events: none;
}
.creation-reference-upload.is-disabled .creation-reference-upload-icon {
  background: rgba(131, 145, 149, .075);
  color: #71827e;
}
.creation-reference-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
}
.creation-reference-upload-icon {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(85, 239, 196, .09);
  color: var(--mint);
}
.creation-reference-upload-icon .icon { width: 15px; height: 15px; }
.creation-reference-upload-copy { min-width: 0; display: grid; gap: 1px; }
.creation-reference-upload-copy strong { font-size: .78rem; font-weight: 500; white-space: nowrap; }
.creation-reference-upload-copy small { max-width: min(250px, 46vw); overflow: hidden; color: var(--muted); font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.creation-reference-selected {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}
.creation-reference-selected.has-audio-remove { padding-right: 24px; }
.creation-reference-preview {
  position: relative;
  width: 46px;
  height: 46px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: rgba(255, 255, 255, .04);
  color: white;
  cursor: pointer;
}
.creation-reference-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.creation-reference-play-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 13, 17, .28);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4));
}
.creation-reference-play-icon .icon { width: 17px; height: 17px; }
.creation-reference-copy { min-width: 0; display: grid; gap: 3px; }
.creation-reference-copy strong,
.creation-reference-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creation-reference-copy strong { color: var(--ink); font-size: .84rem; font-weight: 500; }
.creation-reference-copy span { color: var(--muted); font-size: .68rem; }
.creation-audio-section .wave-editor { margin: 13px 0 0; padding-top: 13px; border-top: 1px solid rgba(225, 255, 247, .055); }
.creation-audio-section .wave-editor-canvas { height: 104px; }
.creation-audio-section .wave-editor-copy { color: #a8beb8; font-size: .72rem; }
.control-plan-actions { justify-content: flex-end; position: relative; z-index: 1; padding-bottom: 6px; }
.batch-generation-control { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; margin-right: auto; }
.batch-generation-control .check-row { align-items: center; padding: 8px 0; border: 0; background: transparent; }
.batch-generation-options { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.batch-generation-options[hidden] { display: none; }
.batch-generation-options input { width: 64px; min-width: 0; padding: 8px; border-radius: 12px; }

/* Project detail is one quiet, playable song list. */
.project-workbench { min-width: 0; }
.project-page-head {
  min-height: 54px;
  align-items: center;
  margin-bottom: 14px;
}
.project-topbar-head {
  min-width: 0;
  min-height: 0;
  margin: 0;
}
.project-topbar-head .project-title-label { margin-bottom: 0; }
.project-title-inline,
.track-title-inline {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.project-title-inline { max-width: min(100%, 760px); }
.project-title-label {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-title-edit,
.track-title-edit {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 150ms ease, transform 150ms ease, color 150ms ease, background 150ms ease;
}
.project-title-inline:hover .project-title-edit,
.project-title-inline:focus-within .project-title-edit,
.project-title-edit:focus-visible,
.project-track-row:hover .track-title-edit,
.track-title-inline:focus-within .track-title-edit,
.track-title-edit:focus-visible {
  opacity: 1;
  transform: translateX(0);
}
.project-title-edit:hover,
.track-title-edit:hover { color: var(--ink); background: rgba(255, 255, 255, .065); }
.project-title-edit .icon,
.track-title-edit .icon { width: 15px; height: 15px; }
.project-title-input,
.track-title-input {
  width: auto;
  min-width: 4.5ch;
  border: 1px solid rgba(167, 235, 218, .17);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(85, 239, 196, .085), rgba(89, 204, 232, .025)),
    rgba(8, 28, 34, .78);
  color: var(--ink);
  box-shadow: inset 0 1px rgba(255, 255, 255, .045), 0 8px 24px rgba(0, 0, 0, .15);
  outline: 0;
  field-sizing: content;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.project-title-input:focus,
.track-title-input:focus {
  border-color: rgba(85, 239, 196, .48);
  border-radius: 999px;
  outline: 0;
  background:
    linear-gradient(135deg, rgba(85, 239, 196, .14), rgba(89, 204, 232, .045)),
    rgba(8, 31, 37, .92);
  box-shadow: 0 0 0 3px rgba(85, 239, 196, .055), 0 12px 32px rgba(0, 0, 0, .20), inset 0 1px rgba(255, 255, 255, .07);
}
.project-title-input {
  max-width: min(720px, 72vw);
  padding: 7px 14px 8px;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 550;
  letter-spacing: -.035em;
}
.project-track-list {
  overflow: hidden;
  width: 100%;
  border-radius: 20px;
  background: rgba(9, 22, 26, .34);
  box-shadow: inset 0 1px rgba(255, 255, 255, .018);
}
.project-track-row {
  min-width: 0;
  min-height: 84px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(225, 255, 247, .035);
  transition: background 150ms ease;
}
.project-track-row:last-child { border-bottom: 0; }
.track-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; max-width: 180px; }
.project-track-row:hover { background: rgba(255, 255, 255, .035); }
.project-track-play,
.project-track-cover {
  position: relative;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: rgba(85, 239, 196, .07);
  color: #f1fffb;
}
.project-track-play img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease, filter 220ms ease;
}
.project-track-play::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 10, 13, .24);
  transition: background 180ms ease;
}
.project-track-play:hover:not(:disabled) img { transform: scale(1.055); filter: saturate(1.08); }
.project-track-play:hover:not(:disabled)::after { background: rgba(2, 10, 13, .42); }
.project-track-play:disabled { cursor: default; filter: grayscale(.4); opacity: .55; }
.project-track-play-icon {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(3, 15, 18, .58);
  color: #f3fffb;
  backdrop-filter: blur(7px);
}
.project-track-play-icon .icon { width: 14px; height: 14px; }
.project-track-copy { min-width: 0; display: grid; align-content: center; gap: 6px; }
.project-track-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: .95rem;
  font-weight: 550;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track-title-inline { max-width: 100%; width: fit-content; }
.track-title-inline .project-track-name { max-width: min(52vw, 650px); }
.track-title-input { max-width: min(520px, 48vw); padding: 6px 11px; font-size: .95rem; font-weight: 550; }
.track-title-edit { width: 28px; height: 28px; }
.track-title-edit .icon { width: 13px; height: 13px; }
.project-track-meta { overflow: hidden; color: #6f8883; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.project-track-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .048);
  color: #aec0bc;
  font-size: .78rem;
  font-weight: 520;
  transition: background 150ms ease, color 150ms ease;
}
.project-track-action:hover:not(:disabled) { background: rgba(255, 255, 255, .085); color: var(--ink); }
.project-track-action:disabled { opacity: .36; cursor: default; }
.project-track-action .icon { width: 16px; height: 16px; }
.project-track-pending { background: rgba(85, 239, 196, .018); }
.project-track-loading { display: flex; align-items: center; justify-content: center; gap: 3px; }
.project-track-loading i { width: 3px; border-radius: 999px; background: linear-gradient(180deg, var(--mint), var(--aqua)); animation: project-track-wave 1s ease-in-out infinite; }
.project-track-loading i:nth-child(1), .project-track-loading i:nth-child(5) { height: 12px; animation-delay: -.4s; }
.project-track-loading i:nth-child(2), .project-track-loading i:nth-child(4) { height: 23px; animation-delay: -.2s; }
.project-track-loading i:nth-child(3) { height: 34px; }
.project-track-live-play { background: linear-gradient(145deg, rgba(85,239,196,.17), rgba(89,204,232,.09)); }
.project-track-live-play::after { background: rgba(2, 10, 13, .12); }
.project-track-live-play .project-track-loading { position: absolute; z-index: 0; opacity: .62; }
.project-track-live-play .project-track-play-icon { z-index: 2; }
.project-track-running { display: inline-flex; align-items: center; gap: 5px; padding: 0 12px; }
.project-track-running i { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); animation: project-track-dot 1.15s ease-in-out infinite; }
.project-track-running i:nth-child(2) { animation-delay: .14s; }
.project-track-running i:nth-child(3) { animation-delay: .28s; }
.project-track-cover-failed { display: flex; align-items: center; justify-content: center; color: var(--muted); background: rgba(225,255,247,.04); }
.project-track-actions { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.project-track-empty { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 13px; color: var(--muted); }
.project-track-empty > .icon { width: 28px; height: 28px; color: var(--mint); }
.project-track-empty h3 { margin: 0; color: var(--ink); }
.library-page {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}
.library-track-list { overflow: visible; }
.library-track-item {
  border-bottom: 1px solid rgba(225, 255, 247, .035);
  transition: background 160ms ease;
}
.library-track-item:last-child { border-bottom: 0; }
.library-track-item:hover,
.library-track-item.is-expanded { background: rgba(255, 255, 255, .028); }
.library-track-main { border-bottom: 0; }
.library-track-main:hover { background: transparent; }
.library-track-summary {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  text-align: left;
}
.library-track-summary:hover .project-track-name { color: var(--mint); }
.library-track-trace-toggle {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 8px 4px 8px 12px;
  border: 0;
  background: transparent;
  color: #718d87;
}
.library-track-trace-toggle .icon-chevron-down {
  width: 15px;
  height: 15px;
  transition: transform 180ms ease, color 180ms ease;
}
.library-track-item.is-expanded .library-track-trace-toggle .icon-chevron-down {
  color: var(--mint);
  transform: rotate(180deg);
}
.library-track-trace {
  padding: 0 18px 18px 88px;
  animation: library-trace-in 180ms ease-out both;
}
.library-trace-list {
  margin: 0;
  border-top: 1px solid rgba(225, 255, 247, .055);
}
.library-trace-line {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 18px;
  padding: 11px 2px;
  border-bottom: 1px solid rgba(225, 255, 247, .035);
}
.library-trace-line dt {
  color: #6f8883;
  font-size: .74rem;
  line-height: 1.65;
}
.library-trace-line dd {
  min-width: 0;
  margin: 0;
  color: #c9d8d4;
  font-size: .82rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.library-trace-line.is-long dd {
  max-height: 12.5rem;
  overflow: auto;
  scrollbar-color: rgba(85, 239, 196, .38) transparent;
  scrollbar-width: thin;
}
.library-trace-foot {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  color: #607872;
  font-family: var(--mono);
  font-size: .68rem;
}
.library-trace-foot .project-track-action { font-family: var(--sans); }
@keyframes library-trace-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes project-track-wave { 0%, 100% { transform: scaleY(.48); opacity: .42; } 50% { transform: scaleY(1); opacity: 1; } }
@keyframes project-track-dot { 0%, 100% { transform: translateY(0); opacity: .35; } 50% { transform: translateY(-3px); opacity: 1; } }

@keyframes studio-composer-breathe {
  0%, 100% { opacity: .24; }
  50% { opacity: .46; }
}
@keyframes studio-cursor-blink { 50% { opacity: 0; } }

@container creation-compose (max-width: 520px) {
  .brief-compact-row,
  .brief-compact-row > .project-destination,
  .brief-inline-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .brief-compact-row { row-gap: 12px; }
  .brief-compact-row > .project-destination { gap: 10px; }
  .brief-compact-row > .field + .field {
    padding-top: 12px;
    border-top: 1px solid rgba(225, 255, 247, .055);
  }
}

@media (max-width: 980px) and (min-width: 768px) {
  .brief-copy-grid { grid-template-columns: 1fr; }
  .brief-lyrics-input { min-height: 340px; }
}

@media (max-width: 767px) {
  .home-composer { padding: 16px; border-radius: 20px; }
  .home-task-picker { top: 12px; right: 12px; }
  .home-task-trigger-label { display: none; }
  .home-task-trigger { width: 34px; justify-content: center; padding: 0; }
  .home-task-trigger .icon-chevron-down { display: none; }
  .home-task-menu { width: min(224px, calc(100vw - 48px)); }
  .home-prompt-ideas { padding-right: 42px; }
  .home-composer-top { grid-template-columns: 1fr; gap: 10px; }
  .home-generate { width: 100%; }
  .home-composer-foot { align-items: stretch; flex-direction: column; gap: 10px; }
  .home-style-chips { width: 100%; }
  .home-composer::before { inset: -150px -58vw; }
  .project-destination { grid-template-columns: 1fr; }
  .creation-audio-section.has-source { padding: 10px; }
  .creation-reference-selected { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 9px; }
  .creation-reference-preview { width: 42px; height: 42px; border-radius: 12px; }
  .creation-reference-upload-copy strong { font-size: .74rem; }
  .creation-audio-section .wave-editor-canvas { height: 90px; }
  .brief-compact-row,
  .brief-copy-grid,
  .brief-inline-fields { grid-template-columns: 1fr; }
  .brief-compact-row > .project-destination { grid-template-columns: 1fr; }
  .brief-lyrics-input { min-height: 320px; }
  .guide-dialogue .bubble { max-width: 88%; }
  .guide-workspace { grid-template-columns: 1fr; }
  .guide-ai-panel { min-height: 520px; padding: 14px; border-radius: 20px; }
  .guide-dialogue { min-height: 492px; }
  .guide-dialogue .chat { min-height: 330px; }
  .live-brief { position: static; padding: 8px 4px 8px 14px; }
  .composer { grid-template-columns: auto minmax(0, 1fr) auto; }
  .composer .button { width: 42px; }
  .profile-editor { grid-template-columns: 1fr; }
  .identity-password-link { grid-template-columns: 1fr; }
  .profile-editor label { grid-column: auto; }
  .project-page-head { min-height: 42px; }
  .project-title-input { width: auto; max-width: 74vw; }
  .project-track-row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 11px; min-height: 72px; padding: 11px 10px; }
  .project-track-play,
  .project-track-cover { width: 48px; height: 48px; }
  .project-track-remix { width: 38px; padding: 0; }
  .project-track-remix > span:not(.icon) { display: none; }
  .track-title-inline .project-track-name { max-width: 46vw; }
  .track-title-input { width: auto; max-width: 45vw; }
  .library-track-trace { padding: 0 10px 14px; }
  .library-track-trace-toggle { gap: 5px; padding-left: 4px; }
  .library-track-trace-toggle .status { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .library-trace-line { grid-template-columns: 82px minmax(0, 1fr); gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-composer::before,
  .home-composer::after,
  .home-typing-cursor,
  .home-task-menu,
  .guide-thinking-dot,
  .audio-remove-badge,
  .project-generation-player.is-active .project-generation-wave span,
  .project-generation-track span,
  .project-track-loading i,
  .project-track-running i,
  .library-track-trace,
  .project-skeleton-cover,
  .project-skeleton-copy i { animation: none; }
}

.lyrics-prompt-input { width: 100%; box-sizing: border-box; min-height: 72px; resize: vertical; margin-bottom: 12px; }

/* Song actions are available on touch screens and without hovering. */
.track-title-edit, .track-row-actions, .project-title-edit { opacity: 1; visibility: visible; transform: none; }
.audio-download-controls { display: inline-flex; align-items: center; gap: 6px; }
.download-formats { position: relative; }
.download-formats summary { cursor: pointer; padding: 8px; list-style: none; }
.download-format-menu { position: absolute; z-index: 20; right: 0; bottom: 100%; padding: 8px; background: var(--panel, #202322); border: 1px solid #555; border-radius: 8px; }
.download-format-menu[popover] { position: fixed; inset: auto; margin: 0; height: auto; overflow: visible; color: inherit; }
/* WAV of a newer song made on the free plan, owner not paid now: "WAV" + lock; the click opens the upgrade dialog. */
.project-track-action.is-locked { display: inline-flex; align-items: center; gap: 6px; }
.wav-lock-badge { display: inline-flex; align-items: center; justify-content: center; gap: 3px; padding: 2px 7px; border-radius: 999px; background: linear-gradient(90deg, #4f8cff, #9b6bff); color: #fff; font-size: 11px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.work-menu-item.is-locked .wav-lock-badge { margin-left: auto; }
.work-menu-item.is-locked > span:not(.wav-lock-badge) { white-space: nowrap; }
.wav-lock-badge svg { width: 11px; height: 11px; }
[aria-invalid="true"] { border-color: #e77575; }

/* Model picker beside the creation title (product-v2-internal-workbench#5). Interface only. */
.studio-title.has-model-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.studio-title.has-model-picker > .field { flex: 1; min-width: 0; }
.model-picker { position: relative; flex: none; }
.model-picker-button { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 16px 0 18px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 21px; background: #151515; color: #f1f1f3; font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.model-picker-button:hover { background: #1c1c1c; }
.model-picker-button:focus-visible { outline: 2px solid #6f7ff5; outline-offset: 2px; }
.model-picker-caret { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid currentColor; transition: transform .15s; }
.model-picker.open .model-picker-caret { transform: rotate(180deg); }
.model-picker-menu { position: absolute; z-index: 30; right: 0; top: calc(100% + 10px); width: 340px; max-width: calc(100vw - 32px); padding: 8px 0 10px; background: #232325; border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); display: none; }
.model-picker.open .model-picker-menu { display: block; }
/* In the top layer (popover) the list is placed by script next to its button. */
.model-picker-menu[popover] { position: fixed; inset: auto; margin: 0; border: 0; height: auto; overflow: visible; color: inherit; }
.model-picker-menu[popover]:not(:popover-open) { display: none; }
.model-picker-heading { padding: 10px 22px 8px; color: #8d8d92; font-size: 12px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; }
.model-picker-option { display: block; width: 100%; padding: 12px 22px 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.model-picker-option:hover, .model-picker-option:focus-visible { background: #2c2c2f; outline: 0; }
.model-picker-option.selected { background: #353538; }
.model-picker-row { display: flex; align-items: center; gap: 8px; color: #f2f2f2; font-size: 16px; font-weight: 500; }
.model-picker-badge { padding: 1px 7px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 6px; background: #121214; color: #e6e6e6; font-size: 12px; }
/* Per-song price: quieter than the model badges, pushed to the right edge of the row. */
.model-picker-credits { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.model-picker-credits + .model-picker-check { margin-left: 8px; }
.model-picker-check { display: none; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #f2f2f2; color: #232325; font-size: 11px; font-weight: 700; }
.model-picker-option.selected .model-picker-check { display: grid; }
.model-picker-description { display: block; margin-top: 3px; color: #8d8d92; font-size: 13px; line-height: 1.4; }
.model-picker-slot { display: contents; }
.model-picker-option.is-disabled { cursor: not-allowed; }
.model-picker-option.is-disabled:hover { background: none; }
.model-picker-option.is-disabled .model-picker-row, .model-picker-option.is-disabled .model-picker-description { opacity: .45; }
.model-picker-reason { display: block; margin-top: 4px; color: #d9bf8b; font-size: 12px; line-height: 1.4; }
.model-picker-note { flex: 1 0 100%; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px 10px; color: #a8a8ad; font-size: 13px; line-height: 1.4; text-align: right; }
.model-picker-note:empty { display: none; }
.model-picker-note.is-error { color: #eaa09d; }
.model-picker-fallback { flex: none; height: 30px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 15px; background: #151515; color: #f1f1f3; font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.model-picker-fallback:hover { background: #1c1c1c; }
.model-picker-fallback:focus-visible { outline: 2px solid #6f7ff5; outline-offset: 2px; }
@media (max-width: 650px) { .studio-title.has-model-picker { flex-wrap: wrap; } .model-picker-menu { left: 0; right: auto; } .model-picker-note { justify-content: flex-start; text-align: left; } }

/* Recent works load in pages so tab switches stay fast. */
.creation-results-more { display: block; margin: 10px auto 18px; }

/* First-login profile: one compact card using the music workspace palette. */
.profile-setup-shell { background: #101010; color: #f4f4f5; }
.profile-setup-shell .profile-setup-card { width: min(500px, 100%); padding: clamp(24px, 5vw, 36px); background: #191919; border: 1px solid #303033; border-radius: 20px; }
.profile-setup-brand { margin-bottom: 28px; font-size: 20px; font-weight: 700; letter-spacing: -.6px; }
.profile-setup-card h1 { font-size: clamp(26px, 6vw, 32px); line-height: 1.25; margin-bottom: 12px; }
.profile-setup-card > p { color: #a6a6ad; font-size: 14px; line-height: 1.65; margin-bottom: 24px; }
.profile-setup-avatar { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.profile-setup-avatar .profile-avatar { width: 76px; height: 76px; font-size: 28px; }
.profile-setup-avatar p { color: #a6a6ad; font-size: 13px; margin: 6px 0 0; line-height: 1.5; }
.profile-setup-card .avatar-picker { margin: 0 0 24px; max-width: 100%; }
.profile-setup-shell .profile-setup-card .avatar-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.profile-setup-card .profile-setup-submit { background: #5347eb; color: #fff; min-height: 48px; }
.profile-setup-card input { background: #101010; color: #f4f4f5; border: 1px solid #414145; min-height: 48px; }

.profile-setup-shell .profile-setup-avatar .profile-avatar-button { flex: 0 0 auto; margin: 0; }
/* First-login setup has no selected work; keep the music player out of this step. */
body:has(.profile-setup-shell) #mula-playback-dock { display: none; }

.generation-limit-notice { flex-basis: 100%; width: 100%; color: var(--muted); font-size: 12px; line-height: 1.65; white-space: pre-line; padding: 0 0 8px; }
.generation-limit-notice.is-limited { color: #dfb66a; }
/* Why a click did not become a task: quiet amber next to Generate, with the one useful action. */
.submission-notice { flex-basis: 100%; width: 100%; display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 9px 10px 9px 12px; border: 1px solid rgba(214,169,93,.20); border-radius: var(--radius-md); background: rgba(214,169,93,.07); color: #d9bf8b; font-size: 13px; line-height: 1.5; }
.submission-notice[hidden] { display: none; }
.submission-notice > svg, .submission-notice > .icon { flex: none; width: 16px; height: 16px; }
.submission-notice-text { flex: 1; min-width: 0; }
.submission-notice .button.small { flex: none; }
.submission-notice-dismiss { flex: none; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.submission-notice-dismiss:hover { background: rgba(225,255,247,.06); color: var(--text, #e8f2ef); }

.studio-shell .main:has(.music-edit-content) { height: 100vh; padding-bottom: 0; overflow: hidden; }
.content.music-edit-content { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; }
.music-edit-loading { display: grid; min-height: 100%; place-items: center; padding: 32px; color: #e9e9eb; background: #090909; }
.music-edit-loading-card { width: min(320px, 100%); text-align: left; }
.music-edit-loading h1 { margin: 0 0 18px; font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.music-edit-loading-track { height: 2px; overflow: hidden; background: #252527; }
.music-edit-loading-progress { display: block; width: 8%; height: 100%; background: #d9d9dc; transition: width .9s cubic-bezier(.22,.7,.2,1); }
.music-edit-loading.is-running .music-edit-loading-progress { width: 100%; }

/* MuLa Studio is desktop-only. On phones its entry points are hidden (see
   app.js guards) and deep links render .studio-mobile-notice instead of the
   editor. This block is a defensive fallback so the nav entry never shows even
   if the shell is reused across a breakpoint change. */
.studio-mobile-notice { min-height: 60vh; display: grid; place-items: center; padding: 24px 16px; }
.studio-mobile-notice .empty-state { width: 100%; max-width: 420px; }
.studio-mobile-notice .button.primary { margin-top: 14px; }
/* The phone bottom bar gains a sixth "Studio (desktop)" entry when the account
   has Studio access, so it must lay out six even columns. */
.mobile-bar:has(> :nth-child(6)) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 767px) {
  /* The desktop sidebar (and its Studio entry) is hidden on phones; the Studio
     presence moves to the bottom bar as a clearly labelled desktop-only item. */
  .music-edit-nav { display: none !important; }
  .mobile-nav-button.mobile-studio-desktop .mobile-studio-text { display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.05; }
  .mobile-nav-button.mobile-studio-desktop .mobile-studio-badge { font-size: .5rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap; padding: 0 5px; border-radius: 999px; color: #bdeedd; background: rgba(85,239,196,.14); border: 1px solid rgba(85,239,196,.3); }
  .mobile-nav-button.mobile-studio-desktop:not(.active) > .icon { opacity: .8; }
}

/* HeartMuLa v1 / MuLaCover v1: a locked option stays clickable and opens the plan page. */
.model-picker-option.is-locked { cursor: pointer; }
.model-picker-option.is-locked .model-picker-reason { color: var(--accent, #c9a86a); }
.model-picker-lock { margin-left: 6px; font-size: 12px; opacity: .8; }
/* Model tiering: free MusicX songs left on the free plan (option line and the note by the picker). */
.model-picker-allowance { display: block; margin-top: 4px; color: #9fd8c4; font-size: 12px; line-height: 1.4; }
.model-picker-note.is-allowance { color: #9fd8c4; }

/* Account email preferences (profile page) */
.email-setting-row{cursor:pointer}.email-setting-row input{flex:0 0 auto;width:20px;height:20px;margin:0;accent-color:var(--ink)}

/* "My account": creator stats and the creators I follow. */
.profile-creator { width: min(470px, 100%); margin: 12px auto 0; padding: 16px 16px 18px; border: 1px solid #363636; border-radius: 8px; background: #1c1c1c; text-align: left; }
.profile-creator-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.profile-creator-head h3 { margin: 0; font-size: .95rem; font-weight: 500; }
.profile-creator-public { color: #a3a3a3; font-size: .78rem; white-space: nowrap; }
.profile-creator-public:hover, .profile-creator-public:focus-visible { color: #eee; }
.profile-creator-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.profile-creator-stat { display: grid; gap: 2px; min-width: 0; }
.profile-creator-stat strong { color: #eee; font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.profile-creator-stat span { overflow: hidden; color: #a3a3a3; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.profile-creator-subhead { margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid #2c2c2c; color: #a3a3a3; font-size: .8rem; font-weight: 500; }
.profile-creator-count { color: #eee; font-weight: 600; }
.profile-followed-list { display: flex; flex-wrap: wrap; gap: 14px; padding-bottom: 4px; }
.profile-followed { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 60px; flex: none; color: #c9c9cf; font-size: .72rem; text-decoration: none; }
.profile-followed:hover, .profile-followed:focus-visible { color: #eee; }
.profile-followed-avatar { width: 48px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #2a3550; color: #cfe0ff; font-size: 1.1rem; font-weight: 600; }
.profile-followed:hover .profile-followed-avatar, .profile-followed:focus-visible .profile-followed-avatar { box-shadow: 0 0 0 2px #eee; }
.profile-followed-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-followed-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-creator-empty, .profile-creator-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; color: #a3a3a3; font-size: .8rem; }
.profile-creator-status { margin-top: 12px; }
.project-rename-row { display: flex; align-items: center; gap: 10px; }
.project-rename-row .project-rename-input { flex: 1; min-width: 0; }
@media (max-width: 520px) { .profile-creator-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; } }
