/* ==========================================================================
   NingOS — 宁宁的手机 (Simulated Smartphone OS Redesign)
   Preserves 100% of original ARG assets, story, puzzles, loops & endings
   while completely transforming the PC Windows 10 shell into a native Phone OS.
   ========================================================================== */

:root {
  --phone-w: 412px;
  --phone-h: 868px;
  --phone-radius: 46px;
  --status-h: 44px;
  --nav-h: 44px;
  --app-header-h: 48px;
  --os-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", sans-serif;
  --glass-bg: rgba(24, 26, 34, 0.72);
  --glass-light: rgba(255, 255, 255, 0.22);
  --glass-border: rgba(255, 255, 255, 0.16);
  --accent-blue: #0a84ff;
  --accent-green: #07c160;
  --accent-red: #ff3b30;
  --phone-brightness: 1;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: var(--os-font);
  background: #0a0c12;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
}

/* ==========================================================================
   1. Smartphone Hardware Stage (Desktop Frame vs. Mobile Edge-to-Edge)
   ========================================================================== */

.phone-stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 22% 18%, rgba(44, 62, 108, 0.28), transparent 48%),
    radial-gradient(circle at 80% 82%, rgba(88, 36, 72, 0.22), transparent 52%),
    linear-gradient(160deg, #0b0d14 0%, #121622 55%, #090b10 100%);
  padding: 16px;
  overflow: hidden;
}

html.zhoumu2 .phone-stage {
  background:
    radial-gradient(circle at 30% 20%, rgba(56, 48, 72, 0.34), transparent 50%),
    radial-gradient(circle at 78% 80%, rgba(68, 22, 32, 0.28), transparent 52%),
    linear-gradient(160deg, #09090e 0%, #131018 55%, #07070b 100%);
}

html.zhoumu3 .phone-stage {
  background:
    radial-gradient(circle at 50% 35%, rgba(92, 14, 22, 0.32), transparent 55%),
    linear-gradient(160deg, #060507 0%, #11090c 55%, #040406 100%);
}

.phone-chassis {
  position: relative;
  width: min(var(--phone-w), 100vw - 32px);
  height: min(var(--phone-h), 100dvh - 32px);
  max-height: 920px;
  border-radius: var(--phone-radius);
  padding: 10px;
  background: linear-gradient(145deg, #3a3d46 0%, #1d1f26 32%, #13141a 70%, #2c2f38 100%);
  box-shadow:
    0 32px 84px rgba(0, 0, 0, 0.72),
    0 8px 24px rgba(0, 0, 0, 0.48),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.16),
    inset 0 0 0 4px #0e0f13;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

/* Physical Side Buttons (Desktop preview only) */
.phone-chassis::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 128px;
  width: 3px;
  height: 36px;
  border-radius: 3px 0 0 3px;
  background: linear-gradient(180deg, #4b4f5c, #242730);
  box-shadow: 0 52px 0 #2d303b, 0 98px 0 #2d303b;
}
.phone-chassis::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 168px;
  width: 3px;
  height: 68px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #4b4f5c, #242730);
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--phone-radius) - 9px);
  overflow: hidden;
  background: #000;
  transform: translateZ(0);
  filter: brightness(var(--phone-brightness));
  transition: filter 0.15s ease;
}

/* On actual mobile phones / narrow screens: full edge-to-edge native OS */
@media (max-width: 540px), (pointer: coarse) and (max-width: 680px) {
  .phone-stage {
    padding: 0;
    background: #000;
  }
  .phone-chassis {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    padding: 0;
    background: #000;
    box-shadow: none;
  }
  .phone-chassis::before,
  .phone-chassis::after {
    display: none;
  }
  .phone-screen {
    border-radius: 0;
  }
}

/* ==========================================================================
   2. Persistent Top Status Bar & Dynamic Island
   ========================================================================== */

#phone-statusbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--status-h);
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 9500;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  transition: background 0.22s ease, color 0.22s ease;
}

#phone-statusbar.sb-light {
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  text-shadow: none;
  backdrop-filter: blur(12px);
}

#phone-statusbar.sb-dark {
  background: rgba(14, 16, 22, 0.92);
  color: #f4f6fb;
  text-shadow: none;
}

.sb-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 72px;
}

.sb-time {
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  font-weight: 700;
}

.sb-carrier {
  font-size: 10.5px;
  opacity: 0.82;
  font-weight: 500;
}

#phone-island {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  width: 98px;
  height: 26px;
  border-radius: 999px;
  background: #060608;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease;
  cursor: pointer;
  z-index: 2;
}

#phone-island .island-cam {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a3c66 0%, #0d1324 55%, #020308 100%);
  box-shadow: inset 0 0 2px rgba(120, 170, 255, 0.45);
  margin-left: auto;
}

#phone-island .island-label {
  display: none;
  font-size: 11px;
  color: #f0f4ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

#phone-island.expanded {
  width: 196px;
  justify-content: space-between;
}

#phone-island.expanded .island-label {
  display: inline-block;
}

.sb-right {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 2px;
  border-radius: 8px;
}

.sb-right:active {
  opacity: 0.65;
}

.sb-signal {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.sb-battery {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
}

.sb-bat-icon {
  position: relative;
  width: 22px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  padding: 1px;
  display: inline-flex;
  align-items: center;
}

.sb-bat-icon::after {
  content: "";
  position: absolute;
  right: -3.5px;
  top: 2.5px;
  width: 2px;
  height: 4px;
  border-radius: 0 1px 1px 0;
  background: currentColor;
}

.sb-bat-fill {
  height: 100%;
  border-radius: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}

.sb-battery.low-bat .sb-bat-fill {
  background: #ff3b30;
}

.sb-battery.low-bat {
  color: #ff453a;
}

/* ==========================================================================
   3. Bottom Navigation & Gesture Bar (Replaces Windows Taskbar)
   ========================================================================== */

#taskbar {
  display: none !important;
}

#start-menu,
#sm-power-menu {
  display: none !important;
}

#phone-navbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--nav-h);
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 28px;
  background: rgba(12, 14, 20, 0.56);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.22s ease, color 0.22s ease;
}

#phone-navbar.nb-light {
  background: rgba(248, 248, 250, 0.94);
  border-top-color: rgba(0, 0, 0, 0.07);
  color: #222;
}

.pnav-btn {
  width: 56px;
  height: 36px;
  border: none;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
  padding: 0;
}

.pnav-btn:active {
  background: rgba(128, 128, 128, 0.22);
  transform: scale(0.9);
}

.pnav-home-pill {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.88;
}

/* ==========================================================================
   4. Smartphone Home Screen (#desktop) — SpringBoard Grid + Widget + Dock
   ========================================================================== */

#desktop {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  background: url('image/野餐.webp') no-repeat center center / cover !important;
  display: flex !important;
  flex-direction: column !important;
  padding: calc(var(--status-h) + 12px) 16px calc(var(--nav-h) + 86px) 16px !important;
}

html.zhoumu2 #desktop {
  background: linear-gradient(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.32)), url('image/野餐2.webp') no-repeat center center / cover !important;
}

html.zhoumu3 #desktop {
  background: linear-gradient(rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.45)), url('image/野餐3.webp') no-repeat center center / cover !important;
}

/* Top Weather & Clock Widget on Home Screen */
#phone-home-widget {
  flex: none;
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(18, 22, 32, 0.42);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  cursor: pointer;
  transition: transform 0.16s ease;
}

#phone-home-widget:active {
  transform: scale(0.985);
}

.phw-clock {
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

.phw-date {
  margin-top: 6px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
}

.phw-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.phw-weather-temp {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.1;
}

.phw-weather-loc {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.82);
  display: flex;
  align-items: center;
  gap: 4px;
}

.phw-hint {
  margin-top: 2px;
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
}

/* 4-Column SpringBoard App Icon Grid */
#phone-app-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: max-content;
  gap: 16px 10px;
  align-content: start;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 2px 14px 2px;
  scrollbar-width: none;
}

#phone-app-grid::-webkit-scrollbar {
  display: none;
}

/* Override PC absolute coordinates on desktop icons so they snap into the mobile grid */
#desktop .desktop-icon,
#desktop #sn-ico {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  height: auto !important;
  padding: 2px 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer !important;
  z-index: 2 !important;
  transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1);
}

#desktop .desktop-icon:hover,
#desktop #sn-ico:hover {
  background: transparent !important;
  border: none !important;
}

#desktop .desktop-icon:active,
#desktop #sn-ico:active {
  transform: scale(0.9);
}

#desktop .desktop-icon .icon-img,
#desktop #sn-ico .sn-ico-img {
  width: 56px !important;
  height: 56px !important;
  border-radius: 15px !important;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden;
  padding: 8px;
  filter: none !important;
  position: relative;
}

#desktop .desktop-icon .icon-img img,
#desktop #sn-ico .sn-ico-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 8px;
}

/* Tailored Squircle Icon Tints for authentic Mobile App feel */
#icon-wechat .icon-img { background: linear-gradient(145deg, #22d669, #07b34c) !important; padding: 9px !important; }
#icon-xhs .icon-img { background: linear-gradient(145deg, #ff3a55, #e61c38) !important; padding: 8px !important; }
#icon-news .icon-img { background: linear-gradient(145deg, #d92638, #9e1020) !important; padding: 9px !important; }
#icon-google .icon-img { background: #ffffff !important; padding: 8px !important; }
#icon-pc .icon-img { background: linear-gradient(145deg, #3b9eff, #0b6ef3) !important; padding: 10px !important; }
#icon-docs .icon-img { background: linear-gradient(145deg, #ffc43d, #e69500) !important; padding: 10px !important; }
#icon-pics .icon-img { background: linear-gradient(145deg, #fff5eb, #ffe3f1) !important; padding: 9px !important; }
#icon-bin .icon-img { background: linear-gradient(145deg, #6e7582, #434852) !important; padding: 10px !important; }
#icon-secret .icon-img { background: linear-gradient(145deg, #a78bfa, #7c3aed) !important; padding: 10px !important; }
#icon-cmd .icon-img { background: linear-gradient(145deg, #242830, #0c0e12) !important; padding: 10px !important; border: 1px solid rgba(255,255,255,0.18); }
#icon-search .icon-img { background: linear-gradient(145deg, #38bdf8, #0284c7) !important; padding: 10px !important; }
#icon-hospitalpdf .icon-img { background: linear-gradient(145deg, #ef4444, #b91c1c) !important; padding: 10px !important; }
#icon-videoplayer .icon-img { background: linear-gradient(145deg, #2dd4bf, #0f766e) !important; padding: 10px !important; }
#icon-settings-home .icon-img { background: linear-gradient(145deg, #9ca3af, #4b5563) !important; padding: 10px !important; }
#icon-bilibili-home .icon-img { background: linear-gradient(145deg, #ff85ad, #fb7299) !important; padding: 8px !important; }
#desktop #sn-ico .sn-ico-img { background: linear-gradient(145deg, #fef08a, #eab308) !important; padding: 8px !important; }

/* Creepy spawned icons full bleed photo */
#desktop .desktop-icon[id^="icon-creepy"] .icon-img {
  padding: 0 !important;
  background: #111 !important;
}
#desktop .desktop-icon[id^="icon-creepy"] .icon-img img {
  object-fit: cover !important;
  border-radius: 15px !important;
}

#desktop .desktop-icon .icon-text,
#desktop #sn-ico .sn-ico-txt {
  margin-top: 6px !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  color: #ffffff !important;
  text-align: center !important;
  line-height: 1.25 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85), 0 0 8px rgba(0, 0, 0, 0.45) !important;
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-all;
}

/* Red Unread Notification Badges */
#desktop .desktop-icon .wechat-badge,
#desktop #sn-ico .sn-badge {
  position: absolute !important;
  top: -3px !important;
  right: calc(50% - 34px) !important;
  min-width: 19px !important;
  height: 19px !important;
  border-radius: 999px !important;
  background: #ff3b30 !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 19px !important;
  padding: 0 5px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  z-index: 4;
}

/* Bottom Frosted-Glass Home Dock */
#phone-dock {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(var(--nav-h) + 10px);
  height: 70px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
  z-index: 5;
}

.dock-item {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
  transition: transform 0.14s ease;
}

.dock-item:active {
  transform: scale(0.88);
}

.dock-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.dock-item.dock-wechat { background: linear-gradient(145deg, #22d669, #07b34c); }
.dock-item.dock-xhs { background: linear-gradient(145deg, #ff3a55, #e61c38); }
.dock-item.dock-files { background: linear-gradient(145deg, #3b9eff, #0b6ef3); }
.dock-item.dock-settings { background: linear-gradient(145deg, #8e96a3, #4b5563); }

/* ==========================================================================
   5. Mobile Control Center (Replaces Windows Start Menu)
   ========================================================================== */

#phone-cc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 9400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

#phone-cc-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

#phone-control-center {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  max-height: calc(100% - var(--nav-h));
  padding: calc(var(--status-h) + 12px) 16px 20px 16px;
  overflow-y: auto;
  z-index: 9450;
  transform: translateY(-105%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  color: #fff;
}

#phone-control-center.open {
  transform: translateY(0);
}

.cc-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  margin-bottom: 12px;
}

.cc-user-card img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.cc-user-name {
  font-size: 15px;
  font-weight: 600;
}

.cc-user-sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
}

.cc-close-pill {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.cc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.cc-tile {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #fff;
  text-align: left;
  font-family: inherit;
  transition: background 0.16s ease, transform 0.12s ease;
}

.cc-tile:active { transform: scale(0.96); }
.cc-tile.active {
  background: rgba(10, 132, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.25);
}

.cc-tile-ico {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cc-tile-title { font-size: 13px; font-weight: 600; }
.cc-tile-sub { font-size: 10.5px; opacity: 0.78; margin-top: 2px; }

.cc-brightness-box {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cc-brightness-box input[type="range"] {
  flex: 1;
  accent-color: #fff;
  cursor: pointer;
}

.cc-power-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.cc-power-btn {
  padding: 11px 6px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 11.5px;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.cc-power-btn:active { background: rgba(255, 255, 255, 0.24); }
.cc-power-btn.danger { color: #ff6b6b; }

.cc-apps-title {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 8px 4px;
  font-weight: 600;
}

.cc-apps-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 6px;
  padding: 12px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
}

.cc-mini-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: #fff;
  font-size: 11px;
  text-align: center;
}

.cc-mini-app img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.9);
  padding: 5px;
}

/* ==========================================================================
   6. Mobile App Switcher / Multitasking Overlay
   ========================================================================== */

#phone-switcher {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 16, 0.78);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  z-index: 9350;
  display: none;
  flex-direction: column;
  padding: calc(var(--status-h) + 16px) 16px calc(var(--nav-h) + 16px) 16px;
}

#phone-switcher.open {
  display: flex;
}

.ps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}

.ps-title {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}

.ps-clear-btn {
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

.ps-cards {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-content: start;
}

.ps-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  color: #fff;
  position: relative;
}

.ps-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ps-card-top img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #fff;
  padding: 3px;
  object-fit: contain;
}

.ps-card-name {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-card-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

.ps-card-preview {
  height: 82px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.65);
}

.ps-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
}

/* ==========================================================================
   7. Native Full-Screen Mobile App Windows (Replacing PC .window Chrome)
   ========================================================================== */

html.mobile-mode .window {
  position: absolute !important;
  top: var(--status-h) !important;
  left: 0 !important;
  right: 0 !important;
  bottom: var(--nav-h) !important;
  width: 100% !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
  animation: appSlideIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes appSlideIn {
  from { opacity: 0.4; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Native Mobile App Navigation Header (Replaces Windows .title-bar) */
html.mobile-mode .window > .title-bar {
  height: var(--app-header-h) !important;
  min-height: var(--app-header-h) !important;
  padding: 0 12px !important;
  background: #f7f7f9 !important;
  color: #111 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: relative !important;
  cursor: default !important;
}

html.mobile-mode .window > .title-bar .title-text {
  position: absolute !important;
  left: 72px !important;
  right: 52px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 15.5px !important;
  font-weight: 600 !important;
  color: inherit !important;
  text-align: center !important;
  padding: 0 !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  pointer-events: none !important;
}

html.mobile-mode .window > .title-bar .window-controls {
  display: flex !important;
  align-items: center !important;
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

/* Hide PC minimize and maximize buttons completely */
html.mobile-mode .window > .title-bar .btn-min,
html.mobile-mode .window > .title-bar .btn-max {
  display: none !important;
}

/* Turn .btn-close into a clean mobile top-right close pill */
html.mobile-mode .window > .title-bar .btn-close {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, 0.06) !important;
  color: #333 !important;
  font-size: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: none !important;
  cursor: pointer !important;
  padding: 0 !important;
}

html.mobile-mode .window > .title-bar .btn-close:active {
  background: rgba(0, 0, 0, 0.14) !important;
}

/* Injected Mobile Back Button on left of title bar */
.phone-app-back {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  height: 32px;
  padding: 0 8px 0 4px;
  border-radius: 16px;
  border: none;
  background: transparent;
  color: #0a84ff;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  z-index: 3;
}

.phone-app-back:active {
  opacity: 0.55;
}

/* Dark-themed apps: Photo Viewer, Video Player, Terminal, Hospital PDF */
#win-photoviewer > .title-bar,
#win-videoplayer > .title-bar,
#win-cmd > .title-bar,
#win-hospitalpdf > .title-bar {
  background: #14161c !important;
  color: #f3f4f6 !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

#win-photoviewer > .title-bar .btn-close,
#win-videoplayer > .title-bar .btn-close,
#win-cmd > .title-bar .btn-close,
#win-hospitalpdf > .title-bar .btn-close {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
}

#win-photoviewer .window-content {
  background: #000 !important;
}

/* Sticky Notes (#sn-win) as Mobile Notes App */
#sn-win {
  position: absolute !important;
  top: var(--status-h) !important;
  left: 0 !important;
  right: 0 !important;
  bottom: var(--nav-h) !important;
  width: 100% !important;
  height: auto !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #fffbeb !important;
}

#sn-titlebar {
  height: var(--app-header-h) !important;
  background: #fef3c7 !important;
  border-bottom: 1px solid #fde68a !important;
  padding: 0 12px !important;
}

#sn-list {
  background: #fffbeb !important;
  padding: 8px 10px !important;
}

.sn-item {
  background: #ffffff !important;
  border-radius: 14px !important;
  margin-bottom: 8px !important;
  border: 1px solid #fde68a !important;
  box-shadow: 0 2px 6px rgba(180, 140, 20, 0.08);
}

/* ==========================================================================
   8. Per-App Native Mobile Layouts (WeChat, XHS, Files, News, Chrome, Settings, CMD)
   ========================================================================== */

/* --- WeChat Mobile Redesign --- */
#win-wechat > .title-bar {
  background: #ededed !important;
  border-bottom-color: #dcdcdc !important;
}

#wechat-main-ui {
  flex-direction: column-reverse !important;
  position: relative !important;
  height: calc(100% - var(--app-header-h)) !important;
  overflow: hidden !important;
}

/* Turn WeChat's PC left dark sidebar into a real Mobile WeChat Bottom Tab Bar */
#wechat-main-ui > div:first-child {
  width: 100% !important;
  height: 54px !important;
  min-height: 54px !important;
  background: #f7f7f7 !important;
  border-top: 1px solid #e2e2e2 !important;
  flex-direction: row !important;
  justify-content: space-around !important;
  align-items: center !important;
  padding: 0 16px !important;
  gap: 0 !important;
  flex-shrink: 0 !important;
}

#wechat-main-ui > div:first-child > img:first-child {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  margin-bottom: 0 !important;
}

#wechat-main-ui > div:first-child .wechat-nav-btn,
#wechat-main-ui > div:first-child > div {
  margin-bottom: 0 !important;
  margin-top: 0 !important;
}

#wechat-chat-view {
  flex: 1 !important;
  min-height: 0 !important;
  width: 100% !important;
  position: relative !important;
  overflow: hidden !important;
}

#wechat-chat-view > div:first-child {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  background: #ffffff !important;
  border-right: none !important;
}

#wechat-chat-view.wc-detail > div:first-child {
  display: none !important;
}

#wechat-chat-view:not(.wc-detail) #wechat-chat-panel,
#wechat-chat-view:not(.wc-detail) #wechat-profile-panel {
  display: none !important;
}

#wechat-chat-view.wc-detail #wechat-chat-panel,
#wechat-chat-view.wc-detail #wechat-profile-panel {
  width: 100% !important;
  flex: 1 !important;
}

.mm-back-btn {
  position: absolute !important;
  top: 8px !important;
  left: 8px !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.06);
  color: #111;
  z-index: 20;
  cursor: pointer;
}

/* --- Xiaohongshu Mobile 2-Column Feed --- */
#win-xhs > .title-bar {
  background: #ffffff !important;
}
html.mobile-mode #xhs-feed {
  columns: 2 !important;
  column-gap: 10px !important;
  padding: 10px !important;
}

/* --- File Explorer -> Mobile Files / Gallery --- */
html.mobile-mode .explorer-ribbon,
html.mobile-mode .explorer-tabs,
html.mobile-mode .explorer-sidebar {
  display: none !important;
}

html.mobile-mode .explorer-toolbar {
  padding: 8px 10px !important;
  background: #f5f6f8 !important;
  border-bottom: 1px solid #e5e7eb !important;
  gap: 8px !important;
}

html.mobile-mode .folder-content {
  padding: 12px !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px 8px !important;
  align-content: start !important;
}

html.mobile-mode .file-item {
  width: 100% !important;
  min-width: 0 !important;
  padding: 10px 6px !important;
  border-radius: 14px !important;
  background: #f8f9fb;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  transition: transform 0.12s ease, background 0.12s ease;
}

html.mobile-mode .file-item:active {
  transform: scale(0.95);
  background: #eef2ff;
}

/* --- Terminal / unknown.exe Mobile Shell --- */
#win-cmd #cmd-content {
  background: #0a0c10 !important;
  color: #e5e7eb !important;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace !important;
  font-size: 13px !important;
  padding: 12px !important;
}

/* --- Settings Mobile Grouped Cards --- */
#win-settings .window-content {
  background: #f2f2f7 !important;
}
#win-settings .settings-cat {
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

/* ==========================================================================
   9. Mobile Push Notification Banner (Replaces Windows #win-toast)
   ========================================================================== */

#win-toast {
  position: absolute !important;
  top: calc(var(--status-h) + 6px) !important;
  bottom: auto !important;
  left: 12px !important;
  right: 12px !important;
  width: auto !important;
  border-radius: 20px !important;
  background: rgba(28, 30, 38, 0.92) !important;
  backdrop-filter: blur(22px) !important;
  -webkit-backdrop-filter: blur(22px) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45) !important;
  padding: 12px 14px !important;
  z-index: 9600 !important;
  transform: translateY(-150%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease !important;
}

#win-toast.phone-toast-visible {
  transform: translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* ==========================================================================
   10. iOS/HyperOS Rounded Modals & Alerts
   ========================================================================== */

.win-modal-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.48) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9700 !important;
}

.win-modal-box {
  width: min(320px, calc(100% - 36px)) !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.42) !important;
}

/* ==========================================================================
   11. Mobile Lockscreen, OOBE Setup & Passcode Unlock (index.html)
   ========================================================================== */

#win10-oobe-screen {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(165deg, #0d1629 0%, #102a52 48%, #0a1426 100%) !important;
  padding: calc(var(--status-h) + 18px) 20px 24px 20px !important;
  justify-content: space-between !important;
  overflow-y: auto !important;
}

#win10-boot-screen {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: #000 !important;
}

.lockscreen {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(180deg, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0.08) 45%, rgba(0,0,0,0.42) 100%), url('image/野餐.webp') no-repeat center center / cover !important;
  display: flex;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: calc(var(--status-h) + 38px) 24px 22px 24px !important;
  z-index: 200 !important;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease !important;
}

html.zhoumu2 .lockscreen {
  background: linear-gradient(180deg, rgba(0,0,0,0.36) 0%, rgba(0,0,0,0.18) 50%, rgba(0,0,0,0.52) 100%), url('image/野餐2.webp') no-repeat center center / cover !important;
}

html.zhoumu3 .lockscreen {
  background: linear-gradient(180deg, rgba(0,0,0,0.48) 0%, rgba(0,0,0,0.28) 50%, rgba(0,0,0,0.62) 100%), url('image/野餐3.webp') no-repeat center center / cover !important;
}

.lockscreen.slide-up {
  transform: translateY(-100%) !important;
  opacity: 0 !important;
}

.lockscreen-content {
  position: static !important;
  text-align: center !important;
  color: #fff !important;
}

.lockscreen .time {
  font-size: 74px !important;
  font-weight: 200 !important;
  letter-spacing: -2px !important;
  line-height: 1 !important;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  font-variant-numeric: tabular-nums;
}

.lockscreen .date {
  margin-top: 8px !important;
  font-size: 17px !important;
  font-weight: 500 !important;
  opacity: 0.94;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.lock-bottom {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.lock-shortcuts {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.lock-shortcut-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(20, 22, 30, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lockscreen .tip {
  position: static !important;
  transform: none !important;
  font-size: 13px !important;
  color: rgba(255, 255, 255, 0.9) !important;
  letter-spacing: 0.5px;
  animation: pulseTip 2.2s ease-in-out infinite;
}

@keyframes pulseTip {
  0%, 100% { opacity: 0.6; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

.lock-home-bar {
  width: 124px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
}

.login-screen {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(rgba(10, 14, 24, 0.52), rgba(10, 14, 24, 0.68)), url('image/野餐.webp') no-repeat center center / cover !important;
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 40px 28px !important;
  z-index: 100 !important;
}

html.zhoumu2 .login-screen {
  background: linear-gradient(rgba(10, 10, 18, 0.62), rgba(10, 10, 18, 0.78)), url('image/野餐2.webp') no-repeat center center / cover !important;
}

html.zhoumu3 .login-screen {
  background: linear-gradient(rgba(14, 6, 10, 0.68), rgba(10, 6, 8, 0.82)), url('image/野餐3.webp') no-repeat center center / cover !important;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  z-index: -1;
}

.login-screen .avatar {
  width: 96px !important;
  height: 96px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2.5px solid rgba(255, 255, 255, 0.55) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
  margin-bottom: 14px !important;
}

.login-screen .username {
  font-size: 24px !important;
  font-weight: 600 !important;
  color: #fff !important;
  margin-bottom: 24px !important;
  letter-spacing: 0.5px;
}

.login-form {
  width: 100% !important;
  max-width: 280px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.password-container {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  background: rgba(255, 255, 255, 0.16) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 999px !important;
  padding: 4px 6px 4px 18px !important;
  backdrop-filter: blur(12px);
}

.password-container input {
  flex: 1 !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #fff !important;
  font-size: 15px !important;
  height: 38px !important;
}

.password-container input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.password-container button {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  border: none !important;
  background: #0a84ff !important;
  color: #fff !important;
  font-size: 16px !important;
  cursor: pointer !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.error-message {
  margin-top: 14px !important;
  font-size: 13px !important;
  color: #ffd6d6 !important;
  background: rgba(255, 59, 48, 0.22);
  padding: 5px 14px;
  border-radius: 999px;
}

/* ==========================================================================
   12. Deep Interior Mobile App Redesign (Removing All Remaining PC Chrome)
   ========================================================================== */

/* Clean mobile title-bar: hide tiny Windows folder/app icons inside title-text */
html.mobile-mode .window > .title-bar .title-text img {
  display: none !important;
}

/* --- Hide ALL Windows 10 Explorer Chrome in Photos / Docs / Secret / Bin --- */
#win-pics .win10-explorer-header,
#win-docs .win10-explorer-header,
#win-secret .win10-explorer-header,
#win-pics .explorer-statusbar,
#win-docs .explorer-statusbar,
#win-secret .explorer-statusbar,
#win-bin .explorer-statusbar,
#win-bin .explorer-tabs,
#win-bin .explorer-nav {
  display: none !important;
}

/* In Recently Deleted (#win-bin), turn the ribbon into a sleek mobile action bar */
#win-bin .win10-explorer-header {
  display: block !important;
  background: #f8f9fb !important;
  border-bottom: 1px solid #eceef2 !important;
  padding: 8px 14px !important;
}
#win-bin .explorer-ribbon {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  height: auto !important;
}
#win-bin .explorer-ribbon > *:not(#empty-bin-btn) {
  display: none !important;
}
#empty-bin-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 6px 14px !important;
  border-radius: 999px !important;
  background: rgba(255, 59, 48, 0.1) !important;
  color: #ff3b30 !important;
  border: none !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  height: auto !important;
  width: auto !important;
}

/* --- File Manager (#win-pc): Sleek Single-Line Mobile Breadcrumb Bar --- */
#win-pc .explorer-search {
  display: none !important;
}
#win-pc .explorer-toolbar {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 12px !important;
  background: #f5f6f8 !important;
  border-bottom: 1px solid #e7e9ee !important;
  height: auto !important;
  min-height: 44px !important;
}
#win-pc .explorer-nav {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-shrink: 0 !important;
}
#win-pc .explorer-nav button {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  border: none !important;
  background: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
  color: #1f2937 !important;
  font-size: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}
#win-pc .explorer-nav button:disabled {
  opacity: 0.35 !important;
}
#win-pc .explorer-address,
#win-pc .address-bar {
  flex: 1 !important;
  min-width: 0 !important;
  height: 32px !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  padding: 0 10px !important;
  font-size: 12.5px !important;
  color: #374151 !important;
  display: flex !important;
  align-items: center !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

/* --- Mobile Photo Gallery (#win-pics): Full-Bleed Square Photo Tiles --- */
#win-pics .folder-content {
  background: #ffffff !important;
  padding: 10px !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
  flex: 1 !important;
  overflow-y: auto !important;
}

#win-pics .file-item {
  position: relative !important;
  aspect-ratio: 1 / 1 !important;
  padding: 0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background: #f3f4f6 !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  justify-content: center !important;
}

#win-pics .file-item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  margin: 0 !important;
  display: block !important;
}

/* Non-photo files inside Photos (like 文字.txt) keep crisp centered icon */
#win-pics .file-item.is-doc-file {
  background: #f8f9fb !important;
  padding: 14px 8px 26px 8px !important;
}
#win-pics .file-item.is-doc-file img {
  width: 44px !important;
  height: 44px !important;
  object-fit: contain !important;
}

#win-pics .file-item span,
#win-pics .file-item .file-name {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  padding: 14px 6px 5px 6px !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  color: #ffffff !important;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.68)) !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin: 0 !important;
}

#win-pics .file-item.is-doc-file span,
#win-pics .file-item.is-doc-file .file-name {
  color: #1f2937 !important;
  background: transparent !important;
  padding: 4px 6px 7px 6px !important;
}

/* --- Mobile Files / Docs / Secret / Bin Cards --- */
#win-pc .folder-content,
#win-docs .folder-content,
#win-secret .folder-content,
#win-bin .folder-content {
  background: #f6f7f9 !important;
  padding: 14px 12px !important;
  gap: 10px !important;
  flex: 1 !important;
  overflow-y: auto !important;
}

#win-pc .file-item,
#win-docs .file-item,
#win-secret .file-item,
#win-bin .file-item {
  background: #ffffff !important;
  border-radius: 16px !important;
  padding: 14px 8px 10px 8px !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
  border: 1px solid rgba(15, 23, 42, 0.05) !important;
  gap: 6px !important;
}

#win-pc .file-item img,
#win-docs .file-item img,
#win-secret .file-item img,
#win-bin .file-item img {
  width: 46px !important;
  height: 46px !important;
  object-fit: contain !important;
}

#win-pc .file-item span,
#win-docs .file-item span,
#win-secret .file-item span,
#win-bin .file-item span {
  font-size: 12px !important;
  color: #1f2937 !important;
  line-height: 1.3 !important;
  word-break: break-all !important;
}

/* --- Mobile Notes / Notepad (#win-notepad) --- */
#win-notepad .notepad-menu,
#win-notepad .menu-bar {
  display: none !important;
}
#win-notepad .window-content {
  background: #fffefb !important;
  padding: 0 !important;
}
#notepad-input {
  background: #fffefb !important;
  color: #1f2937 !important;
  font-family: var(--os-font) !important;
  font-size: 15.5px !important;
  line-height: 1.75 !important;
  padding: 18px 18px 28px 18px !important;
}

/* --- Mobile WeChat Polish --- */
#wechat-contact-list {
  background: #ffffff !important;
}
#wechat-contact-list > div {
  padding: 12px 14px !important;
  border-bottom: 1px solid #f2f2f2 !important;
}
#wechat-chat-panel {
  background: #ededed !important;
}
#wechat-chat-header {
  padding-left: 48px !important;
  background: #ededed !important;
  border-bottom: 1px solid #dcdcdc !important;
  font-weight: 600 !important;
}
#wechat-input {
  border-radius: 10px !important;
  font-size: 15px !important;
}

/* --- Mobile Spotlight Search (#win-search) --- */
#win-search .window-content {
  background: #f5f6f8 !important;
}
#sys-search-input {
  border-radius: 12px !important;
  font-size: 14.5px !important;
  padding: 10px 14px !important;
}

/* --- Mobile Settings Polish (#win-settings) --- */
#settings-home {
  padding: 16px 14px 28px 14px !important;
}
#win-settings .settings-grid,
#settings-home > div[style*="grid"] {
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

/* Full-bleed photo thumbnails in #win-pics */
#win-pics .file-item:not(.is-doc-file) > div:first-child,
#win-pics .file-item:not(.is-doc-file) .file-icon {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}
#win-pics .file-item:not(.is-doc-file) img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
#empty-bin-btn {
  flex-direction: row !important;
  padding: 7px 14px !important;
  gap: 6px !important;
}
#empty-bin-btn img {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
}
#settings-home input,
#settings-home .settings-search {
  border-radius: 12px !important;
  background: #ffffff !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
}


/* ==========================================================================
   13. Authentic iOS / iPhone OS Polish (Home Indicator, Icons, Files, Settings)
   ========================================================================== */

:root {
  --nav-h: 34px;
}

/* Remove PC window close (X) button from all mobile app headers */
html.mobile-mode .window > .title-bar .window-controls {
  display: none !important;
}

/* Authentic iOS translucent top bar inside apps */
html.mobile-mode .window > .title-bar {
  background: rgba(249, 249, 251, 0.94) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.16) !important;
}

.phone-app-back {
  color: #007aff !important;
  font-size: 15px !important;
  font-weight: 400 !important;
}

/* Authentic iOS Home Indicator Bar (replaces Android 3-button bar) */
#phone-navbar.ios-homebar {
  height: var(--nav-h) !important;
  padding: 0 22px !important;
  background: transparent !important;
  border-top: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

#phone-navbar.ios-homebar.nb-light {
  background: rgba(249, 249, 251, 0.92) !important;
}

.ios-home-hit {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: none;
}

.ios-home-pill {
  width: 134px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease, width 0.15s ease;
}

#phone-navbar.nb-light .ios-home-pill {
  background: rgba(17, 17, 17, 0.85);
  box-shadow: none;
}

.ios-home-hit:active .ios-home-pill {
  transform: scaleX(0.92);
}

.ios-switcher-trigger,
.ios-cc-trigger {
  width: 34px;
  height: 26px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

#phone-navbar.nb-light .ios-switcher-trigger,
#phone-navbar.nb-light .ios-cc-trigger {
  color: rgba(60, 60, 67, 0.55);
}

/* iOS Home Screen Search Pill above Dock */
#ios-search-pill {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--nav-h) + 88px);
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0.5px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  z-index: 6;
}

#desktop {
  padding-bottom: calc(var(--nav-h) + 124px) !important;
}

#phone-dock {
  bottom: calc(var(--nav-h) + 8px) !important;
  border-radius: 28px !important;
  height: 74px !important;
}

/* Authentic iOS Squircle App Icon Backing Colors */
#desktop .desktop-icon .icon-img,
#desktop #sn-ico .sn-ico-img {
  border-radius: 22.5% !important;
}
#icon-pics .icon-img,
.dock-item.dock-photos {
  background: #ffffff !important;
  padding: 6px !important;
}
#icon-pc .icon-img,
.dock-item.dock-files {
  background: #ffffff !important;
  padding: 7px !important;
}
#icon-docs .icon-img {
  background: linear-gradient(145deg, #ff9f0a, #ff6b00) !important;
  padding: 8px !important;
}
#icon-secret .icon-img,
#desktop #sn-ico .sn-ico-img {
  background: #ffffff !important;
  padding: 0 !important;
}
#icon-bin .icon-img {
  background: linear-gradient(145deg, #636366, #3a3a3c) !important;
  padding: 9px !important;
}
#icon-settings-home .icon-img,
.dock-item.dock-settings {
  background: linear-gradient(145deg, #8e8e93, #58585c) !important;
  padding: 7px !important;
}
#icon-search .icon-img {
  background: linear-gradient(145deg, #5ac8fa, #007aff) !important;
  padding: 9px !important;
}

/* --- iOS Files App (#win-pc) --- */
#win-pc .window-content {
  background: #f2f2f7 !important;
}
#win-pc .explorer-main {
  background: #f2f2f7 !important;
  padding: 14px 14px 28px 14px !important;
}
#win-pc .explorer-group-title {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #6e6e73 !important;
  border-bottom: none !important;
  padding: 4px 4px 8px 4px !important;
  margin-top: 8px !important;
}
#win-pc .explorer-folder-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}
#win-pc .explorer-folder-grid .explorer-item {
  background: #ffffff !important;
  border-radius: 16px !important;
  padding: 14px 8px 12px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
  border: none !important;
  width: auto !important;
  height: auto !important;
}
#win-pc .explorer-folder-grid .explorer-item span {
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #1c1c1e !important;
}
#win-pc .explorer-drive-grid {
  display: block !important;
}
#win-pc .explorer-drive-item {
  background: #ffffff !important;
  border-radius: 16px !important;
  padding: 14px 16px !important;
  border: none !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05) !important;
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: none !important;
}
#win-pc .drive-name {
  font-size: 14.5px !important;
  font-weight: 600 !important;
  color: #1c1c1e !important;
  margin-bottom: 6px !important;
}
#win-pc .drive-bar {
  height: 8px !important;
  border-radius: 999px !important;
  background: #e5e5ea !important;
  overflow: hidden !important;
  border: none !important;
}
#win-pc .drive-bar-fill {
  background: linear-gradient(90deg, #ff3b30 0%, #ff9500 32%, #ffcc00 58%, #007aff 100%) !important;
  border-radius: 999px !important;
}
#win-pc .drive-text {
  font-size: 12px !important;
  color: #8e8e93 !important;
  margin-top: 6px !important;
}

/* --- iOS Settings App (#win-settings) --- */
#settings-home {
  background: #f2f2f7 !important;
  padding: 14px 16px 28px 16px !important;
}
/* Apple ID Card at top */
#settings-home > div:nth-child(1) {
  background: #ffffff !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  margin-bottom: 16px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
  position: relative;
}
#settings-home > div:nth-child(1)::after {
  content: "›";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #c7c7cc;
}
/* Hide redundant centered "设置" title since mobile header already shows "设置" */
#settings-home > div:nth-child(2) {
  display: none !important;
}
#settings-home > div:nth-child(3) {
  margin-bottom: 16px !important;
}
#settings-home > div:nth-child(3) > div {
  width: 100% !important;
  height: 36px !important;
  border-radius: 10px !important;
  background: rgba(118, 118, 128, 0.12) !important;
  border: none !important;
  font-size: 14px !important;
  color: #8e8e93 !important;
}
/* iOS Single-Column Grouped Settings List */
#settings-home > div:nth-child(4) {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  background: #ffffff !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}
#settings-home .settings-cat {
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #ffffff !important;
  padding: 12px 32px 12px 14px !important;
  border-bottom: 0.5px solid #e5e5ea !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  position: relative;
}
#settings-home .settings-cat:last-child {
  border-bottom: none !important;
}
#settings-home .settings-cat::after {
  content: "›";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 19px;
  color: #c7c7cc;
}
#settings-home .settings-cat svg {
  width: 28px !important;
  height: 28px !important;
  padding: 5px !important;
  border-radius: 7px !important;
  background: #007aff !important;
  stroke: #ffffff !important;
  flex-shrink: 0;
}
#settings-home .settings-cat:nth-child(2) svg { background: #5856d6 !important; }
#settings-home .settings-cat:nth-child(3) svg { background: #34c759 !important; }
#settings-home .settings-cat:nth-child(4) svg { background: #32ade6 !important; }
#settings-home .settings-cat:nth-child(5) svg { background: #ff9500 !important; }
#settings-home .settings-cat:nth-child(6) svg { background: #8e8e93 !important; }
#settings-home .settings-cat:nth-child(7) svg { background: #af52de !important; }
#settings-home .settings-cat:nth-child(8) svg { background: #ff3b30 !important; }
#settings-home .settings-cat b {
  font-size: 14.5px !important;
  font-weight: 500 !important;
  color: #1c1c1e !important;
  display: block;
}
#settings-home .settings-cat span {
  font-size: 11.5px !important;
  color: #8e8e93 !important;
}

/* Hide redundant Windows Settings left rail / gray '< 主页' strip (iOS top '< 返回' handles back) */
#settings-system > div > div:first-child,
#settings-recovery > div > div:first-child {
  display: none !important;
}
#settings-system > div > div:last-child,
#settings-recovery > div > div:last-child {
  background: #f2f2f7 !important;
  padding: 16px 16px 32px 16px !important;
}
#settings-system table {
  width: 100% !important;
  background: #ffffff !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}
#settings-system table tr {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 11px 14px !important;
  border-bottom: 0.5px solid #e5e5ea !important;
}
#settings-system table tr:last-child {
  border-bottom: none !important;
}
#settings-system table td {
  padding: 0 !important;
  font-size: 14px !important;
}
#settings-system table td:first-child {
  color: #1c1c1e !important;
  font-weight: 400 !important;
}
#settings-system table td:last-child {
  color: #8e8e93 !important;
  text-align: right !important;
}
#settings-recovery .settings-btn {
  border-radius: 12px !important;
  padding: 10px 20px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  background: #007aff !important;
  color: #fff !important;
  border: none !important;
}

.ios-mini-badge {
  border-radius: 22.5%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.24);
}
.ios-mini-badge svg,
.ios-mini-badge img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  display: block;
}

/* ==========================================================================
   Loop 2 · 拼图画布 (Jigsaw Layer)
   PC 版把 9 块碎片当作桌面图标，靠 absolute 的 left/top 定位来"拼图"。
   手机壳把图标塞进了 CSS Grid 并用 `left:auto !important` 锁死了坐标，
   导致碎片拖不动、也拼不起来。这里给碎片一块独立的绝对定位画布，
   让原作 checkCreepyPuzzle() 的坐标逻辑继续成立。
   ========================================================================== */
#phone-puzzle-layer {
  position: absolute;
  inset: 0;
  z-index: 56;
  display: flex;
  background: rgba(8, 10, 18, 0.66);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  touch-action: none;
}

#phone-puzzle-layer .ppl-head {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--status-h) + 8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  letter-spacing: .4px;
  pointer-events: none;
}

#phone-puzzle-layer .ppl-guide {
  position: absolute;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  pointer-events: none;
  z-index: 9;
}

#phone-puzzle-layer .ppl-close {
  pointer-events: auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* 碎片本体：脱离 #desktop 后 inline left/top 才会生效 */
#phone-puzzle-layer .desktop-icon {
  position: absolute !important;
  width: 66px !important;
  height: 82px !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  touch-action: none;
  cursor: grab;
}
#phone-puzzle-layer .desktop-icon:active { transform: none !important; }
#phone-puzzle-layer .desktop-icon .icon-img {
  width: 66px !important;
  height: 82px !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45) !important;
  display: block !important;
}
#phone-puzzle-layer .desktop-icon .icon-img img {
  width: 66px !important;
  height: 82px !important;
  border-radius: 0 !important;
  /* fill 而不是 cover：9 块 200×200 的方块拼成整张图时，相邻边缘才不会错位 */
  object-fit: fill !important;
}

/* 拼合完成的成品图（pt/fullpt.webp） */
#phone-puzzle-layer .ppl-done {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(72vw, 300px);
  height: auto;
  aspect-ratio: 1 / 1;          /* 原图 660×660：先占好位，图片没下完也不会塌成 0 高 */
  object-fit: contain;
  background: #0b0b0b;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  animation: ppl-done-pop 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.15) forwards;
  z-index: 30;
  pointer-events: none;
}

@keyframes ppl-done-pop {
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}
#phone-puzzle-layer .desktop-icon .icon-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 10px 2px 2px;
  font-size: 9.5px;
  line-height: 12px;
  color: #fff;
  text-shadow: none;
  text-align: center;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.66));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

/* 收起后回到主屏的小入口 */
#phone-puzzle-chip {
  position: absolute;
  right: 14px;
  bottom: calc(var(--nav-h, 34px) + 96px);
  z-index: 40;
  padding: 7px 14px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #1c1c1e;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

