:root {
  --paper: #fff7ec;
  --paper-strong: #fffdfa;
  --paper-cool: #eaffff;
  --ink: #11100f;
  --ink-soft: #1f1b18;
  --muted: #69615a;
  --line: #11100f;
  --flame: #ed5736;
  --cyan: #44cef6;
  --acid: #d8ff3f;
  --rose: #ffd8cc;
  --cyan-soft: #d9f8ff;
  --font-logo: "Bahnschrift", "Century Gothic", "Segoe UI", Arial, sans-serif;
  --font-ui: "Segoe UI Variable Text", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-head: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif;
  --font-code: "Cascadia Mono", "Consolas", "Courier New", monospace;
  --shadow-hard: 0 18px 48px rgba(17, 16, 15, 0.12), 3px 3px 0 rgba(17, 16, 15, 0.9);
  --shadow-cyan: 0 18px 48px rgba(17, 16, 15, 0.12), 3px 3px 0 rgba(68, 206, 246, 0.75);
  --shadow-flame: 0 18px 48px rgba(17, 16, 15, 0.12), 3px 3px 0 rgba(237, 87, 54, 0.75);
  --shadow-soft: 0 18px 48px rgba(17, 16, 15, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(68, 206, 246, 0.13) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(rgba(237, 87, 54, 0.08) 1px, transparent 1px) 0 0 / 42px 42px,
    radial-gradient(circle at 78% 18%, rgba(68, 206, 246, 0.24), transparent 28rem),
    radial-gradient(circle at 7% 9%, rgba(237, 87, 54, 0.22), transparent 25rem),
    radial-gradient(circle at 48% 92%, rgba(68, 206, 246, 0.08), transparent 32rem),
    linear-gradient(135deg, #141211 0%, #1b1815 43%, #0d1217 100%);
  background-attachment: fixed;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.45;
}

body::selection {
  color: var(--ink);
  background: var(--cyan);
}

button,
textarea,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: 100%;
  margin: 0;
  padding: 26px clamp(14px, 1.7vw, 34px) 46px;
}

.topbar {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  overflow: hidden;
  padding: 28px clamp(18px, 2vw, 34px) 26px;
  color: var(--paper-strong);
  background:
    linear-gradient(135deg, rgba(68, 206, 246, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(255, 253, 250, 0.06), transparent 52%),
    var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 0 24px 60px rgba(17, 16, 15, 0.18), 0 0 0 1px rgba(237, 87, 54, 0.55);
}

.topbar::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -2px;
  width: min(38vw, 460px);
  height: 6px;
  background: var(--cyan);
  border-top: 1px solid var(--ink);
  transform: skewX(-24deg);
}

.kicker,
.prompt-label {
  margin: 0 0 8px;
  color: var(--flame);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  font-family: var(--font-head);
  text-transform: uppercase;
}

.topbar .kicker,
.sticky-controls .kicker {
  color: var(--cyan);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  font-family: var(--font-head);
}

h1 {
  font-family: var(--font-logo);
  font-size: clamp(50px, 7.2vw, 124px);
  font-weight: 760;
  line-height: 0.86;
  letter-spacing: 0;
  font-stretch: 72%;
  font-variation-settings: "wdth" 72, "wght" 760;
  text-shadow: none;
}

.brand-lockup {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.brand-caption {
  max-width: 54ch;
  margin: 16px 0 0;
  color: rgba(255, 253, 250, 0.78);
  font-size: clamp(14px, 1.05vw, 17px);
  line-height: 1.35;
}

.brand-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.brand-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  color: var(--paper-strong);
  text-decoration: none;
  border: 1px solid rgba(255, 253, 250, 0.24);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.08);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.brand-actions a:hover {
  color: var(--ink);
  background: var(--cyan);
  border-color: var(--cyan);
}

.brand-actions .home-return {
  color: var(--ink);
  background: var(--cyan);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--flame);
}

.brand-actions .home-return::before {
  content: "←";
  margin-right: 8px;
  font-size: 15px;
  line-height: 1;
  transform: translateY(-1px);
}

.brand-actions .home-return:hover {
  color: var(--ink);
  background: var(--paper-strong);
  border-color: var(--ink);
  transform: translateY(-1px);
}

h2 {
  font-size: 25px;
  font-weight: 720;
  font-stretch: 92%;
  font-variation-settings: "wdth" 92, "wght" 720;
  line-height: 1.05;
}

h3 {
  font-size: 17px;
  font-weight: 720;
  font-stretch: 94%;
  font-variation-settings: "wdth" 94, "wght" 720;
  line-height: 1.15;
}

.privacy-badge {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: 4px;
  font-size: 13px;
  font-family: var(--font-head);
  font-weight: 900;
  font-stretch: 88%;
  font-variation-settings: "wdth" 88, "wght" 780;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--cyan);
  transform: rotate(-0.4deg);
}

.topbar-access {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 1 1 620px;
  justify-items: end;
  align-content: end;
  gap: 12px;
  min-width: 360px;
  max-width: 760px;
}

.access-head {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.access-head p {
  max-width: 42ch;
  margin: 0;
  color: rgba(255, 253, 250, 0.74);
  font-size: 13px;
  line-height: 1.32;
  text-align: right;
}

.payment-email {
  display: grid;
  width: 100%;
  gap: 6px;
}

.payment-email span {
  color: var(--cyan);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 820;
  font-stretch: 90%;
  font-variation-settings: "wdth" 90, "wght" 820;
  text-transform: uppercase;
}

.payment-email input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--paper-strong);
  background: rgba(255, 253, 250, 0.08);
  border: 1px solid rgba(255, 253, 250, 0.28);
  border-radius: 5px;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(68, 206, 246, 0.12);
}

.payment-email input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(68, 206, 246, 0.18);
}

.payment-email input[readonly] {
  color: rgba(255, 253, 250, 0.82);
  background: rgba(68, 206, 246, 0.1);
  border-color: rgba(68, 206, 246, 0.48);
}

.session-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  padding: 10px 12px;
  color: rgba(255, 253, 250, 0.76);
  background: rgba(255, 253, 250, 0.055);
  border: 1px solid rgba(255, 253, 250, 0.18);
  border-radius: 7px;
}

.session-panel[hidden] {
  display: none;
}

.session-panel div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.session-panel span,
.session-panel a {
  color: var(--cyan);
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 820;
  font-stretch: 90%;
  font-variation-settings: "wdth" 90, "wght" 820;
  line-height: 1;
  text-transform: uppercase;
}

.session-panel strong {
  overflow: hidden;
  color: var(--paper-strong);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.session-panel a {
  flex: 0 0 auto;
  padding: 8px 11px;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper-strong);
  border: 1px solid var(--ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--cyan);
}

.session-panel.is-admin {
  background:
    linear-gradient(135deg, rgba(68, 206, 246, 0.2), rgba(237, 87, 54, 0.12)),
    rgba(255, 253, 250, 0.065);
  border-color: rgba(68, 206, 246, 0.5);
  box-shadow: inset 4px 0 0 var(--cyan);
}

.access-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(5, minmax(66px, 1fr));
  gap: 8px;
}

.access-chip {
  display: grid;
  min-height: 56px;
  place-items: center;
  padding: 8px 10px;
  color: var(--paper-strong);
  text-align: center;
  background: rgba(255, 253, 250, 0.07);
  border: 1px solid rgba(255, 253, 250, 0.28);
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(68, 206, 246, 0.14);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.access-chip strong,
.access-chip small,
.access-chip em {
  display: block;
}

.access-chip strong {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 820;
  font-stretch: 88%;
  font-variation-settings: "wdth" 88, "wght" 820;
  line-height: 1;
}

.access-chip small {
  color: rgba(255, 253, 250, 0.72);
  font-size: 12px;
  line-height: 1.2;
}

.access-chip em {
  margin-top: 5px;
  color: var(--cyan);
  font-family: var(--font-head);
  font-size: 10px;
  font-style: normal;
  font-weight: 820;
  font-stretch: 90%;
  font-variation-settings: "wdth" 90, "wght" 820;
  line-height: 1;
  text-transform: uppercase;
}

.access-chip:hover {
  transform: translateY(-1px);
  border-color: var(--cyan);
  background: rgba(68, 206, 246, 0.13);
}

.access-chip.is-active {
  border-color: var(--acid);
  box-shadow: inset 0 0 0 1px rgba(216, 255, 63, 0.72), 3px 3px 0 rgba(68, 206, 246, 0.84);
}

.access-chip.is-featured {
  color: var(--ink);
  background: var(--cyan);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 rgba(237, 87, 54, 0.88);
}

.access-chip.is-featured small {
  color: var(--ink);
}

.access-chip.is-featured em {
  color: var(--ink);
}

.access-chip:disabled {
  cursor: default;
  opacity: 0.54;
  transform: none;
}

.access-chip:disabled:hover {
  transform: none;
  border-color: rgba(255, 253, 250, 0.28);
  background: rgba(255, 253, 250, 0.07);
}

.access-chip.is-featured:disabled {
  color: rgba(17, 16, 15, 0.7);
  background: rgba(68, 206, 246, 0.62);
}

.quota-meter {
  display: grid;
  width: 100%;
  gap: 10px;
  padding: 13px;
  color: var(--paper-strong);
  background:
    linear-gradient(135deg, rgba(68, 206, 246, 0.18), transparent 48%),
    linear-gradient(180deg, rgba(255, 253, 250, 0.06), rgba(255, 253, 250, 0.025)),
    rgba(255, 253, 250, 0.045);
  border: 1px solid rgba(255, 253, 250, 0.25);
  border-radius: 6px;
  box-shadow: inset 4px 0 0 var(--cyan);
}

.quota-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 14px;
  align-items: end;
}

.quota-label {
  color: var(--cyan);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 820;
  font-stretch: 90%;
  font-variation-settings: "wdth" 90, "wght" 820;
  text-transform: uppercase;
}

.quota-main strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--paper-strong);
  font-family: var(--font-head);
  font-size: clamp(28px, 2.9vw, 42px);
  font-weight: 820;
  font-stretch: 84%;
  font-variation-settings: "wdth" 84, "wght" 820;
  line-height: 0.95;
  text-align: right;
}

.quota-main small {
  color: rgba(255, 253, 250, 0.72);
  font-size: 12px;
  line-height: 1.28;
}

.quota-track {
  position: relative;
  height: 13px;
  overflow: hidden;
  background: rgba(255, 253, 250, 0.12);
  border: 1px solid rgba(255, 253, 250, 0.28);
  border-radius: 999px;
}

.quota-track span {
  display: block;
  width: var(--quota-fill, 100%);
  height: 100%;
  background:
    linear-gradient(90deg, var(--cyan), var(--acid) 62%, var(--flame));
  border-radius: inherit;
  transition: width 220ms ease;
}

.quota-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 253, 250, 0.72);
  font-size: 12px;
  line-height: 1.25;
}

#quota-state {
  color: var(--cyan);
  font-family: var(--font-head);
  font-weight: 760;
  font-stretch: 90%;
  font-variation-settings: "wdth" 90, "wght" 760;
  text-align: right;
  text-transform: uppercase;
}

.quota-meter.is-low {
  box-shadow: inset 4px 0 0 var(--flame);
}

.quota-meter.is-low #quota-state {
  color: var(--flame);
}

.quota-meter.is-empty {
  background:
    linear-gradient(135deg, rgba(237, 87, 54, 0.22), transparent 48%),
    rgba(255, 253, 250, 0.04);
  box-shadow: inset 4px 0 0 var(--flame);
}

.quota-meter.is-empty .quota-track span {
  background: var(--flame);
}

.quota-meter.is-admin {
  background:
    linear-gradient(135deg, rgba(68, 206, 246, 0.24), rgba(216, 255, 63, 0.12) 58%, rgba(237, 87, 54, 0.1)),
    rgba(255, 253, 250, 0.055);
  box-shadow: inset 4px 0 0 var(--cyan), 0 0 0 1px rgba(68, 206, 246, 0.12);
}

.quota-meter.is-admin #quota-state {
  color: var(--acid);
}

.benefit-strip {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.benefit-strip span {
  display: grid;
  gap: 5px;
  min-height: 66px;
  align-content: start;
  padding: 10px 11px;
  color: var(--paper-strong);
  background:
    linear-gradient(135deg, rgba(237, 87, 54, 0.18), transparent 58%),
    rgba(255, 253, 250, 0.045);
  border: 1px dashed rgba(255, 253, 250, 0.24);
  border-radius: 5px;
}

.benefit-strip strong {
  color: var(--cyan);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 820;
  font-stretch: 90%;
  font-variation-settings: "wdth" 90, "wght" 820;
  text-transform: uppercase;
}

.benefit-strip small {
  color: rgba(255, 253, 250, 0.7);
  font-size: 11px;
  line-height: 1.3;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(360px, 0.86fr) minmax(420px, 1.22fr);
  gap: clamp(16px, 1.35vw, 26px);
  align-items: start;
  padding-top: 38px;
}

.brief-column,
.control-column,
.prompt-column,
.visual-column {
  min-width: 0;
}

.brief-column {
  grid-column: 1;
  grid-row: 1 / span 20;
}

.control-column {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  gap: 14px;
  align-self: stretch;
}

.visual-column {
  display: grid;
  grid-column: 3;
  grid-row: 1;
  gap: 14px;
  align-self: start;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.brief-column .section-heading,
.control-column .section-heading,
.prompt-column .section-heading,
.visual-column .section-heading {
  display: block;
}

.section-heading h2 {
  max-width: 780px;
  color: var(--paper-strong);
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
}

.reference-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.reference-card {
  position: relative;
  min-height: auto;
  padding: 16px;
  background: var(--paper-strong);
  border: 2px solid var(--ink);
  border-radius: 5px;
  box-shadow: var(--shadow-soft);
}

.reference-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--cyan);
  border-bottom: 1px solid rgba(17, 16, 15, 0.62);
}

.reference-card:nth-child(2n)::before {
  background: var(--flame);
}

.reference-card:hover {
  transform: translateY(-1px);
}

.reference-card[data-slot="face"] {
  grid-column: auto;
  min-height: auto;
  background:
    linear-gradient(135deg, rgba(68, 206, 246, 0.16), transparent 42%),
    var(--paper-strong);
  box-shadow: 0 22px 54px rgba(17, 16, 15, 0.11), 0 0 0 1px rgba(68, 206, 246, 0.72);
}

.card-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  min-height: auto;
  margin: 9px 0 12px;
}

.slot-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--ink);
  background: var(--cyan);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 13px;
  font-family: var(--font-head);
  font-weight: 900;
  font-stretch: 88%;
  font-variation-settings: "wdth" 88, "wght" 780;
  box-shadow: 2px 2px 0 rgba(237, 87, 54, 0.8);
}

.reference-card:nth-child(2n) .slot-mark {
  background: var(--flame);
  box-shadow: 2px 2px 0 rgba(68, 206, 246, 0.8);
}

.card-head p,
.guardrail-note,
.status-line {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.card-head p {
  margin: 5px 0 0;
}

.upload-zone {
  position: relative;
  display: grid;
  min-height: 88px;
  margin-bottom: 10px;
  padding: 13px;
  align-content: center;
  gap: 7px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.56), transparent),
    #f8efe4;
  border: 1px dashed rgba(17, 16, 15, 0.74);
  border-radius: 5px;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.upload-zone:hover {
  transform: translateY(-1px);
  background: #fff2e9;
  box-shadow: 0 12px 24px rgba(17, 16, 15, 0.1);
}

.upload-zone.is-drag-active {
  transform: translateY(-1px);
  background: var(--cyan-soft);
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(68, 206, 246, 0.22);
}

.upload-zone.has-preview {
  min-height: 148px;
  align-content: end;
  background:
    linear-gradient(180deg, rgba(17, 16, 15, 0.06), rgba(17, 16, 15, 0.78)),
    var(--preview) center / cover;
  border-style: solid;
}

.upload-zone.has-preview .upload-button,
.upload-zone.has-preview small {
  color: var(--paper-strong);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

.upload-zone input[type="file"] {
  width: 100%;
  min-height: 38px;
  padding: 7px;
  color: var(--ink);
  background: rgba(255, 253, 250, 0.9);
  border: 1px solid rgba(17, 16, 15, 0.28);
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
}

.upload-zone input[type="file"]::file-selector-button {
  min-height: 28px;
  margin-right: 10px;
  padding: 0 10px;
  color: var(--paper-strong);
  background: var(--ink);
  border: 0;
  border-radius: 4px;
  font-family: var(--font-head);
  font-weight: 760;
  font-stretch: 90%;
  font-variation-settings: "wdth" 90, "wght" 760;
  cursor: pointer;
}

.upload-zone input[type="file"]::file-selector-button:hover {
  background: var(--flame);
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.upload-button {
  width: fit-content;
  display: inline-block;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-family: var(--font-head);
  font-weight: 760;
  font-stretch: 92%;
  font-variation-settings: "wdth" 92, "wght" 760;
  text-align: left;
  cursor: pointer;
}

.upload-button.secondary {
  color: #086a82;
}

.upload-button.danger {
  color: var(--flame);
}

.upload-button:disabled {
  opacity: 0.34;
  cursor: not-allowed;
  text-decoration: none;
}

.upload-button:hover {
  text-decoration: underline;
}

.upload-zone small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-hint {
  font-size: 12px;
  white-space: normal;
}

.rights-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: start;
  margin: 0 0 10px;
  padding: 10px 11px;
  color: var(--ink-soft);
  background:
    linear-gradient(135deg, rgba(68, 206, 246, 0.18), transparent 54%),
    #f8efe4;
  border: 1px solid rgba(17, 16, 15, 0.2);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.rights-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--cyan);
  cursor: pointer;
}

.rights-check span {
  min-width: 0;
}

.rights-check.is-attention {
  background: var(--rose);
  border-color: var(--flame);
  box-shadow: 0 0 0 3px rgba(237, 87, 54, 0.16);
}

.url-import {
  display: grid;
  gap: 7px;
  margin-top: 5px;
  padding-top: 10px;
  border-top: 1px solid rgba(17, 16, 15, 0.16);
}

.url-source-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  color: #bd081c;
  font-size: 11px;
  font-family: var(--font-head);
  font-weight: 900;
  font-stretch: 90%;
  font-variation-settings: "wdth" 90, "wght" 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pinterest-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.url-import input {
  min-width: 0;
  min-height: 36px;
  padding: 0 9px;
  color: var(--ink);
  background: rgba(255, 253, 250, 0.92);
  border: 1px solid rgba(17, 16, 15, 0.28);
  border-radius: 5px;
  outline: none;
  font-size: 12px;
}

.url-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.url-import button {
  min-height: 38px;
  padding: 0 8px;
  color: var(--ink);
  background: var(--paper-strong);
  border: 1px solid var(--ink);
  border-radius: 5px;
  font-size: 12px;
  font-family: var(--font-head);
  font-weight: 760;
  font-stretch: 90%;
  font-variation-settings: "wdth" 90, "wght" 760;
  cursor: pointer;
}

.url-import button:last-child {
  color: var(--ink);
  background: var(--cyan);
}

.url-import button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(17, 16, 15, 0.12);
}

.url-import button:disabled {
  opacity: 0.5;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.url-import small {
  white-space: normal;
}

.text-only-note {
  margin-bottom: 10px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--cyan-soft);
  border: 1px dashed rgba(17, 16, 15, 0.48);
  border-radius: 5px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

textarea,
select {
  width: 100%;
  color: var(--ink);
  background: rgba(255, 253, 250, 0.94);
  border: 1px solid rgba(17, 16, 15, 0.28);
  border-radius: 5px;
  outline: none;
}

textarea {
  min-height: 86px;
  resize: vertical;
  padding: 11px 12px;
}

select {
  min-height: 44px;
  padding: 0 34px 0 11px;
}

textarea:focus,
select:focus,
.url-import input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(68, 206, 246, 0.22);
}

.sticky-controls {
  position: sticky;
  top: 18px;
  z-index: 8;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(68, 206, 246, 0.74) rgba(255, 253, 250, 0.08);
  padding: 18px;
  color: var(--paper-strong);
  background:
    linear-gradient(180deg, rgba(68, 206, 246, 0.1), transparent 28%),
    linear-gradient(135deg, rgba(237, 87, 54, 0.08), transparent 42%),
    var(--ink-soft);
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 0 24px 58px rgba(17, 16, 15, 0.2), 0 0 0 1px rgba(68, 206, 246, 0.42);
}

.sticky-controls .section-heading {
  margin-bottom: 18px;
}

.sticky-controls .kicker,
.sticky-controls h2,
.sticky-controls .field-label,
.sticky-controls label {
  color: var(--paper-strong);
}

.field-group {
  display: grid;
  gap: 9px;
  margin-bottom: 16px;
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 10px;
}

.field-label,
.field-group > label {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 760;
  font-stretch: 92%;
  font-variation-settings: "wdth" 92, "wght" 760;
}

.sticky-controls textarea,
.sticky-controls select {
  color: var(--paper-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    #161412;
  border-color: rgba(255, 255, 255, 0.24);
}

.sticky-controls option {
  color: var(--ink);
  background: var(--paper-strong);
}

.sticky-controls textarea::placeholder {
  color: rgba(255, 253, 250, 0.44);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.segmented label {
  min-width: 0;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: grid;
  min-height: 44px;
  place-items: center;
  padding: 7px;
  color: rgba(255, 253, 250, 0.78);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  font-size: 13px;
  font-family: var(--font-head);
  font-weight: 760;
  font-stretch: 92%;
  font-variation-settings: "wdth" 92, "wght" 760;
  text-align: center;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.segmented input:checked + span {
  color: var(--ink);
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(237, 87, 54, 0.32);
  transform: translateY(-1px);
}

.segmented input:disabled + span {
  color: rgba(255, 253, 250, 0.25);
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.08);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.primary-action,
.image-action,
.ghost-button {
  border-radius: 5px;
  font-family: var(--font-head);
  font-weight: 820;
  font-stretch: 90%;
  font-variation-settings: "wdth" 90, "wght" 820;
}

.primary-action {
  width: 100%;
  min-height: 52px;
  color: var(--ink);
  background: var(--cyan);
  border: 2px solid var(--ink);
  box-shadow: 0 14px 28px rgba(68, 206, 246, 0.24), 3px 3px 0 rgba(237, 87, 54, 0.82);
}

.guardrail-note {
  margin-top: 14px;
  color: rgba(255, 253, 250, 0.7);
}

.guardrail-note strong {
  color: var(--cyan);
}

.prompt-column {
  display: grid;
  gap: 14px;
}

.prompt-panel,
.run-summary,
.history-panel,
.result-panel {
  padding: 16px;
  background: var(--paper-strong);
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
}

.prompt-panel {
  box-shadow: var(--shadow-soft);
}

.prompt-panel:nth-of-type(2n) {
  box-shadow: 0 18px 48px rgba(17, 16, 15, 0.1), 0 0 0 1px rgba(68, 206, 246, 0.44);
}

.summary-pill {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  padding: 0 10px;
  color: var(--ink);
  background: var(--cyan);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--font-head);
  font-weight: 760;
  font-stretch: 90%;
  font-variation-settings: "wdth" 90, "wght" 760;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.summary-item {
  min-width: 0;
  padding: 10px;
  background: #f9efe4;
  border: 1px solid rgba(17, 16, 15, 0.18);
  border-radius: 5px;
}

.summary-item strong,
.summary-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-item strong {
  margin-bottom: 5px;
  font-size: 12px;
  font-family: var(--font-head);
  font-weight: 760;
}

.summary-item span {
  color: var(--muted);
  font-size: 12px;
}

.summary-item.is-ready {
  border-color: var(--cyan);
  box-shadow: inset 4px 0 0 var(--cyan);
}

.summary-item.is-empty {
  border-style: dashed;
}

.summary-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.prompt-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ghost-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--paper-strong);
  border: 1px solid var(--ink);
  text-decoration: none;
}

pre {
  min-height: 220px;
  max-height: 360px;
  margin: 0 0 12px;
  padding: 13px;
  overflow: auto;
  color: #f4fbff;
  background:
    linear-gradient(90deg, rgba(68, 206, 246, 0.07) 1px, transparent 1px) 0 0 / 34px 34px,
    #151413;
  border: 1px solid rgba(68, 206, 246, 0.28);
  border-radius: 5px;
  font-family: var(--font-code);
  font-size: 12px;
  line-height: 1.48;
  white-space: pre-wrap;
}

.prompt-lock {
  display: grid;
  min-height: 196px;
  margin: 0 0 12px;
  align-content: start;
  gap: 10px;
  padding: 16px;
  color: var(--paper-strong);
  background:
    linear-gradient(90deg, rgba(68, 206, 246, 0.08) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(rgba(237, 87, 54, 0.08) 1px, transparent 1px) 0 0 / 28px 28px,
    #151413;
  border: 1px solid rgba(68, 206, 246, 0.35);
  border-radius: 5px;
  text-align: left;
  user-select: none;
}

.prompt-lock span {
  color: var(--cyan);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 760;
  font-stretch: 92%;
  font-variation-settings: "wdth" 92, "wght" 760;
  text-transform: uppercase;
}

.prompt-lock strong {
  color: var(--paper-strong);
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 760;
  font-stretch: 92%;
  font-variation-settings: "wdth" 92, "wght" 760;
  line-height: 1.05;
}

.prompt-brief-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prompt-brief-list li {
  position: relative;
  padding-left: 16px;
  color: rgba(255, 253, 250, 0.78);
  font-size: 13px;
  line-height: 1.36;
}

.prompt-brief-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  background: var(--cyan);
  border: 1px solid rgba(255, 253, 250, 0.35);
  border-radius: 50%;
}

.prompt-lock small {
  max-width: none;
  color: rgba(255, 253, 250, 0.66);
  font-size: 12px;
  line-height: 1.38;
}

.image-action {
  width: 100%;
  min-height: 46px;
  color: var(--ink);
  background: var(--flame);
  border: 2px solid var(--ink);
  box-shadow: 0 14px 28px rgba(237, 87, 54, 0.22), 3px 3px 0 rgba(68, 206, 246, 0.82);
}

.image-action:hover,
.primary-action:hover,
.ghost-button:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
}

.status-line {
  padding: 12px 14px;
  color: var(--ink);
  background: var(--cyan-soft);
  border-left: 6px solid var(--cyan);
}

.result-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}

.gallery-warning {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  padding: 12px 14px;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(68, 206, 246, 0.22), rgba(255, 253, 250, 0.82) 42%, rgba(237, 87, 54, 0.12)),
    #fffdf8;
  border: 1px solid rgba(17, 16, 15, 0.28);
  border-radius: 6px;
  box-shadow: 3px 3px 0 rgba(237, 87, 54, 0.78);
}

.gallery-warning::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(17, 16, 15, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 16, 15, 0.05) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.42;
}

.gallery-warning__label,
.gallery-warning p {
  position: relative;
  z-index: 1;
}

.gallery-warning__label {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  padding: 0 10px;
  color: var(--ink);
  background: var(--cyan);
  border: 1px solid var(--ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--flame);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 820;
  font-stretch: 90%;
  font-variation-settings: "wdth" 90, "wght" 820;
  text-transform: uppercase;
}

.gallery-warning p {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.gallery-warning strong {
  font-family: var(--font-head);
  font-weight: 820;
  font-stretch: 90%;
  font-variation-settings: "wdth" 90, "wght" 820;
}

.history-card {
  display: grid;
  gap: 8px;
  padding: 8px;
  color: var(--ink);
  background: #f9efe4;
  border: 1px solid rgba(17, 16, 15, 0.2);
  border-radius: 5px;
  text-decoration: none;
}

.history-card.is-active {
  border-color: var(--flame);
  box-shadow: 0 0 0 2px rgba(237, 87, 54, 0.2);
}

.history-preview {
  display: grid;
  gap: 7px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.history-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  background: #151413;
  border-radius: 4px;
}

.history-card strong,
.history-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-card strong {
  font-size: 12px;
  font-family: var(--font-head);
  font-weight: 760;
}

.history-card span {
  color: var(--muted);
  font-size: 11px;
}

.gallery-download {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  color: var(--ink);
  background: var(--paper-strong);
  border: 1px solid rgba(17, 16, 15, 0.28);
  border-radius: 4px;
  font-size: 12px;
  font-family: var(--font-head);
  font-weight: 760;
  font-stretch: 90%;
  font-variation-settings: "wdth" 90, "wght" 760;
  text-decoration: none;
}

.empty-gallery {
  padding: 14px;
  color: var(--muted);
  background: #f9efe4;
  border: 1px dashed rgba(17, 16, 15, 0.34);
  border-radius: 5px;
  font-size: 13px;
  line-height: 1.35;
}

@media (max-width: 560px) {
  .gallery-warning {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .gallery-warning__label {
    justify-self: start;
  }
}

.result-frame {
  display: grid;
  min-height: clamp(420px, 54vh, 720px);
  place-items: center;
  overflow: hidden;
  background: #151413;
  border-radius: 5px;
}

.result-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 760px;
  object-fit: contain;
}

.result-meta {
  margin-top: 12px;
}

@media (max-width: 1180px) {
  .topbar-access {
    flex-basis: 520px;
    min-width: 320px;
  }

  .workspace {
    grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1fr);
  }

  .brief-column {
    grid-column: 1;
    grid-row: auto;
  }

  .control-column {
    grid-column: 2;
  }

  .visual-column {
    grid-column: 1 / -1;
  }

  .visual-column {
    grid-row: auto;
  }

  .sticky-controls {
    top: 12px;
  }
}

@media (max-width: 860px) {
  .app-shell {
    padding: 12px 10px 32px;
  }

  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .topbar-access {
    flex: none;
    justify-items: start;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .access-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .access-head {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

  .access-head p {
    max-width: none;
    text-align: left;
  }

  .payment-email {
    max-width: 520px;
  }

  .session-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .benefit-strip {
    grid-template-columns: 1fr;
  }

  .benefit-strip span {
    min-height: auto;
  }

  .quota-main {
    grid-template-columns: 1fr;
  }

  .quota-main strong {
    grid-row: auto;
    grid-column: 1;
    text-align: left;
  }

  .quota-footer {
    flex-direction: column;
    gap: 4px;
  }

  #quota-state {
    text-align: left;
  }

  .workspace,
  .reference-grid {
    grid-template-columns: 1fr;
  }

  .brief-column,
  .control-column,
  .visual-column {
    grid-column: 1;
  }

  .brief-column,
  .control-column,
  .visual-column {
    grid-row: auto;
  }

  .reference-card[data-slot="face"] {
    grid-column: auto;
  }

  .reference-card {
    min-height: auto;
  }

  .sticky-controls {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .segmented {
    grid-template-columns: 1fr;
  }

  .compact-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .upload-actions {
    flex-direction: column;
    align-items: start;
  }

  pre {
    min-height: 220px;
  }
}
