@media (max-width: 740px) {
  /* Always show window controls in mobile view */
  .window-header,
  .window-header .dots,
  .window-header .dot {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  .window-header {
    align-items: center !important;
    justify-content: space-between !important;
  }
  .window-header .dots {
    gap: 10px !important;
    margin-left: 0 !important;
  }
  .window-header .dot {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    border-radius: 50% !important;
  }
}
:root {
  --pm-wall-a: #18091f;
  --pm-wall-b: #2a0f35;
  --pm-wall-c: #4a1f5f;
  --pm-glass-1: rgba(37, 22, 44, 0.56);
  --pm-glass-2: rgba(255, 255, 255, 0.08);
  --pm-window-bg: rgba(252, 238, 255, 0.72);
  --pm-window-border: rgba(255, 255, 255, 0.58);
  --pm-toolbar-bg: rgba(255, 246, 255, 0.78);
  --pm-surface: rgba(255, 255, 255, 0.64);
  --pm-surface-strong: rgba(255, 255, 255, 0.86);
  --pm-text: #2d1938;
  --pm-subtle: #6c4f76;
  --pm-accent: #d946ef;
  --pm-accent-2: #a855f7;
  --pm-shadow-lg: 0 30px 90px rgba(5, 10, 26, 0.52);
  --pm-shadow-md: 0 14px 36px rgba(6, 10, 24, 0.28);
  --pm-shadow-sm: 0 8px 20px rgba(8, 14, 28, 0.2);
  --pm-radius-xl: 22px;
  --pm-radius-lg: 16px;
  --pm-radius-md: 12px;
  --pm-radius-sm: 10px;
  --pm-menu-height: 34px;
  --pm-dock-icon-size: clamp(40px, 3.4vw, 50px);
  --pm-dock-item-width: clamp(46px, 4.4vw, 60px);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

html,
body {
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif !important;
  color: var(--pm-text);
  min-height: 100%;
}

body {
  background: radial-gradient(circle at 12% 10%, #7a2d96 0%, transparent 34%),
    radial-gradient(circle at 88% 16%, #6d28d9 0%, transparent 30%),
    linear-gradient(130deg, #18091f, #3a134f 52%, #5a2d7f);
  background-attachment: fixed;
  animation: none !important;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at calc(var(--mx, 50) * 1%) calc(var(--my, 50) * 1%), rgba(168, 85, 247, 0.24), transparent 34%),
    radial-gradient(circle at 18% 78%, rgba(126, 81, 236, 0.18), transparent 30%),
    radial-gradient(circle at 88% 80%, rgba(217, 70, 239, 0.16), transparent 33%);
  transition: background 0.25s ease;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.22;
  background-image: radial-gradient(rgba(255, 255, 255, 0.4) 0.6px, transparent 0.8px);
  background-size: 3px 3px;
  mix-blend-mode: soft-light;
}

body.bg-image::before {
  inset: -5%;
  filter: blur(var(--bg-blur, 10px));
  transform: scale(1.06);
  background-image: linear-gradient(rgba(8, 12, 20, calc(var(--bg-dim, 0.32) + 0.08)), rgba(8, 12, 20, calc(var(--bg-dim, 0.32) + 0.08))), var(--bg-url);
  background-size: cover;
  background-position: center;
}

body.bg-image::after {
  opacity: 0.26;
}

.menu-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--pm-menu-height) !important;
  padding: 0 14px !important;
  background: linear-gradient(180deg, rgba(255, 245, 255, 0.74), rgba(242, 219, 245, 0.6)) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
  backdrop-filter: saturate(135%) blur(18px) !important;
  box-shadow: 0 6px 18px rgba(4, 10, 30, 0.26);
  z-index: 10000;
}

.menu-left {
  gap: 10px !important;
}

#appleMenuButton {
  filter: drop-shadow(0 2px 5px rgba(8, 14, 26, 0.28));
}

#clock {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #3b1d55;
  letter-spacing: 0.2px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

#clock:hover {
  background: rgba(82, 34, 118, 0.12);
}

.menu-dropdown {
  margin-top: 6px;
  border-radius: 12px !important;
  background: rgba(255, 248, 255, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 18px 48px rgba(6, 13, 30, 0.3) !important;
  backdrop-filter: blur(18px);
}

.menu-item {
  font-weight: 600;
  color: #3a2354;
}

.menu-item:hover {
  background: linear-gradient(95deg, rgba(255, 119, 214, 0.14), rgba(183, 96, 255, 0.12));
}

.desktop {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--pm-menu-height) + 42px) !important;
  padding-bottom: 150px !important;
  min-height: 100vh;
}

.welcome-text {
  margin-bottom: 56px !important;
  color: #eef6ff !important;
  text-shadow: 0 16px 40px rgba(7, 14, 28, 0.58);
  letter-spacing: -1.2px;
}

.desktop-icons {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)) !important;
  width: min(1100px, 95vw);
  gap: 28px !important;
}

.icon {
  width: 100%;
  display: grid;
  justify-items: center;
}

.icon-img {
  width: 88px !important;
  height: 88px !important;
  border-radius: 24px !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  backdrop-filter: blur(22px) saturate(115%);
  box-shadow: 0 16px 30px rgba(7, 14, 28, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.55) !important;
  transition: transform 0.15s ease, box-shadow 0.2s ease !important;
}

.icon:hover .icon-img,
#premiumDock .dock-app:hover .dock-app-icon {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 18px 34px rgba(5, 10, 22, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.icon:active .icon-img {
  transform: translateY(-2px) scale(0.95) !important;
}

.icon-label {
  background: rgba(50, 20, 67, 0.64) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f6fbff !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  margin-top: 4px;
  max-width: 126px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.icon.pm-selected .icon-img {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.72), 0 0 0 5px rgba(231, 88, 255, 0.28), 0 18px 34px rgba(5, 10, 22, 0.36);
}

.icon.pm-selected .icon-label {
  background: rgba(62, 23, 89, 0.78) !important;
}

.ios-dock {
  display: none !important;
}

#premiumDock {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: min(86vw, 760px);
  padding: clamp(7px, 0.8vw, 10px) clamp(10px, 1vw, 14px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(4px, 0.6vw, 8px);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: linear-gradient(180deg, rgba(250, 234, 255, 0.74), rgba(236, 206, 247, 0.64));
  backdrop-filter: blur(16px) saturate(120%);
  box-shadow: 0 20px 40px rgba(4, 10, 24, 0.38);
  z-index: 9990;
}

#premiumDock .dock-app {
  width: var(--pm-dock-item-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #4b2a58;
  padding: 0;
  position: relative;
  transition: transform 0.14s ease, z-index 0s;
  z-index: 1;
}

#premiumDock .dock-app:hover {
  z-index: 10;
}

#premiumDock .dock-app-icon {
  width: var(--pm-dock-icon-size);
  height: var(--pm-dock-icon-size);
  border-radius: clamp(11px, 1.2vw, 14px);
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 18px rgba(6, 10, 24, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: transform 0.15s ease;
}

#premiumDock .dock-app-label {
  position: absolute;
  top: -30px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(43, 20, 56, 0.8);
  color: #f7fbff;
  font-size: 11px;
  white-space: nowrap;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

#premiumDock .dock-app:hover .dock-app-label {
  opacity: 1;
  transform: translateY(0);
}

#premiumDock .dock-app-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(59, 25, 74, 0.34);
  transform: scale(0.4);
  transition: transform 0.14s ease, background 0.18s ease;
}

#premiumDock .dock-app.is-open .dock-app-dot {
  transform: scale(1);
  background: linear-gradient(180deg, #ff62ce, #b567ff);
}

.window {
  width: min(1080px, 92vw);
  height: min(700px, 84vh);
  border-radius: 18px !important;
  background: var(--pm-window-bg) !important;
  border: 1px solid var(--pm-window-border) !important;
  box-shadow: var(--pm-shadow-lg) !important;
  backdrop-filter: blur(24px) saturate(135%) !important;
  z-index: 900;
}

.window.dragging {
  transition: none !important;
  backdrop-filter: blur(14px) saturate(120%) !important;
}

.window.focused {
  box-shadow: 0 40px 90px rgba(4, 10, 22, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.72),
    0 0 0 3px rgba(230, 89, 255, 0.28) !important;
}

.window-header {
  height: 44px !important;
  background: var(--pm-toolbar-bg) !important;
  border-bottom: 1px solid rgba(200, 211, 230, 0.86) !important;
  backdrop-filter: blur(10px);
}

.window-title {
  color: #4a2a59 !important;
  font-size: 13px !important;
  letter-spacing: 0.2px;
  font-weight: 700 !important;
}

.dot {
  width: 12px !important;
  height: 12px !important;
  position: relative;
}

.dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.12s ease;
  background: rgba(10, 10, 10, 0.34);
}

.window-header:hover .dot::after {
  opacity: 1;
}

.window-content {
  display: flex;
  align-items: stretch !important;
  justify-content: flex-start !important;
  background: linear-gradient(165deg, rgba(255, 247, 255, 0.82), rgba(247, 236, 255, 0.74)) !important;
  color: var(--pm-text);
}

#notes-window .window-content,
#credits-window .window-content,
#lyrics-window .window-content,
#settings-window .window-content,
#tour-window .window-content {
  flex-direction: column !important;
  align-items: stretch !important;
  overflow: hidden !important;
}

.resize-handle {
  border-color: rgba(39, 52, 78, 0.34) !important;
}

.sidebar {
  background: rgba(252, 243, 255, 0.7) !important;
  border-right: 1px solid rgba(220, 193, 228, 0.8) !important;
}

.horizontal-menu {
  background: rgba(252, 243, 255, 0.7) !important;
  border-bottom: 1px solid rgba(220, 193, 228, 0.8) !important;
}

.horizontal-menu-item {
  background: rgba(255, 255, 255, 0.76) !important;
  border: 1px solid rgba(221, 189, 232, 0.82) !important;
  color: #4a2b58 !important;
  font-weight: 600;
}

.horizontal-menu-item:hover {
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 4px 12px rgba(8, 14, 28, 0.15);
}

.horizontal-menu-item.active {
  background: linear-gradient(100deg, rgba(255, 102, 215, 0.22), rgba(182, 104, 255, 0.18)) !important;
  color: #4a1f5f !important;
  border-radius: 8px !important;
  border-color: transparent !important;
}

.sidebar-item {
  border-bottom: 1px solid rgba(223, 196, 233, 0.48) !important;
  color: #4a2b58 !important;
  font-weight: 600;
}

.sidebar-item:hover {
  background: rgba(255, 104, 214, 0.1) !important;
}

.sidebar-item.active {
  background: linear-gradient(100deg, rgba(255, 102, 215, 0.22), rgba(182, 104, 255, 0.18)) !important;
  color: #4a1f5f !important;
  border-radius: 8px !important;
}

.main-content,
.notes-content {
  min-width: 0;
  min-height: 0;
  color: #3f2450 !important;
}

.gallery-container,
#videos-window .gallery-container,
.todo-wrap,
.shop-container,
.social-grid,
.video-library,
.games-grid,
.files-grid,
.masonry-grid {
  width: 100%;
}

#music-window .window-content {
  padding: 0 !important;
}

#music-window iframe.disco-embed {
  width: 100% !important;
  height: 100% !important;
  min-height: 420px;
}

#gallery-window .gallery-container,
#videos-window .gallery-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 16px 18px !important;
  overflow: hidden;
}

#photoGrid,
#videoGrid {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

#videoGrid .video-library {
  max-width: none;
  padding: 4px !important;
}

#notes-window .split-view,
#credits-window .split-view,
#lyrics-window .split-view,
#settings-window .split-view,
#tour-window .split-view {
  height: 100%;
  min-height: 0;
}

#settings-window .main-content {
  background: rgba(252, 243, 255, 0.7) !important;
}

#tour-window .window-content {
  overflow: auto !important;
}

#letters-window .window-content {
  display: block !important;
  padding: 18px 20px !important;
  overflow: auto;
}

#letters-window .window-content > div,
#letters-window #lettersForm {
  width: 100% !important;
  max-width: min(760px, 100%) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#game-window .window-content {
  padding: 16px !important;
  overflow: auto;
}

#game-window #gamesMenu,
#game-window #pongView {
  width: 100%;
}

#pongCanvas {
  width: min(100%, 860px) !important;
  height: auto !important;
}

#shop-window .shop-container,
#social-window .social-grid,
#todo-window .todo-wrap {
  width: 100% !important;
  max-width: 980px;
  margin: 0 auto;
  padding: 20px !important;
}

#shop-window .window-content {
  padding: 18px 20px !important;
}

#shop-window .shop-intro,
#shop-window .shop-grid,
#social-window .social-grid {
  width: 100% !important;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

#todo-window .window-content {
  padding: 12px 18px !important;
}

.file-card,
.social-card,
.video-card,
.game-card,
.product-card,
.todo-item,
.tour-card,
.bg-card,
.bp-row {
  border-radius: 14px !important;
  border: 1px solid rgba(225, 197, 233, 0.9) !important;
  background-color: var(--pm-surface) !important;
  box-shadow: var(--pm-shadow-sm) !important;
}

.file-card:hover,
.social-card:hover,
.video-card:hover,
.game-card:hover,
.product-card:hover,
.tour-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--pm-shadow-md) !important;
}

.product-card,
.game-card,
.social-card,
.video-card {
  backdrop-filter: blur(8px);
}

#social-window .social-card {
  background: rgba(255, 255, 255, 0.82) !important;
}

#social-window .social-card:hover {
  transform: translateY(-2px);
}

.shop-btn,
.bp-book,
.btn.primary,
button[type="submit"],
.settings-btn,
.social-btn,
.tab-btn.active,
#pongPlayBtn {
  background: linear-gradient(120deg, var(--pm-accent), var(--pm-accent-2)) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 10px 22px rgba(176, 55, 204, 0.36) !important;
}

.shop-btn:hover,
.bp-book:hover,
.btn.primary:hover,
button[type="submit"]:hover,
.settings-btn:hover,
#pongPlayBtn:hover {
  filter: brightness(1.05);
}

.settings-btn,
.social-btn,
.tab-btn,
.btn,
.pong-btn,
#letters-window input,
#letters-window textarea {
  border-radius: 10px !important;
}

#letters-window input,
#letters-window textarea {
  border: 1px solid rgba(226, 190, 235, 0.95) !important;
  background: rgba(255, 255, 255, 0.84) !important;
  color: #3f2351;
}

#letters-window input:focus,
#letters-window textarea:focus,
#spotlightInput:focus {
  border-color: rgba(236, 86, 255, 0.86) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(236, 86, 255, 0.18);
}

.photos-tabs {
  padding: 0 6px;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.76) !important;
  border: 1px solid rgba(221, 189, 232, 0.82) !important;
}

.tab-btn.active {
  border-color: transparent !important;
}

.todo-progress {
  background: rgba(72, 29, 95, 0.16) !important;
}

.todo-progress > span {
  background: linear-gradient(100deg, #d946ef, #a855f7) !important;
}

.todo-toggle {
  background: rgba(83, 35, 108, 0.22) !important;
}

.todo-done .todo-toggle {
  background: linear-gradient(120deg, #d946ef, #a855f7) !important;
}

.modal {
  background: rgba(7, 12, 22, 0.82) !important;
  backdrop-filter: blur(14px) saturate(120%);
}

.modal-content {
  width: min(1100px, 94vw) !important;
  height: min(84vh, 880px) !important;
}

.modal-img,
#videoIframe {
  border-radius: 14px !important;
  box-shadow: var(--pm-shadow-lg);
}

.modal-close,
.nav-btn {
  color: #ffeefe !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

#windowDock {
  left: 18px !important;
  bottom: 98px !important;
  background: rgba(248, 228, 255, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  border-radius: 14px !important;
  box-shadow: var(--pm-shadow-md) !important;
}

.dock-btn {
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid rgba(214, 184, 222, 0.85) !important;
}

#bootOverlay {
  background: radial-gradient(circle at 20% 14%, #4a1d6f, #200a35 45%, #0a0418) !important;
}

#loginOverlay {
  background-position: center !important;
  background-size: cover !important;
}

.login-panel,
.passcode-layer {
  background: linear-gradient(170deg, rgba(49, 20, 62, 0.54), rgba(35, 16, 46, 0.34)) !important;
  border: 1px solid rgba(255, 255, 255, 0.38) !important;
  box-shadow: 0 24px 60px rgba(6, 10, 24, 0.46) !important;
}

.login-panel input,
#gatePassword,
.passcode-layer .kp {
  font-family: "Manrope", "Avenir Next", sans-serif !important;
}

.login-panel input,
#gatePassword {
  background: rgba(255, 239, 252, 0.16) !important;
}

#gateSubmit {
  background: #ffffff !important;
  color: #111111 !important;
  border-radius: 999px !important;
}

.footer {
  position: relative;
  z-index: 5;
  background: rgba(25, 9, 34, 0.5) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

#controlCenter {
  position: fixed;
  right: 14px;
  top: calc(var(--pm-menu-height) + 8px);
  width: min(320px, 90vw);
  display: none;
  flex-direction: column;
  gap: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  background: rgba(249, 237, 255, 0.8);
  backdrop-filter: blur(20px) saturate(120%);
  box-shadow: 0 20px 46px rgba(5, 10, 22, 0.34);
  padding: 12px;
  z-index: 10050;
}

#controlCenter.open {
  display: flex;
  animation: pmFadeIn 0.16s ease;
}

#controlCenter .cc-row {
  display: flex;
  gap: 8px;
}

#controlCenter .cc-chip,
#controlCenter button,
#controlCenter input[type="range"] {
  border-radius: 10px;
}

#controlCenter .cc-chip,
#controlCenter button {
  border: 1px solid rgba(220, 188, 232, 0.86);
  background: rgba(255, 255, 255, 0.8);
  color: #4a2a5a;
  padding: 8px 10px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  flex: 1;
}

#controlCenter .cc-chip.active {
  background: linear-gradient(110deg, rgba(255, 112, 219, 0.2), rgba(181, 107, 255, 0.18));
  border-color: rgba(233, 101, 255, 0.42);
}

#controlCenter .cc-sub {
  font-size: 11px;
  color: #6c4f76;
  margin-bottom: 4px;
  font-weight: 700;
}

#controlCenter input[type="range"] {
  width: 100%;
  accent-color: #d946ef;
}

#spotlightOverlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 9, 35, 0.5);
  backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: min(20vh, 180px);
  z-index: 10100;
}

#spotlightOverlay.open {
  display: flex;
  animation: pmFadeIn 0.16s ease;
}

#spotlightCard {
  width: min(640px, 92vw);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(248, 237, 255, 0.86);
  backdrop-filter: blur(24px) saturate(120%);
  box-shadow: 0 36px 70px rgba(4, 10, 24, 0.42);
  overflow: hidden;
}

#spotlightInput {
  width: 100%;
  border: none;
  border-bottom: 1px solid rgba(228, 197, 237, 0.94);
  background: transparent;
  padding: 16px 18px;
  font-size: 18px;
  font-weight: 600;
  color: #4d2d5b;
}

#spotlightList {
  max-height: min(48vh, 420px);
  overflow: auto;
  padding: 8px;
}

.sp-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.sp-item:hover,
.sp-item.active {
  background: rgba(255, 114, 218, 0.15);
  border-color: rgba(236, 102, 255, 0.36);
}

.sp-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 10px rgba(8, 13, 24, 0.24);
}

.sp-item-title {
  font-size: 14px;
  font-weight: 700;
  color: #4d2d5b;
}

.sp-item-sub {
  font-size: 11px;
  color: #7a5b88;
}

#deskHint {
  position: fixed;
  left: 50%;
  top: calc(var(--pm-menu-height) + 8px);
  transform: translateX(-50%);
  z-index: 9000;
  padding: 7px 12px;
  font-size: 12px;
  color: #ffeafe;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(44, 14, 60, 0.52);
  backdrop-filter: blur(10px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

#deskHint.show {
  opacity: 1;
  transform: translateX(-50%) translateY(2px);
}

@keyframes pmFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  :root {
    --pm-dock-icon-size: clamp(36px, 3.8vw, 46px);
    --pm-dock-item-width: clamp(42px, 4.8vw, 56px);
  }

  .desktop-icons {
    grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)) !important;
  }

  .icon-img {
    width: 82px !important;
    height: 82px !important;
  }

  #premiumDock {
    gap: 6px;
    padding: 8px 9px;
  }
}

@media (max-width: 740px) {
  :root {
    --pm-menu-height: 42px;
    --pm-dock-icon-size: clamp(34px, 9vw, 40px);
    --pm-dock-item-width: clamp(38px, 10vw, 46px);
  }

  .menu-bar {
    display: flex !important;
  }

  .ios-statusbar,
  .ios-homebar,
  .ios-island,
  .ios-dock {
    display: none !important;
  }

  body::after {
    opacity: 0.15;
  }

  .menu-bar {
    padding: 0 10px !important;
  }

  .menu-left + div {
    font-size: 13px;
  }

  .desktop {
    padding-top: calc(var(--pm-menu-height) + 26px) !important;
    padding-bottom: 132px !important;
  }

  .welcome-text {
    display: block !important;
    font-size: clamp(34px, 8vw, 46px) !important;
    margin-bottom: 34px !important;
  }

  .desktop-icons {
    width: min(96vw, 620px);
    grid-template-columns: repeat(3, minmax(88px, 1fr)) !important;
    gap: 16px !important;
  }

  .icon-img {
    width: 72px !important;
    height: 72px !important;
    border-radius: 18px !important;
  }

  .icon-label {
    font-size: 9px !important;
    max-width: 90px;
  }

  .window {
    width: 98vw !important;
    height: calc(100vh - var(--pm-menu-height) - 8px) !important;
    left: 1vw !important;
    right: auto !important;
    top: calc(var(--pm-menu-height) + 4px) !important;
    border-radius: 12px !important;
  }

  .window-header {
    display: flex !important;
    height: 42px !important;
  }

  .sidebar {
    width: 168px;
    min-width: 168px;
  }

  /* On mobile, always prefer horizontal menu for sidebar apps */
  @media (max-width: 640px) {
    .horizontal-menu {
      display: flex !important;
    }
    
    .split-view {
      height: calc(100% - 48px) !important;
    }
    
    .sidebar {
      display: none !important;
    }
  }

  #premiumDock {
    bottom: max(12px, env(safe-area-inset-bottom));
    width: min(96vw, 520px);
    justify-content: center;
    gap: 2px;
    border-radius: 22px;
    padding: 7px 8px;
  }

  #premiumDock .dock-app {
    width: var(--pm-dock-item-width);
    flex: 0 0 auto;
  }

  #premiumDock .dock-app-icon {
    border-radius: 12px;
  }

  #premiumDock .dock-app-label {
    display: none;
  }

  #music-window iframe.disco-embed {
    min-height: 320px;
  }

  #gallery-window .gallery-container,
  #videos-window .gallery-container {
    padding: 10px !important;
  }

  #letters-window .window-content,
  #todo-window .window-content {
    padding: 12px !important;
  }

  #shop-window .shop-container,
  #social-window .social-grid,
  #todo-window .todo-wrap {
    padding: 12px !important;
  }

  #windowDock {
    bottom: 88px !important;
  }

  #spotlightCard {
    width: 94vw;
  }
}
