:root {
  font-family: "Helvetica Neue", "PingFang SC", sans-serif;
  color: #302e29;
  background: #faf9f5;
  --ink: #302e29;
  --muted: #79766d;
  --line: #e6e3db;
  --accent: #c46b4b;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
header {
  height: 68px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  font:
    500 22px Georgia,
    serif;
  letter-spacing: -0.04em;
}
.brand span {
  font:
    11px "PingFang SC",
    sans-serif;
  margin-left: 14px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
header details {
  position: relative;
  font-size: 12px;
}
header details[open] {
  z-index: 10;
}
header details label {
  position: absolute;
  right: 0;
  top: 28px;
  width: 280px;
  background: #fff;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 35px #302e2910;
}
header details button {
  position: absolute;
  right: 15px;
  top: 125px;
}
main {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}
aside {
  padding: 28px 16px;
  border-right: 1px solid var(--line);
  background: #f2f1ec;
  min-width: 0;
}
h1 {
  font:
    400 36px Georgia,
    "Songti SC",
    serif;
  letter-spacing: -0.04em;
  margin: 18px 0 12px;
}
h2 {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}
h3 {
  font-size: 14px;
  font-weight: 500;
}
p {
  line-height: 1.8;
  margin: 8px 0;
  font-size: 14px;
}
.workspace {
  padding: 32px 32px 12px;
  max-width: 920px;
  width: 100%;
  margin: auto;
  min-width: 0;
  min-height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
}
.intro {
  text-align: center;
  margin: auto 0 35px;
  padding: 48px 0 0;
}
.studio-mark {
  font:
    64px Georgia,
    serif;
  color: var(--accent);
}
.intro > p {
  color: var(--muted);
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.muted,
.optional {
  font-size: 12px;
  color: var(--muted);
}
label {
  display: block;
  font-size: 12px;
}
input,
textarea,
select {
  font: inherit;
  color: inherit;
  border: 1px solid #d7d3c9;
  background: #fffdfa;
  border-radius: 8px;
  padding: 9px;
}
textarea {
  display: block;
  width: 100%;
  resize: vertical;
  line-height: 1.8;
}
input[type="password"] {
  width: 100%;
  margin-top: 8px;
}
input[type="number"] {
  width: 60px;
  margin: 0 7px;
}
button {
  font:
    500 12px "Helvetica Neue",
    "PingFang SC",
    sans-serif;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 10px 15px;
  cursor: pointer;
  white-space: nowrap;
}
button:hover {
  filter: brightness(0.95);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  padding: 8px 10px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 25px 0;
}
nav button {
  background: transparent;
  color: var(--ink);
  text-align: left;
  white-space: normal;
  padding: 12px 10px;
}
nav button.active,
nav button:hover {
  background: #e7e5dd;
}
nav small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
  margin-top: 5px;
}
aside > p {
  padding: 8px 6px;
}
.refresh {
  width: 100%;
}
.composer {
  border: 1px solid #dcd8ce;
  border-radius: 18px;
  background: #fffefa;
  box-shadow: 0 4px 15px #302e2908;
  padding: 16px 18px 8px;
  position: relative;
}
.composer textarea {
  background: transparent;
  border: 0;
  padding: 0;
  min-height: 88px;
  resize: vertical;
  font-size: 14px;
  outline: none;
}
.composer-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}
.composer-controls > button {
  margin-left: auto;
}
.upload {
  color: var(--muted);
  cursor: pointer;
  position: relative;
  border: 1px solid var(--line);
  padding: 7px 10px;
  border-radius: 8px;
  overflow: hidden;
}
.upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.options {
  font-size: 12px;
  color: var(--muted);
}
.options[open] .form-row {
  position: absolute;
  bottom: 48px;
  left: 0;
  display: flex;
  gap: 16px;
  background: #fffefa;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  z-index: 2;
  box-shadow: 0 8px 20px #302e2910;
}
.form-row select {
  display: block;
  margin-top: 8px;
}
.composer .muted {
  font-size: 10px;
  margin-top: 12px;
}
.asset-list {
  padding: 0;
  list-style: none;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.asset-list li {
  font-size: 11px;
  background: #f0eee7;
  border: 1px solid var(--line);
  padding: 7px 10px;
  border-radius: 7px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.footer-note {
  text-align: center;
  font-size: 10px;
  color: #9a968a;
  margin: 10px 0;
}
#notice {
  font-size: 12px;
  min-height: 20px;
  margin: 8px 4px;
}
.conversation {
  margin: 0 0 24px;
}
.user-message {
  margin: 4px 0 32px 12%;
  background: #eeeae0;
  padding: 16px 20px;
  border-radius: 16px;
}
.speaker {
  font-size: 11px;
  color: var(--muted);
}
#user-prompt {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.assistant-message {
  padding: 0 4px;
}
.assistant-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  margin-bottom: 22px;
}
.small-mark {
  font-size: 28px;
  color: var(--accent);
}
#stage {
  margin-left: auto;
  font-size: 10px;
  background: #f0eee7;
  border-radius: 5px;
  padding: 5px 8px;
  color: var(--muted);
}
#job-meta {
  font-size: 10px;
}
.tool-log {
  font-size: 12px;
  color: var(--muted);
  border-left: 2px solid #ded9ce;
  padding-left: 14px;
  margin: 10px 0 18px;
}
.tool-log p {
  font-size: 12px;
}
.screen {
  position: relative;
  background: #242626;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
}
.screen > p {
  font-size: 12px;
  color: #c1c6c3;
  padding: 18px;
}
.screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.screen video {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.cost-summary {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.metrics {
  font-size: 11px;
  color: var(--muted);
  margin: 15px 0;
}
pre {
  font:
    11px/1.7 ui-monospace,
    monospace;
  overflow: auto;
  max-height: 280px;
  background: #f0eee7;
  padding: 14px;
  border-radius: 10px;
}
.review {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.review textarea {
  margin-top: 12px;
}
.review .muted {
  font-size: 11px;
}
#error {
  color: #a04a37;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
progress {
  height: 5px;
  width: 100%;
  accent-color: var(--accent);
  margin: 0 0 15px;
}
summary {
  cursor: pointer;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
[hidden] {
  display: none !important;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
.composer:focus-within {
  outline: 2px solid #b58265;
  outline-offset: 3px;
}
::selection {
  background: #e7d2be;
}
* {
  scrollbar-color: #d3cbbd transparent;
  scrollbar-width: thin;
}
@media (max-width: 850px) {
  header {
    height: 62px;
    padding: 0 18px;
  }
  .brand {
    font-size: 20px;
  }
  .brand span {
    display: none;
  }
  main {
    grid-template-columns: minmax(0, 1fr);
  }
  aside {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 18px;
  }
  aside .section-head {
    margin: 0;
  }
  aside > p,
  .refresh {
    display: none;
  }
  nav {
    flex-direction: row;
    overflow: auto;
    margin: 8px 0 0;
  }
  nav button {
    min-width: 170px;
  }
  nav:empty {
    display: none;
  }
  .workspace {
    padding: 18px 18px 12px;
    min-height: calc(100vh - 155px);
  }
  h1 {
    font-size: 29px;
  }
  .intro {
    padding-top: 25px;
    margin-bottom: 28px;
  }
  .user-message {
    margin-left: 5%;
  }
  .composer {
    padding: 14px 14px 8px;
  }
  .composer-controls {
    gap: 8px;
  }
  .composer-controls > button {
    padding: 10px;
  }
  .options[open] .form-row {
    max-width: calc(100vw - 70px);
  }
  .composer .muted {
    line-height: 1.7;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

[hidden] {
  display: none !important;
}
#relay-center {
  max-width: 1320px;
  margin: auto;
  padding: 52px 44px 100px;
}
.relay-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 24px;
}
.relay-heading h1 {
  font-family: Georgia, "Songti SC", serif;
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -1.5px;
  margin: 8px 0 16px;
}
.eyebrow {
  font: 11px monospace;
  letter-spacing: 2px;
  color: #b76544;
}
.relay-tabs {
  display: flex;
  gap: 8px;
  margin: 30px 0 40px;
  border-bottom: 1px solid #dedbd2;
  padding-bottom: 16px;
}
.relay-row {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid #dedbd2;
}
.relay-row h3 {
  margin: 0;
  font-size: 18px;
}
.relay-row p {
  margin: 8px 0 0;
  font-size: 13px;
}
.relay-rank {
  font: 30px Georgia;
  color: #b9b3a5;
}
.relay-row .actions {
  flex-wrap: wrap;
}
#relay-editor,
#blind-form {
  max-width: 760px;
  background: #f0eee6;
  padding: 28px;
  border-radius: 10px;
  margin: 28px 0 48px;
}
#relay-editor label,
#blind-form > label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
#relay-editor input,
#relay-editor select,
#blind-form input,
#blind-form select {
  width: 100%;
  box-sizing: border-box;
}
#relay-editor label:has(input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
}
#relay-editor input[type="checkbox"],
.provider-checks input {
  width: auto;
}
.provider-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 0;
}
.provider-checks label {
  display: flex;
  gap: 8px;
  align-items: center;
}
.blind-intro h2 {
  font:
    30px Georgia,
    "Songti SC",
    serif;
}
.blind-round {
  border-top: 1px solid #c9c4b7;
  padding: 26px 0 36px;
}
.blind-round > h3 {
  font:
    25px Georgia,
    "Songti SC",
    serif;
  margin: 0;
}
.sample-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 24px 0;
}
.sample-card {
  background: #f0eee6;
  border-radius: 10px;
  padding: 20px;
  min-width: 0;
}
.sample-card h4 {
  font-size: 18px;
  margin: 0;
}
.sample-card video {
  width: 100%;
  aspect-ratio: 16/9;
  background: #242724;
  border-radius: 5px;
}
.sample-card form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.sample-card label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
}
.sample-card select {
  width: 100%;
}
.sample-card button {
  align-self: end;
}
.sample-cost,
.round-summary {
  font-size: 13px;
  line-height: 1.7;
}
.round-summary {
  background: #e8e4d8;
  padding: 16px;
  border-left: 3px solid #b76544;
}
#relay-status:not(:empty) {
  padding: 14px 0;
  color: #a34f30;
}
header #open-relays {
  margin-left: auto;
}
header details {
  margin-left: 16px;
}
#relay-editor details {
  margin-bottom: 20px;
}
.blind-round .actions {
  margin-top: 20px;
}
@media (max-width: 760px) {
  #relay-center {
    padding: 28px 18px;
  }
  .relay-heading {
    flex-direction: column;
  }
  .relay-heading h1 {
    font-size: 36px;
  }
  .relay-row {
    grid-template-columns: 32px 1fr;
    gap: 12px;
  }
  .relay-row .actions {
    grid-column: 2;
  }
  .sample-grid {
    grid-template-columns: 1fr;
  }
  .sample-card form {
    grid-template-columns: 1fr 1fr;
  }
  header .brand span {
    display: none;
  }
}

#resource-library {
  max-width: 1220px;
  margin: auto;
  padding: 52px 44px 100px;
}
#resource-import {
  margin: 30px 0;
  background: #f0eee6;
  padding: 24px;
  border-radius: 10px;
}
#resource-form {
  max-width: 720px;
  margin-top: 24px;
}
#resource-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
#resource-form input,
#resource-form select,
#resource-form textarea {
  width: 100%;
  box-sizing: border-box;
}
#resource-cards .blind-round {
  line-height: 1.8;
}
#resource-cards button {
  margin-left: 20px;
}
#production-quality {
  padding: 20px 0;
  border-top: 1px solid #dedbd2;
}
#production-quality ul {
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.8;
}
select[multiple] {
  min-height: 80px;
}
#resource-status:not(:empty) {
  padding: 18px 0;
  color: #a34f30;
}
@media (max-width: 760px) {
  #resource-library {
    padding: 28px 18px;
  }
  header {
    flex-wrap: wrap;
  }
  header #open-relays {
    margin-left: 0;
  }
  header .brand {
    margin-right: auto;
  }
  #resource-cards button {
    margin: 12px 0;
  }
}

.resource-tags {
  font-size: 13px;
  color: #a34f30;
}
.resource-tag-editor {
  display: flex;
  align-items: end;
  gap: 12px;
  max-width: 780px;
  margin: 20px 0;
}
.resource-tag-editor label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.resource-tag-editor input {
  width: 100%;
  box-sizing: border-box;
}
#resource-cards pre {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 12px;
}
#resource-library > .form-row {
  margin: 32px 0 12px;
}
#resource-library > .form-row label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (max-width: 760px) {
  .resource-tag-editor {
    align-items: stretch;
    flex-direction: column;
  }
}

.resource-tags {
  font-size: 13px;
  color: #a34f30;
}
.resource-tag-editor {
  display: flex;
  align-items: end;
  gap: 12px;
  max-width: 780px;
  margin: 20px 0;
}
.resource-tag-editor label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.resource-tag-editor input {
  width: 100%;
  box-sizing: border-box;
}
#resource-cards pre {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 12px;
}
#resource-library > .form-row {
  margin: 32px 0 12px;
}
#resource-library > .form-row label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (max-width: 760px) {
  .resource-tag-editor {
    align-items: stretch;
    flex-direction: column;
  }
}
.options[open] .form-row {
  width: min(720px, calc(100vw - 72px));
  max-height: min(65vh, 540px);
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  box-sizing: border-box;
}
.options .form-row > label {
  min-width: 0;
}
.options .form-row select,
.options .form-row input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
#production-resource-picker {
  grid-column: 1/-1;
}
#production-resource-picker label {
  display: block;
  margin: 12px 0;
}
@media (max-width: 760px) {
  .options[open] .form-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.composer {
  position: relative;
}
.composer-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.composer-tools label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #777;
}
.composer-tools select {
  max-width: 360px;
  border: 0;
  background: transparent;
  padding: 8px;
}
.skill-menu {
  position: absolute;
  bottom: calc(100% - 20px);
  left: 20px;
  right: 20px;
  max-height: 280px;
  overflow: auto;
  background: #fffdf8;
  border: 1px solid #ddd8cd;
  box-shadow: 0 10px 40px #29201818;
  border-radius: 12px;
  padding: 6px;
  z-index: 30;
}
.skill-menu button {
  display: block;
  text-align: left;
  width: 100%;
  background: transparent;
  color: inherit;
  border: 0;
  padding: 12px;
}
.skill-menu button[aria-selected="true"] {
  background: #f0ebe0;
}
.skill-center {
  max-width: 1000px;
  margin: 48px auto;
  padding: 0 28px;
}
.skill-card {
  border-top: 1px solid #ddd8cd;
  padding: 28px 0;
  display: grid;
  gap: 8px;
}
.skill-card h2,
.skill-card p {
  margin: 0;
}
.skill-card button {
  justify-self: end;
}
.skill-card a {
  font-size: 13px;
  color: #9b583f;
}
.skill-license {
  font-size: 12px;
  color: #8c6651;
}
.agent-question {
  padding: 18px;
  background: #f0ebe0;
  border-radius: 12px;
  margin: 16px 0;
}
.agent-question button {
  margin: 4px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #9b583f;
}
@media (max-width: 640px) {
  .composer-tools select {
    max-width: 230px;
  }
  .skill-center {
    margin: 24px auto;
    padding: 0 18px;
  }
}
