: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; }

/* ===== Plaster Log additions ===== */
:root { --q: #8E6BE8; --fail: #E5533D; }
#planImg { filter: none; }
.hdrbtn { display: inline-flex; align-items: center; gap: 6px; }
.hdrbtn.lang { font-weight: 700; letter-spacing: 1px; padding: 6px 9px; }
.tabs button { letter-spacing: 1px; font-size: 12px; padding: 8px 0 9px; white-space: nowrap; }
.badge.warn { background: #FFE2A8; color: #8A5200; }
body:not([data-view="walls"]):not([data-view="list"]):not([data-view="model"]) #filters { display: none; }
body:not([data-view="walls"]):not([data-view="list"]):not([data-view="model"]) #fab { display: none; }
.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; }
@media (min-width: 900px) { .scrollv { padding-left: 24px; padding-right: 24px; } body.sheet-open .scrollv { padding-right: 444px; } }
.small { font-size: 12.5px; color: var(--mut); line-height: 1.4; }
.small.tip { margin: 2px 0 10px; color: #3d5a73; }
.small.err { color: var(--open); min-height: 2px; margin-bottom: 8px; }
.hidden { display: none !important; }

/* pins */
.pin.question { --c: var(--q); }
.card.question, .pill.question { --c: var(--q); }
.ghost .pb::before { background: var(--navy) !important; }

/* elevation dock */
.sheetdock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 0 max(10px, env(safe-area-inset-right)) calc(10px + var(--safe-b)) max(10px, env(safe-area-inset-left)); pointer-events: none; }
.sheetdock > * { pointer-events: auto; }
.areastrip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 6px; padding-right: 76px; }
.areastrip::-webkit-scrollbar { display: none; }
.astrip { flex: none; border: 0; background: rgba(14,42,68,.92); color: #fff; border-radius: 10px; padding: 6px 10px; text-align: left; font-size: 12px; line-height: 1.25; }
.astrip b { display: block; font-size: 12.5px; }
.astrip span { opacity: .85; }
.astrip.warn { background: #8A5200; }
.elevsw2 { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(14,42,68,.18); margin-right: 72px; }
.elevsw2::-webkit-scrollbar { display: none; }
.elevsw2 button { flex: none; border: 0; background: #fff; color: var(--navy); padding: 9px 11px; font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.elevsw2 button.on { background: var(--blue); color: #fff; }
.elevsw2 i { font-style: normal; font-size: 10.5px; font-weight: 700; border-radius: 8px; padding: 0 5px; line-height: 16px; }
.elevsw2 i.pct { background: #e7f4fd; color: var(--blue-d); }
.elevsw2 i.cnt { background: var(--open); color: #fff; }
.elevsw2 button.on i.pct { background: rgba(255,255,255,.25); color: #fff; }
@media (min-width: 900px) { body.sheet-open .sheetdock { right: 420px; } }
.planctl { top: 12px; }
.banner { gap: 8px; }
.banner span { white-space: normal; }
@media (max-width: 420px) { .banner { white-space: normal; width: calc(100vw - 24px); } }

/* forms */
.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.kind { border: 1px solid #cfd8e1; background: #fff; border-radius: 10px; padding: 8px 9px; text-align: left; line-height: 1.2; }
.kind b { display: block; font-size: 14px; }
.kind small { display: block; color: var(--mut); font-size: 11.5px; margin-top: 2px; }
.kind.on { border-color: var(--blue); background: #eef7fe; box-shadow: inset 0 0 0 1px var(--blue); }
.kind.k-damage.on, .kind.k-notready.on { border-color: var(--open); background: #fdf0ee; box-shadow: inset 0 0 0 1px var(--open); }
.kind.k-extra.on { border-color: var(--prog); background: #fef6ea; box-shadow: inset 0 0 0 1px var(--prog); }
.kind.k-question.on { border-color: var(--q); background: #f4f0fd; box-shadow: inset 0 0 0 1px var(--q); }
.row3 { display: flex; gap: 10px; } .row3 > .fld { flex: 1; min-width: 0; }
.xw { background: #fef9f1; border: 1px solid #f6dfb8; border-radius: 12px; padding: 4px 12px 8px; margin-bottom: 12px; }
.xw h4 { margin-top: 10px; }
.xw .seg button { font-size: 12.5px; padding: 9px 2px; }
.loc span b { color: var(--navy); }
.seg.status button.on[data-s=called] { background: var(--prog); }
.seg.status button.on[data-s=passed] { background: var(--done); }
.seg.status button.on[data-s=failed] { background: var(--fail); }
.seg.status button.on[data-s=none] { background: #8a96a3; }
.chips2 { display: flex; flex-wrap: wrap; gap: 6px; }
.chips2 button { border: 1px solid #cfd8e1; background: #fff; border-radius: 16px; padding: 6px 11px; font-size: 13.5px; display: inline-flex; align-items: center; gap: 4px; }
.chips2 button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.wrow, .mrow { display: flex; gap: 6px; margin-bottom: 6px; }
.wrow select { flex: 1; min-width: 0; border: 1px solid #cfd8e1; border-radius: 10px; padding: 8px; background: #fff; font-size: 15px; }
.mrow { flex-wrap: wrap; background: #f7f9fb; border-radius: 10px; padding: 6px; }
.mrow input { flex: 1 1 40%; min-width: 0; border: 1px solid #cfd8e1; border-radius: 8px; padding: 8px; font-size: 15px; }
.wrow .btn, .mrow .btn { padding: 6px 12px; }

/* checks */
.chk { font-size: 13px; border-radius: 9px; padding: 7px 10px; margin: 6px 0; line-height: 1.35; }
.chk.w { background: #fff3dc; color: #7a4a00; }
.chk.i { background: #eef7fe; color: #1b4f75; }

/* progress board */
.ptop { background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(14,42,68,.08); }
.pbig { display: flex; align-items: baseline; gap: 8px; }
.pbig b { font-size: 30px; color: var(--navy); }
.pbig span { color: var(--mut); font-size: 13px; }
.bar { height: 8px; background: #e7edf3; border-radius: 4px; overflow: hidden; margin: 8px 0 10px; }
.bar i { display: block; height: 100%; background: var(--done); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--mut); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw.none { background: #e3e8ee; } .sw.prog { background: var(--prog); } .sw.done { background: var(--done); } .sw.fail { background: var(--fail); }
.acard { background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(14,42,68,.08); scroll-margin-top: 10px; }
.ahead { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.ahead b { font-size: 15.5px; }
.apct { font-weight: 700; color: var(--blue-d); font-size: 16px; }
.anote { margin-top: 4px; }
.stages { display: flex; gap: 5px; overflow-x: auto; margin: 10px -2px 2px; padding: 2px; scrollbar-width: none; }
.stages::-webkit-scrollbar { display: none; }
.stg { flex: 1 0 64px; border: 0; border-radius: 9px; padding: 7px 4px; background: #eef2f6; color: var(--ink); line-height: 1.15; min-width: 64px; }
.stg b { display: block; font-size: 12.5px; }
.stg small { display: block; font-size: 10.5px; opacity: .85; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stg.prog { background: var(--prog); color: #fff; }
.stg.done { background: var(--done); color: #fff; }
.stg.fail { background: var(--fail); color: #fff; }
.afoot { display: flex; gap: 10px; margin-top: 4px; }
.afoot .btn.ghost { padding: 6px 0; font-size: 13.5px; }

/* list */
.fbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #eef7fe; border-radius: 10px; padding: 6px 6px 6px 12px; margin-bottom: 10px; font-size: 13.5px; }

/* daily */
.dtop { margin-bottom: 12px; }
.dtop .small { margin-top: 8px; }
.dcard { background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(14,42,68,.08); cursor: pointer; }
.dhead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 3px; }
.dnote { font-size: 14px; margin-top: 6px; white-space: pre-wrap; }
.lt { color: var(--mut); font-size: 12px; margin-top: 6px; }

/* crew */
.av { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; flex: none; }
.hdrbtn .av { width: 22px; height: 22px; font-size: 10px; }
.intro { background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(14,42,68,.08); }
.intro h3 { margin: 0 0 4px; font-size: 17px; }
.crow { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 10px; margin-bottom: 8px; box-shadow: 0 1px 3px rgba(14,42,68,.08); }
.crow .ct { flex: 1; min-width: 0; }
.panel { background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(14,42,68,.08); }
.pick { display: grid; gap: 6px; margin-bottom: 14px; }
.pick button { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 10px; text-align: left; }
.pick button span { display: flex; flex-direction: column; }
.pick small { color: var(--mut); font-size: 12px; }
.who1 { display: grid; justify-items: center; gap: 6px; margin-bottom: 10px; }
.pinpad { display: flex; gap: 10px; justify-content: center; margin: 6px 0 10px; }
.pinpad input { width: 50px; height: 58px; text-align: center; font-size: 26px; border: 1px solid #cfd8e1; border-radius: 12px; -webkit-text-security: disc; }
.pinpad input:focus { outline: 2px solid var(--blue); border-color: var(--blue); }

/* activity */
.log li { display: flex; gap: 8px; align-items: flex-start; }
.log li > div { flex: 1; min-width: 0; }
.lphoto { max-width: 160px; border-radius: 8px; margin-top: 4px; display: block; cursor: zoom-in; }
.comment label.btn { padding: 9px 11px; }

.app { letter-spacing: 2px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app { letter-spacing: 1.5px; font-size: 11px; }
#btnName span:last-child { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 380px) { .logo { height: 26px; } }

#v-model .modelctl { top: 12px; }
#modelHint { right: 90px; bottom: calc(14px + var(--safe-b)); }
.tabs button { flex: 1 1 auto; }
