/* RumahKit — security-paper greens, bank-slip results, rubber-stamp violet for duty. */
:root {
  --ground: #EDF2EE;
  --surface: #FFFFFF;
  --surface-2: #F5F8F6;
  --ink: #0E2A25;
  --ink-2: #4E625C;
  --ink-3: #7A8B85;
  --line: #D1DCD6;
  --line-2: #E2EAE5;
  --teal: #0A6B5C;
  --teal-ink: #FFFFFF;
  --teal-soft: #D8ECE6;
  --cop: #4A3AA7;
  --cop-soft: #E8E4F7;
  --ok: #1B7F4A;
  --ok-soft: #DCF0E4;
  --warn: #9E650E;
  --warn-soft: #F6E9D2;
  --risk: #B3302A;
  --risk-soft: #F7DDDA;
  --doc-paper: #FFFFFF;
  --doc-ink: #1C1C1C;
  --doc-line: #BFBFBF;
  --shadow: 0 1px 2px rgba(14, 42, 37, .06), 0 8px 24px rgba(14, 42, 37, .07);
  --raise-hi: rgba(255, 255, 255, .95);
  --raise-sh: rgba(14, 42, 37, .12);
  --raise-edge: #C2D0C9;
  --guilloche-filter: none;

  --font-ui: "Archivo", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-doc: "Source Serif 4", "Songti SC", "SimSun", Georgia, "Times New Roman", serif;

  --r-s: 6px;
  --r-m: 10px;
  --tabbar-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0A1412;
    --surface: #11211E;
    --surface-2: #172A26;
    --ink: #E3EDE9;
    --ink-2: #A1B4AE;
    --ink-3: #72857E;
    --line: #29403B;
    --line-2: #1D302C;
    --teal: #46C3A9;
    --teal-ink: #062019;
    --teal-soft: #173A33;
    --cop: #B0A3FF;
    --cop-soft: #282350;
    --ok: #5BCB8C;
    --ok-soft: #15342A;
    --warn: #E5AB4C;
    --warn-soft: #3A2C14;
    --risk: #F27A6F;
    --risk-soft: #3D1F1C;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .35);
    --raise-hi: rgba(255, 255, 255, .07);
    --raise-sh: rgba(0, 0, 0, .45);
    --raise-edge: #16241F;
    --guilloche-filter: invert(1);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0A1412;
  --surface: #11211E;
  --surface-2: #172A26;
  --ink: #E3EDE9;
  --ink-2: #A1B4AE;
  --ink-3: #72857E;
  --line: #29403B;
  --line-2: #1D302C;
  --teal: #46C3A9;
  --teal-ink: #062019;
  --teal-soft: #173A33;
  --cop: #B0A3FF;
  --cop-soft: #282350;
  --ok: #5BCB8C;
  --ok-soft: #15342A;
  --warn: #E5AB4C;
  --warn-soft: #3A2C14;
  --risk: #F27A6F;
  --risk-soft: #3D1F1C;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .35);
  --raise-hi: rgba(255, 255, 255, .07);
  --raise-sh: rgba(0, 0, 0, .45);
  --raise-edge: #16241F;
  --guilloche-filter: invert(1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 15px/1.5 var(--font-ui);
  font-feature-settings: "tnum" 1;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Shell ---------- */
.app { min-height: 100vh; padding-bottom: calc(var(--tabbar-h) + 72px + env(safe-area-inset-bottom)); }
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
  background: var(--teal); color: var(--teal-ink);
  font-weight: 800; font-stretch: 75%; letter-spacing: .02em; font-size: 15px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 750; font-size: 17px; letter-spacing: -.01em; }
.brand-sub { font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; }
.lang {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px;
  padding: 5px 12px; font-size: 13px; font-weight: 650; letter-spacing: .04em;
}

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(6, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  border: 0; background: none; height: var(--tabbar-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3); font-size: 11.5px; font-weight: 600;
}
.tab svg { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--teal); }
.tab[aria-current="page"] .tab-code { background: var(--teal-soft); }
.tab-code { font-size: 10px; font-weight: 750; font-stretch: 80%; letter-spacing: .06em; padding: 1px 6px; border-radius: 4px; }

@media (min-width: 900px) {
  .app { padding-bottom: 48px; }
  .tabs { position: static; display: flex; gap: 2px; border: 0; background: none; padding: 0; }
  .tab { height: 38px; flex-direction: row; gap: 7px; padding: 0 12px; border-radius: 8px; font-size: 14px; color: var(--ink-2); }
  .tab svg { width: 18px; height: 18px; }
  .tab-code { display: none; }
  .tab:hover { background: var(--surface-2); }
  .tab[aria-current="page"] { background: var(--teal-soft); color: var(--ink); }
}

.view { max-width: 1120px; margin: 0 auto; padding: 20px 16px; outline: none; }

/* ---------- Client chip in the header ---------- */
.who {
  display: inline-flex; align-items: center; gap: 6px; max-width: min(42vw, 220px); min-height: 32px;
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 4px 12px 4px 8px;
  font-size: 13px; font-weight: 650; color: var(--ink-2);
}
.who svg { width: 17px; height: 17px; flex: none; }
@media (max-width: 520px) {
  .top-in { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .brand-sub { display: none; }
  .brand-mark { width: 30px; height: 30px; font-size: 13px; }
  .brand-name { font-size: 16px; }
  .who { max-width: 30vw; padding-right: 10px; }
  .lang { padding: 5px 9px; }
}
@media (max-width: 360px) { .brand-text { display: none; } }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who.on { border-color: var(--teal); background: var(--teal-soft); color: var(--ink); }
.who.on svg { color: var(--teal); }

/* ---------- More tools ---------- */
.back { border: 0; background: none; padding: 4px 0; margin: -6px 0 6px; color: var(--teal); font-weight: 650; font-size: 14px; }
.hub { margin-top: 22px; }
.hub-h { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.hub-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.hub-card {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center;
  text-align: left; padding: 14px; border-radius: var(--r-m); border: 1px solid var(--line-2); border-bottom-color: var(--raise-edge);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  box-shadow: 0 1px 1px var(--raise-sh), 0 3px 10px var(--raise-sh), inset 0 1px 0 var(--raise-hi); color: var(--ink);
  transition: transform .08s ease, box-shadow .15s ease, border-color .15s ease;
}
.hub-card:hover { border-color: var(--teal); }
.hub-card:active { transform: translateY(1px); box-shadow: inset 0 2px 4px var(--raise-sh); }
.hub-ic { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); }
.hub-ic svg { width: 24px; height: 24px; }
.hub-t { font-weight: 700; font-size: 15px; }
.hub-d { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.hub-client {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-m);
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.hub-client .case-txt { flex: 1; }
.hub-warn {
  display: grid; gap: 2px; width: 100%; text-align: left; margin-top: 10px; padding: 10px 14px; border-radius: var(--r-m);
  border: 1px solid transparent; background: var(--warn-soft); color: var(--ink); font-size: 13.5px;
}
.hub-warn b { color: var(--warn); }

/* ---------- Client files ---------- */
.case-av {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--teal); color: var(--teal-ink); font-weight: 800; font-size: 17px;
}
.case-av svg { width: 22px; height: 22px; }
.case-txt { display: grid; gap: 1px; min-width: 0; text-align: left; }
.case-txt b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-txt small { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-tools { display: flex; gap: 8px; }
.case-tools .text { flex: 1; }
.cases { display: grid; gap: 6px; }
.case { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: var(--r-m); padding: 4px 6px 4px 4px; background: var(--surface); }
.case.on { border-color: var(--teal); background: var(--teal-soft); }
.case-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 6px; color: inherit; }
.case-main .case-txt { flex: 1; }
.case-form { display: grid; gap: 14px; }

/* ---------- CRM ---------- */
.subtabs { display: flex; gap: 6px; overflow-x: auto; margin: -6px 0 14px; padding-bottom: 2px; scrollbar-width: none; }
.subtabs button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.subtabs button[aria-current="page"] { background: var(--teal); border-color: var(--teal); color: var(--teal-ink); }
.srch-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.srch-btn svg { width: 18px; height: 18px; }
.srch-bar { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); font-size: 14.5px; text-align: left; box-shadow: var(--shadow); }
.srch-bar svg { width: 20px; height: 20px; flex: none; color: var(--teal); }
.srch-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srch-bar kbd { font: 600 11px var(--font-ui); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; color: var(--ink-3); }
@media (max-width: 640px) { .srch-bar kbd { display: none; } }
.srch-box { align-items: center; padding-left: 10px; }
.srch-box svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.srch-cat h3 { margin: 6px 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.srch-cat h3 em { font-style: normal; color: var(--teal); }
.srch-row { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 10px; border: 1px solid var(--line-2); border-radius: var(--r-m); background: var(--surface); margin-bottom: 6px; color: inherit; }
.srch-row:hover, .srch-row:focus-visible { border-color: var(--teal); }
.srch-main { display: grid; gap: 1px; min-width: 0; }
.srch-main small { display: block; color: var(--ink-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-head { align-items: center; }
.crm-head .head-btns { margin-left: auto; display: flex; gap: 8px; }
.crm-head .btn svg, .rec-actions .btn svg, .btn.small svg, .quick .btn svg { width: 16px; height: 16px; flex: none; }
.btn.small { min-height: 32px; padding: 4px 10px; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
.btn.danger-soft { border-color: transparent; background: none; color: var(--risk); }
.foot-r { display: flex; gap: 8px; margin-left: auto; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat { display: grid; gap: 2px; text-align: left; padding: 12px; border-radius: var(--r-m); border: 1px solid var(--line-2); border-bottom-color: var(--raise-edge); background: linear-gradient(180deg, var(--surface), var(--surface-2)); box-shadow: 0 1px 1px var(--raise-sh), inset 0 1px 0 var(--raise-hi); color: var(--ink); }
.stat b { font-size: 26px; font-weight: 800; line-height: 1.1; font-stretch: 90%; }
.stat span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.stat.risk { background: var(--risk-soft); border-color: transparent; }
.stat.risk b { color: var(--risk); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.quick .btn { display: inline-flex; align-items: center; gap: 6px; }
.crm-sec { margin-top: 22px; }
.crm-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.crm-sec-h h2 { margin: 0; font-size: 15px; font-weight: 750; }
.risk-t { color: var(--risk); }
.crm-empty { color: var(--ink-3); font-size: 13.5px; margin: 4px 0; }
.clist { display: grid; gap: 8px; }
.crow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-m); background: var(--surface); }
.crow.fu-overdue { border-left: 4px solid var(--risk); }
.crow-main { flex: 1; min-width: 0; display: grid; gap: 2px; text-align: left; border: 0; background: none; padding: 0; color: inherit; }
.crow-main.row-av { display: flex; align-items: center; gap: 10px; }
.crow-main.row-av > span:last-child { display: grid; gap: 2px; min-width: 0; }
.crow-t { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow-t small { color: var(--ink-3); font-weight: 500; font-size: 12px; }
.crow-s { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.crow-btns { display: flex; align-items: center; gap: 6px; }
@media (max-width: 520px) { .crow { flex-wrap: wrap; } .crow-side { flex-direction: row; width: 100%; justify-content: space-between; align-items: center; } }
.qbtns { display: inline-flex; gap: 6px; }
.qbtn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); text-decoration: none; flex: none; }
.qbtn.wa { background: #DCF5E6; color: #128C4B; }
.qbtn svg { width: 17px; height: 17px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2); }
.case-av.sq { border-radius: 10px; background: var(--surface-2); color: var(--teal); border: 1px solid var(--line-2); }
.case-av.sq svg { width: 20px; height: 20px; }
.case-av.own { background: var(--cop); }
.case-av.lead { background: var(--warn); }
.case-av.lg { width: 56px; height: 56px; font-size: 24px; }
.crm-seg { margin-bottom: 10px; }
.crm-seg small { opacity: .75; font-weight: 500; }
.crm-filter { align-items: center; padding-left: 10px; margin-bottom: 8px; }
.crm-filter svg { width: 17px; height: 17px; color: var(--ink-3); flex: none; }
.crm-chips { margin-bottom: 10px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pcard { display: grid; text-align: left; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-m); overflow: hidden; background: var(--surface); color: inherit; box-shadow: 0 1px 1px var(--raise-sh); }
.pcard:hover { border-color: var(--teal); }
.pcard-img { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-img svg { width: 36px; height: 36px; }
.pcard-deal { position: absolute; left: 8px; top: 8px; font-size: 11.5px; font-weight: 750; padding: 3px 9px; border-radius: 999px; background: var(--teal); color: var(--teal-ink); }
.pcard-body { display: grid; gap: 3px; padding: 10px 12px 12px; min-width: 0; }
.pcard-body b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-price { font-size: 17px; font-weight: 800; color: var(--teal); }
.rec-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.rec-main { display: grid; gap: 4px; min-width: 0; flex: 1; }
.rec-main h1 { margin: 0; font-size: clamp(22px, 4vw, 28px); line-height: 1.15; overflow-wrap: anywhere; }
.rec-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.rec-contact a[href^="mailto"] { color: var(--teal); }
.rec-price { font-size: 24px; font-weight: 800; color: var(--teal); }
.rec-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.rec-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.crm-kv { margin: 6px 0 4px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.crm-kv dd { font-size: 14.5px; font-weight: 600; }
.crm-kv .wide { grid-column: 1 / -1; }
.crm-kv .wide dd { font-weight: 450; font-size: 14px; line-height: 1.5; }
.crm-status { max-width: 260px; margin-bottom: 8px; }
.gallery { display: grid; gap: 6px; margin-bottom: 12px; }
.g-cover { aspect-ratio: 16 / 9; border-radius: var(--r-m); overflow: hidden; background: var(--surface-2); }
.g-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.g-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.g-empty { display: grid; place-items: center; gap: 6px; aspect-ratio: 16 / 7; border: 1.5px dashed var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--teal); font-weight: 650; }
.g-empty svg { width: 32px; height: 32px; }
.req { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line-2); border-radius: var(--r-m); background: var(--surface); margin-bottom: 8px; }
.req.dim { opacity: .65; }
.req-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.req-h > span { display: flex; align-items: center; gap: 6px; flex: none; }
.req-h .icon-btn svg { width: 16px; height: 16px; }
.mlist { display: grid; gap: 6px; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-s); background: var(--surface-2); }
.mrow .crow-main { gap: 3px; }
.score { flex: none; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; }
.score.shi { background: var(--ok); } .score.smid { background: var(--warn); } .score.slo { background: var(--ink-3); }
.mparts { display: flex; flex-wrap: wrap; gap: 4px; }
.mk { font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 999px; }
.mk.m-match, .mk.m-any { background: var(--ok-soft); color: var(--ok); }
.mk.m-partial { background: var(--warn-soft); color: var(--warn); }
.mk.m-miss { background: var(--risk-soft); color: var(--risk); }
@media (max-width: 520px) { .mrow { flex-wrap: wrap; } .mrow .crow-main { flex-basis: calc(100% - 64px); } }
.qlog { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line-2); border-radius: var(--r-m); background: var(--surface); margin-bottom: 12px; }
.qlog .btn { justify-self: end; }
.tl-list { list-style: none; margin: 0; padding: 0 0 0 6px; border-left: 2px solid var(--line-2); display: grid; gap: 12px; }
.tl { position: relative; display: flex; gap: 10px; padding-left: 12px; }
.tl-dot { position: absolute; left: -12px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--teal); border: 2px solid var(--ground); }
.tl-status .tl-dot, .tl-price .tl-dot { background: var(--cop); }
.tl-viewing .tl-dot { background: var(--warn); }
.tl-create .tl-dot { background: var(--ink-3); }
.tl-h { display: flex; gap: 10px; align-items: baseline; font-size: 13px; }
.tl-h time { color: var(--ink-3); font-size: 12px; }
.tl-t { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.crm-form { display: grid; gap: 12px; }
.crm-form .field em { color: var(--risk); font-style: normal; }
.f-info { font-size: 14px; padding: 8px 10px; border-radius: var(--r-s); background: var(--surface-2); }
.ph-manage { display: grid; gap: 10px; }
.phm { display: grid; grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: auto auto; gap: 6px 10px; align-items: center; padding: 8px; border: 1px solid var(--line-2); border-radius: var(--r-m); }
.phm-img { grid-row: 1 / 3; position: relative; width: 96px; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.phm-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phm-cover { position: absolute; left: 4px; top: 4px; font-size: 10.5px; font-weight: 750; padding: 1px 6px; border-radius: 999px; background: var(--teal); color: var(--teal-ink); }
.phm-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.phm-btns .btn { min-height: 36px; padding: 4px 10px; }
.snap-list { display: grid; gap: 6px; }
.snap { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--r-s); }
.snap > span { flex: 1; display: grid; min-width: 0; }
.snap small { color: var(--ink-3); font-size: 12px; }

/* ---------- CRM V1.1 ---------- */
button.qbtn { border: 0; padding: 0; cursor: pointer; }
.wa-lang { margin-bottom: 4px; }
.wa-warn { color: var(--warn); }
.wa-open { display: inline-flex; align-items: center; gap: 6px; background: #1FA855 !important; border-color: #1FA855 !important; color: #fff !important; }
.wa-open svg { width: 18px; height: 18px; }
.quick.links .btn { font-size: 13.5px; }
.seq-list, .tpl-list { display: grid; gap: 8px; }
.seq { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-m); background: var(--surface); }
.seq.dim { opacity: .6; }
.seq > span { flex: 1; display: grid; gap: 2px; min-width: 0; }
.seq small, .tpl-m { color: var(--ink-3); font-size: 12.5px; }
.tpl { display: grid; gap: 4px; text-align: left; padding: 12px; border: 1px solid var(--line-2); border-radius: var(--r-m); background: var(--surface); color: inherit; }
.tpl:hover { border-color: var(--teal); }
.tpl-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tpl-h small { color: var(--ink-3); font-size: 12px; }
.tpl-m { line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.step-row { display: grid; grid-template-columns: 108px minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 8px; border: 1px solid var(--line-2); border-radius: var(--r-s); margin-bottom: 6px; }
.step-row .wide { grid-column: 1 / 3; }
.step-row .day input { text-align: center; }
.step-row .day .unit { padding: 0 6px; }
.stage-bar { margin: 12px 0 0; }
.stage-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.stage-chips .chip { flex: none; }
.stage-chips .st-closed[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.stage-chips .st-lost[aria-pressed="true"] { background: var(--ink-3); border-color: var(--ink-3); }
.tip.sug { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--cop-soft); border-color: transparent; color: var(--ink); margin-top: 6px; }
.kb { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 260px); gap: 10px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.kb-col { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-m); padding: 8px; display: flex; flex-direction: column; min-height: 240px; scroll-snap-align: start; transition: border-color .12s, background .12s; }
.kb-col h3 { margin: 2px 4px 8px; font-size: 13px; display: flex; justify-content: space-between; }
.kb-col h3 em { font-style: normal; color: var(--ink-3); }
.kb-closed h3 { color: var(--ok); } .kb-lost h3 { color: var(--ink-3); }
.kb-col.kb-over { border-color: var(--teal); background: var(--teal-soft); }
.kb-cards { display: grid; gap: 6px; align-content: start; }
.kb-empty { color: var(--ink-3); font-size: 13px; text-align: center; padding: 10px; }
.kb-card { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--surface); box-shadow: 0 1px 1px var(--raise-sh); }
.kb-card.lead { border-left: 3px solid var(--warn); }
.kb-card.kb-dragging { opacity: .35; }
.kb-grip { border: 0; background: none; color: var(--ink-3); padding: 0 6px; cursor: grab; touch-action: none; font-size: 16px; }
.kb-body { flex: 1; min-width: 0; display: grid; gap: 1px; text-align: left; border: 0; background: none; padding: 8px 4px; color: inherit; }
.kb-body b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-body small { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-next { border: 0; border-left: 1px solid var(--line-2); background: none; color: var(--teal); font-size: 20px; padding: 0 10px; }
.kb-ghost { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; opacity: .92; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
.pill.exp-d30 { background: var(--warn-soft); color: var(--warn); }
.pill.exp-d14 { background: var(--warn-soft); color: var(--warn); }
.pill.exp-d7, .pill.exp-d1, .pill.exp-expired { background: var(--risk-soft); color: var(--risk); }
.pcard-exp { position: absolute; right: 8px; top: 8px; }
.pcard-exp .pill { background: var(--surface); }
.exp-row.exp-d7, .exp-row.exp-d1, .exp-row.exp-expired { border-left: 4px solid var(--risk); }
.exp-row.exp-d14, .exp-row.exp-d30 { border-left: 4px solid var(--warn); }
.smart { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 2px; }
.smart .pill { font-size: 11px; padding: 1px 8px; }
.smart-r { font-size: 11.5px; color: var(--cop); font-weight: 600; white-space: normal; }
.stat.good { background: var(--ok-soft); border-color: transparent; }
.stat.good b { color: var(--ok); }
.rb-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; align-items: center; }
.rb-legend span { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: -8px; }
.rb { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.rb-l { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-bars { display: grid; gap: 3px; }
.rb-bar { display: flex; align-items: center; gap: 6px; font-size: 11.5px; }
.rb-bar i { display: block; height: 9px; width: var(--w); min-width: 2px; border-radius: 5px; background: var(--c); }
.rb-bar b { font-weight: 700; color: var(--ink-2); }
.rpt-tbl td small { display: block; color: var(--ink-3); font-size: 11.5px; }
.doc-img { width: 100%; height: auto; border-radius: var(--r-s); }

/* ---------- Offer letter and receipts ---------- */
.offer-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding: 12px 14px; border-radius: var(--r-s); background: var(--surface-2); border: 1px solid var(--line-2); }
.offer-sum > div { display: grid; gap: 1px; min-width: 0; }
.offer-sum .wide { grid-column: 1 / -1; }
.offer-sum span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.offer-sum b { font-size: 14px; overflow-wrap: anywhere; }
.offer-sum .link { grid-column: 1 / -1; justify-self: start; font-size: 13px; }
.sig-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--surface-2); }
.sig-row > span { flex: 1; display: grid; min-width: 0; }
.sig-row small { color: var(--ink-3); font-size: 12.5px; }
.sig-row img { height: 40px; max-width: 110px; object-fit: contain; background: #fff; border-radius: 4px; padding: 2px 6px; }
.rc-list { display: grid; gap: 8px; }
.rc { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--surface); }
.rc > span:first-child { flex: 1; display: grid; min-width: 0; }
.rc small { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc .amt { font-weight: 750; white-space: nowrap; }
.rc .btn { min-height: 34px; padding: 4px 12px; }

.rem-list { display: grid; gap: 6px; }
.rem-list > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 10px; font-size: 13.5px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.rem-list b { font-weight: 700; }
.rem-list span { color: var(--ink-2); }
.btn-report[disabled] { opacity: .45; pointer-events: none; }

/* ---------- Photos, handover rooms, flyer ---------- */
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.ph { position: relative; aspect-ratio: 1; border-radius: var(--r-s); overflow: hidden; border: 1px solid var(--line-2); background: var(--surface-2); padding: 0; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph.missing::after { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); }
.ph.add { display: grid; place-items: center; align-content: center; gap: 4px; border: 1.5px dashed var(--line); color: var(--teal); font-size: 11.5px; font-weight: 650; text-align: center; padding: 6px; }
.ph.add svg { width: 26px; height: 26px; }
.room { border: 1px solid var(--line-2); border-radius: var(--r-m); background: var(--surface); }
.room summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.room summary::-webkit-details-marker { display: none; }
.room summary::before { content: "▸"; color: var(--ink-3); transition: transform .15s; }
.room[open] summary::before { transform: rotate(90deg); }
.room-name { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-meta { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.room-body { display: grid; gap: 10px; padding: 0 14px 14px; }
.room-top { display: flex; gap: 8px; }
.room-top .text { flex: 1; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; padding-top: 8px; border-top: 1px solid var(--line-2); }
.item .text { min-height: 38px; }
.item .text input { font-size: 14.5px; padding: 6px 8px; }
.item .note { grid-column: 1 / -1; }
.cond { display: flex; gap: 4px; }
.cond button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 10px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.cond .c-good[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.cond .c-fair[aria-pressed="true"] { background: var(--warn); border-color: var(--warn); color: #fff; }
.cond .c-bad[aria-pressed="true"] { background: var(--risk); border-color: var(--risk); color: #fff; }
@media (max-width: 420px) { .item { grid-template-columns: minmax(0, 1fr); } }
.fly-slip { padding: 0; overflow: hidden; }
.fly-prev { background: var(--surface-2); padding: 14px; display: grid; place-items: center; }
.fly-canvas { display: block; width: 100%; max-width: 360px; height: auto; border-radius: 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 14px 32px rgba(0, 0, 0, .18); }

/* ---------- My details: name-card preview ---------- */
.namecard {
  display: grid; gap: 10px; padding: 22px; border-radius: 14px; color: #fff; align-self: start;
  background: linear-gradient(135deg, #08604F 0%, #17A088 100%);
  box-shadow: 0 2px 2px rgba(0, 0, 0, .12), 0 18px 40px rgba(8, 96, 79, .35);
}
.namecard .f-hint { color: rgba(255, 255, 255, .7); }
.nc-top { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }
.nc-top small { display: block; font-weight: 500; opacity: .8; font-size: 12px; }
.nc-mark { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: #fff; color: #08604F; font-weight: 800; font-size: 14px; }
.nc-name { font-size: 24px; font-weight: 800; letter-spacing: -.01em; margin-top: 8px; overflow-wrap: anywhere; }
.nc-ren { font-size: 13px; font-weight: 700; letter-spacing: .08em; opacity: .9; }
.nc-lines { font-size: 13.5px; line-height: 1.55; opacity: .92; overflow-wrap: anywhere; }

/* ---------- Screen header ---------- */
.screen-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 14px; margin: 4px 0 18px; }
.screen-head h1 {
  margin: 0; font-size: clamp(24px, 4.2vw, 32px); line-height: 1.15; font-weight: 750;
  letter-spacing: -.015em; text-wrap: balance;
}
.screen-head .lede { flex-basis: 100%; margin: 0; color: var(--ink-2); max-width: none; padding-right: max(0px, calc(100% - 62ch)); box-sizing: border-box; font-size: 14px; }
.sample {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2);
  border: 1px dashed var(--line); border-radius: 999px; padding: 3px 4px 3px 10px; margin-bottom: 4px;
}
.sample b { font-weight: 650; color: var(--warn); letter-spacing: .04em; }

/* ---------- Calculator layout ---------- */
.calc { display: grid; gap: 20px; align-items: start; }
@media (min-width: 900px) {
  .calc { grid-template-columns: minmax(0, 1fr) 410px; gap: 28px; }
  .calc.review { grid-template-columns: 340px minmax(0, 1fr); }
  .calc > .slip { position: sticky; top: 76px; }
}
.inputs { display: grid; gap: 14px; min-width: 0; }
.group { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-m); padding: 16px; display: grid; gap: 14px; }
.group-title {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
}
.group-title .link { text-transform: none; letter-spacing: 0; font-size: 13px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 350px) { .row2 { grid-template-columns: minmax(0, 1fr); } }   /* small phones: one field per row */
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 420px) { .row3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.field { display: grid; gap: 6px; min-width: 0; }
.f-label { font-size: 13.5px; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; gap: 8px; }
.f-label em { font-style: normal; font-weight: 500; color: var(--ink-3); font-size: 12.5px; }
.f-hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.f-hint b { color: var(--ink-2); font-weight: 650; }

.money, .stepper, .text {
  display: flex; align-items: stretch; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-s); min-height: 44px; overflow: hidden;
}
.money:focus-within, .stepper:focus-within, .text:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.money .unit, .stepper .suffix {
  display: grid; place-items: center; padding: 0 10px; color: var(--ink-3); font-size: 13px; font-weight: 600;
}
.money input, .stepper input, .text input, .text textarea, .text select {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none; padding: 8px 10px;
  font-size: 16px; font-weight: 600;
}
.text input, .text textarea, .text select { font-weight: 500; }
.text textarea { resize: vertical; min-height: 64px; line-height: 1.45; }
.money input { padding-left: 0; }
.stepper input { text-align: center; padding-left: 2px; padding-right: 2px; }
.stepper .suffix { padding: 0 6px 0 0; }
.stepper button { flex: none; border: 0; background: none; width: 42px; font-size: 20px; color: var(--teal); font-weight: 500; }
@media (max-width: 420px) { .stepper button { width: 34px; } }   /* two steppers side by side still show "4.20" */
.stepper button:hover { background: var(--teal-soft); }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button, .chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-s);
  padding: 8px 12px; min-height: 40px; font-size: 14px; font-weight: 600; color: var(--ink-2);
  flex: 1 1 auto; white-space: nowrap;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { flex: 0 1 auto; border-radius: 999px; padding: 6px 12px; min-height: 36px; font-size: 13.5px; }
.seg button:hover, .chip:hover { border-color: var(--teal); color: var(--ink); }
.seg button[aria-pressed="true"], .chip[aria-pressed="true"] {
  background: var(--teal); border-color: var(--teal); color: var(--teal-ink);
}
.seg button small { display: block; font-size: 11px; font-weight: 500; opacity: .8; }

.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 550; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  width: 42px; height: 24px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background .15s;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s;
}
.switch input:checked + .track { background: var(--teal); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--teal); outline-offset: 2px; }
.switch .sw-text { display: grid; gap: 1px; }
.switch .sw-text small { color: var(--ink-3); font-weight: 450; font-size: 12.5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px;
  padding: 8px 16px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface);
  font-weight: 650; font-size: 14px; color: var(--ink);
}
.btn:hover { border-color: var(--teal); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: var(--teal-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn svg { width: 17px; height: 17px; }
.link { border: 0; background: none; padding: 0; color: var(--teal); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- Result slip ---------- */
.slip { background: var(--surface); border-radius: var(--r-m); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.slip-head { position: relative; background: var(--teal); color: var(--teal-ink); padding: 18px 20px 20px; isolation: isolate; }
.slip-head::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .16;
  background-image: var(--guilloche, none); background-size: 420px auto; background-position: right -40px center;
  filter: var(--guilloche-filter);
}
.slip-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 12px;
  background: radial-gradient(circle at 6px 6px, var(--surface) 4px, transparent 4.5px) 0 0 / 14px 12px repeat-x;
}
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.big { font-size: clamp(34px, 7vw, 46px); line-height: 1.05; font-weight: 750; font-stretch: 82%; letter-spacing: -.01em; margin-top: 4px; }
.big small { font-size: .42em; font-weight: 600; opacity: .8; margin-left: 4px; font-stretch: 100%; }
.slip-sub { font-size: 13px; opacity: .88; margin-top: 4px; }
.slip-body { padding: 18px 20px 20px; display: grid; gap: 16px; }

.kv { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.kv > div { display: grid; gap: 1px; min-width: 0; }
.kv dt { font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: .02em; }
.kv dd { margin: 0; font-size: 17px; font-weight: 700; font-stretch: 90%; overflow-wrap: anywhere; }

.ledger { display: grid; border-top: 1px solid var(--line); }
.l-sec { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); padding: 12px 0 4px; }
.l-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-size: 14px; }
.l-row > span:first-child { color: var(--ink-2); min-width: 0; }
.l-row .amt { font-weight: 700; white-space: nowrap; }
.l-row .amt s { color: var(--ink-3); font-weight: 500; margin-right: 6px; }
.l-math { font-size: 12px; color: var(--ink-3); padding: 0 0 6px; margin-top: -3px; border-bottom: 1px dashed var(--line-2); }
.l-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0 2px; border-top: 2px solid var(--ink); margin-top: 6px; font-weight: 750; }
.l-total .amt { font-size: 22px; font-stretch: 85%; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 3px 10px; letter-spacing: .02em; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.risk { background: var(--risk-soft); color: var(--risk); }
.slip-head .pill { background: var(--surface); }

.seal {
  display: inline-grid; place-items: center; text-align: center; color: var(--cop); border: 2px solid var(--cop);
  outline: 1px solid var(--cop); outline-offset: 2px; border-radius: 6px; padding: 4px 10px; transform: rotate(-6deg);
  font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; line-height: 1.2; flex: none;
}
.seal b { font-size: 15px; letter-spacing: .02em; font-stretch: 85%; }

.note { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.note b { color: var(--ink-2); }
.tip { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 10px 12px; font-size: 13.5px; color: var(--ink-2); display: grid; gap: 4px; }
.tip strong { color: var(--ink); }
.tip.risk { background: var(--risk-soft); border-color: transparent; color: var(--ink); }
.tip.cop { background: var(--cop-soft); border-color: transparent; color: var(--ink); }

/* gauge */
.gauge { display: grid; gap: 6px; }
.gauge-bar { position: relative; height: 12px; border-radius: 999px; overflow: hidden; display: flex; background: var(--line-2); }
.gauge-bar i { display: block; height: 100%; }
.gauge-bar .z-ok { background: var(--ok); opacity: .55; }
.gauge-bar .z-warn { background: var(--warn); opacity: .55; }
.gauge-bar .z-risk { background: var(--risk); opacity: .55; }
.gauge-mark { position: relative; height: 16px; }
.gauge-mark span { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; color: var(--ink-3); }
.gauge-track { position: relative; margin-top: 4px; }
.gauge-pin { position: absolute; top: -4px; width: 4px; height: 20px; background: var(--ink); border-radius: 2px; transform: translateX(-50%); box-shadow: 0 0 0 2px var(--surface); }

/* chart */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--ink-3); font-size: 11px; font-family: var(--font-ui); }
.chart .grid { stroke: var(--line-2); stroke-width: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }

details.more { border-top: 1px solid var(--line); padding-top: 10px; }
details.more summary { cursor: pointer; font-weight: 650; font-size: 14px; color: var(--teal); }
.tbl-wrap { overflow-x: auto; margin-top: 10px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl th { font-size: 11.5px; color: var(--ink-3); font-weight: 700; letter-spacing: .04em; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl tr.hl td { background: var(--teal-soft); font-weight: 700; }

/* compare two columns */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line-2); border-radius: var(--r-s); overflow: hidden; }
.duo > div { background: var(--surface); padding: 12px; display: grid; gap: 2px; align-content: start; }
.duo .d-name { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--ink-3); }
.duo .d-fig { font-size: 22px; font-weight: 750; font-stretch: 85%; }
.duo .d-fig small { font-size: 12px; font-weight: 600; color: var(--ink-3); font-stretch: 100%; }
.duo .d-sub { font-size: 12px; color: var(--ink-3); }

.cmp { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp th, .cmp td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid var(--line-2); }
.cmp th { font-size: 12px; color: var(--ink-3); width: 26%; font-weight: 650; }
.cmp thead th { color: var(--ink); font-size: 13px; font-weight: 800; letter-spacing: .04em; }

input[type="range"] { width: 100%; accent-color: var(--teal); }

/* mini bar (mobile) */
.mini {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); z-index: 25;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--teal); color: var(--teal-ink); border: 0; border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow);
  font-size: 13px; font-weight: 600; text-align: left;
}
.mini b { font-size: 19px; font-weight: 750; font-stretch: 85%; }
@media (min-width: 900px) { .mini { display: none !important; } }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 80px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 8px; font-size: 14px; font-weight: 600;
  transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 32px; } }

/* ---------- Tenancy wizard ---------- */
.steps { list-style: none; margin: 0 0 16px; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.steps button {
  display: flex; align-items: center; gap: 8px; white-space: nowrap; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 5px 12px 5px 5px; font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.steps .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 12px; font-weight: 750; }
.steps button.done .n { background: var(--teal-soft); color: var(--teal); }
.steps button[aria-current="step"] { border-color: var(--teal); color: var(--ink); }
.steps button[aria-current="step"] .n { background: var(--teal); color: var(--teal-ink); }
.wiz-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }

.party { display: grid; gap: 12px; padding: 14px; border: 1px dashed var(--line); border-radius: var(--r-s); }
.party-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 700; font-size: 14px; }
.party-tools { display: flex; gap: 14px; align-items: center; flex: none; }

/* ID scanning */
html.no-ocr [data-act="ocr"] { display: none; }
.btn-scan {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 7px 14px 7px 11px; border-radius: 999px;
  border: 1px solid var(--line); border-bottom-color: var(--raise-edge);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  color: var(--teal); font-size: 13px; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
  box-shadow: 0 1px 1px var(--raise-sh), 0 3px 8px var(--raise-sh), inset 0 1px 0 var(--raise-hi);
  transition: transform .08s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn-scan svg { width: 17px; height: 17px; }
.btn-scan:hover { border-color: var(--teal); box-shadow: 0 2px 2px var(--raise-sh), 0 6px 14px var(--raise-sh), inset 0 1px 0 var(--raise-hi); }
.btn-scan:active { transform: translateY(1px); box-shadow: inset 0 2px 4px var(--raise-sh); background: var(--surface-2); }
/* Reports */
.btn-report {
  display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 48px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid transparent; border-bottom-color: rgba(0, 0, 0, .22);
  background: var(--teal);
  box-shadow: 0 1px 1px var(--raise-sh), 0 5px 14px var(--raise-sh), inset 0 1px 0 rgba(255, 255, 255, .35);
  background: linear-gradient(180deg, color-mix(in srgb, var(--teal) 82%, #fff) 0%, var(--teal) 100%);
  color: var(--teal-ink); font-size: 15px; font-weight: 750; letter-spacing: .01em;
  box-shadow: 0 1px 1px var(--raise-sh), 0 5px 14px color-mix(in srgb, var(--teal) 35%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .08s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-report svg { width: 19px; height: 19px; flex: none; }
.btn-report:hover { filter: brightness(1.06); box-shadow: 0 2px 2px var(--raise-sh), 0 8px 20px color-mix(in srgb, var(--teal) 40%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-report:active { transform: translateY(1px); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .25); }
.rep-fields { display: grid; gap: 10px 12px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.rep-fields .field { margin: 0; min-width: 0; }
.rep-fields .field:first-child { grid-column: 1 / -1; }
.rep-pages { display: grid; gap: 14px; padding: 14px; margin: -4px -4px 0; border-radius: var(--r-s); background: var(--surface-2); min-height: 200px; }
.rep-pages img { display: block; width: 100%; height: auto; border-radius: 4px; background: #fff; box-shadow: 0 1px 2px rgba(14, 42, 37, .12), 0 8px 22px rgba(14, 42, 37, .14); }
.sheet-foot .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 1; }
.sheet-foot .btn svg { width: 18px; height: 18px; flex: none; }
.ocr-prog { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.ocr-prog i { display: block; height: 100%; background: var(--teal); transition: width .3s ease; }
.ocr-thumb { width: 100%; max-height: 180px; object-fit: contain; background: var(--surface-2); border-radius: var(--r-s); }
.ocr-raw { max-height: 160px; overflow: auto; white-space: pre-wrap; font-size: 11.5px; line-height: 1.5; color: var(--ink-2); background: var(--surface-2); padding: 10px; border-radius: var(--r-s); margin: 8px 0 0; }
.ocr-check { margin: 0; padding: 8px 12px; border-radius: var(--r-s); background: var(--ok-soft); color: var(--ok); font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.ocr-check.warn { background: var(--warn-soft); color: var(--warn); }
.scan-tips { margin: 0; padding-left: 20px; display: grid; gap: 7px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.scan-tips b { color: var(--ink); }
.scan-tips li::marker { color: var(--teal); }

/* Scanner: line up the card's corners. A camera-style dark screen in either theme. */
.crop {
  --c-bg: #0B1311; --c-ink: #E9F1EE; --c-dim: rgba(233, 241, 238, .66); --c-line: rgba(233, 241, 238, .18);
  --c-hi: #5EEAD4;
  position: fixed; inset: 0; z-index: 45; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--c-bg); color: var(--c-ink);
  padding-top: env(safe-area-inset-top);
}
.crop-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 16px 6px; }
.crop-eyebrow { font-size: 12px; font-weight: 650; color: var(--c-hi); letter-spacing: .02em; }
.crop-title { font-size: 16px; font-weight: 700; line-height: 1.3; margin-top: 2px; text-wrap: balance; }
.crop-x { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--c-line); background: transparent; color: var(--c-ink); font-size: 22px; line-height: 1; }
.crop-stage { position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.crop-img { position: absolute; display: block; }
.crop-ov { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.crop-shade { fill: rgba(0, 0, 0, .55); }
.crop-edge { fill: none; stroke: var(--c-hi); stroke-width: 2; }
.crop-topedge { stroke: var(--c-hi); stroke-width: 5; stroke-linecap: round; }
.crop-toplabel { fill: var(--c-hi); font-size: 12px; font-weight: 700; paint-order: stroke; stroke: rgba(0, 0, 0, .75); stroke-width: 3px; }
.crop-dot { fill: rgba(94, 234, 212, .22); stroke: var(--c-hi); stroke-width: 2.5; }
.crop-loupe { position: absolute; top: 12px; border-radius: 50%; border: 2px solid var(--c-hi); box-shadow: 0 6px 18px rgba(0, 0, 0, .5); pointer-events: none; }
.crop-foot { display: grid; gap: 10px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--c-line); }
.crop-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crop-prev { margin: 0; display: flex; align-items: center; gap: 8px; min-width: 0; }
.crop-prev canvas { flex: none; display: block; border-radius: 4px; border: 1px solid var(--c-line); background: #000; }
.crop-prev figcaption { font-size: 12px; line-height: 1.35; color: var(--c-dim); max-width: 8.5em; }
.crop .seg { margin-left: auto; flex-wrap: nowrap; }
.crop .seg button { background: transparent; border-color: var(--c-line); color: var(--c-dim); min-height: 36px; padding: 6px 10px; font-size: 13px; }
.crop .seg button[aria-pressed="true"] { background: var(--c-hi); border-color: var(--c-hi); color: #062521; }
.crop .btn { background: transparent; border-color: var(--c-line); color: var(--c-ink); }
.crop .btn.primary { flex: 1; background: var(--c-hi); border-color: var(--c-hi); color: #062521; }
.crop .btn svg { width: 17px; height: 17px; }

/* Scanner: the app's own live camera */
.live { --c-ok: #4ADE80; }
.live-stage { position: relative; overflow: hidden; background: #000; }
.live-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.live-ov { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.live-shade { fill: rgba(0, 0, 0, .5); }
.live-corner { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; transition: stroke .2s ease; }
.live[data-state="reading"] .live-corner { stroke: var(--c-hi); }
.live[data-state="ok"] .live-corner { stroke: var(--c-ok); }
.live-hint {
  position: absolute; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px);
  padding: 7px 14px; border-radius: 999px; background: rgba(0, 0, 0, .62); color: #fff;
  font-size: 14px; font-weight: 650; line-height: 1.35; text-align: center;
}
.live-panel {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px;
  background: rgba(11, 19, 17, .94); color: var(--c-ink); text-align: center; font-size: 15px; line-height: 1.5;
}
.live-panel p { margin: 0; max-width: 30em; }
.live-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; font-weight: 600; color: var(--c-dim); min-width: 0; }
.live-steps li { display: flex; align-items: center; gap: 6px; }
.live-steps i { position: relative; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid var(--c-line); }
.live-steps li[data-s="part"] i { border-color: var(--c-hi); border-top-color: transparent; animation: rk-spin 1s linear infinite; }
.live-steps li[data-s="ok"] { color: var(--c-ink); }
.live-steps li[data-s="ok"] i { background: var(--c-ok); border-color: var(--c-ok); }
.live-steps li[data-s="ok"] i::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
  border: solid #062521; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.live .btn[aria-pressed="true"] { background: var(--c-hi); color: #062521; border-color: var(--c-hi); }
@keyframes rk-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .live-steps li[data-s="part"] i { animation: none; } .live-corner { transition: none; } }

.inv { display: grid; gap: 8px; }
.inv-row { display: grid; grid-template-columns: minmax(0, 1fr) 128px 36px; gap: 8px; align-items: center; }
.inv-row .stepper { min-height: 40px; }
.inv-row .stepper button { width: 36px; }
.icon-btn { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-s); height: 36px; width: 36px; display: grid; place-items: center; color: var(--ink-3); }
.icon-btn:hover { color: var(--risk); border-color: var(--risk); }

.check-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.check-list li { display: flex; gap: 8px; align-items: baseline; }
.check-list li::before { content: "✓"; color: var(--ok); font-weight: 800; }
.check-list li.miss::before { content: "!"; color: var(--risk); }
.check-list li.miss { color: var(--risk); }
.check-list li.warn::before { content: "!"; color: var(--warn); }
.check-list li.info::before { content: "i"; color: var(--ink-3); font-style: italic; }
.law-list { gap: 10px; }
.law-list li > span { display: grid; gap: 1px; }
.check-list .law { font-size: 11.5px; color: var(--ink-3); letter-spacing: .01em; }
.group-title .pill { text-transform: none; letter-spacing: .02em; }

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

/* document preview */
.doc-wrap { overflow-x: auto; }
.doc {
  background: var(--doc-paper); color: var(--doc-ink); font-family: var(--font-doc); font-size: 14px; line-height: 1.62;
  max-width: 760px; margin: 0 auto; padding: clamp(22px, 5vw, 56px); border-radius: 4px; box-shadow: var(--shadow);
  font-feature-settings: "tnum" 0, "lnum" 1;
}
.doc h1 { font-size: 22px; text-align: center; letter-spacing: .12em; margin: 0 0 4px; font-weight: 700; }
.doc .d-center { text-align: center; margin: 0 0 14px; }
/* Cover: the date line, and the title between a thin-thick and a thick-thin rule with a diamond on each */
.doc .d-dated { text-align: center; margin: 0 0 14px; font-weight: 700; font-size: 1.08em; letter-spacing: .08em; text-wrap: balance; }
.doc sup { font-size: .6em; line-height: 0; vertical-align: .75em; letter-spacing: .02em; margin-left: .05em; }
.doc .d-cover-title { position: relative; margin: 10px 8% 18px; padding: 20px 0 18px; text-align: center; }
.doc .d-cover-title::before, .doc .d-cover-title::after {
  content: ""; position: absolute; left: 0; right: 0; height: 7px; box-sizing: border-box;
  border-color: var(--doc-ink); border-style: solid; border-width: 1px 0 3px;
}
.doc .d-cover-title::before { top: 0; }
.doc .d-cover-title::after { bottom: 0; border-width: 3px 0 1px; }
.doc .d-cover-title h1 {
  margin: 0; font-size: clamp(20px, 4.4vw, 28px); letter-spacing: .3em; padding-left: .3em; line-height: 1.3;
}
.doc .d-cover-title h1::before, .doc .d-cover-title h1::after {
  content: "◆"; position: absolute; left: 50%; transform: translate(-50%, -50%); z-index: 1;
  padding: 0 10px; background: var(--doc-paper); font-size: 11px; line-height: 1; letter-spacing: 0;
}
.doc .d-cover-title h1::before { top: 3.5px; }
.doc .d-cover-title h1::after { top: calc(100% - 3.5px); }
.doc h2 { font-size: 14.5px; margin: 22px 0 6px; letter-spacing: .04em; text-transform: uppercase; font-weight: 700; text-wrap: balance; }
.doc p { margin: 0 0 9px; text-align: justify; hyphens: auto; }
.doc .cl { display: grid; grid-template-columns: 3.1em minmax(0, 1fr); margin: 0 0 8px; }
.doc .cl.sub { grid-template-columns: 3.1em 2.4em minmax(0, 1fr); }
.doc .pb { border-top: 1px dashed var(--doc-line); margin: 28px -8px; position: relative; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: 13.5px; }
/* State the colour and face on the cells too: without a doctype a page runs in quirks mode,
   where tables do not inherit them and the schedules would print in the app's light ink. */
.doc table, .doc td, .doc th { color: var(--doc-ink); font-family: var(--font-doc); }
.doc td, .doc th { border: 1px solid var(--doc-line); padding: 6px 8px; vertical-align: top; text-align: left; }
.doc td:first-child { width: 34%; font-weight: 600; }
.doc .sign td { border: 0; padding: 10px 8px 22px; width: 50%; font-weight: 400; }
.doc .sig-line { border-bottom: 1px solid var(--doc-ink); height: 56px; margin-bottom: 6px; }
.doc .blank { display: inline-block; min-width: 9em; border-bottom: 1px solid var(--doc-ink); }
.doc .fill-miss { background: #FFF3C4; }

.legal-foot { max-width: 1120px; margin: 28px auto 0; padding: 14px 16px 0; border-top: 1px solid var(--line-2); color: var(--ink-3); font-size: 11.5px; line-height: 1.7; text-align: center; }

/* ---------- e-signing ---------- */
.signers { display: grid; gap: 8px; }
.signer { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); }
.signer.done { background: var(--ok-soft); border-color: transparent; }
.signer-main { display: grid; gap: 1px; min-width: 0; margin-right: auto; }
.signer-role { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.signer-name { font-weight: 700; overflow-wrap: anywhere; }
.signer-meta { font-size: 12.5px; color: var(--ink-2); }
.signer-sig { height: 42px; max-width: 128px; object-fit: contain; background: #fff; border-radius: 4px; padding: 2px 6px; flex: none; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace; font-stretch: 100%; letter-spacing: .01em; }
.kv dd.mono { font-size: 14px; }
.btn.danger { background: var(--risk); border-color: var(--risk); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.doc .sig-line.signed { height: auto; min-height: 56px; display: flex; align-items: flex-end; }
.doc .sig-line.signed img { display: block; max-height: 54px; max-width: 220px; }
.doc .sig-meta { font-size: 11px; color: #5b5b5b; margin: -2px 0 4px; }

.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(4, 16, 13, .56); display: flex; align-items: flex-end; justify-content: center; }
.sheet-card { background: var(--surface); color: var(--ink); width: 100%; max-width: 640px; max-height: 100%; display: flex; flex-direction: column; border-radius: 14px 14px 0 0; box-shadow: var(--shadow); }
@media (min-width: 700px) {
  .sheet { align-items: center; padding: 24px; }
  .sheet-card { border-radius: 14px; max-height: calc(100vh - 48px); }
}
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 10px; border-bottom: 1px solid var(--line-2); }
.sheet-head .eyebrow { color: var(--ink-3); opacity: 1; }
.sheet-head h2 { margin: 2px 0 0; font-size: 20px; line-height: 1.2; text-wrap: balance; overflow-wrap: anywhere; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 14px 18px 18px; display: grid; gap: 18px; }
.sheet-hand { margin: 0; padding: 8px 12px; border-radius: var(--r-s); background: var(--cop-soft); font-size: 13.5px; }
.sheet-step { display: grid; gap: 10px; }
.sheet-step h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.sheet-step h3 span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: var(--teal-ink); font-size: 12px; flex: none; }
.sheet-step h3 em { margin-left: auto; font-style: normal; font-weight: 600; font-size: 12px; color: var(--ink-3); }
.sheet-witness { display: grid; gap: 10px; }
.sheet-doc { max-height: 320px; overflow: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: var(--r-s); }
.sheet-doc .doc { box-shadow: none; font-size: 12.5px; padding: 18px; }
.tick { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; cursor: pointer; }
.tick input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--teal); }
.pad { position: relative; border: 1.5px dashed #b9c6c0; border-radius: var(--r-s); background: #fff; }
.pad::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 32px; border-bottom: 1px solid #dde5e1; pointer-events: none; }
.pad canvas { position: relative; z-index: 1; display: block; width: 100%; height: 170px; touch-action: none; cursor: crosshair; }
.pad .link { position: absolute; z-index: 2; top: 6px; right: 10px; font-size: 13px; color: #0A6B5C; }
.pad-hint { position: absolute; left: 14px; bottom: 9px; font-size: 12px; color: #8a9893; pointer-events: none; }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); }
.sheet-foot .f-hint { flex: 1; }
html.sheet-open, html.sheet-open body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  body { background: #fff; }
  .top, .tabs, .mini, .toast, .no-print, .steps, .wiz-nav, .screen-head, .legal-foot { display: none !important; }
  .app { padding: 0; }
  .view { padding: 0; max-width: none; }
  .print-hide { display: none !important; }
  .calc { display: block !important; }
  .doc-wrap { overflow: visible; }
  .doc { box-shadow: none; padding: 0; max-width: none; font-size: 11.5pt; }
  .doc .pb { border: 0; margin: 0; page-break-after: always; break-after: page; }
  .doc .fill-miss { background: none; }
  .doc h2 { break-after: avoid; }
  .doc tr, .doc .cl { break-inside: avoid; }
}
