:root { font: 16px/1.45 "Inter", system-ui, sans-serif; color: #202522; background: #f5f4ef; --border: #deded3; --green: #224434; --muted: #555f57; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, textarea { font: inherit; }
button, .file-button { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #bf601d; outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#model:focus-visible { outline: none; }
.model:focus-within .file-button { outline: 2px solid #bf601d; outline-offset: 3px; }
.masthead { min-height: 70px; padding: 12px max(24px,calc((100vw - 1240px)/2)); display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fffef9; border-bottom: 1px solid var(--border); }
.brand, .model, .result-actions, .form-actions { display: flex; align-items: center; gap: 12px; }
.brand strong { font-size: 21px; letter-spacing: -.07em; }
.brand-mark { display: inline-block; width: 19px; height: 19px; background: conic-gradient(#808e68 0 25%, #2b523f 25% 50%, #b99a63 50% 75%, #d3d6b3 75%); border-radius: 4px; }
.brand-divider { width: 1px; height: 19px; background: var(--border); }
.product, .model, .result-meta { font-size: 13px; color: var(--muted); }
.indicator { width: 8px; height: 8px; border-radius: 50%; background: #a49d8c; flex: 0 0 8px; }
.indicator[data-ready="true"] { background: #447f58; }
main { width: min(1240px,calc(100% - 48px)); margin: 0 auto 40px; }
.intro { padding: 36px 0 25px; }
h1 { font-size: clamp(32px,5vw,52px); letter-spacing: -.06em; line-height: 1.08; margin: 0 0 10px; }
.intro p { margin: 0; color: var(--muted); }
.workbench { display: grid; grid-template-columns: minmax(275px, 355px) minmax(0, 1fr); gap: 16px; align-items: start; }
.brief, .canvas { min-width: 0; border: 1px solid var(--border); border-radius: 16px; background: #fffef9; overflow: hidden; }
.panel-header { padding: 13px 16px; min-height: 57px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--border); }
h2 { font-size: 15px; margin: 0; font-weight: 650; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 37px; padding: 7px 12px; border-radius: 8px; border: 1px solid transparent; font-size: 13px; font-weight: 600; white-space: nowrap; }
.primary { color: white; background: var(--green); }
.primary:hover:not(:disabled) { background: #315c48; }
.secondary { color: #263c30; background: #fffef9; border-color: #d8ddd2; }
.secondary:hover:not(:disabled) { background: #edf0e7; }
.text-button { color: var(--green); background: transparent; border: none; padding: 7px 3px; font-weight: 600; font-size: 13px; }
.text-button:hover:not(:disabled) { text-decoration: underline; }
.brief-body { padding: 18px; }
form label { font-size: 13px; font-weight: 600; }
textarea { display: block; margin-top: 8px; min-height: 132px; width: 100%; border: 1px solid #d3d7cd; border-radius: 10px; padding: 12px; resize: vertical; background: #fbfaf5; color: inherit; font-size: 14px; }
.examples { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.examples button { border: 1px solid #dce0d4; border-radius: 99px; background: #f4f5ec; padding: 4px 9px; font-size: 12px; color: #385242; }
.examples button:hover { background: #e5e9dc; }
.form-actions { margin-top: 16px; }
.feedback { color: var(--muted); font-size: 13px; min-height: 20px; margin: 13px 0 0; }
.feedback[data-error="true"] { color: #9b2b18; }
.history { margin: 0 0 14px; padding: 0; list-style: none; max-height: 160px; overflow-y: auto; }
.history:empty { display: none; }
.history li { padding: 8px 10px; border-radius: 7px; background: #f0f2e9; margin-bottom: 7px; font-size: 13px; overflow-wrap: anywhere; }
.viewport { position: relative; min-height: 472px; background: #f3f3eb; }
.empty { min-height: 472px; display: grid; place-content: center; justify-items: center; text-align: center; padding: 20px; color: var(--muted); }
.window-mark { width: 71px; padding: 6px 8px 8px; border: 1px solid #a7b2a4; border-radius: 8px; background: #fafaf2; text-align: left; line-height: 6px; }
.window-mark i { width: 4px; height: 4px; display: inline-block; border-radius: 50%; background: #4f755d; margin-right: 2px; }
.window-mark span { display: block; background: #e0e6d8; height: 6px; margin-top: 5px; border-radius: 2px; }
.window-mark span:last-child { width: 65%; }
iframe { width: 100%; height: min(66vh,720px); min-height: 472px; border: 0; display: block; background: white; }
pre { min-height: 472px; max-height: min(66vh,720px); overflow: auto; background: #17261d; color: #d9e7db; margin: 0; padding: 18px; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.result-meta { border-top: 1px solid var(--border); padding: 9px 16px; }
@media (max-width: 760px) {
  .masthead { padding: 12px 16px; flex-wrap: wrap; }
  main { width: calc(100% - 32px); }
  .intro { padding-top: 24px; }
  .workbench { grid-template-columns: 1fr; }
  .viewport, .empty, iframe, pre { min-height: 365px; }
}
@media (max-width: 380px) { .brand-divider,.product { display: none; } .panel-header { padding-inline: 12px; } }
