/* 摘自小灶 OS，MIT 许可及来源见同目录 LICENSE 和项目 README。 */
.home {
  position: fixed;
  inset: 0;
  padding: calc(64px + env(safe-area-inset-top)) 24px 130px;
  overflow: auto;
  z-index: 10;
}
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 10px; }
.home .grid { position: relative; z-index: 2; }
.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.app .ic {
  width: 60px; height: 60px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 6px 16px rgba(10, 5, 40, 0.35);
}
.app img.ic { box-shadow: none; filter: drop-shadow(0 5px 10px rgba(10, 5, 40, 0.35)); width: 68px; height: 68px; margin: -4px; object-fit: contain; }
.app .lb { font-size: 11.5px; color: #fff; text-shadow: 0 1px 6px rgba(10, 5, 40, 0.6); white-space: nowrap; }
.dockbar {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  height: 88px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(22px);
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  z-index: 20;
}
.dockbar img { width: 66px; height: 66px; object-fit: contain; display: block; filter: drop-shadow(0 5px 10px rgba(10, 5, 40, 0.3)); }

/* ---------- App 全屏视图 ---------- */
.scr {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--i-bg);
  display: flex;
  flex-direction: column;
  transform: translate3d(100%, 0, 0);
  transition: transform 0.34s cubic-bezier(0.32, 0.72, 0.25, 1), opacity 0.24s ease, border-radius 0.34s cubic-bezier(0.32, 0.72, 0.25, 1);
  pointer-events: none;
  will-change: transform, opacity, border-radius;
  backface-visibility: hidden;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
.scr.prelaunch { transition: none !important; }
.scr.open { transform: translate3d(0, 0, 0); pointer-events: auto; }
.scr.under { transform: translate3d(-7%, 0, 0) scale(0.96); border-radius: 28px; }
/* 主屏启动的 App：iOS 式从图标缩放弹出/收回 */
.scr.zoom {
  transform-origin: 0 0;
  transform: translate3d(var(--launch-x, 50vw), var(--launch-y, 72vh), 0) scale(var(--launch-scale-x, 0.18), var(--launch-scale-y, 0.1));
  opacity: 0;
  border-radius: var(--launch-radius, 24px);
  transition: transform 0.46s cubic-bezier(0.2, 0.9, 0.2, 1), opacity 0.26s ease, border-radius 0.46s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.scr.zoom.open { transform: translate3d(0, 0, 0) scale(1); opacity: 1; border-radius: 0; }
.scr.zoom.closing { pointer-events: none; }
.scr.zoom.under { transform: translate3d(-7%, 0, 0) scale(0.96); opacity: 1; border-radius: 28px; }
.nav {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: calc(50px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--i-bg) 88%, #fff);
  border-bottom: 1px solid var(--i-line);
}
.nav .back {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--i-blue);
  font-size: 16px;
  font-weight: 500;
  flex: none;
}
.nav .back .chev { font-size: 26px; line-height: 1; margin-top: -3px; }
