@font-face {
  font-family: "Acme Custom";
  src: url("/fonts/Acme-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Arial Bold Custom";
  src: url("/fonts/Arial Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Caveat Brush Custom";
  src: url("/fonts/CaveatBrush-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "DynaPuff Custom";
  src: url("/fonts/DynaPuff_SemiCondensed-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Merriweather Custom";
  src: url("/fonts/Merriweather_24pt_SemiCondensed-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
}

@font-face {
  font-family: "Open Sans Bold Custom";
  src: url("/fonts/OpenSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Sedgwick Ave Custom";
  src: url("/fonts/SedgwickAveDisplay-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f8fbff;
  --surface-3: #f1f5f9;
  --ink: #0f172a;
  --muted: #475569;
  --line: #dbe4ee;
  --line-strong: #c7d3e0;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #dbeafe;
  --action: #22c55e;
  --action-dark: #16a34a;
  --success: #16a34a;
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 28px 60px rgba(15, 23, 42, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  background: var(--bg);
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

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

button {
  cursor: pointer;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 64px;
}

.topbar-band {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #ffffff;
  border-bottom: 1px solid rgba(219, 228, 238, 0.9);
}

.topbar-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  padding: 16px 16px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: block;
}

.brand-link {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  width: clamp(140px, 20vw, 190px);
  height: auto;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar-link {
  color: #334155;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease;
}

.topbar-link:hover,
.topbar-link:focus-visible,
.brand-link:hover,
.brand-link:focus-visible {
  opacity: 1;
  color: var(--brand);
}

.hero {
  display: grid;
  align-items: center;
  min-height: 200px;
  padding: 32px 40px;
  margin-bottom: 0;
  text-align: center;
}

.hero-copy {
  max-width: none;
}

.hero-cta-row {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.hero-band {
  position: relative;
  overflow: hidden;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 18px;
  background-color: #f8fbff;
  background-image: url("/images/stack_of_pens.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border-bottom: 1px solid rgba(219, 228, 238, 0.88);
}

.hero-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(248, 251, 255, 0.82);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-footer-band {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-top: 1px solid rgba(219, 228, 238, 0.92);
  background: #ffffff;
}

.site-footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-footer {
  padding: 20px 16px 28px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.eyebrow {
  display: block;
  padding: 0;
  background: transparent;
  color: #1e3a8a;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.08;
}

.button:hover,
.checkout-button:hover {
  transform: translateY(-1px);
}

.helper,
.microcopy,
.note,
.summary-note,
.preview-subtitle {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.gallery-page {
  padding-top: 28px;
}

.gallery-section {
  padding: 8px 0 56px;
}

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

.gallery-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(219, 228, 238, 0.85);
  border-radius: var(--radius-md);
  background: #ffffff;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.gallery-card:hover,
.gallery-card:focus-visible {
  border-color: rgba(37, 99, 235, 0.28);
  transform: translateY(-1px);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #e2e8f0;
}

.gallery-empty {
  margin: 0;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: #ffffff;
}

.lightbox-open {
  overflow: hidden;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.84);
}

.gallery-lightbox-figure {
  position: relative;
  z-index: 1;
  width: min(92vw, 1100px);
  margin: 0;
  display: grid;
  gap: 14px;
}

.gallery-lightbox-figure img {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: #ffffff;
}

.gallery-lightbox-figure figcaption {
  color: #ffffff;
  text-align: center;
  font-size: 0.98rem;
}

.gallery-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

.gallery-lightbox-close:hover,
.gallery-lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

@media (max-width: 920px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .gallery-page {
    padding-top: 22px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.hero-image {
  width: 100%;
  border-radius: var(--radius-md);
}

.product-image-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
  overflow: hidden;
}

.product-image-button-inline {
  align-self: start;
  justify-self: end;
  width: min(100%, 322px);
  margin-right: 65px;
}

.product-image-button:focus-visible {
  outline: 2px solid rgba(31, 78, 121, 0.22);
  outline-offset: 4px;
}

.product-image-button img {
  transition: transform 180ms ease;
}

.product-image-button:hover img {
  transform: scale(1.015);
}

.zoom-indicator {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand);
  font-size: 0.84rem;
  border: 1px solid var(--line);
}

.zoom-indicator svg {
  width: 16px;
  height: 16px;
}

.order-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.78fr);
  gap: 20px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.stack {
  display: grid;
  gap: 20px;
}

.section-title {
  margin-bottom: 12px;
}

.section-title h2 {
  font-size: 1.42rem;
  letter-spacing: -0.02em;
}

.section-block {
  padding-top: 20px;
  border-top: 1px solid rgba(219, 228, 238, 0.92);
}

.section-block:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.section-header h3 {
  font-size: 1.08rem;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.12);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

input::-webkit-contacts-auto-fill-button {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

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

.field-grid-tight {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

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

.payment-field {
  display: grid;
  gap: 8px;
}

.payment-copy {
  margin-top: -6px;
}

.stripe-input {
  width: 100%;
  min-height: 50px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.stripe-input.is-focused {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.stripe-input.is-invalid {
  border-color: #a32929;
}

.billing-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.billing-toggle input {
  width: 18px;
  height: 18px;
}

.payment-extra-fields {
  display: grid;
  grid-template-columns: minmax(0, 240px);
  gap: 16px;
}

.quantity-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.quantity-row label {
  align-self: start;
}

.inline-note {
  padding: 14px 16px;
  border: 1px solid rgba(219, 228, 238, 0.85);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.toggle-card {
  position: relative;
}

.toggle-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.toggle-card span {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #ffffff;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.toggle-card input:checked + span {
  border-color: var(--brand);
  background: #eff6ff;
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 14px;
}

.color-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-3);
}

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

.segmented label {
  position: relative;
  display: inline-flex;
  min-width: 96px;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
}

.segmented input:checked + span {
  background: #fff;
  color: var(--brand);
}

.segmented span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.design-shell {
  display: grid;
  gap: 16px;
  align-content: start;
  height: 100%;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #ffffff;
}

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

.design-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.design-title {
  min-width: 0;
}

.design-mode-group {
  display: grid;
  gap: 16px;
}

.design-stage {
  display: grid;
  align-content: start;
  min-height: 248px;
}

.mode-panel {
  align-content: start;
}

.mode-placeholder {
  display: grid;
  place-items: center;
  min-height: 248px;
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
}

.upload-box {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--line-strong);
  background: #f8fafc;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-box.is-dragover {
  border-color: var(--brand);
  background: #f8fbff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.upload-trigger {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  text-align: center;
  justify-items: center;
}

.upload-title {
  font-size: 0.98rem;
  color: var(--ink);
  font-weight: 600;
}

.upload-instructions {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 28ch;
}

.proof-notice {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(37, 99, 235, 0.16);
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.92rem;
  line-height: 1.5;
}

.upload-icon {
  width: 32px;
  height: 32px;
  color: var(--brand);
}

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

.preview-card {
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #ffffff;
}

.preview-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.preview-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.preview-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.preview-action:hover,
.preview-action:focus-visible {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.preview-action[hidden] {
  display: none !important;
}

.preview-surface {
  display: grid;
  place-items: center;
  flex: 1;
  min-height: 156px;
  padding: 8px 0 24px;
  border: 0;
  background: transparent;
  text-align: center;
}

.preview-launch {
  position: relative;
  width: 100%;
  padding: 8px 0 24px;
  cursor: zoom-in;
}

.preview-launch:disabled {
  opacity: 1;
}

.preview-launch > div {
  width: 100%;
}

.preview-zoom-hint {
  position: absolute;
  right: 0;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brand);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.engrave-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 340px);
  padding: 0;
}

.preview-card .engrave-frame {
  width: 100%;
  max-width: 100%;
}

.engrave-area {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 25 / 3;
  padding: 9px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
  background: #f8fafc;
  overflow: hidden;
}

.preview-card .engrave-area {
  width: min(100%, 320px);
  max-width: 320px;
  padding: 10px 16px;
  border: 1px dashed var(--line);
  background: #f8fafc;
}

.engrave-width-label {
  display: none;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.engrave-width-label::before,
.engrave-width-label::after {
  display: none;
  content: "";
}

.engrave-height-label {
  display: none;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.preview-card .engrave-width-label,
.preview-card .engrave-height-label {
  display: none;
}

.preview-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 100%;
  max-width: 100%;
}

.preview-card .preview-text {
  width: 100%;
  margin: 0 auto;
}

.preview-line {
  display: block;
  line-height: 1.08;
  font-size: var(--preview-font-size, 0.9rem);
  letter-spacing: var(--preview-letter-spacing, 0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.preview-card .preview-line {
  font-size: calc(var(--preview-font-size, 0.9rem) * 1.55);
}

.font-acme {
  font-family: "Acme Custom", sans-serif;
}

.font-arial-bold {
  font-family: "Arial Bold Custom", Arial, sans-serif;
}

.font-caveat-brush {
  font-family: "Caveat Brush Custom", cursive;
}

.font-dynapuff {
  font-family: "DynaPuff Custom", sans-serif;
}

.font-merriweather {
  font-family: "Merriweather Custom", serif;
}

.font-open-sans-bold {
  font-family: "Open Sans Bold Custom", "Open Sans", Arial, sans-serif;
}

.font-sedgwick {
  font-family: "Sedgwick Ave Custom", cursive;
}

.preview-logo {
  display: grid;
  place-items: center;
  width: 100%;
  color: var(--muted);
  line-height: 1.35;
  font-size: 0.88rem;
  overflow: hidden;
}

.preview-logo-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.preview-logo-file {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

.preview-logo-file strong {
  max-width: 18ch;
  overflow-wrap: anywhere;
}

.preview-logo-file span {
  max-width: 28ch;
  overflow-wrap: anywhere;
}

.saved-artwork-action {
  margin-left: 6px;
}

.side-2-shell[hidden],
.mode-panel[hidden] {
  display: none;
}

.summary-card {
  position: sticky;
  top: 24px;
  align-self: start;
  background: #ffffff;
}

.checkout-action-panel {
  grid-column: 1;
  display: grid;
  gap: 16px;
  align-self: start;
  padding: 22px 24px 24px;
  border-color: var(--line);
  background: #ffffff;
}

.checkout-action-copy {
  display: grid;
  gap: 6px;
}

.checkout-action-copy h3 {
  font-size: 1.12rem;
  color: #1f2937;
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 28px;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.7);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100vw - 48px));
  padding: 20px 20px 24px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: none;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand);
  font-size: 1.5rem;
  line-height: 1;
  box-shadow: none;
}

.lightbox-image {
  width: 100%;
  border-radius: 16px;
}

.preview-lightbox-stage {
  display: grid;
  place-items: center;
  min-height: 460px;
  padding: 4px 0 0;
}

.preview-lightbox-file {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.preview-lightbox-document {
  width: min(100%, 980px);
  min-height: 68vh;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

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

.preview-lightbox-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.preview-lightbox-stage .engrave-frame {
  width: min(100%, 1240px);
  padding: 20px 8px 38px 44px;
}

.preview-lightbox-stage .engrave-area {
  width: min(100%, 1040px);
  max-width: 1040px;
  padding: 2px 20px;
}

.preview-lightbox-stage .engrave-width-label {
  display: block;
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
}

.preview-lightbox-stage .engrave-width-label::before,
.preview-lightbox-stage .engrave-width-label::after {
  display: block;
  position: absolute;
  top: -10px;
  width: 1px;
  height: 8px;
  background: var(--line);
}

.preview-lightbox-stage .engrave-width-label::before {
  left: -120px;
}

.preview-lightbox-stage .engrave-width-label::after {
  right: -120px;
}

.preview-lightbox-stage .engrave-height-label {
  display: block;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left top;
}

.preview-lightbox-stage .preview-line {
  font-size: calc(var(--preview-font-size, 0.9rem) * 6.35);
  line-height: 0.9;
}

.preview-lightbox-stage .preview-text {
  padding-block: 6px;
}

.preview-lightbox-stage .preview-logo {
  font-size: 1.08rem;
}

.summary-meta,
.summary-list {
  display: grid;
  gap: 12px;
}

.summary-row,
.summary-meta div {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.summary-list {
  margin: 20px 0;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-list strong,
.summary-meta strong {
  text-align: right;
}

.summary-total {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
}

.summary-actions {
  margin-top: 18px;
}

.checkout-status {
  min-height: 1.5em;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.checkout-status[data-tone="error"] {
  color: #a32929;
}

.checkout-status[data-tone="success"] {
  color: #1d6b38;
}

.summary-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: #eff6ff;
  border: 1px solid rgba(37, 99, 235, 0.12);
  color: #1e40af;
  font-size: 0.94rem;
  line-height: 1.5;
}

.secondary-page-button {
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: rgba(255, 255, 255, 0.88);
  color: #1e3a8a;
  text-decoration: none;
  box-shadow: none;
}

.secondary-page-button:hover,
.secondary-page-button:focus-visible {
  background: #dbeafe;
  color: #1e3a8a;
}

.reorder-panel {
  width: min(760px, 100%);
  margin: 0 auto 18px;
}

.reorder-panel .section-title {
  text-align: center;
}

.reorder-copy {
  max-width: 44ch;
  margin: 0 auto;
  text-align: center;
}

.reorder-helper-actions {
  display: flex;
  justify-content: center;
}

.reorder-lookup-form {
  display: grid;
  gap: 14px;
  width: min(100%, 560px);
  margin: 0 auto;
}

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

.reorder-actions .checkout-status {
  flex: 1 1 100%;
  text-align: center;
}

.reorder-loaded-note {
  margin-top: 8px;
}

.promo-page {
  background: #ffffff;
}

.promo-shell {
  min-height: calc(100vh - 220px);
  display: grid;
  place-items: start center;
  padding-top: 32px;
  padding-bottom: 56px;
}

.promo-card {
  width: min(760px, 100%);
  padding: 36px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: #ffffff;
}

.promo-heading {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.promo-heading h1 {
  margin: 0;
  font-size: clamp(2rem, 3.8vw, 3rem);
  line-height: 0.98;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.promo-heading p {
  margin: 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.promo-heading-detail p {
  max-width: 44ch;
}

.promo-form {
  display: grid;
  gap: 16px;
  width: min(100%, 420px);
  margin: 0 auto;
}

.promo-field {
  display: grid;
  gap: 8px;
}

.promo-field span {
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.01em;
}

.promo-field input {
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
}

.promo-field input:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.16);
  outline-offset: 2px;
  border-color: var(--brand);
}

.promo-primary-button {
  min-height: 54px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: none;
}

.promo-primary-button:hover {
  filter: none;
  background: #1e40af;
}

.promo-status {
  margin-top: 0;
  text-align: center;
}

.promo-secondary-link {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.promo-secondary-link a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.promo-secondary-link a:hover,
.promo-secondary-link a:focus-visible {
  text-decoration: underline;
}

.promo-inline-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.promo-secondary-button {
  background: #eff6ff;
  color: #1e3a8a;
  text-decoration: none;
  box-shadow: none;
}

.promo-secondary-button:hover,
.promo-secondary-button:focus-visible {
  background: #dbeafe;
}

.promo-summary {
  display: grid;
  gap: 14px;
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.promo-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.promo-summary-row span {
  color: var(--muted);
}

.promo-summary-row strong {
  text-align: right;
  color: var(--ink);
}

.promo-detail-actions {
  display: grid;
  gap: 12px;
  width: min(100%, 420px);
  margin: 0 auto;
}

.promo-error-heading p {
  max-width: 32ch;
  color: #7e2f2f;
}

.checkout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  font-weight: 600;
  line-height: 1.1;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.order-submit-button {
  min-height: 48px;
  background: var(--brand);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: none;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.order-submit-button:hover {
  background: #1e40af;
  transform: translateY(-1px);
}

.order-submit-button:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.3);
  outline-offset: 2px;
}

.checkout-reset-link {
  justify-self: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transform: none;
}

.checkout-reset-link:hover,
.checkout-reset-link:focus-visible {
  color: #334155;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  transform: none;
}

.checkout-button[disabled] {
  background: #cbd5e1;
  color: #f8fafc;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.summary-ok {
  color: var(--success);
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.info-strip .panel {
  padding: 22px;
}

.info-strip h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.muted-link {
  color: var(--brand-dark);
}

.thank-you-page {
  display: grid;
  align-items: start;
  min-height: calc(100vh - 220px);
  padding-top: 28px;
}

.thank-you-hero {
  min-height: 170px;
}

.thank-you-card {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 40px;
  text-align: center;
}

.thank-you-kicker {
  margin: 0 0 14px;
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.thank-you-card h1 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4.4vw, 3rem);
  color: var(--ink);
  letter-spacing: -0.03em;
}

.thank-you-copy {
  width: min(560px, 100%);
  margin: 0 auto;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.thank-you-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  padding: 14px 22px;
  margin-top: 28px;
  border-radius: var(--radius-md);
  background: var(--brand);
  color: #ffffff;
  text-decoration: none;
  box-shadow: none;
  transition: transform 180ms ease, background-color 180ms ease;
}

.thank-you-button:hover {
  transform: translateY(-1px);
  background: #1e40af;
}

.proof-page {
  display: grid;
  align-items: start;
  min-height: calc(100vh - 220px);
  padding-top: 28px;
}

.proof-card {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 40px;
  text-align: center;
}

.proof-preview-shell {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f8fbff;
}

.proof-preview {
  width: 100%;
  min-height: 720px;
  border: 0;
  background: #ffffff;
}

.proof-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.proof-rejection-panel {
  margin-top: 20px;
  text-align: left;
}

.proof-rejection-field {
  display: grid;
  gap: 8px;
}

.proof-rejection-field span {
  font-weight: 700;
}

.proof-rejection-field textarea {
  width: 100%;
  min-height: 120px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  padding: 14px 16px;
  font: inherit;
  color: var(--ink);
  background: #ffffff;
  resize: vertical;
}

.proof-reject-button {
  border: 1px solid #e6b0b8;
  background: #fff6f7;
  color: #9f2f3f;
  cursor: pointer;
}

.proof-reject-button:hover {
  background: #fdeff1;
}

.proof-approve-button {
  border: 0;
  cursor: pointer;
}

@media (max-width: 920px) {
  .hero,
  .order-grid,
  .info-strip,
  .field-grid,
  .field-grid-tight,
  .payment-grid,
  .design-grid,
  .preview-grid,
  .quantity-row {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 24px;
  }

  .product-image-button-inline {
    justify-self: center;
    margin-right: 0;
  }

  .preview-card-header {
    align-items: start;
    flex-direction: column;
  }

  .summary-card,
  .checkout-action-panel {
    position: static;
  }

  .proof-card {
    padding: 24px;
  }

  .proof-preview {
    min-height: 480px;
  }
}

@media (max-width: 700px) {
  .page {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
    padding-bottom: 36px;
  }

  .topbar {
    align-items: center;
    margin-bottom: 8px;
    padding-inline: 0;
    gap: 10px;
  }

  .brand-logo {
    width: clamp(112px, 34vw, 150px);
  }

  .topbar-nav {
    flex: 0 0 auto;
    width: auto;
  }

  .topbar-link {
    font-size: 0.92rem;
  }

  .design-header {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented {
    grid-auto-flow: row;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox-dialog {
    padding: 14px;
  }

  .preview-launch {
    cursor: default;
  }

  .preview-zoom-hint {
    display: none;
  }

  .thank-you-card {
    padding: 30px 22px;
  }

  .proof-card {
    padding: 30px 22px;
  }

  .promo-card {
    padding: 24px;
    border-radius: 20px;
  }

  .promo-summary-row {
    display: grid;
    gap: 6px;
  }

  .promo-summary-row strong {
    text-align: left;
  }
}
