/* mobile.css — Beam&Bark mobile chat flow */

html, body {
  min-height: 100%;
  background: var(--cream);
  overflow: hidden;
}

/* On a REAL phone the mobile shell fills the whole viewport. On a desktop
 * browser opening /m for testing we cap it at 430px so it looks like a
 * phone-shaped frame in the middle of the page. Historical bug: the cap
 * was applied unconditionally, so on modern large phones (iPhone 15 Pro
 * Max @ 430px logical width, iPhone 16 Pro Max @ 440px, Android XL @ 480px+)
 * the shell was narrower than the viewport and a strip of dead space
 * appeared to the right of the hero/upload content. Fix: only apply the
 * 430px cap at viewports wider than that (i.e., not on any actual phone).
 */
.mobile-view {
  width: 100%;
  /* `dvh` is not understood by Samsung Internet < 21, Chrome/WebView < 108 or
   * iOS < 15.4 — the older embedded WebViews inside social apps, which is most
   * of the /online traffic. Those engines drop the declaration entirely, and
   * since .m-app is absolutely positioned this box then has no height at all:
   * a blank cream page. State the vh fallback FIRST; anything that understands
   * dvh overrides it on the next line. */
  height: 100vh;
  min-height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--cream);
}
@media (min-width: 640px) {
  .mobile-view {
    max-width: 430px;
  }
}

/* app surface */
.m-app {
  position: absolute;
  inset: 0;
  padding-top: env(safe-area-inset-top, 0px);
  display: flex;
  flex-direction: column;
  background: var(--cream);
  font-family: var(--font-body);
  overflow: hidden;
}

/* ── upload ── */
.m-toprow { padding: 14px 20px 6px; display: flex; justify-content: space-between; align-items: center; }
.m-toprow .wordmark img { height: 64px; }
.toprow-right { display: flex; align-items: center; gap: 8px; }
.mobile-language-picker { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; border: 1px solid var(--rule); border-radius: 50%; background: var(--paper); font-size: 18px; }
.mobile-language-picker select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.mobile-language-picker:focus-within { outline: 2px solid var(--ember); outline-offset: 2px; }
.mobile-language-row { display: flex; justify-content: flex-end; padding: 8px 16px; flex-shrink: 0; }
.has-mobile-language .m-toprow { gap: 8px; }
.has-mobile-language .m-toprow .wordmark { flex: 1 1 auto; min-width: 0; }
.has-mobile-language .m-toprow .wordmark img { max-width: 100%; object-fit: contain; }
.has-mobile-language .toprow-right { flex-wrap: wrap; justify-content: flex-end; max-width: 58%; }
.has-mobile-language .chat-brand { display: none; }
@media (max-width: 400px) {
  .has-mobile-language .new-project-btn { font-size: 0; gap: 0; }
}
.cash-pill { font-family: var(--font-mono); font-size: 10px; color: var(--ember); letter-spacing: 1.4px; padding: 4px 8px; border: 1px solid var(--rule); border-radius: 99px; }
.login-pill { font-family: var(--font-body); font-size: 12px; font-weight: 600; color: var(--ember); background: none; border: 1.5px solid var(--ember); border-radius: 99px; padding: 5px 12px; cursor: pointer; }
.login-pill:hover { background: var(--ember); color: var(--cream); }
.test-mode-pill {
  margin: 8px 20px 0;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(183, 80, 31, 0.1);
  border: 1px solid rgba(183, 80, 31, 0.22);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  text-align: center;
  color: var(--ember);
}
.m-hero { padding: 22px 20px 24px; }
.m-hero h1 { margin: 0; font-family: var(--font-display); font-size: 38px; line-height: 1.0; font-weight: 400; letter-spacing: -0.025em; word-spacing: 0.03em; color: var(--ink); }
.m-hero h1 em { color: var(--ember); font-style: italic; }
.m-hero p { margin: 14px 0 0; font-size: 15px; line-height: 1.45; color: rgba(26, 20, 16, 0.7); text-wrap: pretty; }
.upload-tile-wrap { padding: 0 20px 18px; }
.upload-tile {
  border: 2px dashed var(--pine-deep);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}
.upload-tile .circ { width: 56px; height: 56px; border-radius: 99px; margin: 0 auto 14px; background: var(--paper); border: 1px solid var(--rule); display: flex; align-items: center; justify-content: center; color: var(--burn); }
.upload-tile .big { font-family: var(--font-display); font-size: 19px; color: var(--ink); font-weight: 500; }
.upload-tile .sub { margin-top: 6px; font-size: 13px; color: rgba(26, 20, 16, 0.55); }
.sample-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.4px; color: rgba(58, 42, 26, 0.55); margin-bottom: 10px; }
.sample-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sample-grid.test-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
.sample-card { padding: 0; border: none; background: none; cursor: pointer; text-align: left; }
.sample-card .thumb { aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; border: 1px solid var(--rule); }
.sample-card.test-card .thumb { aspect-ratio: 1/1; background: var(--paper); }
.sample-card.test-card .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sample-card:disabled { opacity: 0.6; cursor: wait; }
.sample-card .nm { margin-top: 8px; font-family: var(--font-display); font-size: 14px; font-weight: 500; color: var(--ink); }
.sample-card .st { font-size: 11px; color: rgba(26, 20, 16, 0.55); }
.trust-card { margin: 0 20px 24px; padding: 14px 16px; border-radius: 14px; background: var(--paper); border: 1px solid var(--rule); display: flex; align-items: center; gap: 12px; }
.trust-card .txt { font-size: 12px; line-height: 1.4; color: rgba(26, 20, 16, 0.75); }
.trust-card .txt em { font-style: italic; color: rgba(26, 20, 16, 0.55); }
.trust-card[hidden] { display: none; }
.account-footer { margin: 0 20px 28px; padding-top: 14px; border-top: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-footer-info { font-size: 11px; color: rgba(26, 20, 16, 0.5); }
.account-logout-btn { background: none; border: none; padding: 4px 0; font-size: 12px; font-weight: 600; color: rgba(26, 20, 16, 0.55); text-decoration: underline; cursor: pointer; }
.account-logout-btn:hover { color: var(--ink); }
.account-footer-login .account-footer-info { font-size: 13px; color: rgba(26, 20, 16, 0.65); }
.account-footer-login .account-logout-btn { color: var(--ember); text-decoration: none; padding: 6px 14px; border: 1.5px solid var(--ember); border-radius: 99px; }
.account-footer-login .account-logout-btn:hover { background: var(--ember); color: var(--cream); }
.project-shelf {
  margin: 0 20px 18px;
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: rgba(255,255,255,0.52);
}
.project-shelf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.project-kicker {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  color: var(--ember);
}
.project-limit {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(26,20,16,0.55);
}
.project-refresh {
  flex: 0 0 auto;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  color: var(--burn);
  font-size: 11px;
  padding: 6px 9px;
}
.project-card {
  width: 100%;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border: 0;
  border-top: 1px solid rgba(58,42,26,0.1);
  background: transparent;
  text-align: left;
  color: var(--ink);
}
.project-card:first-of-type { border-top: 0; }
.project-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--ember);
}
.project-dot.final { background: #2f7d52; }
.project-main { min-width: 0; display: grid; gap: 2px; }
.project-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}
.project-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: rgba(26,20,16,0.55);
}
.project-go { color: rgba(26,20,16,0.42); font-size: 21px; }
/* Ordered (locked) designs are dimmed so drafts you can still work on stand out. */
.project-card.is-ordered { opacity: 0.62; }
.project-card.is-ordered .project-meta { color: var(--ember); }
.project-empty {
  padding: 10px 2px 2px;
  color: rgba(26,20,16,0.56);
  font-size: 12px;
}

.m-scroll { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }

/* ── processing ── */
.proc { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; gap: 28px; }
.proc-canvas { position: relative; width: 200px; height: 200px; }
.proc-stage { position: absolute; inset: 0; border-radius: 14px; overflow: hidden; opacity: 0; transition: opacity 600ms; }
.proc-stage.on { opacity: 1; }
.proc-partial-stage { z-index: 5; background: var(--paper); }
.proc-partial-stage img { width: 100%; height: 100%; object-fit: contain; animation: partial-in .35s ease both; }
.proc-caption { font-family: var(--font-display); font-style: italic; font-size: 18px; color: var(--ink); text-align: center; min-height: 48px; }
.proc-bars { display: flex; gap: 6px; }
.proc-bar { width: 24px; height: 4px; border-radius: 99px; background: rgba(58, 42, 26, 0.15); transition: background 300ms; }
.proc-bar.on { background: var(--burn); }
.scan-overlay { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent, transparent 6px, rgba(183,80,31,0.25) 6px, rgba(183,80,31,0.25) 7px); animation: scanH 0.8s ease-in-out infinite; }

/* ── chat ── */
.chat-flow { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--cream); }
.chat-header { padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px; border-bottom: 1px solid var(--rule); background: var(--cream); flex-shrink: 0; }
/* Give narrow-screen space to navigation/checkout; scale the logo, not controls. */
.chat-header .wordmark { min-width: 0; flex: 0 1 auto; }
.chat-header .wordmark img { max-width: 100%; object-fit: contain; object-position: left center; }
.chat-header .link, .chat-header .lock-btn, .chat-header .chat-header-actions { flex-shrink: 0; }
.chat-header .link { background: none; border: none; cursor: pointer; padding: 6px; margin-left: -6px; color: var(--burn); display: flex; align-items: center; gap: 4px; font-family: var(--font-body); font-size: 12.5px; }
.chat-brand { flex: 0 1 auto; min-width: 0; display: flex; align-items: center; }
.chat-header-actions { display: flex; align-items: center; gap: 6px; }
/* The header "New" is the labeled entry to a fresh engraving (the composer "+"
 * was removed in v218 so this is the one way in). */
.new-project-btn { display: inline-flex; align-items: center; gap: 3px; padding: 6px 9px; border-radius: 99px; border: 1px solid var(--rule); background: transparent; color: var(--burn); font-family: var(--font-body); font-size: 11.5px; font-weight: 600; cursor: pointer; transition: border-color 0.15s ease; }
.new-project-btn:hover { border-color: var(--ember); }
.new-project-btn:disabled, .header-new-menu button:disabled, .upload-choice-btn:disabled { opacity: .4; color: #706b66; cursor: wait; }
.customer-material-card.layout-open { grid-column: 1 / -1; }
.customer-material-layout { grid-column: 1 / -1; min-width: 0; }
.material-layout-button { margin-top: 8px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper, #fffaf1); color: var(--burn); font: inherit; cursor: pointer; }
.new-project-btn .caret { margin-left: -1px; opacity: 0.7; }
/* The New button opens a small menu with the two explicit intents — "New
 * design" (a separate piece) and "Add style reference" (borrow a look). */
.header-new-wrap { position: relative; }
.header-new-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 176px; padding: 6px; display: flex; flex-direction: column; gap: 2px; background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 10px 26px rgba(26,20,16,0.16); }
.header-new-menu[hidden] { display: none; }
.header-new-menu button { text-align: left; white-space: nowrap; background: none; border: none; padding: 10px 12px; border-radius: 10px; font-family: var(--font-body); font-size: 13px; color: var(--ink); cursor: pointer; }
.header-new-menu button:hover { background: rgba(183,80,31,0.08); }
.lock-btn { background: var(--burn); color: var(--cream); border: none; cursor: pointer; padding: 6px 10px; border-radius: 99px; font-family: var(--font-body); font-size: 11.5px; font-weight: 600; transition: opacity 0.18s ease; }
.chat-header .lock-btn:not(.is-ordered) { background: #245b4c; color: #fff; box-shadow: 0 0 0 1px #174437; }
.chat-header .lock-btn:not(.is-ordered):disabled { opacity: 1; background: #dce6df; color: #526258; box-shadow: none; }
/* At 320px the controls alone fill the row; drop the decorative mark first. */
@media (max-width: 359px) {
  .chat-brand { display: none; }
  .chat-header { padding: 8px 8px; }
}
.lock-btn.is-disabled, .lock-btn:disabled { opacity: 0.4; cursor: not-allowed; }
/* A project that has already been ordered reopens read-only: the header shows a
 * static receipt label where the "Order this →" button would be. */
.lock-btn.is-ordered { background: transparent; color: var(--burn); border: 1.5px solid var(--burn); cursor: default; max-width: 50%; white-space: normal; overflow-wrap: anywhere; }
.knob-row { margin-top: 10px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 9px; color: rgba(58, 42, 26, 0.55); letter-spacing: 0.8px; }
.knob { display: flex; gap: 4px; }
.knob .v { color: var(--ember); font-weight: 500; }
.debug-panel {
  margin: 10px auto 0;
  width: min(92%, 330px);
  max-height: 170px;
  overflow: auto;
  border: 1px dashed rgba(183,80,31,0.35);
  border-radius: 8px;
  background: rgba(255,253,248,0.82);
  color: rgba(42,29,19,0.78);
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.45;
  padding: 8px 10px;
}
.debug-panel:empty { display: none; }
.debug-panel .debug-head { color: var(--ember); font-weight: 700; letter-spacing: 0.6px; margin-bottom: 4px; }
.debug-panel .muted-line { color: rgba(42,29,19,0.52); }
.debug-panel .err-line { color: #b4231f; word-break: break-word; }
.debug-panel details { margin-top: 3px; }
.debug-panel summary { cursor: pointer; color: var(--burn); }
.debug-panel pre {
  margin: 4px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 86px;
  overflow: auto;
  background: rgba(42,29,19,0.08);
  border-radius: 6px;
  padding: 6px;
}
.chat-thread { flex: 1; overflow-y: auto; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.bubble-row { display: flex; }
.bubble-row.user { justify-content: flex-end; }
.bubble-row.ai { justify-content: flex-start; }
.bubble-row.render-row-msg { justify-content: center; }
.bubble-row.photo-row-msg { justify-content: flex-end; }
.uploaded-photo-msg { max-width: 62%; }
.uploaded-photo-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ember); text-align: right; margin: 0 2px 5px 0; opacity: 0.8; }
.uploaded-photo-msg .rendered-shot { border-radius: 16px; border-bottom-right-radius: 5px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 18px; font-family: var(--font-body); font-size: 14px; line-height: 1.4; }
.bubble.user { background: var(--burn); color: var(--cream); border-bottom-right-radius: 4px; }
.bubble.ai { background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-bottom-left-radius: 4px; }
.bubble.operator { background: #fbf3e4; color: var(--ink); border: 1px solid var(--ember); border-bottom-left-radius: 4px; box-shadow: 0 1px 6px rgba(150,90,30,0.08); }
.bubble.operator .operator-label { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--ember); margin-bottom: 4px; font-weight: 600; }
.bubble.operator .operator-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--ember); flex-shrink: 0; }
.bubble.operator .operator-body { white-space: pre-wrap; }
/* Verification gate: a dismissible sheet must never leave the chat looking
 * finished. This card stays in the thread until the number is verified. */
.verify-gate-row { max-width: 100%; }
.verify-gate-row .bubble.verify-gate { max-width: 92%; background: #fbf3e4; border-color: var(--ember); }
.verify-gate-title { font-family: var(--font-display); font-size: 17px; line-height: 1.15; color: var(--ink); }
.verify-gate-body { margin-top: 5px; font-size: 13px; line-height: 1.4; color: rgba(26,20,16,0.7); }
.verify-gate .verify-gate-btn { background: var(--burn); border-color: var(--burn); color: var(--cream); font-weight: 700; }
.sheet-dismiss { display: block; width: 100%; margin-top: 10px; padding: 8px; border: none; background: none; font-family: var(--font-body); font-size: 12.5px; color: rgba(26,20,16,0.55); text-decoration: underline; cursor: pointer; }
.size-chip { margin: -6px 0 12px; text-align: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ember); }
.verify-required-hint { margin-top: 10px; font-size: 11.5px; line-height: 1.4; color: rgba(26,20,16,0.55); text-align: center; }
.bubble .diff { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(58,42,26,0.15); font-family: var(--font-mono); font-size: 10px; color: var(--ember); letter-spacing: 0.4px; }
.thinking-dots { display: flex; gap: 4px; padding: 2px 4px; }
.thinking-dots div { width: 6px; height: 6px; border-radius: 99px; background: var(--burn); animation: pulse 1.2s ease-in-out infinite; opacity: 0.4; }
.chip-row { padding: 6px 12px 8px; display: flex; gap: 6px; overflow-x: auto; flex-shrink: 0; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
/* Once the customer engages the composer, let the quick prompts wrap into as
 * many rows as they need instead of hiding behind a horizontal scroll. */
.chip-row.is-expanded { flex-wrap: wrap; overflow-x: visible; }
.chip { flex-shrink: 0; padding: 7px 12px; border-radius: 99px; background: var(--paper); border: 1px solid var(--rule); font-family: var(--font-body); font-size: 12px; color: var(--burn); cursor: pointer; white-space: nowrap; }
.chip:disabled { opacity: 0.5; cursor: wait; }
/* The campaign decorates the page, never the engraving preview itself. */
.halloween-entry {
  --cream: #fff3e3;
  --paper: #fffbf4;
  --ember: #b94b21;
  --burn: #442438;
  --pine-deep: #a45b32;
  --rule: rgba(105, 57, 43, 0.2);
  background: #302132;
}
.halloween-entry .m-scroll {
  background: radial-gradient(ellipse at 100% 0%, rgba(242, 164, 85, 0.2), transparent 55%), var(--cream);
}
.halloween-entry .m-hero { padding-top: 15px; }
.halloween-entry .m-toprow { gap: 12px; }
.halloween-entry .m-toprow .wordmark { min-width: 0; }
.halloween-entry .m-toprow .wordmark img { max-width: 100%; height: auto; }
.halloween-entry .login-pill { white-space: nowrap; }
.halloween-entry .cash-pill { display: none; }
.halloween-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px 10px;
  border: 1px solid rgba(185, 75, 33, 0.24);
  border-radius: 999px;
  background: #ffe6c5;
  color: #763519;
  font-size: 11px;
  font-weight: 600;
}
.halloween-entry .upload-tile { border-color: #c57843; background: rgba(255, 251, 244, 0.8); }
.halloween-entry .upload-tile .circ { background: #ffe1b8; color: #8d3b1a; }
.halloween-entry .chat-header { border-bottom-color: #edc7a6; }
.halloween-chat-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 7px 12px;
  background: #ffe7c8;
  color: #763519;
  font-size: 11px;
  font-weight: 600;
}
.halloween-entry .chip-halloween {
  border-color: #c4652e;
  background: #ffdfac;
  color: #572b21;
  font-weight: 700;
  box-shadow: 0 2px 7px rgba(170, 83, 29, 0.12);
}
.halloween-entry .chip-halloween:not(:disabled):hover { background: #ffd18b; }
.halloween-entry .chip-halloween:focus-visible { outline: 2px solid var(--burn); outline-offset: 2px; }
/* The template entry is never disabled: opening it while a render runs is the
 * whole point. Give it a slightly stronger outline so it reads as a menu, not
 * as one more design suggestion. */
.chip-templates { border-color: var(--ember); color: var(--ember); font-weight: 600; }
#chip-row .chip-templates::before { content: '✳'; margin-right: 5px; opacity: 0.85; }
/* ── design templates card (v223) ── */
.templates-row-msg { margin: 4px 0; }
.templates-card { width: 100%; max-width: 330px; padding: 12px 12px 10px; background: var(--paper); border: 1px solid var(--rule); border-radius: 16px; border-bottom-left-radius: 4px; box-shadow: 0 1px 8px rgba(58,42,26,0.06); }
.templates-title { font-family: var(--font-display); font-size: 15px; color: var(--ink); }
.templates-sub { margin-top: 3px; font-family: var(--font-body); font-size: 12px; line-height: 1.35; color: rgba(58, 42, 26, 0.62); }
.templates-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.template-option { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px; text-align: left; background: transparent; border: 1px solid var(--rule); border-radius: 12px; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.template-option:hover, .template-option:active { border-color: var(--ember); background: rgba(183,80,31,0.05); }
.template-thumb { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; overflow: hidden; border-radius: 9px; background: var(--cream); border: 1px solid var(--rule); font-size: 16px; color: var(--ember); }
.template-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.template-text { display: flex; flex-direction: column; min-width: 0; }
.template-name { font-family: var(--font-body); font-size: 13.5px; font-weight: 600; color: var(--burn); }
.template-blurb { font-family: var(--font-body); font-size: 11.5px; line-height: 1.3; color: rgba(58, 42, 26, 0.62); }
.templates-dismiss { margin-top: 9px; width: 100%; padding: 8px; background: transparent; border: 1px dashed var(--rule); border-radius: 11px; font-family: var(--font-body); font-size: 12px; color: rgba(58, 42, 26, 0.62); cursor: pointer; }
.templates-dismiss:hover { border-color: var(--ember); color: var(--ember); }
.input-bar { padding: 8px 14px 26px; flex-shrink: 0; background: var(--cream); border-top: 1px solid var(--rule); }
.input-pill { display: flex; align-items: center; gap: 8px; background: var(--paper); border-radius: 999px; padding: 6px 6px 6px 6px; border: 1px solid var(--rule); }
.input-pill input { flex: 1; border: none; outline: none; background: transparent; font-family: var(--font-body); font-size: 14px; color: var(--ink); padding: 8px 0; }
.input-pill input:disabled { color: rgba(42,29,19,0.46); cursor: wait; }
.attach-btn { flex-shrink: 0; width: 32px; height: 32px; border-radius: 99px; background: transparent; color: var(--burn); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; margin-left: 4px; transition: background 150ms; }
.attach-btn:hover { background: rgba(58,42,26,0.08); }
.attach-btn:disabled { color: rgba(42,29,19,0.3); cursor: wait; }
/* (B) Inline intent chooser shown after a photo is added mid-chat. */
.upload-choice-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.upload-choice-q { font: 700 13px/1.3 'Inter', system-ui, sans-serif; color: var(--ink); }
.upload-choice-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 9px 13px; border-radius: 14px; text-align: left;
  border: 1px solid var(--rule, #e5dcc9); background: var(--paper, #fff); color: var(--burn, #7a3217);
  font: 700 13px/1.15 'Inter', system-ui, sans-serif; cursor: pointer;
}
.upload-choice-btn.primary { border-color: transparent; background: var(--burn, #7a3217); color: var(--cream, #fffbf2); }
.upload-choice-btn:hover { filter: brightness(0.97); }
.upload-choice-title { font-weight: 700; }
.upload-choice-sub { font-weight: 500; font-size: 11.5px; opacity: 0.8; }
.upload-choice-resolved { margin-top: 8px; font: 600 12px/1.3 'Inter', system-ui, sans-serif; color: rgba(42,29,19,0.6); }
.send-btn { width: 36px; height: 36px; border-radius: 99px; background: rgba(58,42,26,0.2); color: var(--cream); border: none; cursor: default; display: flex; align-items: center; justify-content: center; transition: background 150ms; }
.send-btn.active { background: var(--burn); cursor: pointer; }
.send-btn:disabled { background: rgba(58,42,26,0.16); color: rgba(255,251,242,0.72); cursor: wait; }
.chat-flow.is-busy .chip-row { pointer-events: none; }

/* lock-in modal */
.customer-material-request { margin: 18px 0; text-align: left; }
.customer-material-request h4 { margin: 0; font-size: 17px; }
.customer-material-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.customer-material-card { min-width: 0; border: 1px solid rgba(58,42,26,.18); border-radius: 14px; overflow: hidden; }
.customer-material-card.selected { border-color: var(--burn); box-shadow: 0 0 0 1px var(--burn); }
.customer-material-choice { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 7px; cursor: pointer; padding: 8px; }
.customer-material-choice img { grid-column: 1/-1; width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; background: #eee7dd; }
.customer-material-choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--burn); }
.material-choice-copy { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.material-detail { display: block; opacity: .7; margin-top: 3px; font-size: 12px; }
.customer-material-quantity { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0 8px 8px; font-size: 12px; }
.customer-material-quantity input { width: 56px; min-width: 0; font: inherit; font-size: 16px; padding: 6px; border: 1px solid #bcae9c; border-radius: 6px; }
.customer-material-request textarea { width: 100%; margin-top: 7px; padding: 10px; border: 1px solid #bcae9c; border-radius: 10px; font: inherit; font-size: 16px; resize: vertical; }
.material-note-label { font-size: 13px; font-weight: 600; }
.lock-sheet .material-hint { font-size: 12px; }
.lock-sheet .material-skip { display: block; width: 100%; padding: 14px 6px; margin-top: 6px; background: none; border: none; text-decoration: underline; font: inherit; color: var(--burn); cursor: pointer; }
.pickup-short-no { margin: 16px 0; }
.pickup-short-no strong { display: block; font: 800 52px/1.2 var(--font-body); }
.lock-overlay { position: absolute; inset: 0; z-index: 20; background: rgba(26,20,16,0.55); display: flex; align-items: flex-end; animation: fadeIn 200ms ease; }
.lock-sheet { background: var(--cream); width: 100%; border-top-left-radius: 24px; border-top-right-radius: 24px; padding: 24px 20px 38px; animation: slideUp 300ms cubic-bezier(0.2,0.8,0.2,1); max-height: 90vh; overflow-y: auto; }
.lock-sheet .drag { width: 40px; height: 4px; background: rgba(58,42,26,0.2); border-radius: 99px; margin: 0 auto 18px; }
.lock-sheet h3 { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 500; color: var(--ink); letter-spacing: -0.02em; word-spacing: 0.02em; line-height: 1.05; }
.lock-sheet p { margin: 8px 0 16px; font-size: 14px; color: rgba(26,20,16,0.7); line-height: 1.45; }
.lock-sheet .holder { width: 180px; margin: 0 auto 20px; }
.lock-sheet .btns { display: flex; gap: 10px; }
.lock-sheet .btns button { padding: 14px; border-radius: 99px; font-family: var(--font-body); font-size: 15px; font-weight: 600; cursor: pointer; }
.lock-sheet .keep { flex: 1; background: transparent; border: 1.5px solid var(--burn); color: var(--burn); }
.lock-sheet .lock { flex: 1.4; background: var(--burn); border: none; color: var(--cream); }
/* Order step: it is a design confirmation, not a paid checkout. Spell out the
 * two pickup paths and offer the same reach-us channels as the contact sheet. */
.order-note { margin: 0 0 16px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; }
.order-note-lead { font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ember); margin-bottom: 8px; }
.order-note-list { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 8px; }
.order-note-list li { position: relative; padding-left: 15px; font-size: 13px; line-height: 1.4; color: rgba(26,20,16,0.78); }
.order-note-list li::before { content: ''; position: absolute; left: 1px; top: 7px; width: 6px; height: 6px; border-radius: 99px; background: var(--ember); }
.order-note-list strong { color: var(--ink); }
.order-help-label { font-size: 12.5px; line-height: 1.4; color: rgba(26,20,16,0.7); margin-bottom: 8px; }
.order-help .contact-rows { display: grid; gap: 8px; margin: 0; }
.order-help .contact-row { padding: 10px 12px; }

/* ── confirm ── */
.confirm { flex: 1; padding: 40px 24px 30px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; overflow-y: auto; }
.confirm .check { width: 64px; height: 64px; border-radius: 99px; background: var(--burn); color: var(--cream); display: flex; align-items: center; justify-content: center; }
.confirm h2 { margin: 0; font-family: var(--font-display); font-size: 30px; line-height: 1.05; font-weight: 400; letter-spacing: -0.025em; word-spacing: 0.03em; color: var(--ink); }
.confirm h2 em { color: var(--ember); font-style: italic; }
.confirm .sub { margin: 0; font-size: 14px; line-height: 1.5; color: rgba(26,20,16,0.7); max-width: 280px; text-wrap: pretty; }
.confirm .preview-holder { width: 70%; max-width: 220px; margin-top: 8px; }
.receipt { margin-top: 14px; padding: 16px; width: 100%; background: var(--paper); border-radius: 12px; border: 1px solid var(--rule); text-align: left; }
.receipt .row { display: flex; justify-content: space-between; font-size: 13px; }
.receipt .loc { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--rule); font-family: var(--font-mono); font-size: 10px; color: rgba(58,42,26,0.6); letter-spacing: 1px; }
.bonus-card { margin-top: 14px; padding: 18px; width: 100%; background: var(--cream); border: 2px dashed var(--ember); border-radius: 14px; position: relative; text-align: left; }
.bonus-card .tab { position: absolute; top: -10px; left: 14px; padding: 2px 8px; background: var(--cream); font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.4px; color: var(--ember); }
.bonus-card .head { font-family: var(--font-display); font-size: 20px; line-height: 1.1; font-weight: 500; color: var(--ink); letter-spacing: -0.015em; }
.bonus-card .head em { color: var(--ember); font-style: italic; }
.bonus-card .body { font-size: 12px; line-height: 1.4; color: rgba(26,20,16,0.6); margin-top: 8px; }
.bonus-card .copy { margin-top: 12px; width: 100%; padding: 10px; border-radius: 99px; background: var(--ember); color: var(--cream); border: none; font-family: var(--font-body); font-size: 13px; font-weight: 600; cursor: pointer; }
.restart { margin-top: 10px; background: none; border: none; cursor: pointer; font-family: var(--font-display); font-style: italic; font-size: 14px; color: rgba(26,20,16,0.55); }

/* Prominent "way back" actions near the top of the confirm screen so the
   customer never has to scroll past the receipt + referral card to continue. */
.confirm-actions-top { display: flex; gap: 10px; width: 100%; max-width: 320px; margin: 4px 0 2px; }
.confirm-actions-top .restart {
  margin-top: 0; flex: 1; padding: 13px 14px; border-radius: 12px;
  font-style: normal; font-family: var(--font-body); font-size: 14px; font-weight: 600;
  background: var(--burn); color: var(--cream); border: none;
}
.confirm-actions-top .restart.secondary {
  background: transparent; color: var(--burn); border: 1.5px solid var(--rule);
}

/* ── live preview (wood plank with engraving) ── */
.live-inner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: filter 400ms ease; }
.live-inner.rect { flex-direction: row; gap: 14px; padding: 18px; }
.live-inner.square { flex-direction: column; gap: 6px; padding: 22px; }
.live-subject { transform-origin: center; transition: transform 500ms cubic-bezier(0.4,0,0.2,1); display: flex; align-items: center; justify-content: center; }
.live-text-col { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 20px; }

/* ── real AI render (gpt-image-1) ── */
.rendered-shot { width: 100%; border-radius: 14px; overflow: hidden; border: 1px solid var(--rule); box-shadow: 0 8px 24px rgba(58,42,26,0.18); background: var(--paper); }
.rendered-shot img { display: block; width: 100%; height: auto; }
.rendered-shot.render-result { aspect-ratio: var(--render-aspect, 1 / 1); }
.rendered-shot.render-result img { width: 100%; height: 100%; object-fit: contain; }
.render-partial { position: relative; }
.render-partial img { animation: partial-in .35s ease both; }
.partial-badge { position: absolute; left: 10px; bottom: 10px; padding: 6px 10px; border-radius: 999px; background: rgba(26,20,16,.78); color: #fff; font-size: 12px; font-weight: 700; }
@keyframes partial-in { from { opacity: .25; filter: blur(6px); } to { opacity: 1; filter: blur(0); } }
.render-stream-stage {
  position: relative;
  width: 100%;
  aspect-ratio: var(--render-aspect, 1 / 1);
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--rule);
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(58,42,26,0.18);
  isolation: isolate;
  overflow-anchor: none;
  contain: layout paint;
}
.render-stream-stage img { overflow-anchor: none; }
.render-stream-image,
.render-stream-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; }
.render-stream-image { display: block; object-fit: contain; transition: opacity .3s ease, filter .35s ease; }
.render-stream-image:not(.has-partial) { filter: saturate(.7) brightness(.72); }
.render-stream-image.has-partial { object-fit: contain; animation: partial-in .4s ease both; }
.render-stream-placeholder > * { width: 100%; height: 100%; }
.render-stream-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(to top, rgba(20,14,10,.72), transparent 46%);
  pointer-events: none;
}
.render-stream-stage.is-complete::after { display: none; }
.render-stream-scan {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  height: 3px;
  top: -4px;
  background: rgba(255,246,220,.92);
  box-shadow: 0 0 16px 4px rgba(255,214,126,.65);
  animation: render-scan 2.2s ease-in-out infinite;
}
.render-stream-status {
  position: absolute;
  z-index: 4;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
}
.render-stream-label { font-size: 14px; line-height: 1.25; font-weight: 800; }
.render-stream-sub { margin-top: 3px; font-size: 11px; line-height: 1.35; opacity: .84; }
.render-stream-status .render-spin { flex: 0 0 auto; border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes render-scan { 0% { top: -4px; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: calc(100% + 4px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .render-stream-scan { animation: none; top: 50%; opacity: .5; } }
/* Lazy-load state for a historical render (see hydrateHistoricalRender() in mobile.js) */
.rendered-shot.rendered-shot-loading { aspect-ratio: var(--render-aspect, 1/1); display: flex; align-items: center; justify-content: center; }
.rendered-shot.small { border-radius: 10px; box-shadow: 0 4px 14px rgba(58,42,26,0.15); }
.rendered-shot.uploaded-source img { height: auto; max-height: 70vh; object-fit: contain; }
.render-workbench {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}
.render-message {
  width: 100%;
  max-width: 340px;
  margin: 2px auto;
}
.render-card-meta { margin-bottom: 8px; }
.render-card-meta .live-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  color: var(--ember);
  text-align: center;
}
.render-feedback {
  display: flex;
  justify-content: flex-end;
  min-height: 34px;
  margin-top: 7px;
}
.render-feedback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid rgba(58,42,26,0.18);
  border-radius: 8px;
  background: transparent;
  color: rgba(58,42,26,0.62);
  font: 600 11px/1 var(--font-sans);
  cursor: pointer;
}
.render-feedback-btn:hover { border-color: rgba(58,42,26,0.38); color: var(--ink); }
.render-feedback-btn.is-sending { opacity: 0.55; }
.render-feedback-btn.is-selected {
  border-color: rgba(166,51,45,0.28);
  background: rgba(166,51,45,0.07);
  color: #8f332f;
  cursor: default;
  opacity: 1;
}
.render-history-note { margin: 4px auto; }
.render-saved-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.4px;
  color: var(--muted, #8a7a66);
  background: rgba(58,42,26,0.05);
  border: 1px dashed var(--rule, #e2d8c8);
  border-radius: 10px;
  padding: 7px 10px;
  text-align: center;
}
.render-message .knob-row { margin-top: 6px; }
.render-message .rendered-shot,
.render-message .render-workbench,
.render-message .render-loading {
  width: 100%;
}
.render-workbench .uploaded-source {
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(58,42,26,0.2);
}
.render-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.62);
  border: 1px solid var(--rule);
  box-shadow: 0 8px 22px rgba(58,42,26,0.08);
}
.render-status .render-spin {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
}
.render-status-title {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.1;
  color: var(--ink);
}
.render-status-sub {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.35;
  letter-spacing: 0.4px;
  color: rgba(58,42,26,0.55);
}
.render-loading { position: relative; }
.render-veil { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(244,237,224,0.74); backdrop-filter: blur(2px); border-radius: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; color: var(--burn); text-transform: uppercase; }
.render-spin { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid rgba(183,80,31,0.25); border-top-color: var(--ember); animation: ig-spin 0.8s linear infinite; }
@keyframes ig-spin { to { transform: rotate(360deg); } }
.render-failed {
  padding: 16px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--paper);
  text-align: center;
}
.render-failed-title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
}
.render-failed-sub {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(26,20,16,0.62);
}
.render-inline-btn {
  margin-top: 10px;
  padding: 8px 13px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--cream);
  color: var(--burn);
  font-family: var(--font-body);
  font-size: 12px;
  cursor: pointer;
}
.render-inline-btn + .render-inline-btn { margin-left: 6px; }
.render-inline-btn.planner-down-help {
  border-color: var(--ember);
  color: var(--ember);
  font-weight: 600;
}
.render-inline-btn.planner-down-help::before { content: '💬'; margin-right: 5px; }
.render-row { margin-top: 10px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.render-btn { padding: 9px 16px; border-radius: 99px; background: var(--ember); color: var(--cream); border: none; font-family: var(--font-body); font-size: 12.5px; font-weight: 600; cursor: pointer; letter-spacing: 0.2px; transition: transform 120ms ease, background 200ms ease; }
.render-btn:active { transform: scale(0.96); }
.render-btn.ghost { background: transparent; color: rgba(26,20,16,0.55); border: 1px solid var(--rule); }
.render-btn.lock-primary { min-width: 168px; background: var(--burn); }

/* ── OTP / lock-in sheet additions ── */
.sheet-back { align-self: flex-start; background: none; border: none; cursor: pointer; font-family: var(--font-body); font-size: 13px; color: rgba(26,20,16,0.55); padding: 0; margin-bottom: 2px; }
.otp-field { width: 100%; margin-top: 6px; }
.otp-field input { width: 100%; box-sizing: border-box; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--rule); background: var(--paper); font-family: var(--font-mono); font-size: 18px; letter-spacing: 2px; color: var(--ink); text-align: center; outline: none; transition: border-color 160ms ease; }
.otp-field input:focus { border-color: var(--ember); }
.otp-label { margin-top: 4px; font-size: 11px; font-weight: 700; color: rgba(26,20,16,0.62); text-transform: uppercase; letter-spacing: 0.8px; }
.otp-field.name-field input { font-family: var(--font-body); font-size: 16px; letter-spacing: 0; text-align: left; }
.otp-err { min-height: 16px; margin-top: 6px; font-size: 12px; color: #b4231f; text-align: center; }
.dev-hint { display: inline-block; margin-top: 4px; font-family: var(--font-mono); font-size: 11px; color: var(--ember); }
.fineprint { margin-top: 10px; font-size: 10.5px; line-height: 1.4; color: rgba(26,20,16,0.45); text-align: center; }
.fineprint a { color: rgba(26,20,16,0.62); text-decoration: underline; }
.consent-opt { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); cursor: pointer; }
.consent-opt input { margin-top: 1px; width: 16px; height: 16px; accent-color: var(--ember); flex-shrink: 0; }
.consent-opt span { font-size: 12px; line-height: 1.4; color: rgba(26,20,16,0.72); }
.consent-opt.required { border-color: var(--ember); background: rgba(181,101,29,0.06); margin-top: 14px; }
.consent-opt.required span { color: rgba(26,20,16,0.82); }
.btns .lock[disabled], .btns .lock[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.lock-sheet .lock[disabled] { opacity: 0.6; cursor: default; }

.input-bar { padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px)); }

/* Turnstile widget container inside the OTP sheet */
.turnstile-box { display: flex; justify-content: center; margin: 10px 0 4px; min-height: 0; transform: scale(0.92); transform-origin: center; }

/* ── In-app toast (replaces native alert) ── */
.toast-host {
  position: fixed;
  left: 0; right: 0;
  top: calc(12px + env(safe-area-inset-top, 0px));
  z-index: 9000;
  display: flex;
  justify-content: center;
  padding: 0 14px;
  pointer-events: none;
}
.toast {
  max-width: 440px;
  width: 100%;
  box-sizing: border-box;
  background: var(--ink, #1a1410);
  color: #fff8ee;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.4;
  padding: 13px 16px;
  border-radius: 14px;
  box-shadow: 0 14px 34px -10px rgba(0,0,0,0.45);
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity .24s ease, transform .24s ease;
  pointer-events: auto;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-info { border-left: 4px solid var(--ember, #c95821); }
.toast-error { background: #7a1f12; border-left: 4px solid #f0a58c; }

/* ── online / demo entry points (v88) ──────────────────────────────────────
   The booth customer can look up and ask; the online one cannot. A persistent
   launcher on every screen opens the channels the shop actually has. Bottom
   LEFT on purpose — the bottom right is where the chat composer and the
   lock-in CTA live, and this must never sit over the primary action. */
.contact-launcher {
  position: fixed;
  left: max(12px, calc(50% - 244px));
  bottom: 14px;
  z-index: 60;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--rule, #e5dcc9);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(6px);
  color: var(--ink, #1a1410);
  font: 700 12px/1 'Inter', system-ui, sans-serif;
  box-shadow: 0 4px 14px rgba(0,0,0,.14);
}
.contact-launcher:hover { border-color: var(--wood, #c8893f); }
.contact-sheet .contact-rows { display: grid; gap: 8px; margin: 6px 0 14px; }
.contact-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--rule, #e5dcc9); background: var(--card, #faf5ea);
  text-decoration: none; color: inherit;
}
.contact-row:hover { border-color: var(--wood, #c8893f); }
.contact-label { font-weight: 800; font-size: 14px; }
.contact-go { font-size: 12px; color: var(--muted, #6b5f4a); }
.contact-empty { font-size: 13px; color: var(--muted, #6b5f4a); }
/* Online attribution is collected in the conversation while the first image
   is rendering, not as a late lock-in form field. These buttons remain usable
   while the model call is busy, so the wait time does double duty. */
.source-question-row { align-items: stretch; }
.source-question-card { width: min(100%, 360px); box-sizing: border-box; }
.source-question-title { font-weight: 800; line-height: 1.35; }
.source-question-options { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.source-choice {
  min-height: 36px; padding: 8px 11px; border-radius: 999px;
  border: 1px solid var(--rule, #e5dcc9); background: #fff; color: inherit;
  font: 700 12px/1.15 'Inter', system-ui, sans-serif; cursor: pointer;
}
.source-choice.selected { border-color: var(--ember, #c95821); background: rgba(201,88,33,.1); color: var(--burn, #7a3217); }
.source-other-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-top: 10px; }
.source-other-row input {
  min-width: 0; padding: 10px 11px; border-radius: 10px;
  border: 1px solid var(--rule, #e5dcc9); background: #fff; color: inherit;
  font: 500 14px/1.2 'Inter', system-ui, sans-serif;
}
.source-other-row input:focus { border-color: var(--ember, #c95821); outline: none; }
.source-other-row button {
  padding: 9px 12px; border: 0; border-radius: 10px; background: var(--burn, #452b19); color: #fff;
  font: 800 12px/1 'Inter', system-ui, sans-serif; cursor: pointer;
}
.source-other-row button:disabled { opacity: .42; cursor: not-allowed; }
.source-question-saved { margin-top: 8px; color: #52704f; font-size: 11px; font-weight: 700; }
.self-phone-banner { margin: 12px 16px; padding: 12px 16px; background: #f2e9dd; border-radius: 12px; color: #513d2f; display: grid; gap: 4px; }
.self-phone-banner span { font-size: 13px; }
.self-phone-banner { flex:none; position:sticky; top:0; z-index:40; border:1px solid #cab58f; box-shadow:0 2px 8px #0001; }
.self-mode-label { display:inline-block; width:fit-content; padding:4px 9px; border-radius:6px; background:#285c4b; color:#fff; font:750 12px/1.3 system-ui; letter-spacing:.03em; }
.self-mode-expiry { color:#5e5549; }
.self-mode-expired { position:fixed; inset:0; z-index:10000; overflow:auto; background:#eee9e0; padding:20px; }
.self-mode-expired .lock-sheet { margin:auto; width:min(100%,460px); max-height:calc(100dvh - 40px); display:flex; flex-direction:column; overflow:hidden; }
.self-expired-body { min-height:0; overflow:auto; }
.self-mode-expired .self-normal-order { flex:none; }
.self-mode-expired h1 { font-size:28px; line-height:1.15; margin:18px 0 12px; }
.self-expired-scan { padding:16px; margin:20px 0; background:#edf5ef; border:1px solid #b5cdbb; border-radius:12px; }
.self-expired-scan p { margin-bottom:0; }
.self-normal-order { display:block; padding:16px; border-radius:12px; background:#285c4b; color:white; text-align:center; text-decoration:none; font-weight:700; }
.self-phone-sent { max-width: 440px; margin: 24px auto; padding: 20px; display: grid; gap: 20px; }
.self-phone-sent h1 { font-size: 30px; }
.self-phone-code { font-size: 42px; letter-spacing: .18em; font-weight: 600; }
.self-phone-sent img, .self-phone-confirm img { display: block; width: 100%; max-height: 360px; object-fit: contain; }
.self-station-rescan { font-size: 14px; line-height: 1.5; color: var(--burn); }
.self-phone-handoff-actions { flex-shrink: 0; padding: 12px 20px max(12px, env(safe-area-inset-bottom)); background: var(--cream); border-top: 1px solid var(--line); }
.self-phone-handoff-actions .self-station-rescan { max-width: 440px; margin: 0 auto 12px; }
.self-phone-handoff-actions a { display: block; max-width: 440px; margin: 0 auto; padding: 16px; border-radius: 12px; background: var(--burn); color: var(--cream); text-align: center; text-decoration: none; font-weight: 600; min-height: 48px; box-sizing: border-box; }
.self-phone-confirm-actions { display: flex; gap: 12px; padding-top: 16px; }
.self-phone-confirm-actions button { flex: 1; min-height: 48px; border-radius: 12px; }

.self-phone-sent h1, .self-phone-sent p { margin: 0; }
.self-phone-flow .chat-header .chat-brand, .self-phone-flow .header-new-wrap { display: none; }
.self-phone-flow .chat-header { gap: 8px; }
.self-phone-flow .chat-header button { min-height: 44px; font-size: 13px; }
.self-phone-flow button { min-height: 44px; }
.self-phone-flow .lock-btn { padding: 10px 14px; white-space: normal; }
.self-phone-flow .self-phone-banner { margin: 8px 12px 0; padding: 8px 12px; gap: 2px; }
.self-phone-next { padding: 8px 16px; font-size: 12px; line-height: 1.4; color: var(--burn); flex-shrink: 0; }
.self-phone-flow .chip, .self-phone-flow .attach-btn, .self-phone-flow .send-btn, .self-phone-flow .render-inline-btn { min-height: 44px; }
.self-phone-flow .attach-btn, .self-phone-flow .send-btn { min-width: 44px; }
.self-phone-flow #chat-input { min-height: 44px; }
.self-phone-confirm-actions { position: sticky; bottom: -38px; padding-bottom: 16px; background: var(--cream); }
.self-phone-send-error { color: #9b3326 !important; }
.self-phone-send-error:empty { display: none; }
.self-phone-confirm-actions button:disabled { opacity: .5; }
.self-phone-confirm-actions [data-self-send] { background: var(--burn); color: var(--cream); border: 1px solid var(--burn); }
.self-phone-confirm-actions [data-self-back] { background: transparent; color: var(--burn); border: 1px solid var(--burn); }

.pickup-group-qr{display:block;width:200px;height:200px;max-width:70vw;margin:16px auto;background:#fff;border:8px solid #fff;border-radius:8px}

.lock-sheet:has(#material-request) .holder .rendered-shot{width:112px;height:112px}.lock-sheet:has(#material-request) .holder{width:112px;max-height:126px;margin:12px auto}.lock-sheet:has(#material-request) .holder .rendered-shot img{height:100%;object-fit:contain}

.project-self-hint { font-size:13px; line-height:1.5; color:var(--ink); margin:12px 0; }

/* Optional, dismissible customer prompts. */
.toast{position:relative;padding-right:48px;cursor:pointer}.toast-close{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:36px;height:36px;padding:0;border:0;background:transparent;color:inherit;font:24px/1 system-ui;cursor:pointer}.toast-close:focus-visible,.source-question-close:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.source-question-head{display:flex;align-items:flex-start;gap:8px}.source-question-title{flex:1;min-width:0}.source-question-optional{font-size:11px;font-weight:500;white-space:nowrap}.source-question-close{flex:0 0 32px;min-height:32px;border:0;border-radius:8px;background:transparent;color:inherit;font:24px/1 system-ui;cursor:pointer}

/* Follow-up drafts stay visible and removable while either model is busy. */
.chat-queue[hidden]{display:none}.chat-queue{margin:0 0 8px;border:1px solid var(--rule);border-radius:12px;background:var(--paper);overflow:hidden}.chat-queue-head{display:flex;align-items:center;gap:8px;padding:4px 8px;font-size:12px}.chat-queue-head b{margin-right:auto}.chat-queue button{border:0;background:transparent;color:var(--burn);font:inherit;cursor:pointer;min-height:32px}.chat-queue button:disabled{opacity:.45;cursor:default}.chat-queue-items{max-height:min(140px,22dvh);overflow:auto}.chat-queue-row{display:flex;align-items:center;border-top:1px solid var(--rule);padding:0 6px 0 10px;gap:8px;font-size:12px}.chat-queue-row span{flex:1;min-width:0;white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.chat-queue-row button{flex:0 0 44px;min-height:44px;font-size:20px}.chat-queue-note{padding:4px 10px 7px;font-size:11px;color:var(--muted,#766a59)}.input-pill input{min-width:0}

/* Self-service Size & position on the phone: the tablet's placement step,
   sized so the pad, its tools and Send fit a phone without page zoom. The pad
   owns its touches (drag, pinch, corners); the sheet scrolls around it. */
.self-phone-placement { max-height: 96vh; max-height: 96dvh; padding-top: 18px; }
.self-phone-placement h2 { margin: 0; }
/* .self-place-* rules live in self-placement.css (shared with the PC station, v291). */

/* Keyboard-safe app surface. dvh remains the no-JS/old-browser fallback above. */
.has-app-viewport .mobile-view {
  position: fixed; top: var(--app-viewport-top); left: 0; right: 0;
  height: var(--app-viewport-height); min-height: 0;
}
/* 16px prevents iOS form-focus autozoom without disabling accessibility zoom. */
.mobile-view input:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
.mobile-view textarea { font-size: 16px; }
.chip-row, .chip-row.is-expanded { flex-wrap: nowrap; overflow-x: auto; }
.input-pill input { min-width: 0; }
.lock-sheet { max-height: min(90vh, calc(var(--app-viewport-height, 100dvh) - 12px)); scroll-padding-block: 16px; }
.app-keyboard-open .input-bar { padding-bottom: 8px; }
.app-keyboard-open .m-app { padding-top: 0; }
.app-viewport-compact .halloween-chat-banner,
.app-viewport-compact .self-phone-next,
.app-viewport-compact .self-mode-instruction { display: none; }
.app-viewport-compact .self-phone-flow .self-phone-banner { margin: 4px 12px 0; padding: 5px 10px; gap: 0; }
.app-viewport-compact .self-phone-banner strong { font-size: 13px; }
.app-viewport-compact .self-mode-label { font-size: 10px; padding: 2px 6px; }
.app-viewport-compact .self-mode-expiry { font-size: 11px; }
.app-viewport-compact .chat-header { padding-top: 5px; padding-bottom: 5px; }
.app-viewport-compact .chip-row { padding-top: 3px; padding-bottom: 3px; }
.app-viewport-compact .chat-queue-items { max-height: 60px; }
.app-viewport-compact .lock-sheet { padding-top: 12px; padding-bottom: 16px; }
.app-viewport-short .chip-row,
.app-viewport-short .chat-queue-items { display: none; }
.app-viewport-short .self-phone-flow .self-phone-banner { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-viewport-short .self-phone-banner strong { margin-inline: 6px; }
.app-viewport-short .self-mode-expiry { display: block; }
.app-viewport-short .input-bar { padding-top: 4px; padding-bottom: 4px; }
.app-keyboard-open .contact-launcher { display: none; }
.has-app-viewport .self-mode-expired {
  inset: auto 0; top: var(--app-viewport-top); height: var(--app-viewport-height); box-sizing: border-box;
}
.has-app-viewport .self-mode-expired .lock-sheet { max-height: calc(var(--app-viewport-height) - 40px); }
/* Even a landscape keyboard with accessories must leave the composer reachable. */
.app-viewport-short .chat-thread { padding-top: 0; padding-bottom: 0; }
.app-viewport-short .self-phone-flow .self-phone-banner { padding-block: 2px; margin-top: 2px; }
.app-viewport-short .chat-queue-note { display: none; }
/* In a keyboard-sized viewport show queue status/actions, with details restored on dismissal. */
.app-viewport-compact .chat-queue-items,
.app-viewport-compact .chat-queue-note { display: none; }

.app-viewport-short .chat-queue { display: none; }

/* iOS landscape + candidate/accessory bars can leave less than 100px. */
.app-viewport-minimal .chat-header { display: none; }
.app-viewport-minimal .self-phone-flow .self-phone-banner { margin: 0; padding: 1px 8px; }
.app-viewport-minimal .input-pill { padding: 2px; }
.app-viewport-minimal .input-bar { padding: 2px 8px; }

/* Checkout: choosing a material and editing its layout are separate actions. */
.customer-material-card { display:flex; flex-direction:column; }
.customer-material-choice { flex:1; align-content:start; }
.customer-material-choice .material-photo { grid-column:1/-1; aspect-ratio:4/3; display:grid; place-items:center; background:#eee7dd; border-radius:8px; overflow:hidden; }
.customer-material-choice .material-photo img { width:100%; height:100%; object-fit:contain; aspect-ratio:auto; }
.material-photo-fallback { font-size:13px; padding:12px; text-align:center; }
.material-editor-overlay { position:fixed; z-index:1000; inset:var(--app-viewport-top,0px) 0 auto; height:var(--app-viewport-height,100dvh); display:flex; justify-content:center; background:rgba(26,20,16,.42); }
.material-editor-dialog { width:min(100%,520px); height:100%; display:flex; flex-direction:column; overflow:hidden; background:var(--cream,#f5efe2); color:var(--ink,#1a1410); }
.material-editor-header,.material-editor-footer { flex-shrink:0; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; background:var(--cream,#f5efe2); }
.material-editor-header { border-bottom:1px solid #d8cdbd; }
.material-editor-header h3 { margin:0; font-size:20px; }
.material-editor-header button,.material-editor-footer button { min-height:44px; padding:10px 20px; border:1px solid #bcae9c; border-radius:24px; font:600 15px var(--font-body); background:#fffdf8; color:var(--ink); }
.material-editor-content { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:12px 16px; }
.material-editor-content h4 { margin:0; font-size:17px; }
.material-editor-content>p { font-size:13px; line-height:1.4; }
.material-editor-footer { border-top:1px solid #d8cdbd; padding-bottom:max(12px,env(safe-area-inset-bottom)); }
.material-editor-footer button { width:100%; background:var(--burn); color:var(--cream); border:0; }
.material-editor-footer button:disabled { opacity:.5; }

.material-editor-content input { scroll-margin-block:12px; }
@media (max-height:350px) {
  .material-editor-header,.material-editor-footer { padding:4px 12px; }
  .material-editor-header h3 { font-size:18px; }
  .material-editor-content { padding:8px 12px; }
}
.app-viewport-short .material-editor-header,.app-viewport-short .material-editor-footer { padding:4px 12px; }
.app-viewport-short .material-editor-header h3 { font-size:18px; }
.app-viewport-short .material-editor-content { padding:8px 12px; }
/* Some mobile keyboards draw their accessory strip over the reported viewport.
   Keep the primary action clear of that strip as well as the home indicator. */
.app-keyboard-open .material-editor-footer { padding-bottom:max(24px,env(safe-area-inset-bottom)); }
.app-viewport-minimal .material-editor-header { padding-block:0; }
.app-viewport-minimal .material-editor-content { padding-block:2px; }
.app-viewport-minimal .material-editor-footer { padding-top:0; }
.app-viewport-minimal .material-editor-content input { scroll-margin-block:0; }

.verification-notice { margin: 10px 0; padding: 12px; border: 1px solid #b43d32; border-radius: 10px; background: #fff4ef; color: #70271e; font-size: 14px; }
.verification-notice[hidden] { display: none; }
.verification-notice p { margin: 0 0 8px; }
.verification-notice button { min-height: 44px; padding: 8px 12px; border: 1px solid currentColor; border-radius: 8px; color: inherit; background: #fff; font: inherit; cursor: pointer; }

.material-code { display:inline-block; margin:0 6px 5px 0; padding:3px 7px; border:1px solid var(--burn); border-radius:5px; color:var(--burn); font-weight:700; letter-spacing:.04em; }
.material-choice-copy>strong { display:block; }
.material-customer-layout { display:block; margin-top:7px; padding:7px 8px; border-left:3px solid var(--burn); background:var(--paper,#fffaf1); color:var(--burn); font-weight:700; }
.material-customer-layout[hidden] { display:none; }
