
    :root {
      --bg: #050504;
      --panel: #070706;
      --panel-soft: #0b0a08;
      --line: rgba(214, 196, 153, 0.12);
      --line-strong: rgba(214, 196, 153, 0.28);
      --text: rgba(245, 241, 232, 0.86);
      --muted: rgba(245, 241, 232, 0.46);
      --faint: rgba(245, 241, 232, 0.20);
      --gold: #d6c499;
      --danger: #b85e4b;
      --success: #a7b88a;
      --gap: 0px;
    --atelier-shell-width: 1840px;
    --page-pad-x: clamp(18px, 3vw, 48px);
    --page-pad-top: 96px;
    }

    * {
      box-sizing: border-box;
    }

    html,
    body {
      margin: 0;
      min-height: 100%;
      background: var(--bg);
      color: var(--text);
      font-family: "Acumin Pro Condensed", "Arial Narrow", Arial, sans-serif;
      letter-spacing: 0.04em;
    }

    body {
      overflow-x: hidden;
    }

    button,
    input,
    textarea {
      font: inherit;
    }

    button {
      cursor: pointer;
    }

    .atelier-page {
        padding-top: 66px;
      min-height: 100vh;
      background:
        radial-gradient(circle at 20% 10%, rgba(214, 196, 153, 0.045), transparent 32%),
        var(--bg);
    }

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

button {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
} 

.btn-choice,
.btn-choice-bg,
.model-card,
.atelier-button,
.step-button {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  font-family: "acumin-pro-condensed", "Arial Narrow", Arial, sans-serif;
}



    .atelier-shell {
      width: min(1880px, calc(100vw - clamp(24px, 8vw, 180px)));
      margin: clamp(28px, 5vw, 68px) auto 70px;
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      grid-template-rows: minmax(430px, 56vh) minmax(210px, 25vh);
      border-top: 1px solid var(--line);
      border-left: 1px solid var(--line);
    }

    .panel {
      position: relative;
      min-width: 0;
      min-height: 0;
      background: rgba(5, 5, 4, 0.7);
      border-right: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      overflow: hidden;
    }

    .panel-inner {
      height: 100%;
      padding: clamp(24px, 3vw, 42px);
      display: flex;
      flex-direction: column;
    }

    .panel-kicker {
      color: var(--gold);
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.22em;
      display: flex;
      gap: 12px;
      align-items: center;
      margin-bottom: 28px;
    }

    .panel-kicker::after {
      content: "";
      display: block;
      width: 54px;
      height: 1px;
      background: var(--line-strong);
    }

    .reference-panel {
      grid-column: 1;
      grid-row: 1;
    }

    .action-panel {
      grid-column: 2;
      grid-row: 1;
    }

    .brief-panel {
      grid-column: 3;
      grid-row: 1;
    }

    .step-strip {
      grid-column: 1 / 4;
      grid-row: 2;
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      min-height: 0;
    }

    .reference-content {
      margin-top: auto;
      min-height: 60%;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .reference-title {
      font-size: clamp(36px, 4.4vw, 82px);
      line-height: 0.93;
      font-weight: 200;
      letter-spacing: 0.015em;
      margin: 0;
      color: var(--text);
    }

    .reference-title em {
      color: var(--gold);
      font-style: italic;
      font-weight: 500;
      letter-spacing: 0.01em;
    }

    .reference-meta {
      margin-top: 34px;
      color: var(--muted);
      max-width: 340px;
      font-size: 13px;
      line-height: 1.75;
      letter-spacing: 0.08em;
    }

    .reference-object {
      border: 1px solid var(--line);
      background: linear-gradient(135deg, rgba(255,255,255,0.025), rgba(214,196,153,0.02));
      min-height: 260px;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 30px;
    }

    .reference-object strong {
      display: block;
      color: var(--gold);
      text-transform: uppercase;
      font-size: 11px;
      letter-spacing: 0.2em;
      margin-bottom: 14px;
    }

    .reference-object span {
      display: block;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.7;
      letter-spacing: 0.09em;
    }

    .action-content {
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      text-align: center;
      gap: 28px;
    }

    .action-title {
      margin: 0;
      color: var(--text);
      text-transform: uppercase;
      font-size: clamp(40px, 3vw, 64px);
      line-height: 1.15;
      font-weight: 300;
      letter-spacing: 0.055em;
    }

    .action-copy {
      max-width: 430px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.75;
      letter-spacing: 0.08em;
      margin: 0;
    }

    .atelier-button {
      border: 1px solid var(--line-strong);
      color: var(--gold);
      background: rgba(214, 196, 153, 0.03);
      text-transform: uppercase;
      font-size: 10px;
      letter-spacing: 0.18em;
      padding: 14px 20px;
      min-width: 154px;
      transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
    }

    .atelier-button:hover {
      border-color: rgba(214, 196, 153, 0.56);
      background: rgba(214, 196, 153, 0.08);
      color: #f4e8c7;
    }

    .atelier-button.secondary {
      color: var(--muted);
    }

    .upload-zone {
      width: min(420px, 100%);
      min-height: 170px;
      border: 1px dashed var(--line-strong);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 28px;
      color: var(--muted);
      background: rgba(255,255,255,0.015);
    }

    .upload-zone input {
      display: none;
    }

    .form-stack {
      width: min(520px, 100%);
      display: grid;
      gap: 18px;
      text-align: left;
    }

    .field-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.08em;
}

    .field label span:last-child.is-limit {
    color: var(--danger);
    font-weight: 600;
    }

    .field label {
      display: flex;
      justify-content: space-between;
      color: var(--gold);
      text-transform: uppercase;
      font-size: 10px;
      letter-spacing: 0.18em;
      margin-bottom: 9px;
    }

    textarea,
    input[type="search"] {
      width: 100%;
      border: 1px solid var(--line);
      color: var(--text);
      background: rgba(0,0,0,0.28);
      padding: 14px 15px;
      outline: none;
      resize: vertical;
      min-height: 92px;
      letter-spacing: 0.06em;
    }

    input[type="search"] {
      min-height: 0;
      height: 42px;
      resize: none;
    }

    textarea:focus,
    input[type="search"]:focus {
      border-color: var(--line-strong);
    }

    .brief-title {
      margin: 0 0 28px;
      color: var(--text);
      text-transform: uppercase;
      font-size: clamp(26px, 2.3vw, 42px);
      line-height: 1.14;
      font-weight: 300;
      text-align: center;
      letter-spacing: 0.055em;
    }

    .brief-list {
      display: grid;
      gap: 14px;
      margin-top: auto;
    }

    .brief-item {
      display: grid;
      grid-template-columns: 32px 1fr auto;
      gap: 12px;
      align-items: start;
      padding: 12px 0;
      border-top: 1px solid var(--line);
      color: var(--muted);
    }

    .brief-index {
      color: var(--faint);
      font-size: 20px;
      line-height: 1;
    }

    .brief-label {
      color: var(--gold);
      text-transform: uppercase;
      font-size: 10px;
      letter-spacing: 0.18em;
      margin-bottom: 5px;
    }

    .brief-value {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
      letter-spacing: 0.08em;
    }

    .brief-status {
      color: var(--faint);
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
    }

    .brief-status.complete {
      color: var(--success);
    }

    .step-card {
      position: relative;
      appearance: none;
      border: 0;
      border-right: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      background: rgba(5,5,4,0.7);
      color: var(--muted);
      padding: 28px 26px;
      text-align: left;
      overflow: hidden;
      min-height: 100%;
      transition: background 180ms ease, color 180ms ease;
    }

    .step-card:hover {
      background: rgba(214,196,153,0.025);
    }

    .step-card.is-active {
      background: rgba(214,196,153,0.045);
      color: var(--text);
    }

    .step-card.is-complete .step-number {
      color: rgba(167,184,138,0.34);
    }

    .step-number {
      position: absolute;
      top: 28px;
      left: 28px;
      color: var(--faint);
      font-size: 46px;
      line-height: 1;
      letter-spacing: -0.03em;
      font-weight: 200;
    }

    .step-card-title {
      position: relative;
      margin-top: 64px;
      color: inherit;
      text-transform: uppercase;
      font-size: clamp(20px, 1.7vw, 32px);
      line-height: 1.18;
      font-weight: 300;
      letter-spacing: 0.055em;
    }

    .step-card-meta {
      position: absolute;
      left: 28px;
      bottom: 28px;
      color: var(--gold);
      border: 1px solid var(--line-strong);
      padding: 8px 10px;
      text-transform: uppercase;
      font-size: 9px;
      letter-spacing: 0.16em;
      max-width: calc(100% - 56px);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .choice-grid {
      display: grid;
      grid-template-columns: repeat(5, minmax(56px, 1fr));
      gap: 18px 14px;
      width: min(520px, 100%);
    }

    .swatch-button {
      border: 0;
      padding: 0;
      background: transparent;
      color: var(--muted);
      text-align: left;
    }

    .swatch {
      display: block;
      height: 38px;
      border: 1px solid rgba(255,255,255,0.10);
      margin-bottom: 8px;
    }

    .swatch-button.is-selected .swatch {
      outline: 1px solid var(--gold);
      outline-offset: 3px;
    }

    .swatch-name {
      display: block;
      text-transform: uppercase;
      font-size: 9px;
      letter-spacing: 0.16em;
    }

    .frame-builder {
      width: min(520px, 100%);
      display: grid;
      gap: 22px;
      text-align: left;
    }

    .button-row {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 10px;
    }

    .option-button {
      border: 1px solid var(--line);
      background: transparent;
      color: var(--muted);
      min-height: 45px;
      text-transform: uppercase;
      font-size: 9px;
      letter-spacing: 0.14em;
      padding: 10px;
    }

    .option-button.is-selected {
      color: var(--gold);
      border-color: var(--line-strong);
      background: rgba(214,196,153,0.04);
    }

    .selected-renders {
      border-top: 1px solid var(--line);
      padding-top: 14px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.7;
    }

.review-panel {
  width: min(540px, 100%);
  max-width: 100%;
  max-height: min(420px, 100%);
  overflow-y: auto;
  overflow-x: hidden;
  text-align: left;
  border: 1px solid var(--line);
  padding: 24px;
  background: rgba(0,0,0,0.18);
}

.review-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 14px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  min-width: 0;
}

.review-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.review-row strong {
  color: var(--gold);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 400;
}

.review-row span {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

    @media (min-width: 2200px) {
      .atelier-shell {
        width: min(2880px, calc(100vw - clamp(260px, 10vw, 420px)));
        grid-template-rows: minmax(560px, 58vh) minmax(240px, 22vh);
      }

      .panel-inner {
        padding: clamp(36px, 2.4vw, 64px);
      }

      .reference-title {
        font-size: clamp(64px, 4.2vw, 132px);
      }

      .action-title,
      .brief-title {
        font-size: clamp(42px, 2.3vw, 72px);
      }

      .action-copy,
      .reference-meta,
      .brief-value,
      .selected-renders,
      .review-row {
        font-size: 14px;
      }
    }

            .model-browser {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 42px);
}

.model-browser-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.model-filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.model-filter {
  display: grid;
  gap: 6px;
}

.model-filter span {
  color: var(--gold);
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.16em;
}

.model-filter select,
.model-filter-bar input[type="search"] {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.28);
  color: var(--text);
  padding: 0 10px;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.12em;
  outline: none;
}

.model-grid {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 14px;
  padding-right: 10px;
  align-content: start;
}


.model-grid-card.is-selected {
  border-color: var(--line-strong);
  outline: 1px solid rgba(214,196,153,0.28);
  outline-offset: -2px;
}


.model-grid-card span {
  display: block;
  padding: 10px 9px;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.15em;
}

.model-grid-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}

.model-grid-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.model-grid-name {
  display: block;
  padding: 10px 9px;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.15em;
}

.model-folio {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 22px;
}

.model-media {
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.model-media-frame {
  height: 100%;
  max-height: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.model-media-frame img,
.model-media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.selected-model-reference {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 20px;
}

.selected-model-media {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.selected-model-media img {
  height: 100%;
  max-width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  display: block;
}

.selected-model-footer h3 {
  margin: 0 0 8px;
  color: var(--text);
  text-transform: uppercase;
  font-size: clamp(28px, 2.2vw, 46px);
  font-weight: 300;
  letter-spacing: 0.06em;
}

.selected-model-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.08em;
}

/* Expanded casting mode */

.atelier-shell.is-casting {
  grid-template-columns: minmax(420px, 0.9fr) minmax(700px, 2.1fr);
  grid-template-rows: minmax(720px, 76vh);
}

.atelier-shell.is-casting .reference-panel {
  grid-column: 1;
  grid-row: 1;
}

.atelier-shell.is-casting .action-panel {
  grid-column: 2;
  grid-row: 1;
}

.atelier-shell.is-casting .brief-panel,
.atelier-shell.is-casting .step-strip {
  display: none;
}

@media (min-width: 2200px) {
  .atelier-shell.is-casting {
    grid-template-columns: minmax(620px, 0.9fr) minmax(1200px, 2.1fr);
    grid-template-rows: minmax(980px, 76vh);
  }
}

@media (min-width: 2200px) {
  .model-grid {
    grid-template-columns: repeat(6, minmax(180px, 1fr));
    gap: 18px;
  }

  .model-grid-card span {
    font-size: 11px;
    padding: 12px 10px;
  }
}

.model-folio-footer {
  padding-top: 22px;
}

.model-folio-footer h3 {
  margin: 0 0 8px;
  color: var(--text);
  text-transform: uppercase;
  font-size: clamp(28px, 2.3vw, 46px);
  font-weight: 300;
  letter-spacing: 0.06em;
}

.model-folio-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.08em;
}

.model-folio-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.no-match {
  grid-column: 1 / -1;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 24px;
  text-align: center;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.16em;
}

    @media (max-width: 1100px) {
      .atelier-shell {
        width: calc(100vw - 28px);
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
      }

      .reference-panel,
      .action-panel,
      .brief-panel,
      .step-strip {
        grid-column: 1;
        grid-row: auto;
      }

      .panel {
        min-height: 360px;
      }

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

    @media (max-width: 640px) {
      .atelier-header {
        padding: 0 18px;
      }

      .header-nav {
        gap: 14px;
        font-size: 10px;
      }

      .header-nav a:first-child {
        display: none;
      }

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

      .button-row,
      .choice-grid {
        grid-template-columns: 1fr 1fr;
      }
    }

    .background-reference {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 20px;
}

.background-media {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.background-media-frame {
  height: 100%;
  max-width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.background-media-frame img,
.background-media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.background-reference-footer h3 {
  margin: 0 0 8px;
  color: var(--text);
  text-transform: uppercase;
  font-size: clamp(28px, 2.2vw, 46px);
  font-weight: 300;
  letter-spacing: 0.06em;
}

.background-reference-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.08em;
}

.background-choice-grid {
  grid-template-columns: repeat(5, minmax(58px, 1fr));
}

.frame-reference {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 20px;
}

.frame-media {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.frame-media-frame {
  height: 100%;
  max-width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.frame-media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.frame-reference-footer h3 {
  margin: 0 0 8px;
  color: var(--text);
  text-transform: uppercase;
  font-size: clamp(28px, 2.2vw, 46px);
  font-weight: 300;
  letter-spacing: 0.06em;
}

.frame-reference-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.08em;
}

.frame-current {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.frame-current strong {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  font-weight: 400;
}

.selected-render-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 9px 0;
}

.selected-render-row:first-child {
  border-top: 0;
}

.selected-render-row button {
  border: 0;
  background: none;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.14em;
  padding: 0;
}

.selected-render-row button:hover {
  color: var(--danger);
}

.option-button.is-disabled,
.option-button:disabled {
  opacity: 0.32;
  cursor: not-allowed;
  border-color: rgba(245, 241, 232, 0.08);
}

.option-button:disabled:hover {
  color: var(--muted);
  background: transparent;
  border-color: rgba(245, 241, 232, 0.08);
}

.option-note {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  font-size: 8px;
  letter-spacing: 0.14em;
  opacity: 0.7;
}

.order-cart-summary {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.08em;
}

.order-cart-summary strong {
  display: block;
  color: var(--gold);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.18em;
  margin-bottom: 4px;
}

.cart-overview {
  width: min(540px, 100%);
  max-width: 100%;
  border: 1px solid var(--line);
  padding: 18px 20px;
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  max-height: 180px;
  overflow-y: auto;
}

.cart-overview > strong {
  display: block;
  color: var(--gold);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.18em;
  margin-bottom: 12px;
}

.cart-overview-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.cart-overview-row:first-of-type {
  border-top: 0;
}

.cart-overview-row b,
.cart-overview-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.cart-overview-row b {
  color: var(--text);
  font-weight: 400;
}

.cart-overview-row small {
  color: var(--muted);
  margin-top: 3px;
}

.cart-overview-total {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 8px;
  color: var(--gold);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.16em;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.atelier-checkout-panel {
  width: min(540px, 100%);
  max-width: 100%;
  border: 1px solid var(--line);
  padding: 20px;
  text-align: left;
  background: rgba(0, 0, 0, 0.18);
  max-height: 300px;
  overflow-y: auto;
}

.checkout-section-title {
  color: var(--gold);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.18em;
  margin-bottom: 14px;
}

.checkout-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.checkout-brief-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
  align-items: start;
}

.checkout-brief-row:first-child {
  border-top: 0;
}

.checkout-brief-index {
  color: var(--faint);
  font-size: 18px;
  line-height: 1;
}

.checkout-brief-main {
  min-width: 0;
}

.checkout-brief-title {
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}

.checkout-brief-meta,
.checkout-brief-frames {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.checkout-remove {
  border: 0;
  background: none;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.14em;
  padding: 0;
}

.checkout-remove:hover {
  color: var(--danger);
}

.checkout-coupon {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}

.checkout-coupon label {
  display: block;
  color: var(--gold);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.18em;
  margin-bottom: 8px;
}

.checkout-coupon-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.checkout-coupon input {
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.28);
  color: var(--text);
  padding: 0 12px;
  outline: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.checkout-message {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.checkout-message.success {
  color: var(--success);
}

.checkout-message.error {
  color: var(--danger);
}

.checkout-totals {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
  display: grid;
  gap: 8px;
}

.checkout-totals div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.checkout-totals strong {
  color: var(--text);
  font-weight: 400;
}

.checkout-total-row {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 4px;
}

.checkout-total-row span,
.checkout-total-row strong {
  color: var(--gold);
  text-transform: uppercase;
}

.review-reference-card {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 20px;
}

.review-reference-visual {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.review-reference-model {
  height: 100%;
  max-width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
}

.review-reference-model img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.review-reference-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.18);
}

.review-reference-summary {
  text-align: left;
}

.review-reference-status {
  color: var(--gold);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.18em;
  margin-bottom: 12px;
}

.review-reference-lines {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.08em;
}

.review-reference-swatches {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.review-bg-swatch {
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  display: inline-block;
}

.review-added-note {
  margin: 0;
  color: var(--success);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.5;
}

.review-panel,
.atelier-checkout-panel,
.model-grid {
  scrollbar-width: thin;
  scrollbar-color: rgba(193, 168, 117, 0.45) rgba(255, 255, 255, 0.04);
}

.review-panel::-webkit-scrollbar,
.atelier-checkout-panel::-webkit-scrollbar,
.model-grid::-webkit-scrollbar {
  width: 10px;
}

.review-panel::-webkit-scrollbar-track,
.atelier-checkout-panel::-webkit-scrollbar-track,
.model-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-left: 1px solid rgba(255, 255, 255, 0.04);
}

.review-panel::-webkit-scrollbar-thumb,
.atelier-checkout-panel::-webkit-scrollbar-thumb,
.model-grid::-webkit-scrollbar-thumb {
  background: rgba(193, 168, 117, 0.38);
  border: 2px solid rgba(0, 0, 0, 0.55);
}

.review-panel::-webkit-scrollbar-thumb:hover,
.atelier-checkout-panel::-webkit-scrollbar-thumb:hover,
.model-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(193, 168, 117, 0.55);
}

.order-batch-panel {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto auto;
  gap: 16px;
  min-width: 0;
}

.order-batch-list {
  min-height: 0;
  overflow-y: auto;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.16);
  padding: 14px;
}

.order-batch-empty {
  border: 1px solid var(--line);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  text-align: center;
}

.order-batch-empty strong {
  color: var(--gold);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 400;
}

.order-batch-empty span {
  font-size: 12px;
  letter-spacing: 0.08em;
}

.order-batch-brief {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.order-batch-brief:first-child {
  border-top: 0;
  padding-top: 0;
}

.order-batch-brief-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.order-batch-brief-head span {
  color: var(--faint);
  font-size: 18px;
}

.order-batch-brief-head strong {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}

.order-batch-brief-head button,
.checkout-remove {
  border: 0;
  background: none;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.14em;
  padding: 0;
}

.order-batch-brief-head button:hover {
  color: var(--danger);
}

.order-batch-render {
  display: grid;
  grid-template-columns: 34px 24px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(245, 241, 232, 0.06);
}

.order-model-thumb {
  width: 34px;
  height: 46px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}

.order-model-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.order-bg-thumb {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
}

.order-render-info {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.order-render-info strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.order-render-info span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.08em;
}

.order-batch-coupon {
  border: 1px solid var(--line);
  padding: 14px;
  background: rgba(0, 0, 0, 0.12);
}

.order-batch-coupon label {
  display: block;
  color: var(--gold);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.18em;
  margin-bottom: 8px;
}

.order-batch-coupon-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.order-batch-coupon-row input {
  min-width: 0;
  height: 46px;
  font-size: 13px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.28);
  color: var(--text);
  padding: 0 12px;
  outline: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.order-batch-totals {
  border: 1px solid var(--line);
  padding: 18px;
  display: grid;
  gap: 11px;
  background: rgba(0, 0, 0, 0.12);
}

.order-batch-totals div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.order-batch-totals strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-align: right;
}

.order-batch-totals span {
  color: rgba(245, 241, 232, 0.62);
}

.order-batch-total-row {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 6px;
}

.order-batch-total-row span {
  color: var(--gold);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.18em;
}

.order-batch-total-row strong {
  color: var(--gold);
  font-size: 22px;
  letter-spacing: 0.08em;
}

.order-batch-list,
.review-panel,
.atelier-checkout-panel,
.model-grid {
  scrollbar-width: thin;
  scrollbar-color: rgba(193, 168, 117, 0.45) rgba(255, 255, 255, 0.04);
}

.order-batch-list::-webkit-scrollbar,
.review-panel::-webkit-scrollbar,
.atelier-checkout-panel::-webkit-scrollbar,
.model-grid::-webkit-scrollbar {
  width: 8px;
}

.order-batch-list::-webkit-scrollbar-track,
.review-panel::-webkit-scrollbar-track,
.atelier-checkout-panel::-webkit-scrollbar-track,
.model-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

.order-batch-list::-webkit-scrollbar-thumb,
.review-panel::-webkit-scrollbar-thumb,
.atelier-checkout-panel::-webkit-scrollbar-thumb,
.model-grid::-webkit-scrollbar-thumb {
  background: rgba(193, 168, 117, 0.38);
}

.review-thumb-line {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.review-thumb-line em {
  font-style: normal;
  min-width: 0;
  overflow-wrap: anywhere;
}

.review-model-thumb {
  width: 34px;
  height: 44px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  flex: 0 0 auto;
}

.review-bg-thumb {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  display: inline-block;
  flex: 0 0 auto;
}

/* Safari-safe casting grid */
.casting-grid,
.model-grid,
.model-browser-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
}

.casting-grid > *,
.model-grid > *,
.model-browser-grid > * {
  min-width: 0 !important;
}

.model-card {
  width: 100% !important;
  min-width: 0 !important;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

.model-card img,
.model-card video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.step-card-meta {
  display: none !important;
}

/* =========================
   BACKGROUND STEP — SAFE LAYOUT
   ========================= */

#actionPanel .action-content {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#actionPanel .action-title {
  flex: 0 0 auto;
  margin-top: 0;
  margin-bottom: 14px;
  line-height: 0.94;
  overflow: visible;
}

#actionPanel .action-copy {
  flex: 0 0 auto;
  margin-bottom: 16px;
}

/* Background swatch grid */
#actionPanel .choice-grid {
  flex: 1 1 auto;
  min-height: 0;

  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 12px;
  align-content: start;

  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  padding-bottom: 8px;
}

/* Swatch card */
#actionPanel .swatch-button {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Keep swatches visible, not thin strips */
#actionPanel .swatch-button .swatch {
  display: block;
  width: 100%;
  height: 46px;
  min-height: 46px;
}

/* Long names cannot distort the grid */
#actionPanel .swatch-name {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 7px;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  font-size: 11px;
  line-height: 1.15;
}

#actionPanel .choice-grid::-webkit-scrollbar {
  width: 5px;
}

#actionPanel .choice-grid::-webkit-scrollbar-track {
  background: transparent;
}

#actionPanel .choice-grid::-webkit-scrollbar-thumb {
  background: rgba(253, 250, 246, 0.18);
  border-radius: 999px;
}

#actionPanel .choice-grid {
  scrollbar-width: thin;
  scrollbar-color: rgba(253, 250, 246, 0.18) transparent;
}

/* =========================
   UPLOAD STEP BASE FIX
   applies before laptop breakpoint
   ========================= */

#actionPanel .action-content:has(#uploadZone) {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#actionPanel .action-content:has(#uploadZone) .action-title {
  flex: 0 0 auto;
  font-size: clamp(42px, 4.4vw, 72px);
  line-height: 0.92;
  margin-top: 0;
  margin-bottom: 14px;
  overflow: visible;
}

#actionPanel .action-content:has(#uploadZone) .action-copy {
  flex: 0 0 auto;
  margin-bottom: 14px;
}

#actionPanel #uploadZone.upload-zone {
  flex: 1 1 auto;
  min-height: 150px;
  max-height: 260px;
  height: auto;

  display: grid;
  place-items: center;

  padding: 22px;
  margin-bottom: 12px;
  box-sizing: border-box;
}

#actionPanel #uploadZone.upload-zone span {
  max-width: 100%;
  text-align: center;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#actionPanel .action-content:has(#uploadZone) .upload-status {
  flex: 0 0 auto;
  margin-bottom: 12px;
}

#actionPanel .action-content:has(#uploadZone) #openGuideButton {
  flex: 0 0 auto;
}

/* =========================
   UPLOAD STEP LAPTOP / SHORT HEIGHT
   ========================= */

@media (max-width: 1700px), (max-height: 980px) {
  #actionPanel .action-content:has(#uploadZone) .action-title {
    font-size: clamp(36px, 4vw, 60px);
    margin-bottom: 12px;
  }

  #actionPanel .action-content:has(#uploadZone) .action-copy {
    margin-bottom: 12px;
  }

  #actionPanel #uploadZone.upload-zone {
    min-height: 125px;
    max-height: 205px;
    padding: 18px;
  }

  #actionPanel .action-content:has(#uploadZone) .upload-status {
    font-size: 11px;
    line-height: 1.25;
  }
}

@media (max-height: 820px) {
  #actionPanel .action-content:has(#uploadZone) .action-title {
    font-size: clamp(32px, 3.7vw, 52px);
  }

  #actionPanel #uploadZone.upload-zone {
    min-height: 105px;
    max-height: 160px;
    padding: 14px;
  }
}

/* =========================
   UPLOAD STEP FINAL TIGHTENING
   ========================= */

#actionPanel .action-content:has(#uploadZone) {
  padding-top: 10px;
  padding-bottom: 10px;
  gap: 0;
}

#actionPanel .action-content:has(#uploadZone) .action-title {
  font-size: clamp(34px, 3.7vw, 56px);
  line-height: 0.98;
  margin-top: 0;
  margin-bottom: 10px;
  padding-top: 4px;
}

#actionPanel .action-content:has(#uploadZone) .action-copy {
  font-size: 13px;
  line-height: 1.25;
  margin-bottom: 10px;
}

#actionPanel #uploadZone.upload-zone {
  min-height: 95px;
  max-height: 300px;
  padding: 14px;
  margin-bottom: 9px;
}

#actionPanel #uploadZone.upload-zone span {
  font-size: 13px;
  line-height: 1.2;
}

#actionPanel .action-content:has(#uploadZone) .upload-status {
  font-size: 10px;
  line-height: 1.2;
  margin-bottom: 9px;
}

#actionPanel .action-content:has(#uploadZone) #openGuideButton {
  min-height: 38px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* =========================
   UPLOADED GARMENT PREVIEW
   ========================= */

.garment-upload-reference {
  display: grid;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.garment-preview {
  width: 100%;
  min-width: 0;
}

.garment-preview model-viewer {
  width: 100%;
  height: min(46vh, 440px);
  min-height: 260px;

  display: block;

  background:
    radial-gradient(circle at 50% 28%, rgba(253, 250, 246, 0.08), transparent 42%),
    rgba(0, 0, 0, 0.22);

  border: 1px solid rgba(253, 250, 246, 0.1);
}

.garment-preview-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;

  border: 1px solid rgba(253, 250, 246, 0.1);
  background: rgba(0, 0, 0, 0.18);

  padding: 22px;
  color: var(--muted);
}

.garment-preview-empty strong,
.garment-preview-empty span {
  display: block;
}

.garment-preview-meta {
  display: grid;
  gap: 5px;

  border: 1px solid rgba(253, 250, 246, 0.1);
  background: rgba(0, 0, 0, 0.16);

  padding: 14px;
}

.garment-preview-meta strong {
  color: var(--text);
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.garment-preview-meta span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
}

@media (max-width: 1450px), (max-height: 850px) {
  .garment-preview model-viewer,
  .garment-preview-empty {
    height: min(36vh, 320px);
    min-height: 210px;
  }

  .garment-preview-meta {
    padding: 12px;
  }
}

/* =========================
   GLB PREVIEW LAYOUT FIX
   ========================= */

.reference-panel .garment-upload-reference {
  width: 100%;
  height: 100%;
  min-height: 0;

  display: flex;
  flex-direction: column;
  gap: 14px;

  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

/* The preview should take most of the left panel */
.reference-panel .garment-preview {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.reference-panel .garment-preview model-viewer {
  width: 100%;
  height: 100%;
  min-height: 500px;

  display: block;

  border: 1px solid rgba(253, 250, 246, 0.1);
  background:
    radial-gradient(circle at 50% 28%, rgba(253, 250, 246, 0.08), transparent 42%),
    rgba(0, 0, 0, 0.22);
}

/* Meta box fixed at bottom, no bleed */
.reference-panel .garment-preview-meta {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;

  display: grid;
  gap: 5px;

  padding: 14px;
  border: 1px solid rgba(253, 250, 246, 0.1);
  background: rgba(0, 0, 0, 0.18);

  overflow: hidden;
}

.reference-panel .garment-preview-meta strong,
.reference-panel .garment-preview-meta span {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.reference-panel .garment-preview-meta strong {
  color: var(--text);
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reference-panel .garment-preview-meta span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
}

@media (max-width: 1450px), (max-height: 850px) {
  .reference-panel .garment-upload-reference {
    gap: 10px;
  }

  .reference-panel .garment-preview model-viewer {
    min-height: 230px;
  }

  .reference-panel .garment-preview-meta {
    padding: 11px;
  }

  .reference-panel .garment-preview-meta strong {
    font-size: 11px;
  }

  .reference-panel .garment-preview-meta span {
    font-size: 10px;
  }
}

/* =========================
   DESCRIBE STEP BASE — LARGE SCREEN
   ========================= */

#actionPanel .action-content:has(.form-stack) {
  padding-top: 22px;
  padding-bottom: 22px;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

#actionPanel .action-content:has(.form-stack) .action-title {
  flex: 0 0 auto;
  font-size: clamp(34px, 3.7vw, 56px);
  line-height: 0.95;
  margin-top: 0;
  margin-bottom: 18px;
  padding-top: 6px;
  overflow: visible;
}

#actionPanel .action-content:has(.form-stack) .action-copy {
  flex: 0 0 auto;
  max-width: 720px;
  margin: 0 auto 22px;
  font-size: 14px;
  line-height: 1.35;
}

#actionPanel .form-stack {
  flex: 1 1 auto;
  min-height: 0;
  width: min(100%, 780px);
  margin: 0 auto;
  overflow-y: visible;
  overflow-x: hidden;
  padding-right: 0;
}

#actionPanel .form-stack .field {
  margin-bottom: 26px;
}

#actionPanel .form-stack textarea {
  min-height: 140px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.35;
}

#actionPanel .field-note {
  font-size: 11px;
  line-height: 1.3;
  margin-top: 10px;
}

/* =========================
   DESCRIBE STEP — LAPTOP / SHORT HEIGHT
   ========================= */

@media (max-width: 1700px), (max-height: 980px) {
  #actionPanel .action-content:has(.form-stack) {
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 0;
  }

  #actionPanel .action-content:has(.form-stack) .action-title {
    font-size: clamp(34px, 3.7vw, 56px);
    line-height: 0.98;
    margin-bottom: 10px;
    padding-top: 4px;
  }

  #actionPanel .action-content:has(.form-stack) .action-copy {
    font-size: 13px;
    line-height: 1.25;
    margin-bottom: 10px;
  }

  #actionPanel .form-stack {
    width: 100%;
    margin: 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
  }

  #actionPanel .form-stack .field {
    margin-bottom: 12px;
  }

  #actionPanel .form-stack textarea {
    min-height: 96px;
    max-height: 140px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.25;
  }

  #actionPanel .field-note {
    font-size: 10px;
    line-height: 1.2;
    margin-top: 8px;
  }
}

/* =========================
   DESCRIBE STEP SCROLLBARS
   ========================= */

#actionPanel .form-stack,
#actionPanel .form-stack textarea {
  scrollbar-width: thin;
  scrollbar-color: rgba(253, 250, 246, 0.18) transparent;
}

#actionPanel .form-stack::-webkit-scrollbar,
#actionPanel .form-stack textarea::-webkit-scrollbar {
  width: 5px;
}

#actionPanel .form-stack::-webkit-scrollbar-track,
#actionPanel .form-stack textarea::-webkit-scrollbar-track {
  background: transparent;
}

#actionPanel .form-stack::-webkit-scrollbar-thumb,
#actionPanel .form-stack textarea::-webkit-scrollbar-thumb {
  background: rgba(253, 250, 246, 0.18);
  border-radius: 999px;
}

#actionPanel .form-stack textarea {
  resize: none;
}
/* =========================
   FRAMES STEP LAPTOP SCROLL
   ========================= */

@media (max-width: 1450px), (max-height: 850px) {
  #actionPanel .action-content {
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  #actionPanel .action-title,
  #actionPanel .action-copy {
    flex: 0 0 auto;
  }

  #actionPanel .frame-builder {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
  }

  #actionPanel .frame-builder::-webkit-scrollbar {
    width: 5px;
  }

  #actionPanel .frame-builder::-webkit-scrollbar-track {
    background: transparent;
  }

  #actionPanel .frame-builder::-webkit-scrollbar-thumb {
    background: rgba(253, 250, 246, 0.18);
    border-radius: 999px;
  }

  #actionPanel .frame-builder {
    scrollbar-width: thin;
    scrollbar-color: rgba(253, 250, 246, 0.18) transparent;
  }
}

/* =========================
   RIGHT BRIEF PANEL SCROLL
   ========================= */

.brief-panel {
  min-height: 0;
  overflow: hidden;
}

#briefPanel {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#briefPanel .panel-kicker,
#briefPanel .brief-title,
#briefPanel h2,
#briefPanel h3 {
  flex: 0 0 auto;
}

#briefPanel .brief-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
}

#briefPanel .brief-list::-webkit-scrollbar {
  width: 5px;
}

#briefPanel .brief-list::-webkit-scrollbar-track {
  background: transparent;
}

#briefPanel .brief-list::-webkit-scrollbar-thumb {
  background: rgba(253, 250, 246, 0.18);
  border-radius: 999px;
}

#briefPanel .brief-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(253, 250, 246, 0.18) transparent;
}

/* =========================
   REVIEW STEP LEFT ORDER BATCH PANEL
   list has height, whole panel can scroll
   ========================= */

#referencePanel {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#referencePanel > .panel-kicker {
  flex: 0 0 auto;
}

#referencePanel .order-batch-panel {
  flex: 1 1 auto;
  min-height: 0;

  display: flex;
  flex-direction: column;
  gap: 14px;

  overflow-y: auto;
  overflow-x: hidden;

  padding-right: 6px;
  box-sizing: border-box;
}

/* Job list gets usable space but does not crush checkout */
#referencePanel .order-batch-list {
  flex: 0 0 auto;
  max-height: 240px;
  min-height: 150px;

  overflow-y: auto;
  overflow-x: hidden;

  padding-right: 6px;
  box-sizing: border-box;
  overscroll-behavior: contain;
}

/* Empty state */
#referencePanel .order-batch-empty {
  min-height: 150px;
  display: grid;
  align-content: center;
  box-sizing: border-box;
}

/* Coupon / totals / checkout stay natural height */
#referencePanel .order-batch-coupon,
#referencePanel .order-batch-totals,
#referencePanel #proceedToPaymentButton {
  flex: 0 0 auto;
  max-width: 100%;
  box-sizing: border-box;
}

/* Coupon row */
#referencePanel .order-batch-coupon-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

#referencePanel .order-batch-coupon-row input {
  min-width: 0;
  width: 100%;
}

/* Totals */
#referencePanel .order-batch-totals {
  display: grid;
  gap: 7px;
}

#referencePanel .order-batch-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

#referencePanel .order-batch-total-row {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(253, 250, 246, 0.1);
}

#referencePanel .order-batch-panel::-webkit-scrollbar,
#referencePanel .order-batch-list::-webkit-scrollbar {
  width: 5px;
}

#referencePanel .order-batch-panel::-webkit-scrollbar-track,
#referencePanel .order-batch-list::-webkit-scrollbar-track {
  background: transparent;
}

#referencePanel .order-batch-panel::-webkit-scrollbar-thumb,
#referencePanel .order-batch-list::-webkit-scrollbar-thumb {
  background: rgba(253, 250, 246, 0.18);
  border-radius: 999px;
}

#referencePanel .order-batch-panel,
#referencePanel .order-batch-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(253, 250, 246, 0.18) transparent;
}

@media (max-width: 1450px), (max-height: 850px) {
  #referencePanel .order-batch-panel {
    gap: 10px;
  }

  #referencePanel .order-batch-list {
    max-height: 185px;
    min-height: 125px;
  }

  #referencePanel .order-batch-coupon-row {
    grid-template-columns: 1fr;
  }

  #referencePanel #applyCouponButton,
  #referencePanel #proceedToPaymentButton {
    width: 100%;
  }

  #referencePanel .order-batch-totals {
    gap: 5px;
  }
}
