/* TRIBUTE EXPRESS — Consumer Styles v1.0 */
:root {
  --te-orange: #F47920;
  --te-orange-dark: #d4631a;
  --te-orange-light: #fff3eb;
  --te-gray: #444;
  --te-warm: #f9f7f5;
  --te-border: #e8e4e0;
  --te-green: #2e7d32;
  --te-red: #c62828;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Georgia, 'Times New Roman', serif; color: #333; background: #fff; line-height: 1.6; }

/* ── Header ─ matches FPC `.site-header` tokens (logo 70px, Georgia 1rem 700 uppercase title, orange Studio CTA) ── */
.te-header { background: #fff; border-bottom: 4px solid var(--te-orange); box-shadow: 0 2px 6px rgba(0,0,0,0.10); }
.te-header__inner { max-width: 1060px; margin: 0 auto; display: flex; align-items: center; gap: 20px; padding: 10px 32px; }
.te-header__logo-link { display: flex; text-decoration: none; }
.te-header__logo { height: 70px; width: auto; }
.te-header__divider { width: 1.5px; height: 34px; background: #ddd; }
.te-header__title { font-family: Georgia, 'Times New Roman', serif; font-size: 1rem; font-weight: 700; color: #444; letter-spacing: 0.03em; text-transform: uppercase; }
.te-studio-back { margin-left: auto; font-family: Georgia, 'Times New Roman', serif; font-size: 0.72rem; font-weight: 600; color: var(--te-orange); text-decoration: none; text-transform: uppercase; letter-spacing: 0.06em; padding: 5px 14px; border: 1.5px solid var(--te-orange); border-radius: 4px; transition: background 0.15s, color 0.15s; white-space: nowrap; }
.te-studio-back:hover { background: var(--te-orange); color: #fff; }

/* ── Screen 1 intro band (FD-voice copy + pricing blurb, side-by-side) ─
   Uses the same viewport-centered escape pattern as .te-design-grid so the
   band aligns with the grid edges below it (1150px at >=700px). Stacks to
   single column on mobile. Left 2/3 = condensed FD-voice copy. Right 1/3 =
   pricing blurb (starts-at price + range). 5/15/2026. */
.te-intro-band {
  background: var(--te-orange-light);
  border: 1px solid #f0d5b8;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 0 0 22px;
  font-size: 0.95rem;
  color: #555;
  line-height: 1.55;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 700px) {
  .te-intro-band {
    width: calc(100vw - 32px);
    max-width: 1150px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 22px;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: center;
  }
}
.te-intro-band__copy { margin: 0; }
.te-intro-band__pricing {
  font-size: 0.9rem;
  line-height: 1.5;
  border-top: 1px solid #f0d5b8;
  padding-top: 10px;
  margin-top: 2px;
}
@media (min-width: 700px) {
  .te-intro-band__pricing {
    border-top: 0;
    border-left: 1px solid #f0d5b8;
    padding-top: 0;
    margin-top: 0;
    padding-left: 22px;
  }
}
.te-intro-band__pricing-label {
  display: block;
  font-weight: 700;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  margin-bottom: 4px;
}
.te-intro-band__pricing-line {
  display: block;
}
.te-intro-band__pricing-price {
  font-weight: 700;
  color: var(--te-orange-dark);
}

/* ── Progress bar ──────────────────────────────────────────────── */
.te-progress { display: flex; justify-content: center; gap: 0; max-width: 900px; margin: 0 auto; padding: 16px 24px 0; }
.te-progress__step { flex: 1; text-align: center; font-size: 0.75rem; font-weight: 600; color: #bbb; padding: 10px 0 8px; border-bottom: 3px solid #e0e0e0; transition: all 0.2s; }
.te-progress__step span { display: inline-block; width: 20px; height: 20px; border-radius: 50%; background: #e0e0e0; color: #fff; font-size: 0.7rem; line-height: 20px; margin-right: 4px; }
.te-progress__step--active { color: var(--te-orange); border-color: var(--te-orange); }
.te-progress__step--active span { background: var(--te-orange); }
.te-progress__step--done { color: var(--te-green); border-color: var(--te-green); }
.te-progress__step--done span { background: var(--te-green); }

/* ── Main ──────────────────────────────────────────────────────── */
.te-main { max-width: 900px; margin: 0 auto; padding: 8px 24px 60px; }
.te-screen { display: none; }
.te-screen--active { display: block; }
.te-screen__title { font-size: 1.4rem; margin-bottom: 4px; }
.te-screen__sub { font-size: 0.88rem; color: #888; margin-bottom: 20px; }

/* ── Screen 1 + 1.5 title/subtitle escape ────────────────────────────
   On Screens 1 and 1.5 the intro band, design/variant grid, and nav all
   escape .te-main's 900px to a 1150px viewport-centered band. Without
   this override the section title + subtitle sit indented ~125px from
   that wider rail, breaking the visual column. Same escape pattern;
   text stays left-aligned within the wider element so it hugs the band
   left edge. Mobile (<700px) stays in the 900px container — no rail
   below 700px. 5/15/2026. */
@media (min-width: 700px) {
  #screen-1 > .te-screen-header,
  #screen-1 > .te-screen__title,
  #screen-1 > .te-screen__sub,
  #screen-1-5 > .te-screen__title,
  #screen-1-5 > .te-screen__sub {
    width: calc(100vw - 32px);
    max-width: 1150px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ── Cards (form sections) ─────────────────────────────────────── */
.te-card { background: #fff; border: 1.5px solid var(--te-border); border-radius: 10px; padding: 20px 24px; margin-bottom: 16px; }
.te-card--muted { background: var(--te-warm); }
.te-card__heading { font-size: 1rem; margin-bottom: 4px; }
.te-card__hint { font-size: 0.82rem; color: #888; margin-bottom: 14px; line-height: 1.5; }
/* Heading row — heading on left, opt-out toggle immediately to the right with
   a small gap (2026-05-25, second pass). No space-between, no wrap — keep them
   on the same line. Used by Photo and Imprint. */
.te-card__heading-row { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.te-card__heading-row .te-card__heading { margin-bottom: 0; }

/* ── Fields ────────────────────────────────────────────────────── */
.te-field { margin-bottom: 12px; }
.te-field label { display: block; font-size: 0.82rem; font-weight: 700; color: #444; margin-bottom: 3px; }
.te-field input, .te-field select, .te-field textarea {
  font-family: Georgia, 'Times New Roman', serif; font-size: 0.88rem; color: #1a1a1a;
  background: #fff; border: 1.5px solid #d4d0cb; border-radius: 6px; padding: 10px 12px;
  width: 100%; outline: none; transition: border-color 0.15s;
}
.te-field input:focus, .te-field select:focus, .te-field textarea:focus {
  border-color: var(--te-orange); box-shadow: 0 0 0 3px var(--te-orange-light);
}
.te-field textarea { resize: vertical; min-height: 60px; line-height: 1.5; }
.te-field__note { font-size: 0.72rem; color: #999; margin-top: 3px; display: block; }
.te-field--grow { flex: 1; }
.te-field--small { width: 80px; flex-shrink: 0; }
.te-field-row { display: flex; gap: 10px; }
.te-required { color: var(--te-red); font-weight: 700; }
.te-field-hint { font-size: 0.72rem; font-weight: normal; color: #999; font-style: italic; margin-left: 4px; }

/* ── Toggle rows ───────────────────────────────────────────────── */
.te-toggle-row { margin: 8px 0; }
.te-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; cursor: pointer; }
.te-toggle input { accent-color: var(--te-orange); width: 16px; height: 16px; cursor: pointer; }
/* te-field__head — pairs a field label with an inline toggle on the same line,
   above the input. Used by Date of Passing to place "No dates" 14px to the
   right of the label text — matching the Photo/Imprint heading-row spacing. */
.te-field__head { display: flex; align-items: center; gap: 14px; margin-bottom: 3px; }
.te-field__head label { margin-bottom: 0; }
.te-field__head .te-toggle--inline-end { white-space: nowrap; flex-shrink: 0; font-weight: normal; }

/* ── Photo zone ────────────────────────────────────────────────── */
.te-photo-zone { border: 2px dashed #b0bec5; border-radius: 10px; padding: 20px; text-align: center; cursor: pointer; background: #fafbfc; transition: all 0.15s; }
.te-photo-zone:hover, .te-photo-zone--drag { border-color: var(--te-orange); background: var(--te-orange-light); }
.te-photo-zone__icon { font-size: 1.6rem; margin-bottom: 4px; }
.te-photo-zone__main { font-size: 0.92rem; font-weight: 600; }
.te-photo-zone__sub { font-size: 0.8rem; color: #888; margin-top: 2px; }
.te-photo-zone__sub span { color: var(--te-orange); text-decoration: underline; cursor: pointer; }
.te-photo-zone__preview { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.te-photo-zone__preview img { width: 100px; height: 100px; object-fit: cover; border-radius: 8px; border: 1.5px solid #ddd; }
.te-photo-zone__clear { font-size: 0.8rem; color: #e74c3c; cursor: pointer; text-decoration: underline; border: none; background: none; }

/* ── Imprint preview (retired 2026-05-20 polish patch) ───────────────
   Preview echo div removed from tribute.ejs; renderer now echoes
   imprint as typed (no upper-case transform). Rule block deleted. */

/* ── Design grid ───────────────────────────────────────────────────
   4 cols desktop, 2 cols mobile. Tuned 5/10/2026: was 5 cols (thumbs
   ~160 CSS px, browser bilinear downsample of 480 Lanczos source
   softened cursive); briefly 3 cols (clean but cards too tall on 3:9
   aspect, only 3 visible per scroll); briefly 4 cols at 900 container
   (~200 px, marginal — cursive softening returned).
   Final: 4 cols breaking out of .te-main's 900px to a 1150px viewport-
   centered band → ~265 CSS px per thumb. Matches the 3-col-at-900
   size that was confirmed clean, with better gallery density. */
.te-design-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 700px) {
  .te-design-grid {
    grid-template-columns: repeat(4, 1fr);
    width: calc(100vw - 32px);
    max-width: 1150px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
  }
}
.te-design-card { cursor: pointer; border: 2px solid transparent; border-radius: 8px; overflow: hidden; transition: all 0.15s; text-align: center; background: #fff; }
.te-design-card:hover { border-color: var(--te-orange); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.te-design-card--selected { border-color: var(--te-orange) !important; box-shadow: 0 0 0 3px var(--te-orange-light) !important; }
.te-design-card img { width: 100%; aspect-ratio: 3/9; object-fit: cover; display: block; background: #f0f0f0; }
.te-design-card__name { font-size: 0.85rem; font-weight: 600; padding: 8px 6px 10px; color: #444; line-height: 1.3; }

/* ── Variant grid (Screen 1.5 — verse picker within a chosen design) ─
   Same escape pattern as design grid so designs with 4+ verses display
   in one row instead of wrapping. Was 3 cols at 720px container max
   (5/10/2026 Phase 2 ship); promoted to 4 cols at 1150px viewport-
   centered band so wide designs (4+ variants) read in one row. */
.te-variant-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 700px) {
  .te-variant-grid {
    grid-template-columns: repeat(4, 1fr);
    width: calc(100vw - 32px);
    max-width: 1150px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
  }
}
.te-variant-card { cursor: pointer; border: 2px solid transparent; border-radius: 8px; overflow: hidden; transition: all 0.15s; text-align: center; background: #fff; display: flex; flex-direction: column; }
.te-variant-card:hover { border-color: var(--te-orange); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.te-variant-card--selected { border-color: var(--te-orange) !important; box-shadow: 0 0 0 3px var(--te-orange-light) !important; }
.te-variant-card img { width: 100%; aspect-ratio: 3/9; object-fit: cover; display: block; background: #f0f0f0; }
.te-variant-card__label { font-size: 0.85rem; font-weight: 600; padding: 8px 6px 10px; color: #444; line-height: 1.3; }


/* ── Mode toggle (Screen 3) ────────────────────────────────────── */
.te-mode-toggle { display: flex; gap: 0; border: 2px solid var(--te-orange); border-radius: 10px; overflow: hidden; margin-bottom: 20px; }
.te-mode-btn { flex: 1; padding: 16px; text-align: center; background: #fff; border: none; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.te-mode-btn:first-child { border-right: 2px solid var(--te-orange); }
.te-mode-btn:hover:not(.te-mode-btn--active) { background: var(--te-orange-light); }
.te-mode-btn--active { background: var(--te-orange) !important; color: #fff !important; }
.te-mode-btn--active .te-mode-btn__sub { color: rgba(255,255,255,0.8); }
.te-mode-btn__icon { display: block; font-size: 1.4rem; margin-bottom: 4px; }
.te-mode-btn__label { display: block; font-size: 0.92rem; font-weight: 700; }
.te-mode-btn__sub { display: block; font-size: 0.72rem; color: #888; margin-top: 2px; }
.te-mode-panel { display: none; }
.te-mode-panel--active { display: block; }

/* ── Mode B form sections ──────────────────────────────────────── */
.te-form-section { background: var(--te-warm); border: 1.5px solid var(--te-border); border-radius: 8px; padding: 18px 20px 10px; margin-bottom: 14px; }
.te-form-section__title { font-size: 0.82rem; font-weight: 700; color: var(--te-orange); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid #eee; }
.te-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.te-form-row--full { grid-template-columns: 1fr; }
.te-form-row--three { grid-template-columns: 1fr 1fr 1fr; }
.te-form-field { margin-bottom: 10px; }
.te-form-field label { display: block; font-size: 0.8rem; font-weight: 700; color: #444; margin-bottom: 3px; }
.te-form-field input, .te-form-field textarea, .te-form-field select {
  font-family: Georgia, 'Times New Roman', serif; font-size: 0.85rem; color: #1a1a1a;
  background: #fff; border: 1px solid #d4d0cb; border-radius: 4px; padding: 8px 10px;
  width: 100%; outline: none; transition: border-color 0.15s; line-height: 1.5;
}
.te-form-field input:focus, .te-form-field textarea:focus { border-color: var(--te-orange); box-shadow: 0 0 0 3px var(--te-orange-light); }
.te-form-field textarea { resize: vertical; min-height: 60px; }

/* ── Trait chips ────────────────────────────────────────────────── */
.te-trait-label { font-size: 0.8rem; font-weight: 700; color: #444; margin-bottom: 6px; }
.te-trait-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.te-trait-chip { display: inline-block; padding: 5px 12px; border: 1.5px solid #d4d0cb; border-radius: 20px; font-size: 0.78rem; color: #555; cursor: pointer; transition: all 0.15s; background: #fff; user-select: none; }
.te-trait-chip:hover { border-color: var(--te-orange); color: var(--te-orange); background: var(--te-orange-light); }
.te-trait-chip--selected { background: var(--te-orange) !important; color: #fff !important; border-color: var(--te-orange) !important; font-weight: 700; }

/* ── Tone grid ─────────────────────────────────────────────────── */
.te-tone-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.te-tone-option { display: flex; align-items: center; gap: 7px; border: 1.5px solid #e0e0e0; border-radius: 6px; padding: 7px 10px; cursor: pointer; transition: all 0.15s; background: #fff; font-size: 0.82rem; }
.te-tone-option:hover { border-color: var(--te-orange); background: var(--te-orange-light); }
.te-tone-option input { accent-color: var(--te-orange); width: 14px; height: 14px; margin: 0; cursor: pointer; }
.te-tone-option--selected { border-color: var(--te-orange) !important; background: var(--te-orange-light) !important; font-weight: 700; }

/* ── Generate row ──────────────────────────────────────────────── */
.te-generate-row { display: flex; align-items: center; gap: 14px; margin: 18px 0 6px; }
.te-generate-hint { font-size: 0.78rem; color: #999; font-style: italic; }

/* ── Paste section ─────────────────────────────────────────────── */
.te-paste-section { background: var(--te-warm); border: 1.5px solid var(--te-border); border-radius: 8px; padding: 20px; }
.te-paste-hint { font-size: 0.82rem; color: #888; margin-bottom: 10px; }
#te-paste-input { font-family: Georgia, 'Times New Roman', serif; font-size: 0.88rem; width: 100%; height: 400px; resize: none; border: 1.5px solid #d4d0cb; border-radius: 6px; padding: 12px; outline: none; line-height: 1.6; }
#te-paste-input:focus { border-color: var(--te-orange); box-shadow: 0 0 0 3px var(--te-orange-light); }
.te-paste-fit-bar { font-size: 0.82rem; margin-top: 6px; min-height: 1.4em; }

/* ── Overflow box ──────────────────────────────────────────────── */
.te-overflow-box { margin-top: 10px; border: 2px solid var(--te-red); border-radius: 8px; overflow: hidden; }
.te-overflow-box__header { background: var(--te-red); color: #fff; font-size: 0.82rem; font-weight: 700; padding: 8px 14px; }
.te-overflow-box__text { font-family: Georgia, serif; font-size: 0.85rem; color: #611; padding: 12px 14px; line-height: 1.6; max-height: 150px; overflow-y: auto; white-space: pre-wrap; }
.te-overflow-box__meta { padding: 6px 14px 10px; font-size: 0.78rem; color: var(--te-red); font-weight: 700; border-top: 1px solid #f0c0c0; }

/* ── Result section ────────────────────────────────────────────── */
.te-divider { border: none; border-top: 1.5px solid #eee; margin: 20px 0 16px; }
.te-result-label { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.te-result-note { font-size: 0.78rem; color: #999; margin-bottom: 8px; font-style: italic; }
#te-body { font-family: Georgia, 'Times New Roman', serif; font-size: 0.9rem; width: 100%; height: 507px; resize: none; border: 1.5px solid #d4d0cb; border-radius: 6px; padding: 12px; line-height: 1.6; outline: none; }
/* #te-body height progression: 300px (pre-5/20) → 390px (5/20, +30%) → 507px (5/22, another +30% per Erik directive). Reviewable textarea on Step 3 after AI generate. */
#te-body:focus { border-color: var(--te-orange); box-shadow: 0 0 0 3px var(--te-orange-light); }

/* ── Fit indicator ─────────────────────────────────────────────── */
.te-fit-indicator { margin-top: 6px; padding: 7px 12px; border-radius: 6px; font-size: 0.82rem; font-weight: 600; }
.te-fit-indicator--fits { background: #e8f5e9; color: var(--te-green); border: 1.5px solid #a5d6a7; }
.te-fit-indicator--over { background: #fde8e8; color: var(--te-red); border: 2px solid #e53935; }

/* ── Status messages ───────────────────────────────────────────── */
.te-status { font-size: 0.85rem; padding: 10px 16px; border-radius: 6px; margin-top: 8px; }
.te-status--warning { background: #fef9e7; color: #7d6608; border: 1px solid #f0e0a0; }

/* ── Preview ───────────────────────────────────────────────────── */
.te-preview-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 0 auto 18px; max-width: 1100px; }
.te-preview-col { display: flex; flex-direction: column; }
.te-preview-label { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; text-align: center; }
.te-preview-card-side { border-radius: 12px; border: 1px solid #d0d0d0; overflow: hidden; background: #f0ebe5; cursor: pointer; transition: box-shadow 0.2s; }
.te-preview-card-side:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.te-preview-front img { width: 100%; aspect-ratio: 3 / 9; object-fit: cover; display: block; }
.te-preview-canvas-wrap { border-radius: 12px; border: 1px solid #d0d0d0; overflow: hidden; background: #fff; cursor: pointer; position: relative; transition: box-shadow 0.2s; }
.te-preview-canvas-wrap:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.te-preview-canvas-wrap canvas { display: block; width: 100%; height: auto; image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; }
#te-preview-canvas { width: 100%; height: auto; display: block; background: #fff; }
.te-preview-loading { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #888; background: #fff; min-height: 300px; }
.te-zoom-hint { text-align: center; font-size: 0.82rem; color: #888; margin-top: 10px; }
/* ── Confirmation modal ───────────────────────────────────────── */
.te-confirm-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 3000; padding: 16px; }
.te-confirm-overlay.hidden { display: none !important; }
.te-confirm-modal { background: #fff; border-radius: 12px; max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
.te-confirm-header { padding: 20px 24px 0; font-size: 18px; font-weight: 700; color: #2a2a2a; }
.te-confirm-body { padding: 16px 24px; }
.te-confirm-cards { display: flex; gap: 12px; justify-content: center; margin-bottom: 16px; }
.te-confirm-card-thumb { width: 120px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.12); background: #f5f3f0; overflow: hidden; }
.te-confirm-card-thumb img, .te-confirm-card-thumb canvas { width: 100%; display: block; cursor: zoom-in; }
.te-confirm-card-label { font-size: 11px; color: #888; text-align: center; padding: 4px 0; background: #f5f3f0; }
.te-confirm-disclaimer { background: #fef2f2; border: 1px solid #e8b4b4; border-radius: 6px; padding: 12px 16px; font-size: 13px; color: #991b1b; line-height: 1.6; margin-bottom: 16px; }
.te-confirm-checkbox-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; cursor: pointer; }
.te-confirm-checkbox-row input[type="checkbox"] { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--te-orange); }
.te-confirm-checkbox-row label { font-size: 14px; font-weight: 600; color: #2a2a2a; line-height: 1.4; cursor: pointer; }
.te-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 0 24px 20px; }
.te-confirm-actions .te-btn-confirm { background: var(--te-orange); color: #fff; padding: 12px 28px; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.te-confirm-actions .te-btn-confirm:hover { background: var(--te-orange-dark); }
.te-confirm-actions .te-btn-confirm:disabled { opacity: 0.4; cursor: not-allowed; }
.te-confirm-actions .te-btn-confirm:disabled:hover { background: var(--te-orange); }
.te-confirm-actions .te-btn-cancel { background: #e8e4dd; color: #2a2a2a; padding: 12px 20px; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.te-confirm-actions .te-btn-cancel:hover { background: #d8d4cd; }
.te-zoom-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.82); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 20000; cursor: pointer; }
.te-zoom-content { max-width: 90vw; max-height: 80vh; }
.te-zoom-canvas { max-width: 90vw; max-height: 80vh; border-radius: 8px; box-shadow: 0 12px 40px rgba(0,0,0,0.5); background: #fff; }
.te-zoom-hint-overlay { color: rgba(255,255,255,0.5); font-size: 12px; margin-top: 16px; text-align: center; pointer-events: none; }
.te-preview-warning { margin-top: 14px; padding: 12px 16px; background: #fff3e0; border: 1.5px solid #e65100; border-radius: 8px; font-size: 0.85rem; color: #e65100; text-align: center; }

/* ── Quantity grid ─────────────────────────────────────────────── */
.te-qty-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.te-qty-option { display: flex; align-items: center; gap: 10px; border: 2px solid #e0e0e0; border-radius: 8px; padding: 14px; cursor: pointer; transition: all 0.15s; background: #fff; }
.te-qty-option:hover { border-color: var(--te-orange); }
.te-qty-option--selected { border-color: var(--te-orange) !important; background: var(--te-orange-light) !important; }
.te-qty-option input { accent-color: var(--te-orange); width: 16px; height: 16px; }
.te-qty-option__count { font-weight: 700; font-size: 0.95rem; }
.te-qty-option__price { font-size: 1.1rem; font-weight: 700; color: var(--te-orange); }
.te-qty-option__per { font-size: 0.72rem; color: #888; }

/* ── Order summary ─────────────────────────────────────────────── */
.te-order-summary { background: var(--te-warm); border: 1.5px solid var(--te-border); border-radius: 8px; padding: 16px 20px; margin: 16px 0; }
.te-order-summary__line { display: flex; justify-content: space-between; font-size: 1rem; font-weight: 700; }
.te-order-summary__line--small { font-size: 0.82rem; font-weight: normal; color: #555; margin-top: 4px; }
.te-order-summary__line--total { font-size: 1.1rem; font-weight: 700; color: #222; border-top: 1px solid var(--te-border); padding-top: 8px; margin-top: 10px; }

/* ── Shipping carrier (Ground / Overnight) — 2026-05-18 ─────────── */
/* Mirrors te-qty-option styling for visual consistency on the order page.
   Two cards side-by-side; orange border + warm background on selected.
   Stacks vertically below 480px viewport. */
.te-carrier-row { display: flex; gap: 10px; }
.te-carrier-option { flex: 1; display: flex; align-items: center; gap: 10px; border: 2px solid #e0e0e0; border-radius: 8px; padding: 14px; cursor: pointer; transition: all 0.15s; background: #fff; }
.te-carrier-option:hover { border-color: var(--te-orange); }
.te-carrier-option--selected { border-color: var(--te-orange) !important; background: var(--te-orange-light) !important; }
.te-carrier-option input { accent-color: var(--te-orange); width: 16px; height: 16px; }
.te-carrier-option__info { display: flex; flex-direction: column; gap: 2px; }
.te-carrier-option__label { font-weight: 700; font-size: 0.95rem; }
.te-carrier-option__price { font-size: 1.1rem; font-weight: 700; color: var(--te-orange); }
.te-carrier-option__sub { font-size: 0.72rem; color: #888; }
@media (max-width: 480px) {
  .te-carrier-row { flex-direction: column; }
}

/* ── Buttons ───────────────────────────────────────────────────── */
.te-btn { font-family: Georgia, serif; font-size: 0.92rem; font-weight: 700; padding: 12px 24px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; transition: all 0.15s; }
.te-btn--primary { background: var(--te-orange); color: #fff; border-color: var(--te-orange); }
.te-btn--primary:hover { background: var(--te-orange-dark); border-color: var(--te-orange-dark); }
.te-btn--primary:disabled { background: #f4a87a; border-color: #f4a87a; cursor: not-allowed; }
.te-btn--secondary { background: #fff; color: var(--te-orange); border-color: var(--te-orange); }
.te-btn--secondary:hover { background: var(--te-orange-light); }
.te-btn--large { font-size: 1.05rem; padding: 14px 36px; }
.te-nav { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-top: 1px solid #e8e4dd; position: sticky; bottom: 0; background: #fff; z-index: 100; margin-top: 24px; }

/* Nav escape for Screens 1 and 1.5 — wide 1280px viewport-centered band that
   sits visibly outside the 1150px design/variant grid edges. Stays wide in
   ALL states (fresh visit AND back-nav). Position: sticky cascades from the
   base .te-nav rule so the Next button is always reachable while scrolling.
   margin-left:50% + transform:translateX(-50%) is the sticky-compatible
   centering — `left` would be reinterpreted as a sticky threshold, not a
   positional offset.
   5/14 PM: the back-nav narrow override (.te-nav--back-narrow) was removed.
   Trade-off accepted: the reappearing Next/Continue button on Screens 1/1.5
   sits further right than the Next button on Screens 3-5. Banner-width
   consistency on the gallery screens won over button-edge alignment with
   form screens. */
#screen-1 > .te-nav,
#screen-1-5 > .te-nav {
  width: calc(100vw - 32px);
  max-width: 1280px;
  margin-left: 50%;
  transform: translateX(-50%);
}

/* Branding strip — Lamcraft logo + tagline, sits in the center of each nav row.
   Mirrors the pattern on FPC nav rows. */
.te-nav__branding { display: flex; align-items: center; gap: 10px; }
.te-nav__brand-logo { height: 28px; width: auto; }
.te-nav__brand-tagline { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 0.95rem; color: #555; }

/* ── Spinner ───────────────────────────────────────────────────── */
.te-spinner-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 10000; }
.te-spinner-box { background: #fff; border-radius: 12px; padding: 32px 48px; text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.te-spinner-ring { width: 36px; height: 36px; border: 4px solid #e0dcd8; border-top-color: var(--te-orange); border-radius: 50%; animation: te-spin 0.8s linear infinite; margin: 0 auto 16px; }
@keyframes te-spin { to { transform: rotate(360deg); } }
.te-spinner-text { font-size: 1rem; font-weight: 600; color: #333; }
.te-spinner-sub { font-size: 0.8rem; color: #888; margin-top: 6px; }
.te-spinner-inline { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: te-spin 0.7s linear infinite; margin-right: 6px; vertical-align: middle; }

/* ── Modal ──────────────────────────────────────────────────────── */
.te-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 10001; }
.te-modal-box { background: #fff; border-radius: 12px; padding: 32px 36px; max-width: 440px; width: 90%; text-align: center; box-shadow: 0 8px 40px rgba(0,0,0,0.18); }
.te-modal-title { font-size: 1.1rem; margin-bottom: 12px; }
.te-modal-message { font-size: 0.88rem; color: #555; line-height: 1.6; margin-bottom: 18px; }
.te-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.te-modal-action-btn { display: block; width: 100%; padding: 14px 18px; border: 1.5px solid #e0dcd8; border-radius: 8px; background: #fff; cursor: pointer; text-align: left; transition: border-color 0.2s, background 0.2s; }
.te-modal-action-btn:hover { border-color: var(--te-orange); background: var(--te-orange-light); }
.te-modal-action-btn__label { display: block; font-size: 0.92rem; font-weight: 700; color: #333; }
.te-modal-action-btn__sub { display: block; font-size: 0.78rem; color: #777; margin-top: 2px; }

/* ── Design / Variant Preview Modal (5/10/2026) ──────────────────────
   Click on a design tile (Screen 1) or variant tile (Screen 1.5) opens
   this modal with an enlarged preview of the front. "Use This Design /
   Verse" advances the wizard. Pattern ported from /8up-catalog PM-24.
   The .te-modal-overlay--preview modifier widens the box and switches
   from .te-modal-box to .te-design-preview-box so the image dominates. */
.te-modal-overlay--preview { z-index: 15000; padding: 16px; }
.te-design-preview-box {
  background: #fff;
  border: 2px solid var(--te-orange);
  border-radius: 12px;
  padding: 24px 28px 20px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.te-design-preview-close {
  position: absolute;
  top: 8px;
  right: 14px;
  background: none;
  border: none;
  font-size: 28px;
  color: #888;
  cursor: pointer;
  line-height: 1;
  padding: 4px 10px;
  font-family: inherit;
}
.te-design-preview-close:hover { color: var(--te-orange); }
.te-design-preview-image {
  display: block;
  margin: 4px auto 0;
  max-width: 100%;
  max-height: 60vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: var(--te-orange-light);
  border: 1px solid #f0ead8;
  border-radius: 8px;
}
.te-design-preview-info { margin: 16px 0 18px; text-align: center; }
.te-design-preview-name {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #2a2a2a;
  margin: 0 0 4px;
}
.te-design-preview-sku { font-size: 0.82rem; color: #888; margin: 0; }
.te-design-preview-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.te-design-preview-actions .te-btn { min-width: 220px; }

/* Mobile: tighter padding so a 3"x9" image still fits comfortably */
@media (max-width: 600px) {
  .te-design-preview-box { padding: 18px 16px 14px; }
  .te-design-preview-image { max-height: 55vh; }
  .te-design-preview-actions .te-btn { min-width: 0; width: 100%; }
}

/* ── Hero Preview Sample Modal (5/16/2026) ─────────────────────────
   Trigger lives right of "Choose a Design" header on Screen 1. No new
   vertical space (the trigger flexes alongside the existing h2/sub).
   Modal shows front + back of a real card side by side. Pattern
   matches .te-modal-overlay--preview for visual consistency. Back
   canvas uses canonical HiDPI pattern per FPC §22.42 / TE §9. */
.te-screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-right: 40px; /* pull trigger inward from the 1150px band's right edge */
}
.te-screen-header__intro {
  flex: 1 1 auto;
  min-width: 200px;
}
.te-screen-header__intro .te-screen__title { margin-bottom: 4px; }
.te-screen-header__intro .te-screen__sub { margin-bottom: 0; }

/* Hero trigger — mirrors .te-studio-back token-for-token so the page has
   one CTA pattern. Hover invert (bg fill → white text) matches Studio. */
.te-hero-preview-trigger {
  flex: 0 0 auto;
  background: transparent;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--te-orange);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 14px;
  border: 1.5px solid var(--te-orange);
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  cursor: pointer;
}
.te-hero-preview-trigger:hover {
  background: var(--te-orange);
  color: #fff;
}
.te-hero-preview-trigger:focus-visible {
  outline: 2px solid var(--te-orange);
  outline-offset: 3px;
}

.te-modal-overlay--hero { z-index: 15000; padding: 16px; }
.te-hero-preview-box {
  background: #fff;
  border: 2px solid var(--te-orange);
  border-radius: 12px;
  padding: 24px 28px 20px;
  max-width: 1100px;
  width: 95vw;
  max-height: 92vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 12px 40px rgba(0,0,0,0.28);
}
.te-hero-preview-close {
  position: absolute;
  top: 8px;
  right: 14px;
  background: none;
  border: none;
  font-size: 28px;
  color: #888;
  cursor: pointer;
  line-height: 1;
  padding: 4px 10px;
  font-family: inherit;
}
.te-hero-preview-close:hover { color: var(--te-orange); }
.te-hero-preview-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #2a2a2a;
  margin: 0 0 18px;
  text-align: center;
}
/* Match Step 4 preview pattern exactly: grid 1fr 1fr, 24px gap. Cards
   size to their grid cell (~510px each at 1100px max-width). */
.te-hero-preview-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 0 auto;
}
.te-hero-preview-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 0; /* allow grid cell to shrink */
}
.te-hero-preview-panel__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
  text-align: center;
}
.te-hero-preview-canvas-wrap {
  border-radius: 8px;
  border: 1px solid #d0d0d0;
  overflow: hidden;
  background: #fff;
  width: 100%;
  line-height: 0; /* prevent inline-canvas whitespace from adding height */
}
.te-hero-preview-canvas {
  display: block;
  background: #fff;
  /* width/height set inline by JS via canonical HiDPI pattern */
}
.te-hero-preview-img {
  display: block;
  width: 100%;
  /* aspect-ratio is a fallback only — JS overrides with explicit height
     matching the back canvas's rendered pixel height after render completes.
     This guarantees front + back are pixel-equal regardless of PDF/JPG
     natural aspect mismatches. */
  aspect-ratio: 1 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
  background: var(--te-orange-light);
}
.te-hero-preview-caption {
  margin: 18px 0 0;
  font-size: 0.78rem;
  color: #888;
  text-align: center;
  letter-spacing: 0.02em;
}

/* Hero trigger collapses neatly under the intro on tablet/mobile so
   the link never sits orphan-aligned next to a single-line h2. */
@media (max-width: 720px) {
  .te-screen-header { gap: 6px; }
  .te-hero-preview-trigger {
    align-self: flex-start;
    margin-bottom: 8px;
    padding-left: 0;
  }
}

/* Mobile: stack panels vertically (matches Step 4 narrow-viewport behavior) */
@media (max-width: 600px) {
  .te-hero-preview-box { padding: 20px 16px 16px; }
  .te-hero-preview-panels { grid-template-columns: 1fr; gap: 20px; }
}

/* ── Footer ────────────────────────────────────────────────────── */
.te-footer { background: var(--te-gray); color: rgba(255,255,255,0.45); font-size: 0.72rem; text-align: center; padding: 14px 0; }

/* ── Preview side-by-side stacks earlier (text crispness needs ≥440px per side) ─ */
@media (max-width: 900px) {
  .te-preview-wrapper { grid-template-columns: 1fr; max-width: 540px; }
}

/* ── Mobile responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .te-header__inner { padding: 10px 16px; gap: 12px; }
  .te-header__logo { height: 50px; }
  .te-header__title { font-size: 0.85rem; }
  .te-studio-back { font-size: 0.62rem; padding: 4px 10px; }
  .te-field-row { flex-direction: column; }
  .te-field--small { width: 100%; }
  .te-form-row, .te-form-row--three { grid-template-columns: 1fr; }
  .te-tone-grid { grid-template-columns: 1fr; }
  .te-qty-grid { grid-template-columns: 1fr; }
  .te-variant-grid { grid-template-columns: repeat(2, 1fr); }
  .te-mode-toggle { flex-direction: column; }
  .te-mode-btn:first-child { border-right: none; border-bottom: 2px solid var(--te-orange); }
  .te-confirm-cards { flex-direction: column; align-items: center; }
}

/* ── Screen 2 "Your Details" field widths (2026-05-28) ──────────────────────
   Skinny up the over-wide inputs on the details screen. Targeted by ID so they
   override the .te-field / .te-form-field `width:100%` utility regardless of
   wrapper class. !important guards against any inline width in the markup.
   max-width keeps them from overflowing narrow viewports. All values are
   tunable — adjust the px/% to taste. */
#te-name         { width: 340px !important; max-width: 100%; }                     /* sized to fit the placeholder "...appear on the card" without clipping */
#te-born,
#te-died         { width: 180px !important; max-width: 100%; }                      /* equal date pair — Passing now matches Birth */
#te-imprint-edit { width: 50% !important;  min-width: 320px; max-width: 100%; }    /* wider than name — holds a funeral home name */
#te-header       { width: 300px !important; max-width: 100%; }                      /* fits the widest option: "In Celebration of the Life of" */
