@font-face{font-family:'Bauhaus';src:url('/fonts/BauhausRegular.ttf') format('truetype');font-weight:400;}
@font-face{font-family:'Bauhaus';src:url('/fonts/BauhausBold.ttf') format('truetype');font-weight:700;}
:root{
  --neu:#e8eae6; --ink:#000000; --red:#c40026; --red-d:#a0001e; --pine:#0e3d2e;
  --sh-out:7px 7px 14px rgba(163,175,166,.55),-7px -7px 14px rgba(255,255,255,.92);
  --sh-out-lg:11px 11px 24px rgba(163,175,166,.5),-11px -11px 24px rgba(255,255,255,.9);
  --sh-in:inset 5px 5px 10px rgba(163,175,166,.55),inset -5px -5px 10px rgba(255,255,255,.95);
  --sh-ava:4px 4px 9px rgba(163,175,166,.55),-4px -4px 9px rgba(255,255,255,.9);
}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent;}
body{font-family:"Public Sans","Segoe UI",Verdana,Geneva,sans-serif;background:#dfe3de;color:#000;min-height:100dvh;}
h1,h2,h3,h4,.bh{font-family:"Bauhaus","Public Sans",sans-serif;}
a{color:var(--red-d);}

/* ---------- auth pages ---------- */
.authwrap{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:18px;}
.authcard{width:min(430px,100%);background:var(--neu);border-radius:30px;box-shadow:var(--sh-out-lg);padding:34px 28px 26px;text-align:center;}
.catmark{width:92px;height:92px;margin:0 auto 10px;border-radius:50%;background:var(--neu);box-shadow:var(--sh-out);display:flex;align-items:center;justify-content:center;}
.wm{font-family:"Bauhaus",sans-serif;font-size:30px;font-weight:700;letter-spacing:3px;}
.tagline{font-size:13.5px;opacity:.75;margin:6px 0 22px;}
.banner{border-radius:16px;padding:12px 14px;font-size:13.5px;margin-bottom:14px;text-align:left;background:#fff;box-shadow:var(--sh-ava);}
.banner.err{border-left:6px solid var(--red);}
.banner.ok{border-left:6px solid var(--pine);}
.btn-google{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;border:none;cursor:pointer;text-decoration:none;border-radius:999px;background:var(--red);color:#fff;font-family:"Bauhaus",sans-serif;font-size:16.5px;padding:14px 0;box-shadow:var(--sh-out);transition:background .15s;}
.btn-google:hover{background:var(--red-d);}
.btn-google .g{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;background:#fff;color:var(--red);font-weight:700;font-size:16px;}
.fineprint{font-size:12.5px;opacity:.7;margin-top:16px;line-height:1.5;}
.field{width:100%;border:none;border-radius:14px;padding:13px 15px;font-family:inherit;font-size:14.5px;background:var(--neu);box-shadow:var(--sh-in);color:#000;outline:none;margin-bottom:13px;text-align:left;}
.field::placeholder{color:#000;opacity:.45;}
.btn-submit{width:100%;border:none;cursor:pointer;border-radius:999px;background:var(--red);color:#fff;font-family:"Bauhaus",sans-serif;font-size:16px;padding:13px 0;box-shadow:var(--sh-out);}
.btn-submit:hover{background:var(--red-d);}
.hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0;}
.foot{margin-top:20px;font-size:11.5px;opacity:.55;letter-spacing:.06em;}

/* ---------- app shell ---------- */
.app{position:relative;max-width:520px;margin:0 auto;min-height:100dvh;background:var(--neu);display:flex;flex-direction:column;box-shadow:var(--sh-out-lg);}
@media(min-width:900px){.app{max-width:760px;}}
.topbar{display:flex;align-items:center;gap:9px;padding:15px 18px 9px;flex:none;}
.topbar .wm{font-size:21px;letter-spacing:2px;}
.chip{display:inline-block;font-size:10px;font-weight:800;letter-spacing:.04em;border-radius:999px;padding:4px 10px;background:var(--neu);box-shadow:var(--sh-in);color:#000;white-space:nowrap;}
.chip.solid{background:var(--red);color:#fff;box-shadow:var(--sh-ava);}
.topbar .spacer{flex:1;}
.iconbtn{border:none;cursor:pointer;border-radius:999px;background:var(--neu);box-shadow:var(--sh-out);color:#000;font-family:"Bauhaus",sans-serif;font-size:12.5px;padding:8px 14px;}
.iconbtn:active{box-shadow:var(--sh-in);}
main{flex:1;overflow-y:auto;padding:6px 18px 150px;}
.panel{display:none;}
.panel.active{display:block;}
.ptitle{font-size:22px;margin:8px 0 4px;}
.psub{font-size:13px;opacity:.7;margin-bottom:14px;}
.card{background:var(--neu);border-radius:22px;box-shadow:var(--sh-out);padding:16px;margin-bottom:14px;}
.card h3{font-size:16px;margin-bottom:6px;}
.card p{font-size:13.5px;line-height:1.55;}
.well{background:var(--neu);border-radius:18px;box-shadow:var(--sh-in);padding:14px;margin-bottom:13px;font-size:13.5px;line-height:1.55;}
.statrow{display:flex;gap:11px;margin-bottom:14px;flex-wrap:wrap;}
.stat{flex:1;min-width:96px;background:var(--neu);border-radius:20px;box-shadow:var(--sh-out);padding:13px;text-align:center;}
.stat .n{font-family:"Bauhaus",sans-serif;font-size:25px;font-weight:700;}
.stat .l{font-size:10.5px;font-weight:700;letter-spacing:.05em;opacity:.65;}
.abtn{display:inline-block;border:none;border-radius:999px;font-family:"Bauhaus",sans-serif;font-size:13.5px;padding:10px 18px;cursor:pointer;background:var(--neu);box-shadow:var(--sh-out);color:#000;text-decoration:none;}
.abtn.red{background:var(--red);color:#fff;}
.abtn.disabled{opacity:.55;cursor:default;}

/* drawer */
.drawerwrap{position:fixed;inset:0;z-index:40;display:none;}
.drawerwrap.open{display:block;}
.scrim{position:absolute;inset:0;background:rgba(20,30,24,.35);}
.drawer{position:absolute;left:50%;transform:translate(-50%,0);top:0;width:min(520px,100%);max-height:82dvh;overflow-y:auto;background:var(--neu);border-radius:0 0 28px 28px;box-shadow:var(--sh-out-lg);padding:20px 20px 16px;}
.drawer h3{font-size:17px;margin-bottom:10px;}
.dlink{display:flex;align-items:center;gap:10px;width:100%;text-align:left;border:none;cursor:pointer;background:var(--neu);box-shadow:var(--sh-out);border-radius:16px;padding:13px 15px;font-family:inherit;font-size:14px;color:#000;margin-bottom:10px;text-decoration:none;}
.dlink .soon{margin-left:auto;}
.dlink:active{box-shadow:var(--sh-in);}

/* arch nav */
.arch{position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:min(520px,100%);height:118px;z-index:30;pointer-events:none;}
@media(min-width:900px){.arch{width:min(760px,100%);}}
.arch .curve{position:absolute;left:-12%;right:-12%;bottom:-46px;height:118px;background:var(--neu);border-radius:50%/100% 100% 0 0;box-shadow:0 -8px 22px rgba(163,175,166,.45);}
.archrow{position:absolute;left:0;right:0;bottom:0;height:118px;display:flex;align-items:flex-end;justify-content:space-evenly;padding:0 8px 13px;}
.archbtn{pointer-events:auto;border:none;cursor:pointer;width:62px;height:62px;border-radius:50%;background:var(--neu);box-shadow:var(--sh-out);color:#000;font-family:"Bauhaus",sans-serif;font-size:10.5px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;}
.archbtn .ic{font-size:19px;line-height:1;}
.archbtn.active{background:var(--red);color:#fff;}
.archbtn:active{box-shadow:var(--sh-in);}
.catbtn{pointer-events:auto;border:none;cursor:pointer;width:76px;height:76px;border-radius:50%;background:var(--neu);box-shadow:var(--sh-out-lg);display:flex;align-items:center;justify-content:center;margin-bottom:16px;}
.catbtn:active{box-shadow:var(--sh-in);}

/* ---------- admin ---------- */
.urow{display:flex;align-items:center;gap:12px;background:var(--neu);border-radius:20px;box-shadow:var(--sh-out);padding:14px 15px;margin-bottom:12px;flex-wrap:wrap;}
.uava{width:44px;height:44px;flex:none;border-radius:50%;background:var(--neu);box-shadow:var(--sh-ava);display:flex;align-items:center;justify-content:center;font-family:"Bauhaus",sans-serif;font-weight:700;font-size:17px;}
.uinfo{flex:1;min-width:170px;}
.uinfo .un{font-weight:700;font-size:14.5px;}
.uinfo .ue{font-size:12.5px;opacity:.7;word-break:break-all;}
.uinfo .um{font-size:11.5px;opacity:.6;margin-top:2px;}
.sbtn{border:none;cursor:pointer;border-radius:999px;font-family:"Bauhaus",sans-serif;font-size:12px;padding:8px 14px;background:var(--neu);box-shadow:var(--sh-out);color:#000;}
.sbtn:active{box-shadow:var(--sh-in);}
.sbtn.red{background:var(--red);color:#fff;}
.sbtn.pine{background:var(--pine);color:#fff;}
select.field{appearance:none;-webkit-appearance:none;}
.inlineform{display:inline-flex;gap:8px;align-items:center;flex-wrap:wrap;}
.codeinp{width:130px;border:none;border-radius:14px;padding:10px 12px;font-family:"Bauhaus",sans-serif;font-size:17px;letter-spacing:4px;background:var(--neu);box-shadow:var(--sh-in);color:#000;outline:none;text-align:center;}
.supportstrip{position:sticky;top:0;z-index:25;background:#fff;border-left:7px solid var(--red);box-shadow:var(--sh-ava);padding:11px 16px;font-size:13.5px;display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.bigcode{font-family:"Bauhaus",sans-serif;font-size:27px;font-weight:700;letter-spacing:6px;}
.seclabel{font-family:"Bauhaus",sans-serif;font-size:13px;letter-spacing:.05em;text-transform:uppercase;margin:4px 0 12px;}
.flabel{display:block;font-size:12.5px;font-weight:700;margin:12px 0 5px;}
.hint{font-size:12px;opacity:.65;margin-top:12px;line-height:1.55;}
main .card{margin-bottom:4px;}
.favrow{display:flex;gap:14px;overflow-x:auto;padding:4px 2px 8px;}
.fav{display:flex;flex-direction:column;align-items:center;gap:5px;width:62px;flex:none;text-align:center;text-decoration:none;color:#000;}
.fav .uava{width:52px;height:52px;font-size:19px;}
.fav span:last-child{font-size:11px;line-height:1.25;}
.radiocard{display:flex;gap:11px;align-items:flex-start;background:#fff;border-radius:16px;box-shadow:var(--sh-ava);padding:13px 14px;margin-bottom:11px;cursor:pointer;font-size:13.5px;line-height:1.5;}
.radiocard input{margin-top:3px;accent-color:var(--red);width:17px;height:17px;flex:none;}
.herocat{width:150px;height:150px;margin:26px auto 6px;border-radius:50%;background:var(--neu);box-shadow:var(--sh-out);display:flex;align-items:center;justify-content:center;}
.herotitle{font-family:"Bauhaus",sans-serif;font-size:34px;line-height:1.15;text-align:center;margin:14px 8px 6px;}
.herotag{text-align:center;font-size:16.5px;line-height:1.6;opacity:.85;max-width:560px;margin:0 auto;}
.pillars{display:grid;gap:14px;margin-top:22px;}
@media(min-width:700px){.pillars{grid-template-columns:1fr 1fr 1fr;}}
.pillar{background:var(--neu);border-radius:22px;box-shadow:var(--sh-out);padding:18px;}
.pillar h3{font-family:"Bauhaus",sans-serif;font-size:16px;margin-bottom:7px;}
.pillar p{font-size:13.5px;line-height:1.6;}
.landwrap{max-width:860px;margin:0 auto;padding:0 16px 40px;}

/* ---------- phase 3: panels, Message HQ, calendar, cat modes ---------- */
html,body{overflow-x:clip;}
.inlineform{display:flex;}
.inlineform .field{min-width:0!important;flex:1 1 130px;width:auto;}
.uinfo{min-width:0;}
.ftab{border:none;cursor:pointer;border-radius:999px;background:var(--neu);box-shadow:var(--sh-out);color:#000;font-family:"Bauhaus",sans-serif;font-size:12.5px;padding:9px 16px;}
.ftab:active{box-shadow:var(--sh-in);}
.ftab.active{background:var(--red);color:#fff;}
.tchip{display:inline-block;font-size:9.5px;font-weight:800;letter-spacing:.05em;border-radius:999px;padding:3px 8px;background:var(--neu);box-shadow:var(--sh-in);color:#000;white-space:nowrap;vertical-align:2px;margin-left:6px;}
.tchip.q{background:transparent;box-shadow:none;border:1.5px dashed rgba(0,0,0,.45);}
.threadrow{display:flex;align-items:center;gap:12px;width:100%;text-align:left;border:none;cursor:pointer;background:var(--neu);box-shadow:var(--sh-out);border-radius:20px;padding:13px 15px;margin-bottom:12px;font-family:inherit;color:#000;}
.threadrow:active{box-shadow:var(--sh-in);}
.threadrow.open{background:#fff;box-shadow:var(--sh-ava);border-left:6px solid var(--red);}
.unreadot{width:9px;height:9px;border-radius:50%;background:#000;display:inline-block;}
.bubbles{display:flex;flex-direction:column;}
.bubble{max-width:84%;padding:10px 13px;border-radius:18px;font-size:14px;line-height:1.5;margin-bottom:8px;white-space:pre-wrap;}
.bubble.in{background:#fff;box-shadow:var(--sh-ava);align-self:flex-start;border-bottom-left-radius:6px;}
.bubble.out{background:var(--neu);box-shadow:var(--sh-in);align-self:flex-end;border-bottom-right-radius:6px;}
.composer{display:flex;gap:8px;align-items:center;}
.dot{width:6px;height:6px;border-radius:50%;display:inline-block;margin:0 1px;vertical-align:middle;}
.dot.escrow{background:var(--red);}
.dot.tours_calls{background:#000;}
.dot.personal{background:#9aa39c;}
.calgrid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;}
.caldow{text-align:center;font-size:10.5px;font-weight:800;opacity:.55;padding:2px 0;}
.calday{border:none;cursor:pointer;background:var(--neu);box-shadow:var(--sh-out);border-radius:14px;aspect-ratio:.92;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-family:inherit;font-size:13px;color:#000;padding:3px 0;}
.calday .dots{min-height:8px;line-height:1;}
.calday.today{box-shadow:var(--sh-in);}
.calday.sel{background:var(--red);color:#fff;}
.calday.sel .dot{background:#fff;}
.evrow{font-size:13.5px;padding:5px 0;}
@keyframes purr{0%{transform:scale(1);}40%{transform:scale(1.09) rotate(-2deg);}100%{transform:scale(1);}}
.catbtn.purr{animation:purr .32s ease;}
.archbtn,.arch .curve{transition:opacity .25s,transform .25s;}
body.catonly .archbtn{opacity:0;pointer-events:none;transform:translateY(18px);}
body.catonly .arch .curve{opacity:0;}

/* ---------- phase 3c: outlook-style calendar, slim sync, topbar fit ---------- */
.topbar .chip{max-width:32vw;overflow:hidden;text-overflow:ellipsis;}
.calgrid{gap:5px;}
.calday{aspect-ratio:auto;min-height:64px;align-items:stretch;justify-content:flex-start;text-align:left;padding:4px 5px;border-radius:13px;gap:2px;background:#fff;box-shadow:var(--sh-ava);}
.calnum{font-size:11.5px;font-weight:700;width:19px;height:19px;display:flex;align-items:center;justify-content:center;border-radius:50%;flex:none;}
.calday.today .calnum{box-shadow:inset 0 0 0 2px var(--red);color:var(--red-d);}
.calday.sel{background:var(--neu);box-shadow:var(--sh-in);}
.calday.sel .calnum{background:var(--red);color:#fff;box-shadow:none;}
.calpills{display:flex;flex-direction:column;gap:2px;width:100%;}
.calpill{font-size:8.5px;font-weight:700;line-height:1.3;padding:1.5px 4px;border-radius:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:var(--neu);box-shadow:var(--sh-in);color:#000;}
.calpill.escrow{background:var(--red);color:#fff;box-shadow:none;}
.calpill.tours_calls{background:#000;color:#fff;box-shadow:none;}
.calmore{font-size:8.5px;opacity:.6;font-weight:700;}
.dayev{display:flex;gap:10px;align-items:baseline;background:#fff;box-shadow:var(--sh-ava);border-radius:16px;padding:11px 14px;margin-bottom:9px;font-size:14px;}
.dayev b{flex:none;min-width:76px;font-size:13px;}

/* phase 3d: settings gear sizing */
.iconbtn svg{width:21px;height:21px;display:block;}

/* ---------- phase 3e: calendar chrome (views, add, search) ---------- */
.cbtn{width:34px;height:34px;}
.cbtn svg{width:17px;height:17px;display:block;}
.wkrow{display:flex;gap:10px;align-items:flex-start;width:100%;text-align:left;background:#fff;box-shadow:var(--sh-ava);border:none;border-radius:14px;padding:10px 12px;margin-bottom:8px;font:inherit;color:#000;cursor:pointer;}
.wkrow.sel{box-shadow:var(--sh-in);background:var(--neu);}
.wkrow .wkd{flex:none;min-width:96px;font-size:12.5px;}

/* ---------- phase 3l: full-bleed month grid, outlook-grade readability ---------- */
.calgrid.bleed{margin-left:-18px;margin-right:-18px;}
.calgrid{gap:3px;}
.caldow{padding:2px 0;font-size:11px;}
.calday{min-height:56px;padding:3px;border-radius:10px;gap:1px;}
.calnum{font-size:12px;width:18px;height:18px;}
.calpill{font-size:10.5px;line-height:1.25;padding:1.5px 4px;border-radius:5px;background:#f5dd8a;color:#4a3800;box-shadow:none;}
.calpill.escrow{background:#f6c1cb;color:#7c1220;box-shadow:none;}
.calpill.tours_calls{background:#262626;color:#fff;box-shadow:none;}
.calmore{font-size:9.5px;}

/* ---------- phase 3m: contacts = the dialer ---------- */
button.crow{font:inherit;color:#000;background:none;border:none;cursor:pointer;text-align:left;padding:0;}
button.urow{width:100%;}
.cdava{width:84px;height:84px;border-radius:50%;background:#fff;box-shadow:var(--sh-ava);display:flex;align-items:center;justify-content:center;font-family:'Bauhaus',sans-serif;font-size:32px;margin:0 auto;}
.cdacts{display:flex;gap:10px;margin:16px 0 4px;}
.cdact{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;padding:13px 4px;border-radius:18px;background:var(--neu);box-shadow:var(--sh-out);border:none;cursor:pointer;font:inherit;font-size:13.5px;font-weight:700;color:#000;text-decoration:none;}
.cdact .ic{font-size:21px;line-height:1;}
.cdact.red{background:var(--red);color:#fff;}

/* ---------- phase 3n: arch icons up a size ---------- */
.archbtn .ic{font-size:26px;}
.archbtn{font-size:11px;}

/* ---------- phase 3o: equal columns — no min-content blowout ---------- */
.calgrid{grid-template-columns:repeat(7,minmax(0,1fr));}
.calday{min-width:0;min-height:52px;}
.calpill{min-width:0;font-size:11px;}

/* ---------- phase 4a: leads pipeline ---------- */
.leadcard{padding:16px 18px;}

/* ---------- phase 6d: DESKTOP — mobile design reversed (arch on top) ---------- */
@media(min-width:1024px){
  .app{max-width:1180px;padding-top:118px;}
  .topbar{padding:16px 26px 10px;}
  .topbar .wm{font-size:24px;}
  .topbar .chip{max-width:none;}
  main{padding:8px 26px 48px;}
  main>.panel{max-width:1020px;margin-inline:auto;}
  .ptitle{font-size:26px;}
  /* arch flips to the top, mirrored curve */
  .arch{top:0;bottom:auto;width:min(1180px,100%);}
  .arch .curve{top:-46px;bottom:auto;border-radius:50%/0 0 100% 100%;box-shadow:0 8px 22px rgba(163,175,166,.45);}
  .archrow{top:0;bottom:auto;align-items:flex-start;padding:13px 8px 0;}
  .catbtn{margin-bottom:0;margin-top:16px;}
  body.catonly .archbtn{transform:translateY(-18px);}
  /* settings drawer hangs below the arch, wider */
  .drawer{width:min(760px,94%);top:110px;border-radius:28px;max-height:calc(100dvh - 132px);}
  /* leads: two-up card grid, stage labels span */
  #panel-leads{max-width:none;}
  #panel-leads.active{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start;}
  #panel-leads>*{grid-column:1/-1;}
  #panel-leads>.leadcard{grid-column:auto;margin-bottom:0;}
  #panel-leads.active.listmode{display:block;}
  /* contacts: two-up rows, everything else spans */
  #panel-contacts.active{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start;}
  #panel-contacts>*{grid-column:1/-1;}
  #panel-contacts>.urow{grid-column:auto;margin-bottom:0;}
  /* messages: readable column, bubbles breathe */
  .bubble{max-width:62%;}
  /* calendar: full width, taller days */
  #panel-calendar{max-width:none;}
  .calgrid.bleed{margin-left:-26px;margin-right:-26px;}
  .calday{min-height:104px;padding:6px;}
  .calpill{font-size:11.5px;}
  .dayev{max-width:880px;}
  /* dialer detail: centered action row */
  .cdacts{max-width:640px;margin-inline:auto;}
  .favrow{flex-wrap:wrap;overflow-x:visible;}
}

/* ---------- phase 18: avatars + user-row breathing room ---------- */
.urow .uinfo{flex:1 1 190px;min-width:190px;}
.uinfo .ue{word-break:normal;overflow-wrap:anywhere;}
.uava{overflow:hidden;}
.uava img{width:100%;height:100%;object-fit:cover;display:block;}
.chipava{width:20px;height:20px;border-radius:50%;object-fit:cover;vertical-align:-5px;margin-right:6px;}
@media(min-width:1024px){.supportstrip{top:118px;}}
.supportnotify{position:fixed;left:50%;transform:translateX(-50%);bottom:134px;z-index:60;background:var(--red);color:#fff;border:none;border-radius:999px;padding:13px 22px;font-family:"Bauhaus",sans-serif;font-size:14px;letter-spacing:.02em;box-shadow:var(--sh-out-lg);cursor:pointer;white-space:nowrap;}
@media(min-width:1024px){.supportnotify{bottom:26px;}}

/* ---------- phase 21: messages deck + dialer ---------- */
.deck{overflow:hidden;transition:height .3s ease;}
.decktrack{display:flex;align-items:flex-start;transition:transform .3s ease;}
.deckpage{flex:0 0 100%;min-width:0;}
.deckdots{display:flex;justify-content:center;gap:30px;padding:14px 0 2px;}
.deckdots button{background:none;border:none;font-family:"Bauhaus",sans-serif;font-size:12.5px;color:#000;opacity:.5;display:flex;flex-direction:column;align-items:center;gap:5px;cursor:pointer;padding:2px 4px;}
.deckdots .dot{width:9px;height:9px;border-radius:50%;background:#000;opacity:.35;}
.deckdots button.active{opacity:1;}
.deckdots button.active .dot{background:var(--red);opacity:1;}
.dialdisplay{background:var(--neu);border-radius:18px;box-shadow:var(--sh-in);padding:14px 10px;font-family:"Bauhaus",sans-serif;font-size:31px;letter-spacing:1px;text-align:center;min-height:64px;}
.dialwho{text-align:center;font-size:13.5px;font-weight:700;margin-top:7px;min-height:18px;}
.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;max-width:318px;margin:14px auto 4px;}
.key{aspect-ratio:1;border:none;border-radius:50%;background:var(--neu);box-shadow:var(--sh-out);font-family:"Bauhaus",sans-serif;font-size:26px;color:#000;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;}
.key span{font-size:9px;letter-spacing:2.5px;opacity:.55;}
.key:active{box-shadow:var(--sh-in);}
.key.back{width:52px;height:52px;font-size:19px;flex:none;}
.dialrow{display:flex;align-items:center;justify-content:space-between;max-width:318px;margin:12px auto 0;}
.callbtn{width:74px;height:74px;border-radius:50%;background:var(--red);box-shadow:var(--sh-out);display:flex;align-items:center;justify-content:center;flex:none;}
.callbtn:active{box-shadow:var(--sh-in);}
.dmatch{display:flex;gap:11px;align-items:center;width:100%;text-align:left;border:none;cursor:pointer;background:var(--neu);box-shadow:var(--sh-out);border-radius:18px;padding:10px 13px;margin-bottom:9px;font-family:inherit;color:#000;}

/* ---------- phase 22: dialer as an instrument (full-height, bottom-anchored) ---------- */
.dialpage{display:flex;flex-direction:column;}
.dialflex{flex:1 1 auto;min-height:10px;}
.dialdisplay{background:transparent;box-shadow:none;border-radius:0;font-size:38px;min-height:54px;padding:4px 6px;}
.keypad{width:100%;max-width:400px;}
.dialrow{width:100%;max-width:400px;}

/* ---------- phase 23: dialer takes the whole stage (arch steps aside) ---------- */
body.dialing .arch{display:none;}
body.dialing main{padding-bottom:18px;}
@media(min-width:1024px){body.dialing .app{padding-top:0;}}

/* ---------- phase 24: dialer halves, smaller instruments, no top bar while dialing ---------- */
body.dialing .topbar{display:none;}
.dialtop{flex:1 1 auto;min-height:0;overflow-y:auto;padding-bottom:6px;}
.dialpad{flex:none;}
.freqhead{font-family:"Bauhaus",sans-serif;font-size:12px;letter-spacing:.08em;text-transform:uppercase;opacity:.55;margin:14px 0 8px;}
.keypad{max-width:332px;gap:10px;}
.key{height:52px;aspect-ratio:auto;border-radius:999px;font-size:22px;}
.key span{font-size:8px;}
.key.back{width:40px;height:40px;font-size:14px;}
.callbtn{width:62px;height:62px;}
.dialdisplay{font-size:34px;min-height:48px;}

/* ---------- phase 25: text cockpit (deck page 2 pours from the dialer mold) ---------- */
body.cockpit .arch{display:none;}
body.cockpit .topbar{display:none;}
body.cockpit main{padding-bottom:18px;}
@media(min-width:1024px){body.cockpit .app{padding-top:0;}}
.textpage{display:flex;flex-direction:column;}
.texttop{flex:1 1 auto;min-height:0;overflow-y:auto;padding-bottom:6px;}
#deckPageMsg > #hqList{flex:1 1 auto;min-height:0;overflow-y:auto;}
#deckPageMsg > .convo{flex:1 1 auto;min-height:0;overflow-y:auto;}
.textpage.threading .texttop{display:none;}

/* ---------- phase 26: Monet skin (Settings > Skin) ---------- */
body.skin-monet{background:#c9d4c6 url('/images/skin-monet.webp') center/cover fixed no-repeat;--neu:rgba(249,249,245,.85);--sh-out:6px 6px 14px rgba(74,86,80,.30),-6px -6px 14px rgba(255,255,255,.55);--sh-out-lg:10px 10px 22px rgba(74,86,80,.28),-10px -10px 22px rgba(255,255,255,.5);--sh-in:inset 4px 4px 9px rgba(74,86,80,.25),inset -4px -4px 9px rgba(255,255,255,.65);--sh-ava:3px 3px 8px rgba(74,86,80,.3),-3px -3px 8px rgba(255,255,255,.55);}

/* ---------- phase 27: dialer locked to the stage (no page scroll) ---------- */
body.dialing{overflow:hidden;overscroll-behavior:none;}
body.dialing .app{height:100dvh;max-height:100dvh;}
body.dialing main{overflow:hidden;min-height:0;overscroll-behavior:none;}
body.dialing #panel-messages.active{display:flex;flex-direction:column;height:100%;min-height:0;}
body.dialing #msgDeck{flex:1 1 auto;min-height:0;transition:none;}
body.dialing #deckTrack{height:100%;min-height:0;align-items:stretch;}
body.dialing .dialpage{height:100%;min-height:0;overflow:hidden;}
body.dialing .dialtop{overscroll-behavior:contain;}
body.dialing .deckdots{flex:none;}

/* ---------- phase 27: cockpit pages lock to the screen (no page scroll) ---------- */
body.cockpit main{overflow-y:hidden;}
body.cockpit #panel-messages.active{display:flex;flex-direction:column;height:100%;}
body.cockpit #msgDeck{flex:1 1 auto;min-height:0;}
body.cockpit #deckTrack{height:100%;}
body.cockpit .deckpage{height:100%;min-height:0;}

/* ---------- phase 28: every deck page locked, email included ---------- */
body.cockpit{overflow:hidden;overscroll-behavior:none;}
body.cockpit .app{height:100dvh;max-height:100dvh;}
body.cockpit main{min-height:0;overscroll-behavior:none;}
body.cockpit #panel-messages.active{min-height:0;}
body.cockpit #deckTrack{min-height:0;align-items:stretch;}
body.cockpit .deckpage[data-page="2"]{overflow-y:auto;overscroll-behavior:contain;}
body.cockpit .deckdots{flex:none;}

/* ---------- phase 29: Christmas, Halloween, Comic skins ---------- */
body.skin-christmas{background:#dcebf7 url('/images/skin-christmas.webp') center/cover fixed no-repeat;--neu:rgba(248,251,255,.88);--sh-out:6px 6px 14px rgba(96,128,168,.32),-6px -6px 14px rgba(255,255,255,.6);--sh-out-lg:10px 10px 22px rgba(96,128,168,.3),-10px -10px 22px rgba(255,255,255,.55);--sh-in:inset 4px 4px 9px rgba(96,128,168,.28),inset -4px -4px 9px rgba(255,255,255,.7);--sh-ava:3px 3px 8px rgba(96,128,168,.32),-3px -3px 8px rgba(255,255,255,.6);}
body.skin-comic{background:#f6c945 url('/images/skin-comic.webp') center/cover fixed no-repeat;--neu:rgba(255,250,231,.93);--sh-out:6px 6px 14px rgba(150,110,16,.4),-6px -6px 14px rgba(255,255,255,.65);--sh-out-lg:10px 10px 22px rgba(150,110,16,.38),-10px -10px 22px rgba(255,255,255,.6);--sh-in:inset 4px 4px 9px rgba(150,110,16,.35),inset -4px -4px 9px rgba(255,255,255,.75);--sh-ava:3px 3px 8px rgba(150,110,16,.4),-3px -3px 8px rgba(255,255,255,.65);}
body.skin-halloween{background:#150e2c url('/images/skin-halloween.webp') center/cover fixed no-repeat;color:#f6ead8;--neu:rgba(42,30,74,.87);--sh-out:6px 6px 14px rgba(0,0,0,.55),-6px -6px 14px rgba(140,110,220,.25);--sh-out-lg:10px 10px 22px rgba(0,0,0,.5),-10px -10px 22px rgba(140,110,220,.22);--sh-in:inset 4px 4px 9px rgba(0,0,0,.5),inset -4px -4px 9px rgba(140,110,220,.28);--sh-ava:3px 3px 8px rgba(0,0,0,.55),-3px -3px 8px rgba(140,110,220,.25);}
body.skin-halloween .field,body.skin-halloween .chip,body.skin-halloween .iconbtn,body.skin-halloween .abtn,body.skin-halloween .dlink,body.skin-halloween .archbtn,body.skin-halloween .sbtn,body.skin-halloween .codeinp,body.skin-halloween .fav,body.skin-halloween .ftab,body.skin-halloween .tchip,body.skin-halloween .threadrow,body.skin-halloween .calday,body.skin-halloween .calpill,body.skin-halloween button.crow,body.skin-halloween .cdact,body.skin-halloween .deckdots button,body.skin-halloween .key,body.skin-halloween .dmatch{color:#f6ead8;}
body.skin-halloween .field::placeholder{color:#f6ead8;opacity:.45;}
body.skin-halloween a{color:#ffb066;}
body.skin-halloween .chip.solid,body.skin-halloween .sbtn.red{color:#fff;}
body.skin-halloween .arch .curve{background:rgba(54,40,96,.95);}

/* ---------- phase 30: deck drag - snappy, tilts as it moves ---------- */
.deck{perspective:1100px;}
.decktrack{transition:transform .18s cubic-bezier(.25,.8,.25,1);will-change:transform;}
.decktrack.drag{transition:none;}
.deckpage{touch-action:pan-y;}

/* ---------- phase 31: centered call button, email samples ---------- */
.dialrow{position:relative;min-height:62px;}
.dialrow .callbtn{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);}
.dialgrp{display:flex;gap:10px;align-items:center;}
.esample{cursor:default;}

/* ---------- phase 32: deck strip furniture - plus left, cat right ---------- */
.deckdots{justify-content:space-between;padding-left:14px;padding-right:14px;}
.dotgrp{display:flex;gap:34px;}
.deckside{width:40px;height:40px;border-radius:50%;background:var(--neu);box-shadow:var(--sh-out);border:none;display:flex;align-items:center;justify-content:center;font-size:21px;font-weight:700;color:#000;cursor:pointer;flex:none;padding:0;}
#deckAddMenu{flex:none;padding:10px 14px 2px;}
.addmenu{background:var(--neu);box-shadow:var(--sh-out);border-radius:20px;padding:14px;}
.addmenu-head{font-family:"Bauhaus",sans-serif;font-size:13.5px;margin-bottom:8px;}
.addopt{flex-direction:column;align-items:flex-start;gap:2px;}
.addopt span{font-size:12px;opacity:.65;}
body.skin-halloween .deckside{color:#f6ead8;}

/* ---------- phase 33: Deck bar is a horizontal row, pinned by ID ---------- */
#deckDots{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;}
#deckDots .dotgrp{display:flex;flex-direction:row;align-items:flex-start;gap:34px;}
#deckDots .deckside{flex-direction:row;flex:none;}

/* ---------- phase 34: swipe fix, build stamp, squished Deck bar, comments page ---------- */
#panel-messages, #panel-messages *{touch-action:pan-y;}
body.cockpit .deckpage[data-page="3"]{overflow-y:auto;overscroll-behavior:contain;}
.wmbox{display:flex;flex-direction:column;line-height:1.05;}
.buildstamp{font-size:9px;font-weight:600;letter-spacing:.05em;opacity:.55;}
#deckDots .dotgrp{gap:20px;}
#deckDots button{font-size:11.5px;}

/* ---------- phase 35: Deck bar always fits one row, cat included ---------- */
#deckDots{padding-left:10px;padding-right:10px;}
#deckDots .dotgrp{gap:12px;min-width:0;}
#deckDots button{font-size:11px;white-space:nowrap;padding-left:2px;padding-right:2px;}

/* ---------- phase 36: deck clamp fix is in the blade; here: black cat, darker tools, badges ---------- */
#deckDots .deckside{opacity:1;}
#deckDots .dotgrp button{opacity:.8;color:#1c1c1c;position:relative;}
#deckDots .dotgrp button .dot{opacity:.55;}
#deckDots .dotgrp button.active{opacity:1;}
.dbadge{position:absolute;top:-6px;right:0;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:#000;color:#fff;font-family:"Public Sans",sans-serif;font-size:10px;font-weight:700;line-height:17px;text-align:center;}

/* ---------- phase 37: dialer pad lifted + tighter dial row; hold-to-remove jiggle ---------- */
.dialpad{margin-bottom:20px;}
.dialrow{max-width:252px;}
.dialrow .key{width:60px;height:60px;flex:none;}
.dialrow .key svg{width:25px;height:25px;}
@keyframes katjig{0%{transform:rotate(-1.5deg)}50%{transform:rotate(1.5deg)}100%{transform:rotate(-1.5deg)}}
body.deckedit #deckDots .dotgrp button{animation:katjig .26s ease-in-out infinite;}
body.deckedit #deckDots .dotgrp button:nth-child(2){animation-delay:.06s;}
body.deckedit #deckDots .dotgrp button:nth-child(3){animation-delay:.12s;}
body.deckedit #deckDots .dotgrp button:nth-child(4){animation-delay:.18s;}
.dex{display:none;position:absolute;top:-9px;left:-5px;width:19px;height:19px;border-radius:50%;background:#000;color:#fff;font-family:"Public Sans",sans-serif;font-size:13px;font-weight:700;line-height:1;align-items:center;justify-content:center;z-index:3;}
body.deckedit .dex{display:flex;}

/* ---------- phase 38: sign-in watchdog banner ---------- */
#watchdogBar{display:flex;}
#watchdogBar[hidden]{display:none;}

/* ---------- phase 40: email cockpit tabs ---------- */
.mailtabs{display:flex;gap:8px;overflow-x:auto;padding:4px 2px 10px;scrollbar-width:none;}
.mailtabs::-webkit-scrollbar{display:none;}
.mailtab{flex:none;border:none;border-radius:999px;padding:8px 14px;font-family:inherit;font-size:13px;font-weight:600;background:#e8eae6;color:#000;box-shadow:2px 2px 5px rgba(0,0,0,.16),-2px -2px 5px rgba(255,255,255,.65);cursor:pointer;}
.mailtab.on{background:#c40026;color:#fff;}

/* ---------- phase 41: dialer fit contract (protected surface) ----------
   The dialer must fit ANY phone height with the Deck bar on screen:
   the page is a flex column, the top half absorbs the squeeze, and the
   keys scale with the viewport instead of pushing anything out. */
body.cockpit .deckpage.dialpage{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden;}
body.cockpit #deckDots{flex:none;}
body.cockpit .app{overflow:hidden;}
.keypad .key{height:clamp(38px,6.4dvh,52px);}
.dialrow{flex:none;}

/* ---------- phase 44: email as tickets ---------- */
.mailn{font-weight:800;opacity:.7;}
.tchip.mailpersonal{background:#111;color:#fff;box-shadow:none;}
.mailticket .ticketline{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px;}
.ticketlab{font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;opacity:.6;flex:none;width:76px;}
.statusseg{display:flex;gap:6px;flex-wrap:wrap;}
.statusseg button{border:none;cursor:pointer;border-radius:999px;padding:7px 13px;font-family:inherit;font-size:12.5px;font-weight:700;background:var(--neu);box-shadow:var(--sh-out);color:#000;}
.statusseg button.on{background:#c40026;color:#fff;}
body.skin-halloween .statusseg button{color:#f6ead8;}
body.skin-halloween .statusseg button.on{color:#fff;}
body.skin-halloween .tchip.mailpersonal{background:#000;color:#f6ead8;}

/* ---------- phase 43: mail row swipes ---------- */
.mailrow{position:relative;overflow:hidden;border-radius:14px;}
.mailzone{position:absolute;top:0;bottom:0;display:flex;align-items:center;padding:0 18px;font-size:13px;font-weight:700;color:#fff;z-index:0;opacity:0;transition:opacity .12s ease;}
/* Phase 45: the zones stay hidden until a swipe is actually moving.
   On the translucent skins (Monet, Christmas, Comic, Halloween) the
   solid red/dark zones ghosted through the frosted row front at rest,
   painting every row two colors. */
.mailrow.swiping .mailzone{opacity:1;}
.mailzone.del{left:0;background:#c40026;}
.mailzone.arc{right:0;background:#2e2e2e;}
.mailfront{position:relative;z-index:1;}
.mailrow.armed-del .mailzone.del{filter:brightness(1.2);}
.mailrow.armed-arc .mailzone.arc{filter:brightness(1.5);}

/* ---------- phase 45: compact mail rows ---------- */
.mailfront{padding:10px 12px;gap:10px;margin-bottom:9px;border-radius:16px;}
.mailfront .uava{width:36px;height:36px;font-size:14px;}
.mailfront .uinfo{min-width:0;}
.mailfront .un{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;}
.mailfront .mailsubj{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}

/* ---------- phase 46: clean inbox, deck you can arrange ---------- */
/* Bigger deck tools - the labels were too tiny to read at a glance.
   The bar keeps its shape: + left, tools center, cat right, one row. */
#deckDots button{font-size:13px;padding-top:7px;padding-bottom:7px;}
#deckDots .dotgrp{gap:14px;}
#deckDots .dotgrp button .dot{width:8px;height:8px;}
.decksetrow{display:flex;align-items:center;gap:8px;padding:10px 12px;margin-bottom:9px;border-radius:16px;background:var(--neu);box-shadow:var(--sh-out);}
.decksetrow .sbtn{padding:6px 11px;}
/* Snippet line under the subject; subject gives up its second line. */
.mailfront .mailsubj.clamp1{-webkit-line-clamp:1;}
.mailfront .mailsnip{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;font-size:12.5px;opacity:.55;}
/* High priority reads as red ink, never a red fill (Red Rule). */
.tchip.mailhigh{background:transparent;box-shadow:inset 0 0 0 1.5px #c40026;color:#c40026;}
/* Phase 47 — mail views: the Draft chip (an outline, like High, never a fill) + attachment chips in the reader */
.tchip.maildraft{background:transparent;box-shadow:inset 0 0 0 1.5px rgba(0,0,0,.5);}
.atchip{display:inline-flex;align-items:center;gap:6px;margin:0 8px 8px 0;padding:8px 12px;border-radius:999px;background:var(--neu);box-shadow:var(--sh-out);color:#000;text-decoration:none;font-size:12.5px;font-weight:600;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

/* Phase 48 — dialer tabs: Favorites / Recent / Contacts strip under search (deck-bar mold).
   The strip + search stay put; only the list scrolls. Keypad contract (Phase 41) untouched.
   Height-chain repair (48b): the deck track never had a height, so a deck page's
   height:100% resolved to its CONTENT height — the dialer only ever fit by luck
   (a 5-row list). Any taller list pushed the page past the deck and off screen.
   height:100% on the track hands the deck's definite height down to every page,
   which is what the cockpit page rules already assumed. */
.decktrack{height:100%;}
.dialtop{display:flex;flex-direction:column;overflow:hidden;}
#dialMatches{flex:none;}
#dialMatches:empty{display:none;}
#dialTabs{flex:none;display:flex;gap:4px;background:var(--neu);box-shadow:var(--sh-out);border-radius:999px;padding:5px;margin:2px 0 10px;}
.dtab{flex:1;display:flex;flex-direction:column;align-items:center;gap:1px;padding:6px 2px 8px;border:none;background:transparent;border-radius:999px;cursor:pointer;font-family:"Bauhaus",sans-serif;font-size:12px;letter-spacing:.05em;color:#000;position:relative;}
.dtab svg{width:17px;height:17px;flex:none;}
.dtab.on::after{content:'';position:absolute;left:50%;transform:translateX(-50%);bottom:3px;width:26px;height:3px;border-radius:2px;background:var(--red);}
#dialLists{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;}
.dlist[hidden]{display:none;}
.deckpage.dialpage.dsearching #dialTabs,.deckpage.dialpage.dsearching #dialLists{display:none;}

/* ---------- phase 50: contacts panel — universal search, category pills, floating add ----------
   The search takes the deck mold: wide field with the cat at its end.
   Pills scroll sideways like the mail tabs; the gear lives at the end of
   the strip and opens the per-user category chooser. The + floats at the
   bottom right, above the Arch, and hides with its panel. */
.csearchrow{display:flex;gap:8px;align-items:center;margin-bottom:12px;}
.csearchrow .field{flex:1 1 auto;min-width:0;margin:0;}
.csearchrow .key.back{flex:none;}
.cpills{display:flex;gap:8px;overflow-x:auto;padding:4px 2px 10px;scrollbar-width:none;align-items:center;}
.cpills::-webkit-scrollbar{display:none;}
.cpills .ftab{flex:none;}
.cpills .cpgear{margin-left:auto;padding:9px 12px;display:flex;align-items:center;}
.cpillrow{display:flex;align-items:center;gap:10px;padding:9px 2px;font-size:14.5px;font-weight:600;cursor:pointer;}
.cpillrow input{width:19px;height:19px;accent-color:var(--red);flex:none;}
#cAddCard .field{margin-bottom:10px;}
#cAddBtn{position:fixed;right:16px;bottom:132px;z-index:35;width:56px;height:56px;border-radius:50%;border:none;background:var(--red);color:#fff;font-size:30px;line-height:1;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.28);display:flex;align-items:center;justify-content:center;}
#cAddBtn:active{box-shadow:var(--sh-in);}

/* ==== phase 51: clickable home stats + news ==== */
button.stat{font:inherit;color:inherit;cursor:pointer;border:0;appearance:none;-webkit-appearance:none;}
.statlink:active{transform:scale(.98);}
.stat .lsub{font-size:11px;opacity:.6;margin-top:2px;letter-spacing:.02em;}
.newsrow{display:block;padding:10px 2px;border-top:1px solid rgba(0,0,0,.07);text-decoration:none;color:inherit;}
a.newsrow:first-of-type{border-top:0;padding-top:2px;}
.newstitle{display:block;font-weight:600;line-height:1.35;}
.newsmeta{display:block;font-size:12px;opacity:.6;margin-top:2px;}
