:root {
  --sb-h: 44px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --glass: rgba(255, 255, 255, 0.14);
  --glass-edge: rgba(255, 255, 255, 0.22);
  --tile: 66px;
  --dock-tile: 56px;
  --dock-max: none;
  --label-size: 11.5px;
  --indicator-w: 134px;
  --widget-h: 152px;
  --page-cols: 4;
  --page-pad: 14px;
  --page-pad-top: 14px;
  --page-gap-y: 18px;
  --page-gap-x: 10px;
  --text-scale: 1;
}

body {
  background: #05060a;
}

@media (min-width: 1024px) and (min-height: 640px) {
  body {
    display: grid;
    place-items: center;
    background: radial-gradient(55% 55% at 18% 8%, #1b1547 0%, transparent 62%),
      radial-gradient(45% 55% at 86% 16%, #40112f 0%, transparent 60%),
      radial-gradient(80% 80% at 50% 112%, #0a1526 0%, transparent 68%),
      #05060a;
  }
  body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 3px 3px;
    opacity: 0.5;
  }
}

/* ---------------------------------------------------------------- device */

.device {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: #000;
  isolation: isolate;
}

@media (min-width: 1024px) and (min-height: 640px) {
  .device {
    width: min(1366px, calc(100vw - 64px), calc((100dvh - 84px) * 4 / 3));
    height: auto;
    aspect-ratio: 4 / 3;
    padding: 13px;
    border-radius: 40px;
    background: linear-gradient(
      150deg,
      #43434b 0%,
      #141418 14%,
      #08080b 48%,
      #101014 84%,
      #3a3a42 100%
    );
    box-shadow: 0 60px 150px -40px rgba(0, 0, 0, 0.95),
      0 0 0 1px rgba(255, 255, 255, 0.08),
      inset 0 0 0 2px #000, inset 0 0 50px rgba(0, 0, 0, 0.9);
  }
  .device::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    width: 7px;
    height: 7px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #3d5f8a 0 35%, #05070c 70%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
    z-index: 40;
    pointer-events: none;
  }
  .screen {
    border-radius: 30px;
  }
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  isolation: isolate;
}

/* ------------------------------------------------------------- wallpaper */

.wallpaper {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(120% 90% at 8% -12%, #4b2bff 0%, transparent 56%),
    radial-gradient(100% 78% at 96% 4%, #ff4f9a 0%, transparent 52%),
    radial-gradient(130% 110% at 50% 118%, #07224a 0%, transparent 62%),
    linear-gradient(180deg, #0b0b2e 0%, #05060d 72%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.5;
  animation: blob-float 20s ease-in-out infinite alternate;
}

.blob-1 {
  width: 62%;
  aspect-ratio: 1;
  left: -18%;
  top: 4%;
  background: radial-gradient(circle at 40% 40%, #7a5cff, transparent 68%);
  animation-duration: 23s;
}

.blob-2 {
  width: 55%;
  aspect-ratio: 1;
  right: -16%;
  top: 26%;
  background: radial-gradient(circle at 50% 50%, #ff6fb0, transparent 66%);
  animation-duration: 27s;
  animation-delay: -6s;
}

.blob-3 {
  width: 74%;
  aspect-ratio: 1;
  left: 8%;
  bottom: -20%;
  background: radial-gradient(circle at 50% 50%, #1b8cff, transparent 64%);
  animation-duration: 31s;
  animation-delay: -12s;
  opacity: 0.42;
}

@keyframes blob-float {
  from {
    transform: translate3d(-4%, -2%, 0) scale(1);
  }
  to {
    transform: translate3d(6%, 5%, 0) scale(1.16);
  }
}

/* ------------------------------------------------------------ status bar */

.statusbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: var(--sb-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 26px;
  color: #fff;
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: 0.2px;
  pointer-events: none;
}

.statusbar::before {
  content: "";
  position: absolute;
  inset: -12px 0 auto;
  height: 68px;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.34), transparent);
  pointer-events: none;
}

.sb-time {
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.sb-right {
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: auto;
}

.sb-right svg {
  height: 12px;
  width: auto;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}

.sb-battery {
  position: relative;
  width: 25px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 1.5px;
}

.sb-battery::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -3.5px;
  width: 2px;
  height: 4px;
  border-radius: 0 2px 2px 0;
  background: rgba(255, 255, 255, 0.55);
  transform: translateY(-50%);
}

.sb-battery-fill {
  display: block;
  width: 86%;
  height: 100%;
  border-radius: 2px;
  background: #fff;
}

.sb-lock {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: -6px 0 -6px 2px;
  border-radius: 50%;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, background 0.25s ease;
}

.sb-lock svg {
  width: 14px;
  height: 14px;
  filter: none;
}

body.unlocked .sb-lock {
  opacity: 0.8;
  pointer-events: auto;
}

body.unlocked .sb-lock:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

body.app-open .sb-lock {
  opacity: 0;
  pointer-events: none;
}

/* ------------------------------------------------------------------ home */

.home {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding-top: var(--sb-h);
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}

body.unlocked .home {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.pages-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
}

.pages-viewport.dragging {
  cursor: grabbing;
}

.pages {
  display: flex;
  height: 100%;
  will-change: transform;
  transition: transform 0.42s var(--ease);
}

.pages-viewport.dragging .pages {
  transition: none;
}

.page {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(var(--page-cols), 1fr);
  grid-auto-rows: min-content;
  gap: var(--page-gap-y) var(--page-gap-x);
  align-content: start;
  padding: var(--page-pad-top) var(--page-pad) 0;
  overflow: hidden;
}

/* ---------------------------------------------------------------- widgets */

.home-widget {
  position: relative;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  min-height: var(--widget-h);
  padding: 15px 16px 14px;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  text-align: left;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.19);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 18px 38px -24px rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(22px) saturate(175%);
  backdrop-filter: blur(22px) saturate(175%);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-user-select: none;
  user-select: none;
}

.home-widget:active {
  transform: scale(0.97);
}

.home-widget:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}

.widget-weather::before {
  content: "";
  position: absolute;
  top: -46px;
  right: -34px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 226, 140, 0.55),
    rgba(255, 200, 90, 0) 70%
  );
  pointer-events: none;
}

.widget-clock::before {
  content: "";
  position: absolute;
  bottom: -60px;
  left: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(120, 190, 255, 0.4),
    rgba(90, 130, 255, 0) 70%
  );
  pointer-events: none;
}

.hw-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}

.hw-label {
  white-space: nowrap;
}

.hw-greeting,
.hw-place {
  overflow: hidden;
  font-size: 9.5px;
  font-weight: 550;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.62);
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.hw-time {
  position: relative;
  z-index: 1;
  margin-top: 4px;
  font-size: clamp(32px, 9vw, 40px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -1.6px;
  font-variant-numeric: tabular-nums;
}

.hw-date {
  position: relative;
  z-index: 1;
  overflow: hidden;
  font-size: 10.5px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.62);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hw-weather {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
}

.hw-temp {
  font-size: 36px;
  font-weight: 250;
  line-height: 1;
  letter-spacing: -1.4px;
}

.hw-icon {
  width: 42px;
  height: 42px;
  flex: none;
  margin-right: -4px;
}

.hw-cond {
  position: relative;
  z-index: 1;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 10px 0 8px;
  min-height: 24px;
}

.dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  transition: background 0.25s ease, transform 0.25s ease;
}

.dot.active {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.08);
}

.dock {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: calc(100% - 24px);
  max-width: var(--dock-max);
  margin: 0 auto;
  padding: 12px 8px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid var(--glass-edge);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
}

.home-indicator {
  display: block;
  width: var(--indicator-w);
  height: 5px;
  margin: 10px auto 9px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* --------------------------------------------------------------- app view */

.appview {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: #000;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: scale(var(--from-scale, 0.9));
  transform-origin: var(--from-x, 50%) var(--from-y, 50%);
  transition: opacity 0.26s ease, transform 0.4s var(--ease),
    visibility 0s linear 0.4s;
}

body.app-open .appview {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition: opacity 0.26s ease, transform 0.42s var(--ease-out),
    visibility 0s;
}

.appview iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.app-close-zone {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 36px;
  cursor: pointer;
  touch-action: none;
  outline: none;
}

.app-close-zone:focus-visible {
  outline: none;
}

.appview iframe:focus {
  outline: none;
}

.app-close-zone .home-indicator {
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.85);
  mix-blend-mode: difference;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 380px) {
  :root {
    --tile: 58px;
  }
  .page {
    gap: 16px 8px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .home-widget {
    min-height: 142px;
    padding: 13px 14px 12px;
    border-radius: 22px;
  }
}

.device-note {
  display: none;
}

/* ----------------------------------------------------- tablet (full-bleed) */

@media (min-width: 700px) and (min-height: 600px) and (max-width: 1023px) {
  :root {
    --tile: 78px;
    --dock-tile: 62px;
    --label-size: 12.5px;
    --indicator-w: 150px;
    --widget-h: 176px;
    --page-pad: 22px;
    --page-gap-y: 22px;
    --page-gap-x: 14px;
    --dock-max: 560px;
  }

  .statusbar {
    padding: 0 26px 0 30px;
    font-size: 14px;
  }

  .home-widget {
    padding: 18px 20px 16px;
    border-radius: 26px;
  }

  .hw-time {
    font-size: 48px;
  }

  .hw-temp {
    font-size: 44px;
  }

  .hw-icon {
    width: 50px;
    height: 50px;
  }

  .hw-date,
  .hw-cond {
    font-size: 11.5px;
  }

  .dock {
    padding: 14px 16px;
    border-radius: 36px;
  }
}

/* ------------------------------------------------------ iPad landscape 4:3 */

@media (min-width: 1024px) and (min-height: 640px) {
  :root {
    --tile: 88px;
    --dock-tile: 68px;
    --label-size: 13.5px;
    --indicator-w: 170px;
    --widget-h: 220px;
    --page-cols: 6;
    --page-pad: 30px;
    --page-gap-y: 26px;
    --page-gap-x: 18px;
    --dock-max: 680px;
  }

  .statusbar {
    padding: 0 30px 0 34px;
    font-size: 14px;
  }

  .sb-right {
    gap: 8px;
  }

  .sb-right svg {
    height: 13px;
  }

  .sb-battery {
    width: 27px;
    height: 13px;
  }

  .home-widget {
    grid-column: span 3;
    padding: 20px 22px 18px;
    border-radius: 28px;
  }

  .hw-top {
    font-size: 10.5px;
  }

  .hw-greeting,
  .hw-place {
    font-size: 10.5px;
  }

  .hw-time {
    font-size: 56px;
    letter-spacing: -2px;
  }

  .hw-date {
    font-size: 12.5px;
  }

  .hw-temp {
    font-size: 46px;
  }

  .hw-icon {
    width: 52px;
    height: 52px;
  }

  .hw-cond {
    font-size: 11px;
  }

  .page-dots {
    padding: 12px 0 10px;
  }

  .dot {
    width: 8px;
    height: 8px;
  }

  .dock {
    padding: 14px 20px;
    border-radius: 38px;
  }

  .home-indicator {
    height: 6px;
    margin: 12px auto 10px;
  }

  .device-note {
    display: block;
    position: fixed;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    font-size: 12px;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.42);
    white-space: nowrap;
    pointer-events: none;
  }
}

@media (min-width: 1400px) and (min-height: 800px) {
  :root {
    --tile: 96px;
    --label-size: 14px;
    --widget-h: 232px;
    --page-gap-y: 28px;
  }

  .hw-time {
    font-size: 62px;
  }

  .hw-temp {
    font-size: 50px;
  }
}

@media (min-width: 1700px) and (min-height: 900px) {
  :root {
    --tile: 102px;
    --page-gap-y: 30px;
  }
}

/* --------------------------------------------------------- home auto-fit */

.home.is-compact {
  --tile: 56px;
  --widget-h: 128px;
  --page-gap-y: 14px;
  --page-gap-x: 8px;
  --page-pad: 10px;
  --page-pad-top: 10px;
  --label-size: 11px;
  --dock-tile: 50px;
  --indicator-w: 118px;
}

.home.is-compact .app-icon {
  gap: 5px;
}

.home.is-compact .home-widget {
  padding: 12px 14px 11px;
  border-radius: 20px;
}

.home.is-compact .hw-top {
  font-size: 8.5px;
}

.home.is-compact .hw-greeting,
.home.is-compact .hw-place {
  font-size: 8.5px;
}

.home.is-compact .hw-time {
  font-size: 32px;
  letter-spacing: -1px;
}

.home.is-compact .hw-date {
  font-size: 9.5px;
}

.home.is-compact .hw-temp {
  font-size: 32px;
}

.home.is-compact .hw-icon {
  width: 34px;
  height: 34px;
}

.home.is-compact .hw-cond {
  font-size: 9px;
}

.home.is-compact .dock {
  padding: 9px 8px;
  border-radius: 28px;
}

.home.is-compact .page-dots {
  min-height: 18px;
  padding: 6px 0 5px;
}

.home.is-compact .dot {
  width: 6px;
  height: 6px;
}

.home.is-compact .home-indicator {
  height: 4px;
  margin: 7px auto 6px;
}

.home.is-icons-only .home-widget {
  display: none;
}

.home.is-scrollable .pages-viewport {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.home.is-scrollable .pages {
  height: auto;
  min-height: 100%;
}

.home.is-scrollable .page {
  height: auto;
  min-height: 100%;
  overflow: visible;
  padding-bottom: 10px;
}

@media (min-width: 700px) and (min-height: 600px) and (max-width: 1023px) {
  .home.is-compact {
    --tile: 72px;
    --widget-h: 158px;
    --page-gap-y: 16px;
    --page-gap-x: 12px;
    --page-pad: 18px;
    --page-pad-top: 12px;
    --label-size: 12px;
    --dock-tile: 58px;
    --indicator-w: 138px;
  }

  .home.is-compact .app-icon {
    gap: 6px;
  }

  .home.is-compact .home-widget {
    padding: 15px 18px 14px;
    border-radius: 23px;
  }

  .home.is-compact .hw-top,
  .home.is-compact .hw-greeting,
  .home.is-compact .hw-place {
    font-size: 9.5px;
  }

  .home.is-compact .hw-time {
    font-size: 42px;
  }

  .home.is-compact .hw-date {
    font-size: 10.5px;
  }

  .home.is-compact .hw-temp {
    font-size: 38px;
  }

  .home.is-compact .hw-icon {
    width: 44px;
    height: 44px;
  }

  .home.is-compact .hw-cond {
    font-size: 10px;
  }

  .home.is-compact .dock {
    padding: 11px 14px;
    border-radius: 32px;
  }
}

@media (min-width: 1024px) and (min-height: 640px) {
  .home.is-compact {
    --tile: 78px;
    --widget-h: 176px;
    --page-gap-y: 18px;
    --page-gap-x: 16px;
    --page-pad: 24px;
    --page-pad-top: 10px;
    --label-size: 12.5px;
    --dock-tile: 62px;
    --indicator-w: 150px;
  }

  .home.is-compact .app-icon {
    gap: 6px;
  }

  .home.is-compact .home-widget {
    padding: 16px 18px 15px;
    border-radius: 24px;
  }

  .home.is-compact .hw-top,
  .home.is-compact .hw-greeting,
  .home.is-compact .hw-place {
    font-size: 9.5px;
  }

  .home.is-compact .hw-time {
    font-size: 46px;
  }

  .home.is-compact .hw-date {
    font-size: 11px;
  }

  .home.is-compact .hw-temp {
    font-size: 40px;
  }

  .home.is-compact .hw-icon {
    width: 46px;
    height: 46px;
  }

  .home.is-compact .hw-cond {
    font-size: 10px;
  }

  .home.is-compact .dock {
    padding: 11px 16px;
    border-radius: 34px;
  }

  .home.is-compact .page-dots {
    min-height: 20px;
    padding: 7px 0 6px;
  }

  .home.is-compact .home-indicator {
    height: 5px;
    margin: 8px auto 7px;
  }
}

/* --------------------------------------------------------- display layers */

.display-tint,
.display-dim {
  position: absolute;
  inset: 0;
  z-index: 91;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.display-dim {
  z-index: 90;
  background: #000;
}

.display-tint {
  background: #ffb45a;
  mix-blend-mode: multiply;
}

/* ------------------------------------------------------------ light theme */

html[data-appearance="light"] body {
  color: #1c1c1e;
}

html[data-appearance="light"] .wallpaper {
  background: radial-gradient(120% 90% at 8% -12%, #c8d8ff 0%, transparent 58%),
    radial-gradient(100% 78% at 96% 4%, #ffd7ea 0%, transparent 54%),
    radial-gradient(130% 110% at 50% 118%, #d9ecff 0%, transparent 64%),
    linear-gradient(180deg, #f4f7ff 0%, #eef1f8 74%);
}

html[data-appearance="light"] .blob {
  opacity: 0.32;
}

html[data-appearance="light"] .statusbar {
  color: #1c1c1e;
}

html[data-appearance="light"] .sb-time {
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.65);
}

html[data-appearance="light"] .statusbar::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), transparent);
}

html[data-appearance="light"] .sb-right svg {
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.5));
}

html[data-appearance="light"] .sb-battery {
  border-color: rgba(28, 28, 30, 0.5);
}

html[data-appearance="light"] .sb-battery::after {
  background: rgba(28, 28, 30, 0.5);
}

html[data-appearance="light"] .sb-battery-fill {
  background: #1c1c1e;
}

html[data-appearance="light"] .sb-lock,
html[data-appearance="light"] .sb-notify {
  color: #1c1c1e;
}

html[data-appearance="light"] .sb-lock:hover,
html[data-appearance="light"] .sb-notify:hover {
  background: rgba(0, 0, 0, 0.08);
}

html[data-appearance="light"] .sb-lock svg,
html[data-appearance="light"] .sb-notify svg {
  filter: none;
}

html[data-appearance="light"] .home-widget {
  background: rgba(28, 28, 32, 0.62);
  border-color: rgba(255, 255, 255, 0.2);
}

html[data-appearance="light"] .dock {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

html[data-appearance="light"] .icon-label {
  color: #1c1c1e;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}

html[data-appearance="light"] .app-icon:focus-visible .icon-tile,
html[data-appearance="light"] .dock-icon:focus-visible .icon-tile {
  outline-color: rgba(0, 0, 0, 0.7);
}

html[data-appearance="light"] .dot {
  background: rgba(0, 0, 0, 0.24);
}

html[data-appearance="light"] .dot.active {
  background: rgba(0, 0, 0, 0.72);
}

html[data-appearance="light"] .home-indicator {
  background: rgba(0, 0, 0, 0.5);
  box-shadow: none;
}

html[data-appearance="light"] .lock-brand,
html[data-appearance="light"] .lock-tagline,
html[data-appearance="light"] .lock-date,
html[data-appearance="light"] .lock-time {
  color: #1c1c1e;
  text-shadow: 0 2px 14px rgba(255, 255, 255, 0.55);
}

html[data-appearance="light"] .lock-widget {
  background: rgba(28, 28, 32, 0.62);
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.9);
}

html[data-appearance="light"] .slide {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(0, 0, 0, 0.12);
}

html[data-appearance="light"] .slide-text {
  color: rgba(28, 28, 30, 0.78);
}

html[data-appearance="light"] .slide-fill {
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.16),
    rgba(0, 0, 0, 0.04)
  );
}

html[data-appearance="light"] .lock-hint {
  color: rgba(28, 28, 30, 0.55);
}

/* ------------------------------------------------------------ home search */

.home-search {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: min(220px, 60%);
  height: 38px;
  margin: 2px auto 8px;
  padding: 0 16px;
  flex: none;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.15);
  font-size: 12.5px;
  font-weight: 550;
  letter-spacing: 0.1px;
  box-shadow: 0 12px 28px -18px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  backdrop-filter: blur(20px) saturate(170%);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.18s ease;
}

.home-search svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.home-search:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.23);
}

.home-search:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}

.home.is-compact .home-search {
  height: 32px;
  width: min(190px, 56%);
  margin-bottom: 6px;
  font-size: 11.5px;
}

.home.is-compact .home-search svg {
  width: 13px;
  height: 13px;
}

html[data-appearance="light"] .home-search {
  color: rgba(28, 28, 30, 0.74);
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px -20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

html[data-appearance="light"] .home-search:active {
  background: rgba(255, 255, 255, 0.75);
}

/* ---------------------------------------------------------------- spotlight */

.spotlight {
  position: absolute;
  inset: 0;
  z-index: 28;
  display: flex;
  justify-content: center;
  padding: calc(var(--sb-h) + 12px) 16px
    max(24px, calc(env(safe-area-inset-bottom) + 16px));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0s linear 0.22s;
}

.spotlight[hidden] {
  display: none;
}

.spotlight.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.22s ease, visibility 0s;
}

.spotlight-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: rgba(6, 8, 14, 0.38);
  -webkit-backdrop-filter: blur(26px) saturate(140%);
  backdrop-filter: blur(26px) saturate(140%);
  cursor: default;
}

.spotlight-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(680px, 100%);
  min-height: 0;
  max-height: 100%;
}

.spotlight-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 14px;
  background: rgba(28, 28, 34, 0.72);
  box-shadow: 0 20px 44px -28px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
}

.spotlight-bar > svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: rgba(255, 255, 255, 0.55);
}

#spotlightInput {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 17px;
  letter-spacing: -0.1px;
}

#spotlightInput::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

#spotlightInput::-webkit-search-cancel-button {
  display: none;
}

.spotlight-cancel {
  flex: none;
  padding: 6px 4px;
  color: #4da3ff;
  font-size: 15px;
  font-weight: 600;
}

.spotlight-status {
  min-height: 14px;
  margin: 14px 4px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.spotlight-results {
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.spotlight-group-title {
  margin: 12px 4px 6px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}

.spotlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: transparent;
  text-align: left;
}

.spotlight-item.selected {
  background: rgba(255, 255, 255, 0.14);
}

.spotlight-item:active {
  background: rgba(255, 255, 255, 0.2);
}

.spotlight-item:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: -2px;
}

.spotlight-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  overflow: hidden;
  border-radius: 11px;
  color: #fff;
  background: var(--bing, linear-gradient(160deg, #4b5563, #111827));
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.spotlight-icon svg {
  width: 62%;
  height: 62%;
}

.spotlight-icon.settings {
  background: var(--tint, #8e8e93);
}

.spotlight-icon.settings svg {
  width: 58%;
  height: 58%;
}

.spotlight-item-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.spotlight-item-text strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.1px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spotlight-item-text small {
  overflow: hidden;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spotlight-badge {
  flex: none;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ffd60a;
  background: rgba(255, 214, 10, 0.15);
  font-size: 10px;
  font-weight: 600;
}

.spotlight-empty {
  margin: 42px 12px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.spotlight-empty strong {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  font-weight: 600;
}

body.spotlight-open .sb-right {
  pointer-events: none;
}

html[data-appearance="light"] .spotlight-backdrop {
  background: rgba(238, 241, 248, 0.55);
}

html[data-appearance="light"] .spotlight-bar {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 44px -30px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html[data-appearance="light"] .spotlight-bar > svg {
  color: rgba(28, 28, 30, 0.5);
}

html[data-appearance="light"] #spotlightInput {
  color: #1c1c1e;
}

html[data-appearance="light"] #spotlightInput::placeholder {
  color: rgba(28, 28, 30, 0.45);
}

html[data-appearance="light"] .spotlight-status,
html[data-appearance="light"] .spotlight-group-title,
html[data-appearance="light"] .spotlight-empty {
  color: rgba(28, 28, 30, 0.5);
}

html[data-appearance="light"] .spotlight-empty strong {
  color: rgba(28, 28, 30, 0.78);
}

html[data-appearance="light"] .spotlight-item {
  color: #1c1c1e;
}

html[data-appearance="light"] .spotlight-item.selected {
  background: rgba(0, 0, 0, 0.06);
}

html[data-appearance="light"] .spotlight-item:active {
  background: rgba(0, 0, 0, 0.1);
}

html[data-appearance="light"] .spotlight-item:focus-visible {
  outline-color: rgba(0, 0, 0, 0.65);
}

html[data-appearance="light"] .spotlight-item-text small {
  color: rgba(28, 28, 30, 0.52);
}

html[data-appearance="light"] .spotlight-badge {
  color: #9a6b00;
  background: rgba(255, 159, 10, 0.16);
}

@media (max-width: 380px) {
  .spotlight {
    padding-left: 8px;
    padding-right: 8px;
  }

  .spotlight-bar {
    min-height: 48px;
    padding: 0 11px;
  }

  #spotlightInput {
    height: 44px;
    font-size: 16px;
  }

  .spotlight-item {
    gap: 10px;
    padding: 8px;
  }

  .spotlight-icon {
    width: 38px;
    height: 38px;
  }
}

@media (min-width: 700px) and (min-height: 600px) {
  .home-search {
    width: min(250px, 46%);
    height: 40px;
    font-size: 13px;
  }

  .spotlight-bar {
    min-height: 56px;
    padding: 0 16px;
  }

  #spotlightInput {
    font-size: 18px;
  }
}
