/* Hidden means hidden, whatever display a class gives it (V17.37: the gift card box showed on every payment form). */
[hidden] { display: none !important; }
/* The online design page: the customer station's look (same type, colors, tiles and steps), sized for a
   phone or a computer. The page scrolls; the bar with Back, the price and Next stays at the bottom. */
body { background: var(--ground); -webkit-text-size-adjust: 100%; }
.online { min-height: 100vh; display: flex; flex-direction: column; }
.boot { margin: auto; font-size: 18px; color: var(--ink-2); padding: 40px; }
a { color: var(--accent); }
.small { font-size: 15px; }
.muted.small { line-height: 1.45; }

.btn, .btn2 { min-height: 54px; font-size: 18px; padding: 0 22px; text-decoration: none; }
.btn-big { min-height: 62px; font-size: 20px; padding: 0 30px; }
.btn2 { color: var(--ink); }
.linkish { border: 0; background: none; padding: 6px 0; min-height: 40px; color: var(--accent); font-size: 16px; font-weight: 700; text-decoration: underline; align-self: flex-start; }

/* Top bar */
.top {
  position: sticky; top: 0; z-index: 5; min-height: 64px; padding: 8px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.shop-name { font-size: 18px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.call { min-height: 44px; gap: 8px; }
.progress { display: flex; align-items: center; gap: 12px; min-width: 0; }
.progress-dots { display: flex; gap: 5px; }
.progress-dots i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-2); display: block; }
.progress-dots i.done { background: var(--accent); border-color: var(--accent); }
.progress-dots i.now { border: 3px solid var(--accent); width: 12px; height: 12px; }
.progress-text { font-size: 15px; color: var(--ink-2); white-space: nowrap; }
.progress-text b { color: var(--ink); }

/* Main area */
.main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; display: flex; gap: 32px; padding: 28px 24px 32px; }
.main.column { flex-direction: column; gap: 22px; }
.main.center { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; padding: 48px 24px; }
h1 { margin: 0; font-size: 34px; line-height: 1.15; }
.lead { margin: 6px 0 0; font-size: 18px; line-height: 1.5; color: var(--ink-2); }

/* Bottom bar */
.bottom {
  position: sticky; bottom: 0; z-index: 5; min-height: 84px; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(30, 30, 28, 0.05);
}
.bottom .spacer { width: 120px; }
.price-box { text-align: center; min-width: 0; }
.price-box .small { font-size: 14px; color: var(--ink-2); }
.price-box .big { font-size: 26px; font-weight: 700; }

/* Preview: the art on a wall, beside the choices; it stays in view while the choices scroll. */
.preview {
  flex: 0 0 46%; align-self: flex-start; position: sticky; top: 88px; height: calc(100vh - 200px); min-height: 360px; max-height: 760px;
  border-radius: 20px; background: var(--wall); display: flex; flex-direction: column; padding: 14px; gap: 6px;
}
.preview canvas { flex: 1; width: 100%; min-height: 0; display: block; }
.preview .cap { text-align: center; }
.preview .cap b { font-size: 18px; display: block; }
.preview .cap span { font-size: 15px; color: var(--ink-2); }
.choices { flex: 1; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.choices > * { flex-shrink: 0; }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

.tile {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 12px; text-align: left;
  border-radius: var(--radius); background: var(--panel); border: 3px solid var(--line);
}
.tile:hover { border-color: var(--line-2); }
.tile[aria-pressed='true'], .tile[aria-checked='true'] { border-color: var(--accent); }
.tick { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); display: none; align-items: center; justify-content: center; }
[aria-pressed='true'] > .tick, [aria-checked='true'] > .tick { display: flex; }
.tile .name { font-size: 18px; font-weight: 700; display: block; }
.tile .sub { font-size: 16px; color: var(--ink-2); display: block; }
.big-choice { flex-direction: column; align-items: flex-start; gap: 8px; padding: 22px 56px 22px 22px; min-height: 130px; border-radius: 18px; }
.big-choice .name { font-size: 25px; }
.big-choice .sub { font-size: 17px; line-height: 1.45; }

.card { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.live-card { flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; font-size: 17px; line-height: 1.45; }
.live-card .btn2 { flex: none; }
.explain p { margin: 0; font-size: 18px; line-height: 1.55; max-width: 70ch; }
.note { padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-dark); font-size: 16px; line-height: 1.45; }
.note.good { background: #E4F1E6; color: #1F4D2B; }
.note.bad { background: #FBEDEA; color: var(--danger); font-weight: 700; }
.label { font-size: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 16px; font-weight: 700; }
.field input { height: 52px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--panel); font-size: 18px; width: 100%; }
.field input:focus, .field textarea:focus, .search input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(31, 95, 91, 0.2); }
.field input[aria-invalid='true'] { border-color: var(--danger); }
.err { color: var(--danger); font-size: 15px; font-weight: 700; }
.field.notes textarea { width: 100%; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--panel); font: inherit; font-size: 17px; resize: vertical; }
.field.notes label { font-size: 15px; }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: 17px; line-height: 1.4; }
.check input { flex: none; width: 24px; height: 24px; margin-top: 1px; accent-color: var(--accent); }
.check.bad { color: var(--danger); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fields { align-items: start; }
.code-in { font-size: 32px !important; letter-spacing: 12px; font-weight: 700; max-width: 280px; height: 64px !important; text-align: center; }
.row-links { display: flex; gap: 24px; flex-wrap: wrap; }

/* Welcome */
.welcome { align-items: center; gap: 48px; padding-top: 40px; padding-bottom: 40px; }
.welcome .text { flex: 1; display: flex; flex-direction: column; gap: 20px; }
.welcome h1 { font-size: 48px; line-height: 1.1; }
.welcome .lead { font-size: 20px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.pills li { padding: 7px 13px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 15px; font-weight: 700; }
.start-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.welcome .art-panel { flex: 0 0 40%; height: 520px; border-radius: 24px; background: var(--wall); padding: 12px; display: flex; }
.welcome .art-panel canvas { flex: 1; width: 100%; height: 100%; }

/* Photo and size */
.drop {
  flex: 0 0 46%; min-height: 380px; border-radius: 20px; background: #2B2A28; color: #F4F1EA; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 24px; position: relative; overflow: hidden;
}
.drop img { max-width: 100%; max-height: 100%; object-fit: contain; position: absolute; inset: 0; margin: auto; }
.drop .hint { font-size: 19px; }
.size-big { font-size: 44px; font-weight: 700; line-height: 1.15; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border: 2px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.segmented button { min-height: 52px; border: 0; background: transparent; font-size: 17px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 8px; }
.segmented button + button { border-left: 2px solid var(--line-2); }
.segmented button[aria-checked='true'] { background: var(--accent); color: #fff; }
.orient-icon { display: inline-block; border: 3px solid currentColor; border-radius: 3px; flex: none; }
.orient-icon.portrait { width: 16px; height: 22px; }
.orient-icon.landscape { width: 22px; height: 16px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--line-2); background: var(--panel); font-size: 16px; font-weight: 700; }
.chip.sm { min-height: 38px; padding: 0 13px; font-size: 15px; }
.chip[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stepper-row .what { font-size: 18px; font-weight: 700; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper .val { min-width: 86px; text-align: center; font-size: 22px; font-weight: 700; }
.pm { width: 52px; height: 52px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--panel); font-size: 26px; font-weight: 700; flex: none; }
.pm.sm { width: 44px; height: 44px; font-size: 20px; }
.pm:disabled { opacity: 0.35; }

/* Mats */
.mat-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mat-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "n pick pick" "n bevel move" "n reveal reveal"; gap: 10px 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--panel); border: 2px solid var(--line); }
.mat-row .row-n { grid-area: n; font-size: 26px; font-weight: 700; color: var(--accent); display: flex; flex-direction: column; align-items: center; line-height: 1; align-self: start; padding-top: 8px; }
.mat-row .row-n small { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.mat-pick { grid-area: pick; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 6px 12px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--ground); text-align: left; }
.mat-pick .change { margin-left: auto; color: var(--accent); font-weight: 700; font-size: 15px; }
.mat-what { display: flex; flex-direction: column; font-size: 15px; min-width: 0; }
.mat-what b { font-size: 17px; }
.bevel-pick { grid-area: bevel; justify-self: start; }
.bevel-pick button { min-height: 46px; font-size: 15px; padding: 0 12px; }
.row-reveal { grid-area: reveal; }
.row-reveal .pm { width: 44px; height: 44px; font-size: 20px; }
.row-reveal .stepper .val { min-width: 70px; font-size: 18px; }
.row-reveal .what { font-size: 16px; }
.row-move { grid-area: move; display: flex; gap: 6px; justify-content: flex-end; }

/* Pictures of frames and mats */
.pic { display: block; flex: none; overflow: hidden; border: 1px solid #D6D2CA; position: relative; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic.swatch { width: 48px; height: 48px; border-radius: 8px; }
.moulding-photo { width: 100%; height: 86px; border-radius: 10px; }
.moulding-photo img { object-fit: contain; background: #fff; }
.found { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 16px; background: var(--accent-soft); font-size: 17px; line-height: 1.45; }
.found b { font-size: 19px; }
.found.big .moulding-photo { width: 140px; height: 90px; }

/* Browsing */
.browse-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.browse-head h1 { font-size: 30px; }
.search { position: relative; }
.search input { width: 100%; height: 52px; padding: 0 14px 0 44px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--panel); font-size: 17px; }
.search-icon { position: absolute; left: 14px; top: 16px; color: var(--ink-2); }
.filters { display: flex; flex-direction: column; gap: 8px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.item-grid.mats { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.item-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px; text-align: left; border-radius: 14px; background: var(--panel); border: 3px solid var(--line); min-width: 0;
}
.item-card:hover { border-color: var(--line-2); }
.item-card[aria-pressed='true'] { border-color: var(--accent); }
.item-card .tick { top: 8px; right: 8px; }
.item-card.mat .pic.swatch { width: 100%; height: 74px; border-radius: 9px; }
.item-name { font-size: 15px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.item-sub { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.empty { padding: 20px 0; }

/* Glass */
.glass-card { flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px; min-height: 220px; border-radius: 18px; }
.glass-card .name { font-size: 22px; }
.glass-card .desc { font-size: 16px; line-height: 1.45; color: var(--ink-2); }
.glass-card .price { margin-top: auto; font-size: 19px; font-weight: 700; }
.glass-card .tick { top: auto; bottom: 18px; right: 18px; width: 32px; height: 32px; }

/* Details, code and done */
.order { align-items: flex-start; }
.look-card { flex: 0 0 380px; position: sticky; top: 88px; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); }
.look-card canvas { width: 100%; height: 200px; border-radius: 14px; display: block; background: var(--wall); }
.look-card h2 { margin: 0; font-size: 21px; }
.rows { margin: 0; }
.rows div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; padding: 6px 0; border-bottom: 1px solid #EFECE6; }
.rows dt { color: var(--ink-2); }
.rows dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.total-row { display: flex; align-items: baseline; justify-content: space-between; padding-top: 4px; }
.total-row span:first-child { font-size: 15px; color: var(--ink-2); }
.total-row span:last-child { font-size: 24px; font-weight: 700; }
.ts-box { min-height: 65px; }
.done-mark { width: 96px; height: 96px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.done h1 { font-size: 42px; }
.visit { display: flex; flex-direction: column; gap: 6px; padding: 20px 28px; border-radius: 18px; background: var(--accent-soft); font-size: 18px; line-height: 1.45; }
.visit-when { font-size: 18px; color: var(--accent-dark); }
.visit-when b { font-size: 26px; }
.done .lead { max-width: 640px; }

.overlay { position: fixed; inset: 0; background: rgba(30,30,28,0.55); display: flex; align-items: center; justify-content: center; z-index: 20; padding: 16px; }
.overlay .box { background: var(--panel); border-radius: 20px; padding: 28px; text-align: center; display: flex; flex-direction: column; gap: 14px; max-width: 480px; }
.overlay .box h2 { margin: 0; font-size: 26px; }
.overlay .box p { margin: 0; font-size: 17px; color: var(--ink-2); }

/* ---------- tablets ---------- */
@media (max-width: 1020px) {
  .progress-dots { display: none; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .look-card { flex-basis: 320px; }
}

/* ---------- phones: one column, the preview above the choices ---------- */
@media (max-width: 760px) {
  .top { padding: 8px 16px; min-height: 56px; flex-wrap: wrap; gap: 6px 12px; }
  .shop-name { font-size: 16px; }
  .call span { display: none; }
  .call { min-height: 40px; width: 44px; padding: 0; }
  .progress { order: 3; width: 100%; }
  .progress-text { font-size: 14px; }
  .main, .main.column { flex-direction: column; gap: 18px; padding: 18px 16px 24px; }
  h1 { font-size: 27px; }
  .lead { font-size: 16px; }
  .wide-only { display: none; }
  .bottom { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); min-height: 72px; gap: 8px; }
  .bottom .btn, .bottom .btn2 { min-height: 50px; padding: 0 14px; font-size: 16px; gap: 6px; }
  .bottom .btn2 span { display: none; }
  .bottom .spacer { width: 50px; }
  .price-box .small { font-size: 12px; }
  .price-box .big { font-size: 21px; }
  .preview { position: sticky; top: 92px; z-index: 2; flex: none; width: 100%; height: 36vh; min-height: 220px; max-height: 340px; padding: 8px; border-radius: 16px; }
  .preview .cap b { font-size: 15px; }
  .preview .cap span { font-size: 13px; }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .big-choice { min-height: 0; padding: 16px 52px 16px 16px; }
  .big-choice .name { font-size: 21px; }
  .big-choice .sub { font-size: 15px; }
  .live-card { flex-direction: column; align-items: stretch; }
  .welcome { padding-top: 24px; gap: 20px; }
  .welcome h1 { font-size: 34px; }
  .welcome .lead { font-size: 17px; }
  .welcome .art-panel { order: -1; flex: none; width: 100%; height: 260px; }
  .drop { flex: none; min-height: 240px; }
  .size-big { font-size: 34px; }
  .glass-card { min-height: 0; padding: 14px; }
  .glass-card .name { font-size: 19px; }
  .glass-card .desc { font-size: 14px; }
  .glass-card .price { font-size: 16px; }
  .glass-card .tick { width: 26px; height: 26px; bottom: 12px; right: 12px; }
  .mat-row { grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: "n pick" "n bevel" "n reveal" "n move"; }
  .row-move { justify-content: flex-start; }
  .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item-grid.mats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .item-card.mat .pic.swatch { height: 56px; }
  .look-card { position: static; flex: none; width: 100%; }
  .look-card canvas { height: 180px; }
  .done h1 { font-size: 32px; }
  .visit-when b { font-size: 22px; }
}

/* V17.11: the deposit link after a design is sent */
.pay-deposit { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 22px; border-radius: 18px; border: 2px solid var(--accent); max-width: 520px; text-align: center; }
.pay-deposit p { margin: 0; font-size: 17px; }

/* 1.4: the MiterCut demo (only when the website is the demo) */
.demo-banner { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: center; align-items: center; padding: 8px 16px; background: #1F2A2A; color: #F4F1EA; font-size: 15px; line-height: 1.35; text-align: center; }
.demo-banner a { color: #9FD9D2; font-weight: 700; }
.demo-code { font-size: 1.25em; letter-spacing: 0.12em; color: var(--accent-dark); }
.demo-next { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 22px; border-radius: 18px; border: 2px solid var(--accent); max-width: 560px; text-align: center; }
.demo-next p { margin: 0; font-size: 17px; }
.demo-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* V17.64: sliders, as on the customer station */
input.slide { width: 100%; height: 44px; margin: 6px 0 4px; accent-color: var(--accent); background: transparent; touch-action: none; }
input.slide::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; background: var(--line-2); }
input.slide::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 34px; height: 34px; margin-top: -12px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
input.slide::-moz-range-track { height: 10px; border-radius: 5px; background: var(--line-2); }
input.slide::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
/* 1.4.2 (V17.66): Upload a photo, or Use the camera */
.photo-fork { display: grid; gap: 12px; }
.drop video { width: 100%; height: 100%; object-fit: contain; background: #000; border-radius: 12px; }
.cam-controls { display: grid; gap: 12px; }
.cam-controls .cam-row { display: flex; gap: 10px; }
.cam-controls .cam-row .btn2 { flex: 1; }
