/* CondSnap design system. Tokens first; every component below reads only these.
   Colour: slate neutrals, deep teal brand (trust, keys, paperwork done right), brass accent used only for focus and AI.
   Space: 4px scale. Radius: 6 / 10 / 16 / pill. Elevation: two shadows. Type: Manrope, one family, weights carry hierarchy. */
:root {
  --ink: #15201C; --ink-2: #3D4A45; --muted: #66736D; --rule: #DDE3E0; --rule-2: #C9D2CE;
  --paper: #FFFFFF; --canvas: #F2F5F4; --surface: #F7F9F8;
  --brand: #0E6B5C; --brand-dark: #0A5348; --brand-tint: #E3F1EE;
  --brass: #B7832F; --brass-tint: #FBF3E4;
  --good: #1E7F4F; --good-tint: #E6F4EC; --bad: #C2362F; --bad-tint: #FCEBEA; --amber: #B26B00; --amber-tint: #FFF4DE;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-pill: 999px; --radius: var(--r-md);
  --sh-1: 0 1px 2px rgba(21,32,28,.06), 0 1px 1px rgba(21,32,28,.04); --sh-2: 0 6px 20px -6px rgba(21,32,28,.18), 0 2px 4px rgba(21,32,28,.06);
  --max: 1080px; --font: 'Manrope', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; --display: var(--font);
  /* legacy aliases still referenced by shared print styles */
  --safe: var(--brand); --safe-dark: var(--brand-dark); --hazard: var(--brass); --danger: var(--bad);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.55 var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
body[data-page^="app"], body[data-page="report"] { background: var(--canvas); }
a { color: var(--brand-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0 0 var(--s2); letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 800; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 var(--s4); max-width: 68ch; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--s4); }
.site-header { background: rgba(255,255,255,.88); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: var(--s5); min-height: 64px; }
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -.03em; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: var(--s2); }
.brand .mark { width: 26px; height: 26px; background: var(--brand); border-radius: 8px; display: inline-block; position: relative; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.brand .mark::after { content: ''; position: absolute; left: 7px; top: 7px; width: 12px; height: 12px; border: 2.5px solid #fff; border-radius: 50%; }
nav.main { margin-left: auto; display: flex; gap: var(--s4); align-items: center; flex-wrap: wrap; }
nav.main a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; padding: var(--s1) 0; }
nav.main a:hover { color: var(--ink); }
nav.main a.btn { color: #fff; }
main { padding: var(--s6) 0 var(--s8); }
.site-footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: .9rem; padding: var(--s5) 0; background: var(--paper); }
.site-footer .wrap { display: flex; gap: var(--s5); flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); font: 700 .95rem/1 var(--font); padding: 0 var(--s4); min-height: 44px; border-radius: var(--r-sm);
  border: 1px solid var(--rule-2); background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none; box-shadow: var(--sh-1); transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; margin: 0; }
.btn:hover { background: var(--surface); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--sh-1), inset 0 -2px 0 rgba(0,0,0,.18); }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.quiet { box-shadow: none; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.ai { border-color: #E6CF9F; background: var(--brass-tint); color: #7A5418; box-shadow: none; }
.btn.ai::before { content: '✦'; font-size: .85em; }
.btn.ai:hover { border-color: var(--brass); background: #F8EBD2; }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn.block { width: 100%; }
.btn.small { min-height: 36px; padding: 0 var(--s3); font-size: .85rem; }

/* Form controls */
label { display: block; font-weight: 700; font-size: .92rem; margin: var(--s4) 0 var(--s1); color: var(--ink-2); }
label small { font-weight: 500; color: var(--muted); }
label.btn { display: inline-flex; margin: 0; color: var(--ink); font-size: .85rem; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], textarea, select { width: 100%; font: 500 1rem var(--font); padding: var(--s2) var(--s3);
  border: 1px solid var(--rule-2); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); min-height: 44px; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #9AA59F; }
input:hover, textarea:hover, select:hover { border-color: var(--muted); }
textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14,107,92,.18); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
.check { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s2) 0; font-weight: 500; margin: 0; border-bottom: 1px solid var(--rule); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.hint { color: var(--muted); font-size: .88rem; margin: var(--s1) 0 0; }
.notice { border: 1px solid #F1D9A6; background: var(--amber-tint); color: #6B4400; padding: var(--s3) var(--s4); margin: var(--s4) 0; border-radius: var(--r-sm); }
.notice.ok { border-color: #B9DEC9; background: var(--good-tint); color: #155C39; }
.notice.bad { border-color: #F2C3C0; background: var(--bad-tint); color: #8E241F; }
.row { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: var(--s6); }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-2.wide-left { grid-template-columns: 3fr 2fr; } }

/* Landing */
.hero { padding: 2.5rem 0 1rem; }
.hero .lede { font-size: 1.2rem; max-width: 56ch; color: var(--ink); }
.proof { display: flex; gap: 1.5rem; flex-wrap: wrap; color: var(--muted); font-size: .95rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.proof li { padding-left: 1.1rem; position: relative; }
.proof li::before { content: ''; position: absolute; left: 0; top: .55em; width: .5rem; height: .5rem; background: var(--brand); border-radius: 50%; }
.generator { border: 1px solid var(--rule); border-radius: var(--r-lg); padding: var(--s5); background: var(--paper); box-shadow: var(--sh-2); }
.generator h2 { margin-top: 0; }
.sample { border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); padding: var(--s5); font-size: .92rem; }
.sample .doc-head { border-bottom: 1px solid var(--rule-2); padding-bottom: var(--s2); margin-bottom: var(--s3); display: flex; justify-content: space-between; gap: var(--s4); }
.sample .doc-head > div:last-child { white-space: nowrap; }
.sample table { font-size: .85rem; }
.how { margin: 3rem 0; }
.how ol { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
@media (min-width: 700px) { .how ol { grid-template-columns: repeat(3, 1fr); } }
.how li { counter-increment: step; background: var(--surface); border-radius: var(--r-md); padding: var(--s4); }
.how li::before { content: counter(step); font-weight: 800; font-size: .9rem; color: #fff; background: var(--brand); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; margin-bottom: var(--s2); }
.plans { display: grid; gap: 1rem; margin: 1.5rem 0; }
@media (min-width: 760px) { .plans { grid-template-columns: repeat(4, 1fr); } }
.plan { border: 1px solid var(--rule); border-radius: var(--r-lg); padding: var(--s5); display: flex; flex-direction: column; background: var(--paper); box-shadow: var(--sh-1); }
.plan.featured { border: 2px solid var(--brand); box-shadow: var(--sh-2); }
.plan .price { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; margin: var(--s1) 0; }
.plan .price small { font-family: var(--font); font-size: .95rem; font-weight: 400; color: var(--muted); }
.plan ul { padding-left: 1.1rem; margin: .5rem 0 1rem; flex: 1; }
.plan li { margin: .25rem 0; }
.faq dt { font-weight: 600; margin-top: 1rem; }
.faq dd { margin: .25rem 0 0; color: var(--ink); max-width: 68ch; }

/* App */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; padding-bottom: var(--s4); margin-bottom: var(--s5); border-bottom: 1px solid var(--rule); }
.page-head h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
table.list { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1); }
table.list th, table.list td { text-align: left; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover td { background: var(--surface); }
table.list th { font-weight: 700; font-size: .8rem; color: var(--muted); background: var(--surface); }
table.list a.title { font-weight: 600; color: var(--ink); }
.status { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px var(--s2); border-radius: var(--r-pill); background: var(--canvas); }
.status.draft { color: var(--amber); background: var(--amber-tint); } .status.issued, .status.approved { color: var(--brand); background: var(--brand-tint); } .status.rejected { color: var(--bad); background: var(--bad-tint); } .status.submitted { color: var(--muted); }
.empty { border: 1.5px dashed var(--rule-2); border-radius: var(--r-lg); padding: var(--s6); text-align: center; color: var(--muted); background: var(--paper); }
.toolbar { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; position: sticky; top: 64px; background: rgba(242,245,244,.92); backdrop-filter: blur(8px); padding: var(--s3) 0; border-bottom: 1px solid var(--rule); z-index: 5; }
.toolbar .spacer { flex: 1; }
.editor section { margin: 1.5rem 0; }
.editor .step { border: 1.5px solid var(--rule); border-left: 6px solid var(--ink); padding: .75rem 1rem 1rem; margin: .75rem 0; }
.editor .step .num { font-family: var(--display); font-weight: 700; font-size: 1.2rem; }
.editor .step .head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.editor .fields { display: grid; gap: .75rem; }
@media (min-width: 760px) { .editor .fields { grid-template-columns: 1fr 1fr; } .editor .fields .full { grid-column: 1 / -1; } }
.risk select { font-weight: 600; }
.sigs img { height: 48px; border: 1px solid var(--rule); background: #fff; }
.share { border: 1px solid #B8DCD4; background: var(--brand-tint); border-radius: var(--r-lg); padding: var(--s4); margin: var(--s4) 0; display: grid; gap: var(--s3); }
@media (min-width: 700px) { .share { grid-template-columns: 1fr auto; align-items: center; } }
.share code { font-size: .95rem; word-break: break-all; }
.qr { width: 132px; height: 132px; image-rendering: pixelated; border: 6px solid #fff; border-radius: var(--r-sm); }
.paywall { border: 1px solid #F1D9A6; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--sh-2); padding: var(--s5); margin: var(--s4) 0; border-top: 4px solid var(--brass); }
.paywall .row { margin-top: .75rem; }

/* Sign-on */
.sign-summary { border: 1.5px solid var(--rule); padding: 1rem; margin: 1rem 0; }
.sign-summary ol { padding-left: 1.2rem; }
.sign-summary li { margin: .4rem 0; }
.sign-summary li ul { padding-left: 1rem; color: var(--muted); font-size: .95rem; }
canvas.pad { width: 100%; height: 180px; border: 2px dashed var(--ink); border-radius: var(--radius); background: #fff; touch-action: none; display: block; }
.ack { display: flex; gap: .6rem; align-items: flex-start; margin: 1rem 0; font-weight: 500; }
.ack input { width: 22px; height: 22px; flex: none; accent-color: var(--safe); margin-top: .1rem; }

/* Auth */
.auth { max-width: 420px; }
input.code { font: 700 2rem/1 ui-monospace, Menlo, monospace; letter-spacing: .4em; text-align: center; }

/* Print / PDF page */
body.print { font-size: 11pt; background: #fff; }
.doc { max-width: 190mm; margin: 0 auto; padding: 8mm 0; position: relative; }
.doc-head { border-bottom: 3px solid var(--ink); padding-bottom: 4mm; margin-bottom: 4mm; display: grid; grid-template-columns: 1fr auto; gap: 4mm; }
.doc-head h1 { font-size: 20pt; margin: 0; }
.doc-head .kind { font-family: var(--display); font-weight: 700; font-size: 11pt; color: var(--muted); }
.doc-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1mm 6mm; font-size: 10pt; margin: 0 0 4mm; }
.doc-meta div { display: grid; grid-template-columns: 38mm 1fr; gap: 2mm; }
.doc-meta div span { color: var(--muted); }
.doc h2 { font-size: 13pt; border-bottom: 1.5px solid var(--ink); padding-bottom: 1mm; margin: 5mm 0 2mm; }
.doc ul { margin: 0; padding-left: 5mm; }
.doc li { margin: .5mm 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 9.5pt; page-break-inside: auto; }
.doc th, .doc td { border: 1px solid var(--ink); padding: 1.5mm 2mm; vertical-align: top; text-align: left; }
.doc th { background: var(--surface); font-weight: 600; }
.doc tr { page-break-inside: avoid; }
.doc td.n { width: 6mm; font-family: var(--display); font-weight: 700; text-align: center; }
.doc .r { font-weight: 700; white-space: nowrap; }
.r.Low { color: var(--safe); } .r.Medium { color: #7A6400; } .r.High { color: var(--amber); } .r.Extreme { color: var(--danger); }
.doc .legend { font-size: 9pt; color: var(--muted); margin: 2mm 0 0; }
.doc table.sign td { height: 11mm; }
.doc .sign img { height: 10mm; }
.doc-foot { margin-top: 6mm; font-size: 8.5pt; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 2mm; }
.watermark { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 10; }
.watermark span { font-family: var(--display); font-weight: 700; font-size: 64pt; color: rgba(180, 35, 44, .14); transform: rotate(-28deg); border: 6pt solid rgba(180, 35, 44, .14); padding: 4mm 10mm; }
@page { size: A4; margin: 12mm; }
@media print { body.print { font-size: 10.5pt; } .doc { max-width: none; padding: 0; } .no-print { display: none !important; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.spin { display: inline-block; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { margin-top: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* CondSnap additions */
.grid-3 { display: grid; grid-template-columns: 1fr; gap: var(--s3); }
@media (min-width: 600px) { .grid-3 { grid-template-columns: 2fr 1fr 1fr; } }
td.y { color: var(--good); font-weight: 700; } td.n { color: var(--bad); font-weight: 700; }

/* Inspection: rooms are cards, items are rows with a state rail */
#rooms .room { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--sh-1); margin: var(--s4) 0; overflow: hidden; }
#rooms .room > .head { display: grid; grid-template-columns: 1fr auto 20px; align-items: center; gap: var(--s3); padding: var(--s4) var(--s5); cursor: pointer; user-select: none; }
#rooms .room > .head h3 { margin: 0; font-size: 1.12rem; }
#rooms .room > .head::after { content: ''; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px,-2px); transition: transform .2s; justify-self: center; grid-row: 1; grid-column: 3; }
#rooms .room.collapsed > .head::after { transform: rotate(-45deg); }
#rooms .room.collapsed .item { display: none; }
#rooms .room .count { color: var(--muted); font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
#rooms .room .meter { grid-column: 1 / -1; grid-row: 2; height: 4px; border-radius: var(--r-pill); background: var(--canvas); overflow: hidden; }
#rooms .room .meter span { display: block; height: 100%; background: var(--brand); border-radius: inherit; transition: width .3s ease-out; }
#rooms .room .meter.has-issues span { background: linear-gradient(90deg, var(--brand), var(--brand) calc(100% - 6px), var(--bad) calc(100% - 6px)); }
#rooms .item { display: grid; gap: var(--s3) var(--s5); align-items: start; padding: var(--s4) var(--s5); border-top: 1px solid var(--rule); position: relative; }
#rooms .item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
#rooms .item.st-ok::before { background: var(--good); } #rooms .item.st-issue::before { background: var(--bad); }
@media (min-width: 760px) { #rooms .item { grid-template-columns: minmax(180px, 1fr) 2.2fr; } }
#rooms .item .name { font-weight: 700; min-height: 36px; display: flex; align-items: center; gap: var(--s2); }
#rooms .item .name .st { font-size: .72rem; font-weight: 700; padding: 2px var(--s2); border-radius: var(--r-pill); }
#rooms .item.st-ok .name .st { background: var(--good-tint); color: var(--good); } #rooms .item.st-issue .name .st { background: var(--bad-tint); color: var(--bad); }
#rooms .item .entry { font-size: .88rem; color: var(--muted); margin-top: var(--s1); background: var(--surface); border-radius: var(--r-sm); padding: var(--s2) var(--s3); }
#rooms .item .body { display: grid; gap: var(--s3); }
#rooms .item textarea { min-height: 44px; }
/* Segmented yes/no per flag: explicit, one tap, tap the active choice again to clear */
.toggles { display: flex; gap: var(--s2); flex-wrap: wrap; }
.seg { display: inline-flex; align-items: stretch; border: 1px solid var(--rule-2); border-radius: var(--r-sm); background: var(--paper); overflow: hidden; min-height: 36px; }
.seg .lbl { display: inline-flex; align-items: center; padding: 0 var(--s3); font-size: .85rem; font-weight: 700; color: var(--ink-2); background: var(--surface); border-right: 1px solid var(--rule); }
.seg button { font: 700 .85rem var(--font); border: 0; background: none; color: var(--muted); padding: 0 var(--s3); cursor: pointer; min-width: 52px; transition: background .12s, color .12s; }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button:hover { background: var(--surface); color: var(--ink); }
.seg button[aria-pressed=true].y { background: var(--good-tint); color: var(--good); }
.seg button[aria-pressed=true].n { background: var(--bad-tint); color: var(--bad); }
.thumbs { display: flex; gap: var(--s2); flex-wrap: wrap; margin: 0; }
.thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: var(--r-sm); background: var(--canvas); display: block; box-shadow: 0 0 0 1px var(--rule); }
.thumbs .ph { position: relative; }
.thumbs .ph button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: var(--ink); color: #fff; font-weight: 700; cursor: pointer; line-height: 1; padding: 0; }
.photos:empty { display: none; }
#rooms .item .acts { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
#rooms .item .acts input[type=file] { display: none; }
.flag { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px var(--s2); border-radius: var(--r-pill); margin-left: var(--s1); }
.flag.y { color: var(--good); background: var(--good-tint); } .flag.n { color: var(--bad); background: var(--bad-tint); }
.t-room { margin-top: var(--s5); padding-top: var(--s2); border-top: 1px solid var(--rule); }
.t-item { padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
.t-head { display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.t-item p { margin: var(--s1) 0; }
.cmt { background: var(--brand-tint); border-radius: var(--r-sm); padding: var(--s2) var(--s3); margin: var(--s2) 0 0; font-size: .92rem; }
.modal { position: fixed; inset: 0; background: rgba(21,32,28,.5); display: flex; align-items: center; justify-content: center; z-index: 50; padding: var(--s4); }
.modal[hidden] { display: none; }
.modal-body { background: #fff; padding: var(--s5); max-width: 560px; width: 100%; border-radius: var(--r-lg); box-shadow: var(--sh-2); }
/* AI drafts: visible until the inspector confirms; a pending suggestion never overwrites their words */
.ai-note { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; font-size: .85rem; color: #7A5418; background: var(--brass-tint); border: 1px solid #E6CF9F; border-radius: var(--r-sm); padding: var(--s2) var(--s3); }
.ai-note::before, .ai-draft strong::before { content: '✦ '; }
.ai-note .btn { margin-left: auto; }
textarea.note.is-ai { border-color: #E6CF9F; background: #FFFCF5; }
.ai-draft { display: grid; gap: var(--s2); font-size: .9rem; background: var(--paper); border: 1px dashed var(--brass); border-radius: var(--r-sm); padding: var(--s3); }
.ai-draft strong { color: #7A5418; }
.doc .ai-mark { color: #7A5418; font-style: italic; }
/* Print additions */
.doc .cover { page-break-after: always; }
.doc .cover h1 { font-size: 26pt; margin: 2mm 0; }
.doc .cover .addr { font-size: 16pt; font-weight: 600; margin-bottom: 6mm; }
.doc h2.room { page-break-after: avoid; margin-top: 6mm; }
.doc table.items td.c { width: 16mm; text-align: center; }
.doc table.items td.item { width: 36mm; font-weight: 600; }
.doc table.items td.notes { min-width: 40mm; }
.doc .thumbs img { width: 28mm; height: 28mm; }
.doc .cmt { font-size: 9pt; }
.room.collapsed .item { display: none; }

/* Styled dialogs (replace the browser's confirm/prompt/alert) */
.ui-dialog { border: 0; border-radius: 12px; padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: 0 24px 60px -12px rgba(0,0,0,.45); color: var(--ink); background: var(--paper); }
.ui-dialog::backdrop { background: rgba(20, 24, 22, .45); }
.ui-dialog form { padding: 1.25rem 1.25rem 1rem; margin: 0; }
.ui-dialog p { margin: 0 0 1rem; font-size: 1.02rem; line-height: 1.45; }
.ui-dialog textarea { width: 100%; margin: 0 0 1rem; }
.ui-dialog-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.btn.danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; }
a.is-busy { pointer-events: none; opacity: .85; }
.btn:not(.primary) .spin { border-color: rgba(0,0,0,.18); border-top-color: currentColor; }
@media (prefers-reduced-motion: no-preference) { .ui-dialog[open] { animation: ui-pop .16s ease-out; } }
@keyframes ui-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
