/* Email center. Three columns on a desk (views | messages | reader), one
   column on a phone with the reader sliding over the list. Compose is a small
   panel docked bottom-right and the mailbox settings open as a side panel:
   the owner's standing preference is docked, compact UI over large pop-ups.
   Colours are scoped to the root so the screen reads the same in every portal
   theme. */
#bpEmailRoot{--em-ink:#17304a;--em-muted:#5b6b7b;--em-line:#d9e1e8;--em-bg:#fff;--em-soft:#f4f7fa;--em-accent:#0b5cad;--em-accent-ink:#fff;--em-hot:#b42318;--em-warm:#9a6700;--em-hotel:#e7f1ec;--em-hotel-ink:#1d5c45;
  position:relative;display:flex;flex-direction:column;gap:8px;color:var(--em-ink);font-size:14px;line-height:1.4;font-weight:400;min-height:460px}
/* The Email screen uses the whole window (owner, 12 Nov 2026: "bigger window ... no unnecessary thing
   wasting empty space"): the portal's centred 1500px column and wide margins are dropped for this view only. */
.content:has(#view-email.on){max-width:none!important;padding:8px 10px!important}
#bpEmailRoot *{box-sizing:border-box}
#bpEmailRoot h3{margin:0;font-size:16px;font-weight:650;line-height:1.3;overflow-wrap:anywhere}
#bpEmailRoot h4{margin:0 0 6px;font-size:13px;font-weight:650}
#bpEmailRoot p{margin:0}

.em-btn{appearance:none;border:1px solid var(--em-line);background:var(--em-bg);color:var(--em-ink);border-radius:8px;padding:6px 11px;font:inherit;font-size:13px;font-weight:550;cursor:pointer;white-space:nowrap;min-height:32px}
.em-btn:hover{background:var(--em-soft)}
.em-btn:focus-visible,.em-row:focus-visible,.em-rail-item:focus-visible,.em-thread-item:focus-visible{outline:2px solid var(--em-accent);outline-offset:1px}
.em-btn:disabled{opacity:.55;cursor:default}
.em-btn.em-primary{background:var(--em-accent);border-color:var(--em-accent);color:var(--em-accent-ink)}
.em-btn.em-primary:hover{filter:brightness(1.08)}
.em-btn.quiet{border-color:transparent;background:transparent;color:var(--em-muted);padding:4px 8px;min-height:28px}
.em-btn.quiet:hover{background:var(--em-soft);color:var(--em-ink)}
.em-btn.danger{color:var(--em-hot)}
.em-btn.on{background:var(--em-soft);border-color:var(--em-ink)}
/* The portal has a bare `input` rule that stretches every input; a tick box
   must keep its own size (the same trap crushed every checkbox once before). */
#bpEmailRoot input[type=checkbox].em-check{width:16px;height:16px;min-width:16px;min-height:16px;padding:0;margin:3px 0 0;flex:0 0 16px;accent-color:var(--em-accent)}
#bpEmailRoot input[type=text],#bpEmailRoot input[type=date],#bpEmailRoot input[type=datetime-local],#bpEmailRoot input[type=email],#bpEmailRoot input[type=password],#bpEmailRoot input[type=search],#bpEmailRoot textarea,#bpEmailRoot select{font:inherit;font-size:14px;color:var(--em-ink);background:var(--em-bg);border:1px solid var(--em-line);border-radius:8px;padding:6px 9px;min-height:32px;width:100%;max-width:100%}
#bpEmailRoot select.em-select{width:auto;max-width:130px;flex:0 0 auto;font-size:13px;padding:5px 8px}

.em-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:var(--em-bg);border:1px solid var(--em-line);border-radius:12px;padding:6px 10px;flex:0 0 auto}
.em-keys{font-size:12px}
.em-bar-title{font-size:15px}
#bpEmailRoot input.em-search{flex:1 1 200px;width:auto;min-width:140px;max-width:420px}
.em-spacer{flex:1 1 0}
.em-sync{font-size:12px;color:var(--em-muted);white-space:nowrap}
.em-sync.bad{color:var(--em-hot);font-weight:600}

.em-body{display:grid;grid-template-columns:190px minmax(320px,30%) minmax(0,1fr);gap:8px;flex:1 1 0;min-height:0}
.em-body[hidden]{display:none}
.em-rail,.em-list,.em-read{background:var(--em-bg);border:1px solid var(--em-line);border-radius:12px;min-height:0;overflow:auto}
.em-rail{padding:8px;display:flex;flex-direction:column;gap:2px}
.em-rail-head{font-size:11px;font-weight:650;letter-spacing:.04em;text-transform:uppercase;color:var(--em-muted);padding:10px 8px 3px}
.em-rail-item{appearance:none;border:0;background:transparent;font:inherit;font-size:13.5px;color:var(--em-ink);text-align:left;display:flex;align-items:center;gap:6px;padding:6px 8px;border-radius:8px;cursor:pointer;width:100%;min-height:32px}
.em-rail-item:hover{background:var(--em-soft)}
.em-rail-item.on{background:var(--em-accent);color:var(--em-accent-ink)}
.em-rail-item.strong .em-rail-label{font-weight:650}
.em-rail-item.bad .em-rail-label::after{content:" ⚠";color:var(--em-hot)}
.em-rail-item.on.bad .em-rail-label::after{color:inherit}
.em-rail-item.off{color:var(--em-muted)}
.em-rail-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.em-count{font-size:12px;font-weight:650;background:var(--em-soft);color:var(--em-ink);border-radius:999px;padding:1px 7px;font-variant-numeric:tabular-nums}
.em-rail-item.on .em-count{background:rgba(255,255,255,.22);color:inherit}

.em-list{display:flex;flex-direction:column}
.em-list-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 12px;border-bottom:1px solid var(--em-line);position:sticky;top:0;background:var(--em-bg);z-index:1}
.em-list-head h3{flex:1 1 auto;min-width:0}
.em-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.em-picked{font-size:12.5px;color:var(--em-muted)}
.em-senders{display:flex;gap:6px;flex-wrap:wrap;align-items:center;padding:8px 12px;border-bottom:1px solid var(--em-line);background:var(--em-soft);font-size:12.5px}
.em-senders-label{color:var(--em-muted)}
.em-sender{display:inline-flex;align-items:center;gap:2px;background:var(--em-bg);border:1px solid var(--em-line);border-radius:8px;padding:1px 2px 1px 8px}
.em-sender b{font-weight:600;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.em-brief{margin:10px 12px 0;padding:10px 12px;border:1px solid var(--em-line);border-left:3px solid var(--em-accent);border-radius:8px;background:var(--em-soft)}
.em-brief pre{margin:6px 0;white-space:pre-wrap;font:inherit;font-size:13.5px}
.em-rows{flex:1 1 auto}
.em-row{display:flex;gap:9px;padding:9px 12px;border-bottom:1px solid var(--em-line);cursor:pointer;align-items:flex-start}
.em-row:hover{background:var(--em-soft)}
.em-row.on{background:#e8f1fb;box-shadow:inset 3px 0 0 var(--em-accent)}
.em-row-main{flex:1 1 auto;min-width:0}
.em-row-top{display:flex;gap:8px;align-items:baseline}
.em-from{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--em-muted)}
.em-time{font-size:12px;color:var(--em-muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.em-subject{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.em-snip{font-size:12.5px;color:var(--em-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.em-row.unread .em-from,.em-row.unread .em-subject{font-weight:700;color:var(--em-ink)}
/* Read and unread must be obvious at a glance (owner, 12 Nov 2026). Unread: white row, blue bar and
   dot, bold sender and subject. Read: grey row, hollow dot, lighter text. */
.em-row{background:var(--em-soft)}
.em-row .em-subject{color:var(--em-muted)}
.em-row.unread{background:var(--em-bg);box-shadow:inset 3px 0 0 var(--em-accent)}
.em-row.unread .em-snip{color:var(--em-ink)}
.em-row:hover{background:#eaf0f6}
.em-row.unread:hover{background:#f3f8fe}
.em-row.on,.em-row.unread.on{background:#dcebfb;box-shadow:inset 3px 0 0 var(--em-accent)}
.em-dot{flex:0 0 9px;width:9px;height:9px;border-radius:50%;margin-top:5px;border:1.5px solid #b6c2cf;background:transparent}
.em-row.unread .em-dot{background:var(--em-accent);border-color:var(--em-accent)}
.em-chip.task{background:#e6f4ea;color:#1d5c45}
.em-chips{display:flex;gap:4px;flex-wrap:wrap;margin-top:4px}
.em-chip{font-size:11px;font-weight:600;border-radius:999px;padding:1px 7px;background:var(--em-soft);color:var(--em-muted);max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.em-chip.hotel{background:var(--em-hotel);color:var(--em-hotel-ink)}
.em-chip.reply{background:#fdf0d5;color:var(--em-warm)}
.em-empty{padding:28px 16px;text-align:center;color:var(--em-muted)}
.em-empty.bad{color:var(--em-hot)}
.em-btn.em-more{display:block;margin:10px auto}

.em-read{display:flex;flex-direction:column}
.em-read-head{padding:12px 14px;border-bottom:1px solid var(--em-line);display:flex;flex-direction:column;gap:6px}
.em-read-who,.em-read-to{font-size:13px;color:var(--em-muted);overflow-wrap:anywhere}
.em-read-who b{color:var(--em-ink);font-weight:650}
.em-why{font-size:12px;color:var(--em-muted)}
.em-back{display:none;align-self:flex-start}
.em-assist{padding:8px 14px;border-bottom:1px solid var(--em-line);background:var(--em-soft)}
.em-assist-row{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.em-assist-label{font-size:11px;font-weight:650;letter-spacing:.04em;text-transform:uppercase;color:var(--em-muted)}
#bpEmailRoot input.em-assist-input{flex:1 1 180px;width:auto;min-width:140px}
.em-assist-out{margin-top:8px;font-size:13.5px}
.em-assist-out ul{margin:4px 0 0;padding-left:18px}
.em-content{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.em-frame{flex:1 1 auto;min-height:200px;width:100%;border:0;background:#fff}
.em-text{margin:0;padding:14px;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}
.em-files{display:flex;gap:6px;flex-wrap:wrap;padding:10px 14px;border-top:1px solid var(--em-line)}
.em-thread{padding:10px 14px;border-top:1px solid var(--em-line)}
.em-thread-item{appearance:none;display:flex;flex-direction:column;gap:1px;width:100%;text-align:left;border:0;border-top:1px solid var(--em-line);background:transparent;font:inherit;font-size:13px;color:var(--em-muted);padding:6px 0;cursor:pointer}
.em-thread-item b{color:var(--em-ink);font-weight:600}
.em-thread-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Mailboxes & rules: a side panel over the right edge, not a modal. */
.em-panel{display:none;position:absolute;top:52px;right:0;bottom:0;width:min(440px,100%);background:var(--em-bg);border:1px solid var(--em-line);border-radius:12px;box-shadow:0 10px 30px rgba(16,33,61,.16);padding:14px;overflow:auto;z-index:5;flex-direction:column;gap:10px}
.em-panel.open{display:flex}
#bpEmailRoot.em-first .em-panel{position:static;width:min(560px,100%);box-shadow:none}
.em-panel-head{display:flex;align-items:center;gap:8px}
.em-panel-head h3{flex:1 1 auto}
.em-panel-sub{margin-top:8px!important}
.em-help{font-size:13px;color:var(--em-muted)}
.em-box{border:1px solid var(--em-line);border-radius:10px;padding:9px 11px;display:flex;flex-direction:column;gap:3px}
.em-box.bad{border-color:var(--em-hot)}
.em-box-line{font-size:12.5px;color:var(--em-muted);overflow-wrap:anywhere}
.em-box.bad .em-box-line{color:var(--em-hot)}
.em-form{display:flex;flex-direction:column;gap:9px;border:1px solid var(--em-line);border-radius:10px;padding:12px;background:var(--em-soft)}
.em-custom{display:flex;flex-direction:column;gap:9px}
.em-custom[hidden]{display:none}
.em-field{display:flex;flex-direction:column;gap:3px;font-size:12.5px;color:var(--em-muted)}
.em-field>span{font-weight:600}
.em-field small{font-size:12px;line-height:1.35}
.em-rule{display:flex;align-items:center;gap:8px;font-size:13px;border-top:1px solid var(--em-line);padding:5px 0}
.em-rule span{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
.em-rule-add{display:flex;gap:6px;flex-wrap:wrap;align-items:center;font-size:13px;color:var(--em-muted)}
#bpEmailRoot .em-rule-add select,#bpEmailRoot .em-rule-add input{width:auto;flex:1 1 110px;font-size:13px}

/* Calendar: one week, a column per day; on a phone the days stack. */
.em-cal{background:var(--em-bg);border:1px solid var(--em-line);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:10px;flex:1 1 0;min-height:0;overflow:auto}
.em-cal[hidden]{display:none}
.em-cal-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.em-cal-head h3{flex:1 1 auto}
.em-cal-problem{font-size:13px;color:var(--em-hot)}
.em-cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;flex:1 1 auto}
.em-cal-day{border:1px solid var(--em-line);border-radius:10px;padding:6px;display:flex;flex-direction:column;gap:5px;min-height:150px;min-width:0}
.em-cal-day.today{border-color:var(--em-accent);box-shadow:inset 0 2px 0 var(--em-accent)}
.em-cal-date{font-size:12px;font-weight:650;color:var(--em-muted)}
.em-cal-day.today .em-cal-date{color:var(--em-accent)}
.em-cal-none{color:var(--em-line);font-size:13px}
.em-cal-event{appearance:none;border:0;border-left:3px solid var(--em-accent);background:#e8f1fb;color:var(--em-ink);border-radius:6px;padding:4px 6px;text-align:left;font:inherit;font-size:12.5px;cursor:pointer;display:flex;flex-direction:column;gap:1px;min-width:0}
.em-cal-event:hover{filter:brightness(.97)}
.em-cal-event:focus-visible{outline:2px solid var(--em-accent);outline-offset:1px}
.em-cal-event b{font-size:11px;font-weight:650;color:var(--em-muted);font-variant-numeric:tabular-nums}
.em-cal-event span{overflow-wrap:anywhere}
.em-cal-event small{font-size:11px;color:var(--em-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.em-cal-event.ask{background:#fdf0d5;border-left-color:var(--em-warm)}
.em-cal-event.ask .em-cal-ask{color:var(--em-warm);font-weight:650}
.em-cal-event.no{opacity:.55;text-decoration:line-through}
.em-google{display:flex;flex-direction:column;gap:5px;align-items:flex-start;border:1px solid var(--em-line);border-radius:10px;padding:10px 12px}
.em-check-line{display:flex;align-items:center;gap:7px;font-size:13px}
.em-event-notes{padding:8px 10px;background:var(--em-soft);border-radius:8px;font-size:13px;max-height:220px;overflow:auto}
[hidden].em-field{display:none}

.em-desk{display:flex;flex-direction:column;gap:3px;padding:10px 12px;border-bottom:1px solid var(--em-line)}
.em-desk.due{box-shadow:inset 3px 0 0 var(--em-warm);background:#fffaf0}
.em-desk.bad{box-shadow:inset 3px 0 0 var(--em-hot)}
.em-desk.bad .em-box-line:last-of-type{color:var(--em-hot)}
.em-pick{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
#bpEmailRoot .em-pick input{width:auto;flex:1 1 180px}

.em-tabs{display:flex;gap:4px;flex-wrap:wrap;border-bottom:1px solid var(--em-line);padding-bottom:8px}
.em-btn.em-tab{border-color:transparent;background:transparent;color:var(--em-muted)}
.em-btn.em-tab.on{background:var(--em-accent);color:var(--em-accent-ink)}
.em-tab-body{display:flex;flex-direction:column;gap:9px}
.em-images{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:7px 14px;background:var(--em-soft);border-bottom:1px solid var(--em-line);font-size:13px;color:var(--em-muted)}
.em-undo{display:flex;gap:10px;align-items:center;justify-content:space-between;font-size:13.5px}
/* Compact spacing (a setting): tighter rows so more mail fits on screen. */
#bpEmailRoot.em-compact .em-row{padding:4px 12px;gap:7px}
#bpEmailRoot.em-compact .em-snip{display:none}
#bpEmailRoot.em-compact .em-chips{margin-top:2px}
#bpEmailRoot.em-compact .em-rail-item{min-height:27px;padding:3px 8px}
#bpEmailRoot input[type=checkbox].em-check[hidden]{display:none}

.em-chip.label{background:#ede9fe;color:#4c1d95}
button.em-chip.label{appearance:none;border:0;font:inherit;font-size:11px;font-weight:600;cursor:pointer;min-height:0}
.em-rail-item.label .em-rail-label::before{content:"● ";color:#7c3aed}
.em-rail-item.on.label .em-rail-label::before{color:inherit}
.em-shared{font-size:13px;background:#fdf0d5;color:#5c4400;border-radius:8px;padding:5px 10px;overflow-wrap:anywhere}
.em-quick{display:flex;flex-direction:column;gap:5px;margin-top:8px}
.em-btn.em-quick-item{white-space:normal;text-align:left;font-weight:400;line-height:1.35;height:auto;padding:7px 10px}
.em-translation{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:13.5px;max-height:240px;overflow:auto}

/* Dark colours (a setting). The message itself stays on white: emails are written for a light page. */
#bpEmailRoot.em-dark{--em-ink:#e6edf3;--em-muted:#9aa7b4;--em-line:#30363d;--em-bg:#161b22;--em-soft:#0d1117;--em-accent:#4c9aff;--em-accent-ink:#06121f;--em-hot:#ff7b72;--em-warm:#e3b341;--em-hotel:#12352a;--em-hotel-ink:#7ee2b8}
#bpEmailRoot.em-dark .em-row:hover{background:#1c2430}
#bpEmailRoot.em-dark .em-row.unread:hover{background:#1f2a38}
#bpEmailRoot.em-dark .em-row.on,#bpEmailRoot.em-dark .em-row.unread.on{background:#1b3350}
#bpEmailRoot.em-dark .em-dot{border-color:#56616d}
#bpEmailRoot.em-dark .em-chip.reply,#bpEmailRoot.em-dark .em-shared{background:#3a2f0b;color:#f2cc60}
#bpEmailRoot.em-dark .em-chip.task{background:#12352a;color:#7ee2b8}
#bpEmailRoot.em-dark .em-chip.label{background:#2e2350;color:#cbb8ff}
#bpEmailRoot.em-dark .em-cal-event{background:#1b3350}
#bpEmailRoot.em-dark .em-cal-event.ask,#bpEmailRoot.em-dark .em-desk.due{background:#3a2f0b}
#bpEmailRoot.em-dark .em-btn.em-primary{color:var(--em-accent-ink)}
#bpEmailRoot.em-dark .em-panel,#bpEmailRoot.em-dark .em-dock{box-shadow:0 14px 40px rgba(0,0,0,.6)}
#bpEmailRoot.em-dark .em-text,#bpEmailRoot.em-dark .em-translation{color:var(--em-ink)}

.em-provider-off{display:flex;flex-direction:column;gap:6px;padding:10px 12px;margin:8px 0;border:1px dashed var(--em-line);border-radius:8px;background:var(--em-soft)}
.em-saved{border-top-color:var(--em-accent)!important}
.em-remote,.em-saved{display:flex;flex-direction:column;gap:6px;align-items:flex-start;padding:10px 12px;border-top:2px solid var(--em-line);border-bottom:1px solid var(--em-line);background:var(--em-soft)}
.em-backup{display:flex;flex-direction:column;gap:7px;padding:10px 12px;border-bottom:1px solid var(--em-line);background:var(--em-soft)}

/* Compose: docked bottom-right like a chat window. */
.em-dock{display:none;position:fixed;right:18px;bottom:18px;width:min(520px,calc(100vw - 24px));max-height:min(620px,calc(100vh - 40px));background:var(--em-bg);border:1px solid var(--em-line);border-radius:12px;box-shadow:0 14px 40px rgba(16,33,61,.24);z-index:60;flex-direction:column;gap:7px;padding:10px 12px;overflow:auto}
.em-dock.open{display:flex}
.em-dock-head{display:flex;align-items:center;justify-content:space-between}
.em-dock .em-field{flex-direction:row;align-items:center;gap:8px}
.em-dock .em-field>span{flex:0 0 54px}
.em-dock .em-field:has(textarea){flex-direction:column;align-items:stretch}
.em-dock .em-field:has(textarea)>span{display:none}
#bpEmailRoot .em-dock textarea{min-height:200px;resize:vertical;line-height:1.45}
.em-dock-foot{display:flex;gap:6px;flex-wrap:wrap;align-items:center}

@media (max-width:1100px){
  .em-body{grid-template-columns:170px minmax(0,1fr)}
  .em-read{display:none}
  .em-body.reading .em-list{display:none}
  .em-body.reading .em-read{display:flex}
  .em-back{display:inline-flex}
}
@media (max-width:720px){
  #bpEmailRoot{min-height:0}
  .em-cal-grid{grid-template-columns:minmax(0,1fr)}
  .em-cal-day{min-height:0}
  .em-body{grid-template-columns:minmax(0,1fr);flex:0 0 auto;min-height:0}
  .em-cal{flex:0 0 auto;overflow:visible}
  .em-rail{flex-direction:row;overflow-x:auto;overflow-y:hidden;padding:6px;gap:4px;scrollbar-width:none}
  .em-rail-head{display:none}
  .em-rail-item{width:auto;flex:0 0 auto;border:1px solid var(--em-line);min-height:36px}
  .em-body.reading .em-rail{display:none}
  .em-list,.em-read{overflow:visible}
  .em-list-head{position:static}
  .em-btn{min-height:36px}
  .em-frame{min-height:60vh}
  .em-panel{top:0}
  .em-dock{right:0;bottom:0;width:100vw;max-height:92vh;border-radius:12px 12px 0 0}
}

/* Email desk: quiet navigation, quick triage, and a separate reading surface. */
#bpEmailRoot {
  --em-ink:#142b2a;--em-muted:#4f6463;--em-line:#d6e2de;--em-bg:#fff;--em-soft:#f0f5f3;
  --em-accent:#126358;--em-hotel:#e4f2eb;--em-hotel-ink:#165443;
  --em-selected:#e3f1eb;--em-hover:#edf5f1;--em-rail:#f4f8f6;--em-header:#fbfdfc;
  --em-avatar:#dcece6;--em-avatar-ink:#245d4c;--em-shadow:0 2px 9px #16352d0b;
  gap:10px;min-width:0;
}
#bpEmailRoot.em-dark {
  --em-selected:#243b48;--em-hover:#202c35;--em-rail:#131b23;--em-header:#1a232b;
  --em-avatar:#273e46;--em-avatar-ink:#caeee5;--em-shadow:none;
}
#bpEmailRoot .em-bar{gap:14px;padding:9px 12px;border-radius:14px;background:var(--em-header);box-shadow:var(--em-shadow)}
.em-brand,.em-bar-actions{display:flex;align-items:center;gap:8px;min-width:0}
.em-brand{gap:10px;flex:none}
.em-brand-icon,.em-empty-icon{display:grid;place-items:center;flex:none;width:37px;height:37px;border-radius:11px;background:var(--em-accent);color:var(--em-accent-ink);font-size:20px}
.em-brand-name{display:grid;gap:0}
.em-eyebrow,.em-date-group{font-size:10px;font-weight:700;letter-spacing:.08em;color:var(--em-muted);text-transform:uppercase}
#bpEmailRoot .em-bar-title{font-size:17px;line-height:1.15}
.em-bar-actions{margin-left:auto;flex-wrap:wrap}
.em-search-wrap{position:relative;flex:1 1 215px;min-width:120px;max-width:520px}
#bpEmailRoot .em-search-wrap input.em-search{width:100%;min-width:0;max-width:none;padding-right:34px;background:var(--em-bg)}
.em-search-key{position:absolute;right:9px;top:50%;transform:translateY(-50%);border:1px solid var(--em-line);border-radius:4px;padding:0 5px;color:var(--em-muted);pointer-events:none}
.em-sync{display:inline-flex;align-items:center;gap:5px}
.em-sync::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--em-accent)}
.em-sync.bad::before{background:var(--em-hot)}
#bpEmailRoot .em-body{grid-template-columns:168px minmax(285px,30%) minmax(0,1fr);gap:10px}
#bpEmailRoot .em-rail,#bpEmailRoot .em-list,#bpEmailRoot .em-read{min-width:0;border-radius:14px;box-shadow:var(--em-shadow)}
#bpEmailRoot .em-rail{background:var(--em-rail);padding:9px 7px;gap:1px}
#bpEmailRoot .em-rail-item{min-height:31px;padding:5px 8px;font-size:12.5px;gap:7px}
#bpEmailRoot .em-rail-item.on{background:var(--em-selected);color:var(--em-ink);box-shadow:inset 2px 0 var(--em-accent);font-weight:700}
#bpEmailRoot .em-rail-item.on .em-count{background:var(--em-bg)}
.em-scope{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:10px 10px 5px}
#bpEmailRoot .em-scope .em-select{width:100%;max-width:none;text-overflow:ellipsis;min-width:0;background:var(--em-header)}
.em-queue-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:4px 10px 9px}
#bpEmailRoot .em-queue{min-width:0;display:grid;justify-items:start;gap:1px;text-align:left;padding:5px 8px;background:var(--em-soft);border-color:transparent;border-radius:9px}
#bpEmailRoot .em-queue.on,#bpEmailRoot .em-queue:hover{background:var(--em-selected);border-color:var(--em-line)}
.em-queue strong{font-size:17px;line-height:1.1;font-variant-numeric:tabular-nums}
.em-queue span{font-size:11px;color:var(--em-muted);max-width:100%;white-space:normal;line-height:1.2}
#bpEmailRoot .em-list-head{gap:7px;padding:8px 10px;border-top:1px solid var(--em-line)}
.em-list-title{flex:1 1 auto;min-width:0}
.em-list-caption{font-size:11px;color:var(--em-muted)}
.em-date-group{padding:6px 10px 5px;background:var(--em-rail);border-bottom:1px solid var(--em-line)}
#bpEmailRoot .em-row{gap:7px;padding:7px 9px;background:var(--em-header)}
#bpEmailRoot .em-row.unread{background:var(--em-bg);box-shadow:none}
#bpEmailRoot .em-row:hover{background:var(--em-hover)}
#bpEmailRoot .em-row.on,#bpEmailRoot .em-row.unread.on{background:var(--em-selected);box-shadow:inset 3px 0 var(--em-accent)}
.em-avatar{width:28px;height:28px;flex:0 0 28px;display:grid;place-items:center;position:relative;margin-top:2px;border-radius:8px;background:var(--em-avatar);color:var(--em-avatar-ink);font-size:10px;font-weight:750}
#bpEmailRoot:not(.em-dark) .em-avatar.tone-1{background:#e8e4f4;color:#584078}
#bpEmailRoot:not(.em-dark) .em-avatar.tone-2{background:#f5e8d7;color:#795325}
#bpEmailRoot:not(.em-dark) .em-avatar.tone-3{background:#e0eaf7;color:#315582}
#bpEmailRoot .em-avatar .em-dot{display:none;position:absolute;right:-2px;bottom:-1px;margin:0;width:8px;height:8px;border:1px solid var(--em-bg)}
#bpEmailRoot .em-row.unread .em-dot{display:block;background:var(--em-accent)}
#bpEmailRoot .em-row .em-subject{font-size:13px;color:var(--em-ink)}
#bpEmailRoot .em-row .em-snip{font-size:12px;color:var(--em-muted)}
#bpEmailRoot .em-row .em-chips{margin-top:3px}
#bpEmailRoot.em-compact .em-row{padding-top:5px;padding-bottom:5px}
#bpEmailRoot .em-read-head{padding:14px 16px}
#bpEmailRoot .em-read-head h3{font-size:clamp(17px,1.6vw,22px);letter-spacing:-.025em}
.em-context{display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin-top:9px}
.em-context-pill{font-size:11px;font-weight:650;padding:2px 8px;border-radius:99px;background:var(--em-soft);color:var(--em-muted)}
.em-context-pill.urgent{color:var(--em-warm);border:1px solid currentColor}
.em-context .em-why{margin:0;font-size:11.5px;color:var(--em-muted)}
.em-more-actions{position:relative;flex:none}
.em-more-actions>summary{list-style:none;display:flex;align-items:center;gap:5px}
.em-more-actions>summary::after{content:"▾"}
.em-more-actions>summary::-webkit-details-marker{display:none}
.em-more-panel{display:flex;flex-wrap:wrap;gap:5px;padding:7px;background:var(--em-bg);border:1px solid var(--em-line);border-radius:10px;margin-top:4px}
.em-reader-empty{display:grid;justify-items:center;align-content:center;min-height:60%;gap:8px;padding:24px;text-align:center;color:var(--em-muted)}
.em-empty-icon{background:var(--em-soft);color:var(--em-accent)}
#bpEmailRoot .em-rule-add .em-check-line{flex:1 0 100%;color:var(--em-muted);font-size:12px}
@media (max-width:1100px){#bpEmailRoot .em-body{grid-template-columns:148px minmax(0,1fr)}}
@media (max-width:720px){
  #bpEmailRoot .em-body{grid-template-columns:minmax(0,1fr);gap:7px}
  #bpEmailRoot .em-bar{gap:7px;padding:8px}
  .em-search-wrap{order:3;flex:1 1 100%;max-width:none}
  .em-bar-actions{margin-left:0;gap:5px;flex:1 1 auto}
  .em-bar-actions .em-sync{display:none}
  #bpEmailRoot .em-bar-actions .em-btn{font-size:11px;padding:4px 6px}
  #bpEmailRoot .em-rail-item{min-height:36px}
  #bpEmailRoot .em-read-head{padding:10px}
  #bpEmailRoot .em-body.reading .em-rail{display:none}
}

/* Small color tiles identify queues without making the controls louder. */
#bpEmailRoot{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-weight:400}
#bpEmailRoot .em-brand-icon{width:31px;height:31px;padding:3px;background:var(--em-soft);object-fit:contain;border-radius:8px}
#bpEmailRoot .em-bar-title{font-weight:640;letter-spacing:-.028em}
#bpEmailRoot .em-btn{min-height:29px;font-size:12px;font-weight:520;border-radius:7px;padding:4px 8px}
#bpEmailRoot .em-btn.em-primary{font-weight:600}
#bpEmailRoot select.em-select{min-height:29px;font-size:12px}
#bpEmailRoot .em-rail-item{min-height:29px;font-weight:460}
#bpEmailRoot .em-rail-item.on,#bpEmailRoot .em-rail-item.strong .em-rail-label{font-weight:610}
#bpEmailRoot .em-row.unread .em-from,#bpEmailRoot .em-row.unread .em-subject{font-weight:620}
#bpEmailRoot .em-chip,#bpEmailRoot .em-context-pill{font-weight:520}
.em-view-icon{width:20px;height:20px;display:grid;place-items:center;flex:none;border-radius:6px;background:#e6efed;color:#376357}
.em-view-icon svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round}
.em-view-icon.icon-focus,.em-view-icon.icon-sent{background:#d8eee6;color:#15654f}
.em-view-icon.icon-reply,.em-view-icon.icon-followups{background:#f7e8d8;color:#9b4e21}
.em-view-icon.icon-unread,.em-view-icon.icon-scheduled{background:#e0ecfb;color:#305f9c}
.em-view-icon.icon-promotions,.em-view-icon.icon-snoozed{background:#eee4f7;color:#71499a}
.em-view-icon.icon-reports,.em-view-icon.icon-calendar{background:#e0efef;color:#286978}
.em-view-icon.icon-starred,.em-view-icon.icon-notifications{background:#f7edcf;color:#795915}
#bpEmailRoot.em-dark .em-view-icon{filter:saturate(.82);opacity:.94}
.em-queue-top{display:flex;align-items:center;gap:5px}
.em-queue-top .em-view-icon,.em-attachment-filter .em-view-icon{width:17px;height:17px}
.em-queue-top .em-view-icon svg,.em-attachment-filter .em-view-icon svg{width:11px;height:11px}
#bpEmailRoot .em-attachment-filter{display:inline-flex;align-items:center;gap:4px}
.em-context-pill:has(.em-provider-icon){display:inline-flex;align-items:center;gap:4px}
.em-provider-icon{object-fit:contain}
@media (max-width:720px){
  #bpEmailRoot .em-btn,#bpEmailRoot .em-rail-item,#bpEmailRoot .em-select{min-height:36px}
}
