/* =========================================================
   vAvtobyse 2.9.19 — FINAL VISUAL SHELL
   Approved direction: “Автобус в прошлое / мокрый асфальт”.
   This file is intentionally loaded AFTER the legacy stylesheet.
   It owns shell geometry/chrome; business logic remains untouched.
   ========================================================= */

:root{
  --vav-gold:#e4b84f;
  --vav-gold-soft:#f0cc73;
  --vav-asphalt-0:#20282c;
  --vav-asphalt-1:#273136;
  --vav-asphalt-2:#2f393e;
  --vav-asphalt-3:#394449;
  --vav-line:#5c5d57;
  --vav-text:#eee6d7;
  --vav-muted:#aaa393;
}

/* Flagship theme — no pure black, no white legacy surfaces. */
html[data-theme="bus-past"]{
  --th-body:
    radial-gradient(circle at 50% -12%,rgba(228,184,79,.13),transparent 34%),
    linear-gradient(145deg,#303a40 0%,#273137 52%,#20282c 100%)!important;
  --th-panel:#293236!important;
  --th-panel-alt:#313b40!important;
  --th-panel-strong:#3a454a!important;
  --th-title-a:#3a4549!important;
  --th-title-b:#2a3337!important;
  --th-title-text:#f4ead7!important;
  --th-text:#eee6d7!important;
  --th-muted:#aaa393!important;
  --th-accent:#e4b84f!important;
  --th-accent-2:#cfa23e!important;
  --th-border:#5b5e5a!important;
  --th-input:#222b2f!important;
  --th-chat:#252e32!important;
  --th-message:#374146!important;
  --th-message-mine:#5d4d2b!important;
  --th-hover:#384348!important;
  --th-selected:#50462f!important;
  --th-button-a:#40494d!important;
  --th-button-b:#31393d!important;
  --th-primary-a:#f0cc73!important;
  --th-primary-b:#d3a43b!important;
  --th-primary-text:#292216!important;
  --th-shadow:0 16px 48px rgba(5,9,11,.38)!important;
}

html[data-theme] body{
  background:var(--th-body)!important;
  font-family:Inter,"Segoe UI",Tahoma,Arial,sans-serif!important;
}

/* Desktop shell */
html[data-theme] body.vav-shell-mode .app,
html[data-theme] .app{
  background:var(--th-body)!important;
}
@media(min-width:821px){
  html[data-theme] .app{
    width:min(1500px,calc(100vw - 32px))!important;
    height:min(920px,calc(100dvh - 32px))!important;
    margin:16px auto!important;
    padding:0!important;
    gap:12px!important;
    grid-template-columns:390px minmax(0,1fr)!important;
    border-radius:22px!important;
    overflow:hidden!important;
    background:rgba(23,29,32,.42)!important;
    box-shadow:0 28px 80px rgba(0,0,0,.38)!important;
  }
  html[data-theme] .contacts-window,
  html[data-theme] .chat-window{
    height:100%!important;
    min-height:0!important;
    border:1px solid color-mix(in srgb,var(--th-border) 72%,transparent)!important;
    border-radius:18px!important;
    overflow:hidden!important;
    background:var(--th-panel)!important;
    box-shadow:0 14px 38px rgba(0,0,0,.22)!important;
  }
  html[data-theme] .contacts-window{margin-left:0!important}
  html[data-theme] .chat-window{margin-right:0!important}
  html[data-theme] .action-toolbar{
    padding:8px!important;
    min-height:52px!important;
    gap:6px!important;
    border:0!important;
    border-bottom:1px solid var(--th-border)!important;
    background:var(--th-panel)!important;
  }
  html[data-theme] .action-toolbar .action-button{
    min-width:0!important;
    height:36px!important;
    padding:0 9px!important;
    border:1px solid transparent!important;
    border-radius:10px!important;
    background:transparent!important;
    color:var(--th-muted)!important;
    box-shadow:none!important;
  }
  html[data-theme] .action-toolbar .action-button:hover{
    border-color:var(--th-border)!important;
    background:var(--th-hover)!important;
    color:var(--th-text)!important;
  }
  html[data-theme] .profile-card,
  html[data-theme] .id-search-box{
    margin:8px!important;
    border:1px solid color-mix(in srgb,var(--th-border) 70%,transparent)!important;
    border-radius:14px!important;
    background:var(--th-panel-alt)!important;
    box-shadow:none!important;
  }
}

/* Unified branded title bars. */
html[data-theme] .app-titlebar{
  min-height:62px!important;
  padding:8px 12px!important;
  border:0!important;
  border-bottom:1px solid color-mix(in srgb,var(--th-accent) 26%,var(--th-border))!important;
  background:
    linear-gradient(90deg,rgba(228,184,79,.07),transparent 32%),
    linear-gradient(180deg,var(--th-title-a),var(--th-title-b))!important;
  color:var(--th-title-text)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.035)!important;
}
html[data-theme] .app-titlebar .qip-logo{
  display:inline-grid!important;
  place-items:center!important;
  min-width:38px!important;
  height:38px!important;
  padding:0 6px!important;
  border:1px solid color-mix(in srgb,var(--th-accent) 58%,var(--th-border))!important;
  border-radius:10px!important;
  background:rgba(10,14,16,.24)!important;
  color:var(--th-accent)!important;
  font:900 14px/1 Tahoma,sans-serif!important;
  text-shadow:none!important;
  box-shadow:none!important;
}
html[data-theme="bus-past"] .desktop-app-name{
  color:#f2e8d5!important;
  font-weight:800!important;
  letter-spacing:.02em!important;
}
html[data-theme="bus-past"] .desktop-app-name::after{
  content:"  ·  Автобус в прошлое";
  color:#a99f8c;
  font-weight:500;
  font-size:10px;
}
html[data-theme] .version-mark{opacity:.48!important;font-weight:500!important}

/* Sidebar tabs/list */
html[data-theme] .list-heading{
  min-height:48px!important;
  padding:6px 8px!important;
  border:0!important;
  border-bottom:1px solid var(--th-border)!important;
  background:var(--th-panel)!important;
}
html[data-theme] .sidebar-tabs{
  padding:3px!important;
  border:1px solid var(--th-border)!important;
  border-radius:11px!important;
  background:var(--th-input)!important;
}
html[data-theme] .sidebar-tab{
  min-height:34px!important;
  border:0!important;
  border-radius:8px!important;
  background:transparent!important;
  color:var(--th-muted)!important;
  box-shadow:none!important;
}
html[data-theme] .sidebar-tab.active{
  background:color-mix(in srgb,var(--th-accent) 18%,var(--th-panel-alt))!important;
  color:var(--th-text)!important;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--th-accent) 45%,transparent)!important;
}
html[data-theme] .conversation-list{
  padding:7px!important;
  background:var(--th-panel)!important;
}
html[data-theme] .conversation-item{
  min-height:72px!important;
  grid-template-columns:52px minmax(0,1fr) auto!important;
  gap:10px!important;
  margin:0 0 6px!important;
  padding:9px 9px!important;
  border:1px solid transparent!important;
  border-radius:14px!important;
  background:transparent!important;
  color:var(--th-text)!important;
  outline:0!important;
  box-shadow:none!important;
}
html[data-theme] .conversation-item:hover{
  background:var(--th-hover)!important;
  border-color:color-mix(in srgb,var(--th-border) 72%,transparent)!important;
}
html[data-theme] .conversation-item.selected{
  background:linear-gradient(90deg,color-mix(in srgb,var(--th-accent) 18%,var(--th-panel-alt)),color-mix(in srgb,var(--th-accent) 5%,var(--th-panel)))!important;
  border-color:color-mix(in srgb,var(--th-accent) 48%,var(--th-border))!important;
  box-shadow:inset 3px 0 0 var(--th-accent)!important;
}
html[data-theme] .conversation-avatar-shell,
html[data-theme] .conversation-avatar-shell>.avatar{
  width:48px!important;height:48px!important;
}
html[data-theme] .conversation-avatar-shell>.avatar{
  border:1px solid color-mix(in srgb,var(--th-border) 78%,transparent)!important;
  border-radius:13px!important;
  box-shadow:0 5px 14px rgba(0,0,0,.18)!important;
}
html[data-theme] .conversation-title{
  color:var(--th-text)!important;
  font:800 14px/18px Inter,"Segoe UI",Tahoma,sans-serif!important;
}
html[data-theme] .conversation-preview{
  margin-top:4px!important;
  color:var(--th-muted)!important;
  font:400 12px/17px Inter,"Segoe UI",Tahoma,sans-serif!important;
}
html[data-theme] .conversation-list-time{
  color:var(--th-muted)!important;
  font:500 10px/15px Inter,"Segoe UI",Tahoma,sans-serif!important;
}
html[data-theme] .conversation-trailing{min-width:27px!important;gap:4px!important}
html[data-theme] .conversation-pin-button{
  width:27px!important;height:27px!important;min-width:27px!important;
  padding:0!important;border:0!important;border-radius:8px!important;
  background:transparent!important;box-shadow:none!important;color:var(--th-muted)!important;
  opacity:.55!important;font-size:13px!important;
}
html[data-theme] .conversation-pin-button:hover,
html[data-theme] .conversation-pin-button.active{background:var(--th-hover)!important;opacity:1!important}

/* Status buses are an accent, not a billboard. */
html[data-theme] .conversation-bus-presence{display:inline-flex!important;transform:none!important}
html[data-theme] .conversation-bus-presence .bus-presence,
html[data-theme] .conversation-bus-presence .status-bus-c-image{
  width:23px!important;height:25px!important;flex-basis:23px!important;border-radius:5px!important;
  box-shadow:0 2px 6px rgba(0,0,0,.25)!important;
}
html[data-theme] .chat-title-line .bus-presence,
html[data-theme] .chat-title-line .status-bus-c-image{
  width:26px!important;height:29px!important;flex-basis:26px!important;border-radius:5px!important;
}

/* Chat surface */
html[data-theme] .chat-header{
  min-height:68px!important;
  padding:9px 12px!important;
  border:0!important;
  border-bottom:1px solid var(--th-border)!important;
  background:
    linear-gradient(90deg,color-mix(in srgb,var(--th-accent) 7%,transparent),transparent 40%),
    linear-gradient(180deg,var(--th-panel-alt),var(--th-panel))!important;
}
html[data-theme] .chat-title{font-size:15px!important;font-weight:800!important;color:var(--th-text)!important}
html[data-theme] .chat-subtitle{color:var(--th-muted)!important}
html[data-theme] .message-list{
  background:
    radial-gradient(circle at 82% 10%,color-mix(in srgb,var(--th-accent) 7%,transparent),transparent 25%),
    linear-gradient(180deg,var(--th-chat),color-mix(in srgb,var(--th-chat) 92%,#000))!important;
}
html[data-theme] .message-list::after{
  content:"";
  position:absolute;inset:0;pointer-events:none;opacity:.16;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.012) 1px,transparent 1px);
  background-size:28px 28px;
}
html[data-theme] .message-row{position:relative;z-index:1}
html[data-theme] .message-bubble{
  border-radius:14px 14px 14px 5px!important;
  box-shadow:0 5px 16px rgba(0,0,0,.12)!important;
}
html[data-theme] .message-row.mine .message-bubble{border-radius:14px 14px 5px 14px!important}
html[data-theme="bus-past"] .message-bubble{
  background:#374146!important;border-color:#4e595d!important;color:#eee6d7!important;
}
html[data-theme="bus-past"] .message-row.mine .message-bubble{
  background:linear-gradient(145deg,#65542f,#55492f)!important;border-color:#8b743d!important;color:#f6ecd7!important;
}

/* Composer */
html[data-theme] .composer{
  border-top:1px solid var(--th-border)!important;
  background:linear-gradient(180deg,var(--th-panel),color-mix(in srgb,var(--th-panel) 94%,#000))!important;
}
html[data-theme] .composer-input-shell{
  border:1px solid var(--th-border)!important;
  background:var(--th-input)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.025)!important;
}
html[data-theme] .send-button{
  border-color:color-mix(in srgb,var(--th-accent) 72%,var(--th-border))!important;
  background:linear-gradient(180deg,var(--th-primary-a),var(--th-primary-b))!important;
  color:var(--th-primary-text)!important;
}

/* Bottom nav */
html[data-theme] .mobile-bottom-nav{
  border:0!important;
  border-top:1px solid color-mix(in srgb,var(--th-accent) 25%,var(--th-border))!important;
  background:color-mix(in srgb,var(--th-panel) 97%,#000)!important;
  box-shadow:0 -10px 28px rgba(0,0,0,.26)!important;
}
html[data-theme] .mobile-nav-button{
  border:0!important;border-radius:10px!important;background:transparent!important;
  color:var(--th-muted)!important;box-shadow:none!important;
}
html[data-theme] .mobile-nav-button img{filter:var(--th-icon-filter)!important}
html[data-theme] .mobile-nav-button.active{
  color:var(--th-text)!important;
  background:color-mix(in srgb,var(--th-accent) 16%,var(--th-panel-alt))!important;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--th-accent) 40%,transparent)!important;
}

/* Flagship-specific atmosphere */
html[data-theme="bus-past"] .contacts-window,
html[data-theme="bus-past"] .chat-window{
  background:linear-gradient(180deg,#2d373b,#283136)!important;
}
html[data-theme="bus-past"] .conversation-list{
  background:linear-gradient(180deg,#2c3539,#273034)!important;
}
html[data-theme="bus-past"] .conversation-item.has-unread{
  background:linear-gradient(90deg,rgba(228,184,79,.12),rgba(228,184,79,.035))!important;
}
html[data-theme="bus-past"] .unread-envelope-badge,
html[data-theme="bus-past"] .app-unread-envelope{
  border-color:#9b7f3d!important;background:#e4b84f!important;color:#282116!important;
}

/* Other five themes: same shell, palette/chrome only. */
html[data-theme="classic-qip"] .app-titlebar{background:linear-gradient(180deg,#d7ecff,#9bc5eb)!important}
html[data-theme="win98"] .app-titlebar,
html[data-theme="win98"] .contacts-window,
html[data-theme="win98"] .chat-window,
html[data-theme="win98"] .conversation-item,
html[data-theme="win98"] .sidebar-tabs,
html[data-theme="win98"] .sidebar-tab,
html[data-theme="win98"] .mobile-nav-button{border-radius:0!important}
html[data-theme="light-retro"] .message-list::after{opacity:.06}
html[data-theme="dark-retro"] .message-list::after{opacity:.10}
html[data-theme="lsd-trail"] .app{filter:drop-shadow(-2px 0 rgba(0,229,255,.08)) drop-shadow(2px 0 rgba(255,31,209,.08))}

/* MOBILE — this is the visible app, not a shrunken desktop legacy window. */
@media(max-width:820px){
  html[data-theme],html[data-theme] body{background:var(--th-panel)!important}
  html[data-theme] body.vav-shell-mode{background:var(--th-panel)!important}
  html[data-theme] .app{
    width:100%!important;height:100dvh!important;min-height:100dvh!important;margin:0!important;padding:0!important;
    border:0!important;border-radius:0!important;background:var(--th-panel)!important;box-shadow:none!important;
  }
  html[data-theme] .contacts-window,
  html[data-theme] .chat-window{
    width:100%!important;height:100%!important;min-height:0!important;margin:0!important;
    border:0!important;border-radius:0!important;background:var(--th-panel)!important;box-shadow:none!important;
  }

  /* Main chats title: premium, compact, branded. */
  html[data-theme] .contacts-window>.app-titlebar{
    min-height:66px!important;
    padding:8px 14px 8px max(12px,env(safe-area-inset-left))!important;
  }
  html[data-theme] .mobile-account-button{
    width:44px!important;height:44px!important;padding:0!important;
    border:1px solid color-mix(in srgb,var(--th-accent) 42%,var(--th-border))!important;
    border-radius:13px!important;background:var(--th-input)!important;box-shadow:none!important;
  }
  html[data-theme] .mobile-account-button .avatar{
    width:40px!important;height:40px!important;border-radius:11px!important;border:0!important;
  }
  html[data-theme] .contacts-window>.app-titlebar .qip-logo{
    display:none!important;
  }
  html[data-theme] .mobile-sidebar-title{
    display:flex!important;align-items:center!important;gap:8px!important;
    color:var(--th-title-text)!important;font:800 22px/1.15 Inter,"Segoe UI",sans-serif!important;
    letter-spacing:-.02em!important;
  }
  html[data-theme="bus-past"] .mobile-sidebar-title::before{
    content:"vA";
    display:grid;place-items:center;width:30px;height:30px;
    border:1px solid rgba(228,184,79,.54);border-radius:9px;
    color:#e4b84f;background:#222a2e;font:900 11px/1 Tahoma,sans-serif;
  }
  html[data-theme] .mobile-header-new-chat{
    width:42px!important;height:42px!important;border:1px solid var(--th-border)!important;border-radius:12px!important;
    background:var(--th-button-a)!important;box-shadow:none!important;
  }
  html[data-theme] .mobile-header-new-chat img{width:22px!important;height:22px!important;filter:var(--th-icon-filter)!important}

  html[data-theme] .action-toolbar,
  html[data-theme] .profile-card,
  html[data-theme] .id-search-box,
  html[data-theme] .statusbar{display:none!important}
  html[data-theme] .list-heading{display:none!important}

  html[data-theme] .conversation-list{
    padding:8px 8px calc(78px + env(safe-area-inset-bottom))!important;
    background:linear-gradient(180deg,var(--th-panel),color-mix(in srgb,var(--th-panel) 95%,#000))!important;
  }
  html[data-theme] .conversation-item{
    min-height:74px!important;
    grid-template-columns:52px minmax(0,1fr) 28px!important;
    gap:10px!important;margin:0 0 6px!important;padding:9px 8px!important;
    border-radius:14px!important;
  }
  html[data-theme] .conversation-avatar-shell,
  html[data-theme] .conversation-avatar-shell>.avatar{width:50px!important;height:50px!important}
  html[data-theme] .conversation-avatar-shell>.avatar{border-radius:14px!important}
  html[data-theme] .conversation-title-row{gap:5px!important}
  html[data-theme] .conversation-title{font-size:15px!important;line-height:19px!important}
  html[data-theme] .conversation-preview{font-size:12px!important;line-height:17px!important;margin-top:4px!important}
  html[data-theme] .conversation-list-time{font-size:10px!important;line-height:14px!important}
  html[data-theme] .conversation-bus-presence .bus-presence,
  html[data-theme] .conversation-bus-presence .status-bus-c-image{
    width:20px!important;height:22px!important;flex-basis:20px!important;border-radius:4px!important;
  }
  html[data-theme] .conversation-pin-button{
    width:27px!important;height:27px!important;min-width:27px!important;
    border:0!important;border-radius:8px!important;background:transparent!important;opacity:.42!important;
  }
  html[data-theme] .conversation-pin-button.active{background:color-mix(in srgb,var(--th-accent) 13%,transparent)!important;opacity:.95!important}

  html[data-theme] .mobile-bottom-nav{
    left:7px!important;right:7px!important;bottom:max(6px,env(safe-area-inset-bottom))!important;
    width:auto!important;height:62px!important;min-height:62px!important;padding:5px!important;gap:4px!important;
    border:1px solid color-mix(in srgb,var(--th-border) 85%,transparent)!important;border-radius:17px!important;
    background:color-mix(in srgb,var(--th-panel) 96%,#000)!important;
    backdrop-filter:blur(14px)!important;
  }
  html[data-theme] .mobile-nav-button{
    min-width:0!important;min-height:50px!important;padding:5px 3px!important;gap:3px!important;border-radius:12px!important;
    font-size:10px!important;
  }
  html[data-theme] .mobile-nav-button img{width:21px!important;height:21px!important}

  /* Open chat */
  html[data-theme] .chat-window>.app-titlebar{display:none!important}
  html[data-theme] .chat-header{
    min-height:64px!important;padding:7px 8px!important;
    grid-template-columns:40px 42px minmax(0,1fr) 38px!important;gap:7px!important;
    background:linear-gradient(180deg,var(--th-panel-alt),var(--th-panel))!important;
  }
  html[data-theme] .mobile-back-button,
  html[data-theme] .chat-info-button{
    width:38px!important;height:38px!important;padding:8px!important;border-radius:11px!important;
  }
  html[data-theme] .chat-info-button .chat-info-text{display:none!important}
  html[data-theme] .chat-header .avatar-large{width:40px!important;height:40px!important;border-radius:12px!important}
  html[data-theme] .chat-title{font-size:14px!important;line-height:18px!important}
  html[data-theme] .chat-subtitle{font-size:10px!important;line-height:14px!important}
  html[data-theme] .message-list{padding:12px 9px 16px!important}
  html[data-theme] .message-row{grid-template-columns:26px minmax(0,1fr)!important;gap:6px!important;margin-bottom:10px!important}
  html[data-theme] .message-row .avatar{width:26px!important;height:26px!important;border-radius:8px!important}
  html[data-theme] .message-bubble{max-width:92%!important;padding:9px 10px!important;font-size:13px!important;line-height:1.42!important}
  html[data-theme] .composer{padding-bottom:0!important}
  html[data-theme] .composer-recipient{display:none!important}
  html[data-theme] .composer-row{
    padding:7px max(7px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) max(7px,env(safe-area-inset-left))!important;
    gap:7px!important;
  }
  html[data-theme] .composer-input-shell{border-radius:20px!important}
  html[data-theme] .composer textarea{min-height:46px!important;max-height:118px!important;padding:12px 42px!important;font-size:16px!important}
  html[data-theme] .send-button,
  html[data-theme] .mobile-voice-button{width:46px!important;min-width:46px!important;height:46px!important;min-height:46px!important;border-radius:50%!important}
}

@media(max-width:380px){
  html[data-theme] .conversation-list{padding-left:5px!important;padding-right:5px!important}
  html[data-theme] .conversation-item{grid-template-columns:46px minmax(0,1fr) 26px!important;gap:8px!important;padding:8px 6px!important}
  html[data-theme] .conversation-avatar-shell,
  html[data-theme] .conversation-avatar-shell>.avatar{width:44px!important;height:44px!important}
  html[data-theme] .mobile-sidebar-title{font-size:20px!important}
}

/* =========================================================
   vAvtobyse VISUAL-ONLY A — 2026-08-07
   Base: functional 2.9.19 after rollback from broken 2.9.20.
   IMPORTANT: CSS ONLY. No JS/HTML/SW/config changes.
   Live-screen corrections from phone screenshots.
   ========================================================= */

html[data-theme="bus-past"]{
  --va-bg:#2b3338;
  --va-bg-deep:#242c31;
  --va-panel:#323b40;
  --va-panel-soft:#394349;
  --va-panel-raised:#414b51;
  --va-line:#59646a;
  --va-line-soft:#465157;
  --va-gold:#e3b84b;
  --va-gold-bright:#f0c85b;
  --va-gold-deep:#9f7f31;
  --va-text:#f1eee6;
  --va-text-soft:#d7d2c7;
  --va-muted:#aaa9a4;
  --va-muted-2:#8d9190;
  --va-danger:#e36d64;
  --va-shadow:0 10px 30px rgba(8,12,14,.22);
  --th-body:
    radial-gradient(circle at 52% -10%,rgba(227,184,75,.11),transparent 34%),
    linear-gradient(180deg,#343e44 0%,#2b3338 44%,#242c31 100%)!important;
  --th-panel:var(--va-panel)!important;
  --th-panel-alt:var(--va-panel-soft)!important;
  --th-panel-strong:var(--va-panel-raised)!important;
  --th-title-a:#3c464b!important;
  --th-title-b:#30393e!important;
  --th-title-text:var(--va-text)!important;
  --th-text:var(--va-text)!important;
  --th-muted:var(--va-muted)!important;
  --th-accent:var(--va-gold)!important;
  --th-accent-2:#c69a35!important;
  --th-border:var(--va-line)!important;
  --th-input:#252e33!important;
  --th-chat:#263036!important;
  --th-message:#394349!important;
  --th-message-mine:#5a4c2f!important;
  --th-hover:#3d484e!important;
  --th-selected:#50462f!important;
  --th-button-a:#444e54!important;
  --th-button-b:#343d42!important;
  --th-primary-a:#efca66!important;
  --th-primary-b:#d5a93e!important;
  --th-primary-text:#29241a!important;
  --th-icon-filter:invert(95%) sepia(6%) saturate(343%) hue-rotate(346deg) brightness(100%) contrast(91%)!important;
}

html[data-theme="bus-past"] body,
html[data-theme="bus-past"] body.vav-shell-mode,
html[data-theme="bus-past"] body.vav-document-mode{
  color:var(--va-text)!important;
  background:var(--th-body)!important;
}

html[data-theme="bus-past"] body .button-icon,
html[data-theme="bus-past"] body .inline-icon,
html[data-theme="bus-past"] body .account-action-icon,
html[data-theme="bus-past"] body .mobile-nav-button img,
html[data-theme="bus-past"] body .mobile-back-button img,
html[data-theme="bus-past"] body .chat-info-image,
html[data-theme="bus-past"] body .mobile-header-new-chat img,
html[data-theme="bus-past"] body .mobile-composer-inline img,
html[data-theme="bus-past"] body .send-icon-image{
  filter:var(--th-icon-filter)!important;
  opacity:.94!important;
}

html[data-theme="bus-past"] body .primary img,
html[data-theme="bus-past"] body .send-button img{
  filter:brightness(0) saturate(100%) invert(16%) sepia(18%) saturate(727%) hue-rotate(350deg) brightness(88%) contrast(90%)!important;
}

html[data-theme="bus-past"] body .qip-input,
html[data-theme="bus-past"] body textarea,
html[data-theme="bus-past"] body select,
html[data-theme="bus-past"] body .profile-textarea,
html[data-theme="bus-past"] body .message-edit-input{
  color:var(--va-text)!important;
  background:#252e33!important;
  border:1px solid #606b70!important;
  border-radius:13px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
  outline:0!important;
}
html[data-theme="bus-past"] body .qip-input::placeholder,
html[data-theme="bus-past"] body textarea::placeholder{color:#8f9594!important}
html[data-theme="bus-past"] body .qip-input:focus,
html[data-theme="bus-past"] body textarea:focus,
html[data-theme="bus-past"] body select:focus{
  border-color:var(--va-gold)!important;
  box-shadow:0 0 0 2px rgba(227,184,75,.13)!important;
}

/* Brand chrome: soft graphite, warm bus-yellow, no pure black. */
html[data-theme="bus-past"] .app-titlebar,
html[data-theme="bus-past"] .modal-titlebar{
  background:
    linear-gradient(90deg,rgba(227,184,75,.055),transparent 42%),
    linear-gradient(180deg,#3c464b,#30393e)!important;
  border-bottom:1px solid rgba(227,184,75,.34)!important;
  color:var(--va-text)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.035),0 4px 16px rgba(7,10,12,.13)!important;
}
html[data-theme="bus-past"] .qip-logo{
  color:var(--va-gold-bright)!important;
  border-color:rgba(227,184,75,.46)!important;
  background:#293136!important;
  box-shadow:inset 0 0 18px rgba(227,184,75,.04)!important;
}

html[data-theme="bus-past"] body .secondary,
html[data-theme="bus-past"] body .tool-button,
html[data-theme="bus-past"] body .title-button{
  color:var(--va-text-soft)!important;
  background:linear-gradient(180deg,#465158,#364046)!important;
  border:1px solid #616b70!important;
  box-shadow:none!important;
  text-shadow:none!important;
}
html[data-theme="bus-past"] body .secondary:hover,
html[data-theme="bus-past"] body .tool-button:hover,
html[data-theme="bus-past"] body .title-button:hover{
  background:#4a555b!important;
  border-color:#737b7e!important;
  color:#fffdf7!important;
}
html[data-theme="bus-past"] body .primary,
html[data-theme="bus-past"] body .send-button{
  color:#2b2518!important;
  background:linear-gradient(180deg,#f2cf6b,#d5a63b)!important;
  border:1px solid #c99a31!important;
  box-shadow:inset 0 1px rgba(255,255,255,.34),0 3px 9px rgba(0,0,0,.13)!important;
  text-shadow:none!important;
}

/* ---------- MOBILE: one coherent shell ---------- */
@media(max-width:820px){
  html.vav-mobile-layout[data-theme="bus-past"],
  html.vav-mobile-layout[data-theme="bus-past"] body,
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode,
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .app{
    background:linear-gradient(180deg,#30393e,#273036)!important;
  }

  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .contacts-window,
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .chat-window{
    background:linear-gradient(180deg,#30393e 0%,#273036 100%)!important;
  }

  /* Main list header */
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .contacts-window>.app-titlebar{
    min-height:68px!important;height:68px!important;
    padding:8px 14px!important;gap:10px!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .mobile-account-button{
    width:48px!important;height:48px!important;min-width:48px!important;
    padding:2px!important;border:1px solid rgba(227,184,75,.48)!important;
    border-radius:14px!important;background:#30383d!important;
    box-shadow:0 5px 14px rgba(8,11,13,.18)!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .mobile-account-button .avatar{
    width:42px!important;height:42px!important;border-radius:11px!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .mobile-sidebar-title{
    display:flex!important;align-items:center!important;gap:11px!important;
    color:var(--va-text)!important;font:800 23px/1.05 "Segoe UI",Arial,sans-serif!important;
    letter-spacing:-.025em!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .mobile-sidebar-title::before{
    content:""!important;display:block!important;width:38px!important;height:38px!important;flex:0 0 38px!important;
    background:url("brand/vavtobyse-bus-icon-master.png") center/78% no-repeat,#262e33!important;
    border:1px solid rgba(227,184,75,.5)!important;border-radius:11px!important;
    box-shadow:0 4px 12px rgba(0,0,0,.2),inset 0 0 12px rgba(227,184,75,.035)!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .mobile-header-new-chat{
    width:46px!important;height:46px!important;min-width:46px!important;border-radius:14px!important;
    background:#394248!important;border:1px solid #5d676c!important;
  }

  /* Chat/contact cards */
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList{
    padding:10px 10px calc(82px + env(safe-area-inset-bottom))!important;
    background:
      radial-gradient(circle at 50% 0,rgba(227,184,75,.045),transparent 24%),
      linear-gradient(180deg,#2d363b,#273036)!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .conversation-section-label{
    color:#c3beb1!important;background:transparent!important;padding:5px 6px!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .conversation-item{
    min-height:74px!important;grid-template-columns:52px minmax(0,1fr) auto!important;gap:10px!important;
    margin:0 0 8px!important;padding:9px 10px!important;
    color:var(--va-text)!important;background:linear-gradient(180deg,#394248,#343d42)!important;
    border:1px solid #4d585d!important;border-radius:16px!important;
    box-shadow:0 5px 14px rgba(8,12,14,.12),inset 0 1px rgba(255,255,255,.018)!important;
    outline:0!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .conversation-item:active{
    background:#414b50!important;border-color:#697176!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .conversation-item.selected{
    background:linear-gradient(90deg,#574b30,#3a4246 74%)!important;
    border-color:#9e8138!important;box-shadow:inset 3px 0 0 var(--va-gold),0 5px 14px rgba(0,0,0,.13)!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .conversation-avatar-shell,
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .conversation-avatar-shell>.avatar{
    width:50px!important;height:50px!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .conversation-avatar-shell>.avatar{
    border-radius:13px!important;border:1px solid #697176!important;box-shadow:0 3px 8px rgba(0,0,0,.13)!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .conversation-title{
    color:var(--va-text)!important;font-size:15px!important;font-weight:800!important;line-height:19px!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .conversation-preview,
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .conversation-list-time,
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .conversation-presence-line{
    color:var(--va-muted)!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .contact-open-icon{color:#c4bfae!important}

  /* Variant C as a status badge, not a picture card. */
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .conversation-bus-presence .bus-presence,
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .conversation-bus-presence .status-bus-c-image{
    width:20px!important;height:22px!important;min-width:20px!important;max-width:20px!important;flex-basis:20px!important;
    border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
    object-fit:contain!important;filter:drop-shadow(0 1px 2px rgba(0,0,0,.42))!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .conversation-pin-button{
    width:26px!important;height:26px!important;min-width:26px!important;background:transparent!important;border:0!important;box-shadow:none!important;
    opacity:.64!important;
  }

  /* Bottom nav = compact instrument panel */
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #mobileBottomNav{
    left:10px!important;right:10px!important;bottom:max(7px,env(safe-area-inset-bottom))!important;
    width:auto!important;height:64px!important;min-height:64px!important;padding:5px!important;gap:4px!important;
    background:rgba(48,57,62,.97)!important;border:1px solid #596368!important;border-radius:19px!important;
    box-shadow:0 10px 30px rgba(0,0,0,.24),inset 0 1px rgba(255,255,255,.025)!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #mobileBottomNav .mobile-nav-button{
    min-width:0!important;border:1px solid transparent!important;border-radius:14px!important;background:transparent!important;
    color:#c6c2b8!important;box-shadow:none!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #mobileBottomNav .mobile-nav-button.active{
    background:linear-gradient(180deg,#5c4f31,#4d432d)!important;border-color:#9d813a!important;color:#fff3d7!important;
    box-shadow:inset 0 0 0 1px rgba(239,202,102,.12)!important;
  }

  /* Open chat header */
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .chat-header{
    min-height:72px!important;padding:8px 12px!important;gap:9px!important;
    background:linear-gradient(180deg,#3b454a,#30393e)!important;border-bottom:1px solid rgba(227,184,75,.28)!important;
    box-shadow:0 4px 16px rgba(0,0,0,.14)!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .mobile-back-button,
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .chat-info-button{
    width:44px!important;height:44px!important;min-width:44px!important;border-radius:14px!important;
    background:#394248!important;border:1px solid #5d676c!important;box-shadow:none!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .chat-header .avatar-large{
    width:48px!important;height:48px!important;border-radius:13px!important;border:1px solid #697176!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .chat-title{color:var(--va-text)!important;font-size:17px!important;font-weight:800!important}
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .chat-subtitle{color:var(--va-muted)!important;font-size:11px!important}
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .chat-title-line .bus-presence,
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .chat-title-line .status-bus-c-image{
    width:22px!important;height:24px!important;min-width:22px!important;max-width:22px!important;flex-basis:22px!important;
    border:0!important;background:transparent!important;box-shadow:none!important;object-fit:contain!important;
    filter:drop-shadow(0 1px 2px rgba(0,0,0,.42))!important;
  }

  /* Chat canvas: wet asphalt texture without a black hole. */
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #messageList{
    padding:14px 10px 18px!important;
    background:
      linear-gradient(rgba(39,48,54,.92),rgba(39,48,54,.96)),
      repeating-linear-gradient(105deg,rgba(255,255,255,.012) 0 1px,transparent 1px 22px)!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .message-row{margin-bottom:11px!important}
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .message-meta{color:var(--va-muted)!important;font-size:10px!important}
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .message-author{color:#d2ae57!important}
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .message-bubble{
    max-width:88%!important;padding:9px 11px!important;border-radius:15px 15px 15px 5px!important;
    color:var(--va-text)!important;background:#3a444a!important;border:1px solid #515c62!important;
    box-shadow:0 3px 9px rgba(0,0,0,.11)!important;line-height:1.4!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .message-row.mine .message-bubble{
    margin-left:auto!important;border-radius:15px 15px 5px 15px!important;
    background:linear-gradient(135deg,#625330,#56492e)!important;border-color:#8e7536!important;color:#fff5df!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .message-time{color:#aaa79f!important}
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .message-row.mine .message-time{color:#c6baa0!important}

  /* Media: prevent giant empty 600px placeholders. */
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .image-message{
    width:auto!important;max-width:min(82vw,430px)!important;max-height:46vh!important;height:auto!important;
    border-radius:14px!important;border:1px solid #626b70!important;background:#313a40!important;
    box-shadow:0 5px 16px rgba(0,0,0,.17)!important;object-fit:contain!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .image-message.lazy-media-pending:not([src]),
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .image-message.lazy-media-pending[src=""]{
    width:min(78vw,360px)!important;height:auto!important;min-height:0!important;aspect-ratio:4/3!important;
    background:
      linear-gradient(110deg,transparent 25%,rgba(255,255,255,.035) 42%,transparent 58%) 0 0/220% 100%,
      #343d42!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .image-message.lazy-media-error{
    width:min(72vw,330px)!important;min-height:84px!important;max-height:150px!important;opacity:.72!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .file-card{
    color:var(--va-text)!important;background:#30393e!important;border:1px solid #566168!important;border-radius:12px!important;
  }

  /* Voice: retro tactile, but part of the same app. */
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .voice-message.voice-player{
    width:min(82vw,360px)!important;min-width:0!important;grid-template-columns:42px minmax(0,1fr) 42px!important;
    gap:8px!important;padding:8px!important;border-radius:14px!important;
    color:var(--va-text)!important;background:#364047!important;border:1px solid #5b666c!important;
    box-shadow:0 4px 12px rgba(0,0,0,.13)!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .voice-play-button,
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .voice-speed-button{
    width:40px!important;height:40px!important;min-width:40px!important;border-radius:11px!important;
    color:#28231a!important;background:linear-gradient(180deg,#efd06d,#d3a53d)!important;border:1px solid #c39534!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .voice-progress{accent-color:var(--va-gold)!important}
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .voice-player-meta,
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .voice-player-time,
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .voice-message-label{color:var(--va-text-soft)!important}

  /* Composer: compact and readable. */
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .composer{
    background:#2f383d!important;border-top:1px solid #4f5b61!important;padding:8px 9px calc(8px + env(safe-area-inset-bottom))!important;
    box-shadow:0 -6px 18px rgba(0,0,0,.12)!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .composer-toolbar{display:none!important}
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .composer-recipient{display:none!important}
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .composer-row{
    display:grid!important;grid-template-columns:minmax(0,1fr) 52px!important;gap:8px!important;padding:0!important;align-items:end!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .composer-input-shell{
    min-height:52px!important;border:1px solid #59656b!important;border-radius:18px!important;background:#252e33!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.02)!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #messageInput{
    min-height:50px!important;max-height:118px!important;margin:0!important;padding:14px 46px 11px 45px!important;
    color:var(--va-text)!important;background:transparent!important;border:0!important;box-shadow:none!important;border-radius:18px!important;
    resize:none!important;font-size:15px!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .mobile-composer-inline{
    width:38px!important;height:38px!important;top:7px!important;border:0!important;background:transparent!important;box-shadow:none!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .mobile-composer-emoji{left:5px!important}
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .mobile-composer-attach{right:5px!important}
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #sendMessageBtn,
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #mobileVoiceBtn{
    width:52px!important;height:52px!important;min-width:52px!important;border-radius:50%!important;
    border:1px solid #c99a31!important;background:linear-gradient(180deg,#f2cf6b,#d8aa3c)!important;
    box-shadow:0 4px 12px rgba(0,0,0,.16),inset 0 1px rgba(255,255,255,.34)!important;
  }

  /* Emoji picker = small floating tray, not a full-screen wall. */
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .emoji-panel{
    left:10px!important;right:10px!important;bottom:calc(72px + env(safe-area-inset-bottom))!important;width:auto!important;
    max-height:min(38vh,300px)!important;padding:8px!important;grid-template-columns:repeat(5,1fr)!important;gap:6px!important;
    background:rgba(48,57,62,.985)!important;border:1px solid #667075!important;border-radius:16px!important;
    box-shadow:0 14px 36px rgba(0,0,0,.32)!important;overscroll-behavior:contain!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .emoji-choice{
    width:auto!important;height:51px!important;padding:3px!important;border:1px solid #505b61!important;border-radius:10px!important;
    background:#394349!important;box-shadow:none!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .emoji-choice .emoji-sprite{width:42px!important;height:42px!important}

  /* Modal screens: same visual language; actions do not cover content. */
  html.vav-mobile-layout[data-theme="bus-past"] .modal-backdrop{background:#273036!important;padding:0!important}
  html.vav-mobile-layout[data-theme="bus-past"] .modal{
    width:100%!important;height:100%!important;max-height:none!important;border:0!important;border-radius:0!important;
    background:linear-gradient(180deg,#30393e,#293237)!important;box-shadow:none!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] .modal .padded,
  html.vav-mobile-layout[data-theme="bus-past"] .new-chat-page{
    color:var(--va-text)!important;background:transparent!important;padding:16px 16px 24px!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] .modal-actions{
    position:static!important;left:auto!important;right:auto!important;bottom:auto!important;
    padding:10px 16px calc(12px + env(safe-area-inset-bottom))!important;gap:10px!important;
    background:#2e373c!important;border-top:1px solid #4d585e!important;box-shadow:none!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] .modal-actions .primary,
  html.vav-mobile-layout[data-theme="bus-past"] .modal-actions .secondary{min-height:50px!important;border-radius:14px!important}

  /* New chat: remove legacy blue/yellow Win98 blocks. */
  html.vav-mobile-layout[data-theme="bus-past"] .new-chat-page{padding-top:18px!important}
  html.vav-mobile-layout[data-theme="bus-past"] .new-chat-hero{
    display:grid!important;grid-template-columns:50px minmax(0,1fr)!important;gap:12px!important;align-items:center!important;
    padding:14px!important;border:1px solid #59646a!important;border-radius:16px!important;
    color:var(--va-text)!important;background:linear-gradient(135deg,#3c464c,#343d42)!important;box-shadow:var(--va-shadow)!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] .new-chat-hero img{
    width:46px!important;height:46px!important;padding:8px!important;border-radius:12px!important;
    filter:var(--th-icon-filter)!important;background:#293136!important;border:1px solid rgba(227,184,75,.42)!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] .new-chat-hero h2{margin:0 0 3px!important;color:#fff6e1!important;font-size:18px!important}
  html.vav-mobile-layout[data-theme="bus-past"] .new-chat-hero p{margin:0!important;color:var(--va-muted)!important;font-size:13px!important;line-height:1.4!important}
  html.vav-mobile-layout[data-theme="bus-past"] .new-chat-search-line{margin:14px 0 10px!important;gap:8px!important}
  html.vav-mobile-layout[data-theme="bus-past"] .new-chat-search-line input{min-height:50px!important}
  html.vav-mobile-layout[data-theme="bus-past"] .new-chat-search-line button{width:50px!important;min-width:50px!important;height:50px!important;border-radius:13px!important}
  html.vav-mobile-layout[data-theme="bus-past"] .new-chat-help{
    margin-top:10px!important;padding:11px 13px!important;border:1px solid rgba(227,184,75,.28)!important;border-radius:13px!important;
    color:#c7c1b4!important;background:rgba(227,184,75,.055)!important;box-shadow:none!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] .new-chat-result,
  html.vav-mobile-layout[data-theme="bus-past"] .search-result{
    color:var(--va-text)!important;background:#343e43!important;border:1px solid #566168!important;border-radius:14px!important;
  }

  /* Profile/account/settings cards */
  html.vav-mobile-layout[data-theme="bus-past"] .account-summary,
  html.vav-mobile-layout[data-theme="bus-past"] .public-profile-head,
  html.vav-mobile-layout[data-theme="bus-past"] .cache-settings-summary,
  html.vav-mobile-layout[data-theme="bus-past"] .cache-persist-line,
  html.vav-mobile-layout[data-theme="bus-past"] .theme-admin-note,
  html.vav-mobile-layout[data-theme="bus-past"] .notice,
  html.vav-mobile-layout[data-theme="bus-past"] .group-invite-box{
    color:var(--va-text)!important;background:#343e43!important;border:1px solid #566168!important;border-radius:16px!important;box-shadow:none!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] .account-action-tile,
  html.vav-mobile-layout[data-theme="bus-past"] .theme-card{
    color:var(--va-text)!important;background:linear-gradient(180deg,#394349,#343d42)!important;border:1px solid #566168!important;
    border-radius:16px!important;box-shadow:none!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] .account-action-tile{min-height:68px!important}
  html.vav-mobile-layout[data-theme="bus-past"] .theme-card small,
  html.vav-mobile-layout[data-theme="bus-past"] .small-muted,
  html.vav-mobile-layout[data-theme="bus-past"] .field-label{color:var(--va-muted)!important}
  html.vav-mobile-layout[data-theme="bus-past"] .theme-card.selected{
    color:var(--va-text)!important;background:linear-gradient(90deg,#55492f,#384146)!important;border-color:#a4863c!important;
    box-shadow:inset 3px 0 0 var(--va-gold)!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] .status-preset{
    min-height:64px!important;color:var(--va-text)!important;background:#364046!important;border:1px solid #566168!important;border-radius:14px!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] .activity-preview{
    color:var(--va-text-soft)!important;background:#333d42!important;border:1px solid #566168!important;border-radius:14px!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] .contact-picker-list{
    color:var(--va-text)!important;background:#2f383d!important;border:1px solid #566168!important;border-radius:14px!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] .contact-picker-row{border-bottom:1px solid #465157!important}
  html.vav-mobile-layout[data-theme="bus-past"] .contact-picker-row:hover,
  html.vav-mobile-layout[data-theme="bus-past"] .contact-picker-row.selected{background:#3d474c!important}

  /* Notifications: no browser-blue controls dominating the theme. */
  html.vav-mobile-layout[data-theme="bus-past"] input[type="range"]{accent-color:var(--va-gold)!important}
  html.vav-mobile-layout[data-theme="bus-past"] input[type="checkbox"]{accent-color:#c69a35!important}
}

/* Desktop inherits the same palette without changing functional DOM. */
@media(min-width:821px){
  html[data-theme="bus-past"] .conversation-list{background:#2b3439!important}
  html[data-theme="bus-past"] .conversation-item{background:#343e43!important;border-color:#465158!important}
  html[data-theme="bus-past"] .conversation-item:hover{background:#3d474c!important;border-color:#5b666b!important}
  html[data-theme="bus-past"] .message-list{background:#273036!important}
  html[data-theme="bus-past"] .new-chat-hero{background:#343e43!important;color:var(--va-text)!important;border-color:#59646a!important}
  html[data-theme="bus-past"] .new-chat-help{background:rgba(227,184,75,.055)!important;color:var(--va-text-soft)!important;border-color:rgba(227,184,75,.28)!important}
}

/* =========================================================
   FINAL ASPHALT PASS — live-screen corrections after 2.9.20 rollback
   Visual-only. No JS/HTML/SW/API logic touched.
   ========================================================= */
html[data-theme="bus-past"]{
  --va-text:#f5f1e8;
  --va-text-soft:#ddd8cd;
  --va-muted:#bcb7ad;
  --va-muted-2:#9ea3a2;
}

/* Keep status text compact and readable next to the tiny Variant C bus. */
html[data-theme="bus-past"] .chat-title-line{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  min-width:0!important;
}
html[data-theme="bus-past"] #chatPresence{
  display:inline-flex!important;
  align-items:center!important;
  gap:5px!important;
  min-width:0!important;
  color:var(--va-muted)!important;
  font-size:12px!important;
  line-height:1.1!important;
  white-space:nowrap!important;
}
html[data-theme="bus-past"] #chatPresence .presence-status-text,
html[data-theme="bus-past"] #chatPresence .bus-presence-label{
  color:var(--va-muted)!important;
  font-weight:600!important;
}

/* Stronger readability on secondary information — never gray-on-black. */
html[data-theme="bus-past"] .conversation-preview,
html[data-theme="bus-past"] .conversation-list-time,
html[data-theme="bus-past"] .chat-subtitle,
html[data-theme="bus-past"] .small-muted,
html[data-theme="bus-past"] .field-label,
html[data-theme="bus-past"] .theme-card small,
html[data-theme="bus-past"] .account-id,
html[data-theme="bus-past"] .profile-questionnaire span,
html[data-theme="bus-past"] .cache-settings-summary span{
  color:var(--va-muted)!important;
}

/* A pin is a quiet secondary control, not the brightest object in a row. */
html[data-theme="bus-past"] .conversation-pin-button{
  opacity:.42!important;
  transform:scale(.86)!important;
  filter:saturate(.55) brightness(.92)!important;
}
html[data-theme="bus-past"] .conversation-pin-button.active{
  opacity:.9!important;
  filter:saturate(.8) brightness(1.02)!important;
}

/* Install/update control, when app logic makes it visible, belongs to the same chrome. */
html[data-theme="bus-past"] #installBtn:not(.hidden){
  display:inline-grid!important;
  place-items:center!important;
  color:#2b2518!important;
  background:linear-gradient(180deg,#f2cf6b,#d5a63b)!important;
  border:1px solid #c99a31!important;
  border-radius:12px!important;
  box-shadow:none!important;
}

@media(max-width:820px){
  /* The flagship surface is wet asphalt, not charcoal black. */
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList,
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #messageList{
    background-color:#293237!important;
  }

  /* Slightly calmer list cards and clearer hierarchy. */
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .conversation-item{
    background:linear-gradient(180deg,#3a4449 0%,#353f44 100%)!important;
    border-color:#505b60!important;
    box-shadow:0 4px 12px rgba(7,10,12,.10),inset 0 1px rgba(255,255,255,.018)!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .conversation-title{
    color:#f7f3ea!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .conversation-preview{
    color:#c4beb4!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #conversationList .conversation-list-time{
    color:#b7b1a6!important;
  }

  /* Header should never squeeze nickname/status into each other. */
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .chat-header-main{
    min-width:0!important;
    overflow:hidden!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .chat-title{
    min-width:0!important;
    max-width:58vw!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #chatPresence{
    flex:0 0 auto!important;
    font-size:11px!important;
  }

  /* Messages stay soft, warm, and readable. */
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .message-bubble{
    color:#f3efe7!important;
    background:#3b454a!important;
    border-color:#566167!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .message-row.mine .message-bubble{
    color:#fff7e7!important;
    background:linear-gradient(135deg,#665630,#574a2e)!important;
    border-color:#967b39!important;
  }

  /* Media placeholders are intentionally compact while loading/erroring. */
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .image-message.lazy-media-pending:not([src]),
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .image-message.lazy-media-pending[src=""]{
    width:min(74vw,330px)!important;
    max-height:250px!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode .image-message.lazy-media-error{
    width:min(68vw,300px)!important;
    max-height:125px!important;
  }

  /* Bottom navigation: readable labels, no oversized old toolbar feel. */
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #mobileBottomNav .mobile-nav-button span{
    font-size:11px!important;
    line-height:1!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] body.vav-shell-mode #mobileBottomNav .mobile-nav-button img{
    width:22px!important;
    height:22px!important;
  }

  /* Modal pages: cards breathe; no white/blue legacy slabs. */
  html.vav-mobile-layout[data-theme="bus-past"] .new-chat-hero,
  html.vav-mobile-layout[data-theme="bus-past"] .account-summary,
  html.vav-mobile-layout[data-theme="bus-past"] .public-profile-head,
  html.vav-mobile-layout[data-theme="bus-past"] .cache-settings-summary,
  html.vav-mobile-layout[data-theme="bus-past"] .theme-admin-note,
  html.vav-mobile-layout[data-theme="bus-past"] .notice{
    box-shadow:0 5px 14px rgba(8,11,13,.09)!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] .new-chat-hero{
    border-left:3px solid rgba(227,184,75,.72)!important;
  }
  html.vav-mobile-layout[data-theme="bus-past"] .new-chat-help{
    color:#d1cabd!important;
  }

  /* Account/settings icons must remain visible on graphite. */
  html.vav-mobile-layout[data-theme="bus-past"] .account-action-icon,
  html.vav-mobile-layout[data-theme="bus-past"] .modal-titlebar img,
  html.vav-mobile-layout[data-theme="bus-past"] .media-choice-card img{
    filter:var(--th-icon-filter)!important;
    opacity:.96!important;
  }

  /* Keyboard-safe forms: bottom actions stay in document flow. */
  html.vav-mobile-layout[data-theme="bus-past"] .modal-actions{
    flex:0 0 auto!important;
    position:static!important;
  }
}

@media(min-width:821px){
  html[data-theme="bus-past"] .conversation-preview,
  html[data-theme="bus-past"] .conversation-list-time{color:#c0baaf!important}
  html[data-theme="bus-past"] .message-bubble{color:#f3efe7!important}
}
