/* GorseeLead mobile facelift v2. Presentation layer only. */
@media (max-width: 700px) {
  html.theme-dark {
    --color-primary: #ff4f91 !important;
    --color-primary-opacity: #ff4f911c !important;
    --color-primary-opacity-hover: #ff4f9133 !important;
    --color-primary-tint: #ff4f9114 !important;
    --color-primary-shade: #e94884 !important;
    --color-background: #171827 !important;
    --color-background-secondary: #11121e !important;
    --color-background-secondary-accent: #202132 !important;
    --color-background-sidebar: #11121e !important;
    --color-background-selected: #26283a !important;
    --color-chat-hover: #212334 !important;
    --color-chat-active: #ff4f91 !important;
    --color-chat-active-greyed: #d84b84 !important;
    --color-item-hover: #212334 !important;
    --color-item-active: #27293b !important;
    --color-borders: rgba(255,255,255,.065) !important;
    --color-dividers: rgba(255,255,255,.045) !important;
    --color-dividers-android: rgba(255,255,255,.04) !important;
    --color-links: #ff73ab !important;
    --color-active: #ff4f91 !important;
    --color-active-darker: #e94884 !important;
    --color-text-meta-colored: #ff7db2 !important;
    --color-background-compact-menu: rgba(25,26,41,.78) !important;
    --color-background-compact-menu-hover: rgba(255,255,255,.07) !important;
  }

  html.theme-dark body,
  html.theme-dark #Main,
  html.theme-dark #LeftColumn,
  html.theme-dark .LeftColumn,
  html.theme-dark .ChatFolders,
  html.theme-dark .ChatFolders-content {
    background: #171827 !important;
  }

  /* Header: less chrome, more Telegram-like breathing room. */
  .LeftMainHeader {
    position: relative;
    z-index: 30;
    padding: max(.4rem, env(safe-area-inset-top)) .72rem .3rem;
    background: linear-gradient(180deg, rgba(23,24,39,.98), rgba(23,24,39,.92)) !important;
  }

  .LeftMainHeader::before {
    content: 'GorseeLead';
    display: block;
    padding: .08rem .28rem .42rem;
    color: rgba(255,255,255,.96);
    font-size: 1.34rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.025em;
  }

  .LeftMainHeader .left-header {
    height: 3rem !important;
    padding: .12rem .18rem !important;
    border: 1px solid rgba(255,255,255,.055);
    border-radius: 1.42rem;
    background: rgba(42,43,57,.58) !important;
    backdrop-filter: blur(20px) saturate(135%);
    -webkit-backdrop-filter: blur(20px) saturate(135%);
    box-shadow: inset 0 1px rgba(255,255,255,.035), 0 8px 22px rgba(0,0,0,.10);
  }

  .LeftMainHeader .left-header > .DropdownMenu,
  .LeftMainHeader .left-header > .DropdownMenuFiller,
  .LeftMainHeader .Button:has(.animated-menu-icon:not(.state-back)) {
    display: none !important;
  }

  .LeftMainHeader .SearchInput {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 1.2rem !important;
    background: transparent !important;
    color: rgba(255,255,255,.66) !important;
  }

  .LeftMainHeader .SearchInput input {
    height: 2.5rem !important;
    padding-left: .52rem !important;
    font-size: .98rem !important;
    font-weight: 450;
    color: rgba(248,248,252,.96) !important;
  }

  .LeftMainHeader .SearchInput input::placeholder {
    color: rgba(220,221,232,.54) !important;
  }

  .LeftMainHeader .SearchInput .search-icon,
  .LeftMainHeader .SearchInput .back-icon {
    color: rgba(220,221,232,.54) !important;
    font-size: 1.34rem !important;
  }

  /* Folder tabs become a quieter glass segmented control. */
  .ChatFolders-content.with-tabs {
    padding-top: 3.05rem !important;
  }

  .ChatFolders-content.with-tabs > div:first-child {
    top: .38rem !important;
    inset-inline: .72rem !important;
    padding: .16rem !important;
    border: 1px solid rgba(255,255,255,.055) !important;
    border-radius: 1.12rem !important;
    background: rgba(31,32,49,.58) !important;
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    box-shadow: inset 0 1px rgba(255,255,255,.025), 0 6px 18px rgba(0,0,0,.08) !important;
  }

  .ChatFolders-content.with-tabs > div:first-child button,
  .ChatFolders-content.with-tabs > div:first-child [role='tab'] {
    border-radius: .92rem !important;
    min-height: 2.24rem !important;
    font-size: .82rem !important;
    font-weight: 600 !important;
  }

  /* Chat rows: cleaner separators and less visual weight. */
  .Chat .ListItem-button {
    min-height: 4.55rem !important;
    padding: .36rem .82rem !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  .Chat .ListItem-button::after {
    content: '';
    position: absolute;
    right: .82rem;
    bottom: 0;
    left: 4.62rem;
    height: 1px;
    background: rgba(255,255,255,.038);
    pointer-events: none;
  }

  .Chat .title {
    font-size: 1rem !important;
    font-weight: 630 !important;
    line-height: 1.18 !important;
    letter-spacing: -.012em;
  }

  .Chat .subtitle,
  .Chat .last-message,
  .Chat .info-row {
    color: rgba(219,220,229,.60) !important;
    font-size: .92rem !important;
  }

  .Chat .LastMessageMeta,
  .Chat time,
  .Chat [class*='time'] {
    color: rgba(193,194,206,.48) !important;
    font-size: .78rem !important;
  }

  .Chat .badge,
  .Chat .unread-badge,
  .Chat [class*='unread'] {
    --color-background: #ff4f91 !important;
  }

  #LeftColumn,
  .LeftColumn,
  .ChatFolders {
    padding-bottom: calc(4.95rem + env(safe-area-inset-bottom)) !important;
  }

  #NewChat,
  .NewChatButton,
  [class*='NewChat'] .Button.round,
  .fab-container .Button {
    bottom: calc(5.35rem + env(safe-area-inset-bottom)) !important;
  }

  /* Floating bottom dock. */
  #gorsee-mobile-dock {
    position: fixed;
    z-index: 10000;
    right: .72rem;
    bottom: calc(.5rem + env(safe-area-inset-bottom));
    left: .72rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .14rem;
    height: 4rem;
    padding: .28rem;
    border: 1px solid rgba(255,255,255,.065);
    border-radius: 1.62rem;
    background: rgba(24,25,40,.74);
    backdrop-filter: blur(26px) saturate(145%);
    -webkit-backdrop-filter: blur(26px) saturate(145%);
    box-shadow: 0 14px 36px rgba(0,0,0,.26), inset 0 1px rgba(255,255,255,.035);
  }

  .gorsee-dock-item {
    appearance: none;
    border: 0;
    border-radius: 1.22rem;
    background: transparent;
    color: rgba(226,227,236,.50);
    font: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .12rem;
    min-width: 0;
    padding: .2rem .08rem;
    transition: color .16s ease, background .16s ease, transform .16s ease;
  }

  .gorsee-dock-item:active {
    transform: scale(.96);
  }

  .gorsee-dock-item.active {
    color: #ff5b9b;
    background: rgba(255,79,145,.105);
  }

  .gorsee-dock-icon {
    width: 1.45rem;
    height: 1.45rem;
    display: grid;
    place-items: center;
  }

  .gorsee-dock-icon svg {
    width: 1.38rem;
    height: 1.38rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .gorsee-dock-label {
    overflow: hidden;
    max-width: 100%;
    font-size: .64rem;
    font-weight: 600;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #gorsee-prototype-toast {
    pointer-events: none;
  }
}

/* GorseeLead mobile facelift v3 refinements */
@media (max-width: 700px) {
  /* In dialogs list, remove legacy menu affordance completely. */
  .LeftMainHeader .left-header > .DropdownMenu,
  .LeftMainHeader .left-header > .DropdownMenuFiller,
  .LeftMainHeader .left-header .animated-menu-icon:not(.state-back),
  .LeftMainHeader .left-header .Button:has(.animated-menu-icon:not(.state-back)) {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Search: slimmer and no idle/connection spinner in dialogs shell. */
  .LeftMainHeader .left-header {
    height: 2.72rem !important;
    border-radius: 1.3rem !important;
  }

  .LeftMainHeader .SearchInput input {
    height: 2.22rem !important;
    min-height: 2.22rem !important;
    padding-top: .25rem !important;
    padding-bottom: .28rem !important;
    font-size: .95rem !important;
  }

  .LeftMainHeader .SearchInput .icon-container-left {
    margin-inline-start: .58rem !important;
  }

  .LeftMainHeader .SearchInput .Loading,
  .LeftMainHeader .SearchInput .Spinner,
  .LeftMainHeader .SearchInput [class*='Spinner'] {
    display: none !important;
  }

  /* Bottom dock: smaller, rounder, and genuinely translucent. */
  #gorsee-mobile-dock {
    right: .9rem !important;
    left: .9rem !important;
    bottom: calc(.48rem + env(safe-area-inset-bottom)) !important;
    height: 3.58rem !important;
    padding: .22rem !important;
    gap: .1rem !important;
    border: 1px solid rgba(255,255,255,.055) !important;
    border-radius: 1.95rem !important;
    background: rgba(22,23,38,.42) !important;
    backdrop-filter: blur(30px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(150%) !important;
    box-shadow: 0 12px 30px rgba(0,0,0,.18), inset 0 1px rgba(255,255,255,.025) !important;
  }

  .gorsee-dock-item {
    border-radius: 1.55rem !important;
    padding: .12rem .05rem !important;
  }

  .gorsee-dock-item.active {
    background: rgba(255,79,145,.085) !important;
  }

  .gorsee-dock-icon {
    width: 1.34rem !important;
    height: 1.34rem !important;
  }

  .gorsee-dock-icon svg {
    width: 1.26rem !important;
    height: 1.26rem !important;
  }

  .gorsee-dock-label {
    font-size: .61rem !important;
  }

  #LeftColumn,
  .LeftColumn,
  .ChatFolders {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)) !important;
  }

  #NewChat,
  .NewChatButton,
  [class*='NewChat'] .Button.round,
  .fab-container .Button {
    bottom: calc(4.9rem + env(safe-area-inset-bottom)) !important;
  }
}

/* GorseeLead mobile facelift v4: dock overlays content, no solid bottom slab */
@media (max-width: 700px) {
  #LeftColumn,
  .LeftColumn,
  .ChatFolders {
    padding-bottom: 0 !important;
    background: transparent !important;
  }

  .ChatFolders-content,
  .chat-list,
  .ChatList {
    padding-bottom: 4.25rem !important;
    background: transparent !important;
  }

  #gorsee-mobile-dock {
    right: 1rem !important;
    left: 1rem !important;
    height: 3.42rem !important;
    bottom: calc(.42rem + env(safe-area-inset-bottom)) !important;
    border-radius: 2rem !important;
    background: rgba(20,21,34,.30) !important;
    border-color: rgba(255,255,255,.045) !important;
    box-shadow: 0 10px 24px rgba(0,0,0,.14), inset 0 1px rgba(255,255,255,.02) !important;
    backdrop-filter: blur(24px) saturate(145%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(145%) !important;
  }

  .gorsee-dock-item.active {
    background: rgba(255,79,145,.075) !important;
  }

  #NewChat,
  .NewChatButton,
  [class*='NewChat'] .Button.round,
  .fab-container .Button {
    bottom: calc(4.35rem + env(safe-area-inset-bottom)) !important;
  }
}

/* GorseeLead mobile facelift v5: remove browser safe-area gap under floating dock */
@media (max-width: 700px) {
  #gorsee-mobile-dock {
    bottom: .32rem !important;
  }

  .ChatFolders-content,
  .chat-list,
  .ChatList {
    padding-bottom: 3.9rem !important;
  }

  #NewChat,
  .NewChatButton,
  [class*='NewChat'] .Button.round,
  .fab-container .Button {
    bottom: 4.15rem !important;
  }
}

/* Only installed standalone PWA needs the OS safe-area inset. */
@media (max-width: 700px) and (display-mode: standalone) {
  #gorsee-mobile-dock {
    bottom: calc(.32rem + env(safe-area-inset-bottom)) !important;
  }

  #NewChat,
  .NewChatButton,
  [class*='NewChat'] .Button.round,
  .fab-container .Button {
    bottom: calc(4.15rem + env(safe-area-inset-bottom)) !important;
  }
}

/* GorseeLead mobile facelift v6: Telegram-native top composition */
@media (max-width: 700px) {
  .LeftMainHeader {
    padding: max(.48rem, env(safe-area-inset-top)) .72rem .28rem !important;
  }

  /* Turn the top area into a title row + compact search action. */
  .LeftMainHeader::before {
    content: 'GorseeLead' !important;
    height: 3.1rem;
    display: flex !important;
    align-items: center;
    padding: 0 5.1rem 0 .22rem !important;
    font-size: 1.48rem !important;
    font-weight: 720 !important;
    line-height: 1 !important;
    letter-spacing: -.025em !important;
  }

  .LeftMainHeader::after {
    content: '⋮';
    position: absolute;
    z-index: 4;
    top: calc(max(.48rem, env(safe-area-inset-top)) + .5rem);
    right: .9rem;
    width: 2.15rem;
    height: 2.15rem;
    display: grid;
    place-items: center;
    color: rgba(194,196,216,.56);
    font-size: 1.72rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
  }

  .LeftMainHeader .left-header {
    position: absolute !important;
    z-index: 5;
    top: calc(max(.48rem, env(safe-area-inset-top)) + .48rem);
    right: 3.35rem;
    width: 2.25rem !important;
    height: 2.25rem !important;
    min-width: 2.25rem !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  .LeftMainHeader .SearchInput {
    position: absolute !important;
    inset: 0 !important;
    width: 2.25rem !important;
    height: 2.25rem !important;
    min-width: 2.25rem !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 50% !important;
  }

  .LeftMainHeader .SearchInput input {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    cursor: pointer;
  }

  .LeftMainHeader .SearchInput .icon-container-left {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    display: grid !important;
    place-items: center !important;
    pointer-events: none;
  }

  .LeftMainHeader .SearchInput .search-icon {
    color: rgba(194,196,216,.56) !important;
    font-size: 1.6rem !important;
  }

  /* Stories preview becomes a compact avatar cluster at the left of the title when available. */
  .LeftMainHeader:has(#StoryToggler)::before {
    padding-left: 4.4rem !important;
  }

  #StoryToggler {
    position: fixed !important;
    z-index: 40 !important;
    top: calc(max(.48rem, env(safe-area-inset-top)) + .28rem) !important;
    left: .78rem !important;
    width: 3.55rem !important;
    height: 2.65rem !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: scale(.9) !important;
    transform-origin: left center !important;
  }

  /* Folder tabs sit directly below the title row, like current mobile Telegram. */
  .ChatFolders-content.with-tabs {
    padding-top: 3.02rem !important;
  }

  .ChatFolders-content.with-tabs > div:first-child {
    top: .28rem !important;
    inset-inline: .7rem !important;
    min-height: 2.5rem !important;
    padding: .15rem !important;
    border-radius: 1.3rem !important;
    background: rgba(17,18,31,.52) !important;
    border-color: rgba(255,255,255,.045) !important;
    backdrop-filter: blur(22px) saturate(145%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(145%) !important;
  }

  .ChatFolders-content.with-tabs > div:first-child button,
  .ChatFolders-content.with-tabs > div:first-child [role='tab'] {
    min-height: 2.16rem !important;
    border-radius: 1.05rem !important;
    font-size: .88rem !important;
  }
}

/* GorseeLead mobile facelift v7 */
@media (max-width: 700px) {
  #StoryToggler {
    left: .82rem !important;
    transform: scale(.88) !important;
    transition: none !important;
  }

  .LeftMainHeader .SearchInput,
  .LeftMainHeader .SearchInput *,
  .LeftMainHeader .left-header {
    animation: none !important;
  }

  .LeftMainHeader .SearchInput .icon-container-left,
  .LeftMainHeader .SearchInput .icon-container-slide,
  .LeftMainHeader .SearchInput .search-icon {
    transition: none !important;
  }

  .LeftMainHeader:has(.SearchInput.has-focus) .left-header {
    position: absolute !important;
    z-index: 60 !important;
    top: calc(max(.48rem, env(safe-area-inset-top)) + .34rem) !important;
    right: .72rem !important;
    left: .72rem !important;
    width: auto !important;
    height: 2.68rem !important;
    min-width: 0 !important;
    padding: .08rem .12rem !important;
    overflow: visible !important;
    border: 1px solid rgba(255,255,255,.055) !important;
    border-radius: 1.35rem !important;
    background: rgba(39,40,55,.74) !important;
    backdrop-filter: blur(20px) saturate(135%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(135%) !important;
    box-shadow: 0 8px 22px rgba(0,0,0,.12) !important;
  }

  .LeftMainHeader:has(.SearchInput.has-focus)::before,
  .LeftMainHeader:has(.SearchInput.has-focus)::after,
  .LeftMainHeader:has(.SearchInput.has-focus) #StoryToggler {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .LeftMainHeader:has(.SearchInput.has-focus) .SearchInput {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 2.5rem !important;
    min-width: 0 !important;
    overflow: visible !important;
    border-radius: 1.25rem !important;
  }

  .LeftMainHeader:has(.SearchInput.has-focus) .SearchInput input {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 2.42rem !important;
    min-height: 2.42rem !important;
    padding: .3rem 2.25rem .32rem .5rem !important;
    opacity: 1 !important;
    cursor: text !important;
    font-size: .95rem !important;
  }

  .LeftMainHeader:has(.SearchInput.has-focus) .SearchInput .icon-container-left {
    position: relative !important;
    inset: auto !important;
    flex: 0 0 1.65rem !important;
    width: 1.65rem !important;
    height: 2.42rem !important;
    margin-inline-start: .42rem !important;
  }

  .LeftMainHeader:has(.SearchInput.has-focus) .SearchInput .icon-container-right {
    position: absolute !important;
    right: .1rem !important;
    top: 0 !important;
    height: 2.42rem !important;
  }
}

/* GorseeLead branding v8: black + target-yellow */
:root,
html.theme-dark {
  --color-primary: #F9AB03 !important;
  --color-primary-opacity: rgba(249,171,3,.14) !important;
  --color-primary-opacity-hover: rgba(249,171,3,.24) !important;
  --color-primary-tint: rgba(249,171,3,.10) !important;
  --color-primary-shade: #D99400 !important;
  --color-links: #FFC13D !important;
  --color-active: #F9AB03 !important;
  --color-active-darker: #D99400 !important;
  --color-text-meta-colored: #F9AB03 !important;
  --color-background: #050505 !important;
  --color-background-secondary: #0A0A0A !important;
  --color-background-secondary-accent: #11100C !important;
  --color-background-sidebar: #050505 !important;
  --color-background-selected: #17140D !important;
  --color-chat-hover: #11100C !important;
  --color-chat-active: #F9AB03 !important;
  --color-chat-active-greyed: #C88B08 !important;
  --color-item-hover: #11100C !important;
  --color-item-active: #17140D !important;
  --color-background-compact-menu: rgba(8,8,8,.72) !important;
  --color-background-compact-menu-hover: rgba(249,171,3,.08) !important;
}

html,
body,
#root,
#Main,
.Auth {
  background-color: #050505 !important;
}

@media (max-width: 700px) {
  html.theme-dark body,
  html.theme-dark #Main,
  html.theme-dark #LeftColumn,
  html.theme-dark .LeftColumn,
  html.theme-dark .ChatFolders,
  html.theme-dark .ChatFolders-content {
    background: #050505 !important;
  }

  .LeftMainHeader {
    background: linear-gradient(180deg, rgba(5,5,5,.99), rgba(5,5,5,.92)) !important;
  }

  .LeftMainHeader::before {
    content: 'GorseeLead' !important;
  }

  .ChatFolders-content.with-tabs > div:first-child {
    background: rgba(10,10,10,.62) !important;
    border-color: rgba(249,171,3,.08) !important;
  }

  .Chat .badge,
  .Chat .unread-badge,
  .Chat [class*='unread'] {
    --color-background: #F9AB03 !important;
  }

  #gorsee-mobile-dock {
    background: rgba(4,4,4,.34) !important;
    border-color: rgba(249,171,3,.09) !important;
  }

  .gorsee-dock-item.active {
    color: #F9AB03 !important;
    background: rgba(249,171,3,.10) !important;
  }
}

/* Authorization branding. */
.auth-form #logo {
  background: url('./gorseelead-logo.svg') center / contain no-repeat !important;
  border-radius: 1.5rem;
}

#auth-qr-form .qr-plane {
  display: none !important;
}

#auth-qr-form .qr-inner::after {
  content: '';
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3.4rem;
  height: 3.4rem;
  border-radius: .85rem;
  background: #000 url('./gorseelead-logo.svg') center / 92% no-repeat;
  box-shadow: 0 0 0 .2rem #fff;
  pointer-events: none;
}

.auth-form .Button.primary,
.auth-form .Button.default.primary,
.auth-button {
  --color-primary: #F9AB03 !important;
}

/* GorseeLead v10: remove separate background under mobile navigation */
@media (max-width: 700px) {
  html, body, #root, #Main, #LeftColumn, .LeftColumn, .ChatFolders, .ChatFolders-content {
    min-height: 100dvh !important;
    background: #050505 !important;
  }

  #gorsee-mobile-dock {
    margin-bottom: max(8px, env(safe-area-inset-bottom)) !important;
  }

  .mobile-footer,
  .bottom-bar,
  .bottom-nav-background,
  [class*='BottomBar'],
  [class*='bottom-bar'],
  [class*='bottomBar'],
  [class*='NavigationBar'],
  [class*='navigation-bar'] {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
  }

  /* The viewport itself owns the black background, not a footer plate. */
  body { padding-bottom: 0 !important; }
}

/* GorseeLead v10: remove separate background under mobile navigation */
@media (max-width: 700px) {
  html, body, #root, #Main, #LeftColumn, .LeftColumn, .ChatFolders, .ChatFolders-content {
    min-height: 100dvh !important;
    background: #050505 !important;
  }
  #gorsee-mobile-dock {
    margin-bottom: max(8px, env(safe-area-inset-bottom)) !important;
  }
  .mobile-footer,
  .bottom-bar,
  .bottom-nav-background,
  [class*='BottomBar'],
  [class*='bottom-bar'],
  [class*='bottomBar'],
  [class*='NavigationBar'],
  [class*='navigation-bar'] {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
  }
  body { padding-bottom: 0 !important; }
}

/* GorseeLead v11: floating nav has no outer plate */
@media (max-width: 700px) {
  #gorsee-mobile-dock {
    left: 1rem !important;
    right: 1rem !important;
    bottom: .42rem !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .gorsee-dock-item {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .gorsee-dock-item.active {
    background: rgba(249,171,3,.10) !important;
    box-shadow: inset 0 0 0 1px rgba(249,171,3,.08) !important;
  }

  .ChatFolders-content,
  .chat-list,
  .ChatList {
    padding-bottom: 3.65rem !important;
  }
}

/* GorseeLead v12: stable top shell + actual glass dock */
@media (max-width: 700px) {
  .LeftMainHeader {
    min-height: calc(4.15rem + max(.35rem, env(safe-area-inset-top))) !important;
    padding: max(.35rem, env(safe-area-inset-top)) .72rem .25rem !important;
  }
  .LeftMainHeader::before,
  .LeftMainHeader::after { content: none !important; display: none !important; }

  #gorsee-top-shell {
    position: relative;
    z-index: 42;
    height: 3.55rem;
    display: flex;
    align-items: center;
    padding: 0 5.2rem 0 4.65rem;
    pointer-events: none;
  }
  #gorsee-top-title {
    min-width: 0;
    color: #f7f7f8;
    font-size: 1.48rem;
    font-weight: 720;
    line-height: 1;
    letter-spacing: -.03em;
    white-space: nowrap;
  }
  .gorsee-top-action {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.55rem;
    height: 2.55rem;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: rgba(232,232,239,.72);
    background: transparent;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
  }
  .gorsee-top-action:active { background: rgba(255,255,255,.07); }
  .gorsee-top-action svg { width: 1.55rem; height: 1.55rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  #gorsee-top-search { right: 2.7rem; }
  #gorsee-top-more { right: .1rem; font-size: 1.9rem; font-weight: 700; line-height: 1; padding-bottom: .18rem; }

  #StoryToggler {
    position: fixed !important;
    z-index: 45 !important;
    top: calc(max(.35rem, env(safe-area-inset-top)) + .45rem) !important;
    left: .72rem !important;
    width: 3.55rem !important;
    height: 2.65rem !important;
    margin: 0 !important;
    transform: none !important;
    transform-origin: center !important;
  }

  /* The stock search remains the real search engine; custom button only opens it. */
  .LeftMainHeader .left-header {
    position: absolute !important;
    z-index: 60 !important;
    top: calc(max(.35rem, env(safe-area-inset-top)) + .42rem) !important;
    right: 3.05rem !important;
    width: 2.55rem !important;
    height: 2.55rem !important;
    min-width: 2.55rem !important;
    overflow: visible !important;
    pointer-events: none !important;
  }
  .LeftMainHeader .SearchInput { pointer-events: none !important; }
  .LeftMainHeader:has(.SearchInput.has-focus) #gorsee-top-shell,
  .LeftMainHeader:has(.SearchInput input:focus) #gorsee-top-shell { opacity: 0 !important; pointer-events: none !important; }
  .LeftMainHeader:has(.SearchInput.has-focus) #StoryToggler,
  .LeftMainHeader:has(.SearchInput input:focus) #StoryToggler { opacity: 0 !important; pointer-events: none !important; }
  .LeftMainHeader:has(.SearchInput.has-focus) .left-header,
  .LeftMainHeader:has(.SearchInput input:focus) .left-header {
    right: .72rem !important;
    left: .72rem !important;
    width: auto !important;
    height: 2.68rem !important;
    padding: .08rem .12rem !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 1.35rem !important;
    background: rgba(20,20,22,.86) !important;
    backdrop-filter: blur(24px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(140%) !important;
    box-shadow: 0 10px 28px rgba(0,0,0,.32), inset 0 1px rgba(255,255,255,.055) !important;
    pointer-events: auto !important;
  }
  .LeftMainHeader:has(.SearchInput.has-focus) .SearchInput,
  .LeftMainHeader:has(.SearchInput input:focus) .SearchInput { pointer-events: auto !important; }

  #gorsee-mobile-dock {
    left: .85rem !important;
    right: .85rem !important;
    bottom: calc(.48rem + env(safe-area-inset-bottom)) !important;
    height: 3.72rem !important;
    margin: 0 !important;
    padding: .25rem !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    border-radius: 1.92rem !important;
    background: linear-gradient(180deg, rgba(30,30,32,.82), rgba(12,12,14,.78)) !important;
    backdrop-filter: blur(30px) saturate(155%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(155%) !important;
    box-shadow: 0 14px 34px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.10), inset 0 -1px 0 rgba(249,171,3,.035) !important;
  }
  .gorsee-dock-item { border-radius: 1.5rem !important; }
  .gorsee-dock-item.active {
    color: #F9AB03 !important;
    background: linear-gradient(180deg, rgba(249,171,3,.17), rgba(249,171,3,.09)) !important;
    box-shadow: inset 0 0 0 1px rgba(249,171,3,.12) !important;
  }
}
