/* Desktop browser only; never applies to touch devices, Android or standalone PWAs. */
.wit-desktop-rail, .wit-desktop-aside { display: none; }
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) and (display-mode: browser) {
  :root { --desktop-panel: #fff; --desktop-ink: #171717; --desktop-muted: #777; --desktop-edge: #e8e8e8; --desktop-base: #f8f8f9; }
  body.dark { --desktop-panel: #161616; --desktop-ink: #f8f8f8; --desktop-muted: #a4a4a4; --desktop-edge: #343434; --desktop-base: #080808; }
  html, body { width: 100%; min-height: 100%; }
  body { background: var(--desktop-base) !important; color: var(--desktop-ink); }
  #startup-screen { display: none !important; }
  .wit-desktop-rail {
    position: fixed; display: flex; flex-direction: column; gap: 5px;
    box-sizing: border-box; inset: 0 auto 0 0; width: 226px; padding: 27px 18px 20px;
    background: var(--desktop-panel); color: var(--desktop-ink);
    border-right: 1px solid var(--desktop-edge); z-index: 10020; overflow-y: auto;
  }
  .wit-desktop-brand { display: block; text-decoration: none; color: inherit; font-size: 23px; font-weight: 800; letter-spacing: -.9px; margin: 0 0 30px 4px; }
  .wit-desktop-brand small { display: block; margin-top: 4px; font-size: 11px; letter-spacing: .2px; color: var(--desktop-muted); font-weight: 500; }
  .wit-brand-mark { color: #ff385e; font-size: 25px; }
  .wit-desktop-item { display: block; width: 100%; box-sizing: border-box; text-align: left; border: 0; border-radius: 9px; background: transparent; color: inherit; font: inherit; font-size: 15px; font-weight: 650; text-decoration: none; padding: 13px 15px; cursor: pointer; }
  .wit-desktop-item:hover, .wit-desktop-item[aria-current="page"] { background: color-mix(in srgb, var(--desktop-ink) 9%, transparent); }
  .wit-desktop-item[aria-current="page"] { font-weight: 800; }
  .wit-desktop-foot { margin-top: auto; padding: 16px 9px; border-top: 1px solid var(--desktop-edge); font-size: 12px; line-height: 1.6; color: var(--desktop-muted); }
  .wit-desktop-aside {
    position: fixed; display: flex; flex-direction: column; box-sizing: border-box;
    top: 0; bottom: 0; right: 0; width: clamp(276px, 25vw, 380px);
    padding: 24px 28px; gap: 24px; overflow-y: auto;
    color: var(--desktop-ink); background: var(--desktop-panel);
    border-left: 1px solid var(--desktop-edge); z-index: 10019;
  }
  .wit-desktop-topbar { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; }
  .wit-desktop-live-dot { color: #11a75b; letter-spacing: 0; }
  .wit-desktop-eyebrow { display: block; font-size: 10px; letter-spacing: 1.5px; font-weight: 800; color: var(--desktop-muted); }
  .wit-desktop-welcome { padding-top: clamp(32px, 11vh, 135px); }
  .wit-desktop-welcome h2 { font-weight: 850; font-size: clamp(30px, 3vw, 44px); letter-spacing: -1.8px; line-height: 1.08; margin: 14px 0; }
  .wit-desktop-welcome p, .wit-desktop-download p { font-size: 14px; color: var(--desktop-muted); line-height: 1.7; }
  .wit-desktop-actions { display: grid; gap: 10px; }
  .wit-desktop-actions button, .wit-desktop-actions a { box-sizing: border-box; display: flex; justify-content: space-between; padding: 15px 18px; border-radius: 10px; font: inherit; font-weight: 750; font-size: 14px; text-decoration: none; cursor: pointer; }
  .wit-desktop-actions button { background: var(--desktop-ink); color: var(--desktop-panel); border: 1px solid var(--desktop-ink); }
  .wit-desktop-actions a { background: transparent; color: var(--desktop-ink); border: 1px solid var(--desktop-edge); }
  .wit-desktop-download { margin-top: 20px; border: 1px solid var(--desktop-edge); border-radius: 15px; padding: 20px; }
  .wit-desktop-download strong { display: block; margin: 10px 0 3px; font-size: 18px; }
  .wit-desktop-play { display: inline-flex; gap: 12px; align-items: center; padding: 9px 17px; background: #111; border: 1px solid #444; border-radius: 8px; color: white; text-decoration: none; font-size: 18px; font-weight: 700; }
  .wit-desktop-play small { display: block; font-size: 9px; line-height: 1.1; font-weight: 500; }
  .wit-desktop-aside-foot { margin-top: auto; color: var(--desktop-muted); font-size: 11px; line-height: 1.6; }
  .app-bg:has(.wit-desktop-rail) { box-sizing: border-box; height: 100dvh; overflow: hidden; padding: 12px calc(clamp(276px, 25vw, 380px) + 16px) 12px 242px; display: flex; justify-content: center; align-items: center; }
  .app-bg:has(.wit-desktop-rail) .app-wrapper { box-sizing: border-box; width: min(100%, 420px); max-width: 420px; height: calc(100dvh - 24px); max-height: 860px; min-height: 0; margin: 0; overflow: hidden; border-radius: 20px; box-shadow: 0 8px 35px rgba(0,0,0,.12); border: 1px solid var(--desktop-edge); }
  .app-bg:has(.wit-desktop-rail) .app-shell { width: 100%; height: 100%; min-height: 0; overflow-y: auto; overflow-x: hidden; border-radius: 20px; box-shadow: none; overscroll-behavior: contain; }
  .app-bg:has(.wit-desktop-rail) .screen, .app-bg:has(.wit-desktop-rail) .camera-screen { min-height: 100%; max-width: 100%; }
  .app-bg:has(.wit-desktop-rail) .bottom-bar-main { display: none !important; }
  .app-bg:has(.wit-desktop-rail) .bottom-bar { display: none !important; }
  /* Personality notch belongs to the virtual handset, not the browser edge. */
  .app-bg:has(.wit-desktop-rail) .camera-edge-nudge { position: absolute !important; right: 0 !important; left: auto !important; max-width: 96%; z-index: 100; }
  .app-bg:has(.wit-desktop-rail) .camera-edge-nudge-left { left: 0 !important; right: auto !important; }
  .app-bg:has(.wit-desktop-rail) .camera-edge-nudge-message { max-width: min(300px, 85%); }
  .app-bg:has(.wit-desktop-rail) .camera-prompt-notch, .app-bg:has(.wit-desktop-rail) .camera-prompt-drag-handle { max-width: 100%; }
  .wit-desktop-feeds { box-sizing: border-box; height: 100dvh; overflow: auto; padding: 24px 34px 24px 264px; }
  .wit-desktop-feeds .bottom-bar-main, .wit-desktop-feeds .bottom-bar, .wit-desktop-feeds .pill-nav { display: none !important; }
  .wit-desktop-feeds .wit-desktop-rail { position: fixed; }
  .wit-desktop-rail .wit-desktop-item { flex-shrink: 0; padding: 9px 14px; }
  .wit-desktop-activity { width: min(100%, 930px); margin: 0 auto; padding: 36px 10px; color: var(--desktop-ink); font-family: system-ui,sans-serif; }
  .wit-desktop-activity h1 { font-size: 38px; letter-spacing: -1.5px; margin: 12px 0 6px; }
  .wit-desktop-activity p { color: var(--desktop-muted); }
  .wit-activity-list { margin-top: 30px; border: 1px solid var(--desktop-edge); border-radius: 16px; overflow: hidden; background: var(--desktop-panel); }
  .wit-activity-item { display: flex; align-items: center; gap: 18px; padding: 14px 18px; border-bottom: 1px solid var(--desktop-edge); text-decoration: none; color: inherit; }
  .wit-activity-item:last-child { border: 0; }
  .wit-activity-item:hover { background: color-mix(in srgb, var(--desktop-ink) 4%, transparent); }
  .wit-activity-item img { width: 62px; height: 62px; object-fit: cover; border-radius: 9px; }
  .wit-activity-item span:nth-child(2) { flex: 1; }
  .wit-activity-item strong, .wit-activity-item small { display: block; }
  .wit-activity-item small { color: var(--desktop-muted); margin-top: 5px; }
  
  .wit-desktop-feeds > :not(.wit-desktop-rail) { width: 100%; max-width: 1080px; margin: 0 auto; }
}
@media (min-width: 1024px) and (max-width: 1280px) and (hover: hover) and (pointer: fine) and (display-mode: browser) {
  .wit-desktop-aside { width: 254px; padding: 20px; }
  .app-bg:has(.wit-desktop-rail) { padding-right: 270px; padding-left: 238px; }
  .wit-desktop-welcome { padding-top: 18px; }
}

/* Standalone discovery/feed/activity must not inherit the phone-stage layout. */
@media (min-width:1024px) and (hover:hover) and (pointer:fine) and (display-mode:browser) {
  .app-bg.wit-desktop-feeds { display:block !important; height:100dvh !important; min-height:0 !important; overflow-y:auto !important; overflow-x:hidden !important; padding:24px 32px 60px 258px !important; align-items:initial !important; justify-content:initial !important; scrollbar-gutter:stable; }
  .app-bg.wit-desktop-feeds > :not(.wit-desktop-rail) { width:100% !important; max-width:none !important; min-height:0 !important; margin:0 !important; box-sizing:border-box; }
  .app-bg.wit-desktop-feeds .feeds-bottom-nav, .app-bg.wit-desktop-feeds .feeds-nav, .app-bg.wit-desktop-feeds .bottom-bar-main, .app-bg.wit-desktop-feeds .bottom-bar { display:none !important; }
  .app-bg.wit-desktop-feeds .app-wrapper, .app-bg.wit-desktop-feeds .app-shell { width:100% !important; max-width:none !important; height:auto !important; min-height:0 !important; overflow:visible !important; }
  .app-bg.wit-desktop-feeds .discover-categories { width:100%; }
  .wit-desktop-rail .wit-desktop-brand { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
  .wit-desktop-rail .wit-desktop-brand small { flex-basis:100%; }
  .wit-desktop-brand img { border-radius:8px; object-fit:contain; }
  .wit-desktop-theme { width:100%; padding:10px; cursor:pointer; border:1px solid var(--desktop-edge); border-radius:9px; color:var(--desktop-ink); background:var(--desktop-panel); margin-bottom:12px; text-align:left; }
  .wit-desktop-company { display:block; margin:9px 0; }
  .wit-desktop-foot a { color:var(--desktop-muted); }
  .wit-desktop-activity { padding:12px 20px 50px !important; max-width:1100px !important; }
  .wit-desktop-activity header { position:relative; margin-bottom:20px; }
  .wit-activity-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:12px; background:none; border:0; overflow:visible; }
  .wit-activity-item { border:1px solid var(--desktop-edge) !important; border-radius:12px; background:var(--desktop-panel); min-width:0; }
  .wit-activity-item span:nth-child(2) { min-width:0; }
  .wit-activity-item small { overflow-wrap:anywhere; }
  body.dark .app-bg.wit-desktop-feeds { background:#080808; color:#f8f8f8; }
}

@media (min-width:1024px) and (hover:hover) and (pointer:fine) and (display-mode:browser) {
  .app-bg.wit-desktop-feeds > div:not(.wit-desktop-rail), .app-bg.wit-desktop-feeds > main { max-width:none !important; width:100% !important; }
  .app-bg.wit-desktop-feeds .feeds-bottom-nav { display:none !important; }
  .app-bg.wit-desktop-feeds .wit-discover-root { width:100% !important; min-height:0 !important; padding-bottom:20px !important; }
  .app-bg.wit-desktop-feeds .wit-discover-root > div { width:100% !important; max-width:none !important; padding:20px !important; box-sizing:border-box; }
  .app-bg.wit-desktop-feeds .wit-discover-root > div > button { display:block; width:100% !important; }
  .app-bg.wit-desktop-feeds .wit-discover-root > div > button > div:last-child { min-height:240px; }
}

/* Desktop feed pages: the page is the only vertical scrolling surface.
   Do not change Feeds pagination, observers, or fetched result order. */
@media (min-width:1024px) and (hover:hover) and (pointer:fine) and (display-mode:browser) {
  html:has(.wit-desktop-feeds), body:has(.wit-desktop-feeds) { height:100%; overflow:hidden !important; }
  .app-bg.wit-desktop-feeds { overflow-y:auto !important; overflow-x:hidden !important; overscroll-behavior-y:contain; }
  .app-bg.wit-desktop-feeds .feed-page { height:auto !important; min-height:0 !important; max-height:none !important; overflow:visible !important; max-width: none !important; }
  .app-bg.wit-desktop-feeds .wit-desktop-feed-list { width:100%; max-width:none; }
  .app-bg.wit-desktop-feeds .wit-desktop-feed-list[hidden] { display:none !important; }
  .app-bg.wit-desktop-feeds .wit-desktop-inline-snap { max-width:1100px; width:100%; margin:0 auto; padding:14px 20px 50px; background:var(--desktop-base); color:var(--desktop-ink); }
  .app-bg.wit-desktop-feeds .wit-desktop-inline-snap .feeds-bottom-nav,
  .app-bg.wit-desktop-feeds .wit-desktop-inline-snap .bottom-bar { display:none !important; }
  .app-bg.wit-desktop-feeds .wit-desktop-inline-snap .snap-page { max-width:none !important; width:100% !important; }
  .wit-inline-back { margin:0 0 18px; padding:11px 16px; border:1px solid var(--desktop-edge); border-radius:10px; background:var(--desktop-panel); color:var(--desktop-ink); font:inherit; font-weight:700; cursor:pointer; }
  .wit-activity-item { font:inherit; text-align:left; color:inherit; width:100%; cursor:pointer; }
}

/* Desktop navigation consistency only: typography and brand subtitle. */
@media (min-width:1024px) and (hover:hover) and (pointer:fine) and (display-mode:browser) {
 .wit-desktop-rail { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif !important; font-size:15px; }
 .wit-desktop-rail .wit-desktop-item { font-family: inherit !important; font-size:15px !important; line-height:1.35; }
 .wit-desktop-rail .wit-desktop-brand { font-family:inherit !important; font-size:21px; line-height:1.15; font-weight:850; letter-spacing:-.6px; align-items:center; }
 .wit-desktop-rail .wit-desktop-brand small { display:block; flex-basis:100%; margin:5px 0 0 44px; font-size:15px; line-height:1.2; font-weight:700; letter-spacing:-.15px; color:var(--desktop-muted); }
}
