*{box-sizing:border-box}:root{--bg:#1B1C1D;--panel:#232426;--panel2:#292a2c;--silver:#e8e8e5;--muted:#a8a8a2;--line:#3b3c3f;--incoming:#303134;--outgoing:#705745;--danger:#b65b5b}html{background:var(--bg)}body{margin:0;background:var(--bg);color:var(--silver);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;min-height:100vh}.shell{max-width:760px;margin:0 auto;min-height:100vh;display:flex;flex-direction:column;position:relative;overflow:hidden}.brand{padding:18px 18px 8px;text-align:center;letter-spacing:.28em;font-weight:600}.tagline{font-family:Georgia,serif;font-style:italic;text-align:center;color:var(--muted);font-size:13px;margin-bottom:10px}.tabs{display:flex;gap:8px;padding:10px 12px;overflow-x:auto;scrollbar-width:none;border-bottom:1px solid var(--line);background:rgba(27,28,29,.96);position:sticky;top:0;z-index:5}.tabs::-webkit-scrollbar{display:none}.tab{border:1px solid var(--line);background:var(--panel);color:var(--silver);padding:9px 14px;border-radius:999px;text-decoration:none;white-space:nowrap;font-size:14px}.tab.active{background:var(--silver);color:#202123;border-color:var(--silver)}.conversation{flex:1;padding:22px 14px 126px;position:relative;min-height:55vh}.ghost{position:fixed;z-index:0;right:-18px;top:145px;width:min(78vw,520px);height:min(78vw,520px);opacity:.055;pointer-events:none}.ghost svg{width:100%;height:100%;fill:none;stroke:#fff;stroke-width:8}.messages{position:relative;z-index:1;display:flex;flex-direction:column;gap:8px}.bubble{max-width:82%;padding:10px 13px;border-radius:19px;line-height:1.35;box-shadow:0 1px 0 rgba(255,255,255,.03);word-wrap:break-word;white-space:pre-wrap}.bubble.mine{align-self:flex-end;background:var(--outgoing);border-bottom-right-radius:6px}.bubble.theirs{align-self:flex-start;background:var(--incoming);border-bottom-left-radius:6px}.meta{font-size:10px;color:#c7c7c1;opacity:.7;margin-top:5px}.media-button{margin-top:4px;border:1px solid rgba(255,255,255,.18);background:transparent;color:#fff;padding:9px 11px;border-radius:12px;max-width:100%;text-align:left}.media-preview{display:block;max-width:min(100%,440px);max-height:460px;border-radius:12px;margin-top:7px}.composer{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(760px,100%);padding:10px 10px calc(10px + env(safe-area-inset-bottom));background:rgba(27,28,29,.97);border-top:1px solid var(--line);z-index:10}.compose-row{display:flex;align-items:flex-end;gap:8px}.plus,.mic,.send{width:38px;height:38px;flex:0 0 38px;border-radius:50%;border:0;font-size:24px;background:transparent;color:var(--silver)}.send{background:var(--silver);color:#222;font-size:18px}.msgbox{flex:1;min-height:40px;max-height:120px;resize:none;border-radius:20px;border:1px solid var(--line);background:var(--panel);color:#fff;padding:10px 14px;font:inherit;outline:none}.attach-menu{display:none;gap:8px;padding:7px 45px 3px}.attach-menu.open{display:flex;flex-wrap:wrap}.attach-menu label{background:var(--panel);border:1px solid var(--line);padding:8px 11px;border-radius:12px;font-size:13px;cursor:pointer}.attach-menu input{display:none}.empty{text-align:center;color:var(--muted);padding:100px 20px 0}.admin-wrap{max-width:900px;margin:30px auto;padding:0 18px}.admin-wrap.narrow{max-width:620px}.card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:18px;margin:14px 0}.field{display:flex;flex-direction:column;gap:5px;margin:10px 0}.field input,.field select,.field textarea,.inline-form input{background:#171819;color:#fff;border:1px solid var(--line);padding:11px;border-radius:10px;font:inherit}.field textarea{width:100%;word-break:break-all}.btn{border:0;border-radius:10px;padding:10px 14px;background:var(--silver);color:#171819;font-weight:600;text-decoration:none;display:inline-block;cursor:pointer}.btn.secondary{background:#3a3b3e;color:#fff;border:1px solid var(--line)}.smallbtn{padding:8px 10px}.small{font-size:12px;color:var(--muted)}.error{color:#f0aaaa}.hidden{display:none!important}.text-link{color:var(--silver);display:inline-block;margin-top:14px}.topline,.client-card{display:flex;align-items:center;justify-content:space-between;gap:15px}.linkbtn{border:0;background:none;color:var(--muted);text-decoration:underline;cursor:pointer}.status{font-size:12px;color:var(--muted)}.admin-tools{padding:0 12px;border-bottom:1px solid var(--line)}.admin-tools details{padding:8px 0}.admin-tools summary{cursor:pointer;color:var(--muted)}.inline-form{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.danger-btn{border:1px solid var(--danger);color:#ffdada;background:transparent;border-radius:10px;padding:9px 12px}.recording,.composer-status{font-size:12px;color:var(--muted);padding:5px 47px 0}.recording button{margin-left:8px}.key-error{border:1px solid #7d5d5d;background:#332929;padding:16px;border-radius:12px;color:#f2dede}.security-note{font-size:11px;color:var(--muted);margin-top:8px}@media(min-width:700px){.conversation{padding-left:30px;padding-right:30px}.bubble{max-width:68%}}

/* ---------- v0.4 visual-contract demo ---------- */
.demo-app{width:min(100%,430px);min-height:100vh;margin:0 auto;background:#0f1417;color:#f3f1ec;position:relative;overflow:hidden;box-shadow:0 0 70px rgba(0,0,0,.45)}
.demo-app button,.demo-app input{font:inherit}.demo-home,.demo-chat-screen{min-height:100vh;padding-bottom:76px;background:linear-gradient(180deg,#10171a 0%,#091013 100%)}
.demo-brandbar{height:78px;display:flex;align-items:center;gap:11px;padding:14px 18px;border-bottom:1px solid rgba(255,255,255,.08)}
.demo-feather{font:36px Georgia,serif;color:#d7d8d4;transform:rotate(-22deg)}.demo-wordmark{font:24px Georgia,serif;letter-spacing:.03em}.demo-brandline{font-size:8px;letter-spacing:.2em;color:#8f9697;margin-top:3px}
.demo-icon-btn{margin-left:auto;border:0;background:transparent;color:#ddd;font-size:20px}.demo-motto{text-align:center;padding:11px 12px 5px;color:#d7d4cd;font:12px Georgia,serif}.demo-motto em{display:block;color:#777f80;font-size:10px;margin-top:2px}
.demo-search{margin:10px 18px 12px;padding:13px 14px;border-radius:13px;background:#20292e;color:#aeb5b7;font-size:14px}
.demo-client-card{width:calc(100% - 36px);margin:0 18px 8px;display:flex;align-items:center;gap:13px;padding:8px 0 12px;border:0;border-bottom:1px solid rgba(255,255,255,.09);background:transparent;color:#fff;text-align:left}.demo-client-card img{width:63px;height:63px;border-radius:50%;object-fit:cover}.demo-client-copy{display:flex;flex-direction:column;gap:4px}.demo-client-copy strong{font:21px Georgia,serif}.demo-client-copy small{color:#8e9697}.demo-chevron{margin-left:auto;font-size:32px;font-weight:200;color:#ddd}
.demo-subjects{display:flex;gap:10px;padding:12px 18px 13px;overflow-x:auto}.demo-subject{min-width:72px;border:0;background:transparent;color:#f1efea;display:flex;flex-direction:column;align-items:center;gap:6px;font-size:12px}.demo-subject img,.demo-all-avatar{width:58px;height:58px;border-radius:50%;object-fit:cover;border:1px solid #41494d}.demo-all-avatar{display:grid;place-items:center;background:#29343a;font-size:26px}.demo-subject.active img,.demo-subject.active .demo-all-avatar{outline:2px solid #e6e4df;outline-offset:2px}
.demo-thread-list{margin:0 18px;border-top:1px solid rgba(255,255,255,.08)}.demo-thread-row{width:100%;display:grid;grid-template-columns:52px 1fr auto;gap:12px;align-items:center;padding:12px 0;border:0;border-bottom:1px solid rgba(255,255,255,.08);background:transparent;color:#fff;text-align:left}.demo-thread-row img{width:50px;height:50px;border-radius:50%;object-fit:cover}.demo-thread-row span{display:flex;flex-direction:column;gap:4px}.demo-thread-row strong{font-size:16px}.demo-thread-row small{color:#b1b6b7;font-size:13px}.demo-thread-row time{font-size:11px;color:#b5b9b9;align-self:start;margin-top:4px}
.demo-bottom-nav{position:absolute;bottom:0;left:0;right:0;height:67px;display:flex;background:#0d1316;border-top:1px solid rgba(255,255,255,.09);z-index:3}.demo-bottom-nav button{flex:1;border:0;background:transparent;color:#8c9496;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:10px}.demo-bottom-nav button b{font-size:19px;font-weight:400}.demo-bottom-nav button.active{color:#fff}
.demo-chat-header{height:76px;display:grid;grid-template-columns:32px 48px 1fr auto;gap:8px;align-items:center;padding:13px 14px;border-bottom:1px solid rgba(255,255,255,.08)}.demo-back{border:0;background:transparent;color:#fff;font-size:34px;padding:0}.demo-chat-header img{width:45px;height:45px;border-radius:50%;object-fit:cover}.demo-chat-header div{display:flex;flex-direction:column}.demo-chat-header strong{font-size:17px}.demo-chat-header small{font-size:11px;color:#aab0b1;margin-top:2px}.demo-chat-actions{font-size:18px;color:#d5d7d5}
.demo-chat-tabs{display:flex;gap:6px;padding:10px 12px;border-bottom:1px solid rgba(255,255,255,.07);overflow-x:auto}.demo-chat-tabs button{flex:1;min-width:70px;border:1px solid #394247;border-radius:18px;padding:8px;background:transparent;color:#eee}.demo-chat-tabs button.active{background:#d9dbd7;color:#13181a;border-color:#d9dbd7}
.demo-messages{height:calc(100vh - 207px);overflow-y:auto;padding:14px 13px 98px;display:flex;flex-direction:column;gap:9px}.demo-bubble{max-width:80%;padding:10px 12px;border-radius:15px;font-size:14px;line-height:1.4}.demo-bubble.them{align-self:flex-start;background:#2a343a;border-bottom-left-radius:4px}.demo-bubble.me{align-self:flex-end;background:#37434a;border-bottom-right-radius:4px}.demo-bubble time{display:block;text-align:right;color:#b3b8b8;font-size:9px;margin-top:4px}.demo-media-card{align-self:flex-end;width:84%;overflow:hidden;border-radius:16px;background:#2a343a}.demo-media-card img{display:block;width:100%;max-height:270px;object-fit:cover}.demo-media-card p{margin:0;padding:10px 12px;font-size:13px;line-height:1.4}.demo-voice{align-self:flex-end;width:78%;display:flex;align-items:center;gap:10px;padding:11px 13px;border-radius:15px;background:#263137;font-size:12px}.demo-wave{flex:1;letter-spacing:1px;color:#bbc2c3}
.demo-attach-panel{position:absolute;left:12px;right:12px;bottom:70px;display:grid;grid-template-columns:repeat(3,1fr);gap:15px;padding:18px;border-radius:22px;background:#11191d;border:1px solid #30393d;box-shadow:0 18px 40px rgba(0,0,0,.5);z-index:8}.demo-attach-panel button{border:0;background:transparent;color:#fff;display:flex;flex-direction:column;align-items:center;gap:7px;font-size:24px}.demo-attach-panel button span{font-size:11px;color:#d7d9d7}
.demo-compose{position:absolute;left:0;right:0;bottom:0;height:68px;padding:9px 10px calc(9px + env(safe-area-inset-bottom));display:flex;align-items:center;gap:7px;background:#0c1215;border-top:1px solid rgba(255,255,255,.09);z-index:7}.demo-compose button{width:40px;height:40px;border-radius:50%;border:0;background:#222d32;color:#fff;font-size:21px}.demo-compose input{min-width:0;flex:1;height:40px;border-radius:20px;border:1px solid #333e43;background:#192226;color:#fff;padding:0 13px;outline:none}.demo-compose .demo-send{background:#d6d7d2;color:#11171a}.demo-test-badge{position:fixed;top:5px;left:50%;transform:translateX(-50%);z-index:99;padding:3px 7px;border-radius:8px;background:rgba(0,0,0,.54);color:#8e9697;font-size:7px;letter-spacing:.16em;pointer-events:none}.hidden{display:none!important}
@media(min-width:700px){body{background:#090d0f}.demo-app{min-height:900px;margin-top:18px;border-radius:34px;border:1px solid #3c4549}.demo-home,.demo-chat-screen{min-height:900px}.demo-messages{height:690px}.demo-test-badge{position:absolute}}


/* v0.5 cross-device viewport: demo and real encrypted conversation */
.demo-app{height:100vh;height:100dvh;min-height:0}
.demo-chat-screen{height:100%;min-height:0;padding-bottom:0;display:flex;flex-direction:column;overflow:hidden}
.demo-chat-header,.demo-chat-tabs,.demo-compose{flex-shrink:0}
.demo-messages{flex:1 1 auto;height:auto;min-height:0;overflow-y:auto;padding-bottom:14px}
.demo-compose{position:relative;left:auto;right:auto;bottom:auto;height:auto;min-height:68px;padding-bottom:max(9px,env(safe-area-inset-bottom))}

.shell[data-conversation]{height:100vh;height:100dvh;min-height:0;max-width:760px;overflow:hidden;background:linear-gradient(180deg,#10171a 0%,#091013 100%)}
.shell[data-conversation]>header,.shell[data-conversation]>.tabs,.shell[data-conversation]>.admin-tools,.shell[data-conversation]>.composer{flex:0 0 auto}
.shell[data-conversation]>.conversation{flex:1 1 auto;min-height:0;overflow-y:auto;padding:18px 14px}
.shell[data-conversation]>.composer{position:relative;left:auto;right:auto;bottom:auto;transform:none;width:100%;padding:9px 10px max(9px,env(safe-area-inset-bottom));background:#0c1215}
.shell[data-conversation] .tabs{position:relative;top:auto}
.shell[data-conversation] .bubble{font-size:14px}
.shell[data-conversation] .bubble.mine{background:#37434a}
.shell[data-conversation] .bubble.theirs{background:#2a343a}
.shell[data-conversation] .msgbox{background:#192226;border-color:#333e43}
@media(min-width:700px){.demo-app{height:calc(100dvh - 36px);min-height:0;max-height:900px}.demo-chat-screen{min-height:0}.demo-messages{height:auto}.shell[data-conversation]{height:calc(100dvh - 36px);margin-top:18px;border-radius:28px;border:1px solid #3c4549}.shell[data-conversation]>.conversation{padding-left:30px;padding-right:30px}}


/* v06 client-owned profile imagery */
.identity-strip{display:flex;align-items:center;gap:11px;padding:10px 14px 11px;border-bottom:1px solid var(--line);background:rgba(27,28,29,.98)}
.identity-copy{min-width:0;display:flex;flex:1;flex-direction:column}.identity-copy strong{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.identity-copy small{font-size:11px;color:var(--muted);margin-top:2px}
.profile-avatar,.tab-profile-avatar{position:relative;display:grid;place-items:center;overflow:hidden;flex:none;border:1px solid #515257;background:#252629;color:var(--silver);font-weight:600;text-transform:uppercase}.profile-avatar{width:48px;height:48px;border-radius:50%;font-size:18px}.profile-avatar-client{width:52px;height:52px}.tab-profile-avatar{width:25px;height:25px;border-radius:50%;font-size:10px;margin-right:6px}.profile-avatar img,.tab-profile-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.profile-avatar.has-photo>span,.tab-profile-avatar.has-photo>span{visibility:hidden}
.tab{display:inline-flex;align-items:center}.profile-editor{position:relative}.profile-editor>summary{list-style:none;cursor:pointer;border:1px solid var(--line);border-radius:999px;padding:7px 11px;color:var(--silver);font-size:12px}.profile-editor>summary::-webkit-details-marker{display:none}.profile-editor-panel{position:absolute;z-index:20;right:0;top:40px;width:min(88vw,430px);padding:10px;border:1px solid var(--line);border-radius:16px;background:#171819;box-shadow:0 16px 42px rgba(0,0,0,.5)}.profile-edit-row{display:grid;grid-template-columns:44px minmax(80px,1fr) auto auto;align-items:center;gap:8px;padding:8px 4px;border-bottom:1px solid #303135}.profile-edit-row:last-of-type{border-bottom:0}.profile-edit-row .profile-avatar{width:40px;height:40px;font-size:14px}.profile-edit-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.profile-photo-btn,.profile-remove{border:1px solid var(--line);border-radius:999px;background:#292a2c;color:var(--silver);padding:7px 9px;font:inherit;font-size:11px;cursor:pointer}.profile-photo-btn input{display:none}.profile-remove{background:transparent;color:var(--muted)}.profile-status{min-height:17px;padding:7px 4px 1px;color:var(--muted);font-size:11px}
@media(max-width:520px){.identity-copy small{display:none}.profile-editor-panel{position:fixed;left:12px;right:12px;top:96px;width:auto;max-height:65dvh;overflow:auto}.profile-edit-row{grid-template-columns:40px 1fr auto}.profile-remove{grid-column:3}.profile-photo-btn{grid-column:3;grid-row:1}.profile-edit-name{grid-column:2}.profile-edit-row .profile-remove:not([hidden]){grid-row:2;margin-top:-7px}}


/* v061 avatar-is-the-control */
.profile-avatar-editable,.tab-profile-avatar.profile-avatar-editable{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.profile-avatar-editable::after,.tab-profile-avatar.profile-avatar-editable::after{content:"";position:absolute;right:1px;bottom:1px;width:9px;height:9px;border-radius:50%;background:#c8c9cc;border:2px solid #252629;box-sizing:border-box;z-index:2}
.profile-avatar-editable:focus-visible,.tab-profile-avatar.profile-avatar-editable:focus-visible{outline:2px solid #c8c9cc;outline-offset:2px}


/* v062 avatar navigation + crop */
.profile-avatar-editable::after,.tab-profile-avatar.profile-avatar-editable::after{display:none!important}
.profile-avatar-navigate{cursor:pointer;touch-action:manipulation}
.avatar-edit-badge{position:absolute;right:1px;bottom:1px;z-index:5;width:18px;height:18px;border-radius:50%;border:1px solid #777;background:#252629;color:#e2e2e2;display:grid;place-items:center;padding:0;font:700 11px/1 system-ui;cursor:pointer;box-shadow:0 1px 4px rgba(0,0,0,.45)}
.tab-profile-avatar .avatar-edit-badge{width:13px;height:13px;right:-1px;bottom:-1px;font-size:8px}
.avatar-edit-badge span{transform:translateY(-.5px)}
.avatar-crop-modal{position:fixed;inset:0;z-index:1000;background:rgba(0,0,0,.86);display:grid;place-items:center;padding:18px}
.avatar-crop-card{width:min(92vw,430px);background:#1b1c1d;border:1px solid #414246;border-radius:20px;padding:16px;box-shadow:0 20px 70px rgba(0,0,0,.65);color:#ddd}
.avatar-crop-title{text-align:center;font-size:16px;font-weight:600;margin:1px 0 12px}
.avatar-crop-stage{position:relative;width:min(78vw,360px);aspect-ratio:1;margin:auto;overflow:hidden;background:#0d0e0f;touch-action:none;user-select:none;-webkit-user-select:none}
.avatar-crop-stage canvas{display:block;width:100%;height:100%}
.avatar-crop-ring{position:absolute;inset:0;border-radius:50%;box-shadow:0 0 0 100vmax rgba(0,0,0,.42);border:2px solid rgba(230,230,230,.8);pointer-events:none}
.avatar-crop-hint{text-align:center;color:#aaa;font-size:12px;margin:11px 0}
.avatar-crop-actions{display:flex;gap:10px;justify-content:flex-end}.avatar-crop-actions button{border:1px solid #505156;border-radius:999px;background:#292a2c;color:#ddd;padding:9px 16px;font:inherit}.avatar-crop-actions [data-crop-save]{background:#e5e5e5;color:#171819;border-color:#e5e5e5}


/* v0621 mobile crop containment */
.avatar-crop-modal{
  box-sizing:border-box;
  width:100%;
  max-width:100vw;
  min-height:100dvh;
  padding:
    max(12px, env(safe-area-inset-top))
    12px
    max(12px, env(safe-area-inset-bottom));
  overflow:auto;
  overscroll-behavior:contain;
}
.avatar-crop-card{
  box-sizing:border-box;
  width:min(100%,430px);
  max-width:100%;
  max-height:calc(100dvh - 24px);
  overflow:auto;
  margin:auto;
}
.avatar-crop-stage{
  box-sizing:border-box;
  width:min(100%,320px);
  max-width:100%;
  height:auto;
  aspect-ratio:1 / 1;
}
.avatar-crop-actions{
  position:sticky;
  bottom:0;
  padding-top:8px;
  padding-bottom:max(2px, env(safe-area-inset-bottom));
  background:#1b1c1d;
}
@media (max-width:520px){
  .avatar-crop-modal{
    place-items:start center;
  }
  .avatar-crop-card{
    width:100%;
    padding:14px;
    border-radius:18px;
  }
  .avatar-crop-stage{
    width:min(100%,300px);
  }
  .avatar-crop-title{
    margin-top:0;
  }
  .avatar-crop-hint{
    margin:9px 0;
  }
}
/* v063 conversation selector polish
   Cosmetic only: make All and animal selectors read as one coherent control family.
   Does not alter navigation, avatar editing, encryption, or messaging behavior. */
.tabs{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.tabs::-webkit-scrollbar{display:none}

.tabs .tab{
  box-sizing:border-box;
  min-height:38px;
  height:38px;
  padding:0 13px;
  border:1px solid #414246;
  border-radius:999px;
  background:#202123;
  color:#c9c9cb;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  flex:0 0 auto;
  white-space:nowrap;
  font-size:14px;
  line-height:1;
}

.tabs .tab.active{
  background:#e5e5e5;
  color:#171819;
  border-color:#e5e5e5;
}

.tabs .tab .tab-profile-avatar{
  width:26px;
  height:26px;
  margin:0;
  border-radius:50%;
  border:1px solid #55575b;
  background:#292a2d;
}

.tabs .tab.active .tab-profile-avatar{
  border-color:#b7b7b9;
}

.tabs .tab .tab-profile-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:50%;
}

.tabs .tab:first-child{
  min-width:58px;
  padding-left:15px;
  padding-right:15px;
}

@media(max-width:520px){
  .tabs{
    gap:7px;
    padding:9px 14px;
  }
  .tabs .tab{
    min-height:36px;
    height:36px;
    padding:0 12px;
    font-size:14px;
  }
  .tabs .tab .tab-profile-avatar{
    width:24px;
    height:24px;
  }
  .tabs .tab:first-child{
    min-width:56px;
  }
}

/* v064 message/media deletion */
.bubble{position:relative}
.item-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;margin-top:3px}
.item-menu{border:0;background:transparent;color:var(--muted);font:700 18px/1 system-ui;padding:0 3px;cursor:pointer}
.item-delete{border:1px solid var(--danger);background:transparent;color:#ffdada;border-radius:999px;padding:4px 8px;font:inherit;font-size:10px;cursor:pointer}
.item-delete-admin{border-style:dashed}


/* v065 unread + notification controls */
.unread-badge{display:inline-flex;align-items:center;justify-content:center;min-width:17px;height:17px;padding:0 5px;margin-left:6px;border-radius:999px;background:var(--silver);color:#202123;font-size:10px;font-weight:700;line-height:1}
.notify-toggle{margin-left:auto;border:1px solid var(--line);background:transparent;color:var(--muted);border-radius:999px;padding:7px 9px;font:inherit;font-size:11px;white-space:nowrap;cursor:pointer}


/* v066 secure device pairing */
.client-quick-actions{margin-left:auto;display:flex;align-items:center;gap:6px}
.pair-device-btn{border:1px solid var(--line);background:transparent;color:var(--muted);border-radius:999px;padding:7px 9px;font:inherit;font-size:11px;white-space:nowrap;cursor:pointer}
.pairing-card{border:1px solid var(--line);background:var(--panel);padding:18px;border-radius:16px;max-width:460px;margin:38px auto;text-align:center}
.pairing-card p{color:var(--muted)}
.pairing-code{font-size:34px;letter-spacing:.18em;font-weight:700;padding:15px 0;color:var(--silver)}
.pairing-wait{font-size:12px;color:var(--muted);margin-top:10px}

/* Installed launch and enrollment overlays (external for CSP). */
.first-run-overlay{position:fixed;inset:0;z-index:9999;background:rgba(7,10,11,.88);display:flex;align-items:flex-start;justify-content:center;height:100dvh;overflow:auto;padding:calc(env(safe-area-inset-top) + 18px) 20px calc(env(safe-area-inset-bottom) + 24px)}
.first-run-card{width:min(560px,100%);max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 42px);overflow:auto;background:#1B1C1D;border:1px solid #4a4d50;border-radius:24px;padding:28px;box-shadow:0 24px 80px rgba(0,0,0,.45);margin:auto 0}
.first-run-card h2{margin:22px 0 8px}
.first-run-choice{width:100%;display:block;text-align:left;margin:14px 0;padding:18px;border-radius:18px;border:1px solid #555;background:#232527;color:inherit}
.first-run-choice strong,.first-run-choice span{display:block}
.first-run-choice span{margin-top:6px;opacity:.72;line-height:1.4}
.first-run-install-help{margin-top:18px;padding-top:18px;border-top:1px solid #444}
/* Exact original artwork, stationary and fully contained within safe areas. */
.standalone-welcome{position:fixed;inset:0;z-index:10050;height:100vh;height:100dvh;background:#000;display:grid;grid-template-rows:minmax(0,1fr);padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);opacity:1;transition:opacity .6s ease;outline:none}
.standalone-welcome.leaving{opacity:0}
.launch-artwork{position:relative;min-width:0;min-height:0}
.launch-stage{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center;opacity:0;pointer-events:none;will-change:opacity}
.launch-stage.active,.launch-stage.underlay{opacity:1}
/* Fade the incoming original over a fully opaque, stationary outgoing image. */
.launch-stage.emerging{animation:launch-crossfade .8s ease-in-out both}
.standalone-welcome[data-stage="3"] .launch-stage.emerging{animation-duration:1.1s}
@keyframes launch-crossfade{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){
 .standalone-welcome{transition-duration:.18s}
 .standalone-welcome[data-stage] .launch-stage.emerging{animation-duration:.18s}
}
