html, body {
  overflow-x: hidden;
}

@media (max-width: 560px) {
  .hero h1 {
    font-size: 42px;
    line-height: 1.08;
    letter-spacing: -0.065em;
  }

  .hero-art {
    width: 520px;
    left: 50%;
    margin: -8px 0 -65px;
    transform: translateX(-50%) scale(0.68);
    transform-origin: top center;
    height: 440px;
  }
}

/* Interactive size selection */
.size-cards article {
  position: relative;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  outline: none;
}

.size-cards article.popular {
  border: 1px solid var(--line);
  box-shadow: none;
  transform: none;
}

.size-cards article:hover,
.size-cards article:focus-visible {
  border-color: #222;
  transform: translateY(-4px);
}

.size-cards article:focus-visible {
  box-shadow: 0 0 0 4px rgba(182, 255, 52, 0.35);
}

.size-cards article.selected,
.size-cards article.selected:hover,
.size-cards article.selected:focus-visible {
  border: 2px solid #222;
  box-shadow: 9px 11px 0 var(--lime);
  transform: translateY(-8px);
}

.size-cards article:not(.selected) .size-select-button {
  color: #111;
  background: #fff;
}

.size-cards article.selected .size-select-button {
  color: #fff;
  background: #222;
  border-color: #222;
}

.size-cards article .popular-tag {
  top: 29px;
  right: 29px;
  z-index: 6;
  color: var(--lime);
  background: #222;
  opacity: 1;
}

/* Model preview notice appears only after the model has loaded. */
.result-bar {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding-right: 72px;
}

.result-bar > .result-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.result-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.model-preview-tip {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #dfd8c4;
  border-radius: 12px;
  color: #665f50;
  background: #fff8e7;
  font-size: 9px;
  line-height: 1.65;
}

.model-preview-tip b {
  flex: 0 0 auto;
  color: #28271f;
}

@media (max-width: 560px) {
  .result-bar {
    padding-right: 0;
  }

  .result-bar > .result-top {
    align-items: stretch;
    flex-direction: column;
  }

  .result-bar > .result-top button {
    width: 100%;
  }

  .model-preview-tip {
    display: block;
    font-size: 9px;
  }

  .model-preview-tip b {
    display: block;
    margin-bottom: 3px;
  }
}

/* Local checkout prototype */
.checkout[hidden],
.checkout-success[hidden] {
  display: none !important;
}

.checkout {
  padding-top: 110px;
  scroll-margin-top: 24px;
}

.checkout-heading p {
  max-width: 520px;
}

.checkout-steps {
  display: grid;
  grid-template-columns: auto minmax(30px, 1fr) auto minmax(30px, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 32px 0 26px;
  color: #8b887f;
  font-weight: 700;
}

.checkout-steps i {
  height: 2px;
  background: #dedbd1;
}

.checkout-steps .done,
.checkout-steps .active {
  color: #171713;
}

.checkout-steps .done::first-letter {
  color: #58af52;
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(460px, 1.22fr);
  gap: 22px;
  align-items: start;
}

.order-summary,
.checkout-form,
.checkout-success {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
}

.order-summary {
  padding: 28px;
  position: sticky;
  top: 24px;
}

.summary-model {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.summary-model > span {
  display: grid;
  place-items: center;
  flex: 0 0 68px;
  height: 68px;
  border-radius: 20px;
  background: #eeeaff;
  color: #6855db;
  font-size: 22px;
  font-weight: 900;
}

.summary-model div {
  display: grid;
  gap: 3px;
}

.summary-model small,
.summary-model em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.summary-model strong {
  font-size: 18px;
}

.order-summary dl {
  margin: 16px 0;
}

.order-summary dl div,
.price-lines p {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 0;
}

.order-summary dt,
.price-lines span {
  color: var(--muted);
}

.order-summary dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.price-lines {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.price-lines p {
  margin: 0;
}

.price-lines .total {
  align-items: end;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}

.price-lines .total strong {
  font-size: 30px;
}

.price-warning {
  display: block;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #645e4f;
  background: #fff7df;
  line-height: 1.55;
}

.checkout-form {
  padding: 30px;
}

.form-section-title {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.form-section-title > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--lime);
  font-weight: 900;
}

.form-section-title div {
  display: grid;
  gap: 2px;
}

.form-section-title strong {
  font-size: 19px;
}

.form-section-title small {
  color: var(--muted);
}

.payment-title {
  margin-top: 30px;
}

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

.checkout-fields label,
.checkout-fields label.wide {
  display: grid;
  gap: 8px;
}

.checkout-fields label.wide {
  grid-column: 1 / -1;
}

.checkout-fields label > span {
  font-size: 13px;
  font-weight: 700;
}

.checkout-fields input,
.checkout-fields textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d9d5ca;
  border-radius: 13px;
  padding: 14px 15px;
  color: #171713;
  background: #fbfaf6;
  font: inherit;
  resize: vertical;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.checkout-fields input:focus,
.checkout-fields textarea:focus {
  outline: none;
  border-color: #222;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(182, 255, 52, 0.28);
}

.payment-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.payment-options label {
  cursor: pointer;
}

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

.payment-options label > span {
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  min-height: 78px;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid #d9d5ca;
  border-radius: 16px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.payment-options label > span i {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f0eee7;
  font-style: normal;
  font-weight: 900;
}

.payment-options label > span b {
  align-self: end;
}

.payment-options label > span small {
  align-self: start;
  color: var(--muted);
}

.payment-options input:checked + span {
  border: 2px solid #222;
  box-shadow: 5px 6px 0 var(--lime);
  transform: translateY(-2px);
}

.payment-options input:focus-visible + span {
  box-shadow: 0 0 0 4px rgba(182, 255, 52, 0.34);
}

.checkout-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 25px 0 16px;
  color: #4d4a42;
  font-size: 13px;
  line-height: 1.55;
  cursor: pointer;
}

.checkout-consent input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: #222;
}

.demo-pay-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 15px;
  padding: 18px 20px;
  color: #111;
  background: var(--lime);
  font: inherit;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.demo-pay-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #222;
}

.checkout-safe-note {
  margin: 17px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.checkout-success {
  max-width: 720px;
  margin: 26px auto 0;
  padding: 54px 34px;
  text-align: center;
}

.checkout-success > span {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--lime);
  font-size: 34px;
  font-weight: 900;
}

.checkout-success h3 {
  margin: 0 0 10px;
  font-size: 30px;
}

.checkout-success p {
  max-width: 520px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.7;
}

.checkout-success strong {
  display: block;
  margin: 22px auto;
  font-size: 18px;
  letter-spacing: 0.08em;
}

.checkout-success button {
  border: 1px solid #222;
  border-radius: 999px;
  padding: 12px 24px;
  color: #111;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .order-summary {
    position: static;
  }
}

@media (max-width: 700px) {
  .checkout {
    padding-top: 72px;
  }

  .checkout-steps {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .checkout-steps i {
    display: none;
  }

  .checkout-steps span {
    padding: 9px 12px;
    border-radius: 10px;
    background: #f3f1ea;
  }

  .checkout-fields,
  .payment-options {
    grid-template-columns: 1fr;
  }

  .checkout-form,
  .order-summary {
    padding: 20px;
    border-radius: 22px;
  }

  .size-cards article.selected,
  .size-cards article.selected:hover,
  .size-cards article.selected:focus-visible {
    transform: translateY(-4px);
    box-shadow: 7px 8px 0 var(--lime);
  }
}

/* Text-to-image creation flow */
.creation-source-panel[hidden],
.image-task-panel[hidden],
.use-generated-image[hidden] {
  display: none !important;
}

.creation-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
  padding: 5px;
  border-radius: 15px;
  background: #f1efe7;
}

.segmented label.disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.creation-tabs button {
  display: grid;
  gap: 3px;
  border: 0;
  border-radius: 11px;
  padding: 11px 10px;
  color: #6d6b61;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.creation-tabs button.active {
  color: #171711;
  background: #fff;
  box-shadow: 0 4px 14px rgba(45, 40, 25, 0.08);
}

.creation-tabs b {
  font-size: 11px;
}

.creation-tabs small {
  font-size: 8px;
}

.prompt-field {
  position: relative;
  display: grid;
  gap: 7px;
}

.prompt-field > span,
.image-settings label > span {
  color: #55534b;
  font-size: 10px;
  font-weight: 800;
}

.prompt-field textarea {
  width: 100%;
  min-height: 116px;
  box-sizing: border-box;
  border: 1px solid #d9d5c8;
  border-radius: 14px;
  padding: 13px 14px 28px;
  color: #222;
  background: #fff;
  font: inherit;
  font-size: 11px;
  line-height: 1.7;
  resize: vertical;
}

.prompt-field textarea:focus {
  outline: none;
  border-color: #222;
  box-shadow: 0 0 0 4px rgba(198, 255, 72, 0.28);
}

.prompt-field > small {
  position: absolute;
  right: 12px;
  bottom: 9px;
  color: #aaa69a;
  font-size: 8px;
}

.prompt-helper {
  margin-top: 12px;
  padding: 13px;
  border: 1px solid #e2ded2;
  border-radius: 15px;
  background: #fbfaf5;
}

.prompt-helper-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.prompt-helper-title > div {
  display: grid;
  gap: 2px;
}

.prompt-helper-title b {
  font-size: 10px;
}

.prompt-helper-title small {
  color: var(--muted);
  font-size: 8px;
}

.prompt-helper-title button {
  flex: 0 0 auto;
  border: 1px solid #222;
  border-radius: 999px;
  padding: 7px 9px;
  color: #222;
  background: #fff;
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.prompt-guide-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 7px;
  align-items: start;
  margin-top: 8px;
}

.prompt-guide-row > span {
  padding-top: 6px;
  color: #77736a;
  font-size: 8px;
  font-weight: 800;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.prompt-chips button {
  border: 1px solid #ddd8cc;
  border-radius: 999px;
  padding: 5px 8px;
  color: #4f4c43;
  background: #fff;
  font-size: 8px;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.prompt-chips button:hover,
.prompt-chips button.selected {
  border-color: #222;
  background: var(--lime);
  transform: translateY(-1px);
}

.image-settings {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 9px;
  margin-top: 13px;
}

.image-settings label {
  display: grid;
  gap: 7px;
}

.image-model-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.image-model-field > span {
  color: #55534b;
  font-size: 10px;
  font-weight: 800;
}

.image-settings select:not([hidden]) {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 8px;
  color: #222;
  background: #fff;
  font-size: 9px;
}

.image-model-select {
  position: relative;
  min-width: 0;
}

.image-model-select summary {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 9px;
  align-items: center;
  min-height: 50px;
  box-sizing: border-box;
  border-radius: 12px;
  padding: 8px 10px;
  color: #fff;
  background: #252522;
  list-style: none;
  cursor: pointer;
}

.image-model-select summary::-webkit-details-marker {
  display: none;
}

.image-model-select summary > div,
.image-model-menu button > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.image-model-select summary b,
.image-model-menu button b {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-model-select summary small,
.image-model-menu button small {
  color: #a9a89f;
  font-size: 7px;
}

.image-model-select summary > i {
  font-size: 14px;
  font-style: normal;
  transition: transform 150ms ease;
}

.image-model-select[open] summary > i {
  transform: rotate(180deg);
}

.image-model-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 18px;
  filter: saturate(0.9);
}

.image-model-icon.banana-pro {
  background: linear-gradient(145deg, #eee6a0, #b89750);
}

.image-model-icon.banana-two {
  background: linear-gradient(145deg, #ece9cf, #db7b3b);
}

.image-model-icon.banana {
  background: linear-gradient(145deg, #d7f5e5, #967bd8);
}

.image-model-icon.gpt {
  color: #fff;
  background: linear-gradient(145deg, #78d6c4, #6282c9);
  font-weight: 900;
}

.image-model-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 4px;
  margin-top: 0;
  padding: 5px;
  border-radius: 13px;
  background: #1f1f1d;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.image-model-menu button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 16px;
  gap: 9px;
  align-items: center;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 7px;
  color: #fff;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.image-model-menu button:hover,
.image-model-menu button.selected {
  border-color: #474742;
  background: #2c2c29;
}

.image-model-menu button em {
  color: var(--lime);
  font-size: 7px;
  font-style: normal;
  white-space: nowrap;
}

.image-model-menu button > i {
  color: var(--lime);
  font-size: 10px;
  font-style: normal;
  opacity: 0;
}

.image-model-menu button.selected > i {
  opacity: 1;
}

.multi-view-option {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 10px 11px;
  border: 1px solid #e1ddd1;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.multi-view-option input {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: #222;
}

.multi-view-option span {
  display: grid;
  gap: 2px;
}

.multi-view-option b {
  font-size: 9px;
}

.multi-view-option small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.image-generate-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 12px;
  border: 0;
  border-radius: 13px;
  padding: 13px 14px;
  color: #fff;
  background: #262620;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.image-generate-button b {
  color: var(--lime);
  font-size: 8px;
}

.image-generate-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.credit-safety-note {
  margin: 7px 0 0;
  color: #99958a;
  text-align: center;
  font-size: 8px;
}

.image-task-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #ddd8cc;
  border-radius: 15px;
  background: #fff;
}

.image-task-status {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 9px;
  align-items: center;
}

.image-task-status > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #222;
  background: var(--lime);
}

.image-task-status div {
  display: grid;
  gap: 2px;
}

.image-task-status b {
  font-size: 9px;
}

.image-task-status small {
  color: var(--muted);
  font-size: 8px;
}

.image-task-status em {
  color: #7156d9;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.generated-image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 11px;
}

.generated-image-grid:empty {
  display: none;
}

.generated-image-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid #222;
  border-radius: 12px;
  background: #f1efe8;
}

.generated-image-grid img:only-child {
  grid-column: 1 / -1;
  max-height: 300px;
  object-fit: contain;
}

.use-generated-image {
  width: 100%;
  margin-top: 10px;
  border: 0;
  border-radius: 11px;
  padding: 11px;
  color: #171711;
  background: var(--lime);
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
}

.reference-status {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 15px 0;
  padding: 10px 11px;
  border: 1px dashed #cfcabc;
  border-radius: 12px;
  color: #77736a;
  background: #f8f6ef;
}

.reference-status > i {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  color: #77736a;
  background: #e8e5dc;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.reference-status span {
  display: grid;
  gap: 1px;
}

.reference-status b {
  font-size: 9px;
}

.reference-status small {
  font-size: 8px;
}

.reference-status.ready {
  border-style: solid;
  border-color: #addb57;
  color: #292a20;
  background: #f4ffe0;
}

.reference-status.ready > i {
  color: #222;
  background: var(--lime);
}

@media (max-width: 560px) {
  .creation-tabs,
  .image-settings {
    grid-template-columns: 1fr;
  }

  .prompt-helper-title {
    align-items: stretch;
    flex-direction: column;
  }

  .prompt-helper-title button {
    width: 100%;
  }
}

/* Mobile hardening: safe areas, compact layouts and reliable touch targets. */
html {
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 0;
  max-width: 100%;
}

img,
video,
canvas,
svg,
model-viewer {
  max-width: 100%;
}

button,
input,
select,
textarea,
summary {
  touch-action: manipulation;
}

@media (max-width: 900px) {
  .shell {
    width: min(100% - 32px, 1180px);
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    padding-top: 28px;
    padding-bottom: 54px;
  }

  .hero-copy {
    min-width: 0;
    width: 100%;
    padding-right: 0;
  }

  .hero-copy > p {
    max-width: 640px;
  }

  .hero-art {
    width: 560px;
    min-width: 0;
    max-width: none;
    justify-self: center;
  }

  .prompt-field textarea,
  .image-settings select:not([hidden]),
  .field-row select,
  .checkout-fields input,
  .checkout-fields textarea,
  .chat-input input {
    font-size: 16px;
  }

  .studio,
  .sizes {
    padding-top: 84px;
    padding-bottom: 84px;
  }

  .process {
    padding-top: 82px;
    padding-bottom: 82px;
  }

  .studio-grid,
  .creator-panel,
  .viewer-panel,
  .checkout-grid,
  .checkout-form,
  .order-summary {
    min-width: 0;
  }

  .viewer-stage,
  .viewer-panel model-viewer {
    min-height: clamp(400px, 72vw, 560px);
  }

  .trust-inner {
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .trust-inner::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 600px) {
  .shell {
    width: min(100% - 24px, 1180px);
  }

  .notice {
    min-height: 34px;
    height: auto;
    padding: 7px max(12px, env(safe-area-inset-right)) 7px max(12px, env(safe-area-inset-left));
    gap: 8px;
    text-align: center;
    line-height: 1.45;
  }

  .nav {
    height: 68px;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .brand {
    gap: 8px;
    min-width: 0;
    font-size: 20px;
  }

  .brand-mark {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
  }

  .brand small {
    max-width: 120px;
    overflow: hidden;
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-cta {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 13px;
    font-size: 10px;
    white-space: nowrap;
  }

  .hero {
    padding-top: 18px;
    padding-bottom: 38px;
  }

  .hero-copy {
    padding-top: 12px;
  }

  .eyebrow {
    max-width: 100%;
    font-size: 10px;
    line-height: 1.35;
  }

  .hero h1 {
    margin: 19px 0;
    font-size: clamp(38px, 12.5vw, 50px);
    line-height: 1.06;
    letter-spacing: -0.07em;
  }

  .hero h1 span::after {
    height: 8px;
  }

  .hero-copy > p {
    font-size: 15px;
    line-height: 1.75;
  }

  .hero-actions {
    gap: 8px;
    margin-top: 24px;
  }

  .primary,
  .ghost {
    min-height: 48px;
  }

  .hero-proof {
    align-items: flex-start;
  }

  .hero-art {
    left: 50%;
    width: 520px;
    height: 390px;
    margin: -6px 0 -42px;
    transform: translateX(-50%) scale(0.62);
    transform-origin: top center;
  }

  .trust-inner {
    min-height: 58px;
    height: auto;
    padding: 10px 0;
    gap: 16px;
  }

  .studio,
  .sizes {
    padding-top: 68px;
    padding-bottom: 68px;
  }

  .process {
    padding-top: 66px;
    padding-bottom: 66px;
  }

  .section-heading {
    gap: 10px;
    margin-bottom: 26px;
  }

  .section-heading h2,
  .faq-title h2 {
    font-size: clamp(31px, 9.5vw, 40px);
    line-height: 1.1;
  }

  .section-heading > p {
    margin: 0;
    font-size: 13px;
  }

  .studio-grid {
    border-radius: 20px;
  }

  .creator-panel,
  .viewer-panel {
    padding: 16px;
  }

  .panel-top {
    gap: 8px;
  }

  .panel-top > span,
  .mode-pill {
    min-width: 0;
  }

  .mode-pill {
    justify-content: center;
    max-width: 56%;
    text-align: center;
    line-height: 1.3;
  }

  .creation-tabs button,
  .segmented span,
  .image-model-select summary,
  .image-generate-button,
  .generate-button,
  .use-generated-image,
  .size-select-button,
  .demo-pay-button {
    min-height: 44px;
  }

  .creation-tabs button {
    padding: 12px;
  }

  .creation-tabs b,
  .segmented b,
  .image-generate-button,
  .generate-button {
    font-size: 12px;
  }

  .creation-tabs small,
  .segmented small,
  .credit-safety-note,
  .form-note {
    font-size: 9px;
  }

  .prompt-field textarea,
  .image-settings select:not([hidden]),
  .field-row select,
  .checkout-fields input,
  .checkout-fields textarea,
  .chat-input input {
    font-size: 16px;
  }

  .prompt-field textarea {
    min-height: 132px;
    line-height: 1.55;
  }

  .prompt-helper {
    padding: 12px;
  }

  .prompt-helper-title b,
  .prompt-field > span,
  .image-settings label > span,
  .image-model-field > span {
    font-size: 11px;
  }

  .prompt-helper-title small,
  .prompt-guide-row > span,
  .prompt-chips button,
  .multi-view-option small,
  .reference-status small {
    font-size: 10px;
  }

  .prompt-guide-row {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
  }

  .prompt-chips {
    gap: 7px;
  }

  .prompt-chips button {
    min-height: 36px;
    padding: 7px 10px;
  }

  .image-model-menu {
    max-height: min(310px, 55dvh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .image-model-menu button {
    min-height: 48px;
  }

  .multi-view-option {
    padding: 12px;
  }

  .multi-view-option input,
  .checkout-consent input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
  }

  .image-task-status {
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }

  .image-task-status b,
  .reference-status b,
  .multi-view-option b {
    font-size: 10px;
  }

  .image-task-status small {
    font-size: 9px;
    line-height: 1.35;
  }

  .viewer-toolbar button {
    width: 44px;
    height: 44px;
  }

  .viewer-stage,
  .viewer-panel model-viewer {
    min-height: clamp(320px, 94vw, 420px);
  }

  .viewer-empty {
    max-width: calc(100% - 28px);
  }

  .viewer-badge {
    bottom: 10px;
    max-width: calc(100% - 20px);
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
  }

  .progress-bar {
    width: min(230px, 70vw);
  }

  .process-cards article {
    min-height: 260px;
  }

  .size-cards article {
    padding: 16px 18px 22px;
  }

  .size-visual {
    height: clamp(155px, 48vw, 180px);
  }

  .checkout {
    padding-top: 64px;
  }

  .checkout-form,
  .order-summary {
    padding: 18px;
  }

  .summary-model {
    align-items: flex-start;
  }

  .summary-model > span {
    flex-basis: 56px;
    width: 56px;
    height: 56px;
  }

  .payment-options label > span {
    min-height: 82px;
  }

  .checkout-success {
    padding: 38px 20px;
  }

  .checkout-success h3 {
    font-size: 26px;
  }

  .faq {
    padding-top: 38px;
    padding-bottom: 82px;
  }

  .faq-list summary {
    gap: 14px;
    min-height: 44px;
    align-items: center;
    font-size: 14px;
    line-height: 1.45;
  }

  .footer-inner {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    text-align: center;
  }

  .chat-launcher {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    width: 54px;
    height: 54px;
  }

  .chat-panel {
    right: max(10px, env(safe-area-inset-right));
    bottom: calc(max(14px, env(safe-area-inset-bottom)) + 68px);
    width: calc(100% - max(20px, env(safe-area-inset-left) + env(safe-area-inset-right)));
    height: min(70dvh, 620px);
    max-height: calc(100dvh - max(104px, env(safe-area-inset-top) + env(safe-area-inset-bottom) + 82px));
  }

  .chat-panel header button,
  .chat-input button {
    width: 44px;
    height: 44px;
  }

  .quick-questions button {
    min-height: 36px;
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  .shell {
    width: calc(100% - 20px);
  }

  .notice span,
  .brand small {
    display: none;
  }

  .nav-cta {
    padding-right: 11px;
    padding-left: 11px;
    font-size: 9px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-art {
    height: 360px;
    transform: translateX(-50%) scale(0.56);
  }

  .creator-panel,
  .viewer-panel,
  .checkout-form,
  .order-summary {
    padding: 14px;
  }

  .creation-tabs {
    padding: 4px;
  }

  .generated-image-grid {
    gap: 4px;
  }

  .result-status {
    align-items: flex-start;
  }

  .order-summary dl div,
  .price-lines p {
    gap: 12px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .notice {
    display: none;
  }

  .nav {
    height: 60px;
  }

  .hero {
    padding-top: 12px;
  }

  .hero-art {
    left: 50%;
    height: 330px;
    margin-bottom: -70px;
    transform: translateX(-50%) scale(0.58);
  }

  .viewer-stage,
  .viewer-panel model-viewer {
    min-height: 340px;
  }

  .chat-panel {
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    height: auto;
    max-height: none;
  }

  .chat-launcher {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
