:root {
  --ink: #1b2452;
  --green: #4260ff;
  --muted: #596173;
  --line: #dce2f0;
  --paper: #fff;
  --brand-dark: #283a99;
  --brand-soft: #edf1ff;
  --text: #3f3f3f;
}
body { color: var(--ink); font: 14px/1.5 'Open Sans', Arial, sans-serif; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline-color: var(--green); }
header { height: 85px; background: #f9f9f9; box-shadow: 0 4px 30px #1b24520c; }
.brand { gap: 12px; font: 12px/1.35 'Open Sans', Arial, sans-serif; letter-spacing: 0; color: var(--text); }
.brand img { display: block; width: 158px; height: auto; }
.brand > span { max-width: 90px; }
nav { color: var(--text); font-size: 13px; font-weight: 600; }
nav .active { color: var(--brand-dark); }
nav .active:after { background: var(--green); }
.phone { color: var(--brand-dark); font-size: 15px; font-weight: 600; }
.breadcrumbs { padding: 21px 0; font-size: 12px; color: var(--muted); }
.breadcrumbs a, .breadcrumbs span:last-child { color: var(--brand-dark); }
.intro { border-radius: 12px; background: linear-gradient(110deg, #eaf0ff, #f8faff 85%); padding: 24px clamp(18px, 3vw, 36px); margin: 0 0 26px; }
h1 { font-family: inherit; font-size: clamp(26px, 3vw, 42px); font-weight: 700; line-height: 1.18; letter-spacing: -.025em; }
.intro p { margin-top: 9px; color: var(--muted); font-size: 14px; }
.demo { color: var(--brand-dark); border-color: #c4d0ff; background: #fff; font-size: 11px; }
.demo span, .preview-head i, .live-dot { background: var(--green); }
.scene { background: radial-gradient(ellipse at 50% 40%, #f9faff, #e8edfb); border-color: var(--line); border-radius: 10px; }
.scene:after { background: var(--line); }
.scene-controls { background: #fff; border-color: var(--line); }
.scene-controls span, .scene-label small, .height-label, .width-label, .preview-head button, .preview-note, .preview-foot { color: var(--muted); }
.height-label span { background: #bdc9e8; }
.preview-head, .scene-label { font-weight: 600; }
.preview-foot, .preview-note, .preview-head button, .scene-label small { font-size: 11px; }
.preview-foot button { color: var(--brand-dark); font-size: 11px; }
.settings, .summary { border-radius: 10px; box-shadow: 0 4px 20px #1b245208; }
.tabs button { font-size: 11px; color: var(--muted); font-weight: 600; }
.tabs .selected { color: var(--brand-dark); }
h2, .field-title { font-size: 14px; font-weight: 700; }
.field-title > span { font-size: 9px; color: var(--muted); }
.shapes button { color: #6476ae; }
.shapes button > span, .size-options button, .stones strong { font-size: 11px; }
.stones strong { font-weight: 600; }
.size-options small, .stones small, .tiny, .material-note, .distance span, .upload span { color: var(--muted); font-size: 10px; }
.chosen { border-color: var(--green) !important; background: var(--brand-soft) !important; }
.check, .size-options svg, .material-note, .edit-delivery, .back-button { color: var(--brand-dark); }
.next-button { background: var(--brand-soft); color: var(--brand-dark); }
.primary { background: var(--green); color: #fff; }
.next-button, .primary { font-weight: 700; font-size: 12px; border-radius: 6px; }
.primary:hover { background: #3852d9; }
.summary-sub, .total > span, .total small, .disclaimer, .help small, .help > span, .price-lines span { color: var(--muted); }
.price-lines > div, .summary-sub, .edit-delivery { font-size: 11px; }
.price-lines b { font-weight: 600; }
.spec-tags span { background: var(--brand-soft); color: var(--brand-dark); font-size: 9px; }
.total strong { color: var(--ink); font-weight: 700; }
.total > span, .total small, .disclaimer { font-size: 10px; }
.help, .upload, .delivery-card, .modal > div { background: #f5f7ff; }
.help a { color: var(--brand-dark); font-weight: 600; }
.upload, .photo-actions, .delivery-card > svg { color: var(--brand-dark); }
.upload { border-color: #a4b4f1; }
.input-grid label, .distance, .delivery-card p, .formula p, .modal p { color: var(--muted); }
.bottom-note, footer { color: var(--muted); font-size: 11px; }
.bottom-note a { color: var(--brand-dark); }
footer { background: #f9f9f9; align-items: center; }
footer img { width: 115px; height: auto; }
.toast { background: var(--brand-dark); border-color: var(--brand-dark); }
.modal { background: #1b2452a6; }
@media (max-width: 1150px) { .help { background: transparent; } }
@media (max-width: 980px) { .brand > span { display: none; } }
@media (max-width: 760px) {
  header { height: 72px; gap: 12px; }
  .brand img { width: clamp(108px, 35vw, 146px); }
  .phone { font-size: 12px; gap: 5px; }
  .intro { display: block; }
  .intro p { max-width: none; font-size: 12px; }
  .demo { position: static; width: fit-content; margin-top: 12px; }
  .help { background: #f5f7ff; }
  footer { gap: 14px; }
  footer img { width: 88px; }
}

.stone-size-title { margin-top: 0; }
.form-note a { color: var(--brand-dark); font-weight: 600; white-space: nowrap; }
.shape-unavailable { margin: 0; padding: 10px 12px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-dark); font-size: 11px; }
.portrait-options { border: 0; padding: 0; margin: 14px 0 10px; }
.portrait-options legend { margin-bottom: 8px; padding: 0; font-size: 13px; font-weight: 700; }
.portrait-options label { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 10px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; cursor: pointer; }
.portrait-options label:has(input:checked) { background: var(--brand-soft); border-color: var(--green); }
.portrait-options input { accent-color: var(--green); margin: 0; }
.portrait-options small { margin-left: auto; font-size: 10px; white-space: nowrap; }
.portrait-remove { color: var(--brand-dark); font-size: 11px; text-decoration: underline; padding: 7px 0; }

.stones button:disabled { background: #f5f6f9; color: var(--muted); cursor: not-allowed; }
.stones button:disabled .swatch { opacity: .48; }
.photo-unavailable { margin: 0 0 16px; }
.glass-settings { margin: 14px 0; padding: 12px; background: var(--brand-soft); border-radius: 6px; }
.glass-settings .input-grid { margin: 0 0 8px; }
.glass-settings p { margin: 0; color: var(--brand-dark); font-size: 11px; }
.total strong.price-pending { font-size: 21px; line-height: 1.3; }

.delivery-breakdown { margin: 0 0 16px; }
.delivery-breakdown div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.delivery-breakdown dd { margin: 0; font-weight: 600; }
.phone-price { color: var(--brand-dark); text-decoration: underline; }

/* Keep interface text readable alongside the full-size memorial preview. */
:root {
  --type-small: 0.875rem;
  --type-body: 1rem;
  --type-section: 1.1875rem;
}
body { font-size: var(--type-body); }
.brand, .breadcrumbs, .demo { font-size: var(--type-small); }
nav, .phone, .intro p { font-size: var(--type-body); }
h1 { font-size: clamp(2rem, 3.4vw, 3rem); }
.preview-head, .scene-label, .preview-foot button { font-size: var(--type-body); }
.scene-label small, .height-label, .width-label, .scene-controls span,
.preview-head button, .preview-foot, .preview-note, .care p { font-size: var(--type-small); }
.care strong { font-size: var(--type-body); }
.scene-label { right: 20px; }
.scene-controls span { min-width: 42px; }
h2, .field-title, .section-title h2 { font-size: var(--type-section); }
.field-title { gap: 8px; flex-wrap: wrap; }
.field-title > span, .section-title > span { font-size: var(--type-small); }
.tabs { height: auto; min-height: 54px; }
.tabs button { height: auto; min-height: 54px; font-size: var(--type-small); }
.tabs button > span { width: 23px; height: 23px; flex-shrink: 0; font-size: .75rem; }
.shapes { grid-template-columns: repeat(auto-fit, minmax(min(100%, 103px), 1fr)); }
.shapes button > span, .size-options button, .stones strong,
.next-button, .primary, .upload strong, .input-grid input, .input-grid select { font-size: var(--type-body); }
.size-options button { flex-wrap: wrap; }
.size-options button svg { flex-shrink: 0; }
.size-options small, .stones small, .tiny, .material-note, .shape-unavailable,
.portrait-options small, .portrait-remove, .upload span, .upload input,
.back-button, .glass-settings p, .error, .delivery-card p { font-size: var(--type-small); }
.upload input { width: 100%; }
.portrait-options legend, .portrait-options label, .input-grid label,
.delivery-card strong, .delivery-card b, .delivery-breakdown div, .modal p { font-size: var(--type-body); }
.portrait-options label { flex-wrap: wrap; }
.summary-sub, .spec-tags span, .price-lines > div, .edit-delivery,
.total > span, .total small, .disclaimer, .help > span, .help small,
.bottom-note, footer { font-size: var(--type-small); }
.help a, .toast { font-size: var(--type-body); }
.total strong { font-size: clamp(2.25rem, 3vw, 2.75rem); line-height: 1.15; }
.total strong.price-pending { font-size: 1.5rem; }
@media (max-width: 760px) {
  .phone { font-size: var(--type-small); }
  .intro p { font-size: var(--type-body); }
  .preview-foot { flex-wrap: wrap; gap: 8px; }
  .price-lines > div { font-size: var(--type-body); }
  .modal > div { max-height: 100%; overflow: auto; }
}
@media (max-width: 440px) {
  .tabs { gap: 7px; padding-inline: 12px; }
  .tabs button { gap: 5px; }
  .tabs button svg { display: none; }
  .portrait-options small { margin-left: 22px; }
  .stone-size-title > span { width: 100%; }
}

.request-dialog { width: min(94vw, 470px); max-height: 90vh; margin: auto; overflow: auto; padding: 24px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 12px; }
.request-dialog::backdrop { background: #1b245287; }
.request-dialog form { position: relative; display: grid; gap: 12px; }
.request-dialog h2 { padding-right: 32px; }
.request-close { position: absolute; top: 0; right: 0; padding: 2px 6px; }
.request-dialog label { display: grid; gap: 4px; }
.request-dialog input:not([type=checkbox]) { min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 4px; background: white; }
.request-dialog .request-consent { grid-template-columns: auto 1fr; align-items: start; font-size: .875rem; }
.request-consent input { margin-top: 5px; }
.request-consent a { color: var(--brand-dark); text-decoration: underline; }
.request-dialog .primary { margin: 0; }
.request-status { color: var(--brand-dark); font-size: .875rem; }
