/* One desktop navigation, independent of each page's stylesheet and mobile shell. */
@layer wv-desktop-shell {
 @media (min-width:1101px) {
  /* Styling exists in <head> before the first paint; keep old controls mounted for proxy actions. */
  html[data-wv-desktop-preflight] body:not(.premium-mobile)>:is(header#corporateShell,header#wvUnifiedHeader,header.wvUnifiedHeader,.mapTop,#wvUnifiedRail,#wvUnifiedSidebar,.wv-chrome-rail,.wv-chrome-sidebar,.mapShortcuts,.wv-area-tools,.wv-shell:has(>.wv-shell-top):not([data-wv-single-shell])),
  html:root body.wv-single-desktop>header#corporateShell {display:none!important}
  html:root body.wv-single-desktop {
   --wv-menu-width:196px;--wv-menu-height:92px;
   --rail:var(--wv-menu-width)!important;--wv-shell-height:var(--wv-menu-height)!important;
  }
  html:root body.wv-single-desktop.wv-single-compact {--wv-menu-width:96px}
  html:root body.wv-single-desktop {
   box-sizing:border-box!important;
   padding-left:var(--wv-menu-width)!important;
   padding-block-start:var(--wv-menu-height)!important;
  }
  html:root body.wv-single-desktop>.wv-shell:not([data-wv-single-shell]),
  html:root body.wv-single-desktop [data-wv-old-global] {
   display:none!important;
  }
  html:root body.wv-single-desktop:not(.wv-single-native).workspace-studio:not(.focus-mode) {
   grid-template-rows:68px minmax(0,1fr) auto auto!important;
  }
  html:root body.wv-single-desktop.workspace-studio.focus-mode {padding:0!important}
  html:root body.wv-single-desktop.workspace-studio.focus-mode>.wv-desktop-frame {display:none!important}
  body.wv-single-desktop .studio-header {inset-block-start:var(--wv-menu-height)!important}
  body.wv-single-desktop #center.mc-shell {height:calc(100dvh - var(--wv-menu-height))!important;min-inline-size:0}
  body.wv-single-desktop .mapHero,body.wv-single-desktop .mapActions {flex-wrap:wrap!important;min-inline-size:0!important}
  body.wv-single-desktop .mapActions {max-inline-size:100%!important}
  html:root body.wv-single-desktop>.wv-desktop-frame {
   display:block!important;position:fixed!important;inset:0!important;z-index:90!important;
   pointer-events:none!important;font:500 13px/1.3 system-ui,sans-serif!important;text-align:start!important;
   --menu-fg:#f1d0a0;--menu-muted:#dfb480;--menu-bg:#2c221a;--menu-bg-2:#3a2b20;
   --menu-line:#795539;--menu-on:#543820;--menu-focus:#ffc46d;--menu-art-shade:rgba(35,25,17,.84);
  }
  html:root body.wv-single-desktop.wv-vitrin-light>.wv-desktop-frame {
   --menu-fg:#583a21;--menu-muted:#6a4b2a;--menu-bg:#fffdf9;--menu-bg-2:#faf1e5;
   --menu-line:#d9c2a4;--menu-on:#f6e3c7;--menu-focus:#9d491b;--menu-art-shade:rgba(255,253,248,.93);
  }
  html:root .wv-desktop-frame *,html:root .wv-desktop-frame {box-sizing:border-box!important}
  html:root .wv-desktop-frame :is(.wv-desktop-header,.wv-desktop-rail) {
   position:absolute!important;background:var(--menu-bg)!important;color:var(--menu-fg)!important;
   margin:0!important;pointer-events:auto!important;border:0!important;border-radius:0!important;
  }
  html:root .wv-desktop-frame .wv-desktop-header {
   inset:0 0 auto 0!important;width:auto!important;max-width:none!important;
   height:var(--wv-menu-height)!important;padding:8px 15px 8px!important;
   display:grid!important;grid-template-columns:minmax(94px,1fr) minmax(180px,380px) minmax(220px,1fr)!important;
   grid-template-rows:34px 33px!important;gap:5px 12px!important;align-items:center!important;
   border-bottom:1px solid var(--menu-line)!important;
  }
  html:root .wv-desktop-frame .wv-desktop-brand {
   grid-column:1;grid-row:1;text-decoration:none!important;justify-self:start;
   display:flex!important;width:118px!important;height:32px!important;align-items:center;
  }
  html:root .wv-desktop-frame .wv-desktop-logo {
   position:static!important;display:block!important;width:100%!important;height:100%!important;
   object-fit:contain!important;object-position:left center!important;margin:0!important;
  }
  html:root .wv-desktop-frame .wv-desktop-search {
   grid-column:2;grid-row:1;display:flex!important;padding:0 10px!important;gap:7px;
   justify-content:flex-start!important;min-width:0!important;height:33px!important;
  }
  html:root .wv-desktop-frame .wv-desktop-search-label {
   white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:var(--menu-muted)!important;
  }
  html:root .wv-desktop-frame .wv-desktop-tools {
   display:flex!important;gap:5px;grid-column:3;grid-row:1;align-items:center;justify-self:end;
  }
  html:root .wv-desktop-frame .wv-desktop-shortcuts {
   display:flex!important;grid-area:2/1/3/4;align-items:center!important;justify-content:center!important;
   gap:7px!important;margin:0!important;padding:0!important;position:static!important;translate:none!important;
   background:transparent!important;border:0!important;box-shadow:none!important;
   min-inline-size:0!important;width:100%!important;
  }
  html:root .wv-desktop-frame :is(.wv-desktop-shortcut,.wv-desktop-search,.wv-desktop-tool,.wv-desktop-appearance,.wv-desktop-language-select,.wv-desktop-account,.wv-desktop-toggle,.wv-desktop-mini) {
   display:inline-flex!important;min-width:0!important;min-height:30px!important;align-items:center!important;justify-content:center!important;
   border-radius:9px!important;border:1px solid var(--menu-line)!important;padding:3px 8px!important;gap:5px;
   color:var(--menu-fg)!important;background:var(--menu-bg-2)!important;text-decoration:none!important;
   font:650 clamp(11px,1vw,13px)/1.1 system-ui,sans-serif!important;white-space:nowrap!important;
   cursor:pointer;position:relative!important;transform:none!important;
  }
  html:root .wv-desktop-frame .wv-desktop-shortcut {height:30px!important;padding-inline:12px!important;flex:0 0 auto}
  html:root .wv-desktop-frame :is(button,select,a)[hidden]{display:none!important}
  html:root .wv-desktop-frame .wv-desktop-tools select{display:block!important;max-width:88px!important}
  html:root .wv-desktop-frame .wv-desktop-tools select[hidden]{display:none!important}
  html:root .wv-desktop-frame .wv-desktop-avatar{width:22px!important;height:22px!important;object-fit:cover;border-radius:50%}
  html:root .wv-desktop-frame .wv-desktop-tool[data-count]:not([data-count=""])::after{
   content:attr(data-count);position:absolute;inset:-6px -6px auto auto;border-radius:10px;background:#a3381d;color:white;padding:2px 4px;font:700 10px/1 system-ui;
  }
  html:root .wv-desktop-frame .wv-desktop-rail{
   inset:var(--wv-menu-height) auto 0 0!important;width:var(--wv-menu-width)!important;display:flex!important;
   flex-direction:column;gap:8px;overflow:auto!important;overscroll-behavior:contain;
   scrollbar-width:thin;scrollbar-color:var(--menu-line) var(--menu-bg);padding:10px 7px!important;border-right:1px solid var(--menu-line)!important;
  }
  html:root .wv-desktop-frame .wv-desktop-toggle{align-self:flex-start}
  html:root .wv-desktop-frame .wv-desktop-groups{
   display:flex!important;flex-direction:column;gap:6px;padding:0!important;margin:0!important;position:static!important;
  }
  html:root .wv-desktop-frame .wv-desktop-group{
   padding:6px!important;margin:0!important;border:1px solid var(--menu-line)!important;border-radius:10px!important;
   background:linear-gradient(0deg,var(--menu-art-shade),var(--menu-art-shade)),var(--wv-art) center/cover,var(--menu-bg-2)!important;
  }
  html:root .wv-desktop-frame .wv-desktop-group-title{
   margin:0!important;padding:4px 5px 5px!important;color:var(--menu-muted)!important;
   font:750 10px/1.25 system-ui,sans-serif!important;letter-spacing:.06em!important;white-space:nowrap!important;
  }
  html:root .wv-desktop-frame .wv-desktop-link{
   display:flex!important;align-items:center!important;gap:7px!important;min-height:30px!important;
   color:var(--menu-fg)!important;background:transparent!important;border:0!important;border-radius:6px!important;
   margin:0!important;padding:3px 5px!important;text-decoration:none!important;
   font:600 13px/1.2 system-ui,sans-serif!important;white-space:nowrap!important;
  }
  html:root .wv-desktop-frame .wv-desktop-link>span:last-child{color:inherit!important;overflow:hidden;text-overflow:ellipsis}
  html:root .wv-desktop-frame svg{flex:none;width:16px!important;height:16px!important;stroke:currentColor!important;fill:none!important;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}
  html:root .wv-desktop-frame :is(a,button):is(:hover,[aria-current=page],[aria-expanded=true]) {background:var(--menu-on)!important;color:var(--menu-fg)!important}
  html:root .wv-desktop-frame :is(a,button,select):focus-visible{outline:2px solid var(--menu-focus)!important;outline-offset:-2px!important}
  html:root .wv-desktop-frame .wv-desktop-mini,
  html:root .wv-desktop-frame[data-compact] .wv-desktop-group-title,
  html:root .wv-desktop-frame[data-compact] .wv-desktop-group:not([data-open]) .wv-desktop-link {display:none!important}
  html:root .wv-desktop-frame[data-compact] .wv-desktop-mini{display:flex!important;width:100%!important;white-space:normal!important;text-align:center}
  html:root .wv-desktop-frame[data-compact] .wv-desktop-group[data-open] .wv-desktop-link{font-size:11px!important;gap:3px!important}
 }
}
@layer wv-desktop-shell {
 @media (min-width:1101px) {
  .wv-single-desktop > .wv-desktop-page-tools[hidden]{display:none!important}
  .wv-single-desktop > .wv-desktop-page-tools:not([hidden]){padding:7px 12px!important}
  .wv-single-desktop > .wv-desktop-page-tools .wv-desktop-page-filter {
   min-height:30px;border-radius:8px;padding:3px 10px;
   background:#f6e3c7;color:#583a21;border:1px solid #ae8358;
   font:650 13px/1.2 system-ui,sans-serif;cursor:pointer;
  }
 }
}
@layer wv-desktop-shell {
 @media (min-width:1101px) {
  .wv-desktop-frame .wv-desktop-account-dialog {
   pointer-events:auto!important;position:fixed;inset:44px 16px auto auto;
   margin:0;width:min(320px,90vw);max-height:75vh;overflow:auto;padding:12px;
   border:1px solid var(--menu-line);border-radius:12px;background:var(--menu-bg);color:var(--menu-fg);
  }
  .wv-desktop-frame .wv-desktop-account-dialog::backdrop{background:rgba(35,20,10,.35)}
  .wv-desktop-frame .wv-desktop-account-title{font:750 15px/1.25 system-ui;margin:0 0 8px}
 }
}

/* The existing R44 theme may re-show the native services chrome.
   Keep its DOM and handlers for the shared controls; only suppress the duplicate. */
@layer woryvo-desktop-r44 {
 @media (min-width:1101px) {
  html:root[data-wv-desktop-preflight] body.sp-services:not(.premium-mobile) > header#corporateShell.wv-shell,
  html:root body.sp-services.wv-single-desktop > header#corporateShell.wv-shell {
   display:none!important;
  }
 }
}

/* Authentication keeps its existing forms; only the common chrome and
   selected theme apply on the desktop account screen. */
@layer woryvo-desktop-r44 {
 @media (min-width:1101px) {
  html:root body.wv-account-u10.wv-single-desktop {
   --rail:var(--wv-menu-width)!important;
   padding-left:var(--wv-menu-width)!important;
   background:#20160f!important;
  }
  html:root body.wv-account-u10.wv-single-desktop.wv-vitrin-light {background:#faf9f6!important}
  html:root[data-wv-desktop-preflight] body.wv-account-u10:not(.premium-mobile)>#account-header,
  html:root body.wv-account-u10.wv-single-desktop>#account-header {display:none!important}
  html:root body.wv-account-u10.wv-single-desktop.wv-vitrin-light #account-main .auth-card {
   background:#fffdf9!important;color:#322316!important;border-color:#dfc7aa!important;
  }
  html:root body.wv-account-u10.wv-single-desktop.wv-vitrin-light #account-main :is(#auth-title,#auth-lead,label,small,.auth-divider,.auth-bottom,.auth-note,.auth-status) {color:#503722!important}
  html:root body.wv-account-u10.wv-single-desktop.wv-vitrin-light #account-main input {
   background:#fffefc!important;color:#322316!important;border-color:#b49370!important;
  }
  html:root body.wv-account-u10.wv-single-desktop.wv-vitrin-light #account-main a {color:#744319!important}
 }
}

/* The common desktop header owns its query field; the legacy mobile search
   stays intact and no full-screen dialog is needed. */
@layer wv-desktop-shell {
 @media (min-width:1101px) {
  html:root .wv-desktop-frame .wv-desktop-search {
   display:flex!important;cursor:text!important;gap:4px!important;width:100%!important;
  }
  html:root .wv-desktop-frame .wv-desktop-search:focus-within {outline:2px solid var(--menu-focus)!important;outline-offset:1px!important}
  html:root .wv-desktop-frame .wv-desktop-search-input {
   min-width:0!important;width:100%!important;height:100%!important;flex:1!important;
   padding:0 4px!important;margin:0!important;background:transparent!important;border:0!important;
   color:var(--menu-fg)!important;font:inherit!important;outline:none!important;box-shadow:none!important;
  }
  html:root .wv-desktop-frame .wv-desktop-search-input::placeholder {color:var(--menu-muted)!important;opacity:1}
  html:root .wv-desktop-frame .wv-desktop-search-submit {
   display:grid!important;place-items:center!important;flex:0 0 29px!important;height:27px!important;
   padding:0!important;margin:0!important;border:0!important;border-radius:5px!important;
   color:var(--menu-fg)!important;background:transparent!important;cursor:pointer!important;
  }
  html:root .wv-desktop-frame .wv-desktop-search-submit:focus-visible,
  html:root .wv-desktop-frame .wv-desktop-search-link:focus-visible {outline:2px solid var(--menu-focus)!important}
  html:root .wv-desktop-frame .wv-desktop-search-results {
   position:absolute!important;z-index:2!important;inset:calc(100% + 5px) 0 auto!important;
   width:100%!important;max-height:min(48vh,340px)!important;overflow:auto!important;
   background:var(--menu-bg)!important;color:var(--menu-fg)!important;border:1px solid var(--menu-line)!important;
   border-radius:10px!important;white-space:normal!important;box-shadow:0 12px 25px #0003!important;
  }
  html:root .wv-desktop-frame .wv-desktop-search-results[hidden],
  html:root .wv-desktop-frame .wv-desktop-search-status:empty {display:none!important}
  html:root .wv-desktop-frame .wv-desktop-search-status {margin:0!important;padding:10px!important;color:var(--menu-fg)!important}
  html:root .wv-desktop-frame .wv-desktop-search-items {list-style:none!important;margin:0!important;padding:4px!important}
  html:root .wv-desktop-frame .wv-desktop-search-link {
   display:block!important;padding:9px!important;color:var(--menu-fg)!important;text-decoration:none!important;overflow-wrap:anywhere
  }
  html:root .wv-desktop-frame .wv-desktop-search-link:hover {background:var(--menu-on)!important}
 }
}


/* The common desktop select is styled explicitly; old module text-fill and
   color-scheme cannot make either option disappear on its own canvas. */
@layer wv-desktop-shell {
 @media (min-width:1101px) {
  html:root body.wv-single-desktop .wv-desktop-frame .wv-desktop-tools :is(.wv-desktop-appearance,.wv-desktop-language-select),
  html:root body.wv-single-desktop .wv-desktop-frame .wv-desktop-tools :is(.wv-desktop-appearance,.wv-desktop-language-select) option {
   color:var(--menu-fg)!important;-webkit-text-fill-color:var(--menu-fg)!important;
   background-color:var(--menu-bg-2)!important;color-scheme:dark!important;
  }
  html:root body.wv-single-desktop.wv-vitrin-light .wv-desktop-frame .wv-desktop-tools :is(.wv-desktop-appearance,.wv-desktop-language-select),
  html:root body.wv-single-desktop.wv-vitrin-light .wv-desktop-frame .wv-desktop-tools :is(.wv-desktop-appearance,.wv-desktop-language-select) option {color-scheme:light!important}
 }
}

/* Existing R44 theme rules set the body separately in their own layer.
   Make the site canvas follow its shared palette, not the old dark fallback. */
@layer woryvo-desktop-r44 {
 @media (min-width:1101px) {
  html:root[data-wv-theme=light-r1] body.wv-single-desktop.wv-vitrin-light {
   background:var(--pl-bg,#f5f3ef)!important;color:var(--pl-ink,#29241d)!important;color-scheme:light!important;
  }
 }
}
@layer woryvo-theme {
 @media (min-width:1101px) {
  html:root[data-wv-theme=light-r1] body.wv-single-desktop.wv-yakin-standalone > #sp-root {
   background:var(--pl-bg,#f5f3ef)!important;color:var(--pl-ink,#29241d)!important;
  }
  html:root[data-wv-theme=light-r1] body.wv-single-desktop.mediaHub #wvShortsVitrine #mediaFilters {
   background:var(--wvs-paper,var(--pl-surface,#fffefa))!important;color:var(--wvs-ink,var(--pl-ink,#302319))!important;
  }
  html:root[data-wv-theme=light-r1] body.wv-single-desktop.mediaHub #wvShortsVitrine #mediaFilters :is(select,input,option) {
   background-color:var(--wvs-paper,var(--pl-input,#fffefa))!important;
   color:var(--wvs-ink,var(--pl-ink,#302319))!important;-webkit-text-fill-color:var(--wvs-ink,var(--pl-ink,#302319))!important;color-scheme:light!important;
  }
 }
}

@layer woryvo-theme {
 @media (min-width:1101px) {
  /* Chat and Studio keep their own component tokens. Change browsing chrome,
     not the direct-call stage, author media, or editing canvas. */
  html:root[data-wv-theme=light-r1] body.wv-single-desktop #center.mc-shell:not(:has(.dc-active)),
  html:root[data-wv-theme=light-r1] body.wv-single-desktop #center.mc-shell > :is(.mc-list,.mc-main:not(.dc-active)) {
   --chat-paper:var(--pl-bg,#f5f3ef)!important;--chat-panel:var(--pl-surface,#fffefa)!important;
   --chat-bubble:var(--pl-soft,#eeeae3)!important;--chat-ink:var(--pl-ink,#29241d)!important;
   --chat-muted:var(--pl-muted,#625b50)!important;--chat-line:var(--pl-line,#d2ccc1)!important;
   --chat-soft:var(--pl-soft,#eeeae3)!important;--chat-selected:#f6e6ca!important;
   --chat-link:var(--pl-link,#8b4900)!important;--chat-bar:var(--pl-surface,#fffefa)!important;
   background:var(--chat-panel)!important;color:var(--chat-ink)!important;color-scheme:light!important;
  }
  html:root[data-wv-theme=light-r1] body.wv-single-desktop #center.mc-shell :is(.mc-top,.mc-search,.mc-empty):not(.dc-active *) {
   background:var(--pl-surface,#fffefa)!important;color:var(--pl-ink,#29241d)!important;
   border-color:var(--pl-line,#d2ccc1)!important;color-scheme:light!important;
  }
  html:root[data-wv-theme=light-r1] body.wv-single-desktop.workspace-studio {
   color:var(--pl-ink,#29241d)!important;color-scheme:light!important;
  }
  html:root[data-wv-theme=light-r1] body.wv-single-desktop.workspace-studio :is(.studio-header,.tool-rail,#inspector,#timelineDock,.studio-status) {
   color:var(--pl-ink,#29241d)!important;color-scheme:light!important;
  }
  html:root[data-wv-theme=light-r1] body.wv-single-desktop.wv-world-mobile #writing-latest .wv-latest-invite::before {
   background:none!important;
  }
 }
}

@layer wv-desktop-shell {
 @media (min-width:1101px) {
  html:root body.wv-single-desktop .wv-desktop-frame > .wv-desktop-route-pending:not([hidden]) {
   display:grid!important;align-content:start!important;justify-items:start!important;gap:10px!important;
   position:absolute!important;inset:var(--wv-menu-height) 0 0 var(--wv-menu-width)!important;
   padding:clamp(2rem,4vw,4rem)!important;pointer-events:auto!important;
   background:var(--menu-bg)!important;color:var(--menu-fg)!important;
   -webkit-text-fill-color:var(--menu-fg)!important;
  }
  html:root body.wv-single-desktop .wv-desktop-route-pending > strong {
   font:700 1.25rem/1.25 system-ui,sans-serif!important;color:inherit!important;
  }
  html:root body.wv-single-desktop .wv-desktop-route-pending > span {
   color:inherit!important;font:500 .9rem/1.4 system-ui,sans-serif!important;
  }
 }
}

/* Before the desktop shell mounts, don't paint the destination's old chrome.
   Server preflight fails open after four seconds if the enhancement is unavailable. */
@layer wv-desktop-shell {
 @media (min-width:1101px) {
  html:root[data-wv-desktop-preflight] body:not(.wv-single-desktop,.premium-mobile) {
   opacity:0!important;visibility:hidden!important;pointer-events:none!important;
  }
  html:root[data-wv-desktop-preflight]:has(body:not(.wv-single-desktop,.premium-mobile))::before {
   content:"Loading…";position:fixed;inset:0;z-index:2000;display:grid;place-items:center;
   background:#2c221a;color:#f1d0a0;font:600 14px/1.4 system-ui,sans-serif;
  }
  html:root[data-wv-desktop-preflight]:lang(tr):has(body:not(.wv-single-desktop,.premium-mobile))::before {content:"Sayfa yükleniyor…"}
  html:root[data-wv-preflight-light][data-wv-desktop-preflight]:has(body:not(.wv-single-desktop,.premium-mobile))::before {
   background:#fffdf9;color:#583a21;
  }
 }
}

/* Legacy Media Hub screens that still load this shell generation.
 * Keep the page's own tools, and retain the old bar if the common bar did not mount. */
@layer woryvo-desktop-r44 {
 @media (min-width:1101px) {
  html body.wv-single-desktop.mediaHub:has(> .wv-desktop-header):has(#mediaMain) > header:not(.wv-desktop-header):has(> a.brand) {
    display:none!important;
  }
 }
}

/* Sohbet: the desktop shell already owns the site brand. Keep the chat controls. */
@media (min-width:1101px) {
 html:root body.wv-single-desktop > [data-wv-single-shell] ~ #center.mc-shell > .mc-list > header.mc-top > a.mc-brand {
  display:none!important;
 }
}

/* Desktop Sohbet only: the earlier navigation layer must override layered brand rules. */
@layer wv-navigation-acceptance {
 @media(min-width:1101px) {
  html:root body.wv-single-desktop > [data-wv-single-shell] ~ #center.mc-shell > .mc-list > header.mc-top > a.mc-brand {display:none!important}
 }
}

/* Keep the Sohbet shell in the selected site palette, without restyling calls. */
@layer woryvo-theme {
  html:root[data-page-palette="warm"] body main#center.mc-shell:not(:has(#main.dc-active)) {
    background-color:var(--pl-bg,#261e18)!important;
  }
  @media(max-width:1100px) {
    html:root[data-page-palette="warm"] body #center.mc-shell:not(:has(#main.dc-active)) > #main.mc-main {
      background-color:#2b2018!important;
    }
    html:root[data-page-palette="warm"] body #center.mc-shell:not(:has(#main.dc-active)) .mc-top {
      background:#241e17!important;
    }
  }
}
