/*
 * Virii8 Workspace Shell CSS module: v8-module-desktop-window-patch
 * Extracted from shell-core.css during v1.6.122 modular shell refactor.
 * Load order is controlled by V8E_Module_WorkspaceShell::enqueue_embedded_shell_assets().
 */
/* ---- v8-module-desktop-window-patch ---- */
html,
  body {
    width: 100%;
    height: 100dvh !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
  }

  html,
  body {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  #v8-os-container.v8-os-environment {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  #v8-os-container .v8-desktop {
    padding-bottom: max(0px, env(safe-area-inset-bottom, 0px));
  }

  #v8-os-container.v8-device-phone .v8-desktop,
  #v8-os-container.v8-device-phone .v8-desktop.v8-custom-icon-layout {
    display: grid !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: none;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    touch-action: pan-y;
  }

  #v8-os-container.v8-device-phone .v8-desktop::-webkit-scrollbar {
    display: none;
  }

  #v8-os-container.v8-device-phone .v8-mobile-page-dots {
    display: none !important;
  }

  #v8-os-container.v8-platform-mac:not(.v8-device-phone) .v8-taskbar,
  #v8-os-container.v8-platform-ios:not(.v8-device-phone) .v8-taskbar {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    max-width: calc(100vw - 28px) !important;
    transform: translateX(-50%) !important;
  }

  #v8-os-container .v8-taskbar,
  #v8-os-container .v8-phone-dock {
    z-index: 100500 !important;
  }

  #v8-os-container.v8-platform-win:not(.v8-device-phone) .v8-taskbar,
  #v8-os-container.v8-platform-android:not(.v8-device-phone) .v8-taskbar {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    box-sizing: border-box !important;
    transform: none !important;
  }

  #v8-os-container.v8-platform-mac:not(.v8-device-phone) .v8-desktop,
  #v8-os-container.v8-platform-ios:not(.v8-device-phone) .v8-desktop {
    bottom: calc(118px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #v8-os-container.v8-platform-win:not(.v8-device-phone) .v8-desktop,
  #v8-os-container.v8-platform-android:not(.v8-device-phone) .v8-desktop {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #v8-os-container.v8-device-phone .v8-phone-dock {
    bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #v8-os-container.v8-device-phone .v8-android-nav {
    bottom: env(safe-area-inset-bottom, 0px) !important;
  }

  .v8-module-app-icon .v8-icon-img {
    background: linear-gradient(180deg, rgba(56,189,248,0.24), rgba(34,197,94,0.16));
    border: 1px solid rgba(255,255,255,0.14);
    width: 54px;
    height: 54px;
    border-radius: 17px;
    display: grid;
    place-items: center;
  }

  .v8-device-phone .v8-module-app-icon .v8-icon-img {
    width: 62px;
    height: 62px;
  }

  .v8-module-window .v8-window-body {
    padding: 0 !important;
    background: #050806;
  }

  .v8-module-window-shell {
    min-height: 100%;
    background: #050806;
    color: var(--v8-text-main, #f8fafc);
    line-height: 1.45;
    user-select: text;
  }

  .v8-module-window-loading,
  .v8-module-window-error {
    padding: 24px;
    color: #dbeafe;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  }

  .v8-module-window-error {
    color: #fecaca;
  }

  .v8-module-window-shell a {
    color: #38bdf8;
  }

  #v8-os-container .v8-module-app-icon {
    z-index: 12;
    pointer-events: auto;
  }

  #v8-os-container .v8-module-app-empty {
    opacity: .82;
    cursor: help;
  }
