* {
  box-sizing: border-box;
}
:root {
  font-family: var(--ui-font);
  color: var(--ui-ink);
  background: var(--ui-page);
  --page: var(--ui-page);
  --surface: var(--ui-page);
  --soft: var(--ui-soft);
  --ink: var(--ui-ink);
  --muted: var(--ui-muted);
  --line: var(--ui-line);
  --accent: var(--ui-ink);
  --tint: var(--ui-soft);
  --shadow: var(--ui-shadow);
}
body {
  margin: 0;
  font-size: 13px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:hover,
a:hover {
  filter: brightness(0.96);
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
input,
select,
textarea {
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px;
  width: 100%;
  min-width: 0;
}
textarea {
  resize: vertical;
}
input[type="range"] {
  padding: 0;
  accent-color: var(--accent);
}
input[type="checkbox"] {
  width: auto;
  accent-color: var(--accent);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--ui-font);
  font-weight: 500;
}
h1 {
  font-size: 26px;
  letter-spacing: -0.025em;
  line-height: 1.18;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.6px;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
p {
  line-height: 1.65;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 12px;
  line-height: 1.6;
}
.icon {
  width: 19px;
  height: 19px;
  display: inline-block;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  border-radius: 10px;
}
.icon-button:hover {
  background: var(--soft);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 11px 16px;
  min-height: 42px;
  background: var(--surface);
  border: 1px solid var(--line);
  white-space: normal;
  line-height: 1.35;
}
.btn.primary {
  background: var(--ink);
  color: var(--page);
  border-color: var(--ink);
}
.btn.accent {
  background: var(--accent);
  color: var(--ui-on-accent);
  border-color: var(--accent);
}
.btn.quiet {
  background: transparent;
  border-color: transparent;
}
.btn.small {
  min-height: 32px;
  padding: 7px 11px;
  font-size: 12px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.between {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 18px;
}
.tag {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.tag.olive {
  color: var(--accent);
  background: var(--tint);
  border-color: transparent;
}
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.7px;
  color: var(--muted);
  margin-bottom: 15px;
}
.shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 228px;
  background: var(--ui-sidebar);
  border-right: 1px solid var(--line);
  padding: 26px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  z-index: 25;
}
.brand {
  font:
    600 21px var(--ui-font),
    sans-serif;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.mark {
  width: 29px;
  height: 28px;
  display: inline-block;
  position: relative;
  border: 6px solid currentColor;
  border-top: 0;
  border-right: 0;
  border-radius: 2px;
}
.mark:after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: currentColor;
  right: 0;
  top: 0;
}
.sidebar .brand {
  padding-left: 12px;
}
.nav-list {
  display: grid;
  gap: 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 9px;
  text-align: left;
  width: 100%;
  font-size: 13px;
  min-height: 41px;
}
.nav-item:hover,
.nav-item.active {
  background: var(--ui-hover);
}
.sidebar-label {
  padding: 0 12px;
  margin: 0 0 10px;
  font-size: 11px;
  color: var(--muted);
}
.sidebar .new {
  background: var(--surface);
  border: 1px solid var(--line);
}
.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 10px;
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border-top: 1px solid var(--line);
  padding: 17px 8px 0;
  text-align: left;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ui-soft);
  color: var(--ui-muted);
  font-size: 13px;
}
.workspace {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 28px;
  position: relative;
}
.mode-switch {
  display: flex;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  padding: 5px;
  box-shadow: 0 3px 10px #252a2404;
}
.mode {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  font-size: 12px;
  border-radius: 24px;
  white-space: nowrap;
  min-height: 39px;
}
.mode.active {
  background: var(--ink);
  color: var(--page);
}
.top-status {
  position: absolute;
  right: 25px;
  top: 39px;
  font-size: 11px;
  color: var(--muted);
}
.mobile-menu {
  display: none;
}
.prototype-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 11px;
  color: var(--muted);
  min-height: 28px;
}
.prototype-bar a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ui-muted);
}
.chat-stage {
  display: flex;
  flex-direction: column;
  max-width: 800px;
  margin: auto;
  min-height: calc(100dvh - 146px);
  padding: 0 30px 24px;
}
.chat-intro {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 275px;
  text-align: center;
  padding: 40px 0 55px;
}
.intro-mark {
  color: var(--ui-muted);
  font-family: var(--ui-font);
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 28px;
}
.chat-intro h1 {
  font-size: 26px;
  letter-spacing: -1.1px;
}
.chat-intro p {
  color: var(--muted);
  margin-top: 12px;
  font-size: 13px;
}
.suggestions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}
.suggestion {
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: 20px;
  font-size: 12px;
  background: var(--surface);
}
.composer {
  background: var(--surface);
  border: 1px solid var(--ui-line);
  border-radius: 20px;
  padding: 16px 14px 10px;
  box-shadow: var(--shadow);
}
.composer textarea {
  padding: 0 6px;
  min-height: 69px;
  resize: none;
  border: 0;
  outline: 0 !important;
  line-height: 1.6;
  background: transparent;
}
.composer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.composer-left {
  display: flex;
  gap: 3px;
  align-items: center;
  min-width: 0;
}
.model-btn {
  border: 0;
  background: var(--soft);
  border-radius: 18px;
  padding: 8px 11px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 170px;
}
.send {
  background: var(--ink);
  color: var(--page);
  border-radius: 50%;
}
.composer-caption {
  text-align: center;
  margin-top: 11px;
  font-size: 10px;
  color: var(--muted);
}
.message-list {
  flex: 1;
  padding: 25px 0 35px;
  display: grid;
  align-content: end;
  gap: 28px;
}
.message {
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}
.message.user {
  margin-left: auto;
  max-width: 86%;
  padding: 12px 18px;
  background: var(--soft);
  border-radius: 18px 18px 4px 18px;
}
.message.answer {
  padding: 0;
  border: 0;
}
.content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 33px 48px 70px;
}
.page-head {
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}
.page-head p {
  margin-top: 10px;
  color: var(--muted);
  max-width: 630px;
}
.page-head h1 {
  font-size: 24px;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.inspiration {
  border-radius: 15px;
  overflow: hidden;
  background: var(--soft);
  position: relative;
  text-align: left;
  min-height: 240px;
  padding: 0;
  display: block;
}
.inspiration img {
  width: 100%;
  height: 275px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.inspiration:hover img {
  transform: scale(1.035);
}
.inspiration:after {
  content: "";
  position: absolute;
  inset: 50% 0 0;
  background: linear-gradient(transparent, #151610b3);
}
.inspiration .caption {
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 15px;
  color: white;
  z-index: 1;
}
.inspiration .caption small {
  color: #ffffffe6;
}
.inspiration strong {
  font-weight: 500;
  display: block;
  margin-top: 5px;
  font-size: 14px;
}
.art-label {
  position: absolute;
  right: 12px;
  top: 12px;
  color: #fff;
  background: #24272350;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 10px;
}
.generation-composer {
  margin: 32px 0;
}
.controls-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.control-chip {
  width: auto;
  padding: 8px 12px;
  border-radius: 18px;
  font-size: 12px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 0 16px;
}
.empty-inline {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 23px;
  border-radius: 14px;
  min-width: 0;
}
.card p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}
.project-visual {
  height: 142px;
  border-radius: 10px;
  background: var(--ui-soft);
  margin: -9px -9px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
}
.project-visual img {
  height: 120px;
  width: 78px;
  object-fit: cover;
  border-radius: 3px;
  transform: rotate(-5deg);
}
.project-visual img + img {
  transform: rotate(7deg);
}
.card .btn {
  margin-top: 18px;
}
.add-card {
  border-style: dashed;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  min-height: 235px;
  color: var(--muted);
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 540px;
}
th {
  text-align: left;
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
}
td,
th {
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
}
.balance-number {
  font: 400 32px var(--ui-font);
  letter-spacing: -2px;
  margin: 18px 0 8px;
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tabs button {
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 12px;
}
.tabs button.active {
  background: var(--soft);
}
.note {
  padding: 14px 16px;
  background: var(--soft);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.note strong {
  color: var(--ink);
  font-weight: 500;
}
.settings-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 30px;
}
.setting {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.setting p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.setting select {
  width: auto;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: grid;
  gap: 8px;
  font-size: 12px;
  line-height: 1.55;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
dialog {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  max-width: min(580px, calc(100vw - 28px));
  width: 580px;
  box-shadow: 0 35px 130px #0004;
  max-height: 88dvh;
}
dialog::backdrop {
  background: #1e221f65;
  backdrop-filter: blur(5px);
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}
.dialog-header h2 {
  font-size: 20px;
}
.dialog-copy {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 20px;
}
.model-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.model-option + .model-option {
  margin-top: 9px;
}
.model-glyph {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 500 16px var(--ui-font);
}
.model-option small {
  display: block;
  margin-top: 4px;
}
.model-option .tag {
  margin-left: auto;
}
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 20px);
  padding: 12px 18px;
  max-width: calc(100vw - 30px);
  border-radius: 12px;
  color: var(--page);
  background: var(--ink);
  font-size: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 100;
  text-align: center;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 200;
  padding: 12px;
  background: var(--surface);
}
.skip:focus {
  top: 10px;
}
.review-link {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}
.plan-content {
  max-width: 1070px;
  margin: auto;
  padding: 45px 36px;
}
.plan-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 45px;
}
.plan-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 25px 0;
}
.plan-flow .card {
  padding: 18px;
}
.plan-flow strong {
  display: block;
  margin-bottom: 7px;
  font-weight: 500;
}
.plan-phase {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  padding: 25px 0;
  border-top: 1px solid var(--line);
}
.plan-phase p {
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0;
}
.plan-phase ul {
  font-size: 13px;
  line-height: 1.8;
  padding-left: 18px;
}
.plan-number {
  font: 400 28px var(--ui-font);
  color: #92987f;
}
.plan-section {
  margin-top: 50px;
}
.plan-decision {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.plan-decision p {
  font-size: 13px;
  margin: 8px 0;
  color: var(--muted);
}
.plan-decision small {
  font-size: 10px;
}
.plan-content details {
  border-bottom: 1px solid var(--line);
  padding: 17px 0;
}
.plan-content summary {
  cursor: pointer;
  font-size: 13px;
}
.plan-content pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.7 var(--ui-font);
}
.plan-content li {
  margin: 6px 0;
}
.plan-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.plan-content .btn {
  text-decoration: none;
}
/* Studio: the editing surface has its own density and theme. */
body.studio {
  --page: #141513;
  --surface: #1d1f1b;
  --soft: #292c25;
  --ink: #e1e5d9;
  --muted: #969d8c;
  --line: #34382e;
  --accent: #bbcaa0;
  --tint: #343e29;
  background: var(--page);
  color: var(--ink);
}
.studio-app {
  height: 100dvh;
  display: grid;
  grid-template-rows: 58px minmax(260px, 1fr) 255px 27px;
  overflow: hidden;
}
.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  gap: 14px;
}
.studio-header .brand {
  font-size: 16px;
}
.studio-header .mark {
  width: 21px;
  height: 20px;
  border-width: 4px;
}
.studio-header .mark:after {
  width: 8px;
  height: 8px;
}
.studio-header .project-title {
  font-size: 12px;
  max-width: 220px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.studio-header .btn.primary {
  background: #c8d6ae;
  color: #1c2415;
  border-color: #c8d6ae;
  font-weight: 500;
}
.studio-main {
  display: grid;
  grid-template-columns: 66px 228px minmax(240px, 1fr) 260px;
  min-height: 0;
}
.tool-rail {
  border-right: 1px solid var(--line);
  padding: 12px 5px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
}
.tool-rail button {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 10px 0;
  border-radius: 8px;
  font-size: 9px;
  min-height: 48px;
  color: var(--muted);
}
.tool-rail button.active {
  color: var(--ink);
  background: var(--soft);
}
.tool-panel {
  padding: 20px 17px;
  border-right: 1px solid var(--line);
  overflow: auto;
  min-width: 0;
}
.tool-panel h3,
.inspector h3 {
  font-size: 12px;
  margin-bottom: 17px;
  font-family: var(--ui-font);
}
.upload-zone {
  border: 1px dashed #545b48;
  padding: 18px 10px;
  border-radius: 9px;
  text-align: center;
  margin-bottom: 18px;
}
.upload-zone p {
  font-size: 11px;
  margin: 9px 0;
  color: var(--muted);
}
.media-item {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 9px;
  align-items: center;
  width: 100%;
  text-align: left;
  font-size: 11px;
}
.media-item img {
  width: 40px;
  height: 52px;
  object-fit: cover;
  border-radius: 3px;
}
.media-item small {
  display: block;
  font-size: 9px;
  margin-top: 6px;
}
.preview-panel {
  padding: 18px 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  gap: 12px;
  background: #10110f;
}
.preview-heading {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.preview-canvas {
  height: calc(100% - 68px);
  min-height: 0;
  aspect-ratio: 9/16;
  position: relative;
  overflow: hidden;
  background: #292b24;
  border: 1px solid #30342a;
}
.preview-canvas img,
.preview-canvas video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.preview-canvas.landscape {
  aspect-ratio: 16/9;
  max-width: 100%;
  height: auto;
  flex: 1;
}
.preview-caption {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 18%;
  text-align: center;
  font-size: clamp(9px, 1.1vw, 15px);
  font-weight: 500;
  background: #2228;
  border-radius: 3px;
  color: white;
  padding: 5px 8px;
}
.playback {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  min-height: 30px;
}
.inspector {
  padding: 20px 17px;
  border-left: 1px solid var(--line);
  overflow: auto;
  font-size: 11px;
}
.inspector .field {
  font-size: 10px;
  margin-top: 15px;
}
.inspector .note {
  font-size: 10px;
  padding: 10px;
  margin-top: 20px;
}
.inspector input,
.inspector select {
  font-size: 11px;
  padding: 8px;
}
.property-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.timeline {
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.timeline-toolbar {
  height: 47px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.timeline-toolbar .icon-button {
  min-width: 32px;
  width: 32px;
  height: 32px;
}
.timeline-toolbar .row {
  gap: 4px;
}
.timeline-toolbar input {
  width: 90px;
}
.timeline-scroll {
  overflow: auto;
  flex: 1;
  position: relative;
  padding: 0 18px 18px 105px;
}
.ruler {
  height: 30px;
  display: flex;
  justify-content: space-between;
  position: relative;
  min-width: 600px;
  cursor: crosshair;
  color: var(--muted);
  font-size: 9px;
  align-items: center;
}
.track {
  position: relative;
  display: flex;
  height: 46px;
  gap: 3px;
  margin: 4px 0;
  min-width: 600px;
}
.track-name {
  position: sticky;
  left: 0;
  width: 83px;
  height: 45px;
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  margin-left: -88px;
  margin-right: 5px;
  flex: none;
  background: var(--page);
  z-index: 2;
}
.clip {
  position: relative;
  flex: none;
  min-width: 22px;
  border-radius: 5px;
  background: #515b43;
  border: 1px solid #717f5e;
  padding: 5px 10px;
  text-align: left;
  font-size: 10px;
  overflow: hidden;
  white-space: nowrap;
  touch-action: none;
}
.clip.selected {
  outline: 2px solid #c5dca4;
  outline-offset: 0;
}
.clip.selected:before,
.clip.selected:after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: #d5e1c3;
}
.clip.selected:before {
  left: 3px;
}
.clip.selected:after {
  right: 3px;
}
.clip.caption-clip {
  background: #504a37;
  border-color: #8c7c55;
}
.clip.audio-clip {
  background: #363e31;
  border-color: #55614a;
  height: 32px;
  margin-top: 4px;
}
.wave {
  height: 14px;
  width: 100%;
  display: block;
  margin-top: 4px;
  background: repeating-linear-gradient(
    90deg,
    #b1c29170 0 2px,
    transparent 2px 5px
  );
  clip-path: polygon(
    0 40%,
    5% 20%,
    10% 45%,
    15% 5%,
    20% 25%,
    25% 45%,
    30% 1%,
    35% 45%,
    40% 20%,
    45% 35%,
    50% 10%,
    55% 40%,
    60% 1%,
    65% 45%,
    70% 10%,
    75% 33%,
    80% 5%,
    85% 40%,
    90% 18%,
    95% 40%,
    100% 22%,
    100% 80%,
    95% 65%,
    90% 95%,
    85% 65%,
    80% 85%,
    75% 60%,
    70% 95%,
    65% 60%,
    60% 90%,
    55% 65%,
    50% 99%,
    45% 65%,
    40% 90%,
    35% 65%,
    30% 90%,
    25% 70%,
    20% 90%,
    15% 60%,
    10% 90%,
    5% 70%,
    0 90%
  );
}
.playhead {
  position: absolute;
  left: 105px;
  top: 9px;
  bottom: 10px;
  width: 1px;
  background: #dfb292;
  pointer-events: none;
  z-index: 5;
}
.playhead:before {
  content: "";
  position: absolute;
  top: 0;
  left: -4px;
  border: 4px solid transparent;
  border-top-color: #dfb292;
}
.studio-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  font-size: 9px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.assistant-sample {
  font-size: 11px;
  line-height: 1.65;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 10px;
  margin: 14px 0;
}
.step {
  display: flex;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.step-circle {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  background: var(--soft);
  border-radius: 50%;
  flex: none;
  font-size: 10px;
}
.step small {
  display: block;
  margin-top: 4px;
}
.mobile-studio-tabs {
  display: none;
}
.studio .gallery {
  grid-template-columns: 1fr;
}
.studio .inspiration img {
  height: 150px;
}
.studio .control-chip {
  font-size: 10px;
}
.studio .btn.accent {
  color: #1c2415;
}
.studio .note strong {
  color: var(--ink);
}
.studio .model-option .tag {
  white-space: normal;
}
@media (min-width: 1600px) {
  .chat-stage {
    max-width: 880px;
  }
  .chat-intro h1 {
    font-size: 28px;
  }
  .studio-main {
    grid-template-columns: 70px 255px minmax(240px, 1fr) 285px;
  }
  .studio-app {
    grid-template-rows: 62px minmax(300px, 1fr) 290px 29px;
  }
}
@media (max-width: 1200px) {
  .top-status {
    display: none;
  }
  .studio-main {
    grid-template-columns: 60px 190px minmax(220px, 1fr) 215px;
  }
  .tool-panel,
  .inspector {
    padding: 17px 12px;
  }
  .content {
    padding: 28px 30px 60px;
  }
  .mode {
    padding: 10px 13px;
  }
  .inspiration img {
    height: 235px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 950px) {
  .shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    width: 190px;
    padding: 24px 10px 12px;
  }
  .topbar {
    padding: 16px 10px;
  }
  .mode {
    font-size: 11px;
    padding: 10px;
  }
  .mode .icon {
    width: 15px;
  }
  .gallery {
    gap: 12px;
  }
  .inspiration img {
    height: 220px;
  }
  .inspiration strong {
    font-size: 13px;
  }
  .studio-main {
    grid-template-columns: 54px 176px minmax(220px, 1fr);
  }
  .inspector {
    display: none;
  }
  .studio-main.inspect-mode {
    grid-template-columns: 54px minmax(200px, 1fr) 215px;
  }
  .studio-main.inspect-mode .tool-panel {
    display: none;
  }
  .studio-main.inspect-mode .inspector {
    display: block;
  }
  .studio-main.inspect-mode .preview-panel {
    grid-column: 2;
    grid-row: 1;
  }
  .mobile-studio-tabs {
    display: flex;
    gap: 5px;
  }
  .mobile-studio-tabs button {
    font-size: 10px;
  }
  .plan-flow {
    grid-template-columns: 1fr 1fr;
  }
  .studio-header .project-title {
    max-width: 140px;
  }
}
@media (max-width: 700px) {
  h1 {
    font-size: 24px;
  }
  .shell {
    display: block;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    width: 240px;
    box-shadow: var(--shadow);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-dismiss {
    position: fixed;
    inset: 0;
    background: #0005;
    z-index: 24;
  }
  .sidebar .mobile-menu {
    display: inline-grid;
  }
  .mobile-menu {
    display: inline-grid;
    position: absolute;
    left: 12px;
    top: 14px;
  }
  .topbar {
    height: 105px;
    padding: 54px 10px 0;
    display: block;
  }
  .mode-switch {
    width: max-content;
    max-width: 100%;
    margin: auto;
    padding: 4px;
    gap: 0;
    box-shadow: none;
  }
  .mode {
    padding: 9px 11px;
    font-size: 11px;
    gap: 5px;
  }
  .mode .icon {
    width: 14px;
    height: 14px;
  }
  .top-status {
    display: block;
    top: 28px;
    right: 19px;
    font-size: 10px;
  }
  .prototype-bar {
    margin-top: 14px;
    font-size: 10px;
    min-height: 25px;
  }
  .chat-stage {
    padding: 0 17px 20px;
    min-height: calc(100dvh - 145px);
  }
  .chat-intro {
    padding: 35px 0 45px;
    min-height: 280px;
  }
  .chat-intro h1 {
    font-size: 23px;
    letter-spacing: -1px;
  }
  .chat-intro p {
    max-width: 245px;
    font-size: 12px;
  }
  .intro-mark {
    font-size: 24px;
    margin-bottom: 22px;
  }
  .suggestions {
    gap: 7px;
    margin-top: 23px;
  }
  .suggestion {
    font-size: 11px;
    padding: 8px 11px;
  }
  .composer {
    padding: 13px 11px 9px;
    border-radius: 17px;
  }
  .composer textarea {
    min-height: 74px;
    font-size: 13px;
  }
  .composer-caption {
    font-size: 9px;
  }
  .model-btn {
    font-size: 10px;
  }
  .composer .icon-button {
    min-width: 34px;
    width: 34px;
    height: 34px;
  }
  .composer-left .web-label {
    display: none;
  }
  .content {
    padding: 28px 18px 45px;
  }
  .page-head {
    align-items: start;
    margin-bottom: 24px;
  }
  .page-head h1 {
    font-size: 22px;
  }
  .page-head p {
    font-size: 12px;
  }
  .page-head .btn {
    font-size: 11px;
    padding: 9px 11px;
  }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .inspiration {
    min-height: 205px;
  }
  .inspiration img {
    height: 225px;
  }
  .inspiration .caption {
    left: 12px;
    bottom: 14px;
  }
  .gallery .inspiration:last-child {
    display: none;
  }
  .gallery.results .inspiration:last-child {
    display: block;
  }
  .inspiration strong {
    font-size: 13px;
  }
  .inspiration .caption small {
    font-size: 10px;
  }
  .cards,
  .two-col {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 20px;
  }
  .generation-composer {
    margin: 25px 0;
  }
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .settings-grid > .nav-list {
    display: flex;
    overflow: auto;
  }
  .settings-grid > .nav-list button {
    white-space: nowrap;
    width: auto;
  }
  .setting {
    gap: 10px;
  }
  .setting select {
    max-width: 130px;
    font-size: 12px;
  }
  .plan-content {
    padding: 25px 20px;
  }
  .plan-header {
    margin-bottom: 25px;
    font-size: 12px;
  }
  .plan-content h1 {
    font-size: 24px;
  }
  .plan-flow .card {
    padding: 14px;
    font-size: 12px;
  }
  .plan-phase {
    grid-template-columns: 43px 1fr;
    gap: 14px;
  }
  .plan-number {
    font-size: 24px;
  }
  .plan-phase h2 {
    font-size: 18px;
  }
  .plan-section {
    margin-top: 35px;
  }
  dialog {
    padding: 21px;
  }
  .dialog-header h2 {
    font-size: 18px;
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
  .studio-app {
    height: 100dvh;
    grid-template-rows: 54px minmax(245px, 1fr) 220px 26px;
  }
  .studio-header {
    padding: 0 11px;
    gap: 8px;
  }
  .studio-header .brand {
    font-size: 14px;
  }
  .studio-header .project-title,
  .studio-header .saved-label,
  .studio-header .back-platform {
    display: none;
  }
  .studio-header .row {
    gap: 5px;
  }
  .studio-header .btn {
    font-size: 11px;
    min-height: 34px;
    padding: 8px 10px;
  }
  .studio-main {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .tool-rail {
    padding: 7px 3px;
    gap: 2px;
  }
  .tool-rail button {
    font-size: 8px;
    padding: 9px 0;
  }
  .tool-rail .icon {
    width: 17px;
    height: 17px;
  }
  .tool-panel {
    display: none;
  }
  .preview-panel {
    padding: 10px 12px 4px;
  }
  .preview-heading {
    font-size: 9px;
  }
  .preview-caption {
    font-size: 10px;
  }
  .studio-main.media-mode,
  .studio-main.inspect-mode {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .studio-main.media-mode .tool-panel {
    display: block;
  }
  .studio-main.media-mode .preview-panel {
    display: none;
  }
  .studio-main.inspect-mode .preview-panel {
    display: none;
  }
  .studio-main.inspect-mode .inspector {
    display: block;
    grid-column: 2;
  }
  .studio-main .media-item img {
    width: 48px;
    height: 67px;
  }
  .tool-panel,
  .inspector {
    padding: 18px;
  }
  .timeline-toolbar {
    height: 43px;
    padding: 0 8px;
  }
  .timeline-toolbar .row {
    gap: 0;
  }
  .timeline-toolbar input {
    width: 55px;
  }
  .timeline-scroll {
    padding-left: 65px;
    padding-right: 12px;
  }
  .track-name {
    width: 48px;
    margin-left: -52px;
    margin-right: 4px;
    font-size: 8px;
  }
  .playhead {
    left: 65px;
  }
  .timeline-toolbar .timeline-wide {
    display: none;
  }
  .studio-foot {
    font-size: 8px;
    padding: 0 8px;
  }
  .studio-foot .wide-only {
    display: none;
  }
  .studio-header .icon-button {
    width: 32px;
    min-width: 32px;
    height: 32px;
  }
  .preview-canvas {
    height: calc(100% - 60px);
  }
  .playback {
    gap: 14px;
    font-size: 10px;
  }
  .studio-main .tool-rail .active {
    background: var(--soft);
  }
  .studio .dialog-actions .btn {
    font-size: 12px;
  }
}
@media (max-width: 370px) {
  .mode {
    padding: 9px 8px;
    font-size: 10px;
  }
  .mode .icon {
    display: none;
  }
  .chat-intro h1 {
    font-size: 21px;
  }
  .composer .web-button {
    display: none;
  }
  .composer-left {
    gap: 0;
  }
  .studio-header .brand .mark {
    display: none;
  }
  .studio-header .btn {
    padding: 8px;
  }
  .studio-header .row {
    gap: 3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.sidebar-close {
  display: none;
}
.plan-decision small {
  overflow-wrap: anywhere;
}
.plan-decision > .row {
  flex-wrap: wrap;
}
.plan-decision .tag {
  white-space: normal;
}
@media (max-width: 700px) {
  .sidebar-close {
    display: inline-grid;
  }
}
.track-name {
  position: absolute;
  left: -89px;
  margin: 0;
  width: 80px;
  background: var(--page);
}
@media (max-width: 700px) {
  .track-name {
    left: -54px;
    width: 46px;
  }
}
.input-modes {
  margin-bottom: 17px;
  gap: 5px;
}
.input-modes button {
  font-size: 12px;
}
.reference-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.reference-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 17px 14px;
  border: 1px dashed var(--line);
  border-radius: 11px;
  font-size: 12px;
  min-width: 0;
}
.reference-slot span {
  min-width: 0;
}
.reference-slot small {
  display: block;
  font-size: 10px;
  margin-top: 5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.reference-note {
  font-size: 10px;
  color: var(--muted);
  margin: 10px 0 18px;
}
@media (max-width: 700px) {
  .input-modes button {
    font-size: 11px;
    padding: 9px;
  }
  .reference-slots {
    grid-template-columns: 1fr 1fr;
  }
  .reference-slot {
    padding: 12px;
    font-size: 11px;
    gap: 8px;
  }
  .reference-slot .icon {
    width: 14px;
  }
  .reference-slot:last-child:nth-child(3) {
    grid-column: 1/-1;
  }
}

/* Platform shell: familiar navigation and one focused working area. */
body {
  background: var(--ui-page);
  color: var(--ui-ink);
}
.shell {
  grid-template-columns: 248px minmax(0, 1fr);
}
.sidebar {
  width: 248px;
  padding: 20px 12px 12px;
  border-right: 0;
  gap: 24px;
  background: var(--ui-sidebar);
  overflow-y: auto;
}
.sidebar .brand {
  font:
    600 20px var(--ui-font);
  letter-spacing: -0.025em;
  padding: 3px 12px;
}
.nav-list {
  gap: 2px;
}
.nav-item {
  font-size: 13px;
  padding: 10px 12px;
  min-height: 40px;
}
.sidebar .new {
  background: transparent;
  border: 0;
}
.sidebar .new:hover {
  background: var(--ui-hover);
}
.nav-item.editor-link {
  margin-top: 8px;
}
.editor-link .icon:last-child {
  margin-left: auto;
  width: 15px;
}
.sidebar-label {
  text-transform: none;
  font-size: 12px;
}
.sidebar-history .nav-item {
  font-size: 13px;
}
.sample-balance {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
}
.profile {
  border: 0;
  padding: 10px;
  border-radius: 10px;
}
.profile:hover {
  background: var(--ui-hover);
}
.topbar {
  height: 64px;
  padding: 12px 24px;
  justify-content: space-between;
  display: flex;
}
.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.page-name {
  font-size: 16px;
  font-weight: 500;
}
.top-status {
  position: static;
  font-size: 11px;
}
.prototype-footer {
  padding: 12px 16px;
}
.prototype-bar {
  font-size: 11px;
  margin: 0;
  min-height: 24px;
  flex-wrap: wrap;
  text-align: center;
}
.prototype-bar .dot {
  display: none;
}
.chat-stage {
  width: 100%;
  max-width: 828px;
  min-height: calc(100dvh - 118px);
  padding: 0 28px 20px;
}
.chat-stage.welcome {
  justify-content: center;
  padding-bottom: 12vh;
}
.chat-intro {
  flex: 0;
  min-height: 0;
  padding: 18px 0 28px;
}
.chat-intro h1 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.025em;
}
.chat-intro .suggestions {
  order: 2;
  margin-top: 22px;
}
.suggestion {
  border: 1px solid var(--line);
  background: transparent;
  font-size: 12px;
  color: var(--muted);
}
.composer {
  border: 0;
  background: var(--ui-soft);
  box-shadow: none;
  border-radius: 24px;
  padding: 18px 16px 12px;
}
.composer textarea {
  min-height: 56px;
  font-size: 14px;
}
.composer textarea:focus-visible {
  outline: 0;
}
.composer:focus-within {
  box-shadow: 0 0 0 2px var(--ui-input-line);
}
.composer .model-btn {
  background: transparent;
  font-size: 12px;
}
.composer-caption {
  font-size: 11px;
  line-height: 1.5;
}
.composer-left .icon {
  flex-shrink: 0;
}
.message.user {
  background: var(--ui-soft);
  border-radius: 22px;
}
.message.answer {
  border: 0;
  padding: 0;
}
.chat-stage.has-messages .composer {
  position: sticky;
  bottom: 12px;
}
.content {
  padding-top: 35px;
}
.sidebar-dismiss {
  cursor: pointer;
}
@media (max-width: 950px) and (min-width: 701px) {
  .shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .sidebar {
    width: 220px;
  }
  .top-status {
    display: none;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    width: min(280px, calc(100vw - 40px));
    padding: 18px 12px 12px;
    box-shadow: none;
  }
  .topbar {
    height: 62px;
    padding: 12px 16px 12px 58px;
    display: flex;
  }
  .mobile-menu {
    top: 12px;
    left: 12px;
  }
  .top-status {
    display: none;
  }
  .page-name {
    font-size: 15px;
  }
  .chat-stage {
    min-height: calc(100dvh - 134px);
    padding: 0 16px 16px;
  }
  .chat-stage.welcome {
    padding-bottom: 7vh;
  }
  .chat-intro {
    padding: 20px 0 24px;
  }
  .chat-intro h1 {
    font-size: 22px;
  }
  .suggestions {
    gap: 6px;
  }
  .suggestion {
    font-size: 11px;
    padding: 9px 10px;
  }
  .composer {
    padding: 15px 10px 10px;
    border-radius: 22px;
  }
  .composer textarea {
    font-size: 14px;
    padding: 0 6px;
  }
  .composer-left {
    gap: 0;
  }
  .composer .model-btn {
    font-size: 11px;
    padding: 8px;
    max-width: 150px;
  }
  .composer .model-btn .icon:first-child {
    display: none;
  }
  .composer-caption {
    font-size: 10px;
  }
  .prototype-footer {
    padding: 5px 16px 12px;
  }
  .prototype-bar {
    font-size: 10px;
    gap: 5px;
  }
}

/* Compact interface scale; retain a comfortable editable field on touch screens. */
.message { font-size: 14px; line-height: 1.65; }
.page-head p, .card p { line-height: 1.6; }
@media (max-width: 700px) { .composer textarea { font-size: 16px; } }

/* Live project library shares the compact application typography. */
.library-content { max-width: 1040px; }
.library-toolbar { display:flex; gap:8px; align-items:center; margin:20px 0 12px; flex-wrap:wrap; }
.library-toolbar input { min-width:0; flex:1; width:240px; padding:9px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:inherit; font:inherit; }
.library-summary { display:flex; flex-wrap:wrap; gap:12px 22px; color:var(--muted); margin:16px 0 24px; }
.library-summary a { color:inherit; text-decoration:underline; text-underline-offset:3px; }
.library-count,.library-footnote { color:var(--muted); font-size:12px; margin:12px 0; }
.library-list { border-top:1px solid var(--line); }
.library-row { display:flex; gap:16px; align-items:center; padding:18px 0; border-bottom:1px solid var(--line); }
.library-row-copy { flex:1; min-width:0; overflow-wrap:anywhere; }
.library-row h3 { font-size:14px; line-height:1.5; margin:0 0 4px; font-weight:500; }
.library-row h3 a { color:inherit; text-decoration:none; }
.library-row p,.library-row small { font-size:12px; line-height:1.6; color:var(--muted); margin:0; }
.library-row-actions { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.library-badge { display:grid; place-items:center; width:48px; height:48px; flex-shrink:0; background:var(--surface); border-radius:12px; font-size:20px; }
.library-thumb { width:80px; height:52px; flex-shrink:0; object-fit:contain; background:#111; border-radius:8px; }
.library-pagination { display:flex; justify-content:space-between; gap:16px; margin-top:18px; }
.library-player { display:block; width:100%; max-height:60vh; background:#000; border-radius:10px; margin:16px 0; }
.library-storage { margin:24px 0; }
.library-storage strong { font-size:20px; font-weight:500; }
.library-storage progress { display:block; width:100%; height:8px; margin:18px 0; accent-color:var(--ink); }
.library-storage p { color:var(--muted); }
.library-error { color:var(--ink); margin-top:12px; overflow-wrap:anywhere; }
@media(max-width:700px) {
 .library-row { flex-wrap:wrap; gap:10px; padding:16px 0; }
 .library-row-copy { flex-basis:calc(100% - 94px); }
 .library-row > .btn,.library-row-actions { margin-left:auto; }
 .library-toolbar input { flex-basis:100%; font-size:16px; }
 .library-summary { gap:10px 16px; }
}

.sidebar { overflow-y:auto; overscroll-behavior:contain; }
.space-switch {display:flex;align-items:center;gap:12px;padding:10px 12px;margin:16px 0 8px;border:1px solid var(--line);border-radius:10px;min-width:0;color:var(--ink);text-decoration:none}
.space-switch:hover {background:var(--soft)}
.space-switch>span {min-width:0;flex:1}
.space-switch small {display:block;color:var(--muted);font-size:11px;margin-bottom:4px}
.space-switch strong {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500}
.space-switch svg {width:16px;height:16px;flex-shrink:0}
.space-row h3 {overflow-wrap:anywhere}

.work-style-choice { min-width:0; width:100%; margin-top:12px; }
.work-style-choice label { display:grid; gap:6px; }
.work-style-choice select { width:100%; min-width:0; }
.work-style-choice p { color:var(--muted, #777); font-size:12px; line-height:1.5; margin:8px 0; }
