:root {
  --ink: #252d29;
  --muted: #7a8079;
  --green: #1e5143;
  --green-dark: #133b30;
  --green-light: #edf2ed;
  --paper: #f6f5f1;
  --line: #e4e5dd;
  --white: #fff;
  --gold: #a98e5e;
  --danger: #a34c36;
  --radius: 12px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #a7bc98;
  outline-offset: 3px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #93ae99;
  outline-offset: 1px;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button {
  color: inherit;
}
button:disabled:hover {
  transform: none;
}
.hidden {
  display: none !important;
}
.app-shell {
  display: grid;
  grid-template-columns: 224px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 38px 22px 22px;
  border-right: 1px solid var(--line);
  background: #eeefe8;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-family: Georgia, serif;
  font-size: 29px;
  letter-spacing: -1.3px;
  line-height: 1;
}
.brand-mark {
  font-size: 43px;
  color: var(--green);
  font-family: Georgia, serif;
  line-height: 1;
}
.brand-sub {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 8px;
  letter-spacing: 2.3px;
  margin-top: 10px;
  color: #777e71;
}
.sidebar-label {
  margin: 58px 12px 16px;
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #969b91;
  font-weight: 650;
}
.nav-button {
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 13px 14px;
  gap: 14px;
  border-radius: 7px;
  font-size: 13px;
  margin-bottom: 7px;
  color: #697166;
  transition: background 0.15s;
}
.nav-button > span:first-child {
  font-size: 20px;
  width: 20px;
  line-height: 1;
}
.nav-button.active {
  background: #dce4d9;
  color: var(--green);
  font-weight: 650;
}
.nav-button:hover {
  background: #e1e7dc;
}
.nav-shortcut {
  margin-left: auto;
  font-size: 10px;
  opacity: 0.6;
  font-weight: 400;
}
.sidebar-note {
  margin-top: auto;
  padding: 45px 12px 34px;
}
.small-diamond {
  font-size: 28px;
  color: #8d9b80;
}
.sidebar-note p {
  font-family: Georgia, serif;
  font-size: 20px;
  line-height: 1.5;
  color: #6e7866;
  margin: 15px 0 12px;
}
.sidebar-note > span:last-child {
  font-size: 10px;
  color: #8d9587;
}
.connection {
  border-top: 1px solid #dce0d5;
  padding: 20px 9px 0;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: #657260;
}
.status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #789373;
}
.status-dot.off {
  background: #c19157;
}
.local-label {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 1.4px;
  color: #9da593;
  margin: 8px 9px 0 24px;
}
main {
  min-width: 0;
  padding: 0 42px;
}
.topbar {
  height: 77px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.breadcrumb {
  color: #969c91;
}
.slash {
  color: #b5b8af;
  padding: 0 15px;
}
.topbar-right {
  font-size: 9px;
  letter-spacing: 1.2px;
  color: #858b7e;
}
.topbar-right span {
  margin-left: 15px;
  color: #adb2a5;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 38px 0 31px;
  gap: 20px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.9px;
  color: #8a927e;
  font-weight: 600;
  margin-bottom: 10px;
}
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 38px;
  letter-spacing: -1.2px;
  line-height: 1.2;
}
.page-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 11px 17px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 550;
  transition: background 0.15s;
}
.button.secondary {
  background: transparent;
}
.button.secondary:hover {
  background: #e9ede4;
}
.button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.button.primary:hover {
  background: var(--green-dark);
}
.button span {
  font-size: 16px;
}
.full-width {
  width: 100%;
  justify-content: space-between;
}
.studio-layout {
  display: grid;
  grid-template-columns: minmax(330px, 410px) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}
.control-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.mode-switch {
  display: flex;
  background: #f1f2ed;
  margin: 19px 20px 0;
  padding: 4px;
  border-radius: 7px;
}
.mode-switch button {
  width: 50%;
  border: 0;
  background: transparent;
  padding: 10px 4px;
  border-radius: 5px;
  font-size: 11px;
  color: #7a8176;
}
.mode-switch button span {
  margin-right: 5px;
  font-size: 15px;
}
.mode-switch button.active {
  background: #fff;
  color: var(--green);
  box-shadow: 0 1px 4px #243b2410;
  font-weight: 600;
}
.mode-description {
  font-size: 11px;
  color: var(--muted);
  padding: 12px 23px 19px;
  line-height: 1.65;
}
.control-section {
  padding: 22px;
  border-top: 1px solid var(--line);
}
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.section-label h2 {
  font-size: 13px;
  font-weight: 600;
}
.section-label h2 > span {
  font-size: 9px;
  letter-spacing: 0.8px;
  margin-right: 10px;
  color: #9ca890;
}
.section-label h3 {
  font-size: 11px;
  font-weight: 600;
}
.subtle {
  font-size: 7px;
  letter-spacing: 1.1px;
  color: #9a9f91;
}
.text-button {
  background: transparent;
  border: 0;
  padding: 3px 0;
  font-size: 10px;
  color: var(--green);
  text-underline-offset: 3px;
}
.text-button:hover {
  text-decoration: underline;
}
.hint {
  font-size: 10px;
  color: #8a8e84;
  line-height: 1.6;
}
.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.asset-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8f8f4;
  padding: 0;
  overflow: hidden;
  min-width: 0;
}
.asset-card img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  display: block;
}
.asset-card.selected {
  border: 2px solid #66896d;
}
.asset-card .asset-name {
  display: block;
  padding: 5px;
  font-size: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  background: #fff;
}
.asset-check {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #fff;
  border: 1px solid #cbd2c5;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  display: grid;
  place-items: center;
  color: transparent;
}
.selected .asset-check {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.upload-zone {
  border: 1px dashed #cdd4c5;
  border-radius: 6px;
  padding: 15px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: #fafbf8;
  position: relative;
}
.upload-zone:hover,
.upload-zone.dragging {
  border-color: var(--green);
  background: #edf3e9;
}
.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  bottom: 0;
  left: 50%;
}
.upload-zone:focus-within {
  outline: 2px solid var(--green);
}
.upload-plus {
  font-size: 21px;
  color: #7f9275;
  width: 22px;
  text-align: center;
}
.upload-zone strong {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: #697660;
}
.upload-zone small {
  display: block;
  font-size: 8px;
  color: #9ba392;
  margin-top: 3px;
}
.upload-zone.compact {
  padding: 10px;
  margin-top: 9px;
}
.style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.style-card {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
  min-width: 0;
}
.style-card.selected {
  border-color: #6d8970;
  background: #f2f5ef;
}
.style-swatch {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  border-radius: 50%;
  border: 4px solid #dadbd3;
  box-shadow:
    inset 0 1px 2px #38473818,
    0 1px 2px #38473813;
  background: #fafbf6;
}
.style-swatch.yellow {
  border-color: #d6bd80;
}
.style-swatch.rose {
  border-color: #caa497;
}
.style-card strong {
  font-size: 10px;
  display: block;
  font-weight: 500;
}
.style-card small {
  font-size: 8px;
  display: block;
  color: #989d91;
}
.style-card .check {
  margin-left: auto;
  color: var(--green);
  font-size: 11px;
}
.reference-label {
  margin-top: 22px;
  margin-bottom: 5px;
}
.reference-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.reference-grid .asset-card {
  width: 62px;
}
.reference-grid .asset-card img {
  height: 67px;
}
.reference-grid .asset-card .asset-name {
  display: none;
}
.reference-grid .asset-card.selected {
  border-width: 1px;
}
.field-label {
  display: block;
  font-size: 10px;
  color: #5b6557;
  margin: 17px 0 7px;
  font-weight: 550;
}
.field-label span {
  font-weight: 400;
  color: #9aa190;
  font-size: 9px;
  margin-left: 4px;
}
input:not([type="checkbox"]):not([type="range"]):not([type="file"]),
textarea,
select {
  width: 100%;
  border: 1px solid #e0e3d9;
  border-radius: 6px;
  background: #fcfcf9;
  color: #535e4f;
  padding: 10px;
  font-size: 11px;
}
input[type="number"] {
  height: 37px;
}
textarea {
  resize: vertical;
  line-height: 1.7;
  min-height: 70px;
}
input::placeholder,
textarea::placeholder {
  color: #a9b0a0;
}
#model,
#verifyModel {
  font-size: 10px;
}
.model-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.model-advice {
  padding: 11px 12px;
  margin-top: 9px;
  border: 1px solid #e3e9db;
  border-radius: 6px;
  background: #f5f7f0;
  font-size: 10px;
  line-height: 1.7;
  color: #64705c;
}
.model-advice .hint {
  margin-top: 6px;
}
.model-advice a {
  display: inline-block;
  margin-top: 8px;
  font-size: 9px;
  color: var(--green);
  text-underline-offset: 3px;
}
.temperature-default {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: #87917b;
  margin-top: 9px;
}
.temperature-default input {
  accent-color: var(--green);
}
.run-progress {
  flex: 1;
}
.run-progress progress {
  display: block;
  width: 100%;
  max-width: 450px;
  height: 6px;
  margin-top: 10px;
  accent-color: var(--green);
}
.cli-details {
  margin-top: 25px;
}
.cli-details .hint {
  margin: 12px 0;
}
.cli-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 15px;
}
.cli-actions a {
  text-decoration: none;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.range-heading {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  margin: 18px 0 10px;
  color: #64705c;
}
.range-heading output {
  background: #eef2e9;
  border-radius: 3px;
  font-size: 9px;
  padding: 1px 5px;
}
input[type="range"] {
  width: 100%;
  height: 3px;
  accent-color: var(--green);
  display: block;
  margin: 10px 0 8px;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  color: #a0a696;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 0 6px;
  cursor: pointer;
}
.toggle-row strong {
  font-size: 10px;
  font-weight: 550;
  display: block;
}
.toggle-row small {
  font-size: 9px;
  color: #959e8c;
  display: block;
  margin-top: 3px;
}
.toggle-row input {
  appearance: none;
  flex: 0 0 30px;
  width: 30px;
  height: 17px;
  background: #cdd4c4;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
}
.toggle-row input:after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: white;
  transition: left 0.15s;
}
.toggle-row input:checked {
  background: #4d7455;
}
.toggle-row input:checked:after {
  left: 16px;
}
.advanced {
  border-top: 1px solid #eceee6;
  margin-top: 15px;
}
.advanced summary {
  font-size: 10px;
  cursor: pointer;
  padding: 13px 0 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  color: #65715b;
}
.advanced summary::-webkit-details-marker {
  display: none;
}
.advanced[open] summary span {
  transform: rotate(45deg);
}
.details-body {
  padding-bottom: 4px;
}
.reset-button {
  margin-top: 18px;
  color: #919a88;
  font-size: 9px;
}
.create-footer {
  padding: 22px;
  background: #f9faf6;
  border-top: 1px solid var(--line);
}
.plan-summary {
  margin-bottom: 17px;
}
.tiny-label {
  font-size: 8px;
  letter-spacing: 1.4px;
  color: #96a088;
}
.plan-summary p {
  font-size: 10px;
  color: #8a9380;
  line-height: 1.7;
  margin-top: 7px;
}
.plan-numbers {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 8px 0;
}
.plan-numbers strong {
  font-size: 23px;
  font-family: Georgia, serif;
  font-weight: 400;
  color: var(--green);
}
.plan-numbers strong span {
  font-size: 11px;
  color: #8c9682;
  font-family: inherit;
}
.plan-summary details {
  font-size: 10px;
  color: #68775d;
  margin-top: 10px;
}
.plan-summary pre {
  white-space: pre-wrap;
  max-height: 200px;
  overflow: auto;
  font-size: 9px;
  background: #eef2e7;
  padding: 10px;
}
#generate-button {
  margin-top: 8px;
}
.footer-note {
  text-align: center;
  font-size: 8px;
  color: #9aa48d;
  margin-top: 12px;
}
.collection-panel {
  min-width: 0;
}
.collection-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0 18px;
}
.collection-heading .eyebrow {
  font-size: 8px;
  margin-bottom: 5px;
}
.collection-heading h2 {
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.6px;
}
.collection-heading h2 span {
  font-family: Arial, sans-serif;
  font-size: 9px;
  display: inline-block;
  background: #e8ebdf;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 9px;
  vertical-align: middle;
  color: #859077;
  letter-spacing: 0;
}
.view-controls select {
  background: transparent;
  font-size: 10px;
  padding: 7px;
  max-width: 135px;
}
.gallery-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.filter-tabs {
  display: flex;
  gap: 15px;
  flex-shrink: 0;
}
.filter-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 14px 0;
  font-size: 10px;
  color: #9aa08f;
  white-space: nowrap;
}
.filter-tabs button.active {
  color: var(--green);
  border-bottom-color: var(--green);
}
#gallery-search {
  max-width: 170px;
  font-size: 9px;
  background: transparent;
  border: 0;
  padding: 7px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}
.result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  position: relative;
}
.result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px #25362b0b;
}
.result-image-button {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  position: relative;
  background: #fff;
  aspect-ratio: 1/1.08;
  overflow: hidden;
}
.result-image-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.4s;
}
.result-card:hover img {
  transform: scale(1.035);
}
.result-index {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 8px;
  color: #a9ae9f;
  background: #fff9;
  padding: 3px 5px;
  border-radius: 3px;
  letter-spacing: 1px;
}
.result-expand {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  background: #f8f9f4d9;
  border: 1px solid #e7eade;
  border-radius: 50%;
  color: #7b886e;
  font-size: 12px;
  opacity: 0;
}
.result-card:hover .result-expand {
  opacity: 1;
}
.result-info {
  padding: 12px 13px;
  border-top: 1px solid #f1f2ec;
}
.result-info h3 {
  font-size: 11px;
  font-weight: 550;
  margin-bottom: 5px;
}
.result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  font-size: 8px;
  color: #9ca38f;
}
.badge {
  font-size: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 3px;
  padding: 2px 5px;
  color: #6a8465;
  background: #edf3e8;
  white-space: nowrap;
}
.badge.review {
  color: #a17c4f;
  background: #f6eee1;
}
.badge.neutral {
  color: #87917c;
  background: #f0f2eb;
}
.result-failure {
  display: grid;
  place-content: center;
  aspect-ratio: 1/1.08;
  text-align: center;
  color: #ae8b70;
  background: #faf6ef;
  font-size: 11px;
  gap: 12px;
}
.result-failure span {
  font-size: 32px;
}
.collection-footnote {
  margin: 20px 0 0;
  font-size: 9px;
  color: #a0a794;
  text-align: center;
}
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 75px 20px;
  background: #eff1e9;
  border: 1px dashed #d7decc;
  border-radius: 9px;
  color: #8c9880;
}
.empty-state .empty-icon {
  font-size: 40px;
  margin-bottom: 14px;
}
.empty-state h3 {
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 400;
  color: #66775b;
}
.empty-state p {
  font-size: 11px;
  margin: 12px auto 0;
  max-width: 260px;
  line-height: 1.8;
}
.page-footer {
  margin-top: 45px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 8px;
  color: #a4ac98;
  letter-spacing: 1px;
}
.page-footer > span:last-child {
  letter-spacing: 0;
}
.notice {
  background: #f2eada;
  border: 1px solid #e4d8bd;
  color: #8c7044;
  padding: 12px 16px;
  border-radius: 7px;
  margin-bottom: 20px;
  font-size: 11px;
}
.run-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #e5ecdf;
  border: 1px solid #cddbbf;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 22px;
}
.run-banner strong {
  font-size: 12px;
}
.run-banner p {
  font-size: 10px;
  color: #7d8c70;
  margin-top: 4px;
}
.run-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}
.running-orb {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5b8052;
  margin-right: 8px;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
.error-message {
  color: var(--danger);
  background: #f9ece6;
  border: 1px solid #f0d8ca;
  padding: 10px;
  border-radius: 6px;
  font-size: 11px;
  margin-bottom: 12px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 13px 22px;
  border-radius: 8px;
  background: #254a39;
  color: #f6f8f0;
  box-shadow: 0 8px 25px #1b2c2a25;
  font-size: 12px;
  z-index: 99;
  max-width: 90vw;
}
.toast.error {
  background: #8f4937;
}
dialog {
  border: 1px solid #dce2d3;
  border-radius: 14px;
  background: #f7f8f2;
  padding: 30px;
  color: var(--ink);
  max-height: 90vh;
  width: min(1060px, 92vw);
  overflow: auto;
}
dialog::backdrop {
  background: #182d246e;
  backdrop-filter: blur(4px);
}
.dialog-close {
  position: absolute;
  top: 12px;
  right: 15px;
  border: 1px solid #dae1d0;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: #fff;
  color: #778569;
  font-size: 20px;
  z-index: 1;
}
.detail-heading {
  margin: 0 30px 20px 0;
}
.detail-heading h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 28px;
  margin: 7px 0;
}
.detail-heading p {
  font-size: 11px;
  color: #8c977f;
}
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.comparison.single {
  grid-template-columns: 1fr;
}
.comparison figure {
  margin: 0;
  min-width: 0;
}
.comparison img {
  width: 100%;
  height: 410px;
  object-fit: contain;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.comparison figcaption {
  font-size: 10px;
  color: #89977c;
  margin-bottom: 7px;
}
.detail-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
}
.detail-actions a {
  text-decoration: none;
}
.detail-data {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  font-size: 11px;
}
.detail-data h3 {
  font-size: 10px;
  color: #82906f;
  letter-spacing: 0.7px;
  margin-bottom: 7px;
}
.detail-data p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.review-issues {
  background: #f5ecdf;
  border: 1px solid #e5d8be;
  padding: 13px;
  border-radius: 7px;
  font-size: 11px;
  color: #92734b;
  margin: 16px 0;
}
.detail-prompt {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 260px;
  overflow: auto;
  padding: 16px;
  background: #edf0e5;
  font-size: 10px;
  line-height: 1.8;
  border-radius: 6px;
}
.detail-settings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 20px 0;
}
.detail-settings dt {
  font-size: 9px;
  color: #98a187;
}
.detail-settings dd {
  margin: 4px 0 0;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.batch-heading {
  margin: 10px 0 25px;
}
.batch-heading h2 {
  font-family: Georgia, serif;
  font-size: 29px;
  font-weight: 400;
  margin-bottom: 8px;
}
.batch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 20px;
  margin-bottom: 12px;
}
.batch-row h3 {
  font-size: 13px;
  font-weight: 550;
  margin-bottom: 7px;
}
.batch-row p {
  font-size: 10px;
  color: #8d977e;
}
.batch-row .badge {
  margin-left: 8px;
}
.batch-actions {
  display: flex;
  gap: 10px;
}
.resume-batch {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.resume-batch .button {
  margin-top: 10px;
}
.batch-dialog {
  max-width: 800px;
}
.batch-dialog pre.log {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 330px;
  overflow: auto;
  background: #20392d;
  color: #cddbc0;
  font-size: 10px;
  padding: 18px;
  border-radius: 8px;
  line-height: 1.8;
}
.library-view {
  display: block;
}
.library-view .control-panel {
  display: none;
}
.library-view .gallery-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
#show-more {
  margin: 22px auto 0;
  display: flex;
}
.loading-placeholder {
  grid-column: 1/-1;
  min-height: 260px;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #819074;
}
.small-empty {
  font-size: 10px;
  color: #9aa48f;
  padding: 12px 0;
}
@media (min-width: 1650px) {
  main {
    padding: 0 55px;
  }
  .studio-layout {
    grid-template-columns: 420px 1fr;
    gap: 40px;
  }
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .library-view .gallery-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 185px 1fr;
  }
  .sidebar {
    padding: 30px 15px;
  }
  .brand {
    font-size: 24px;
  }
  .brand-mark {
    font-size: 35px;
  }
  main {
    padding: 0 25px;
  }
  .studio-layout {
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 22px;
  }
  .gallery-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
    padding-bottom: 7px;
  }
  .filter-tabs {
    gap: 12px;
  }
  .filter-tabs button {
    padding: 12px 0 7px;
  }
  .gallery-grid {
    gap: 12px;
  }
  .collection-heading {
    align-items: flex-start;
    gap: 10px;
  }
  .collection-heading h2 {
    font-size: 22px;
  }
  .view-controls select {
    width: 95px;
  }
  .topbar-right {
    display: none;
  }
  .result-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .library-view .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1000px) {
  .app-shell {
    grid-template-columns: 78px 1fr;
  }
  .sidebar {
    padding: 25px 12px;
    align-items: center;
  }
  .brand > span:last-child,
  .sidebar-label,
  .nav-shortcut,
  .sidebar-note,
  .connection,
  .local-label {
    display: none;
  }
  .brand-mark {
    font-size: 40px;
  }
  .sidebar nav {
    margin-top: 40px;
    width: 100%;
  }
  .nav-button {
    font-size: 0;
    justify-content: center;
    padding: 13px 8px;
    gap: 0;
  }
  .nav-button > span:first-child {
    font-size: 23px;
  }
  .page-heading h1 {
    font-size: 33px;
  }
  .page-heading {
    padding-top: 28px;
  }
  .page-heading .button {
    font-size: 0;
    padding: 8px 12px;
    gap: 0;
  }
  .page-heading .button span {
    font-size: 20px;
  }
  .studio-layout {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 20px;
  }
  .control-section {
    padding: 18px;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .collection-heading {
    flex-wrap: wrap;
  }
  .collection-heading .view-controls {
    margin-top: 5px;
  }
  .result-meta {
    flex-direction: row;
  }
  .result-image-button {
    aspect-ratio: 1/1;
  }
  .library-view .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .comparison img {
    height: 300px;
  }
}
@media (max-width: 760px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    display: flex;
    flex-direction: row;
    padding: 15px 20px;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand > span:last-child {
    display: block;
    font-size: 24px;
  }
  .brand-sub {
    font-size: 6px;
    margin-top: 6px;
  }
  .brand-mark {
    font-size: 34px;
  }
  .sidebar nav {
    display: flex;
    gap: 5px;
    width: auto;
    margin: 0;
  }
  .nav-button {
    margin: 0;
    width: 42px;
    padding: 10px;
  }
  .sidebar .nav-button > span:first-child {
    font-size: 20px;
  }
  main {
    padding: 0 20px;
  }
  .topbar {
    height: 48px;
    font-size: 10px;
  }
  .page-heading {
    padding: 26px 0;
  }
  .page-heading h1 {
    font-size: 32px;
  }
  .page-heading p {
    font-size: 11px;
    max-width: 260px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .studio-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
  }
  .control-panel,
  .collection-panel {
    width: 100%;
  }
  .control-section {
    padding: 22px;
  }
  .asset-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .collection-heading {
    flex-wrap: nowrap;
  }
  .gallery-toolbar {
    flex-direction: row;
    align-items: center;
    padding-bottom: 0;
  }
  .filter-tabs {
    gap: 12px;
  }
  .filter-tabs button {
    font-size: 9px;
    padding: 12px 0;
  }
  #gallery-search {
    max-width: 125px;
  }
  .library-view .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .run-banner {
    padding: 13px;
    gap: 10px;
  }
  .run-banner p {
    max-width: 230px;
    font-size: 9px;
  }
  .run-actions {
    flex-direction: column;
    gap: 4px;
  }
  .comparison {
    grid-template-columns: 1fr;
  }
  .comparison img {
    height: 320px;
  }
  .detail-data {
    grid-template-columns: 1fr;
  }
  .detail-settings {
    grid-template-columns: 1fr 1fr;
  }
  dialog {
    padding: 22px;
  }
  .batch-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .result-meta {
    flex-direction: column;
  }
  .page-footer {
    font-size: 7px;
  }
  .topbar-right {
    display: block;
    font-size: 7px;
  }
  .topbar-right span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Account access uses the same visual language as the shared workspace. */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(100%, 460px);
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
}
.login-card h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 18px 0;
}
.login-card form,
.password-dialog form {
  display: grid;
  gap: 18px;
  margin: 28px 0;
}
.login-card label,
.password-dialog label {
  display: grid;
  gap: 7px;
}
.login-card input,
.password-dialog input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.form-error {
  color: var(--danger);
}
.account-controls {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.account-controls button {
  text-align: left;
}
.password-dialog {
  width: min(460px, calc(100% - 32px));
  padding: 32px;
}
@media (max-width: 500px) {
  .login-card {
    padding: 26px;
  }
}

/* Workspace tools extend the existing ivory / sage Studio palette. */
.recipe-bar {
  padding-top: 18px;
  padding-bottom: 18px;
  background: #f3f5f0;
}
.inline-actions,
.selection-toolbar,
.result-tools,
.inspection-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.inline-actions {
  margin: 12px 0;
}
.collection-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  align-items: end;
  margin: 12px 0;
}
.collection-controls label,
.workspace-dialog label,
.review-editor label,
.password-dialog label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  color: var(--ink, #253b32);
}
.collection-controls select {
  margin: 0;
}
.check-label {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
  cursor: pointer;
}
.check-label input {
  width: auto !important;
  margin: 0 !important;
  accent-color: #174c40;
}
.selection-toolbar {
  border-top: 1px solid #dce1d8;
  border-bottom: 1px solid #dce1d8;
  padding: 12px 0;
  margin: 16px 0;
  font-size: 12px;
}
.selection-toolbar .button {
  font-size: 12px;
  padding: 9px 12px;
}
.result-tools {
  padding: 10px 14px;
  border-top: 1px solid #e7e9e2;
  font-size: 12px;
  justify-content: space-between;
}
.result-tools .text-button {
  font-size: 12px;
}
.human-status {
  text-transform: capitalize;
  color: #586a5b;
}
.workspace-dialog {
  width: min(1000px, 94vw);
  max-width: 1000px;
  padding: 40px;
  border: 1px solid #dce1d8;
  border-radius: 16px;
  background: #fafbf7;
  max-height: 92vh;
  overflow: auto;
}
.workspace-dialog h2,
.compare-dialog h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 32px;
  margin: 0 0 15px;
}
.workspace-intro {
  margin-bottom: 24px;
}
.manager-section {
  border-top: 1px solid #dce1d8;
  padding: 20px 0;
}
.manager-section > summary {
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  color: #174c40;
  padding: 6px 0;
}
.manager-section form {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  max-width: 700px;
}
.manager-section form button {
  justify-self: start;
}
.saved-recipes,
.saved-plans {
  font-size: 13px;
  line-height: 1.8;
}
.saved-plans {
  max-height: 320px;
  overflow: auto;
}
.saved-recipes p,
.saved-plans p {
  border-bottom: 1px solid #e2e6dd;
  padding: 10px 0;
}
.review-editor {
  margin: 24px 0;
  padding: 22px 0;
  border-top: 1px solid #dce1d8;
}
.review-editor form {
  display: grid;
  gap: 14px;
}
.review-editor h3 {
  font-size: 18px;
  margin: 0 0 10px;
}
.review-editor button {
  justify-self: start;
}
.review-editor select,
.review-editor input,
.review-editor textarea {
  margin: 0;
}
.inspection-tools {
  grid-column: 1/-1;
  background: #eef2eb;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 13px;
}
.inspection-tools label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.inspection-tools input[type="range"] {
  width: 140px;
  margin: 0;
}
.inspection-tools output {
  font-variant-numeric: tabular-nums;
  min-width: 46px;
}
.zoom-pane {
  overflow: auto;
  max-height: 62vh;
  aspect-ratio: 1;
  background: #eeeee8;
  outline-offset: 3px;
  overscroll-behavior: contain;
}
.zoom-pane img {
  display: block !important;
  object-fit: contain !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 100%;
  border-radius: 0 !important;
}
.zoom-150 img {
  width: 150% !important;
}
.zoom-200 img {
  width: 200% !important;
}
.zoom-250 img {
  width: 250% !important;
}
.zoom-300 img {
  width: 300% !important;
}
.zoom-350 img {
  width: 350% !important;
}
.zoom-400 img {
  width: 400% !important;
}
.compare-dialog {
  width: 94vw;
  max-width: 1600px;
  max-height: 94vh;
  overflow: auto;
  padding: 32px;
  border: 1px solid #dce1d8;
  border-radius: 14px;
  background: #fafbf7;
}
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.comparison-grid figure {
  margin: 0;
  min-width: 0;
}
.comparison-grid figcaption {
  min-height: 40px;
  font-size: 12px;
  color: #3d5146;
  padding-bottom: 10px;
}
.reference-evidence,
.version-list {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.reference-evidence figure {
  width: 130px;
  margin: 0;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.reference-evidence img,
.version-list img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  background: #f1f2ed;
}
.version-list button {
  width: 140px;
  text-align: left;
  font-size: 11px;
  display: grid;
  gap: 6px;
}
.ordered-reference {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #dce1d8;
  font-size: 13px;
}
.ordered-reference img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
}
.ordered-reference span {
  flex: 1;
  overflow-wrap: anywhere;
}
.reference-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.reference-picker label {
  position: relative;
  display: flex;
  flex-direction: column;
  font-size: 11px;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.reference-picker img {
  width: 100%;
  height: 90px;
  object-fit: cover;
}
.reference-picker input {
  width: auto;
  align-self: start;
  margin: 0;
}
.table-scroll {
  overflow: auto;
}
.experiment {
  margin-top: 22px;
}
.experiment table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  white-space: nowrap;
}
.experiment th,
.experiment td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #dce1d8;
}
.experiment th {
  color: #174c40;
}
#derived-preview {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
#derived-preview p {
  width: 100%;
}
@media (max-width: 760px) {
  .collection-controls {
    grid-template-columns: 1fr 1fr;
  }
  .collection-controls .check-label {
    grid-column: 1/-1;
  }
  .workspace-dialog,
  .compare-dialog {
    padding: 22px;
  }
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  .comparison-grid .zoom-pane {
    max-height: 50vh;
  }
  .inspection-tools {
    gap: 8px;
  }
  .inspection-tools label {
    font-size: 12px;
  }
  .selection-toolbar {
    gap: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
