* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
  min-height: calc(100% + env(safe-area-inset-top));
  overflow: hidden;
  background: #000;
}

body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  font-family: var(--app-font, -apple-system, "PingFang SC", sans-serif);
  font-size: var(--app-font-size, 15px);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.phone {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.wallpaper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  background-size: cover;
  background-position: center;
}

.home {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: calc(env(safe-area-inset-top) + 24px);
  padding-bottom: max(12px, calc(env(safe-area-inset-bottom) - 10px));
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  row-gap: 22px;
  justify-items: center;
  padding: 0 16px;
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.app-name {
  margin-top: 6px;
  font-size: calc(var(--app-font-size, 15px) - 3px);
  color: #111111;
}

.dock {
  margin: 0 12px;
  padding: 14px 10px;
  border-radius: 32px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.10) 50%, rgba(255, 255, 255, 0.22) 100%);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.14),
    0 2px 6px rgba(0, 0, 0, 0.06),
    inset 0 2px 3px rgba(255, 255, 255, 0.95),
    inset 0 -2px 4px rgba(0, 0, 0, 0.08);
}

.bg-1 { background: linear-gradient(160deg, #ff9a9e, #fad0c4); }
.bg-2 { background: linear-gradient(160deg, #5ee27a, #2bb84f); }
.bg-3 { background: linear-gradient(160deg, #ffffff, #e8ecf3); }
.bg-4 { background: linear-gradient(160deg, #ff6b81, #ff2d55); }
.bg-5 { background: linear-gradient(160deg, #b0b6c1, #7d8490); }

.app-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.app-screen.open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.lock-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding-top: calc(env(safe-area-inset-top) + 46px);
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  transition: transform 0.28s ease;
}

.lock-screen.active {
  display: flex;
}

.lock-wallpaper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  background-size: cover;
  background-position: center;
  z-index: -1;
}

.lock-clock {
  text-align: center;
  color: #111111;
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.65);
}

.lock-date {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 4px;
}

.lock-time {
  font-size: 74px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -1px;
}

.lock-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lock-hint {
  font-size: 13px;
  color: rgba(17, 17, 17, 0.7);
}

.lock-bar {
  width: 134px;
  height: 5px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.25);
}
.app-icon.has-custom-icon {
  font-size: 0;
  background-size: cover;
  background-position: center;
}
/* 对角渐隐高光液态玻璃（左上、右下亮，左下、右上渐隐） */
.glass,
.app-back,
.mu-back-sm {
  position: relative;
}

.glass,
.app-back,
.lg-bottom-bar,
.mu-back-sm,
.mu-mini-player,
.mu-bottom-bar {
  border: none !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0.18) 100%) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.05),
    inset 0 1px 1px rgba(255, 255, 255, 0.5),
    inset 0 -1px 2px rgba(0, 0, 0, 0.05) !important;
}

.glass::before,
.app-back::before,
.lg-bottom-bar::before,
.mu-back-sm::before,
.mu-mini-player::before,
.mu-bottom-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.3px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.35) 22%,
    rgba(255, 255, 255, 0) 44%,
    rgba(255, 255, 255, 0) 56%,
    rgba(255, 255, 255, 0.35) 78%,
    rgba(255, 255, 255, 0.92) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
