/* v88: one icon rail, accessible short motion, and on-demand labels. */
@layer workspace-upgrade {
  #workspace-x[data-navigation="88"] { --nav83-mobile-height: calc(64px + env(safe-area-inset-bottom, 0px)); }
  #workspace-x[data-navigation="88"] body { height: 100dvh !important; min-height: 0 !important; margin: 0 !important; overflow: hidden !important; }
  #workspace-x[data-navigation="88"] body > header,
  #workspace-x[data-navigation="88"] .layout > aside,
  #workspace-x[data-navigation="88"] #fluid-rail,
  #workspace-x[data-navigation="88"] .kk-drawer-backdrop,
  #workspace-x[data-navigation="88"] #workspace > .workspace-bar,
  #workspace-x[data-navigation="88"] .nav83-scroll > .kk-gap { display: none !important; }
  #workspace-x[data-navigation="88"] .layout { display: block !important; height: 100dvh !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; }
  #workspace-x[data-navigation="88"] .layout > main { position: relative !important; grid-column: auto !important; width: 100% !important; height: 100% !important; min-height: 0 !important; box-sizing: border-box !important; }
  #workspace-x[data-navigation="88"] .layout > main:has(#workspace:not([hidden])) { display: flex !important; flex-direction: column !important; padding: 0 !important; overflow: hidden !important; }
  #workspace-x[data-navigation="88"] #workspace:not([hidden]) { display: flex !important; flex-direction: column !important; flex: 1 1 auto !important; min-height: 0 !important; height: 100% !important; margin: 0 !important; padding: 0 !important; }
  #workspace-x[data-navigation="88"] #app-frame { flex: 1 1 auto !important; width: 100% !important; height: 100% !important; min-height: 0 !important; max-height: none !important; border: 0 !important; border-radius: 0 !important; }
  #workspace-x[data-navigation="88"] .nav83-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; min-width: 0 !important; min-height: 0 !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }

  #workspace-x[data-navigation="88"] .kk-rail { display: flex !important; flex-direction: column !important; align-items: stretch !important; height: 100dvh !important; min-height: 0 !important; gap: 0 !important; padding: 0 !important; overflow: hidden !important; box-sizing: border-box !important; }
  #workspace-x[data-navigation="88"] .nav84-head { display: flex; align-items: center; flex: none; gap: 8px; width: 100%; min-height: 72px; padding: 14px 12px; background: var(--kk-rail); box-sizing: border-box; }
  #workspace-x[data-navigation="88"] .kk-rail .nav84-head > .kk-logo { display: flex !important; align-items: center !important; justify-content: center !important; flex: 0 0 44px !important; position: relative !important; width: 44px !important; min-width: 44px !important; height: 44px !important; min-height: 44px !important; margin: 0 !important; padding: 2px !important; gap: 0 !important; border-radius: 50% !important; box-sizing: border-box !important; }
  #workspace-x[data-navigation="88"] .nav84-head > #command-open { display: flex !important; align-items: center !important; justify-content: flex-start !important; flex: 1 1 auto !important; width: auto !important; min-width: 0 !important; min-height: 44px !important; height: 44px !important; margin: 0 !important; padding: 10px !important; gap: 8px !important; border: 0 !important; border-radius: 24px !important; color: var(--kk-ink) !important; background: transparent !important; box-shadow: none !important; font: inherit !important; font-size: 14px !important; line-height: 1.4 !important; text-align: left !important; cursor: pointer; box-sizing: border-box !important; }
  #workspace-x[data-navigation="88"] .nav84-head #command-open > span:not(.ui-icon) { display: block !important; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #workspace-x[data-navigation="88"] .nav83-scroll { display: flex; flex-direction: column; align-items: stretch; flex: 1 1 auto; min-height: 0; gap: 2px; padding: 4px 12px 10px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--kk-line) transparent; scroll-padding-block: 8px; box-sizing: border-box; }
  #workspace-x[data-navigation="88"] .nav83-scroll > .kk-ico { position: relative !important; flex: none !important; width: 100% !important; min-height: 44px !important; height: 44px !important; margin: 0 !important; box-sizing: border-box !important; }
  #workspace-x[data-navigation="88"] .nav83-scroll > hr { flex: none !important; align-self: stretch !important; width: auto !important; margin: 3px 12px !important; }
  #workspace-x[data-navigation="88"] #command-open > :is(.ui-icon, svg) { display: inline-flex !important; flex: none !important; width: 24px !important; height: 24px !important; }
  #workspace-x[data-navigation="88"] #command-open kbd { display: none !important; }
  #workspace-x[data-navigation="88"] .nav83-account { display: flex; align-items: center; flex: none; min-height: 76px; min-width: 0; width: 100%; gap: 10px; margin: 0; padding: 12px 20px max(12px,env(safe-area-inset-bottom,0px)); border-top: 1px solid var(--kk-line); color: var(--kk-ink); background: var(--kk-rail); box-sizing: border-box; }
  #workspace-x[data-navigation="88"] .nav83-account > .kk-personal-entry { display: grid !important; place-items: center !important; position: relative !important; inset: auto !important; flex: 0 0 44px !important; width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important; margin: 0 !important; padding: 3px !important; border: 1px solid var(--kk-line) !important; border-radius: 50% !important; background: var(--kk-main) !important; color: var(--kk-ink) !important; box-shadow: none !important; cursor: pointer; }
  #workspace-x[data-navigation="88"] .nav83-account .kk-av { width: 36px !important; height: 36px !important; border-radius: 50% !important; overflow: hidden !important; }
  #workspace-x[data-navigation="88"] .nav83-collection { display: flex; flex-direction: column; flex: none; gap: 2px; padding: 4px 0 6px; margin: 0 0 2px; border-bottom: 1px solid var(--kk-line); }
  #workspace-x[data-navigation="88"] .nav83-collection > p { margin: 4px 14px 2px; color: var(--kk-muted); font-size: 11px; line-height: 1.5; font-weight: 650; letter-spacing: .015em; }
  #workspace-x[data-navigation="88"] .nav83-tool { display: flex !important; align-items: center; flex: none !important; gap: 12px; width: 100% !important; min-width: 0; min-height: 44px !important; height: auto !important; padding: 10px 14px !important; margin: 0 !important; border: 0; border-radius: 10px; color: var(--kk-muted); background: transparent; font: inherit; font-size: 13px; line-height: 1.45; text-align: left; cursor: pointer; box-sizing: border-box !important; }
  #workspace-x[data-navigation="88"] .nav83-tool > :first-child { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 20px; height: 20px; }
  #workspace-x[data-navigation="88"] .nav83-tool svg { width: 20px; height: 20px; }
  #workspace-x[data-navigation="88"] .nav83-tool > :last-child:not(:first-child) { min-width: 0; overflow-wrap: anywhere; }
  #workspace-x[data-navigation="88"] .nav83-tool[aria-current="page"] { color: var(--kk-ink); background: var(--kk-active); font-weight: 700; }
  #workspace-x[data-navigation="88"] :is(.nav83-tool, .nav84-head > #command-open, .nav84-head > .kk-logo, .nav83-account > .kk-personal-entry):hover { background: var(--kk-hover) !important; }
  #workspace-x[data-navigation="88"] :is(.nav83-tool, .nav84-head > #command-open, .nav84-head > .kk-logo, .nav83-account > .kk-personal-entry, .nav83-mobile-bar button, #nav83-dialog button):focus-visible { outline: 2px solid var(--kk-blue) !important; outline-offset: -2px !important; }
  #workspace-x[data-navigation="88"] .nav83-mobile-bar { display: none !important; }
  #workspace-x[data-navigation="88"] #nav83-dialog:not([open]) { display: none !important; }
  #workspace-x[data-navigation="88"] #nav83-dialog { inset: 0 auto 0 0 !important; width: min(360px,calc(100vw - 24px)) !important; max-width: none !important; height: 100dvh !important; max-height: 100dvh !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-right: 1px solid var(--kk-line) !important; border-radius: 0 !important; color: var(--kk-ink); background: var(--kk-rail); box-shadow: 8px 0 40px rgb(0 0 0 / 15%) !important; overflow: hidden !important; box-sizing: border-box !important; }
  #workspace-x[data-navigation="88"] #nav83-dialog[open] { display: flex !important; flex-direction: column !important; }
  #workspace-x[data-navigation="88"] #nav83-dialog::backdrop { background: rgb(0 0 0 / 38%); }
  #workspace-x[data-navigation="88"] #nav83-dialog > header { display: flex !important; align-items: center !important; justify-content: space-between !important; flex: none !important; min-height: 64px !important; height: auto !important; padding: max(8px,env(safe-area-inset-top,0px)) 16px 8px !important; gap: 16px !important; border-bottom: 1px solid var(--kk-line) !important; box-sizing: border-box !important; }
  #workspace-x[data-navigation="88"] #nav83-dialog > header :is(h1,h2,p) { margin: 0; color: var(--kk-ink); font-size: 18px; font-weight: 700; }
  #workspace-x[data-navigation="88"] #nav83-dialog > header button { display: grid; place-items: center; flex: none; width: 44px; min-height: 44px; padding: 10px; border: 0; border-radius: 50%; color: var(--kk-ink); background: transparent; cursor: pointer; }
  #workspace-x[data-navigation="88"] #nav83-dialog > header button:hover { background: var(--kk-hover); }
  #workspace-x[data-navigation="88"] #nav83-dialog > header button svg { width: 22px; height: 22px; }
  /* One label layer outside the scrolling rail. Existing native names remain accessible. */
  #workspace-x[data-navigation="88"] #nav87-tooltip {
    position: fixed !important; z-index: 12002; width: max-content; max-width: min(260px,calc(100vw - 24px));
    margin: 0; padding: 7px 11px; border: 1px solid var(--kk-line); border-radius: 8px;
    background: var(--kk-ink); color: var(--kk-main); box-shadow: 0 4px 18px rgb(0 0 0 / 12%);
    font: 500 13px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    white-space: normal; overflow-wrap: anywhere; pointer-events: auto; box-sizing: border-box;
  }
  #workspace-x[data-navigation="88"] #nav87-tooltip[hidden] { display: none !important; }
  #workspace-x[data-navigation="88"] #nav87-tooltip:not([hidden]) { display: block !important; }

  @media (min-width:900px) {
    #workspace-x[data-navigation="88"] body { padding: 0 0 0 var(--wx-nav) !important; }
    #workspace-x[data-navigation="88"] body > .kk-rail { position: fixed !important; inset: 0 auto 0 0 !important; width: var(--wx-nav) !important; }
  }
  @media (min-width:900px) {
    #workspace-x[data-navigation="88"] { --wx-nav: 72px !important; }
    #workspace-x[data-navigation="88"] .nav84-head { flex-direction: column; justify-content: center; min-height: 112px; gap: 4px; padding: 10px 12px; }
    #workspace-x[data-navigation="88"] .nav84-head > #command-open { justify-content: center !important; flex: none !important; width: 44px !important; padding: 10px !important; gap: 0 !important; }
    #workspace-x[data-navigation="88"] .nav83-scroll { align-items: center; padding-inline: 10px; }
    #workspace-x[data-navigation="88"] .nav83-scroll > .kk-ico { justify-content: center !important; width: 48px !important; padding-inline: 10px !important; gap: 0 !important; }
    #workspace-x[data-navigation="88"] .nav83-scroll .wx-nav-label,
    #workspace-x[data-navigation="88"] .nav84-head #command-open > span:not(.ui-icon),
    #workspace-x[data-navigation="88"] .nav83-collection > p,
    #workspace-x[data-navigation="88"] .nav83-tool > :last-child:not(:first-child) { display: none !important; }
    #workspace-x[data-navigation="88"] .nav83-collection { width: 100%; align-items: center; gap: 2px; padding-block: 4px; }
    #workspace-x[data-navigation="88"] .nav83-tool { justify-content: center; width: 48px !important; padding: 12px !important; }
    #workspace-x[data-navigation="88"] .nav83-account { justify-content: center; padding-inline: 8px; gap: 0; }
    #workspace-x[data-navigation="88"] .kk-rail .kk-badge { right: 2px !important; top: 2px !important; }
  }
  @media (max-width:899px) {
    #workspace-x[data-navigation="88"] body { padding: 0 !important; }
    #workspace-x[data-navigation="88"] body > .kk-rail { display: none !important; }
    #workspace-x[data-navigation="88"] .layout { height: calc(100dvh - var(--nav83-mobile-height)) !important; }
    #workspace-x[data-navigation="88"] .layout > main { padding-bottom: 24px !important; }
    #workspace-x[data-navigation="88"] .layout > main:has(#workspace:not([hidden])) { padding-bottom: 0 !important; }
    #workspace-x[data-navigation="88"] #nav83-dialog .kk-rail { position: relative !important; inset: auto !important; display: flex !important; flex: 1 1 auto !important; width: 100% !important; height: auto !important; max-height: none !important; border: 0 !important; }
    #workspace-x[data-navigation="88"] #nav83-dialog .nav83-scroll { padding: 4px 14px max(12px,env(safe-area-inset-bottom,0px)); }
    #workspace-x[data-navigation="88"] #nav83-dialog .nav84-head { min-height: 72px; padding-inline: 14px; }
    #workspace-x[data-navigation="88"] #nav83-dialog .kk-rail .nav84-head > .kk-logo { justify-content: center !important; width: 44px !important; min-height: 44px !important; height: 44px !important; padding: 2px !important; gap: 0 !important; }
    #workspace-x[data-navigation="88"] #nav83-dialog .nav83-scroll > .kk-ico { display: flex !important; align-items: center !important; justify-content: flex-start !important; width: 100% !important; min-height: 44px !important; height: 44px !important; padding: 10px 16px !important; gap: 16px !important; border-radius: 26px !important; }
    #workspace-x[data-navigation="88"] #nav83-dialog .kk-rail .kk-ico svg { width: 24px !important; height: 24px !important; flex: none !important; }
    #workspace-x[data-navigation="88"] #nav83-dialog .wx-nav-label { display: block !important; min-width: 0; white-space: normal !important; font-size: 16px !important; line-height: 1.4; overflow-wrap: anywhere; }
    #workspace-x[data-navigation="88"] #nav83-dialog .wx-brand-mark { display: grid; place-items: center; width: 40px; height: 40px; }
    #workspace-x[data-navigation="88"] #nav83-dialog .nav83-tool { min-height: 46px !important; height: auto !important; padding: 10px 14px !important; font-size: 14px; }
    #workspace-x[data-navigation="88"] .nav83-mobile-bar { position: fixed !important; inset: auto 0 0 !important; z-index: 12001 !important; display: flex !important; align-items: center; gap: 8px; height: var(--nav83-mobile-height); padding: 6px 12px calc(6px + env(safe-area-inset-bottom,0px)); border-top: 1px solid var(--kk-line); color: var(--kk-ink); background: var(--kk-main); box-sizing: border-box; }
    #workspace-x[data-navigation="88"] .nav83-mobile-bar .nav83-account { flex: 1 1 auto; width: auto; min-height: 44px; padding: 0; margin: 0; gap: 8px; border: 0; background: transparent; }
    #workspace-x[data-navigation="88"] .nav83-mobile-bar > button { display: flex; align-items: center; justify-content: center; flex: none; gap: 6px; min-width: 44px; min-height: 48px; margin: 0; padding: 10px 12px; border: 0; border-radius: 24px; color: var(--kk-ink); background: transparent; font: inherit; font-size: 13px; line-height: 1.4; cursor: pointer; }
    #workspace-x[data-navigation="88"] .nav83-mobile-bar > button:hover { background: var(--kk-hover); }
    #workspace-x[data-navigation="88"] .nav83-mobile-bar > button :is(svg,.ui-icon) { width: 22px; height: 22px; flex: none; }
    #workspace-x[data-navigation="88"] #nav83-menu { background: var(--kk-soft); }
    #workspace-x[data-navigation="88"] .nav83-mobile-bar > button { width: 48px !important; height: 48px !important; min-height: 48px !important; padding: 12px !important; }
    #workspace-x[data-navigation="88"] .nav83-mobile-bar > button .nav83-button-label { display: none !important; }
  }
  @media (prefers-reduced-motion:reduce) {
    #workspace-x[data-navigation="88"] :is(.nav83-scroll,.nav83-tool,.nav83-mobile-bar,#nav83-dialog) { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  }
  @media (forced-colors:active) {
    #workspace-x[data-navigation="88"] :is(.nav83-tool[aria-current="page"],.nav84-head > #command-open,.nav84-head > .kk-logo,.nav83-account > .kk-personal-entry,#nav83-menu) { border: 1px solid ButtonText !important; }
    #workspace-x[data-navigation="88"] .nav83-tool[aria-current="page"] { outline: 1px solid Highlight !important; outline-offset: -2px; }
  }

  /* Short feedback on chrome only; application frames and data controls stay independent. */
  #workspace-x[data-navigation="88"] {
    --nav88-feedback: 140ms;
    --nav88-ease: cubic-bezier(.2,.8,.2,1);
  }
  #workspace-x[data-navigation="88"] :is(.kk-rail .kk-ico,.nav83-tool,#command-open,.kk-personal-entry,.nav83-mobile-bar > button,#nav83-dialog > header button,.kk-settings-tabs button,.launcher-app) {
    transition: background-color var(--nav88-feedback) ease,color var(--nav88-feedback) ease,border-color var(--nav88-feedback) ease !important;
  }
  #workspace-x[data-navigation="88"] :is(.kk-rail .kk-ico,.nav83-tool,#command-open,.nav83-mobile-bar > button) > :is(svg,.ui-icon) {
    transition: transform 100ms var(--nav88-ease) !important;
  }
  #workspace-x[data-navigation="88"] :is(.kk-rail .kk-ico,.nav83-tool,#command-open,.nav83-mobile-bar > button):not(:disabled):active > :is(svg,.ui-icon) {
    transform: scale(.94) !important;
  }
  #workspace-x[data-navigation="88"] #nav87-tooltip:not([hidden]) { animation: nav88-fade-in 120ms ease-out both !important; }
  #workspace-x[data-navigation="88"] #app-command[open] { animation: nav88-panel-in 180ms var(--nav88-ease) both !important; }
  #workspace-x[data-navigation="88"] #account-panel:not([hidden]) .kk-settings-pane:not([hidden]) { animation: nav88-fade-in 140ms ease-out both !important; }
  #workspace-x[data-navigation="88"] :is(#app-command,#nav83-dialog)[open]::backdrop { animation: nav88-fade-in 160ms ease-out both !important; }
  @media (max-width:899px) {
    #workspace-x[data-navigation="88"] #nav83-dialog[open] { animation: nav88-drawer-in 180ms var(--nav88-ease) both !important; }
  }
  @keyframes nav88-fade-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes nav88-panel-in { from { opacity: 0; translate: 0 -6px; } to { opacity: 1; translate: 0 0; } }
  @keyframes nav88-drawer-in { from { opacity: .6; translate: -10px 0; } to { opacity: 1; translate: 0 0; } }
  #workspace-x[data-navigation="88"][data-nav-motion="reduce"] :is(.kk-rail,.nav83-mobile-bar,#nav83-dialog,#app-command,#account-panel) *,
  #workspace-x[data-navigation="88"][data-nav-motion="reduce"] :is(#nav87-tooltip:not([hidden]),#nav83-dialog[open],#app-command[open],#account-panel:not([hidden]) .kk-settings-pane:not([hidden])),
  #workspace-x[data-navigation="88"][data-nav-motion="reduce"] :is(#app-command,#nav83-dialog)::backdrop {
    animation: none !important; transition: none !important;
  }
  #workspace-x[data-navigation="88"][data-nav-motion="reduce"] :is(.kk-rail .kk-ico,.nav83-tool,#command-open,.nav83-mobile-bar > button):not(:disabled):active > :is(svg,.ui-icon) { transform: none !important; }
  @media (prefers-reduced-motion:reduce) {
    #workspace-x[data-navigation="88"] :is(.kk-rail,.nav83-mobile-bar,#nav83-dialog,#app-command,#account-panel) *,
    #workspace-x[data-navigation="88"] :is(#nav87-tooltip:not([hidden]),#nav83-dialog[open],#app-command[open],#account-panel:not([hidden]) .kk-settings-pane:not([hidden])),
    #workspace-x[data-navigation="88"] :is(#app-command,#nav83-dialog)[open]::backdrop { animation: none !important; transition: none !important; }
    #workspace-x[data-navigation="88"] :is(.kk-rail .kk-ico,.nav83-tool,#command-open,.nav83-mobile-bar > button):not(:disabled):active > :is(svg,.ui-icon) { transform: none !important; }
  }
}
