:root {
  color-scheme: dark;
  font: 16px/1.5 "Inter", "Helvetica Neue", Arial, sans-serif;
  background: #141311;
  color: #f7f1e8;
  --accent: #ff9950;
  --muted: #c2b7a9;
  --line: #3c352e;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.top {
  min-height: 74px; display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 10px clamp(22px, 6vw, 90px);
  background: #171613; border-bottom: 1px solid var(--line);
}
.brand { display: flex; }
.brand img { width: 166px; height: 45px; object-fit: contain; }
.back, .quiet, .suggestions button, .download {
  color: #f5ece0; background: transparent; border: 1px solid #584a3e; border-radius: 8px;
  padding: 7px 12px; text-decoration: none; font-size: .875rem; white-space: nowrap;
}
.back:hover, .quiet:hover, .suggestions button:hover, .download:hover { background: #392a20; border-color: #9c6846; }
.workspace {
  width: min(1200px, 100% - 64px); margin: clamp(24px, 4vw, 54px) auto;
  display: grid; grid-template-columns: minmax(225px, .85fr) minmax(0, 1.8fr); gap: 20px;
}
.producer, .console { border-radius: 17px; border: 1px solid var(--line); overflow: hidden; }
.producer { min-height: 620px; align-self: stretch; position: relative; background: #22170f; }
.portrait { position: absolute; inset: 0; overflow: hidden; }
.portrait img { display: block; position: absolute; top: 0; right: 0; width: 400%; max-width: none; }
.portrait::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, #16110e 2%, #17100bbf 18%, transparent 47%);
}
.identity { position: absolute; left: clamp(20px, 3vw, 38px); bottom: clamp(24px, 3vw, 38px); }
.identity p { color: var(--accent); margin: 0; font-weight: 650; }
.identity h1 { margin: 1px 0; font-size: clamp(2.75rem, 5.4vw, 5rem); letter-spacing: -.07em; line-height: .98; }
.identity span { color: #e4d6c7; }
.console { display: flex; flex-direction: column; height: clamp(650px, 77vh, 820px); min-width: 0; background: #201d19; }
.console-head {
  display: flex; flex-shrink: 0; justify-content: space-between; align-items: center; gap: 14px;
  border-bottom: 1px solid var(--line); padding: 19px clamp(16px, 3vw, 27px);
}
.console-head h2 { font-size: 1.18rem; margin: 0 0 2px; }
.console-head p, .privacy { margin: 0; font-size: .875rem; color: var(--muted); }
.thread { flex: 1 1 auto; min-height: 175px; overflow: auto; padding: 22px clamp(16px, 3vw, 27px); }
.message { max-width: 89%; width: fit-content; margin-bottom: 15px; overflow-wrap: anywhere; }
.message strong { display: block; font-size: .875rem; color: var(--accent); margin: 0 0 4px 2px; }
.message p { white-space: pre-wrap; margin: 0; }
.bubble { padding: 11px 14px; background: #2d2822; border: 1px solid #42382f; border-radius: 0 12px 12px; }
.message.user { margin-left: auto; }
.message.user strong { text-align: right; color: var(--muted); }
.message.user .bubble { background: #3c291d; border-color: #583b27; border-radius: 12px 0 12px 12px; }
.result audio { display: block; margin: 10px 0; width: min(365px, 100%); }
.downloads { display: flex; flex-wrap: wrap; gap: 7px; }
.files { flex: 0 0 auto; padding: 7px clamp(16px, 3vw, 27px) 10px; border-top: 1px solid var(--line); max-height: 180px; overflow: auto; }
.files ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 7px; }
.files li { display: inline-flex; max-width: 100%; align-items: center; gap: 6px; padding: 4px 8px; background: #302a24; border-radius: 6px; font-size: .875rem; }
.files li span { overflow-wrap: anywhere; }
.files li button { background: none; border: none; color: var(--accent); padding: 2px 4px; }
.files li audio { width: 150px; height: 29px; }
.selectors { display: flex; flex-wrap: wrap; gap: 7px 12px; }
.selectors label { display: flex; align-items: center; gap: 6px; font-size: .875rem; color: var(--muted); min-width: 0; }
select { min-width: 0; max-width: min(205px, 65vw); border: 1px solid #574a3e; color: #f7f1e8; background: #2d2822; border-radius: 6px; padding: 4px 6px; }
.compose { flex-shrink: 0; padding: 12px clamp(16px, 3vw, 27px) 13px; border-top: 1px solid var(--line); }
.suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.suggestions button { color: var(--muted); padding: 5px 9px; }
form { border: 1px solid #625241; border-radius: 11px; padding: 8px; background: #181511; }
textarea {
  color: inherit; background: transparent; border: 0; resize: vertical; width: 100%;
  min-height: 55px; max-height: 135px; padding: 4px 7px 0; outline-offset: 0;
}
textarea::placeholder { color: #a99b8f; }
.actions { display: flex; align-items: center; gap: 9px; }
.file-types { color: var(--muted); font-size: .875rem; }
.send { margin-left: auto; color: #22160e; background: var(--accent); border-radius: 7px; border: 0; padding: 7px 19px; font-weight: 750; }
.send:hover { background: #ffae73; }
.privacy { padding-top: 7px; }
.sr-only { position: absolute; height: 1px; width: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 780px) {
  .workspace { display: grid; grid-template-columns: minmax(0, 1fr); width: calc(100% - 28px); gap: 12px; margin: 14px auto 22px; }
  .producer { min-height: 160px; }
  .portrait img { width: max(145%, 900px); }
  .portrait::after { background: linear-gradient(90deg, #1a120c 2%, #19110dc4 37%, transparent 70%); }
  .identity { bottom: 19px; }
  .console { height: clamp(575px, 73vh, 680px); }
  .thread { min-height: 118px; }
  .files { max-height: 104px; }
  .top { min-height: 58px; padding: 4px 15px; }
}
@media (max-width: 390px) {
  .console-head { align-items: flex-start; }
  .file-types { display: none; }
  .files li audio { width: 100px; }
}

body[data-producer="maya"] { --accent: #e9cd98; }
body[data-producer="maya"] .portrait img { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
body[data-producer="maya"] .identity h1 { font-size: clamp(2.7rem, 4.65vw, 4.6rem); letter-spacing: -.055em; }
body[data-producer="maya"] .send:hover { background: #f3dfb8; }
@media (max-width: 780px) {
  body[data-producer="maya"] .portrait img { object-position: center 28%; }
}
