/* ============================================================
   Foreman — results screen styles
   Phone-first (390 px), centered on a laptop up to 480 px wide.
   Dark charcoal + safety orange, big glove-friendly targets.
   No internet fonts or links anywhere.
   ============================================================ */

/* --- Base setup: dark theme, roomy text, no sideways scrolling --- */
* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: #1b1d21; /* dark charcoal */
  color: #f5f6f8;      /* near-white text for high contrast outdoors */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 18px;     /* body text stays at least 18 px */
  line-height: 1.45;
  min-height: 100vh;
  overflow-x: clip;    /* safety net: never any horizontal scrolling */
}

/* Easy-to-see focus ring for keyboard users */
:focus-visible { outline: 3px solid #ff7a1a; outline-offset: 2px; }

/* --- Pinned top bar (stays at the top while scrolling) --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #23262c;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* Keep the bar's contents at the same width as the page below */
.topbar-inner {
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.topbar-buttons { display: flex; gap: 8px; flex: 1; min-width: 0; }

/* Big orange action buttons — at least 56 px tall for gloves */
.action-btn {
  flex: 1;
  min-height: 56px;
  border: none;
  border-radius: 12px;
  background: #ff7a1a; /* safety orange */
  color: #1b1d21;      /* dark text on orange = high contrast */
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.action-btn:active { background: #e56a0f; }

/* When the corner handle hides the buttons, this whole group disappears */
body.hide-buttons .topbar-buttons { display: none; }

/* --- Page column: centered, max 480 px on a laptop --- */
.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 14px 96px; /* extra bottom room so the corner handle never covers content */
}

/* Card look shared by the drawing, total and sections */
.card {
  background: #23262c;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* --- Drawing card (inline SVG built by app.js) --- */
.drawing-card { padding: 14px; margin-bottom: 16px; }
.drawing-card svg { display: block; width: 100%; height: auto; }

/* --- Title block under the drawing --- */
.title-block { margin: 0 2px 16px; }
.title-block h1 { margin: 0 0 4px; font-size: 27px; line-height: 1.2; }
.size-line { margin: 0; color: #aab0ba; font-size: 18px; }

/* --- Big total card with tags next to it --- */
.total-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.total-value {
  font-size: clamp(52px, 17vw, 68px); /* very large price */
  font-weight: 800;
  color: #ff7a1a;                     /* safety orange total */
  line-height: 1;
}

.total-note { margin-top: 6px; font-size: 14px; color: #aab0ba; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 122, 26, 0.14);
  border: 1px solid rgba(255, 122, 26, 0.45);
  color: #ffb073;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

/* --- Tap-to-expand sections (accordion, one open at a time) --- */
.section { margin-bottom: 12px; overflow: hidden; }

/* Section header is a big button — above the 56 px glove minimum */
.section-header {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  background: none;
  border: none;
  color: #f5f6f8;
  font-size: 19px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.section-count { margin-left: 8px; color: #ff7a1a; font-size: 16px; font-weight: 600; }

/* Chevron flips when the section opens */
.chevron { color: #aab0ba; font-size: 20px; transition: transform 0.28s ease; }
.section.open .chevron { transform: rotate(180deg); }

/* Smooth open/close: animate the grid row from 0fr to 1fr */
.section-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.28s ease; }
.section.open .section-body { grid-template-rows: 1fr; }

/* Inner wrapper clips the content while it animates shut */
.section-body-inner { overflow: hidden; min-height: 0; }

/* Padding lives one level deeper so a closed section collapses to zero height */
.section-content { padding: 2px 14px 8px; }

/* --- Rows inside sections (materials, cut list, tools) --- */
.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  font-size: 18px;
}

.row + .row { border-top: 1px solid rgba(255, 255, 255, 0.07); }

.row-name { flex: 1; min-width: 0; } /* long names wrap instead of pushing sideways */
.row-qty { color: #aab0ba; white-space: nowrap; }
.row-price { font-weight: 700; white-space: nowrap; }

/* Cut list rows have a small note under the piece name */
.cut-note { display: block; margin-top: 2px; font-size: 15px; color: #aab0ba; }

/* Tools get a little orange square as a bullet */
.tool-row { align-items: center; }
.tool-dot { width: 10px; height: 10px; border-radius: 3px; background: #ff7a1a; flex: none; }

/* --- Numbered steps --- */
.step-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; font-size: 18px; }
.step-row + .step-row { border-top: 1px solid rgba(255, 255, 255, 0.07); }

.step-num {
  width: 34px;
  height: 34px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 122, 26, 0.18);
  color: #ffb073;
  font-weight: 700;
}

/* --- Corner handle (always visible, never hides itself) --- */
.corner-handle {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: 58px;   /* above the 56 px glove minimum */
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: #ff7a1a;
  color: #1b1d21;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  z-index: 60;
}
.corner-handle:active { background: #e56a0f; }

/* --- Toast message ("Coming soon") --- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 88px; /* sits above the corner handle, never under it */
  transform: translateX(-50%) translateY(8px);
  padding: 10px 18px;
  border-radius: 999px;
  background: #2c313a;
  border: 1px solid rgba(255, 122, 26, 0.5);
  color: #f5f6f8;
  font-size: 16px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none; /* never blocks taps */
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 70;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Respect people who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  .section-body, .chevron, .toast { transition: none; }
}

/* ============================================================
   Job 2 — setup screen + back button + board plan
   ============================================================ */

/* --- "← Change size" button at the top of the results --- */
.back-btn {
  min-height: 56px;
  margin-bottom: 12px;
  padding: 0 18px;
  border: 1px solid rgba(255, 122, 26, 0.55);
  border-radius: 12px;
  background: transparent;
  color: #ffb073;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.back-btn:active { background: rgba(255, 122, 26, 0.14); }

/* --- Live price preview at the top of the setup screen --- */
.preview-card { padding: 16px; margin-bottom: 16px; }
.preview-total {
  font-size: clamp(44px, 14vw, 56px);
  font-weight: 800;
  color: #ff7a1a;
  line-height: 1;
}
.preview-size { margin-top: 8px; font-size: 18px; font-weight: 600; }

/* --- The card holding all the choices --- */
.setup-card { padding: 6px 14px 14px; margin-bottom: 16px; }
.field { padding-top: 14px; }
.field + .field { border-top: 1px solid rgba(255, 255, 255, 0.07); margin-top: 14px; }
.field-label { margin-bottom: 10px; font-size: 19px; font-weight: 700; }

/* --- +/- stepper: two big square buttons with the value between --- */
.stepper { display: flex; align-items: center; gap: 12px; }
.step-btn {
  width: 64px;
  height: 64px;
  flex: none;
  border: none;
  border-radius: 14px;
  background: #ff7a1a;
  color: #1b1d21;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.step-btn:active { background: #e56a0f; }
.step-btn:disabled { background: #3a3f48; color: #6b717c; cursor: default; }
.step-value { flex: 1; text-align: center; font-size: 30px; font-weight: 800; }

/* --- One-tap choice buttons (height and skill) --- */
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choice-btn {
  min-height: 72px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: #2c313a;
  color: #f5f6f8;
  cursor: pointer;
}
.choice-btn.selected { border-color: #ff7a1a; background: rgba(255, 122, 26, 0.18); }
.choice-main { font-size: 17px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.choice-sub { font-size: 14px; color: #aab0ba; line-height: 1.2; text-align: center; }
.choice-btn.selected .choice-sub { color: #ffb073; }

/* --- Big "Build my plan" button --- */
.build-btn {
  width: 100%;
  min-height: 64px;
  border: none;
  border-radius: 14px;
  background: #ff7a1a;
  color: #1b1d21;
  font-size: 21px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.build-btn:active { background: #e56a0f; }

/* --- Cut list: heading above the board-by-board plan --- */
.board-plan-title {
  margin-top: 8px;
  padding: 12px 0 4px;
  border-top: 1px solid rgba(255, 122, 26, 0.35);
  color: #ffb073;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.board-plan-title + .row { border-top: none; }

/* --- Top bar fix: on small phones (360 px) the Save button stuck out the side --- */
.action-btn { min-width: 0; padding: 0 6px; }
.logo { font-size: clamp(16px, 4.6vw, 19px); }

/* --- Skill level: one full-width button per line so long words never break --- */
.choice-grid.stacked { grid-template-columns: 1fr; }
.choice-grid.stacked .choice-btn {
  min-height: 60px;
  flex-direction: row;
  justify-content: space-between;
  padding: 8px 16px;
}

/* ============================================================
   Job 3 — to-scale drawing on the setup screen
   ============================================================ */
/* Fixed-size box so the buttons below never jump as the bed changes shape;
   the drawing is scaled to fit inside it */
.preview-drawing { aspect-ratio: 2 / 1; margin: -4px -4px 12px; }
.preview-drawing svg { display: block; width: 100%; height: 100%; }

/* ============================================================
   Job 4 — Build mode (one big step at a time)
   ============================================================ */
/* "Start building" sits between the total and the sections */
.start-build { margin-bottom: 16px; }

/* "Step 2 of 5" and the segmented progress bar */
.build-count { margin: 4px 2px 8px; color: #aab0ba; font-size: 17px; font-weight: 700; }
.build-bar { display: flex; gap: 6px; margin-bottom: 16px; }
.build-bar .seg { flex: 1; height: 8px; border-radius: 999px; background: #3a3f48; }
.build-bar .seg.done { background: #ff7a1a; }
.build-bar .seg.now { background: #ffb073; }

/* The step card: big number, title, instruction, tip */
.build-card { padding: 18px 16px; margin-bottom: 14px; }
.build-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.build-head h1 { margin: 0; font-size: 26px; line-height: 1.2; }
.build-num {
  width: 48px;
  height: 48px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ff7a1a;
  color: #1b1d21;
  font-size: 24px;
  font-weight: 800;
}
.build-text { margin: 0; font-size: 21px; line-height: 1.5; }
.build-tip {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 4px solid #ff7a1a;
  border-radius: 8px;
  background: rgba(255, 122, 26, 0.12);
  font-size: 18px;
}
.build-tip strong { color: #ffb073; }

/* Fat Back / Next buttons for gloves */
.build-nav { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-bottom: 16px; }
.nav-btn {
  min-height: 72px;
  border-radius: 14px;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}
.nav-btn.prev { border: 2px solid rgba(255, 255, 255, 0.18); background: #2c313a; color: #f5f6f8; }
.nav-btn.next { border: none; background: #ff7a1a; color: #1b1d21; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.nav-btn.next:active { background: #e56a0f; }
.nav-btn:disabled { opacity: 0.35; cursor: default; }

/* "For this step" list and tool chips */
.build-needs { padding: 4px 14px 14px; margin-bottom: 12px; }
.build-needs .board-plan-title { margin-top: 4px; border-top: none; }
.build-tools { margin-top: 12px; }
.build-awake { text-align: center; }

/* The "Bed built!" card at the end */
.build-done { text-align: center; padding: 28px 16px; }
.build-done h1 { margin: 8px 0 4px; font-size: 30px; }
.done-check {
  width: 76px;
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ff7a1a;
  color: #1b1d21;
  font-size: 42px;
  font-weight: 800;
}

/* ============================================================
   Job 5 — Save on this phone + "Your saved plan" card
   ============================================================ */
.resume-card { padding: 4px 16px 16px; margin-bottom: 16px; border-color: rgba(255, 122, 26, 0.45); }
.resume-card .board-plan-title { margin-top: 4px; border-top: none; }
.resume-size { font-size: 20px; font-weight: 700; }
.resume-go { margin-top: 14px; }
.resume-clear {
  width: 100%;
  min-height: 56px;
  margin-top: 8px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #aab0ba;
  font-size: 17px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.resume-clear.armed { color: #ffb073; background: rgba(255, 122, 26, 0.12); text-decoration: none; }

/* ============================================================
   Job 6 — Print: a one-page paper copy of the plan
   Hidden on screen. When printing, it is the ONLY thing shown.
   ============================================================ */
.print-sheet { display: none; }

@media print {
  @page { size: auto; margin: 12mm; }
  html, body { background: #fff !important; color: #000 !important; }
  body > *:not(.print-sheet) { display: none !important; }
  .print-sheet { display: block; font: 10pt/1.3 Arial, Helvetica, sans-serif; color: #000; }
  .print-top { display: flex; align-items: flex-start; gap: 16px; }
  .print-head { flex: 1; min-width: 0; }
  .print-brand { font-size: 9pt; letter-spacing: 0.04em; text-transform: uppercase; }
  .print-sheet h1 { margin: 2px 0; font-size: 20pt; line-height: 1.15; }
  .print-size { margin: 0; font-size: 13pt; font-weight: 700; }
  .print-meta { margin: 2px 0 0; font-size: 9.5pt; }
  .print-drawing { width: 58mm; flex: none; }
  .print-drawing svg { display: block; width: 100%; height: auto; }
  .print-drawing text { fill: #000; }
  .print-sheet h2 {
    margin: 9px 0 3px;
    padding-bottom: 2px;
    border-bottom: 2px solid #000;
    font-size: 12pt;
    break-after: avoid;
  }
  .print-table { width: 100%; border-collapse: collapse; }
  .print-table th, .print-table td { padding: 1.5px 5px; border-bottom: 1px solid #999; text-align: left; vertical-align: top; }
  .print-table th { font-size: 9pt; border-bottom: 1.5px solid #000; }
  .print-table tr { break-inside: avoid; }
  .print-shop td:first-child, .print-boards td:first-child { width: 14px; font-size: 11pt; line-height: 1; }
  .print-shop td:nth-child(n+3), .print-shop th:nth-child(n+3) { text-align: right; white-space: nowrap; }
  .print-total td { border-bottom: none; border-top: 1.5px solid #000; font-weight: 700; text-align: right; }
  .print-note { margin: 4px 0 0; font-size: 9.5pt; }
  .print-cols { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; }
  .print-boards td:nth-child(2), .print-boards td:nth-child(4) { white-space: nowrap; }
  .print-tools { margin: 2px 0 0; white-space: pre-wrap; }
  .print-steps { margin: 0; padding-left: 20px; }
  .print-steps li { margin: 0 0 3px; break-inside: avoid; }
  .print-tip { display: block; font-size: 9pt; font-style: italic; }
  .print-foot { margin: 8px 0 0; padding-top: 4px; border-top: 1px solid #999; font-size: 8.5pt; }
}

/* ============================================================
   Job 8 — See a shelf on your wall (full-screen camera view)
   ============================================================ */
body.on-wall { overflow: hidden; }
body.on-wall .toast { top: 118px; bottom: auto; z-index: 130; }

/* --- Entry button on the setup screen --- */
.wall-entry {
  width: 100%;
  min-height: 64px;
  margin: 0 0 16px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  border: 2px solid #ff7a1a;
  border-radius: 16px;
  background: rgba(255, 122, 26, 0.12);
  color: #f5f6f8;
  text-align: left;
  cursor: pointer;
}
.wall-entry-main { font-size: 20px; font-weight: 800; }
.wall-entry-sub { font-size: 15px; color: #ffb073; }

/* --- The full-screen view: picture fills it, controls float on top --- */
.wall-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  overflow: hidden;
  touch-action: none; /* dragging the shelf must not scroll or zoom the page */
}
.wall-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wall-view [hidden] { display: none !important; }
.wall-off { display: none !important; }

/* --- Top bar: Close, Set size, Freeze, Save --- */
.wall-top-wrap { position: absolute; top: 0; left: 0; right: 0; padding: 10px 10px 0; pointer-events: none; }
.wall-top { display: flex; gap: 8px; pointer-events: auto; }
.wall-btn {
  flex: 1;
  min-height: 56px;
  border: none;
  border-radius: 12px;
  background: rgba(35, 38, 44, 0.88);
  color: #f5f6f8;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.wall-btn:active { background: #ff7a1a; color: #1b1d21; }
.wall-close { flex: none; width: 56px; font-size: 22px; }
.wall-status {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 122, 26, 0.92);
  color: #1b1d21;
  font-size: 15px;
  font-weight: 700;
}
.wall-status.wall-good { background: rgba(35, 38, 44, 0.85); color: #9be29b; }

/* --- First card: where the picture comes from --- */
.wall-start {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 460px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wall-start h1 { margin: 0; font-size: 26px; line-height: 1.2; }
.wall-start .size-line { margin-bottom: 6px; }
.wall-big {
  width: 100%;
  min-height: 56px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: #2c313a;
  color: #f5f6f8;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.wall-big:active { border-color: #ff7a1a; }
.wall-msg { margin: 0; color: #ffb073; font-size: 16px; }
.wall-msg:empty { display: none; }

/* --- Bottom panel: shelf controls (scrolls if the screen is short) --- */
.wall-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 48vh;
  overflow-y: auto;
  padding: 10px 12px 14px;
  background: rgba(27, 29, 33, 0.94);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.45);
}
.wall-panel > * { max-width: 480px; margin-left: auto; margin-right: auto; }
.wall-panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.wall-summary { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; line-height: 1.3; }
.wall-hide {
  min-height: 48px;
  padding: 0 14px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: transparent;
  color: #f5f6f8;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.wall-steppers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wall-field { min-width: 0; }
.wall-label { margin-bottom: 4px; color: #aab0ba; font-size: 15px; font-weight: 700; }
.wall-stepper { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wall-stepper .step-value { grid-column: 1 / -1; grid-row: 1; font-size: 22px; line-height: 1.2; }
.wall-stepper .step-btn { width: 100%; height: 52px; font-size: 30px; }
.wall-chips { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.wall-chips .choice-btn { min-height: 56px; padding: 6px 2px; }
.wall-chips .choice-main { font-size: 16px; }
.wall-chips .choice-sub { font-size: 12px; }
.wall-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.5); }

/* --- Tabs: Size, Board, Style, Wood --- */
.wall-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.wall-tabbtn {
  min-height: 48px;
  border: none;
  border-radius: 12px;
  background: #2c313a;
  color: #aab0ba;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.wall-tabbtn.selected { background: #3a3f48; color: #f5f6f8; box-shadow: inset 0 -3px 0 #ff7a1a; }

/* --- The tab that brings the panel back (always there when the panel is hidden) --- */
.wall-tab {
  position: absolute;
  right: 14px;
  bottom: 14px;
  min-height: 56px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: #ff7a1a;
  color: #1b1d21;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

/* --- Set size: measuring panel and the two orange dots --- */
.wall-measure-text { margin: 0 0 8px; font-size: 16px; }
.wall-measure .wall-chips { margin-bottom: 8px; }
.wall-custom { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.wall-custom .step-btn { width: 56px; height: 56px; }
.wall-custom .step-value { font-size: 24px; }
.wall-measure-btns { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; }
.wall-measure-btns .build-btn, .wall-measure-btns .wall-big { min-height: 56px; }
.wall-dot {
  position: absolute;
  left: -28px;
  top: -28px;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 4px solid #fff;
  border-radius: 50%;
  background: rgba(255, 122, 26, 0.55);
  box-shadow: 0 0 0 2px #ff7a1a, 0 4px 12px rgba(0, 0, 0, 0.5);
  touch-action: none;
  cursor: grab;
}
.wall-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #fff;
}

/* ============================================================
   Job 8F — Camera button in the top bar (4 buttons)
   The logo goes on two lines so all 4 buttons stay big enough
   for gloves on a phone.
   ============================================================ */
.topbar-buttons { gap: 6px; }
.action-btn { min-width: 0; padding: 0 2px; font-size: clamp(14px, 3.9vw, 18px); }
.logo { white-space: normal; width: 5.4em; line-height: 1.15; font-size: 15px; }
/* First wall card: only the ✕ Close button shows up top */
.wall-starting .wall-btn:not(.wall-close), .wall-starting .wall-status { display: none; }

/* ============================================================
   Job 9 — Shelf plan
   The "Build this shelf" button in the wall panel, and the
   skill level chips on a shelf plan.
   ============================================================ */
.wall-build { margin-top: 10px; min-height: 56px; font-size: 19px; }
.shelf-skill { padding: 12px 14px 14px; margin-bottom: 16px; }
.shelf-skill .choice-btn { min-height: 52px; padding: 6px 2px; }
.shelf-skill .choice-main { font-size: clamp(13px, 3.9vw, 16px); overflow-wrap: normal; }

/* ============================================================
   Job 10 — Paint the wall
   Full-screen paint view reuses the wall-* look; these are the
   color swatches, the spread slider and the entry button.
   ============================================================ */
.paint-entry { border-color: #5fb3a8; background: rgba(95, 179, 168, 0.12); }
.paint-entry .wall-entry-sub { color: #9fd9d1; }
.paint-view .wall-canvas { touch-action: none; }
.paint-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.paint-panel { max-height: 46vh; }
.paint-swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.paint-swatch {
  position: relative;
  aspect-ratio: 1;
  min-height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
}
.paint-swatch.selected { border-color: #ff7a1a; box-shadow: 0 0 0 2px #1b1d21, 0 0 0 4px #ff7a1a; }
.paint-any {
  display: flex; align-items: center; justify-content: center;
  background: conic-gradient(#e44, #ec4, #4c6, #4ce, #46e, #c4e, #e44);
  color: #fff; font-size: 24px; font-weight: 800; text-shadow: 0 1px 3px #000;
}
.paint-any input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.paint-spread { margin-bottom: 10px; }
.paint-spread input[type="range"] { width: 100%; height: 36px; accent-color: #ff7a1a; }
.paint-hint { color: #aab0ba; font-size: 14px; line-height: 1.35; margin-top: 4px; }
.paint-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.paint-actions .wall-big:disabled { opacity: 0.45; }
.paint-gap { margin-top: 10px; }
.paint-sizebox .wall-steppers + .wall-steppers { margin-top: 8px; }
.paint-dot { display: inline-block; vertical-align: -5px; }
@media print { .print-cols.print-one { grid-template-columns: 1fr; } }

/* ============================================================
   Job 11 — Start screen: "What do you want to build?"
   ============================================================ */
.ask-form { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 10px; }
.ask-input {
  width: 100%;
  min-height: 60px;
  padding: 0 16px;
  border: 2px solid #3a3f48;
  border-radius: 14px;
  background: #23262c;
  color: #f5f6f8;
  font-size: 20px;
  font-family: inherit;
}
.ask-input:focus { border-color: #ff7a1a; outline: none; box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.25); }
.ask-input::placeholder { color: #7d8490; }
.ask-go { margin: 0; }
.ask-hint { min-height: 1.3em; color: #9be29b; font-size: 16px; font-weight: 700; }
.ask-ideas { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ask-idea {
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid #3a3f48;
  border-radius: 999px;
  background: #2c313a;
  color: #d5d9df;
  font-size: 15px;
  cursor: pointer;
}
.home-sub { margin: 6px 2px 10px; border-top: none; }
.project-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 16px; }
.project-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 12px 16px;
  border: 2px solid #3a3f48;
  border-radius: 16px;
  background: #23262c;
  color: #f5f6f8;
  text-align: left;
  cursor: pointer;
}
.project-card.selected { border-color: #ff7a1a; background: rgba(255, 122, 26, 0.14); }
.project-icon { grid-row: 1 / 3; font-size: 34px; text-align: center; }
.project-name { font-size: 20px; font-weight: 800; }
.project-sub { font-size: 15px; color: #aab0ba; }
.soon-card { padding: 4px 16px 12px; }
.soon-card .board-plan-title { border-top: none; }
.soon-list { margin: 0; color: #aab0ba; font-size: 16px; }
.notyet-card { padding: 14px 16px 16px; margin-bottom: 16px; border-color: rgba(255, 176, 115, 0.5); }
.notyet-title { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.notyet-text { margin: 0 0 12px; color: #d5d9df; font-size: 16px; }

/* ============================================================
   Install on this phone (install.js)
   ============================================================ */
.install-card { padding: 14px 16px 16px; margin-bottom: 16px; border-color: rgba(95, 179, 168, 0.5); }
.install-title { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.install-text { margin: 0 0 12px; color: #d5d9df; font-size: 16px; }
.install-btn { margin: 0; }
.install-steps { margin: 12px 0 0; padding-left: 22px; font-size: 17px; line-height: 1.5; }

/* ============================================================
   Start screen v2: project dropdown + "Did you mean…"
   ============================================================ */
.pick-wrap { margin: 4px 0 16px; }
.project-select {
  width: 100%;
  min-height: 60px;
  padding: 0 44px 0 16px;
  border: 2px solid #3a3f48;
  border-radius: 14px;
  background: #23262c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Cpath d='M1 1l7 7 7-7' stroke='%23ff7a1a' stroke-width='2.5' fill='none'/%3E%3C/svg%3E") no-repeat right 16px center;
  color: #f5f6f8;
  font-size: 19px;
  font-weight: 700;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.project-select:focus { border-color: #ff7a1a; outline: none; }
.ask-hint.maybe { color: #ffb073; }
.maybe-btn {
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  margin-bottom: 8px;
  padding: 10px 14px;
  border: 2px solid #3a3f48;
  border-radius: 14px;
  background: #2c313a;
  color: #f5f6f8;
  text-align: left;
  cursor: pointer;
}
.maybe-btn:active { border-color: #ff7a1a; }
.maybe-btn .project-icon { grid-row: 1 / 3; font-size: 30px; text-align: center; }
.maybe-name { font-size: 18px; font-weight: 800; }
.maybe-sub { font-size: 14px; color: #aab0ba; }
.ask-for { margin-top: 4px; }
