/* Yuki-inspired interaction polish for ZuzuOS.
   Keeps ZuzuOS branding and existing app/auth logic; this is an additive visual layer. */
:root {
  --zy-glass: rgb(16 19 27 / 78%);
  --zy-glass-strong: rgb(12 15 22 / 94%);
  --zy-line: rgb(255 255 255 / 12%);
  --zy-line-soft: rgb(255 255 255 / 7%);
  --zy-text: #f4f6fb;
  --zy-muted: #a4adbd;
  --zy-accent: #8dbbff;
  --zy-radius: 14px;
}
#desktop[data-shell-style] {
  color: var(--zy-text);
  -webkit-font-smoothing: antialiased;
}
#desktop[data-shell-style] button {
  -webkit-tap-highlight-color: transparent;
}
#desktop[data-shell-style] button:focus-visible,
#desktop[data-shell-style] [tabindex]:focus-visible {
  outline: 2px solid var(--zy-accent);
  outline-offset: 3px;
}
#desktop[data-shell-style] .os-scene-shortcut,
#desktop[data-shell-style] .os-shortcut {
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
#desktop[data-shell-style] .os-scene-shortcut:hover,
#desktop[data-shell-style] .os-shortcut:hover {
  transform: translateY(-1px);
}
#desktop[data-shell-style] .os-menubar {
  min-height: 34px;
  border-bottom: 1px solid var(--zy-line);
  background: rgb(10 12 18 / 76%);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}
#desktop[data-shell-style] .taskbar {
  border: 1px solid var(--zy-line);
  background: rgb(17 20 28 / 78%);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  box-shadow: 0 12px 48px rgb(0 0 0 / 28%);
}
#desktop[data-shell-style] .taskbar button,
#desktop[data-shell-style] .task-app,
#desktop[data-shell-style] .task-home {
  transition: background .16s ease, transform .16s ease, border-color .16s ease;
}
#desktop[data-shell-style] .taskbar button:hover,
#desktop[data-shell-style] .task-app:hover,
#desktop[data-shell-style] .task-home:hover {
  background-color: rgb(255 255 255 / 10%);
}
#desktop[data-shell-style] .taskbar button:active,
#desktop[data-shell-style] .task-app:active,
#desktop[data-shell-style] .task-home:active {
  transform: scale(.96);
}
#desktop[data-shell-style] .os-window,
#desktop[data-shell-style] #app-window {
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: var(--zy-radius);
  background: var(--zy-glass-strong);
  box-shadow: 0 26px 90px rgb(0 0 0 / 48%), 0 2px 12px rgb(0 0 0 / 18%);
  backdrop-filter: blur(30px) saturate(145%);
  -webkit-backdrop-filter: blur(30px) saturate(145%);
  animation: zy-window-enter .22s cubic-bezier(.2,.8,.2,1) both;
}
#desktop[data-shell-style] .os-window .window-bar,
#desktop[data-shell-style] #app-window .window-bar {
  min-height: 42px;
  border-bottom: 1px solid var(--zy-line-soft);
  background: rgb(255 255 255 / 3%);
  user-select: none;
}
#desktop[data-shell-style] .os-window button,
#desktop[data-shell-style] #app-window button {
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
#desktop[data-shell-style] .os-window button:hover,
#desktop[data-shell-style] #app-window button:hover {
  filter: brightness(1.12);
}
#desktop[data-shell-style] .os-window [data-close]:hover,
#desktop[data-shell-style] #close-window:hover {
  background: #d94c5c !important;
  color: white !important;
}
#desktop[data-shell-style] #os-start-menu,
#desktop[data-shell-style] .os-start-menu,
#desktop[data-shell-style] .os-quick-panel,
#desktop[data-shell-style] .os-notification-center,
#desktop[data-shell-style] .os-context-menu {
  border: 1px solid var(--zy-line);
  border-radius: 18px;
  background: var(--zy-glass-strong);
  box-shadow: 0 24px 80px rgb(0 0 0 / 48%);
  backdrop-filter: blur(32px) saturate(150%);
  -webkit-backdrop-filter: blur(32px) saturate(150%);
}
#desktop[data-shell-style] .os-start-menu button,
#desktop[data-shell-style] .os-quick-panel button,
#desktop[data-shell-style] .os-notification-center button {
  transition: background .15s ease, border-color .15s ease;
}
#desktop[data-shell-style] .os-start-menu button:hover,
#desktop[data-shell-style] .os-quick-panel button:hover,
#desktop[data-shell-style] .os-notification-center button:hover {
  background: rgb(255 255 255 / 8%);
}
#desktop[data-shell-style] .os-scene-day-wrap {
  animation: zy-fade-up .65s cubic-bezier(.2,.8,.2,1) both;
}
#desktop[data-shell-style] .os-scene-shortcuts {
  animation: zy-fade-up .45s .08s cubic-bezier(.2,.8,.2,1) both;
}
#desktop[data-shell-style] .toast,
#desktop[data-shell-style] .os-toast,
#desktop[data-shell-style] .os-notification {
  border: 1px solid var(--zy-line);
  border-radius: 12px;
  background: rgb(17 20 28 / 92%);
  box-shadow: 0 14px 45px rgb(0 0 0 / 30%);
  backdrop-filter: blur(22px);
}
#desktop[data-shell-style] .os-scene-widget,
#desktop[data-shell-style] .os-widget {
  border: 1px solid var(--zy-line-soft);
  border-radius: 14px;
  background: rgb(12 15 22 / 48%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
#desktop[data-shell-style="macos"] .taskbar {
  border-radius: 18px;
  border: 1px solid var(--zy-line);
  background: rgb(17 20 28 / 72%);
}
@keyframes zy-window-enter {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes zy-fade-up {
  from { opacity: 0; translate: 0 8px; }
  to { opacity: 1; translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  #desktop[data-shell-style] *,
  #desktop[data-shell-style] *::before,
  #desktop[data-shell-style] *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}


/* ZuzuOS usability and visual consistency pass */
:root {
  --zy-surface: rgba(18, 23, 34, .88);
  --zy-surface-raised: rgba(28, 35, 49, .92);
  --zy-border: rgba(226, 235, 255, .13);
  --zy-copy: #f3f6fc;
  --zy-copy-muted: #b1bdcf;
  --zy-focus: #9bc4ff;
}
html { text-rendering: optimizeLegibility; }
body { -webkit-font-smoothing: antialiased; }
button, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { line-height: 1.35; }
button:disabled { opacity: .52; cursor: not-allowed; transform: none !important; }
p, small, label, strong, h1, h2, h3, span { overflow-wrap: anywhere; }
.muted, .app-tile small, .profile-stats .muted, .account-menu-head small {
  color: var(--zy-copy-muted);
}
.eyebrow, .panel-kicker { color: #b6cfff; }
.brand-mark, .mini-logo, .task-home, .os-start-mark {
  font-family: Manrope, 'DM Sans', sans-serif;
  font-weight: 800;
  letter-spacing: -.06em;
}
.app-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.app-tile {
  min-width: 0;
  min-height: 88px;
  border-color: var(--zy-border);
  background: linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.022));
}
.app-tile > span:nth-child(2) { min-width: 0; }
.app-tile strong { font-size: 13px; line-height: 1.4; }
.app-tile small { font-size: 11px; line-height: 1.45; }
.app-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: inset 0 1px rgba(255,255,255,.08);
}
.topbar { gap: 16px; }
.top-center { text-align: center; }
.account-chip { max-width: 230px; }
.account-chip #account-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.taskbar { gap: 7px; }
.task-app { white-space: nowrap; }
.task-clock { font-variant-numeric: tabular-nums; }
.app-window { isolation: isolate; }
.window-bar { cursor: grab; }
.window-bar:active { cursor: grabbing; }
.window-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.window-body { color: var(--zy-copy); line-height: 1.55; }
.app-form input, .app-form textarea, .app-form select,
.setting-row input, .setting-row select, .field input, .note-panel textarea {
  color: #f4f7ff;
  caret-color: var(--zy-focus);
}
.app-form input::placeholder, .app-form textarea::placeholder,
.field input::placeholder, .note-panel textarea::placeholder { color: #8f9db2; }
.primary { box-shadow: 0 3px 14px rgba(112, 165, 242, .12); }
.primary:focus-visible, .secondary:focus-visible, .quiet-button:focus-visible,
.text-button:focus-visible, .app-tile:focus-visible {
  outline: 2px solid var(--zy-focus);
  outline-offset: 3px;
}
#os-start-menu, .os-start-menu { color: #f3f6fc; }
.os-launch-item { min-width: 0; }
.os-launch-item strong { line-height: 1.35; }
.os-launch-item small { line-height: 1.4; color: #b1bdcf; }
.os-desktop-shortcuts .os-shortcut { max-width: 100px; }
.os-desktop-shortcuts .os-shortcut small { line-height: 1.35; color: #f0f4fb; text-shadow: 0 1px 5px #000; }
.os-window { min-width: min(320px, calc(100vw - 20px)); max-width: calc(100vw - 16px); }
.os-window-content { color: #f0f4fb; }
.os-window-content button, .os-window-content input, .os-window-content textarea { max-width: 100%; }
.os-system-tray { max-width: calc(100vw - 16px); }
.toast { max-width: min(460px, calc(100vw - 28px)); text-align: center; line-height: 1.5; }
.cookie-notice { max-width: min(440px, calc(100vw - 24px)); }
#auth-screen .auth-card, #reset-password-screen .auth-card { box-shadow: 0 28px 90px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.04); }
#auth-title, #reset-password-screen h1, .welcome-row h1 { line-height: 1.12; }
.field input { min-height: 46px; }
@media (max-width: 760px) {
  .topbar { height: 62px; padding-inline: 16px; }
  .top-center { display: none; }
  .desktop-content { width: calc(100% - 28px); padding-top: 27px; }
  .welcome-row { align-items: flex-start; gap: 16px; margin-bottom: 28px; }
  .welcome-row h1 { font-size: clamp(25px, 6vw, 32px); }
  .clock-card { padding: 10px 12px; flex: 0 0 auto; }
  .clock-card span:first-child { font-size: 20px; }
  .bottom-grid { grid-template-columns: minmax(0, 1fr); }
  .taskbar { padding-inline: 10px; gap: 5px; }
  .task-app { padding-inline: 9px; }
  .task-app span { display: none; }
  .desktop-footer { gap: 12px; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .auth-card { padding: 28px 22px 23px; border-radius: 22px; }
  .welcome-row { flex-direction: column; align-items: stretch; }
  .clock-card { align-items: flex-start; width: fit-content; }
  .section-heading { gap: 12px; align-items: flex-start; }
  .section-heading h2 { font-size: 16px; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .app-tile { gap: 9px; padding: 12px 10px; min-height: 82px; border-radius: 15px; }
  .app-icon { flex-basis: 34px; width: 34px; height: 34px; border-radius: 11px; font-size: 18px; }
  .app-tile strong { font-size: 12px; }
  .app-tile small { font-size: 10px; }
  .tile-arrow { display: none; }
  .panel { padding: 16px; }
  .panel-footer { align-items: flex-start; flex-direction: column; }
  .panel-footer .primary { width: 100%; }
  .task-home { flex: 0 0 34px; }
  .taskbar-separator { margin-inline: 1px; }
  .task-clock { padding-inline: 2px; font-size: 10px; }
  .task-account { flex: 0 0 31px; }
  .os-desktop-shortcuts { gap: 5px; }
  .os-shortcut { width: 70px; }
  .os-window { left: 8px !important; top: 72px !important; width: calc(100vw - 16px) !important; max-height: calc(100dvh - 150px); }
  .os-window-content { max-height: calc(100dvh - 220px); overflow: auto; }
  .cookie-notice { left: 12px; bottom: 76px; flex-direction: column; align-items: stretch; gap: 10px; }
  .cookie-notice button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}


/* YukiOS-style desktop shell: dense floating workspace, glass panels and desktop-first controls.
   This is an original adaptation for ZuzuOS, not a replacement for its auth/data layer. */
:root {
  --zy-radius: 13px;
  --zy-glass: rgba(18, 21, 29, .76);
  --zy-glass-strong: rgba(13, 15, 21, .94);
  --zy-line: rgba(255,255,255,.14);
  --zy-line-soft: rgba(255,255,255,.075);
  --zy-accent: #a6c8ff;
}
#desktop[data-shell-style] {
  position: relative;
  overflow: hidden;
  min-height: 100dvh;
  background-color: #090b10;
  font-family: Inter, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
}
#desktop[data-shell-style] .os-menubar {
  position: relative;
  z-index: 40;
  min-height: 32px;
  padding-inline: 12px;
  background: rgba(8,10,15,.72);
  border-bottom: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 1px rgba(255,255,255,.025);
}
#desktop[data-shell-style] .os-menubar button {
  min-height: 27px;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 11px;
}
#desktop[data-shell-style] .taskbar {
  z-index: 60;
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 15px;
  background: rgba(18,20,27,.78);
  box-shadow: 0 14px 42px rgba(0,0,0,.4), inset 0 1px rgba(255,255,255,.06);
  backdrop-filter: blur(34px) saturate(160%);
  -webkit-backdrop-filter: blur(34px) saturate(160%);
}
#desktop[data-shell-style] .taskbar button,
#desktop[data-shell-style] .task-app,
#desktop[data-shell-style] .task-home {
  min-height: 36px;
  border-radius: 10px;
}
#desktop[data-shell-style] .task-app[aria-current="true"],
#desktop[data-shell-style] .task-app.active,
#desktop[data-shell-style] .taskbar button[aria-pressed="true"] {
  background: rgba(166,200,255,.14);
  box-shadow: inset 0 -2px #a6c8ff;
}
#desktop[data-shell-style] .os-desktop-shortcuts {
  z-index: 2;
  gap: 7px;
}
#desktop[data-shell-style] .os-shortcut {
  border-radius: 9px;
  text-shadow: 0 1px 4px #000, 0 2px 10px #0009;
}
#desktop[data-shell-style] .os-shortcut > span {
  border-radius: 10px;
  background: rgba(20,23,31,.74);
  border-color: rgba(255,255,255,.12);
  box-shadow: inset 0 1px rgba(255,255,255,.07), 0 4px 16px #0003;
}
#desktop[data-shell-style] .os-window,
#desktop[data-shell-style] #app-window {
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 14px;
  background: rgba(17,19,26,.91);
  box-shadow: 0 28px 90px rgba(0,0,0,.52), inset 0 1px rgba(255,255,255,.055);
  backdrop-filter: blur(34px) saturate(145%);
  -webkit-backdrop-filter: blur(34px) saturate(145%);
  animation: zy-window-enter .2s cubic-bezier(.2,.8,.2,1) both;
}
#desktop[data-shell-style] .os-window-bar,
#desktop[data-shell-style] .window-bar {
  min-height: 42px;
  background: rgba(255,255,255,.035);
  border-bottom: 1px solid rgba(255,255,255,.085);
}
#desktop[data-shell-style] .os-window-controls button,
#desktop[data-shell-style] .window-control {
  border-radius: 8px;
}
#desktop[data-shell-style] .os-window-content,
#desktop[data-shell-style] .window-body {
  scrollbar-color: #515866 transparent;
  scrollbar-width: thin;
}
#desktop[data-shell-style] .os-window-content::-webkit-scrollbar,
#desktop[data-shell-style] .window-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
#desktop[data-shell-style] .os-window-content::-webkit-scrollbar-thumb,
#desktop[data-shell-style] .window-body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 20px;
  background: #505663;
  background-clip: padding-box;
}
#desktop[data-shell-style] #os-start-menu,
#desktop[data-shell-style] .os-start-menu,
#desktop[data-shell-style] .os-flyout,
#desktop[data-shell-style] .os-system-tray,
#desktop[data-shell-style] .os-context-menu,
#desktop[data-shell-style] .os-notification-center {
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 16px;
  background: rgba(14,16,22,.92);
  box-shadow: 0 25px 80px rgba(0,0,0,.5), inset 0 1px rgba(255,255,255,.045);
  backdrop-filter: blur(36px) saturate(150%);
  -webkit-backdrop-filter: blur(36px) saturate(150%);
}
#desktop[data-shell-style] .os-launch-item,
#desktop[data-shell-style] .os-quick-grid button,
#desktop[data-shell-style] .os-notification-center button {
  border-radius: 10px;
}
#desktop[data-shell-style] .os-launch-item:hover,
#desktop[data-shell-style] .os-quick-grid button:hover,
#desktop[data-shell-style] .os-notification-center button:hover {
  background: rgba(255,255,255,.075);
}
#desktop[data-shell-style] .os-system-tray {
  padding: 4px;
}
#desktop[data-shell-style] .os-scene-widget,
#desktop[data-shell-style] .os-widget,
#desktop[data-shell-style] .clock-card,
#desktop[data-shell-style] .panel {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 13px;
  background: rgba(16,18,25,.54);
  box-shadow: 0 8px 28px rgba(0,0,0,.12), inset 0 1px rgba(255,255,255,.035);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
#desktop[data-shell-style] .os-scene-widget:hover,
#desktop[data-shell-style] .os-widget:hover,
#desktop[data-shell-style] .panel:hover {
  border-color: rgba(255,255,255,.2);
}
#desktop[data-shell-style] input,
#desktop[data-shell-style] textarea,
#desktop[data-shell-style] select {
  border-radius: 9px;
}
#desktop[data-shell-style] button {
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
#desktop[data-shell-style] button:active {
  transform: scale(.975);
}
#desktop[data-shell-style] button:disabled {
  transform: none;
}
#desktop[data-shell-style] .os-start-menu,
#desktop[data-shell-style] #os-start-menu {
  animation: zy-panel-enter .18s cubic-bezier(.2,.8,.2,1) both;
  transform-origin: bottom center;
}
#desktop[data-shell-style] .os-context-menu {
  animation: zy-panel-enter .12s ease-out both;
  transform-origin: top left;
}
@keyframes zy-panel-enter {
  from { opacity: 0; translate: 0 7px; scale: .985; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}
@media (max-width: 700px) {
  #desktop[data-shell-style] .os-menubar { padding-inline: 6px; }
  #desktop[data-shell-style] .taskbar {
    max-width: calc(100vw - 16px);
    overflow-x: auto;
    scrollbar-width: none;
  }
  #desktop[data-shell-style] .taskbar::-webkit-scrollbar { display: none; }
  #desktop[data-shell-style] .os-window,
  #desktop[data-shell-style] #app-window {
    border-radius: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #desktop[data-shell-style] .os-window,
  #desktop[data-shell-style] #os-start-menu,
  #desktop[data-shell-style] .os-start-menu,
  #desktop[data-shell-style] .os-context-menu {
    animation: none !important;
  }
}
