.hw-studio {
  --hw-ink: #171815;
  --hw-ivory: #f2f1e9;
  --hw-lime: #d5ed83;
  --hw-line: rgba(242, 241, 233, .13);
  --hw-muted: #a1a29a;
  width: min(1120px, calc(100vw - 64px));
  max-width: none;
  max-height: calc(100dvh - 64px);
  padding: 0;
  margin: auto;
  border: 1px solid rgba(242, 241, 233, .2);
  border-radius: 16px;
  background: var(--hw-ink);
  color: var(--hw-ivory);
  box-shadow: 0 32px 120px #0008;
  overflow: auto;
  overscroll-behavior: contain;
  font-family: Manrope, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: #45463e #171815;
}
.hw-studio, .hw-studio * { box-sizing: border-box; }
.hw-studio::backdrop { background: rgba(11, 13, 10, .74); backdrop-filter: blur(14px); }
.hw-studio[open] { animation: hw-studio-enter .3s ease both; }
.hw-studio button, .hw-studio textarea, .hw-studio select { font: inherit; }
.hw-studio button { cursor: pointer; }
.hw-studio button:disabled { cursor: default; }
.hw-studio button, .hw-studio input, .hw-studio select, .hw-studio textarea { -webkit-tap-highlight-color: transparent; }
.hw-studio button:focus-visible, .hw-studio select:focus-visible, .hw-studio textarea:focus-visible, .hw-studio-upload:has(+ input:focus-visible) { outline: 2px solid var(--hw-lime); outline-offset: 4px; }
.hw-studio [hidden] { display: none !important; }
.hw-studio svg { display: block; width: 20px; height: 20px; flex: none; }
.hw-studio-header { padding: 16px 28px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--hw-line); }
.hw-studio-brand { display: flex; align-items: center; gap: 13px; font-weight: 500; letter-spacing: -.03em; font-size: 17px; }
.hw-studio-mark { display: flex; align-items: center; justify-content: center; height: 27px; width: 27px; font: 28px Georgia, serif; line-height: 1; padding-bottom: 5px; border: 1px solid var(--hw-ivory); border-radius: 50%; }
.hw-studio-brand-divider { margin: 0 6px; color: #72746a; font-weight: 400; }
.hw-studio-preview-badge { margin-left: 2px; padding: 3px 7px; border: 1px solid #4c5141; border-radius: 4px; color: var(--hw-lime); font: 8px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .07em; }
.hw-studio-icon-btn { display: grid; place-items: center; height: 32px; width: 32px; border: 1px solid var(--hw-line); background: transparent; color: var(--hw-ivory); border-radius: 50%; transition: background .2s, transform .2s; }
.hw-studio-icon-btn:hover { background: #ffffff10; transform: rotate(90deg); }
.hw-studio-layout { display: grid; grid-template-columns: 1.03fr 1fr; }
.hw-studio-canvas { display: flex; flex-direction: column; padding: 28px; background: #11130f; min-width: 0; border-right: 1px solid var(--hw-line); }
.hw-studio-canvas-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.hw-studio-eyebrow, .hw-studio-frame-number, .hw-studio-draft-indicator { font: 8px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .11em; }
.hw-studio-eyebrow { color: #c1c3b7; }
.hw-studio-frame-number { color: #6f7367; }
.hw-studio-image-wrap { height: 274px; display: flex; align-items: center; justify-content: center; background: #181b15; background-image: linear-gradient(#f2f1e907 1px, transparent 1px), linear-gradient(90deg, #f2f1e907 1px, transparent 1px); background-size: 24px 24px; overflow: hidden; border-radius: 5px; }
.hw-studio-image-frame { aspect-ratio: 16 / 9; max-width: 100%; max-height: 100%; width: 100%; overflow: hidden; position: relative; transition: width .4s, height .4s; background: #343c27; }
.hw-studio-image-frame[data-ratio="9:16"] { aspect-ratio: 9 / 16; width: auto; height: 100%; }
.hw-studio-image-frame[data-ratio="1:1"] { aspect-ratio: 1; width: auto; height: 100%; }
.hw-studio-reference { width: 100%; height: 100%; object-fit: cover; display: block; }
.hw-studio-reference-missing { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; background: #23271e; color: #c7d0b8; }
.hw-studio-reference-missing > span { font-size: 15px; letter-spacing: -.03em; }
.hw-studio-reference-missing > p { font-size: 10px; line-height: 1.6; color: #8e9b7e; max-width: 150px; margin: 9px 0 0; }
.hw-studio-frame-shade { position: absolute; inset: 0; background: linear-gradient(transparent 62%, #0008); pointer-events: none; }
.hw-studio-frame-corner { position: absolute; width: 12px; height: 12px; border-color: #f2f1e9b3; border-style: solid; pointer-events: none; }
.hw-studio-frame-corner--tl { left: 16px; top: 16px; border-width: 1px 0 0 1px; }
.hw-studio-frame-corner--br { right: 16px; bottom: 40px; border-width: 0 1px 1px 0; }
.hw-studio-frame-label { display: flex; align-items: center; gap: 6px; position: absolute; bottom: 14px; left: 16px; right: 16px; font: 7px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .07em; color: #fff; }
.hw-studio-frame-label > span:last-child { margin-left: auto; }
.hw-studio-image-frame[data-ratio="9:16"] .hw-studio-frame-label { left: 10px; right: 10px; gap: 4px; font-size: 6px; white-space: nowrap; }
.hw-studio-live-dot { flex: 0 0 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--hw-lime); }
.hw-studio-reference-tools { display: flex; align-items: center; gap: 10px; padding: 15px 0 0; color: #818779; font-size: 9px; }
.hw-studio-reference-tools > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hw-studio-upload { display: flex; align-items: center; gap: 5px; margin-left: auto; color: #c1c6b6; white-space: nowrap; cursor: pointer; }
.hw-studio-upload:hover { color: var(--hw-lime); }
.hw-studio-upload svg { width: 12px; height: 12px; }
.hw-studio-remove { border: 0; border-bottom: 1px solid #7f8277; background: transparent; color: #b7b9af; padding: 0; font-size: 9px !important; }
.hw-studio-brief { padding-top: 30px; }
.hw-studio-brief .hw-studio-eyebrow { margin: 0 0 13px; font-size: 7px; }
.hw-studio-brief h2 { margin: 0 0 12px; max-width: 360px; font-size: 31px; line-height: 1.1; font-weight: 400; letter-spacing: -.05em; }
.hw-studio-brief em { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; letter-spacing: -.025em; }
.hw-studio-brief > p:last-child, .hw-studio-brief-prompt { color: var(--hw-muted); font-size: 11px; line-height: 1.7; margin: 0; max-width: 360px; }
.hw-studio-brief-prompt { max-height: 90px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.hw-studio-concept-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.hw-studio-concept-meta span { border: 1px solid #3d4433; color: var(--hw-lime); padding: 4px 7px; font: 8px ui-monospace, SFMono-Regular, Consolas, monospace; border-radius: 3px; }
.hw-studio-honesty { color: #858b7b; padding: 22px 0 0; margin: auto 0 0; font-size: 9px; line-height: 1.7; max-width: 420px; }
.hw-studio-saved { margin-top: 22px; }
.hw-studio-saved label { display: block; font: 7px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .1em; margin-bottom: 8px; color: #adb29e; }
.hw-studio-saved select { width: 100%; max-width: 100%; font-size: 10px !important; }
.hw-studio-controls { min-width: 0; display: flex; flex-direction: column; padding: 28px 30px 20px; }
.hw-studio-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.hw-studio-draft-indicator { color: #85887c; font-size: 6px; letter-spacing: .06em; }
.hw-studio-label { display: block; margin: 0 0 10px; font-weight: 500; color: #e6e6db; font-size: 10px; }
.hw-studio-prompt-label { font-size: 22px; line-height: 1.2; font-weight: 400; letter-spacing: -.05em; margin-bottom: 15px; }
.hw-studio-prompt-wrap { border: 1px solid #424639; border-radius: 6px; background: #1d201a; transition: border-color .2s; position: relative; }
.hw-studio-prompt-wrap:focus-within { border-color: #a5b772; }
.hw-studio textarea { resize: vertical; display: block; width: 100%; border: 0; color: var(--hw-ivory); background: transparent; font-size: 11px; padding: 15px 15px 27px; line-height: 1.7; min-height: 115px; max-height: 240px; border-radius: 6px; }
.hw-studio textarea::placeholder { color: #8c9082; opacity: 1; }
.hw-studio textarea:focus-visible { outline: none; }
.hw-studio-char-count { position: absolute; bottom: 10px; right: 12px; color: #858a7b; font: 7px ui-monospace, SFMono-Regular, Consolas, monospace; }
.hw-studio-presets-label { color: #8c9182; font-size: 9px; margin-top: 15px; margin-bottom: 8px; }
.hw-studio-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.hw-studio-preset { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #34392d; padding: 6px 8px; border-radius: 20px; background: transparent; color: #b9bfac; font-size: 8px !important; transition: background .2s, border-color .2s; }
.hw-studio-preset:hover { border-color: #747f59; background: #ffffff06; }
.hw-studio-preset-dot { height: 5px; width: 5px; border-radius: 50%; }
.hw-studio-preset-dot--dunes { background: #d2b893; }
.hw-studio-preset-dot--ocean { background: #8cb5be; }
.hw-studio-preset-dot--portrait { background: #c79385; }
.hw-studio-preset-dot--architecture { background: #aaa598; }
.hw-studio-section-heading--second { padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--hw-line); margin-bottom: 18px; }
.hw-studio select { appearance: none; border: 1px solid #373c2f; border-radius: 5px; background: #1d201a; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none'%3E%3Cpath d='m3 4.5 3 3 3-3' stroke='%23B3B9A8'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; color: var(--hw-ivory); padding: 11px 32px 11px 13px; font-size: 11px; cursor: pointer; }
.hw-studio-select-wrap { display: flex; position: relative; }
.hw-studio-select-wrap select { width: 100%; }
.hw-studio-direction-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hw-studio-direction-grid > div { min-width: 0; }
.hw-studio-direction-grid select { width: 100%; }
.hw-studio-settings-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 20px; margin-top: 20px; margin-bottom: 0; }
.hw-studio-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.hw-studio-fieldset legend { padding: 0; }
.hw-studio-segmented { display: flex; border: 1px solid #373c2f; background: #1d201a; border-radius: 5px; padding: 3px; gap: 2px; }
.hw-studio-segment { position: relative; flex: 1; cursor: pointer; }
.hw-studio-segment input { position: absolute; opacity: 0; inset: 0; cursor: pointer; width: 100%; height: 100%; margin: 0; }
.hw-studio-segment > span { min-height: 31px; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 9px; border-radius: 3px; color: #929a85; transition: background .2s, color .2s; }
.hw-studio-segment input:checked + span { background: #343b28; color: var(--hw-lime); }
.hw-studio-segment input:focus-visible + span { outline: 2px solid var(--hw-lime); outline-offset: -1px; }
.hw-studio-ratio-icon { display: inline-block; width: 12px; height: 8px; border: 1px solid currentColor; border-radius: 1px; }
.hw-studio-ratio-icon--9-16 { width: 6px; height: 10px; }
.hw-studio-ratio-icon--1-1 { width: 8px; height: 8px; }
.hw-studio-actions { margin-top: 24px; }
.hw-studio-create { width: 100%; background: var(--hw-lime); color: #23291b; padding: 16px 18px; border-radius: 5px; border: 1px solid var(--hw-lime); display: flex; justify-content: space-between; align-items: center; font-size: 12px !important; font-weight: 600 !important; transition: background .2s, transform .2s; }
.hw-studio-create:hover { background: #e3f4b2; transform: translateY(-1px); }
.hw-studio-create svg { width: 17px; height: 17px; transition: transform .2s; }
.hw-studio-create:hover svg { transform: translateX(4px); }
.hw-studio-secondary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 9px; }
.hw-studio-secondary-actions button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border: 1px solid #3a4130; color: #c6ccba; background: transparent; border-radius: 5px; font-size: 9px; }
.hw-studio-secondary-actions button:hover { background: #ffffff07; }
.hw-studio-secondary-actions button:disabled { color: var(--hw-lime); border-color: #4e6031; }
.hw-studio-secondary-actions svg { width: 12px; height: 12px; }
.hw-studio-status { font-size: 8px; line-height: 1.5; min-height: 12px; margin: 13px 0 0; text-align: center; color: #8e987e; }
.hw-studio-status--error { color: #e4ab8e; }
.hw-studio-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes hw-studio-enter { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 920px) {
  .hw-studio { width: calc(100vw - 32px); max-height: calc(100dvh - 32px); }
  .hw-studio-controls, .hw-studio-canvas { padding: 24px; }
  .hw-studio-select-caption { display: none; }
  .hw-studio-image-wrap { height: 240px; }
  .hw-studio-settings-grid { gap: 12px; }
}
@media (max-width: 680px) {
  .hw-studio { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 12px; }
  .hw-studio-header { position: sticky; top: 0; z-index: 2; background: #171815f5; backdrop-filter: blur(12px); padding: 16px 20px; }
  .hw-studio-brand { font-size: 15px; gap: 9px; }
  .hw-studio-mark { width: 23px; height: 23px; font-size: 23px; }
  .hw-studio-layout { grid-template-columns: 1fr; }
  .hw-studio-canvas { border-right: 0; border-bottom: 1px solid var(--hw-line); padding: 20px; }
  .hw-studio-canvas-top { margin-bottom: 15px; }
  .hw-studio-image-wrap { height: 180px; }
  .hw-studio-image-frame { width: 100%; height: 100%; }
  .hw-studio-image-frame[data-ratio="9:16"], .hw-studio-image-frame[data-ratio="1:1"] { width: auto; }
  .hw-studio-brief { padding-top: 20px; }
  .hw-studio-brief h2 { font-size: 28px; max-width: none; }
  .hw-studio-brief > p:last-child { max-width: none; font-size: 10px; }
  .hw-studio-brief .hw-studio-eyebrow { margin-bottom: 9px; }
  .hw-studio-honesty { padding-top: 16px; font-size: 8px; }
  .hw-studio-controls { padding: 24px 20px 20px; }
  .hw-studio-section-heading { margin-bottom: 17px; }
  .hw-studio-prompt-label { font-size: 22px; }
  .hw-studio textarea { font-size: 16px; min-height: 130px; line-height: 1.55; }
  .hw-studio select { font-size: 16px; }
  .hw-studio-label { font-size: 11px; }
  .hw-studio-preset { font-size: 9px !important; padding: 8px 10px; }
  .hw-studio-segment > span { min-height: 36px; font-size: 11px; }
  .hw-studio-create { font-size: 13px !important; min-height: 52px; }
  .hw-studio-saved select { font-size: 16px !important; }
  .hw-studio-secondary-actions button { min-height: 42px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .hw-studio[open] { animation: none; }
  .hw-studio *, .hw-studio *::before, .hw-studio *::after { transition: none !important; }
}
