:root {
--blue: #2EA3F2; --blue-d: #1C8ED9; --navy: #0E2A44; --ink: #1d2733; --mut: #6b7785; --line: #e3e8ee;
--bg: #f4f7fa; --card: #fff;
--open: #E5533D; --prog: #F2A33A; --done: #2BB673; --photo: #2EA3F2;
--safe-b: env(safe-area-inset-bottom, 0px);
color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink);
font: 15px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

/* header */
#top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; background: var(--blue); color: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.15); }
.brandrow { display: flex; align-items: center; gap: 10px; padding: 8px 12px 4px; padding-top: max(8px, env(safe-area-inset-top)); padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
.logo { height: 30px; width: auto; }
.titles { flex: 1; min-width: 0; }
.app { font-weight: 700; letter-spacing: 3px; font-size: 13px; opacity: .9; }
.proj { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdrbtn { background: rgba(255,255,255,.18); border: 0; color: #fff; padding: 6px 10px; border-radius: 8px; font-size: 13px; text-decoration: none; white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: flex; padding: 0 8px; gap: 4px; }
.tabs button { flex: 1; background: none; border: 0; color: rgba(255,255,255,.75); padding: 8px 0 9px; font-weight: 700; letter-spacing: 2px; font-size: 13px; border-bottom: 3px solid transparent; }
.tabs button.on { color: #fff; border-bottom-color: #fff; }
.badge { background: #fff; color: var(--blue); border-radius: 10px; padding: 0 6px; font-size: 11px; letter-spacing: 0; margin-left: 2px; }
.badge:empty { display: none; }
.filters { display: flex; gap: 6px; align-items: center; padding: 7px 10px; background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chips { display: flex; gap: 4px; flex: none; }
.chips button { border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 4px 11px; font-size: 13px; white-space: nowrap; }
.chips button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.filters select, .filters input[type=search] { border: 1px solid var(--line); border-radius: 16px; padding: 4px 10px; font-size: 13px; background: #fff; flex: none; }
.filters input[type=search] { width: 120px; }
.toggle { font-size: 13px; display: flex; align-items: center; gap: 4px; white-space: nowrap; flex: none; color: var(--mut); }

main { position: fixed; left: 0; right: 0; bottom: 0; top: var(--hdr, 140px); }
.view { position: absolute; inset: 0; display: none; }
.view.on { display: block; }

/* plan */
#plan { position: absolute; inset: 0; overflow: hidden; touch-action: none; background: #fff; cursor: grab; }
#plan.adding { cursor: crosshair; }
#planInner { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
#planImg { display: block; max-width: none; filter: invert(1) contrast(1.15); user-select: none; -webkit-user-select: none; pointer-events: none; }
#planPins { position: absolute; inset: 0; }
.planctl, .modelctl { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 3; }
.modelctl { flex-direction: row; left: 12px; right: auto; }
.planctl button, .modelctl button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.modelctl button { width: auto; padding: 0 12px; font-size: 13px; font-weight: 600; }
.modelctl button.on { background: var(--blue); color: #fff; border-color: var(--blue); }

/* pins (plan + 3D share these) */
.pin { position: absolute; width: 0; height: 0; z-index: 2; }
.pin .pb { position: absolute; left: -15px; top: -38px; width: 30px; height: 38px; transform-origin: 50% 100%; transform: scale(var(--inv, 1)); cursor: pointer; }
.pin .pb::before { content: ""; position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg) translate(-3px, 3px); background: var(--c); border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,.35); }
.pin .pb span { position: absolute; left: 0; top: 2px; width: 30px; text-align: center; color: #fff; font-weight: 700; font-size: 13px; line-height: 26px; }
.pin.sel .pb::before { box-shadow: 0 0 0 4px rgba(46,163,242,.55), 0 2px 5px rgba(0,0,0,.35); }
.pin.open { --c: var(--open); } .pin.progress { --c: var(--prog); } .pin.done { --c: var(--done); } .pin.photo { --c: var(--photo); }
.cam { position: absolute; width: 0; height: 0; z-index: 1; }
.cam i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: rgba(46,163,242,.9); border: 2px solid #fff; transform: scale(var(--inv, 1)); cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
/* elevation notes shown on the floor plan / 3D: hollow pin in the status colour */
.pin.ext .pb::before { background: #fff; border: 3px solid var(--c); }
.pin.ext .pb span { color: var(--c); }
.ghost .pb { opacity: .85; }
.ghost .pb::before { background: var(--navy); }

/* 3D */
#model { position: absolute; inset: 0; overflow: hidden; touch-action: none; background: linear-gradient(#dfeefa, #f7fafc); }
#glc { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#modelPins { position: absolute; inset: 0; pointer-events: none; }
#modelPins .pin, #modelPins .cam { pointer-events: auto; }
.hint { position: absolute; left: 12px; bottom: calc(12px + var(--safe-b)); right: 90px; font-size: 12px; color: var(--mut); pointer-events: none; }

/* list */
#list { position: absolute; inset: 0; overflow-y: auto; padding: 12px max(12px, env(safe-area-inset-right)) 100px max(12px, env(safe-area-inset-left)); -webkit-overflow-scrolling: touch; }
.room { margin: 4px 2px 8px; font-weight: 700; letter-spacing: 1.5px; font-size: 12px; color: var(--blue-d); text-transform: uppercase; }
.card { display: flex; gap: 10px; background: var(--card); border-radius: 12px; padding: 10px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(14,42,68,.08); cursor: pointer; border-left: 5px solid var(--c); }
.card.open { --c: var(--open); } .card.progress { --c: var(--prog); } .card.done { --c: var(--done); } .card.photo { --c: var(--photo); }
.card .th { width: 74px; height: 74px; border-radius: 8px; background: #e9eef3 center/cover no-repeat; flex: none; display: flex; align-items: center; justify-content: center; color: var(--mut); font-size: 11px; }
.card .ct { flex: 1; min-width: 0; }
.card .t1 { font-weight: 600; overflow-wrap: anywhere; }
.card .t2 { color: var(--mut); font-size: 13px; margin-top: 2px; }
.pill { display: inline-block; border-radius: 10px; padding: 1px 8px; font-size: 11px; font-weight: 700; color: #fff; background: var(--c); letter-spacing: .5px; text-transform: uppercase; }
.pill.open { --c: var(--open); } .pill.progress { --c: var(--prog); } .pill.done { --c: var(--done); } .pill.photo { --c: var(--photo); }
.empty { text-align: center; color: var(--mut); padding: 50px 20px; }

/* add */
#fab { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: calc(20px + var(--safe-b)); width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; font-size: 34px; line-height: 60px; box-shadow: 0 4px 14px rgba(28,142,217,.5); z-index: 15; }
.banner { position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--hdr, 140px) + 12px); z-index: 16; background: var(--navy); color: #fff; padding: 9px 10px 9px 16px; border-radius: 22px; display: flex; gap: 12px; align-items: center; box-shadow: 0 3px 12px rgba(0,0,0,.3); white-space: nowrap; }
.banner button { background: rgba(255,255,255,.18); border: 0; color: #fff; border-radius: 14px; padding: 4px 12px; }

/* sheet */
#sheet { position: fixed; z-index: 30; background: #fff; display: flex; flex-direction: column; box-shadow: 0 -4px 20px rgba(0,0,0,.2); left: 0; right: 0; bottom: 0; max-height: 88vh; border-radius: 16px 16px 0 0; }
@media (min-width: 900px) {
#sheet { left: auto; top: var(--hdr, 140px); bottom: 0; width: 420px; max-height: none; border-radius: 0; box-shadow: -4px 0 20px rgba(0,0,0,.15); }
#fab { right: 24px; }
body.sheet-open #fab { right: 444px; }
}
.sheethead { display: flex; align-items: center; padding: 10px 12px 8px 16px; border-bottom: 1px solid var(--line); position: relative; }
.grip { position: absolute; left: 50%; top: 4px; width: 40px; height: 4px; border-radius: 2px; background: #d5dbe2; transform: translateX(-50%); }
.sheettitle { flex: 1; font-weight: 700; font-size: 17px; padding-top: 4px; overflow-wrap: anywhere; }
.x { border: 0; background: #eef2f6; width: 34px; height: 34px; border-radius: 50%; font-size: 22px; line-height: 34px; padding: 0; color: var(--ink); flex: none; }
.sheetbody { overflow-y: auto; padding: 14px 16px calc(24px + var(--safe-b)); -webkit-overflow-scrolling: touch; }
.fld { margin-bottom: 12px; }
.fld label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .8px; color: var(--mut); text-transform: uppercase; margin-bottom: 4px; }
.fld input, .fld select, .fld textarea { width: 100%; border: 1px solid #cfd8e1; border-radius: 10px; padding: 9px 11px; background: #fff; font-size: 16px; }
.fld textarea { min-height: 70px; resize: vertical; }
.row2 { display: flex; gap: 10px; } .row2 > .fld { flex: 1; min-width: 0; }
.seg { display: flex; border: 1px solid #cfd8e1; border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; border: 0; background: #fff; padding: 9px 4px; font-size: 14px; border-right: 1px solid #cfd8e1; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--blue); color: #fff; font-weight: 600; }
.seg.status button.on[data-s=open] { background: var(--open); }
.seg.status button.on[data-s=progress] { background: var(--prog); }
.seg.status button.on[data-s=done] { background: var(--done); }
.loc { background: #eef7fe; border: 1px solid #cfe7fb; border-radius: 10px; padding: 9px 11px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.loc b { color: var(--navy); }
.loc button { margin-left: auto; border: 0; background: none; color: var(--blue-d); font-weight: 600; padding: 0; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.photos .ph { width: 76px; height: 76px; border-radius: 9px; background: #e9eef3 center/cover; position: relative; cursor: pointer; }
.photos .ph b { position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 14px; line-height: 22px; text-align: center; }
.btn { border: 0; border-radius: 10px; padding: 10px 14px; font-weight: 600; background: #eef2f6; }
.btn.pri { background: var(--blue); color: #fff; }
.btn.wide { width: 100%; padding: 13px; font-size: 16px; }
.btn.ghost { background: none; color: var(--blue-d); padding: 8px 4px; }
.btn.danger { background: none; color: var(--open); font-weight: 500; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
.btnrow .btn { flex: 1; }
.filebtn { position: relative; overflow: hidden; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* detail */
.gallery { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px; scroll-snap-type: x mandatory; }
.gallery img { height: 190px; border-radius: 10px; scroll-snap-align: start; cursor: zoom-in; flex: none; max-width: 85%; object-fit: cover; background: #e9eef3; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; font-size: 14px; margin: 12px 0; }
.meta dt { color: var(--mut); }
.meta dd { margin: 0; overflow-wrap: anywhere; }
.notes { white-space: pre-wrap; background: #f7f9fb; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; overflow-wrap: anywhere; }
.behind { display: flex; align-items: center; gap: 12px; background: var(--navy); color: #fff; border-radius: 12px; padding: 10px; cursor: pointer; margin: 4px 0 14px; border: 0; width: 100%; text-align: left; }
.behind .bt { width: 92px; height: 62px; border-radius: 8px; background: #234 center/cover; flex: none; position: relative; }
.behind .bt::after { content: "360"; position: absolute; right: 4px; bottom: 3px; font-size: 10px; font-weight: 700; background: var(--blue); border-radius: 4px; padding: 0 4px; }
.behind .b1 { font-weight: 700; }
.behind .b2 { font-size: 12px; opacity: .8; }
h4 { margin: 16px 0 8px; font-size: 12px; letter-spacing: 1.2px; color: var(--mut); text-transform: uppercase; }
.log { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.log li { padding: 7px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.log .lt { color: var(--mut); font-size: 12px; }
.near { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.comment { display: flex; gap: 8px; margin-top: 10px; }
.comment input { flex: 1; border: 1px solid #cfd8e1; border-radius: 10px; padding: 9px 11px; font-size: 16px; min-width: 0; }

/* 360 */
#pano { position: fixed; inset: 0; z-index: 40; background: #000; }
#panoStage { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; }
#panoCube { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.panohead { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); background: linear-gradient(rgba(0,0,0,.65), transparent); color: #fff; }
.panohead > div { flex: 1; }
.pt { font-weight: 700; font-size: 16px; }
.ps { font-size: 13px; opacity: .85; }
.panohead .x { background: rgba(255,255,255,.2); color: #fff; }
.panofoot { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(12px + var(--safe-b)); display: flex; gap: 6px; overflow-x: auto; background: linear-gradient(transparent, rgba(0,0,0,.6)); }

/* lightbox, toast */
#lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; }
#lightbox img { max-width: 100%; max-height: 100%; }
#lightbox .x { position: absolute; right: 14px; top: max(14px, env(safe-area-inset-top)); background: rgba(255,255,255,.2); color: #fff; }
.lbnav { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 34px; width: 46px; height: 64px; border-radius: 10px; }
#lbPrev { left: 10px; } #lbNext { right: 10px; }
#toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 60; box-shadow: 0 3px 12px rgba(0,0,0,.3); }

/* plan layers: first floor / basement / exterior */
.layersw { position: fixed; left: max(12px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 30; display: flex; background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(14,42,68,.18); overflow: hidden; }
.layersw button { font: inherit; font-size: 13px; font-weight: 600; border: 0; background: #fff; color: #0E2A44; padding: 10px 14px; }
.layersw button.on { background: #2EA3F2; color: #fff; }
.layersw.hidden, body.listview .layersw { display: none; }
body.sheet-open .layersw, body.sheet-open .elevsw { display: none !important; }
@media (min-width: 900px) { body.sheet-open .layersw { display: flex !important; } body.sheet-open.ext:not(.listview) .elevsw { display: flex !important; } }

/* exterior layer: elevation picker on the plan view */
.elevsw { display: none; position: fixed; left: max(12px, env(safe-area-inset-left)); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 50px); z-index: 30; background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(14,42,68,.18); overflow: hidden; max-width: calc(100vw - 100px); flex-wrap: wrap; }
body.ext:not(.listview):not(.modelview) .elevsw { display: flex; }
.elevsw button { font: inherit; font-size: 12px; font-weight: 600; border: 0; background: #fff; color: #0E2A44; padding: 8px 11px; }
.elevsw button.on { background: #0E2A44; color: #fff; }

body.houseview .layersw, body.houseview #mInside, body.houseview #mOutside { display: none; }
body.ext.modelview #mInside, body.ext.modelview #mOutside { display: none; }

/* DETAILS tab */
#details { position: absolute; inset: 0; overflow-y: auto; padding: 12px 12px 100px; -webkit-overflow-scrolling: touch; }
body.detview #filters, body.detview .layersw, body.detview .elevsw, body.detview #fab { display: none !important; }
#detZoom { position: fixed; inset: 0; z-index: 60; background: #fff; display: flex; flex-direction: column; }
#detZoom.hidden { display: none; }
.detbar { position: fixed; left: 12px; right: 84px; top: calc(var(--hdr, 140px) + 10px); z-index: 30; background: #0E2A44; color: #fff; border-radius: 12px; padding: 8px 8px 8px 12px; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.detbar.hidden, body.listview .detbar, body.modelview .detbar, body.detview .detbar { display: none; }

.demobar { background: #0E2A44; color: #fff; font-size: 12px; line-height: 1.3; padding: 6px 12px; text-align: center; }
.demobar b { color: #7cc8f7; font-weight: 600; }

/* ---------- Calle Roberto window crew additions (same brand system as 4621 Fairfield) ---------- */
:root { --w-none: #9AA6B2; --w-framed: #7B61E8; --w-sill: #B5487A; --w-set: #F2A33A; --w-fins: #E0662F; --w-wrb: #2EA3F2; --w-lath: #0E9C9C; --w-done: #2BB673; }
#planImg { filter: none; }
#plan { background: #f6f8fa; }
.tabs button { letter-spacing: 2px; }
@media (max-width: 480px) { .tabs { padding: 0 2px; gap: 0; } .tabs button { letter-spacing: .5px; font-size: 12px; } .badge { padding: 0 4px; } }
.filters .toggle input { accent-color: var(--blue); }
#planRings { position: absolute; inset: 0; pointer-events: none; }
#planRings.off { display: none; }
.ring { position: absolute; left: 0; top: 0; width: max(13px, calc(52px * var(--s, 1))); height: max(13px, calc(52px * var(--s, 1))); transform: translate(-50%, -50%) scale(var(--inv, 1)); border-radius: 50%; border: 2.5px solid var(--c); background: color-mix(in srgb, var(--c) 22%, transparent); }
.ring.st-none { --c: var(--w-none); background: transparent; border-width: 2px; opacity: .8; }
.ring.st-checked { --c: var(--w-checked); } .ring.st-set { --c: var(--w-set); } .ring.st-flashed { --c: var(--w-flashed); } .ring.st-done { --c: var(--w-done); }
.ring.issue { box-shadow: 0 0 0 3px var(--open); }
.ring.sel { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--navy); }
.pin { pointer-events: none; }
.pin .pb { pointer-events: none; }
.pin.question { --c: var(--prog); }
#modelPins .pin .pb { transform: none; }
.wmark { font-weight: 700; font-size: 13px; min-width: 52px; height: 30px; border-radius: 15px; display: inline-grid; place-items: center; border: 2.5px solid var(--c); background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--navy); padding: 0 8px; flex: none; }
.wmark.st-none { --c: var(--w-none); } .wmark.st-checked { --c: var(--w-checked); } .wmark.st-set { --c: var(--w-set); } .wmark.st-flashed { --c: var(--w-flashed); } .wmark.st-done { --c: var(--w-done); }
.pill.st-none { --c: var(--w-none); } .pill.st-checked { --c: var(--w-checked); } .pill.st-set { --c: var(--w-set); } .pill.st-flashed { --c: var(--w-flashed); } .pill.st-done { --c: var(--w-done); } .pill.issue { --c: var(--open); } .pill.question { --c: var(--prog); }
.card.st-none { --c: var(--w-none); } .card.st-checked { --c: var(--w-checked); } .card.st-set { --c: var(--w-set); } .card.st-flashed { --c: var(--w-flashed); } .card.st-done { --c: var(--w-done); } .card.question { --c: var(--prog); }
.card .t2 span + span::before { content: " · "; }
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid #cfd8e1; border-radius: 10px; overflow: hidden; margin: 4px 0 6px; }
.steps button { border: 0; border-right: 1px solid #cfd8e1; background: #fff; padding: 9px 2px; font-size: 12px; font-weight: 600; line-height: 1.15; color: var(--mut); display: grid; gap: 4px; justify-items: center; }
.steps button:last-child { border-right: 0; }
.steps button i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--c); display: block; }
.steps button.past i { background: var(--c); }
.steps button.on { background: var(--c); color: #fff; }
.steps button.on i { border-color: #fff; background: #fff; }
.steps .st-none { --c: var(--w-none); } .steps .st-checked { --c: var(--w-checked); } .steps .st-set { --c: var(--w-set); } .steps .st-flashed { --c: var(--w-flashed); } .steps .st-done { --c: var(--w-done); }
.small { font-size: 13px; color: var(--mut); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--blue-d); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.warn { background: #fff6e8; border: 1px solid #f6d7a3; color: #8a5a10; border-radius: 10px; padding: 8px 11px; font-size: 13px; margin-bottom: 12px; }
.pinpad { display: grid; grid-template-columns: repeat(4, 54px); gap: 10px; justify-content: center; margin: 6px 0 12px; }
.pinpad input { text-align: center; font-size: 24px; font-weight: 700; padding: 10px 0; border: 1px solid #cfd8e1; border-radius: 10px; -webkit-text-security: disc; width: 54px; }
.pick { display: grid; gap: 8px; margin-bottom: 12px; }
.pick button { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 9px 10px; text-align: left; }
.pick small { display: block; color: var(--mut); font-size: 12px; }
.av { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; flex: none; width: 26px; height: 26px; font-size: 11px; }
.hdrbtn { display: flex; align-items: center; gap: 6px; max-width: 170px; }
.hdrbtn .av { width: 22px; height: 22px; font-size: 10px; border: 1.5px solid rgba(255,255,255,.7); }
.prog { background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(14,42,68,.08); margin-bottom: 12px; }
.prog .top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.prog .big { font-size: 30px; font-weight: 800; color: var(--navy); line-height: 1; }
.bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #e9eef3; margin: 10px 0; }
.bar span { display: block; height: 100%; }
.stats { display: flex; gap: 6px; flex-wrap: wrap; }
.stats button { border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 4px 10px; font-size: 13px; display: flex; gap: 6px; align-items: baseline; }
.stats button b { color: var(--c); }
.stats button.on { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy) inset; }
.stats .st-none { --c: var(--w-none); } .stats .st-checked { --c: var(--w-checked); } .stats .st-set { --c: var(--w-set); } .stats .st-flashed { --c: var(--w-flashed); } .stats .st-done { --c: var(--w-done); } .stats .issue { --c: var(--open); }
.crew { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(14,42,68,.08); }
.crew.me { box-shadow: 0 0 0 2px var(--blue) inset; }
.crew .av { width: 40px; height: 40px; font-size: 15px; }
.crew .cn { font-weight: 700; } .crew .cm { color: var(--mut); font-size: 13px; }
.crew .acts { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.intro { background: var(--navy); color: #fff; border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.intro h3 { margin: 0 0 6px; font-size: 17px; } .intro p { margin: 0 0 10px; opacity: .85; font-size: 14px; }
.intro .btn { background: rgba(255,255,255,.16); color: #fff; } .intro .btn.pri { background: var(--blue); }
.load3 { position: absolute; inset: 0; display: grid; place-items: center; color: var(--mut); pointer-events: none; }
.modelctl .lvbtn { display: none; }
#modelPins .pin { z-index: 2; }
.composer { display: grid; gap: 8px; margin-top: 10px; }
.composer textarea { width: 100%; border: 1px solid #cfd8e1; border-radius: 10px; padding: 9px 11px; font-size: 16px; min-height: 60px; resize: vertical; }
.photos .ph b { cursor: pointer; }
.scrollv { position: absolute; inset: 0; overflow-y: auto; padding: 12px max(12px, env(safe-area-inset-right)) 110px max(12px, env(safe-area-inset-left)); -webkit-overflow-scrolling: touch; }
.scrollv > * { max-width: 900px; margin-left: auto; margin-right: auto; }
.banner button + button { margin-left: -4px; }

.layersw .sh { display: none; }
@media (max-width: 600px) {
  .layersw .lg { display: none; } .layersw .sh { display: inline; }
  .layersw button { padding: 10px 12px; }
  .elevsw { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: calc(100vw - 100px); }
  .elevsw::-webkit-scrollbar { display: none; }
  .elevsw button { white-space: nowrap; flex: none; }
}

/* Stage photo record (one row per install stage) */
.stage { border: 1px solid #cfd8e1; border-radius: 10px; padding: 10px; margin: 0 0 8px; background: #fff; }
.stage .sh { display: flex; gap: 10px; align-items: flex-start; }
.stage .sh > i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--c); flex: none; margin-top: 3px; }
.stage.past .sh > i { background: var(--c); }
.stage .stx { flex: 1; display: grid; gap: 2px; min-width: 0; }
.stage .stx b { font-size: 14px; }
.stage .sw { color: var(--navy); }
.stage .photos { margin: 8px 0 0 24px; }
.stage .photos .ph { width: 64px; height: 64px; }
.btn.sm { padding: 7px 12px; font-size: 13px; flex: none; }
.st-none { --c: var(--w-none); } .st-checked { --c: var(--w-checked); } .st-flashed { --c: var(--w-flashed); } .st-set { --c: var(--w-set); } .st-done { --c: var(--w-done); }

/* Seven install stages */
.st-none, .ring.st-none, .wmark.st-none, .pill.st-none, .card.st-none, .segs .st-none, .stats .st-none { --c: var(--w-none); }
.st-framed, .ring.st-framed, .wmark.st-framed, .pill.st-framed, .card.st-framed, .segs .st-framed, .stats .st-framed { --c: var(--w-framed); }
.st-sill, .ring.st-sill, .wmark.st-sill, .pill.st-sill, .card.st-sill, .segs .st-sill, .stats .st-sill { --c: var(--w-sill); }
.st-set, .ring.st-set, .wmark.st-set, .pill.st-set, .card.st-set, .segs .st-set, .stats .st-set { --c: var(--w-set); }
.st-fins, .ring.st-fins, .wmark.st-fins, .pill.st-fins, .card.st-fins, .segs .st-fins, .stats .st-fins { --c: var(--w-fins); }
.st-wrb, .ring.st-wrb, .wmark.st-wrb, .pill.st-wrb, .card.st-wrb, .segs .st-wrb, .stats .st-wrb { --c: var(--w-wrb); }
.st-lath, .ring.st-lath, .wmark.st-lath, .pill.st-lath, .card.st-lath, .segs .st-lath, .stats .st-lath { --c: var(--w-lath); }
.st-done, .ring.st-done, .wmark.st-done, .pill.st-done, .card.st-done, .segs .st-done, .stats .st-done { --c: var(--w-done); }
.segs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 6px 0 6px; }
.segs button { height: 14px; border: 2px solid var(--c); border-radius: 4px; background: #fff; padding: 0; cursor: pointer; }
.segs button.past { background: var(--c); }
