/*!
 * Phase 213 extraction — layer: p210-cards-preview
 * ------------------------------------------------
 * Owner        : MTLE Phase 210 (mockup-faithful illustrated cards,
 *                unified Water Topology grid, Design Preview stage polish,
 *                Linework Review canvas rule — Phase 239 rename of
 *                "Cut Plot")
 * Scope attr   : html[data-p210="v1"] (set by /web/mtle/js/p210-cards-preview.js)
 * Public hook  : window._p210
 * Cascade      : loads AFTER p208/p209, BEFORE p212-contract-hardening.css.
 * Contract     : Additive visual layer only.  The Phase 212 mutually-
 *                exclusive-card rules that previously sat in-between the
 *                p210 rules have moved to p212-contract-hardening.css so
 *                their cascade order is explicit and last-wins.
 */

/* =====================================================================
 * PHASE 210 — MTLE Mockup-Faithful UI Polish.
 *
 * Replaces the visible Step 3/4 customer controls with illustrated
 * product cards (warm cream thumbnail top + dark metadata band + active
 * blue border + check badge) and upgrades the Design Preview stage
 * with a centered paper, label plaque, north arrow, scale bar and a
 * calmer map-ink palette.
 *
 * Scope: all rules below target `html[data-p210="v1"]` and layer on
 * top of Phase 208/209 without replacing them. The Phase 209 p209
 * classes are kept on the same buttons so the existing state sync,
 * MutationObservers, and Playwright test IDs still work. Export
 * bytes are never touched; palette remaps stay scoped to
 * `#preview-panel .mte-pv-svg-host`.
 * =================================================================== */
html[data-p210="v1"] {
  /* Phase 210.2 — lighter, ivory-leaning thumbnail tones so the
   * cards read as warm-white paper samples, not tan wood veneer. */
  --p210-card-thumb-bg:    #faf3de;
  --p210-card-thumb-edge:  #c7b896;
  --p210-card-body-bg:     #13192a;
  --p210-card-body-bg-hi:  #1a2236;
  --p210-card-border:      rgba(255,255,255,0.09);
  --p210-card-border-hi:   #58a0e8;
  --p210-card-glow:        0 0 0 3px rgba(94,160,255,0.18), 0 10px 28px -14px rgba(94,160,255,0.55);
  --p210-card-shadow:      0 10px 22px -12px rgba(0,0,0,0.65), 0 1px 0 rgba(255,255,255,0.05) inset;
  --p210-card-check:       #58a0e8;
  --p210-card-title:       #eaf0fa;
  --p210-card-desc:        #9ba3b5;
  --p210-section-heading:  #8fc0ff;
  --p210-stage-floor-0:    #05070b;
  --p210-stage-floor-1:    #0c1220;
  /* Phase 210.2 — the first p210 pass still read as basswood wood
   * veneer, not printed paper. Shift toward warm ivory / printed-
   * paper tones: much lower saturation on the body, lighter hi,
   * gentler lo, muted edge. The paper should read as a premium
   * warm-white product card, not a stained wood slab. */
  --p210-stage-paper:      #f1ead7;
  --p210-stage-paper-hi:   #faf5e6;
  --p210-stage-paper-lo:   #d9cfb2;
  --p210-stage-paper-edge: #a59574;
  --p210-ink-0:            #1a140a;
  --p210-ink-1:            #34281a;
  --p210-ink-2:            #5a4830;
  --p210-ink-soft:         rgba(26,20,10,0.60);
}

/* ---------- Widen sidebar so v3 cards breathe on desktop widths ---------- */
@media (min-width: 1600px) {
  html[data-p210="v1"] .wizard-panel { width: 540px; min-width: 420px; }
}
@media (min-width: 1400px) and (max-width: 1599px) {
  html[data-p210="v1"] .wizard-panel { width: 480px; min-width: 400px; }
}

/* ---------- v3 section heading ---------- */
html[data-p210="v1"] .mtle-section-label-v3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--p210-section-heading);
  margin: 14px 0 8px;
}
html[data-p210="v1"] .mtle-section-label-v3::before {
  content: "";
  display: inline-block;
  width: 3px; height: 12px;
  background: var(--p210-section-heading);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(143,192,255,0.45);
}

/* ---------- v3 illustrated product cards (style cards) ---------- */
html[data-p210="v1"] .mtle-card-grid-v3 {
  display: grid;
  gap: 10px;
  margin: 10px 0 14px;
}
html[data-p210="v1"] .mtle-card-grid-v3.cols-2 { grid-template-columns: 1fr 1fr; }
html[data-p210="v1"] .mtle-card-grid-v3.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  html[data-p210="v1"] .mtle-card-grid-v3.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  html[data-p210="v1"] .mtle-card-grid-v3.cols-3,
  html[data-p210="v1"] .mtle-card-grid-v3.cols-2 { grid-template-columns: 1fr; }
}

html[data-p210="v1"] .mtle-style-card-v3 {
  appearance: none;
  -webkit-appearance: none;
  background: var(--p210-card-body-bg);
  color: var(--p210-card-title);
  border: 1.5px solid var(--p210-card-border);
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--p210-card-shadow);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease, background 0.15s ease;
  text-align: left;
  font-family: inherit;
  position: relative;
  min-height: 120px;
}
html[data-p210="v1"] .mtle-style-card-v3:hover {
  transform: translateY(-2px);
  border-color: rgba(143,192,255,0.45);
  background: var(--p210-card-body-bg-hi);
}
html[data-p210="v1"] .mtle-style-card-v3:focus-visible {
  outline: none;
  box-shadow: var(--p208-focus-ring), var(--p210-card-shadow);
  border-color: var(--p210-card-border-hi);
}
html[data-p210="v1"] .mtle-style-card-v3.active,
html[data-p210="v1"] .mtle-style-card-v3[aria-pressed="true"] {
  border-color: var(--p210-card-border-hi);
  box-shadow: var(--p210-card-glow), var(--p210-card-shadow);
}

html[data-p210="v1"] .mtle-style-card-thumb {
  position: relative;
  background:
    radial-gradient(120% 140% at 50% 0%, var(--p210-stage-paper-hi) 0%, var(--p210-card-thumb-bg) 45%, var(--p210-stage-paper-lo) 100%);
  border-bottom: 1px solid var(--p210-card-thumb-edge);
  padding: 0;
  display: block;
  aspect-ratio: 10 / 6;
  overflow: hidden;
  /* Phase 210.4 — subtle inner highlight + bottom-edge shadow so the
   * illustrated mini-map feels like a printed paper sample tucked
   * into the card, not a flat colored patch. */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    inset 0 -4px 10px rgba(0,0,0,0.06);
}
html[data-p210="v1"] .mtle-style-card-thumb svg {
  display: block;
  width: 100%;
  height: 100%;
  color: var(--p210-ink-1);
}
/* Phase 262 — thumbnails moved to flat editable SVG asset files served
   via <img>.  Mirror the inline-SVG layout so visual parity is held. */
html[data-p210="v1"] .mtle-style-card-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  pointer-events: none;
}
/* Thumbnail canvas is always bright even on hover/selected states. */
html[data-p210="v1"] .mtle-style-card-v3 .mtle-style-card-thumb { color: var(--p210-ink-1); }

html[data-p210="v1"] .mtle-style-card-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--p210-card-check);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(94,160,255,0.45), 0 0 0 2px rgba(255,255,255,0.75) inset;
}
html[data-p210="v1"] .mtle-style-card-v3.active .mtle-style-card-check,
html[data-p210="v1"] .mtle-style-card-v3[aria-pressed="true"] .mtle-style-card-check {
  display: inline-flex;
}

html[data-p210="v1"] .mtle-style-card-body {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: linear-gradient(180deg, var(--p210-card-body-bg), #0e1321);
  flex: 1;
}
html[data-p210="v1"] .mtle-style-card-v3.active .mtle-style-card-body,
html[data-p210="v1"] .mtle-style-card-v3[aria-pressed="true"] .mtle-style-card-body {
  background: linear-gradient(180deg, #18243a, #0e1833);
}
html[data-p210="v1"] .mtle-style-card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--p210-card-title);
  letter-spacing: 0.2px;
}
html[data-p210="v1"] .mtle-style-card-desc {
  font-size: 10.5px;
  color: var(--p210-card-desc);
  line-height: 1.35;
}

/* Suppress the legacy Phase 209 compact chip rendering on Step 4
 * water/relief pills once p210 has promoted them to v3 illustrated
 * cards. The legacy mini 24-px preview and the grid layout are
 * overridden so the basswood thumbnail panel dominates. */
html[data-p210="v1"] #waterLookPills,
html[data-p210="v1"] #reliefModePills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}
html[data-p210="v1"] #reliefModePills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  html[data-p210="v1"] #waterLookPills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  html[data-p210="v1"] #waterLookPills,
  html[data-p210="v1"] #reliefModePills { grid-template-columns: 1fr; }
}
html[data-p210="v1"] #waterLookPills .water-look-pill.mtle-style-card-v3,
html[data-p210="v1"] #reliefModePills .water-look-pill.mtle-style-card-v3 {
  /* Override Phase 209.4's compact grid rendering. */
  grid-template-columns: none;
  align-items: stretch;
  padding: 0;
  column-gap: 0;
  row-gap: 0;
}
/* Hide the legacy inner label/desc spans once the v3 body renders. */
html[data-p210="v1"] #waterLookPills .water-look-pill.mtle-style-card-v3 > .pill-label,
html[data-p210="v1"] #waterLookPills .water-look-pill.mtle-style-card-v3 > .pill-desc,
html[data-p210="v1"] #reliefModePills .water-look-pill.mtle-style-card-v3 > .pill-label,
html[data-p210="v1"] #reliefModePills .water-look-pill.mtle-style-card-v3 > .pill-desc {
  display: none;
}
/* Hide the old p209 compact 24-px preview if it was installed. */
html[data-p210="v1"] .mtle-style-card-v3 > .p209-style-card-preview {
  display: none !important;
}

/* Railways/Parks/Water choice-card grids: widen to the v3 card layout.
 * Phase 352: #p351fu11WaterStyleGroup (global single-surface water cards)
 * and .p352-water-piece-card-grid (per-piece depth cards) join the same
 * gold 3-up layout so the water cards match the parks/railways quality. */
html[data-p210="v1"] #railwaysStyleGroup,
html[data-p210="v1"] #parksStyleGroup,
html[data-p210="v1"] #p351fu11WaterStyleGroup,
html[data-p210="v1"] .p352-water-piece-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}
@media (max-width: 1100px) {
  html[data-p210="v1"] #railwaysStyleGroup,
  html[data-p210="v1"] #parksStyleGroup,
  html[data-p210="v1"] #p351fu11WaterStyleGroup,
  html[data-p210="v1"] .p352-water-piece-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  html[data-p210="v1"] #railwaysStyleGroup,
  html[data-p210="v1"] #parksStyleGroup,
  html[data-p210="v1"] #p351fu11WaterStyleGroup,
  html[data-p210="v1"] .p352-water-piece-card-grid { grid-template-columns: 1fr; }
}
/* Strip legacy choice-card styling so v3 wins when promoted. */
html[data-p210="v1"] #railwaysStyleGroup .choice-card.mtle-style-card-v3,
html[data-p210="v1"] #parksStyleGroup .choice-card.mtle-style-card-v3,
html[data-p210="v1"] #p351fu11WaterStyleGroup .choice-card.mtle-style-card-v3,
html[data-p210="v1"] .p352-water-piece-card-grid .choice-card.mtle-style-card-v3 {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
  text-align: left;
}
/* Hide the legacy choice-card children directly inside the button —
 * the original <svg viewBox="0 0 44 28"> icon and the inline
 * label/desc spans. Phase 210.4 prepends the new thumb div so the
 * legacy SVG stops being :first-child; match any direct-child SVG
 * that is NOT wrapped inside our own thumb/body wrappers. */
html[data-p210="v1"] #railwaysStyleGroup .choice-card.mtle-style-card-v3 > svg,
html[data-p210="v1"] #parksStyleGroup .choice-card.mtle-style-card-v3 > svg,
html[data-p210="v1"] #p351fu11WaterStyleGroup .choice-card.mtle-style-card-v3 > svg,
html[data-p210="v1"] .p352-water-piece-card-grid .choice-card.mtle-style-card-v3 > svg,
html[data-p210="v1"] #railwaysStyleGroup .choice-card.mtle-style-card-v3 > .choice-card-label,
html[data-p210="v1"] #parksStyleGroup .choice-card.mtle-style-card-v3 > .choice-card-label,
html[data-p210="v1"] #p351fu11WaterStyleGroup .choice-card.mtle-style-card-v3 > .choice-card-label,
html[data-p210="v1"] .p352-water-piece-card-grid .choice-card.mtle-style-card-v3 > .choice-card-label,
html[data-p210="v1"] #railwaysStyleGroup .choice-card.mtle-style-card-v3 > .choice-card-desc,
html[data-p210="v1"] #parksStyleGroup .choice-card.mtle-style-card-v3 > .choice-card-desc,
html[data-p210="v1"] #p351fu11WaterStyleGroup .choice-card.mtle-style-card-v3 > .choice-card-desc,
html[data-p210="v1"] .p352-water-piece-card-grid .choice-card.mtle-style-card-v3 > .choice-card-desc {
  display: none !important;
}

/* ---------- Step 3 grouped feature cards (chip-style, no toggles) ---------- */
html[data-p210="v1"] .p209-feature-group {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--p210-card-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 12px;
}
html[data-p210="v1"] .p209-feature-group-title {
  color: var(--p210-section-heading);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
html[data-p210="v1"] .p209-feature-group-title .p209-fg-hint {
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.2px;
  text-transform: none;
  color: var(--text-muted);
}
html[data-p210="v1"] .p209-feature-group-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 720px) {
  html[data-p210="v1"] .p209-feature-group-chips { grid-template-columns: 1fr; }
}

html[data-p210="v1"] .mtle-feature-chip-v3 {
  appearance: none;
  -webkit-appearance: none;
  background: var(--p210-card-body-bg);
  color: var(--p210-card-title);
  border: 1.5px solid var(--p210-card-border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 30px 1fr 36px;
  gap: 10px;
  align-items: center;
  text-align: left;
  font-family: inherit;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.1s ease, box-shadow 0.2s ease;
  min-height: 52px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.28);
}
html[data-p210="v1"] .mtle-feature-chip-v3:hover {
  background: var(--p210-card-body-bg-hi);
  border-color: rgba(143,192,255,0.35);
  transform: translateY(-1px);
}
html[data-p210="v1"] .mtle-feature-chip-v3:focus-visible {
  outline: none;
  box-shadow: var(--p208-focus-ring);
  border-color: var(--p210-card-border-hi);
}
html[data-p210="v1"] .mtle-feature-chip-v3[aria-pressed="true"],
html[data-p210="v1"] .mtle-feature-chip-v3.active {
  background: linear-gradient(180deg, rgba(94,160,255,0.20), rgba(94,160,255,0.06));
  border-color: var(--p210-card-border-hi);
  box-shadow: 0 0 0 3px rgba(94,160,255,0.18), 0 4px 10px -4px rgba(94,160,255,0.55);
}
html[data-p210="v1"] .mtle-feature-chip-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--p210-card-thumb-bg);
  border: 1px solid var(--p210-stage-paper-edge);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--p210-ink-1);
}
html[data-p210="v1"] .mtle-feature-chip-icon svg {
  width: 18px; height: 18px; display: block;
}
html[data-p210="v1"] .mtle-feature-chip-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
html[data-p210="v1"] .mtle-feature-chip-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--p210-card-title);
  letter-spacing: 0.2px;
}
html[data-p210="v1"] .mtle-feature-chip-desc {
  font-size: 10.5px;
  color: var(--p210-card-desc);
  line-height: 1.25;
}
/* Phase 210.3 — Step 3 features are MULTI-select, so the v3 chips
 * surface a real toggle switch on the right instead of a
 * check-badge. Semantics now mirror the user's mental model:
 *   - multi-select (features)     → toggle switch per row
 *   - single-select (Step 4 style) → illustrated card + check badge
 * The whole chip is still one click target; the toggle is purely
 * a visual affordance and is `pointer-events: none` so a click
 * anywhere on the row still counts. */
html[data-p210="v1"] .mtle-feature-toggle-v3 {
  width: 34px; height: 20px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.16);
  position: relative;
  display: inline-block;
  transition: background 0.15s ease, border-color 0.15s ease;
  pointer-events: none;
  flex-shrink: 0;
}
html[data-p210="v1"] .mtle-feature-toggle-v3::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 999px;
  background: #e5e8ef;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
  transition: transform 0.16s ease, background 0.15s ease;
}
html[data-p210="v1"] .mtle-feature-chip-v3[aria-pressed="true"] .mtle-feature-toggle-v3,
html[data-p210="v1"] .mtle-feature-chip-v3.active .mtle-feature-toggle-v3 {
  background: var(--p210-card-check);
  border-color: var(--p210-card-check);
  box-shadow: 0 0 8px rgba(94,160,255,0.35);
}
html[data-p210="v1"] .mtle-feature-chip-v3[aria-pressed="true"] .mtle-feature-toggle-v3::after,
html[data-p210="v1"] .mtle-feature-chip-v3.active .mtle-feature-toggle-v3::after {
  transform: translateX(13px);
  background: #ffffff;
}

/* Hide the Phase 209 cloned mirror chips (they also render their
 * own legacy `.toggle-switch` child because they're clones of the
 * canonical `.feature-item`). Only the v3 chip should read for
 * customers; click-forwarding still keeps state in sync. */
html[data-p210="v1"] .p209-feature-group-chips [data-p209-mirror-of]:not(.mtle-feature-chip-v3) {
  display: none !important;
}

/* Hide the Phase 209 mirror clones (which still contain .toggle-switch
 * children because they clone the canonical .feature-item) while the
 * v3 chips are rendered. The p210 JS hides them itself too. */
html[data-p210="v1"] .p209-feature-group-chips [data-p209-mirror-of]:not(.mtle-feature-chip-v3) {
  display: none !important;
}

/* ---------- Step 3 road-detail segmented row polish ---------- */
html[data-p210="v1"] .segment-group {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--p210-card-border);
  border-radius: 999px;
  padding: 4px;
  display: inline-flex;
  gap: 2px;
}
html[data-p210="v1"] .segment-group .segment-btn {
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  padding: 6px 14px;
  font-weight: 600;
}
html[data-p210="v1"] .segment-group .segment-btn.active {
  background: linear-gradient(180deg, rgba(94,160,255,0.22), rgba(94,160,255,0.08));
  color: var(--p208-accent-strong);
  border-color: rgba(94,160,255,0.40);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset;
}

/* ---------- Design Preview stage (product-mockup intent) ---------- */
/* Phase 210.4 — stronger stage gradient reads as a real graphite floor
 * with a centered overhead spotlight and a defined "desk edge" at the
 * bottom.  The bottom vignette is what sells the paper-on-floor depth
 * that the previous pass was missing. */
html[data-p210="v1"] #preview-panel .preview-area {
  background-color: var(--p210-stage-floor-0);
  background-image:
    radial-gradient(1600px 900px at 50% -10%, rgba(120,170,255,0.10), transparent 60%),
    radial-gradient(1400px 900px at 18% 120%, rgba(0,0,0,0.70), transparent 58%),
    radial-gradient(1400px 900px at 100% 100%, rgba(92,160,255,0.08), transparent 55%),
    linear-gradient(180deg, var(--p210-stage-floor-1) 0%, var(--p210-stage-floor-0) 60%, #000 100%);
}

/* Phase 210.4 — vignette the canvas around the paper so the paper
 * reads as a floating product sample. The dark corner falloff is
 * entirely inside the canvas box (so it survives the viewer's
 * overflow: hidden) and combined with the paper's own ink-border +
 * inner-highlight + cast-shadow below the paper it adds clear depth
 * beyond just a background-color change. */
html[data-p210="v1"] #preview-panel[data-p210-display-mode="design_preview"] .mte-pv-canvas {
  background:
    radial-gradient(68% 80% at 50% 48%, rgba(255,255,255,0) 55%, rgba(0,0,0,0.32) 95%),
    linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.38) 100%);
}
html[data-p210="v1"] #preview-panel[data-p210-display-mode="design_preview"] .mte-pv-svg-host {
  overflow: visible;
}
html[data-p210="v1"] #preview-panel[data-p210-display-mode="design_preview"] .mte-pv-svg-host svg {
  background:
    radial-gradient(120% 140% at 50% 0%, var(--p210-stage-paper-hi) 0%, var(--p210-stage-paper) 55%, var(--p210-stage-paper-lo) 100%) !important;
  /* Phase 210.6 — single cheap box-shadow pair instead of a triple
   * drop-shadow filter stack.  On large preview SVGs (600KB+), the
   * triple filter cost 50-150ms per paint and visibly slowed feature
   * toggling.  Box-shadow on an element is a fraction of the cost
   * and still reads as a floating paper sample because the stage
   * vignette already darkens the corners around the paper. */
  box-shadow:
    0 0 0 1px var(--p210-stage-paper-edge),
    0 6px 14px rgba(0,0,0,0.50),
    0 28px 40px -12px rgba(0,0,0,0.55),
    inset 0 0 0 2px rgba(255,255,255,0.18),
    inset 0 -10px 28px rgba(115, 85, 42, 0.14) !important;
  border-radius: 6px !important;
}

/* Phase 210.2 — override the Phase 208 `rect[data-role*="canvas"]`
 * basswood repaint inside Design Preview. Without this override the
 * inner canvas rect stays painted with `var(--p208-paper)` (basswood
 * tan), which covers the whole visible paper face and makes the
 * Design Preview read as a yellow wood slab. Force it to the
 * p210 warm-ivory body so the paper reads as warm printed paper. */
html[data-p210="v1"] #preview-panel[data-p210-display-mode="design_preview"]
  .mte-pv-svg-host svg rect[data-role*="canvas"] {
  fill: var(--p210-stage-paper) !important;
}

/* Phase 210.3 — move the "Your Map" title plaque to the bottom-
 * right corner so it sits diagonally opposite the north arrow
 * (which is top-right) and doesn't crowd the scale/confidence
 * region that Phase 210.3 also hides. */
html[data-p210="v1"] #preview-panel[data-p210-display-mode="design_preview"] .p209-dp-plaque {
  top: auto;
  left: auto;
  right: clamp(24px, 5vw, 64px);
  bottom: clamp(56px, 9vw, 100px);
  transform: none;
  padding: 8px 18px 10px;
  background: linear-gradient(180deg, #faf3de, #e7dcc1);
  border: 1px solid var(--p210-stage-paper-edge);
  box-shadow:
    0 4px 10px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.55);
  min-width: 180px;
  text-align: left;
  color: var(--p210-ink-0);
  border-radius: 4px;
}
html[data-p210="v1"] #preview-panel[data-p210-display-mode="design_preview"] .p209-dp-plaque .p209-dp-plaque-sub {
  text-align: left;
  color: var(--p210-ink-2);
}

/* Phase 210.6 — hide the Design Preview decorative chrome entirely
 * (plaque, north arrow, scale, confidence, corner ticks).  The
 * previous passes kept the plaque bottom-right and the north arrow
 * top-right, but at review the plaque competed with the real map
 * labels and the north arrow felt decorative rather than
 * informative.  Everything stays in the DOM so Phase 209 test IDs
 * still resolve; just CSS-hidden so the paper sample reads clean. */
html[data-p210="v1"] #preview-panel[data-p210-display-mode="design_preview"] .p209-dp-scale,
html[data-p210="v1"] #preview-panel[data-p210-display-mode="design_preview"] .p209-dp-confidence,
html[data-p210="v1"] #preview-panel[data-p210-display-mode="design_preview"] .p209-dp-plaque,
html[data-p210="v1"] #preview-panel[data-p210-display-mode="design_preview"] .p209-dp-north,
html[data-p210="v1"] #preview-panel[data-p210-display-mode="design_preview"] .p209-dp-corner-tick {
  display: none !important;
}

/* Phase 210.5 — unified "Water Topology Style" card. The legacy
 * #reliefContoursCard stays in the DOM (its Phase 196 testids +
 * state setters remain valid) but is visually folded into the
 * #waterLookCard so the customer sees ONE card with six options:
 *   Plain / Nautical / Coastal / Lake Depth / Terrain / Land+Water
 * The underlying state model (state.waterLook + state.terrainMode)
 * is unchanged — selecting one of the six dispatches the correct
 * pair of apply_* calls. */
html[data-p210="v1"] #reliefContoursCard { display: none !important; }
/* Water-advanced toggle + advanced body + probe status still live
 * inside the water card; keep them visible below the unified grid. */
html[data-p210="v1"] #waterTreatmentInfo { display: none !important; }
/* When a Relief option (Lake Depth / Terrain / Land+Water) is active,
 * dim the 3 water-look cards so the UI reflects that the topology
 * pick supersedes the water-look pick.  Still clickable — a click on
 * a dimmed water-look card resets relief → 'none' via the existing
 * applyWaterLook path. */
html[data-p210="v1"] .water-look-pill.p210-topology-dim {
  opacity: 0.55;
}
html[data-p210="v1"] .water-look-pill.p210-topology-dim:hover {
  opacity: 0.85;
}

/* The unified grid holds all six buttons; promotedStyleCards paints
 * them into #waterLookPills (as new children appended after the
 * original 3 water-look pills).  Use a 3-col grid. */
html[data-p210="v1"] #waterLookPills {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1280px) {
  html[data-p210="v1"] #waterLookPills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  html[data-p210="v1"] #waterLookPills { grid-template-columns: 1fr; }
}

/* North arrow — slightly larger + more tasteful shadow. */
html[data-p210="v1"] #preview-panel[data-p210-display-mode="design_preview"] .p209-dp-north {
  top: clamp(20px, 4vw, 40px);
  right: clamp(22px, 4vw, 44px);
  width: 48px;
  height: 48px;
  color: var(--p210-ink-0);
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.45));
}

/* Corner ticks — raise opacity slightly and move them inward so the
 * stage reads intentional, not debug-y. */
html[data-p210="v1"] #preview-panel[data-p210-display-mode="design_preview"] .p209-dp-corner-tick {
  width: 18px; height: 18px;
  border-width: 2px;
  opacity: 0.55;
  border-color: rgba(255,255,255,0.28);
}

/* Replace the white "Need to move the map?" banner with a dark pill
 * that sits inside the preview header, not a full-width band. */
html[data-p210="v1"] #reviewLocationHint {
  display: none !important;
}
html[data-p210="v1"] .mtle-stage-hint-pill {
  display: none;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--p210-card-border);
  color: var(--text-secondary);
  padding: 3px 10px 4px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.2px;
  margin-left: 10px;
}
html[data-p210="v1"] .mtle-stage-hint-pill.visible { display: inline-flex; }
html[data-p210="v1"] .mtle-stage-hint-pill a {
  color: var(--p208-accent-strong);
  font-weight: 600;
  text-decoration: none;
}
html[data-p210="v1"] .mtle-stage-hint-pill a:hover { text-decoration: underline; }

/* Phase 209 display-mode pills — softer mockup-faithful look. */
html[data-p210="v1"] .p209-display-mode-row {
  padding: 10px 18px;
}
html[data-p210="v1"] .p209-display-mode-group {
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--p210-card-border);
}
html[data-p210="v1"] .p209-dm-btn {
  font-size: 11.5px;
  padding: 5px 14px;
  letter-spacing: 0.2px;
}
html[data-p210="v1"] .p209-dm-btn.active {
  background: linear-gradient(180deg, #1a2f54, #16243f);
  color: #eaf2ff;
  border-color: rgba(143,192,255,0.50);
  box-shadow: 0 2px 8px rgba(94,160,255,0.25), inset 0 0 0 1px rgba(143,192,255,0.24);
}

/* Linework Review (Phase 239 rename of "Cut Plot"): kill the Design
 * Preview stage chrome + remap the paper so the operator sees the
 * layer linework on plain white paper for high-contrast visual
 * review.  The final ZIP is production truth; this view is for
 * visual review only. */
html[data-p210="v1"] #preview-panel[data-p210-display-mode="cut_plot"] .p209-design-preview-shell,
html[data-p210="v1"] #preview-panel[data-p210-display-mode="assembly_2p5d"] .p209-design-preview-shell {
  display: none !important;
}
html[data-p210="v1"] #preview-panel[data-p210-display-mode="design_preview"] .p209-design-preview-shell {
  display: block !important;
}
/* When p210 is live, it owns the Design Preview paper repaint; the
 * Phase 208 canvas-rect rule must not leak into Linework Review even
 * with `data-p210-display-mode="cut_plot"` because Phase 208 keyed
 * off Phase 209's attribute. Force white paper + no chrome in
 * cut_plot. */
html[data-p210="v1"] #preview-panel[data-p210-display-mode="cut_plot"] .mte-pv-svg-host svg {
  background: #ffffff !important;
  border-radius: 3px !important;
  box-shadow:
    0 18px 40px -20px rgba(0,0,0,0.55),
    0 2px 4px rgba(0,0,0,0.30),
    0 0 0 1px #c7c7c7 !important;
}
html[data-p210="v1"] #preview-panel[data-p210-display-mode="cut_plot"]
  .mte-pv-svg-host svg rect[data-role*="canvas"] {
  fill: #ffffff !important;
}

/* ---------- Step 5 receipt — v3 polish ---------- */
html[data-p210="v1"] .p209-receipt {
  border-radius: 16px;
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 14px 32px -18px rgba(0,0,0,0.70);
}
html[data-p210="v1"] .p209-receipt-head {
  padding: 18px 20px 14px;
}
html[data-p210="v1"] .p209-zip-include-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border-radius: 10px;
}
html[data-p210="v1"] .p209-piece-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border-radius: 12px;
}

/* ---------- Customer status pill inherits the v3 softer style ---------- */
html[data-p210="v1"] .p209-customer-status {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.11);
  padding: 5px 12px;
}
