:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --yp-bg: #08090b;
  --yp-bg-soft: #0c0d10;
  --yp-panel: #101115;
  --yp-panel-2: #131419;
  --yp-panel-3: #17181e;
  --yp-border: rgba(255,255,255,.085);
  --yp-border-strong: rgba(255,255,255,.15);
  --yp-text: #f6f6f8;
  --yp-muted: #9a9eaa;
  --yp-dim: #686d79;
  --yp-accent: #FE6113;
  --yp-accent-soft: rgba(254,97,19,.13);
  --yp-success: #31c985;
  --yp-warning: #f0b44d;
  --yp-danger: #ef6767;
  --yp-sidebar: 252px;
  --yp-list: 390px;
  --yp-radius: 18px;
  --yp-shadow: 0 18px 60px rgba(0,0,0,.22);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--yp-bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow: hidden; background: var(--yp-bg); color: var(--yp-text); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
::selection { background: rgba(254,97,19,.32); color: #fff; }

.yp-mail-boot { min-height: 100vh; display: grid; place-items: center; }
.yp-mail-loader { display: grid; place-items: center; gap: 14px; color: var(--yp-muted); font-size: 13px; }
.yp-mail-loader span { width: 28px; height: 28px; border: 2px solid var(--yp-border-strong); border-top-color: var(--yp-accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.yp-mail-shell { height: 100vh; min-height: 620px; display: grid; grid-template-columns: var(--yp-sidebar) minmax(0,1fr); background: radial-gradient(circle at 68% -20%, rgba(254,97,19,.06), transparent 28%), var(--yp-bg); }
.yp-mail-sidebar { min-width: 0; border-right: 1px solid var(--yp-border); background: #0b0c0f; display: flex; flex-direction: column; padding: 18px 14px 14px; }
.yp-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-weight: 850; letter-spacing: -.02em; padding: 4px 8px 20px; }
.yp-brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #f6f6f7; color: #101114; font-size: 16px; font-weight: 950; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.yp-brand strong { font-size: 15px; white-space: nowrap; }
.yp-brand em { color: var(--yp-muted); font-style: normal; font-weight: 700; }

.yp-button { min-height: 40px; border: 1px solid transparent; border-radius: 11px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: transparent; color: var(--yp-text); cursor: pointer; font-weight: 760; font-size: 13px; line-height: 1; transition: border-color .18s ease, background .18s ease, transform .18s ease, color .18s ease, box-shadow .18s ease; }
.yp-button:hover:not(:disabled) { transform: translateY(-1px); }
.yp-button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--yp-accent); outline-offset: 2px; }
.yp-button:disabled { opacity: .5; cursor: not-allowed; }
.yp-button.primary { background: var(--yp-accent); color: #1c0901; box-shadow: 0 8px 24px rgba(254,97,19,.2); }
.yp-button.primary:hover:not(:disabled) { background: #ff7635; box-shadow: 0 10px 30px rgba(254,97,19,.3); }
.yp-button.secondary { background: var(--yp-panel-2); border-color: var(--yp-border-strong); }
.yp-button.ghost { border-color: var(--yp-border); background: transparent; }
.yp-button.ghost:hover:not(:disabled), .yp-button.secondary:hover:not(:disabled) { border-color: rgba(254,97,19,.45); background: var(--yp-accent-soft); }
.yp-button.icon { width: 40px; padding: 0; font-size: 17px; }
.yp-compose-button { width: 100%; min-height: 46px; margin-bottom: 18px; justify-content: flex-start; padding: 0 17px; }
.yp-compose-button b { font-size: 19px; line-height: 1; }

.yp-folder-nav { display: grid; gap: 4px; }
.yp-folder-nav button { width: 100%; min-height: 42px; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--yp-muted); text-align: left; cursor: pointer; font-size: 13px; font-weight: 720; }
.yp-folder-nav button:hover { color: #fff; background: rgba(255,255,255,.035); }
.yp-folder-nav button.is-active { color: #fff; background: var(--yp-accent-soft); border-color: rgba(254,97,19,.22); }
.yp-folder-nav button span:first-child { width: 28px; text-align: center; font-size: 15px; }
.yp-folder-nav button em { min-width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; color: var(--yp-muted); background: rgba(255,255,255,.045); font-size: 10px; font-style: normal; }
.yp-folder-nav button.is-active em { color: #ffb08a; background: rgba(254,97,19,.15); }

.yp-sidebar-spacer { flex: 1; }
.yp-mail-foundation { margin-top: 20px; border: 1px solid var(--yp-border); border-radius: 14px; background: var(--yp-panel); padding: 12px; display: grid; gap: 10px; }
.yp-mail-foundation header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.yp-mail-foundation header strong { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.yp-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yp-warning); box-shadow: 0 0 0 4px rgba(240,180,77,.1); }
.yp-status-dot.is-online { background: var(--yp-success); box-shadow: 0 0 0 4px rgba(49,201,133,.1); }
.yp-foundation-row { display: flex; justify-content: space-between; gap: 10px; color: var(--yp-muted); font-size: 11px; }
.yp-foundation-row strong { color: #d3d5dc; font-weight: 720; }
.yp-local-badge { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 9px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid var(--yp-border); color: var(--yp-muted); font-size: 10px; font-weight: 760; }
.yp-local-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--yp-accent); }

.yp-mail-main { min-width: 0; display: grid; grid-template-rows: auto minmax(0,1fr); }
.yp-mail-topbar { min-height: 78px; display: flex; align-items: center; gap: 16px; padding: 14px 22px; border-bottom: 1px solid var(--yp-border); background: rgba(8,9,11,.88); backdrop-filter: blur(14px); }
.yp-mobile-menu { display: none; }
.yp-mail-heading { min-width: 0; }
.yp-mail-heading span { color: var(--yp-muted); font-size: 9px; font-weight: 850; letter-spacing: .17em; }
.yp-mail-heading h1 { margin: 4px 0 0; font-size: 24px; letter-spacing: -.035em; }
.yp-mail-search { flex: 1; max-width: 620px; margin-left: auto; position: relative; }
.yp-mail-search input { width: 100%; height: 44px; border: 1px solid var(--yp-border); border-radius: 12px; background: #0c0d10; color: var(--yp-text); padding: 0 44px 0 42px; transition: border-color .17s ease, box-shadow .17s ease; }
.yp-mail-search input:focus { outline: 0; border-color: var(--yp-accent); box-shadow: 0 0 0 3px rgba(254,97,19,.1); }
.yp-mail-search > span { position: absolute; left: 14px; top: 12px; color: var(--yp-dim); }
.yp-mail-search kbd { position: absolute; right: 10px; top: 10px; min-width: 25px; height: 24px; display: grid; place-items: center; border: 1px solid var(--yp-border); border-radius: 7px; color: var(--yp-dim); background: var(--yp-panel); font-size: 10px; }
.yp-topbar-actions { display: flex; align-items: center; gap: 8px; }

.yp-mail-workspace { min-height: 0; display: grid; grid-template-columns: var(--yp-list) minmax(0,1fr); }
.yp-message-list { min-width: 0; border-right: 1px solid var(--yp-border); background: rgba(12,13,16,.64); display: grid; grid-template-rows: auto minmax(0,1fr); }
.yp-list-toolbar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 15px; border-bottom: 1px solid var(--yp-border); }
.yp-list-toolbar strong { font-size: 12px; }
.yp-list-toolbar span { color: var(--yp-muted); font-size: 11px; }
.yp-list-actions { display: flex; gap: 6px; }
.yp-list-actions button { width: 32px; height: 32px; border: 1px solid var(--yp-border); border-radius: 9px; background: transparent; color: var(--yp-muted); cursor: pointer; }
.yp-list-actions button:hover { color: #fff; border-color: var(--yp-border-strong); background: rgba(255,255,255,.035); }
.yp-empty-list { min-height: 0; display: grid; place-items: center; align-content: center; text-align: center; padding: 34px; }
.yp-empty-list-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: rgba(255,255,255,.035); border: 1px solid var(--yp-border); font-size: 24px; color: #c7cad3; }
.yp-empty-list h2 { margin: 18px 0 7px; font-size: 18px; letter-spacing: -.02em; }
.yp-empty-list p { max-width: 260px; margin: 0; color: var(--yp-muted); line-height: 1.55; font-size: 12px; }

.yp-reading-pane { min-width: 0; display: grid; place-items: center; padding: 32px; overflow: auto; }
.yp-reader-empty { width: min(520px,100%); text-align: center; }
.yp-reader-art { width: 134px; height: 106px; margin: 0 auto 24px; position: relative; }
.yp-reader-art .envelope { position: absolute; inset: 20px 14px 8px; border: 1px solid var(--yp-border-strong); border-radius: 18px; background: linear-gradient(145deg,#15161b,#0d0e11); box-shadow: var(--yp-shadow); }
.yp-reader-art .envelope::before, .yp-reader-art .envelope::after { content: ""; position: absolute; top: 18px; width: 58%; height: 1px; background: var(--yp-border-strong); }
.yp-reader-art .envelope::before { left: 4px; transform: rotate(28deg); transform-origin: left; }
.yp-reader-art .envelope::after { right: 4px; transform: rotate(-28deg); transform-origin: right; }
.yp-reader-art .spark { position: absolute; width: 14px; height: 14px; border-radius: 5px; background: var(--yp-accent); box-shadow: 0 0 26px rgba(254,97,19,.42); }
.yp-reader-art .spark.one { top: 0; right: 8px; transform: rotate(15deg); }
.yp-reader-art .spark.two { bottom: 7px; left: 0; width: 8px; height: 8px; opacity: .52; }
.yp-reader-empty > span { color: var(--yp-accent); font-size: 10px; font-weight: 850; letter-spacing: .18em; }
.yp-reader-empty h2 { margin: 13px 0 9px; font-size: 29px; letter-spacing: -.04em; }
.yp-reader-empty p { margin: 0 auto; max-width: 450px; color: var(--yp-muted); line-height: 1.7; font-size: 13px; }
.yp-reader-actions { margin-top: 23px; display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; }
.yp-phase-note { margin: 25px auto 0; max-width: 460px; display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 10px; text-align: left; padding: 12px; border: 1px solid rgba(240,180,77,.2); border-radius: 12px; background: rgba(240,180,77,.055); color: #d6bd86; font-size: 11px; line-height: 1.5; }
.yp-phase-note b { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: rgba(240,180,77,.11); }

.yp-compose-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.58); backdrop-filter: blur(5px); display: grid; place-items: end; z-index: 50; animation: fade .16s ease; }
@keyframes fade { from { opacity: 0; } }
.yp-compose-panel { width: min(680px, calc(100% - 28px)); max-height: calc(100vh - 38px); margin: 19px; border: 1px solid var(--yp-border-strong); border-radius: 18px; background: #101115; box-shadow: 0 28px 90px rgba(0,0,0,.52); display: grid; grid-template-rows: auto auto auto minmax(180px,1fr) auto; overflow: hidden; animation: slide .2s ease; }
@keyframes slide { from { transform: translateY(18px); opacity: .6; } }
.yp-compose-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--yp-border); }
.yp-compose-head strong { font-size: 13px; }
.yp-compose-head span { color: var(--yp-muted); font-size: 10px; }
.yp-compose-close { width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--yp-muted); cursor: pointer; font-size: 20px; }
.yp-compose-close:hover { background: rgba(255,255,255,.04); color: #fff; }
.yp-compose-line { display: grid; grid-template-columns: 72px minmax(0,1fr); align-items: center; min-height: 48px; border-bottom: 1px solid var(--yp-border); padding: 0 16px; }
.yp-compose-line label { color: var(--yp-muted); font-size: 11px; font-weight: 760; }
.yp-compose-line input { width: 100%; height: 42px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--yp-text); }
.yp-compose-body { width: 100%; min-height: 220px; resize: none; padding: 18px; border: 0; outline: 0; background: transparent; color: var(--yp-text); line-height: 1.65; }
.yp-compose-footer { min-height: 66px; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--yp-border); }
.yp-compose-footer .yp-compose-info { flex: 1; color: var(--yp-muted); font-size: 10px; }
.yp-compose-footer .yp-button.primary { opacity: .62; }

.yp-toast { position: fixed; right: 20px; bottom: 20px; z-index: 80; max-width: min(380px,calc(100% - 40px)); min-height: 50px; border: 1px solid var(--yp-border-strong); border-radius: 13px; background: #14151a; box-shadow: var(--yp-shadow); display: flex; align-items: center; gap: 11px; padding: 11px 13px; color: #e4e5e9; font-size: 12px; animation: slideToast .2s ease; }
@keyframes slideToast { from { transform: translateY(12px); opacity: 0; } }
.yp-toast i { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--yp-accent-soft); color: #ffad84; font-style: normal; font-weight: 900; }
.yp-toast button { margin-left: auto; border: 0; background: transparent; color: var(--yp-muted); cursor: pointer; font-size: 18px; }
.yp-error-card { width: min(520px,calc(100% - 40px)); margin: auto; padding: 24px; border: 1px solid rgba(239,103,103,.28); border-radius: var(--yp-radius); background: rgba(239,103,103,.06); text-align: center; }
.yp-error-card h1 { margin: 0 0 8px; font-size: 24px; }
.yp-error-card p { color: #d5aaaa; line-height: 1.6; }

.yp-sidebar-scrim { display: none; }

@media (max-width: 1100px) {
  :root { --yp-list: 340px; }
  .yp-mail-search { max-width: 430px; }
}

@media (max-width: 850px) {
  body { overflow: auto; }
  .yp-mail-shell { min-height: 100vh; height: auto; grid-template-columns: 1fr; }
  .yp-mail-sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px,86vw); z-index: 60; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 24px 0 70px rgba(0,0,0,.45); }
  .yp-mail-sidebar.is-open { transform: translateX(0); }
  .yp-sidebar-scrim { display: block; position: fixed; inset: 0; border: 0; background: rgba(0,0,0,.58); z-index: 55; }
  .yp-mobile-menu { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--yp-border); border-radius: 11px; background: var(--yp-panel); color: #fff; cursor: pointer; }
  .yp-mail-topbar { position: sticky; top: 0; z-index: 20; flex-wrap: wrap; padding: 12px 14px; }
  .yp-mail-heading { flex: 1; }
  .yp-mail-search { order: 4; max-width: none; flex-basis: 100%; }
  .yp-mail-workspace { grid-template-columns: minmax(0,1fr); min-height: 660px; }
  .yp-message-list { border-right: 0; border-bottom: 1px solid var(--yp-border); min-height: 330px; }
  .yp-reading-pane { min-height: 430px; }
}

@media (max-width: 540px) {
  .yp-mail-topbar { min-height: 72px; }
  .yp-mail-heading h1 { font-size: 20px; }
  .yp-topbar-actions .yp-button.secondary { display: none; }
  .yp-reading-pane { padding: 26px 20px; }
  .yp-reader-empty h2 { font-size: 25px; }
  .yp-compose-panel { width: 100%; max-height: 92vh; margin: 0; border-radius: 18px 18px 0 0; }
  .yp-compose-footer { flex-wrap: wrap; }
  .yp-compose-footer .yp-compose-info { flex-basis: 100%; order: 3; }
}

.yp-session-chip{display:flex;flex-direction:column;max-width:210px;padding:7px 11px;border:1px solid var(--line);border-radius:12px;background:var(--panel);line-height:1.15}.yp-session-chip b{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.yp-session-chip small{font-size:10px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.yp-topbar-actions a{text-decoration:none}


/* M5.1 account route: collapsed YouPilot rail and explicit sender identity */
.yp-mail-route-shell { height: 100vh; min-height: 620px; display: grid; grid-template-columns: minmax(0,1fr); }
.yp-mail-route-shell.has-account-rail { grid-template-columns: 66px minmax(0,1fr); }
.yp-account-rail { height: 100vh; border-right: 1px solid var(--yp-border); background: #090a0c; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 16px 10px; }
.yp-account-rail > a, .yp-account-rail > span { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 12px; color: var(--yp-muted); font-size: 15px; }
.yp-account-rail > a:hover { color: #fff; background: rgba(255,255,255,.04); }
.yp-account-rail .yp-account-rail-brand { margin-bottom: 14px; background: #f6f6f7; color: #101114; font-weight: 950; }
.yp-account-rail .yp-account-rail-current { color: #fff; background: var(--yp-accent-soft); border-color: rgba(254,97,19,.3); box-shadow: inset 3px 0 0 var(--yp-accent); }
.yp-compose-sender { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-size: 12px; font-weight: 760; }
@media (max-width: 850px) {
  .yp-mail-route-shell.has-account-rail { grid-template-columns: 1fr; }
  .yp-account-rail { display: none; }
}

/* M6 — the same collapsible YouPilot sidebar in Mail */
:root { --yp-sidebar: 264px; --yp-sidebar-collapsed: 78px; }
.yp-mail-route-shell { height: 100vh; min-height: 620px; display: grid; grid-template-columns: var(--yp-sidebar) minmax(0,1fr); transition: grid-template-columns .2s ease; }
.yp-mail-route-shell.is-sidebar-collapsed { grid-template-columns: var(--yp-sidebar-collapsed) minmax(0,1fr); }
.yp-sidebar { position: relative; min-width: 0; height: 100vh; border-right: 1px solid var(--yp-border); background: #090a0c; display: flex; flex-direction: column; padding: 22px 17px 14px; z-index: 30; overflow-x: hidden; overflow-y: auto; transition: width .2s ease, padding .2s ease, transform .22s ease; }
.yp-sidebar-top { min-height: 54px; padding: 0 7px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.yp-sidebar .yp-brand { padding: 0; }
.yp-sidebar-collapse-toggle { width: 32px; height: 32px; flex: 0 0 auto; border: 1px solid var(--yp-border); border-radius: 10px; background: rgba(255,255,255,.025); color: var(--yp-muted); display: grid; place-items: center; cursor: pointer; font-size: 19px; line-height: 1; }
.yp-sidebar-collapse-toggle:hover,.yp-sidebar-collapse-toggle:focus-visible { color: #fff; border-color: rgba(254,97,19,.45); background: var(--yp-accent-soft); outline: none; }
.yp-sidebar-nav { margin-top: 24px; display: grid; gap: 5px; }
.yp-sidebar-nav a { position: relative; min-height: 44px; display: flex; align-items: center; gap: 13px; border: 1px solid transparent; border-radius: 12px; padding: 0 13px; color: #9fa3af; font-size: 14px; }
.yp-sidebar-nav a > span { width: 18px; text-align: center; font-size: 15px; }
.yp-sidebar-nav a strong { font-weight: 720; }
.yp-sidebar-nav a:hover { background: rgba(255,255,255,.035); color: #fff; }
.yp-sidebar-nav a.is-active,.yp-sidebar-nav a[aria-current="page"] { color: #fff; background: var(--yp-accent-soft); border-color: rgba(254,97,19,.3); box-shadow: inset 3px 0 0 var(--yp-accent); }
.yp-sidebar-nav a em { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--yp-accent); color: #210b02; display: grid; place-items: center; font-size: 9px; font-style: normal; font-weight: 900; }
.yp-mailbox-divider { margin: 20px 7px 9px; border-top: 1px solid var(--yp-border); padding-top: 13px; }
.yp-mailbox-divider span { color: #6f7380; font-size: 8px; font-weight: 850; letter-spacing: .16em; }
.yp-compose-button { margin: 0 0 12px; }
.yp-folder-nav { display: grid; gap: 4px; }
.yp-sidebar-account { margin-top: 12px; border: 1px solid var(--yp-border); border-radius: 16px; background: linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.018)); overflow: hidden; flex: 0 0 auto; }
.yp-sidebar-account-trigger { width: 100%; min-height: 64px; padding: 9px 10px; border: 0; background: transparent; color: #fff; display: grid; grid-template-columns: 40px minmax(0,1fr) auto auto; gap: 9px; align-items: center; cursor: pointer; text-align: left; }
.yp-sidebar-account-trigger:hover { background: rgba(255,255,255,.035); }
.yp-avatar { width: 40px; height: 40px; border-radius: 13px; object-fit: cover; display: grid; place-items: center; }
.yp-avatar-fallback { background: rgba(255,255,255,.07); color: #fff; font-size: 12px; font-weight: 900; }
.yp-sidebar-account-trigger > span { min-width: 0; display: grid; }
.yp-sidebar-account-trigger strong,.yp-sidebar-account-trigger small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yp-sidebar-account-trigger strong { font-size: 12px; }
.yp-sidebar-account-trigger small { margin-top: 2px; color: var(--yp-muted); font-size: 10px; }
.yp-sidebar-account-trigger > em { min-width: 22px; height: 22px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--yp-accent); color: #210b02; font-size: 10px; font-style: normal; font-weight: 900; }
.yp-sidebar-account-trigger > i { color: var(--yp-muted); font-style: normal; }
.yp-sidebar-account-panel { padding: 0 10px 10px; display: grid; gap: 10px; border-top: 1px solid var(--yp-border); }
.yp-sidebar-storage { display: grid; gap: 7px; margin-top: 10px; padding: 10px; border: 1px solid var(--yp-border); border-radius: 11px; background: rgba(255,255,255,.022); }
.yp-sidebar-storage > div:first-child { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.yp-sidebar-storage span { color: #777c88; font-size: 8px; font-weight: 850; letter-spacing: .12em; }
.yp-sidebar-storage strong { color: #e6e7eb; font-size: 10px; white-space: nowrap; }
.yp-sidebar-storage small { color: var(--yp-muted); font-size: 9px; }
.yp-sidebar-storage-track,.yp-sidebar-storage-mini { height: 6px; border: 1px solid var(--yp-border); border-radius: 999px; background: rgba(255,255,255,.035); overflow: hidden; }
.yp-sidebar-storage-track i,.yp-sidebar-storage-mini i { display: block; height: 100%; min-width: 0; border-radius: inherit; background: linear-gradient(90deg,var(--yp-accent),#ff8a4d); }
.yp-sidebar-storage-mini { width: 42px; height: 5px; margin: 0 auto 9px; }
.yp-sidebar-account-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
.yp-sidebar-account-actions a { position: relative; min-height: 52px; padding: 7px 5px; border-radius: 8px; background: rgba(255,255,255,.035); color: #cfd1d7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; font-weight: 750; text-align: center; }
.yp-sidebar-account-actions a:hover { background: var(--yp-accent-soft); color: #fff; }
.yp-sidebar-account-actions a > span { font-size: 16px; line-height: 1; color: #a9acb5; }
.yp-sidebar-account-actions a > strong { font-size: 9px; line-height: 1.15; }
.yp-sidebar-account-actions b { position: absolute; top: 5px; right: 5px; min-width: 17px; height: 17px; border-radius: 999px; background: var(--yp-accent); color: #210b02; display: inline-flex; align-items: center; justify-content: center; font-size: 8px; }
.yp-sidebar-products { display: grid; gap: 5px; }
.yp-sidebar-products > span { color: #6f7380; font-size: 8px; font-weight: 850; letter-spacing: .16em; padding: 2px 3px; }
.yp-sidebar-products > a,.yp-sidebar-products > div { min-height: 38px; padding: 5px 7px; border-radius: 9px; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 8px; align-items: center; border: 1px solid transparent; }
.yp-sidebar-products > a { color: #e8e9ed; background: rgba(255,255,255,.035); }
.yp-sidebar-products > a:hover { border-color: rgba(254,97,19,.35); background: var(--yp-accent-soft); }
.yp-sidebar-products > div.is-inactive { color: #686b74; background: rgba(255,255,255,.018); }
.yp-product-mini { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.055); font-size: 10px; font-weight: 900; }
.yp-sidebar-products strong { font-size: 11px; }
.yp-sidebar-products small { font-size: 9px; color: var(--yp-muted); }
.yp-sidebar-account-session-actions { display: grid; margin-top: 2px; }
.yp-sidebar-logout { min-height: 36px; border: 0; border-radius: 9px; background: rgba(255,255,255,.035); color: #ffb7a0; cursor: pointer; font-weight: 750; }
.yp-sidebar-logout:hover { background: rgba(254,97,19,.1); }
.yp-sidebar.is-collapsed { padding-left: 11px; padding-right: 11px; }
.yp-sidebar.is-collapsed .yp-sidebar-top { padding: 0; flex-direction: column; justify-content: flex-start; }
.yp-sidebar.is-collapsed .yp-brand { justify-content: center; }
.yp-sidebar.is-collapsed .yp-brand strong,.yp-sidebar.is-collapsed .yp-brand em { display: none; }
.yp-sidebar.is-collapsed .yp-sidebar-nav { margin-top: 18px; }
.yp-sidebar.is-collapsed .yp-sidebar-nav a { width: 50px; min-height: 46px; margin: 0 auto; padding: 0; justify-content: center; gap: 0; }
.yp-sidebar.is-collapsed .yp-sidebar-nav a > span { width: auto; font-size: 16px; }
.yp-sidebar.is-collapsed .yp-sidebar-nav a strong { display: none; }
.yp-sidebar.is-collapsed .yp-sidebar-nav a em { position: absolute; right: 2px; top: 2px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 8px; }
.yp-sidebar.is-collapsed .yp-mailbox-divider { margin-left: 5px; margin-right: 5px; text-align: center; }
.yp-sidebar.is-collapsed .yp-mailbox-divider span { display: none; }
.yp-sidebar.is-collapsed .yp-compose-button { width: 50px; min-height: 46px; margin: 0 auto 12px; padding: 0; justify-content: center; }
.yp-sidebar.is-collapsed .yp-compose-button span { display: none; }
.yp-sidebar.is-collapsed .yp-folder-nav button { width: 50px; min-height: 44px; margin: 0 auto; padding: 0; display: flex; justify-content: center; }
.yp-sidebar.is-collapsed .yp-folder-nav button strong,.yp-sidebar.is-collapsed .yp-folder-nav button em { display: none; }
.yp-sidebar-account.is-sidebar-compact .yp-sidebar-account-trigger { min-height: 58px; padding: 8px 6px; display: flex; justify-content: center; }
.yp-sidebar-account.is-sidebar-compact .yp-sidebar-account-trigger > span,.yp-sidebar-account.is-sidebar-compact .yp-sidebar-account-trigger > em,.yp-sidebar-account.is-sidebar-compact .yp-sidebar-account-trigger > i { display: none; }
.yp-mail-main { min-width: 0; }
.yp-account-rail { display: none !important; }
.yp-compose-sender { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-size: 12px; font-weight: 760; }

@media (max-width: 850px) {
  .yp-mail-route-shell,.yp-mail-route-shell.is-sidebar-collapsed { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
  .yp-sidebar,.yp-sidebar.is-collapsed { position: fixed; inset: 0 auto 0 0; width: min(310px,86vw); height: 100vh; z-index: 60; transform: translateX(-105%); padding: 22px 17px 14px; box-shadow: 24px 0 70px rgba(0,0,0,.45); }
  .yp-sidebar.is-open { transform: translateX(0); }
  .yp-sidebar.is-collapsed .yp-sidebar-top { padding: 0 7px; flex-direction: row; justify-content: space-between; }
  .yp-sidebar.is-collapsed .yp-brand { justify-content: flex-start; }
  .yp-sidebar.is-collapsed .yp-brand strong,.yp-sidebar.is-collapsed .yp-brand em { display: inline; }
  .yp-sidebar.is-collapsed .yp-sidebar-nav { margin-top: 24px; }
  .yp-sidebar.is-collapsed .yp-sidebar-nav a { width: auto; min-height: 44px; margin: 0; padding: 0 13px; justify-content: flex-start; gap: 13px; }
  .yp-sidebar.is-collapsed .yp-sidebar-nav a > span { width: 18px; }
  .yp-sidebar.is-collapsed .yp-sidebar-nav a strong { display: inline; }
  .yp-sidebar.is-collapsed .yp-mailbox-divider { margin: 20px 7px 9px; text-align: left; }
  .yp-sidebar.is-collapsed .yp-mailbox-divider span { display: inline; }
  .yp-sidebar.is-collapsed .yp-compose-button { width: 100%; min-height: 46px; margin: 0 0 12px; padding: 0 17px; justify-content: flex-start; }
  .yp-sidebar.is-collapsed .yp-compose-button span { display: inline; }
  .yp-sidebar.is-collapsed .yp-folder-nav button { width: 100%; min-height: 42px; margin: 0; padding: 0 11px; display: grid; justify-content: stretch; }
  .yp-sidebar.is-collapsed .yp-folder-nav button strong,.yp-sidebar.is-collapsed .yp-folder-nav button em { display: initial; }
  .yp-sidebar-account.is-sidebar-compact .yp-sidebar-account-trigger { min-height: 64px; padding: 9px 10px; display: grid; grid-template-columns: 40px minmax(0,1fr) auto auto; justify-content: stretch; }
  .yp-sidebar-account.is-sidebar-compact .yp-sidebar-account-trigger > span,.yp-sidebar-account.is-sidebar-compact .yp-sidebar-account-trigger > em,.yp-sidebar-account.is-sidebar-compact .yp-sidebar-account-trigger > i { display: grid; }
  .yp-sidebar-storage-mini { display: none; }
}

/* Phase M7: central Mail notification bridge */
.yp-mail-notification-strip{display:flex;align-items:center;gap:12px;margin:14px 18px 0;padding:12px 14px;border:1px solid rgba(254,97,19,.3);background:rgba(254,97,19,.08);border-radius:14px;color:var(--yp-text,#f5f5f6)}
.yp-mail-notification-strip>span{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:rgba(254,97,19,.18);color:#fe6113;font-weight:900}
.yp-mail-notification-strip>div{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.yp-mail-notification-strip strong{font-size:13px}.yp-mail-notification-strip small{color:var(--yp-muted,#8d929b);font-size:12px}
.yp-mail-notification-strip a{color:#fe6113;text-decoration:none;font-size:12px;font-weight:800;white-space:nowrap}
@media(max-width:760px){.yp-mail-notification-strip{margin:10px 10px 0;align-items:flex-start}.yp-mail-notification-strip a{align-self:center}}
