:root {
  --bg:#f1ede4; --paper:#ffffff; --paper-2:#fbf9f3;
  --navy:#2a3a5e; --navy-2:#22304e; --navy-3:#1a2740;
  --ink:#222a3d; --muted:#6b7183;
  --gold:#c2a14e; --gold-2:#a8842f; --gold-soft:#e7d4a0;
  --line:#e5dfd1;
  --ok:#3f7d56; --ok-bg:#e6efe7; --warn:#9a6b1f; --warn-bg:#f6ecd2; --sold:#9a3d2c; --sold-bg:#f4e1db;
  --draft:#5b6275; --draft-bg:#eceef2; --danger:#b1432f;
  --radius:13px; --shadow:0 8px 30px rgba(26,39,64,.10); --shadow-sm:0 2px 10px rgba(26,39,64,.06);
  --display:"Cinzel","Georgia",serif; --ui:"Jost",system-ui,-apple-system,"Segoe UI",sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body {
  margin:0; font-family:var(--ui); color:var(--ink); font-size:15px; line-height:1.5;
  background:radial-gradient(1100px 480px at 50% -240px, rgba(194,161,78,.13), transparent 70%), var(--bg);
  background-attachment:fixed; min-height:100vh;
}
::selection { background:var(--gold-soft); color:var(--navy-3); }
button, input, select, textarea { font:inherit; color:inherit; }
a { color:var(--gold-2); }
.visually-hidden { position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.hidden { display:none !important; }
.boot { min-height:100vh; display:flex; align-items:center; justify-content:center; }
.boot img { border-radius:50%; animation:pulse 1.4s ease-in-out infinite; }

/* Header */
header.top {
  background:var(--navy); color:#fff; padding:10px 16px; display:flex; align-items:center; gap:12px;
  position:sticky; top:0; z-index:20; border-bottom:2px solid transparent;
  border-image:linear-gradient(90deg,var(--gold-2),var(--gold-soft),var(--gold-2)) 1;
  box-shadow:0 4px 20px rgba(26,39,64,.18);
}
.brand { display:flex; align-items:center; gap:12px; min-height:44px; flex:1; min-width:0; color:inherit; text-decoration:none; }
.brand img { width:44px; height:44px; border-radius:50%; }
.brand .tag { font-size:11px; letter-spacing:.22em; text-transform:uppercase; font-weight:500; color:var(--gold-soft);
  padding-left:12px; border-left:1px solid rgba(231,212,160,.35); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.iconbtn { background:transparent; border:none; color:#fff; font-size:22px; line-height:1; padding:8px 11px; cursor:pointer; border-radius:9px; }
.iconbtn:hover, .iconbtn:focus-visible { background:rgba(255,255,255,.14); outline:none; }
.banner { background:var(--sold-bg); color:var(--sold); padding:10px 16px; font-size:14px; font-weight:500; border-bottom:1px solid rgba(154,61,44,.2); }
.banner a { color:inherit; font-weight:600; }

/* Buttons */
.btn { text-decoration:none; font-size:14px; font-weight:600; letter-spacing:.02em; background:var(--navy); color:#fff; border:1px solid var(--navy);
  padding:10px 16px; border-radius:9px; cursor:pointer; transition:filter .15s, background .15s; display:inline-flex; align-items:center; gap:7px; }
.btn:hover { background:var(--navy-2); }
.btn:focus-visible { outline:3px solid rgba(194,161,78,.45); outline-offset:2px; }
.btn.gold { background:linear-gradient(135deg,var(--gold-soft),var(--gold) 55%,var(--gold-2)); color:var(--navy-3); border:none; box-shadow:0 3px 12px rgba(168,132,47,.30); }
.btn.gold:hover { filter:brightness(1.06); }
.btn.secondary { background:transparent; color:var(--navy); border-color:rgba(42,58,94,.45); }
.btn.secondary:hover { background:rgba(42,58,94,.06); }
.btn.danger { background:var(--danger); border-color:var(--danger); }
.btn.small { padding:6px 11px; font-size:13px; }
.btn:disabled { opacity:.5; cursor:default; }

main { max-width:960px; margin:0 auto; padding:20px 16px 110px; }

/* List toolbar + filters */
.toolbar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:12px; }
.toolbar input[type=search] { flex:1; min-width:180px; padding:11px 14px; border:1px solid var(--line); border-radius:10px; background:var(--paper); }
.chips { display:flex; gap:6px; flex-wrap:wrap; margin:6px 0 14px; }
.chip { border:1px solid var(--line); background:var(--paper); padding:5px 12px; border-radius:30px; font-size:13px; cursor:pointer; color:var(--navy); }
.chip[aria-pressed=true] { background:var(--navy); color:#fff; border-color:var(--navy); }
.chip .n { opacity:.65; margin-left:4px; font-size:12px; }
.listmeta { display:flex; justify-content:space-between; align-items:center; gap:10px; color:var(--muted); font-size:13px; margin-bottom:10px; flex-wrap:wrap; }
.listmeta select { padding:6px 10px; border:1px solid var(--line); border-radius:8px; background:var(--paper); }
input:focus, select:focus, textarea:focus, .toolbar input:focus { outline:none; border-color:var(--gold); box-shadow:0 0 0 3px rgba(194,161,78,.18); }

/* Cards */
.cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px; }
.card { position:relative; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden;
  box-shadow:var(--shadow-sm); transition:transform .2s ease, box-shadow .2s ease, border-color .2s; text-decoration:none; color:inherit; display:block; animation:rise .45s ease both; }
.card:focus-visible { box-shadow:var(--shadow); border-color:var(--gold); outline:none; }
@media (hover:hover) { .card:hover { transform:translateY(-3px); box-shadow:var(--shadow); border-color:var(--gold-soft); } }
.card-hero { height:156px; background:#e9e4d8 center/cover no-repeat; position:relative; }
.card-hero img { width:100%; height:100%; object-fit:cover; display:block; }
.card-hero .noimg { height:100%; display:flex; align-items:center; justify-content:center; color:var(--muted); font-size:13px; font-style:italic; }
.card-hero .pub { position:absolute; top:8px; right:8px; background:rgba(26,39,64,.78); color:var(--gold-soft); font-size:11px; padding:3px 9px; border-radius:20px; letter-spacing:.06em; }
.card-body { padding:14px 16px 16px; }
.card .id { font-size:11px; color:var(--gold-2); font-weight:600; letter-spacing:.14em; text-transform:uppercase; display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.card h3 { font-weight:600; margin:8px 0; font-size:17px; line-height:1.3; }
.card .price { font-family:var(--display); font-weight:600; font-size:20px; color:var(--navy); }
.card .facts { font-size:13px; color:var(--muted); margin-top:8px; padding-top:8px; border-top:1px solid var(--line); }
.badge, .op { display:inline-block; font-size:10px; padding:3px 9px; border-radius:30px; font-weight:600; text-transform:uppercase; letter-spacing:.1em; border:1px solid transparent; }
.badge.available { background:var(--ok-bg); color:var(--ok); }
.badge.reserved { background:var(--warn-bg); color:var(--warn); }
.badge.sold, .badge.rented { background:var(--sold-bg); color:var(--sold); }
.badge.draft, .badge.withdrawn { background:var(--draft-bg); color:var(--draft); }
.op.sale { color:var(--gold-2); border-color:rgba(168,132,47,.45); background:rgba(194,161,78,.12); }
.op.rent { color:var(--navy); border-color:rgba(42,58,94,.32); background:rgba(42,58,94,.07); }
.empty { text-align:center; color:var(--muted); padding:48px 20px; font-style:italic; }
.fab { position:fixed; right:18px; bottom:calc(18px + var(--safe-bottom)); z-index:15; border-radius:30px; padding:14px 20px; font-size:15px; }

/* Form */
.panel { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); padding:20px; box-shadow:var(--shadow-sm); margin-bottom:16px; }
.panel h2 { font-family:var(--display); font-weight:600; color:var(--navy); font-size:22px; margin:0 0 4px; }
.panel .sub { color:var(--muted); font-size:13px; margin:0 0 12px; }
.section-title { font-size:12px; text-transform:uppercase; letter-spacing:.18em; font-weight:600; color:var(--gold-2); margin:22px 0 12px; padding-bottom:8px; border-bottom:1px solid var(--line); }
.section-title:first-child { margin-top:4px; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:0 14px; }
.grid3 { display:grid; grid-template-columns:repeat(3,1fr); gap:0 14px; }
.field { margin-bottom:14px; display:flex; flex-direction:column; min-width:0; }
.field.full { grid-column:1/-1; }
.field label, .field .label { font-size:12px; font-weight:600; margin-bottom:6px; color:#525a6e; letter-spacing:.04em; }
.field input, .field select, .field textarea { padding:10px 12px; border:1px solid var(--line); border-radius:9px; background:var(--paper-2); width:100%; }
.field textarea { min-height:120px; resize:vertical; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color:var(--danger); }
.field .err { color:var(--danger); font-size:12px; margin-top:4px; }
.field .hint, .hint { font-size:12px; color:var(--muted); margin-top:4px; }
.check { display:flex; align-items:center; gap:9px; font-size:14px; margin-bottom:12px; cursor:pointer; }
.check input { width:18px; height:18px; accent-color:var(--navy); }
.row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin:8px 0 12px; }
.row .field { margin-bottom:0; }
.problems { background:var(--warn-bg); color:var(--warn); border-radius:9px; padding:10px 12px; font-size:13px; margin:-4px 0 12px; }
.problems ul { margin:6px 0 0; padding-left:18px; }

/* Language tabs */
.tabs { display:flex; gap:6px; margin-bottom:12px; flex-wrap:wrap; }
.tab { border:1px solid var(--line); background:var(--paper-2); padding:7px 14px; border-radius:9px; cursor:pointer; font-weight:600; font-size:13px; display:inline-flex; gap:7px; align-items:center; }
.tab[aria-selected=true] { background:var(--navy); color:#fff; border-color:var(--navy); }
.dot { width:8px; height:8px; border-radius:50%; background:var(--danger); display:inline-block; }
.dot.ok { background:var(--ok); }
.dot.machine { background:var(--gold); }

/* Amenities */
.amen { display:flex; flex-wrap:wrap; gap:7px; }
.amen button { border:1px solid var(--line); background:var(--paper-2); border-radius:30px; padding:6px 12px; font-size:13px; cursor:pointer; }
.amen button[aria-pressed=true] { background:rgba(194,161,78,.18); border-color:var(--gold); color:var(--navy-3); font-weight:600; }

/* Photos */
.photos { display:grid; grid-template-columns:repeat(auto-fill,minmax(112px,1fr)); gap:10px; }
.ph { position:relative; border-radius:10px; overflow:hidden; border:2px solid transparent; background:#efece3; aspect-ratio:1; }
.ph.cover { border-color:var(--gold); }
.ph img { width:100%; height:100%; object-fit:cover; display:block; cursor:grab; }
.ph img { -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; -webkit-user-drag:none; }
.photos.sorting, .photos.sorting .ph img { cursor:grabbing; }
.ph.dragging { opacity:.55; transform:scale(.94); border-color:var(--navy-3); box-shadow:0 6px 18px rgba(16,22,40,.3); transition:transform .12s; }
.ph .tools { position:absolute; left:0; right:0; bottom:0; display:flex; justify-content:space-around; padding:4px; background:linear-gradient(transparent, rgba(16,22,40,.7)); }
.ph .tools button { border:none; background:rgba(26,39,64,.6); color:#fff; width:30px; height:30px; border-radius:50%; cursor:pointer; font-size:14px; line-height:30px; padding:0; }
.ph .tools button:hover, .ph .tools button:focus-visible { background:var(--navy-3); outline:none; }
.ph .tools button.on { background:var(--gold); color:var(--navy-3); }
.ph .private { position:absolute; top:5px; left:5px; background:rgba(26,39,64,.78); color:#fff; font-size:11px; padding:2px 7px; border-radius:12px; }
.upload { position:relative; }
/* Listing video: pick photos in tap order, song list, preview */
.vmake h3 { font-size:12px; text-transform:uppercase; letter-spacing:.16em; color:var(--gold-2); margin:18px 0 6px; font-weight:600; }
.vmake h3:first-child { margin-top:0; }
.vpick .ph { padding:0; cursor:pointer; font:inherit; }
.vpick .ph img { cursor:pointer; }
.vpick .ph[aria-pressed=false] img { opacity:.4; filter:grayscale(.7); }
.vpick .ph[aria-pressed=true] { border-color:var(--gold); }
.vpick .ph .num { position:absolute; top:5px; right:5px; min-width:26px; height:26px; padding:0 6px; border-radius:13px; background:var(--gold); color:var(--navy-3); font-weight:700; font-size:14px; line-height:26px; text-align:center; box-shadow:0 1px 4px rgba(16,22,40,.35); }
.vorder { display:flex; gap:4px; overflow-x:auto; margin:10px 0 0; padding-bottom:4px; }
.vorder img { flex:0 0 auto; width:44px; height:44px; object-fit:cover; border-radius:6px; }
ul.songs li { display:flex; align-items:center; gap:4px; }
ul.songs .choice { flex:1; min-width:0; }
.vgo { margin-top:18px; }
.vdone video.vprev { display:block; width:100%; max-height:62vh; background:#000; border-radius:12px; margin:0 auto 8px; }
.vdone video.vprev.vertical { width:auto; max-width:100%; aspect-ratio:9/16; }
.vdone video.vprev.square { width:auto; max-width:100%; aspect-ratio:1; }
.vmake .err { color:var(--danger); }
.progress { height:6px; border-radius:3px; background:var(--line); overflow:hidden; margin-top:8px; }
.progress > div { height:100%; background:linear-gradient(90deg,var(--gold-2),var(--gold)); transition:width .2s; }

/* Sticky save bar */
.savebar { position:fixed; left:0; right:0; bottom:0; z-index:18; background:rgba(255,255,255,.96); backdrop-filter:blur(6px);
  border-top:1px solid var(--line); padding:10px 16px calc(10px + var(--safe-bottom)); display:flex; gap:10px; justify-content:center; box-shadow:0 -6px 20px rgba(26,39,64,.08); }
.savebar .inner { max-width:960px; width:100%; display:flex; gap:10px; align-items:center; }
.savebar .grow { flex:1; color:var(--muted); font-size:13px; }

/* Dialogs, toast, lightbox */
dialog { border:none; border-radius:16px; padding:0; max-width:min(92vw, 380px); box-shadow:0 24px 70px rgba(16,24,44,.45); }
dialog::backdrop { background:rgba(20,30,52,.6); backdrop-filter:blur(4px); }
.dlg { padding:24px 22px 20px; border-top:3px solid var(--gold); }
.dlg.danger { border-top-color:var(--danger); }
.dlg p { margin:0 0 20px; line-height:1.5; }
.dlg .actions { display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap; }
.toast { position:fixed; bottom:calc(84px + var(--safe-bottom)); left:50%; transform:translateX(-50%); background:var(--navy-3); color:#fff; padding:12px 20px;
  border-radius:10px; font-size:14px; border-left:3px solid var(--gold); box-shadow:0 10px 30px rgba(26,39,64,.3); z-index:500; max-width:90vw; animation:rise .25s ease both; }
.toast.err { border-left-color:var(--danger); }
.lightbox { position:fixed; inset:0; background:rgba(12,18,34,.95); z-index:400; display:flex; align-items:center; justify-content:center; touch-action:pan-y; }
.lightbox img { max-width:96vw; max-height:84vh; object-fit:contain; border-radius:8px; }
.lightbox .close { position:absolute; top:10px; right:12px; }
.lightbox .nav { position:absolute; top:50%; transform:translateY(-50%); background:rgba(255,255,255,.12); color:#fff; border:none; width:46px; height:64px; font-size:30px; border-radius:9px; cursor:pointer; }
.lightbox .prev { left:8px; } .lightbox .next { right:8px; }
.lightbox .bar { position:absolute; bottom:calc(16px + var(--safe-bottom)); left:0; right:0; display:flex; gap:10px; justify-content:center; flex-wrap:wrap; padding:0 12px; }
.lightbox .bar .btn { background:rgba(255,255,255,.14); border-color:rgba(255,255,255,.35); }
.lightbox .count { position:absolute; top:18px; left:18px; color:rgba(255,255,255,.75); font-size:13px; }

/* Login */
.login { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:18px; background:linear-gradient(160deg, var(--navy-3), var(--navy)); }
.login form { background:var(--paper); border-radius:18px; padding:32px 28px 26px; width:100%; max-width:370px; text-align:center; box-shadow:0 24px 70px rgba(16,24,44,.45); border-top:3px solid var(--gold); }
.login img { width:88px; height:88px; border-radius:50%; margin:0 auto 14px; display:block; box-shadow:0 6px 20px rgba(26,39,64,.22); }
.login h1 { font-family:var(--display); font-weight:600; letter-spacing:.06em; margin:0 0 4px; font-size:24px; color:var(--navy); }
.login p { margin:0 0 18px; color:var(--muted); font-size:13.5px; }
.login .field { text-align:left; }
.login .err { color:var(--danger); font-size:13px; min-height:18px; margin-bottom:8px; }
.login .btn { width:100%; justify-content:center; }

/* Settings */
.kv { display:grid; grid-template-columns:auto 1fr; gap:6px 14px; font-size:14px; }
.kv dt { color:var(--muted); }
.kv dd { margin:0; }
.state-open { color:var(--ok); font-weight:600; }
.state-close, .state-unknown { color:var(--danger); font-weight:600; }

@keyframes rise { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
@keyframes pulse { 50% { opacity:.55; transform:scale(.96); } }
@media (prefers-reduced-motion:reduce) { *, *::before { animation:none !important; transition:none !important; } }
@media (max-width:600px) {
  .grid2, .grid3 { grid-template-columns:1fr 1fr; }
  .grid2 .field.full { grid-column:1/-1; }
  main { padding:14px 12px 110px; }
  .brand .tag { display:none; }
  .panel { padding:16px 14px; }
}
@media (max-width:380px) { .grid2, .grid3 { grid-template-columns:1fr; } }

/* Main nav (Listings | Market) */
.mainnav { display:flex; gap:4px; background:var(--navy-2); padding:0 12px; position:sticky; top:66px; z-index:19; }
.mainnav a { color:rgba(255,255,255,.72); text-decoration:none; padding:10px 14px; font-weight:600; font-size:14px; border-bottom:3px solid transparent; }
.mainnav a[aria-current=page] { color:#fff; border-bottom-color:var(--gold); }

/* Market */
.plain { border:0; padding:0; width:100%; display:block; cursor:pointer; background:#e9e4d8; }
.mcard .cardacts { margin:10px 0 0; }
.mcard .fits { color:var(--navy-3); font-weight:600; }
.alertspanel .alertrow { background:none; text-align:left; color:inherit; font:inherit; padding:2px 0; }
.alertspanel .row .check { margin:4px 14px 0 0; }
.pub.drop { background:var(--sold); color:#fff; }
.rel { display:inline-block; font-size:10px; padding:3px 9px; border-radius:30px; font-weight:600; text-transform:uppercase; letter-spacing:.08em; }
.rel.house { background:rgba(194,161,78,.2); color:var(--gold-2); }
.rel.mls { background:var(--ok-bg); color:var(--ok); }
.rel.agreed { background:var(--ok-bg); color:var(--ok); }
.rel.needs { background:var(--draft-bg); color:var(--draft); }
.chipselect { border:1px solid var(--line); background:var(--paper); padding:5px 10px; border-radius:30px; font-size:13px; color:var(--navy); max-width:170px; }
.sheet-backdrop { position:fixed; inset:0; background:rgba(20,30,52,.55); z-index:300; display:flex; align-items:flex-end; justify-content:center; }
.sheet { background:var(--paper); width:100%; max-width:760px; max-height:92vh; overflow:auto; border-radius:18px 18px 0 0; position:relative; padding-bottom:calc(16px + var(--safe-bottom)); animation:rise .25s ease both; }
.sheet-close { position:absolute; top:8px; right:8px; z-index:2; background:rgba(26,39,64,.6); }
.sheet-body { padding:14px 18px; }
.sheet h2 { font-weight:600; font-size:20px; margin:8px 0 4px; color:var(--ink); }
.strip { display:flex; overflow-x:auto; gap:4px; scroll-snap-type:x mandatory; background:#e9e4d8; }
.strip img { height:230px; width:auto; max-width:92%; object-fit:cover; scroll-snap-align:start; flex:0 0 auto; }
ul.sources { list-style:none; padding:0; margin:0 0 10px; }
ul.sources li { border-bottom:1px solid var(--line); padding:10px 0; font-size:14px; }
ul.sources li.gone { opacity:.6; }
ul.sources .row { margin:6px 0 0; }
.err { color:var(--danger); }
.panel.result { margin-top:14px; background:var(--paper-2); }
@media (min-width:760px) { .sheet-backdrop { align-items:center; } .sheet { border-radius:18px; } }

/* ---------- CRM: inbox ---------- */
.mainnav { overflow-x:auto; scrollbar-width:none; }
.mainnav a { white-space:nowrap; }
ul.chats { list-style:none; margin:0; padding:0; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow-sm); }
ul.chats li + li { border-top:1px solid var(--line); }
.chatrow { display:flex; align-items:center; gap:12px; padding:11px 14px; text-decoration:none; color:inherit; min-height:64px; }
.chatrow:focus-visible { background:var(--paper-2); outline:none; }
@media (hover:hover) { .chatrow:hover { background:var(--paper-2); } }
.chatrow[aria-current=page] { background:rgba(194,161,78,.14); box-shadow:inset 3px 0 0 var(--gold); }
.chatrow .mid { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.chatrow .top { display:flex; align-items:center; gap:6px; min-width:0; }
.chatrow .top strong { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chatrow .prev { color:var(--muted); font-size:13.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chatrow.awaiting .prev { color:var(--ink); font-weight:500; }
.chatrow .when { font-size:12px; color:var(--muted); white-space:nowrap; display:flex; flex-direction:column; align-items:flex-end; gap:5px; }
.chatrow .when.late { color:var(--danger); font-weight:600; }
.chatrow .next { font-size:12.5px; color:var(--navy); }
.chatrow .next.late { color:var(--danger); font-weight:600; }
.dotwait { width:10px; height:10px; border-radius:50%; background:var(--gold); display:inline-block; }
.kind { font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); border:1px solid var(--line); border-radius:20px; padding:1px 7px; }
.avatar { flex:0 0 auto; width:42px; height:42px; border-radius:50%; background:linear-gradient(135deg,var(--navy),var(--navy-3)); color:var(--gold-soft);
  display:inline-flex; align-items:center; justify-content:center; font-weight:600; font-size:15px; letter-spacing:.04em; }
.avatar.sm { width:34px; height:34px; font-size:13px; }
.avatar.lg { width:56px; height:56px; font-size:20px; }
.avatar.sq { border-radius:10px; font-size:11px; width:52px; background:var(--gold-soft); color:var(--navy-3); }
mark { background:var(--gold-soft); color:inherit; border-radius:3px; padding:0 2px; }
.results .section-title { margin-top:14px; }

.today { background:var(--paper); border:1px solid var(--line); border-left:3px solid var(--gold); border-radius:var(--radius); padding:12px 14px; margin:0 0 12px; box-shadow:var(--shadow-sm); }
.today-head { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; font-size:14px; }
.today-head .late { color:var(--danger); font-weight:600; font-size:13px; }
.today ul { list-style:none; margin:8px 0 0; padding:0; }
.today li a, .today li > span { display:flex; gap:9px; align-items:baseline; padding:6px 0; color:inherit; text-decoration:none; font-size:14px; }
.today li + li { border-top:1px dashed var(--line); }
.today .ic { width:18px; text-align:center; }
.today .tx { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.today .when { color:var(--muted); font-size:12px; white-space:nowrap; }
.today li.late .when { color:var(--danger); font-weight:600; }

/* Stage badges (lead pipeline) */
.stage { display:inline-block; font-size:10px; padding:2px 8px; border-radius:30px; font-weight:600; text-transform:uppercase; letter-spacing:.08em; background:var(--draft-bg); color:var(--draft); white-space:nowrap; }
.s-new { background:rgba(194,161,78,.2); color:var(--gold-2); }
.s-contacted, .s-qualified { background:rgba(42,58,94,.09); color:var(--navy); }
.s-viewing, .s-offer { background:var(--warn-bg); color:var(--warn); }
.s-won { background:var(--ok-bg); color:var(--ok); }
.s-lost { background:var(--sold-bg); color:var(--sold); }
.s-parked { background:var(--draft-bg); color:var(--draft); font-style:italic; }
.stages { display:flex; gap:4px; flex-wrap:wrap; margin:10px 0 16px; }
.stagebtn { border:1px solid var(--line); background:var(--paper-2); border-radius:30px; padding:6px 11px; font-size:12.5px; font-weight:600; cursor:pointer; color:var(--muted); }
.stagebtn[aria-pressed=true] { border-color:currentColor; box-shadow:0 0 0 1px currentColor inset; }
.stagebtn[aria-pressed=true].s-new { color:var(--gold-2); }
.stagebtn[aria-pressed=true].s-contacted, .stagebtn[aria-pressed=true].s-qualified { color:var(--navy); }
.stagebtn[aria-pressed=true].s-viewing, .stagebtn[aria-pressed=true].s-offer { color:var(--warn); }
.stagebtn[aria-pressed=true].s-won { color:var(--ok); }
.stagebtn[aria-pressed=true].s-lost { color:var(--sold); }
.stagebtn[aria-pressed=true].s-parked { color:var(--draft); }

/* ---------- CRM: contact + chat ---------- */
.contact-head { display:flex; gap:14px; align-items:center; margin-bottom:12px; }
.contact-head h2 { margin:0; font-family:var(--display); font-weight:600; color:var(--navy); font-size:21px; line-height:1.2; }
.contact-head .who { min-width:0; }
.leadchips { display:flex; gap:8px; flex-wrap:wrap; margin-top:6px; }
.leadchips a { text-decoration:none; color:var(--navy); font-size:13px; display:inline-flex; gap:5px; align-items:center; }
.chat { display:flex; flex-direction:column; }
.stream { display:flex; flex-direction:column; gap:4px; padding:4px 0 8px; }
.daysep { text-align:center; margin:12px 0 6px; }
.daysep span { background:rgba(42,58,94,.08); color:var(--navy); font-size:12px; padding:3px 12px; border-radius:20px; }
.bubble { max-width:82%; padding:7px 11px 5px; border-radius:14px; background:var(--paper); border:1px solid var(--line); position:relative; box-shadow:0 1px 2px rgba(26,39,64,.06); overflow-wrap:anywhere; }
.bubble.in { align-self:flex-start; border-bottom-left-radius:4px; }
.bubble.out { align-self:flex-end; background:#f3ead0; border-color:#e6d9b1; border-bottom-right-radius:4px; }
.bubble.deleted { opacity:.6; }
.bubble .txt { white-space:pre-wrap; }
.bubble .meta { font-size:11px; color:var(--muted); text-align:right; margin-top:2px; }
.bubble .tick { letter-spacing:-2px; }
.bubble .tick.read { color:#3a87c8; }
.bubble .quote { border-left:3px solid var(--gold); background:rgba(42,58,94,.05); padding:4px 8px; border-radius:6px; font-size:13px; color:var(--muted); margin-bottom:5px;
  max-height:4.5em; overflow:hidden; white-space:pre-wrap; }
.bubble .reacts { position:absolute; bottom:-12px; right:10px; background:var(--paper); border:1px solid var(--line); border-radius:12px; padding:0 5px; font-size:13px; }
.bubble:has(.reacts) { margin-bottom:12px; }
.msgimg { display:block; max-width:100%; max-height:320px; border-radius:9px; margin-bottom:4px; }
.voice audio { width:240px; max-width:100%; height:38px; }
.transcript { margin:4px 0 0; font-size:13.5px; font-style:italic; color:var(--ink); white-space:pre-wrap; }
.doc { display:inline-block; padding:6px 0; font-weight:500; }
.media-missing { font-size:13px; color:var(--muted); font-style:italic; }
.sysline { align-self:center; font-size:12px; color:var(--muted); padding:2px 10px; }
.actcard { align-self:center; width:min(92%, 520px); display:flex; gap:10px; background:var(--paper-2); border:1px dashed var(--gold-soft); border-radius:12px; padding:8px 12px; font-size:14px; margin:4px 0; }
.actcard p { margin:4px 0 0; white-space:pre-wrap; }
.center { text-align:center; margin:6px 0; }
.quickacts { display:flex; gap:6px; flex-wrap:wrap; margin:10px 0 6px; }
.composer { position:sticky; bottom:0; z-index:10; background:rgba(241,237,228,.97); backdrop-filter:blur(6px); padding:8px 0 calc(8px + var(--safe-bottom)); display:flex; gap:8px; align-items:flex-end; border-top:1px solid var(--line); }
.composer textarea { flex:1; min-width:0; resize:none; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--paper); max-height:40vh; }
.cmp-actions { display:flex; flex-direction:column; gap:6px; }
.cmp-actions .btn { justify-content:center; }
main:has(.composer) { padding-bottom:0; }
.iconbtn.dark { color:var(--muted); font-size:16px; padding:6px 8px; }
.iconbtn.dark:hover, .iconbtn.dark:focus-visible { background:rgba(42,58,94,.08); }

/* Tasks, pickers, lead lists */
ul.tasks { list-style:none; margin:0 0 8px; padding:0; }
ul.tasks li { display:flex; align-items:center; gap:8px; padding:4px 0; border-bottom:1px solid var(--line); }
ul.tasks li .check { flex:1; margin:0; min-width:0; }
ul.tasks li.done span { text-decoration:line-through; color:var(--muted); }
ul.tasks li.overdue .hint { color:var(--danger); font-weight:600; }
.taskadd input { flex:1; min-width:140px; padding:8px 10px; border:1px solid var(--line); border-radius:9px; background:var(--paper-2); }
.taskadd input[type=datetime-local] { flex:0 1 210px; }
.pickq { width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--paper-2); margin:6px 0 8px; }
ul.picklist { list-style:none; margin:0; padding:0; max-height:55vh; overflow:auto; }
ul.picklist li + li { border-top:1px solid var(--line); }
.plainrow { display:flex; gap:10px; align-items:center; width:100%; text-align:left; background:none; border:0; padding:9px 4px; cursor:pointer; border-radius:8px; }
.plainrow:hover:not(:disabled) { background:var(--paper-2); }
.plainrow:disabled { opacity:.45; cursor:default; }
ul.leadlist { list-style:none; margin:0 0 10px; padding:0; }
ul.leadlist li { padding:6px 0; }
ul.leadlist a { color:inherit; text-decoration:none; }
.leadhead { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.leadhead .who { display:flex; gap:10px; align-items:center; text-decoration:none; color:inherit; }
ul.lplist { list-style:none; margin:0 0 10px; padding:0; }
.lprow { display:flex; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); }
.lprow .thumb { flex:0 0 72px; height:72px; border-radius:10px; overflow:hidden; background:#e9e4d8; display:flex; align-items:center; justify-content:center; font-size:12px; color:var(--navy); text-decoration:none; font-weight:600; }
.lprow .thumb img { width:100%; height:100%; object-fit:cover; }
.lprow .lpmid { flex:1; min-width:0; }
.lprow .row { margin:6px 0 0; }
.lprow select, .linkedleads select { padding:6px 10px; border:1px solid var(--line); border-radius:8px; background:var(--paper-2); max-width:100%; }
@media (max-width:600px) {
  .bubble { max-width:90%; }
  .mainnav a { padding:10px 11px; }
}

/* ================= Devices =================
   phone  < 700px (Pixel 7, portrait):  top bar + bottom tab bar, sideways-scrolling filters
   medium 700–999px:                    top bar + nav strip (tablet portrait, narrow windows)
   wide   ≥ 1000px:                     side rail + list/detail panes (laptop; Galaxy Tab S5e landscape)
   pointer:coarse (phone, tablet):      44px touch targets, 16px inputs
   pointer:fine + ≥ 1200px (laptop):    labelled sidebar, denser controls */

.ico { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex:0 0 auto; }
.brand .section { display:none; }
.tabbar { display:none; }
main.narrow { max-width:960px; }

/* Listing filters: one row of groups; tapping the active chip clears its group, so no "All" chips */
.filters { display:flex; flex-wrap:wrap; gap:6px 0; margin:6px 0 14px; }
.filters .chips { margin:0; padding:0 10px; flex-wrap:nowrap; border-left:1px solid var(--line); }
.filters .chips:first-child { padding-left:0; border-left:0; }
.filters .chip.all { display:none; }

/* The chat fills the screen, so the composer sits at the bottom even when the thread is short */
.contact { display:flex; flex-direction:column; min-height:calc(100dvh - 86px); }
.contact .chat { flex:1; display:flex; flex-direction:column; }
.contact .chat .quickacts { margin-top:auto; }

/* ---------- touch (phone + tablet) ---------- */
@media (pointer:coarse) {
  .btn { min-height:44px; }
  .btn.small { min-height:40px; padding:8px 13px; }
  .iconbtn { min-width:44px; min-height:44px; }
  .chip { min-height:38px; padding:7px 14px; font-size:14px; }
  .chipselect { min-height:38px; font-size:14px; }
  .amen button, .stagebtn { min-height:38px; padding:7px 13px; }
  .tab { min-height:40px; }
  .field input, .field select, .field textarea, .toolbar input[type=search], .pickq, .composer textarea,
  .taskadd input, .listmeta select, .lprow select, .linkedleads select { font-size:16px; }
  .field input, .field select { min-height:46px; }
  .check { min-height:40px; }
  .check input { width:22px; height:22px; }
  .chatrow { min-height:70px; }
  .ph .tools button { width:38px; height:38px; }
  .plainrow { min-height:52px; }
}

/* ---------- phone ---------- */
@media (max-width:699px) {
  header.top { padding:6px 8px 6px 12px; gap:6px; }
  .brand { gap:10px; }
  .brand img { width:38px; height:38px; }
  .brand .tag { display:none; }
  .brand .section { display:block; font-family:var(--display); font-weight:600; font-size:19px; letter-spacing:.04em; color:#fff;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .mainnav { display:none; }

  .tabbar { display:grid; grid-template-columns:repeat(4,1fr); position:fixed; left:0; right:0; bottom:0; z-index:17;
    background:rgba(255,255,255,.97); backdrop-filter:blur(8px); border-top:1px solid var(--line);
    padding-bottom:var(--safe-bottom); box-shadow:0 -6px 20px rgba(26,39,64,.08); }
  .tabbar a { display:flex; flex-direction:column; align-items:center; gap:3px; padding:7px 2px 8px; min-height:62px;
    color:var(--muted); text-decoration:none; font-size:12px; font-weight:600; letter-spacing:.01em; }
  .tabbar .pill { display:flex; align-items:center; justify-content:center; width:52px; height:30px; border-radius:15px; transition:background .15s; }
  .tabbar a[aria-current=page] { color:var(--navy); }
  .tabbar a[aria-current=page] .pill { background:rgba(194,161,78,.25); }
  .tabbar a:focus-visible { outline:none; }
  .tabbar a:focus-visible .pill { box-shadow:0 0 0 2px var(--gold); }
  /* the keyboard is up: give the room to what she's typing */
  body:has(input:focus, textarea:focus) .tabbar { display:none; }
  body:has(.tabbar) main { padding-bottom:calc(96px + var(--safe-bottom)); }
  body:has(.tabbar) .fab { bottom:calc(76px + var(--safe-bottom)); }
  body:has(.tabbar) .toast { bottom:calc(84px + var(--safe-bottom)); }

  /* filter rows scroll sideways instead of stacking four rows deep */
  .chips { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin-left:-12px; margin-right:-12px; padding:2px 12px; }
  .chips::-webkit-scrollbar { display:none; }
  .chips > * { flex:0 0 auto; }
  .filters { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin-left:-12px; margin-right:-12px; padding:2px 12px; }
  .filters::-webkit-scrollbar { display:none; }
  .filters .chips { overflow:visible; margin:0; padding:0 10px; flex:0 0 auto; }
  .filters .chips:first-child { padding-left:0; }
  .contact { min-height:calc(100dvh - 66px); }
  .toolbar input[type=search] { min-width:0; }
  .mtoolbar input[type=search] { flex-basis:100%; } /* Market: search on its own row, the two buttons below */
  .card-hero { height:190px; }
  .listmeta { margin-top:-4px; }
  .contact-head { gap:12px; }
  .contact-head h2 { font-size:19px; }
  .today li a, .today li > span { padding:9px 0; }
  .savebar .grow { font-size:12px; }
}

/* ---------- wide: laptop and tablet in landscape ---------- */
@media (min-width:1000px) {
  :root { --rail-w:92px; --list-w:clamp(330px, 30vw, 420px); }
  .shell { display:flex; min-height:100dvh; }
  .rail { position:sticky; top:0; height:100dvh; flex:0 0 var(--rail-w); z-index:20; display:flex; flex-direction:column; gap:4px;
    background:linear-gradient(180deg, var(--navy), var(--navy-3)); color:#fff; padding:12px 8px calc(12px + var(--safe-bottom));
    border-right:2px solid transparent; border-image:linear-gradient(180deg,var(--gold-2),var(--gold-soft),var(--gold-2)) 1; }
  .rail nav { display:flex; flex-direction:column; gap:4px; }
  .rail-foot { margin-top:auto; }
  .rail-brand { display:flex; flex-direction:column; align-items:center; gap:6px; margin:2px 0 14px; color:inherit; text-decoration:none; }
  .rail-brand img { width:44px; height:44px; border-radius:50%; }
  .rail-brand span { display:none; font-family:var(--display); font-weight:600; letter-spacing:.08em; font-size:17px; color:var(--gold-soft); }
  .rail-item { display:flex; flex-direction:column; align-items:center; gap:4px; padding:10px 4px; min-height:64px; border-radius:12px;
    color:rgba(255,255,255,.72); text-decoration:none; font-size:12px; font-weight:600; text-align:center; line-height:1.2; }
  .rail-item[aria-current=page] { background:rgba(194,161,78,.2); color:#fff; }
  .rail-item[aria-current=page] .ico { color:var(--gold-soft); }
  .rail-item:focus-visible { outline:2px solid var(--gold); outline-offset:-2px; }
  .content { flex:1; min-width:0; display:flex; flex-direction:column; }
  .content main { width:100%; max-width:1280px; padding:22px 28px 110px; }
  .content main.narrow { max-width:1000px; }
  .pagebar { width:100%; max-width:1280px; margin:0 auto; padding:14px 28px 0; }
  .pagebar:has(+ main.narrow) { max-width:1000px; }
  .cards { grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:18px; }
  .savebar { left:var(--rail-w); }
  .fab { right:28px; bottom:calc(24px + var(--safe-bottom)); }

  /* list + detail: the panes scroll on their own, the page doesn't */
  .content:has(.split) { height:100dvh; }
  .content main.main-split { max-width:none; padding:0; flex:1; min-height:0; }
  .split { display:grid; grid-template-columns:var(--list-w) minmax(0,1fr); height:100%; }
  .pane { overflow-y:auto; overscroll-behavior:contain; min-width:0; }
  .list-pane { border-right:1px solid var(--line); background:rgba(255,255,255,.4); padding:16px 14px 28px; }
  .list-pane .chips { margin-bottom:10px; }
  .list-pane .toolbar input[type=search] { min-width:0; }
  .detail-pane { padding:18px 28px 28px; }
  .detail-pane > * { max-width:920px; margin-left:auto; margin-right:auto; }
  .detail-pane:has(.composer) { padding-bottom:0; }
  .detail-pane .contact { min-height:100%; }
  .detail-pane .composer { padding-left:2px; padding-right:2px; }
  .pane-empty { height:100%; display:flex; align-items:center; justify-content:center; color:var(--muted); font-style:italic; padding:24px; text-align:center; }
  .bubble { max-width:72%; }
}

/* laptop, wide window: labelled sidebar, denser rows */
@media (min-width:1200px) and (pointer:fine) {
  :root { --rail-w:212px; }
  .rail { padding:16px 12px; }
  .rail-brand { flex-direction:row; justify-content:flex-start; gap:12px; padding:0 8px; margin-bottom:20px; }
  .rail-brand span { display:inline; }
  .rail-item { flex-direction:row; gap:12px; min-height:44px; padding:10px 12px; font-size:14.5px; text-align:left; }
}
@media (min-width:1000px) and (hover:hover) {
  .rail-item:hover { background:rgba(255,255,255,.08); color:#fff; }
}

/* Documents (paperwork) */
.docstatus { display:inline-block; font-size:10px; padding:2px 8px; border-radius:30px; font-weight:600; text-transform:uppercase; letter-spacing:.08em; white-space:nowrap; background:var(--draft-bg); color:var(--draft); }
.d-sent { background:var(--warn-bg); color:var(--warn); }
.d-signed { background:rgba(194,161,78,.2); color:var(--gold-2); }
.d-filed { background:var(--ok-bg); color:var(--ok); }
.d-void { background:var(--sold-bg); color:var(--sold); text-decoration:line-through; }
ul.doclist { list-style:none; margin:0 0 10px; padding:0; }
ul.doclist li { padding:6px 0; }
ul.doclist a { color:inherit; text-decoration:none; }
ul.tpllist { list-style:none; margin:0 0 8px; padding:0; }
ul.tpllist .plainrow { display:flex; gap:12px; align-items:flex-start; width:100%; text-align:left; padding:10px 4px; border:0; background:none; border-bottom:1px solid var(--line); cursor:pointer; }
ul.tpllist .plainrow:disabled { opacity:.55; cursor:default; }
.tplicon { font-size:22px; line-height:1; }
.dochead { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.dochead h2 { margin:0 0 2px; font-size:18px; color:var(--navy); }
ol.docsteps { list-style:none; display:grid; grid-template-columns:repeat(4, 1fr); gap:6px; margin:14px 0 0; padding:0; counter-reset:step; }
ol.docsteps li { font-size:12px; color:var(--muted); border-top:3px solid var(--line); padding-top:6px; display:flex; flex-direction:column; }
ol.docsteps li.done { color:var(--navy); border-top-color:var(--gold); font-weight:600; }
ol.docsteps li .hint { font-weight:400; margin-top:0; }
.yesno { display:inline-flex; width:max-content; max-width:100%; border:1px solid var(--line); border-radius:30px; overflow:hidden; }
.yesno button { border:0; background:var(--paper); padding:7px 18px; cursor:pointer; font-weight:600; color:var(--muted); }
.yesno button + button { border-left:1px solid var(--line); }
.yesno button.on { background:var(--navy); color:#fff; }
.fielderr { font-size:12px; color:var(--danger); margin:4px 0 0; }
.field input[aria-invalid=true], .field textarea[aria-invalid=true] { border-color:var(--danger); }
.linkbtn { border:0; background:none; padding:6px 0; color:var(--gold-2); text-decoration:underline; cursor:pointer; font-size:13px; }
ul.signedfiles, ul.mediapick { list-style:none; margin:0 0 10px; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(96px, 1fr)); gap:8px; }
ul.signedfiles li { position:relative; }
ul.signedfiles img, ul.mediapick img { width:100%; aspect-ratio:3/4; object-fit:cover; border-radius:8px; border:1px solid var(--line); display:block; }
ul.signedfiles .iconbtn { position:absolute; top:4px; right:4px; background:rgba(255,255,255,.9); border-radius:50%; width:28px; height:28px; }
.docthumb { display:flex; flex-direction:column; align-items:center; justify-content:center; aspect-ratio:3/4; border:1px solid var(--line); border-radius:8px; background:var(--paper-2); font-size:11px; color:var(--muted); text-align:center; padding:6px; word-break:break-word; }
ul.mediapick button { border:2px solid transparent; background:none; padding:0; cursor:pointer; width:100%; border-radius:10px; text-align:center; }
ul.mediapick button.on { border-color:var(--ok); opacity:.6; cursor:default; }
.docview progress { width:100%; }
@media (max-width: 699px) { ol.docsteps { grid-template-columns:repeat(2, 1fr); } }
.pub.owner { background:var(--ok); color:#fff; top:auto; bottom:8px; }
.ownerlead p { margin:4px 0 8px; }

/* Deals & money */
.moneystrip { display:grid; grid-template-columns:repeat(auto-fit, minmax(130px, 1fr)); gap:8px; margin:0 0 12px; }
.moneystrip > div { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); padding:10px 12px; display:flex; flex-direction:column; }
.moneystrip .k { font-size:12px; color:var(--muted); }
.moneystrip strong { font-size:18px; color:var(--navy); }
.moneystrip .owe strong { color:var(--warn); }
.ds-accepted { background:rgba(194,161,78,.2); color:var(--gold-2); }
.ds-deposit, .ds-promesa, .ds-closing { background:var(--warn-bg); color:var(--warn); }
.ds-closed { background:var(--ok-bg); color:var(--ok); }
.ds-fell_through { background:var(--sold-bg); color:var(--sold); }
table.splittable { width:100%; border-collapse:collapse; margin:4px 0 12px; font-size:14px; }
table.splittable th { text-align:left; font-weight:400; color:var(--muted); padding:4px 0; }
table.splittable td { text-align:right; padding:4px 0; font-variant-numeric:tabular-nums; }
table.splittable tr.total th, table.splittable tr.total td { font-weight:700; color:var(--navy); border-top:1px solid var(--line); padding-top:8px; }
.payout { border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin:0 0 8px; display:flex; flex-direction:column; gap:6px; }
.payout input:not([type=checkbox]) { max-width:180px; }
.offers { margin-top:8px; display:flex; flex-direction:column; gap:8px; }
.offer { border:1px solid var(--line); border-left:4px solid var(--gold); border-radius:10px; padding:10px 12px; background:var(--paper-2); }
.offer.o-accepted { border-left-color:var(--ok); }
.offer.o-rejected, .offer.o-withdrawn, .offer.o-countered { opacity:.7; border-left-color:var(--line); }
.offer .row { justify-content:space-between; }
ul.flags { list-style:none; margin:6px 0; padding:0; font-size:13px; }
ul.flags li { margin:2px 0; }
.translations pre { white-space:pre-wrap; font:inherit; font-size:13px; background:var(--paper); border:1px solid var(--line); border-radius:8px; padding:8px; margin:4px 0 8px; }
.small { font-size:13px; }

/* Listings: intake, viewings */
ul.intake { list-style:none; margin:0 0 8px; padding:0; }
ul.intake li { padding:4px 0; }
ul.intake li.done .auto { color:var(--ok); }
ul.intake .auto { color:var(--muted); }
.actcard.viewing ul.vchecks { list-style:none; margin:6px 0; padding:0; display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:2px 12px; }
.docpages { display:flex; flex-direction:column; gap:10px; }
.docpages img { width:100%; height:auto; border:1px solid var(--line); border-radius:6px; background:#fff; }
.tplrow { display:flex; align-items:center; gap:8px; }
.tplrow input[type=checkbox] { width:20px; height:20px; flex:none; }
.signlink input { width:100%; font-size:13px; margin-bottom:8px; }
.ocrsugg > div { margin-bottom:10px; }

/* Composer: listing photos going with the draft (tap to leave one out) */
.composer:has(.cmp-photos) { flex-wrap:wrap; }
.cmp-photos { flex:0 0 100%; display:flex; align-items:center; gap:6px; overflow-x:auto; scrollbar-width:none; padding:2px 0 0; }
.cmp-photos::-webkit-scrollbar { display:none; }
.cmp-photo { flex:0 0 auto; width:56px; height:56px; padding:0; border:2px solid var(--gold); border-radius:9px; overflow:hidden; cursor:pointer; background:#e9e4d8; position:relative; }
.cmp-photo img { width:100%; height:100%; object-fit:cover; display:block; }
.cmp-photo[aria-pressed=false] { border-color:var(--line); }
.cmp-photo[aria-pressed=false] img { opacity:.35; filter:grayscale(1); }
.cmp-photos .hint { white-space:nowrap; margin-left:4px; }


/* ================= Assistant =================
   phone / medium: full-screen sheet over the app (back gesture closes it)
   wide ≥ 1000px:  docked on the right; the page shrinks to make room */
:root { --asst-w: 420px; }
.assistant { position:fixed; z-index:320; display:flex; flex-direction:column; background:var(--paper-2); color:var(--ink); }
.assistant.fullscreen { inset:0; padding-bottom:var(--safe-bottom); animation:rise .2s ease both; }
.assistant.docked { top:0; right:0; bottom:0; width:var(--asst-w); z-index:25; border-left:1px solid var(--line); box-shadow:-10px 0 30px rgba(26,39,64,.08); }
.as-head { display:flex; align-items:center; gap:4px; padding:8px 8px 8px 16px; background:var(--navy); color:#fff; flex:0 0 auto;
  border-bottom:2px solid transparent; border-image:linear-gradient(90deg,var(--gold-2),var(--gold-soft),var(--gold-2)) 1; }
.as-title { flex:1; display:flex; align-items:center; gap:8px; font-family:var(--display); font-weight:600; letter-spacing:.05em; font-size:18px; }
.as-title .ico { color:var(--gold-soft); }
.as-head .iconbtn { font-size:18px; }
.as-head .iconbtn[aria-pressed=true] { background:rgba(255,255,255,.16); }
.as-body { flex:1; overflow-y:auto; overscroll-behavior:contain; padding:16px 14px 8px; display:flex; flex-direction:column; gap:10px; }
.as-empty { margin:auto 0; padding:10px 4px; }
.as-empty p { margin:0 0 8px; }
.as-suggest { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.as-suggest .chip { text-align:left; }
.as-msg { max-width:92%; border-radius:14px; padding:9px 13px; line-height:1.45; overflow-wrap:anywhere; }
.as-me { align-self:flex-end; background:var(--navy); color:#fff; border-bottom-right-radius:4px; white-space:pre-wrap; }
.as-voice { margin-right:6px; }
.as-bot { align-self:flex-start; background:var(--paper); border:1px solid var(--line); border-bottom-left-radius:4px; box-shadow:var(--shadow-sm); }
.as-err { border-color:rgba(177,67,47,.35); color:var(--danger); }
.as-working { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:14px; }
.as-dots { display:inline-flex; gap:4px; }
.as-dots i { width:6px; height:6px; border-radius:50%; background:var(--gold); animation:pulse 1.2s ease-in-out infinite; }
.as-dots i:nth-child(2) { animation-delay:.2s; } .as-dots i:nth-child(3) { animation-delay:.4s; }
.md p { margin:0 0 7px; } .md p:last-child { margin-bottom:0; }
.md .md-h { font-weight:600; color:var(--navy); }
.md ul, .md ol { margin:4px 0 8px; padding-left:20px; }
.md li { margin:2px 0; }
.md code { background:var(--paper-2); border:1px solid var(--line); border-radius:5px; padding:0 4px; font-size:.92em; }
.md a { color:var(--gold-2); font-weight:600; }
.as-steps { font-size:12px; color:var(--muted); margin:-2px 0 6px; }
.as-steps summary { cursor:pointer; }
.as-steps ul { margin:4px 0 0; padding-left:18px; }
.as-actions { list-style:none; margin:8px 0 0; padding:8px 0 0; border-top:1px dashed var(--line); font-size:13.5px; color:var(--ok); }
.as-actions li { margin:2px 0; }
.as-actions a { color:var(--ok); font-weight:600; }
.as-draft { margin-top:10px; border:1px solid var(--gold-soft); background:#fffdf6; border-radius:11px; padding:10px 12px; }
.as-draft-head { font-size:12px; font-weight:600; color:var(--gold-2); text-transform:uppercase; letter-spacing:.06em; margin-bottom:6px; }
.as-draft-text { white-space:pre-wrap; font-size:14px; margin-bottom:10px; }
.as-draft .row { display:flex; flex-wrap:wrap; gap:6px; }
.as-confirm { margin-top:10px; border:1px solid var(--danger); border-radius:11px; padding:10px 12px; }
.as-confirm-head { font-size:14px; font-weight:600; margin-bottom:6px; }
.as-confirm ul { margin:0 0 10px; padding-left:18px; font-size:13px; overflow-wrap:anywhere; }
.as-confirm .row { display:flex; flex-wrap:wrap; gap:6px; }
.as-threads { list-style:none; margin:0; padding:0; }
.as-threads li { display:flex; align-items:center; gap:4px; border-bottom:1px solid var(--line); }
.as-threads .plainrow { flex:1; text-align:left; }
.as-threads .plainrow[aria-current=true] strong { color:var(--gold-2); }
.as-compose { flex:0 0 auto; border-top:1px solid var(--line); background:var(--paper); padding:10px 10px calc(10px + var(--safe-bottom)); }
.as-inputrow { display:flex; align-items:flex-end; gap:6px; }
.as-inputrow textarea { flex:1; resize:none; border:1px solid var(--line); border-radius:20px; padding:10px 14px; background:var(--paper-2); max-height:140px; line-height:1.4; }
.as-btn { flex:0 0 auto; width:44px; height:44px; border-radius:50%; border:none; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.as-btn.send { background:var(--navy); color:#fff; }
.as-btn.mic { background:linear-gradient(135deg,var(--gold-soft),var(--gold) 55%,var(--gold-2)); color:var(--navy-3); }
.as-btn:disabled { opacity:.4; cursor:default; }
.as-btn:focus-visible { outline:3px solid rgba(194,161,78,.45); outline-offset:2px; }
.as-rec { display:flex; align-items:center; gap:10px; min-height:44px; font-weight:500; }
.as-rec > span:nth-child(2) { flex:1; }
.as-recdot { width:12px; height:12px; border-radius:50%; background:var(--danger); animation:pulse 1s ease-in-out infinite; }
.as-btn.attach { width:38px; background:none; color:var(--muted); }
.as-btn.attach:not(:disabled):hover { color:var(--navy); }
.as-pending { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 8px; }
.as-chip { display:inline-flex; align-items:center; gap:6px; max-width:100%; border:1px solid var(--line); background:var(--paper-2); border-radius:10px; padding:4px 4px 4px 6px; font-size:13px; }
.as-chip img { width:32px; height:32px; object-fit:cover; border-radius:6px; }
.as-chip.busy { opacity:.7; }
.as-chipx { border:0; background:none; color:var(--muted); cursor:pointer; width:28px; height:28px; border-radius:50%; flex:0 0 auto; }
.as-chipx:hover { background:var(--line); color:var(--navy); }
.as-filename { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:190px; }
.as-dots.small i { width:4px; height:4px; }
.as-files { display:flex; flex-wrap:wrap; gap:6px; margin:-2px -4px 6px; white-space:normal; }
.as-file { display:inline-flex; align-items:center; gap:6px; max-width:100%; color:#fff; text-decoration:none; background:rgba(255,255,255,.12); border-radius:9px; padding:4px; font-size:13px; }
.as-file img { width:64px; height:64px; object-fit:cover; border-radius:6px; background:#fff; }
.as-file .as-filename { max-width:160px; padding-right:6px; }
.as-file .hint { color:rgba(255,255,255,.7); }
.as-fileico { font-size:22px; padding:4px; }
.assistant.dropping { outline:3px dashed var(--gold); outline-offset:-6px; }
header.top .as-open .ico { color:var(--gold-soft); }
.rail-foot { display:flex; flex-direction:column; gap:4px; }
button.rail-item { background:none; border:0; font:inherit; cursor:pointer; width:100%; }
.rail-item.as-rail .ico { color:var(--gold-soft); }
.rail-item.as-rail[aria-pressed=true] { background:rgba(194,161,78,.2); color:#fff; }
@media (pointer:coarse) { .as-inputrow textarea { font-size:16px; } .as-suggest .chip { min-height:40px; } }
@media (min-width:1000px) {
  body.assistant-docked .content { margin-right:var(--asst-w); }
  body.assistant-docked .savebar { right:var(--asst-w); }
  body.assistant-docked .fab { right:calc(var(--asst-w) + 28px); }
}
@media (min-width:1400px) { :root { --asst-w: 460px; } }


/* ================= Simpler screens (D35) =================
   Records open as a summary of rows; each row opens a sheet with one Save.
   Today (what needs her), the boards, the microphone on records. */

/* Summary rows */
.record { display:flex; flex-direction:column; gap:14px; padding-bottom:84px; }
.sumgroup > h3 { font-size:12px; text-transform:uppercase; letter-spacing:.16em; color:var(--gold-2); margin:4px 0 7px 4px; font-weight:600; }
ul.sumrows { list-style:none; margin:0; padding:0; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow-sm); }
ul.sumrows > li + li { border-top:1px solid var(--line); }
.sumrow { display:flex; align-items:center; gap:12px; width:100%; min-height:62px; padding:11px 14px; background:none; border:0; text-align:left; cursor:pointer; color:inherit; font:inherit; }
.sumrow:focus-visible { outline:3px solid rgba(194,161,78,.45); outline-offset:-3px; }
@media (hover:hover) { .sumrow:hover { background:var(--paper-2); } }
.sumrow .tx { flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.sumrow .tx strong { font-weight:600; font-size:15.5px; color:var(--ink); }
.sumrow .tx .sub { color:var(--muted); font-size:13.5px; line-height:1.35; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.sumrow .chev { width:18px; height:18px; color:var(--muted); }
.st { flex:0 0 auto; width:26px; height:26px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-weight:700; font-size:14px; }
.st .ico { width:15px; height:15px; stroke-width:2.6; }
.st.ok { background:var(--ok-bg); color:var(--ok); }
.st.todo { background:var(--warn-bg); }
.st.todo::after { content:""; width:9px; height:9px; border-radius:50%; background:var(--gold); }
.st.warn { background:var(--sold-bg); color:var(--sold); }
.st.info { background:rgba(42,58,94,.07); }
.st.info::after { content:""; width:7px; height:7px; border-radius:50%; background:rgba(42,58,94,.35); }
.st.more { border:1.5px dashed var(--line); }
.st.more::after { content:"+"; color:var(--muted); font-weight:600; }
.sumthumb { flex:0 0 auto; width:52px; height:44px; border-radius:8px; overflow:hidden; background:#e9e4d8; display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-weight:600; color:var(--navy); }
.sumthumb img { width:100%; height:100%; object-fit:cover; }

/* Record header */
.rechead { display:flex; gap:16px; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; }
.rechead h1 { font-family:var(--display); font-weight:600; color:var(--navy); font-size:24px; line-height:1.2; margin:2px 0 4px; text-wrap:balance; }
.rechero { position:relative; flex:0 0 min(340px, 100%); aspect-ratio:4/3; border-radius:var(--radius); overflow:hidden; background:#e9e4d8; box-shadow:var(--shadow-sm); }
.rechero img { width:100%; height:100%; object-fit:cover; display:block; }
.rechero.empty { aspect-ratio:auto; height:120px; flex-basis:min(240px, 100%); box-shadow:none; border:1.5px dashed var(--line); background:var(--paper-2); }
.rechero .noimg { width:100%; height:100%; border:0; background:none; color:var(--navy); font:inherit; font-weight:600; cursor:pointer; }
.rechero .pub { position:absolute; top:8px; right:8px; background:rgba(26,39,64,.78); color:var(--gold-soft); font-size:11px; padding:3px 10px; border-radius:20px; letter-spacing:.06em; }
.rechero .pub.off { background:rgba(255,255,255,.9); color:var(--draft); }
.recinfo { flex:1 1 260px; min-width:0; }
.recinfo .id { font-size:11px; color:var(--gold-2); font-weight:600; letter-spacing:.14em; text-transform:uppercase; display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.recinfo .price { font-family:var(--display); font-weight:600; font-size:24px; color:var(--navy); }
.recinfo .facts { color:var(--muted); font-size:14px; margin-top:4px; }
.rechead.person { align-items:center; }
.rechead.person .who { display:flex; gap:12px; align-items:center; text-decoration:none; color:inherit; min-width:0; }
.rechead.person h1 { font-size:22px; margin:0; }
.rechead.deal h1 { font-size:22px; }
.recsub { margin:-6px 0 0; color:var(--muted); font-size:14px; }
.pillbtn { border:1px solid currentColor; cursor:pointer; font-size:12px; padding:7px 13px; min-height:36px; }
.pillbtn.stage { display:inline-flex; align-items:center; gap:4px; }

/* Sheets with a Save footer */
.sheet.editsheet { display:flex; flex-direction:column; overflow:hidden; }
.sheet.editsheet .sheet-body { overflow-y:auto; overscroll-behavior:contain; flex:1; min-height:0; padding-top:18px; }
.sheet.editsheet .sheet-body h2 { font-family:var(--display); color:var(--navy); margin:0 0 4px; padding-right:8px; }
.sheet-sub { margin:0 0 12px; }
.sheet-foot { flex:0 0 auto; display:flex; align-items:center; gap:10px; padding:10px 18px calc(10px + var(--safe-bottom)); border-top:1px solid var(--line); background:var(--paper); }
.sheet-foot .grow { flex:1; min-width:0; }
.sheet.editsheet { padding-bottom:0; }
@media (min-width:760px) { .sheet.editsheet { max-width:620px; max-height:88vh; } .sheet.editsheet.wide { max-width:820px; } }
.sheet-danger { margin-top:18px; padding-top:10px; border-top:1px dashed var(--line); }
.linkbtn.danger { color:var(--danger); }
.more-details { margin:4px 0 14px; }
.more-details summary { cursor:pointer; font-weight:600; color:var(--navy); font-size:14px; padding:6px 0; }
.chips.wrap { flex-wrap:wrap; overflow:visible; margin-left:0; margin-right:0; padding:0; }
.quickdates { margin-top:0; }

/* Pick one (stage) */
ul.choices { list-style:none; margin:0 0 10px; padding:0; display:flex; flex-direction:column; gap:6px; }
.choice { display:flex; align-items:center; gap:12px; width:100%; min-height:52px; padding:10px 14px; border:1px solid var(--line); border-radius:12px; background:var(--paper-2); cursor:pointer; text-align:left; font:inherit; color:var(--ink); }
.choice .tx { display:flex; flex-direction:column; }
.choice .tx .hint { margin:0; }
.choice .radio { flex:0 0 auto; width:20px; height:20px; border-radius:50%; border:2px solid var(--line); }
.choice[aria-pressed=true] { border-color:var(--navy); background:var(--paper); box-shadow:0 0 0 1px var(--navy) inset; }
.choice[aria-pressed=true] .radio { border-color:var(--navy); background:radial-gradient(circle, var(--navy) 45%, transparent 50%); }
.choice:disabled { opacity:.45; cursor:default; }

/* "Next here" and Today cards */
.nexthere > h3, .tgroup > h3 { font-size:12px; text-transform:uppercase; letter-spacing:.16em; color:var(--gold-2); margin:0 0 7px 4px; font-weight:600; }
ul.tcards { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.tcard { background:var(--paper); border:1px solid var(--line); border-left:3px solid var(--gold); border-radius:var(--radius); padding:12px 14px 10px; box-shadow:var(--shadow-sm); display:flex; flex-direction:column; gap:8px; }
.tcard.late { border-left-color:var(--danger); }
.tcard.compact { padding:10px 12px 8px; }
.tc-top { display:flex; gap:10px; align-items:flex-start; }
.tc-ic { flex:0 0 auto; width:34px; height:34px; border-radius:9px; background:var(--paper-2); border:1px solid var(--line); display:flex; align-items:center; justify-content:center; font-size:16px; }
.tc-tx { flex:1; min-width:0; display:flex; flex-direction:column; }
.tc-tx strong { font-weight:600; font-size:15px; overflow-wrap:anywhere; }
.tc-sub { color:var(--muted); font-size:13px; overflow-wrap:anywhere; }
.tc-sub.late { color:var(--danger); font-weight:600; }
.tc-quote { display:block; font-style:italic; font-size:14px; color:var(--ink); background:var(--paper-2); border-radius:8px; padding:6px 10px; quotes:"“" "”"; overflow-wrap:anywhere; }
.tc-acts { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.tc-acts .grow { flex:1; }
.tc-acts .linkbtn { color:var(--muted); font-size:13px; padding:6px 4px; }
.todayview { display:flex; flex-direction:column; gap:14px; }
.greet h1 { font-family:var(--display); font-weight:600; color:var(--navy); font-size:24px; margin:0; }
.greet p { margin:2px 0 0; color:var(--muted); font-size:14px; }
.today-clear { background:var(--ok-bg); color:var(--ok); border-radius:var(--radius); padding:12px 14px; margin:0; font-weight:500; }
.showmore { align-self:flex-start; }
.today-hidden { margin:-6px 0 0 4px; }
.chats-title { font-size:12px; text-transform:uppercase; letter-spacing:.16em; color:var(--gold-2); margin:10px 0 -4px 4px; font-weight:600; }
.list-pane .todayview .greet h1 { font-size:20px; }

/* Notebook (/knowledge): suggestions from chats to check, and what the assistant knows */
.kn-topic { font-size:11px; text-transform:uppercase; letter-spacing:.14em; color:var(--gold-2); font-weight:600; }
.kn-old { color:var(--muted); text-decoration:line-through; font-size:13px; overflow-wrap:anywhere; }
.kn-quotes { display:flex; flex-direction:column; gap:4px; }
.kn-who { font-style:normal; font-weight:600; font-size:12px; color:var(--muted); margin-right:4px; }
.kn-form { display:flex; flex-direction:column; gap:6px; }
.kn-form textarea { width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:9px; background:var(--paper-2); font:inherit; }
.kn-group { margin-bottom:12px; }
ul.kn-list { list-style:none; margin:4px 0 0; padding:0; display:flex; flex-direction:column; }
.kn-entry { display:flex; flex-direction:column; gap:2px; padding:8px 0; border-bottom:1px solid var(--line); }
.kn-entry:last-child { border-bottom:0; }
.kn-entrybtn { border:0; background:none; padding:0; text-align:left; font:inherit; color:var(--ink); cursor:pointer; overflow-wrap:anywhere; }
.kn-learn { align-items:flex-start; margin:12px 0 0; }
.kn-learn .hint { display:block; }

/* Toast with an action (Undo) */
.toast.has-action { display:flex; align-items:center; gap:14px; }
.toast-act { border:0; background:none; color:var(--gold-soft); font:inherit; font-weight:600; cursor:pointer; padding:4px 2px; text-decoration:underline; }

/* Boards */
.boardpage .toolbar, .toolbar { align-items:center; }
.viewtoggle button { padding:6px 14px; font-size:13px; }
.board { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(150px, 1fr); gap:10px; overflow-x:auto; padding-bottom:10px; align-items:start; }
.bcol { background:rgba(255,255,255,.45); border:1px solid var(--line); border-radius:var(--radius); padding:8px; min-height:140px; transition:background .15s, border-color .15s; }
.bcol.over { background:rgba(194,161,78,.14); border-color:var(--gold); }
.bcol > h3 { margin:2px 4px 8px; font-size:12px; text-transform:uppercase; letter-spacing:.12em; color:var(--navy); font-weight:600; display:flex; justify-content:space-between; }
.bcol > h3 .n, .colchips .n { color:var(--muted); font-weight:500; }
ul.bcards { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.bcard { background:var(--paper); border:1px solid var(--line); border-radius:11px; box-shadow:var(--shadow-sm); display:flex; flex-direction:column; }
.bcard[draggable=true] { cursor:grab; }
.bcard > a { display:flex; flex-direction:column; gap:3px; padding:10px 11px 4px; color:inherit; text-decoration:none; min-width:0; }
.bcard .bhead { display:flex; align-items:center; gap:8px; min-width:0; }
.bcard .bhead strong, .bcard > a > strong { font-weight:600; font-size:14.5px; line-height:1.25; overflow-wrap:anywhere; }
.bcard .avatar.sm { width:28px; height:28px; font-size:11px; }
.bcard .sub { color:var(--muted); font-size:12.5px; overflow-wrap:anywhere; }
.bcard .nx { font-size:12.5px; color:var(--navy); font-weight:500; }
.bcard .nx.late { color:var(--danger); font-weight:600; }
.bcard .yours { font-family:var(--display); font-weight:600; color:var(--navy); font-size:15px; }
.bcard.money { border-color:var(--gold); background:linear-gradient(180deg, rgba(231,212,160,.28), var(--paper) 55%); }
.bcard .mv { align-self:flex-end; border:0; background:none; color:var(--gold-2); font:inherit; font-size:12.5px; font-weight:600; cursor:pointer; padding:4px 11px 8px; }
.bcard.listing > a { flex-direction:row; gap:10px; align-items:flex-start; }
.bcard .bthumb { flex:0 0 auto; width:62px; height:52px; border-radius:8px; overflow:hidden; background:#e9e4d8; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:600; color:var(--navy); }
.bcard .bthumb img { width:100%; height:100%; object-fit:cover; }
.bcard .btext { display:flex; flex-direction:column; gap:2px; min-width:0; }
.bcard .btext strong { font-size:14px; font-weight:600; overflow-wrap:anywhere; }
.bempty { border:1.5px dashed var(--line); border-radius:11px; padding:16px 8px; text-align:center; font-size:12.5px; color:var(--muted); font-style:italic; }
.board.phone { display:block; overflow:visible; }
.board.phone ul.bcards { margin-top:4px; }
.boardfoot { margin-top:8px; }
.boardfoot a { color:var(--gold-2); font-weight:600; }

/* What she gets (deal) */
.dealmoney { background:var(--paper); border:1px solid var(--gold-soft); border-radius:var(--radius); padding:12px 16px; box-shadow:var(--shadow-sm); background-image:linear-gradient(180deg, rgba(231,212,160,.22), transparent 70%); }
.dealmoney-top { display:flex; justify-content:space-between; align-items:baseline; gap:10px; }
.dealmoney-top .k { font-size:12px; text-transform:uppercase; letter-spacing:.16em; color:var(--gold-2); font-weight:600; }
.dealmoney-top strong { font-family:var(--display); font-size:28px; color:var(--navy); }
.dealmoney .hint { margin:2px 0 0; }

/* A property on a lead */
.lpsheet-head { display:flex; gap:12px; align-items:flex-start; margin-bottom:10px; }
.lpsheet-img { width:112px; height:84px; object-fit:cover; border-radius:10px; flex:0 0 auto; }
.offer-more { margin-top:0; }
.newlisting { max-width:640px; }
.warnline { color:var(--warn); font-weight:600; }

/* The microphone on a record ("Tell Panavida") */
.micbar { position:fixed; left:0; right:0; bottom:0; z-index:18; display:flex; align-items:center; gap:12px; padding:9px 16px calc(9px + var(--safe-bottom));
  background:rgba(255,255,255,.97); backdrop-filter:blur(6px); border-top:1px solid var(--line); box-shadow:0 -6px 20px rgba(26,39,64,.08); }
.micbar .mic { flex:0 0 auto; width:52px; height:52px; border-radius:50%; border:0; cursor:pointer; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,var(--gold-soft),var(--gold) 55%,var(--gold-2)); color:var(--navy-3); box-shadow:0 4px 14px rgba(168,132,47,.4); }
.micbar .mic .ico { width:26px; height:26px; stroke-width:2; }
.micbar .mictext { flex:1; min-width:0; display:flex; flex-direction:column; align-items:flex-start; border:0; background:none; cursor:pointer; text-align:left; font:inherit; color:var(--ink); padding:0; }
.micbar .mictext strong { color:var(--navy); font-size:15px; }
.micbar .mictext span { color:var(--muted); font-size:12.5px; }
.micbar button:focus-visible { outline:3px solid rgba(194,161,78,.45); outline-offset:2px; }
body:has(input:focus, textarea:focus) .micbar { display:none; }
@media (min-width:1000px) {
  .micbar { left:auto; right:28px; bottom:calc(24px + var(--safe-bottom)); border:1px solid var(--line); border-radius:40px; padding:7px 22px 7px 7px; box-shadow:var(--shadow); max-width:360px; }
  body.assistant-docked .micbar { right:calc(var(--asst-w) + 28px); }
  .micbar .mictext span { display:none; }
  .micbar { padding-right:26px; }
}

/* Assistant: record mode and change cards */
.as-rectitle { display:flex; flex-direction:column; line-height:1.15; min-width:0; }
.as-rectitle small { font-family:var(--ui); font-size:12.5px; letter-spacing:0; color:var(--gold-soft); font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.as-change { margin-top:10px; border:1.5px solid var(--gold); border-radius:12px; background:var(--paper); padding:11px 12px; display:flex; flex-direction:column; gap:8px; box-shadow:0 6px 18px rgba(168,132,47,.12); }
.as-change.saved { border-color:var(--ok); box-shadow:none; }
.as-change.dropped { border-color:var(--line); box-shadow:none; opacity:.75; }
.as-change-head { font-weight:600; font-size:14.5px; }
dl.as-kv { display:grid; grid-template-columns:auto 1fr; gap:4px 12px; margin:0; font-size:14px; }
dl.as-kv dt { color:var(--muted); }
dl.as-kv dd { margin:0; font-weight:600; text-align:right; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
dl.as-kv dd small { font-weight:400; color:var(--muted); }
dl.as-kv .was { display:block; text-decoration:line-through; }
ul.as-flags { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:4px; font-size:13px; }
ul.as-flags li { border-left:3px solid var(--gold); background:var(--paper-2); padding:5px 8px; border-radius:0 6px 6px 0; }
ul.as-flags li.warn { border-left-color:var(--danger); color:var(--danger); }
.as-change-done { font-weight:600; color:var(--ok); font-size:13.5px; }
.as-change-done.muted { color:var(--muted); font-weight:500; }
.as-tiny { font-size:11.5px; color:var(--muted); }
.chip.static { cursor:default; }

@media (pointer:coarse) {
  .sumrow { min-height:66px; }
  .viewtoggle button { min-height:40px; }
  .bcard .mv { min-height:40px; }
}
@media (max-width:699px) {
  .rechero { flex-basis:100%; aspect-ratio:16/10; }
  .rechead h1 { font-size:21px; }
  .record { padding-bottom:96px; }
  .toolbar .viewtoggle button { padding:6px 11px; }
  .sheet-foot .grow { display:none; }
  .rechero.empty { height:96px; flex-basis:100%; }
  .boardpage .moneystrip { grid-template-columns:repeat(3, 1fr); gap:6px; }
  .boardpage .moneystrip > div { padding:8px 10px; }
  .boardpage .moneystrip strong { font-size:16px; }
  .boardpage .moneystrip .k { font-size:11px; }
}

/* Intake forms (views/intake.js) */
.iform-page .pagehead { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.iform-page .pagehead h1 { font-family:var(--display); font-weight:600; color:var(--navy); font-size:24px; margin:4px 0; }
ul.iform-list { list-style:none; margin:0 0 12px; padding:0; display:flex; flex-direction:column; gap:8px; }
.iform-row { display:flex; align-items:center; gap:12px; min-height:56px; padding:10px 14px; background:var(--paper); border:1px solid var(--line); border-radius:12px;
  text-decoration:none; color:inherit; }
.iform-row.fresh { border-color:var(--gold); box-shadow:0 0 0 3px rgba(194,161,78,.14); }
.iform-row .ic { font-size:20px; flex:0 0 auto; }
.iform-row .tx { display:flex; flex-direction:column; min-width:0; flex:1; }
.iform-row .tx .hint { margin:0; }
.badge.new { background:var(--gold-soft); color:var(--navy-3); }
.iform-make { display:flex; flex-direction:column; gap:12px; }
.iform-make .field { margin:0; }
.iform-make .chips { margin:4px 0 0; }
.iform-make .flabel { font-size:13px; font-weight:600; color:var(--muted); }
.iform-link .chips { margin:4px 0 10px; }
.iform-msg { white-space:pre-line; overflow-wrap:anywhere; background:var(--paper-2); border:1px dashed var(--gold-soft); border-radius:12px; padding:12px 14px; font-size:14px; margin:0 0 12px; }
.iform-acts { display:flex; gap:8px; flex-wrap:wrap; }
.iform-acts .btn { flex:1 1 auto; text-align:center; justify-content:center; min-height:44px; }
.iform-answers dl { margin:0; }
.iform-answers .qa { padding:10px 0; border-bottom:1px solid var(--line); }
.iform-answers .qa:last-child { border-bottom:0; }
.iform-answers dt { font-size:13px; color:var(--muted); }
.iform-answers dd { margin:2px 0 0; font-size:16px; font-weight:500; white-space:pre-line; overflow-wrap:anywhere; }
.iform-foot { text-align:center; }
