* {
  box-sizing: border-box;
}

@font-face {
  font-family: 'SF Pro Text';
  src: url('../fonts/SF-Pro-Text-Light.otf');
  font-weight: 300;
}

@font-face {
  font-family: 'SF Pro Text';
  src: url('../fonts/SF-Pro-Text-Regular.otf');
  font-weight: 400;
}

@font-face {
  font-family: 'SF Pro Text';
  src: url('../fonts/SF-Pro-Text-Medium.otf');
  font-weight: 500;
}

@font-face {
  font-family: 'SF Pro Text';
  src: url('../fonts/SF-Pro-Text-Semibold.otf');
  font-weight: 600;
}

@font-face {
  font-family: 'SF Pro Text';
  src: url('../fonts/SF-Pro-Text-Bold.otf');
  font-weight: 700;
}

@font-face {
  font-family: 'SF Pro Display';
  src: url('../fonts/SF-Pro-Display-Medium.otf');
  font-weight: 500;
}

@font-face {
  font-family: 'SF Pro Display';
  src: url('../fonts/SF-Pro-Display-Bold.otf');
  font-weight: 700;
}

:root {
  color-scheme: dark;
  --bg: #07080b;
  --panel: rgba(12, 15, 21, 0.72);
  --panel-strong: rgba(9, 11, 17, 0.88);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f7f8fb;
  --muted: rgba(247, 248, 251, 0.66);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --status-bar-space: calc(env(safe-area-inset-top, 0px) + 66px);
  --home-indicator-space: calc(env(safe-area-inset-bottom, 0px) + 48px);
}

html,
body {
  width: 100%;
  height: 100%;
  overscroll-behavior: none;
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'SF Pro Text', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.28);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.wallpaper {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(117, 170, 255, 0.22) 0%, transparent 30%),
    radial-gradient(circle at 82% 16%, rgba(255, 196, 122, 0.14) 0%, transparent 24%),
    linear-gradient(180deg, rgba(5, 6, 10, 0.2) 0%, rgba(5, 6, 10, 0.82) 100%),
    linear-gradient(135deg, rgba(40, 52, 74, 0.55) 0%, rgba(15, 18, 26, 0.25) 45%, rgba(6, 7, 9, 0.9) 100%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  transform-origin: center;
  transform: scale(1.18);
  filter: blur(26px) saturate(1.12);
  animation: wallpaperDrift 18s ease-in-out infinite alternate;
}

.wallpaper::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 18%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.3) 0%, transparent 28%);
}

.status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 84;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 22px 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.35);
  transition:
    color 180ms ease,
    text-shadow 180ms ease;
}

.status-time {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transform: translateY(-10px);
  animation: settleIn 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards 120ms;
}

.status-time:hover,
.status-time:focus-visible {
  outline: none;
  opacity: 0.72;
}

.lock-screen {
  position: absolute;
  inset: 0;
  z-index: 70;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 78px 28px 34px;
  background: #050607;
  color: #ffffff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.02);
  transition:
    opacity 360ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 360ms;
}

.lock-screen.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
  transition-delay: 0s;
}

.lock-wallpaper,
.lock-preview-wallpaper {
  position: absolute;
  inset: 0;
  overflow: hidden;
  container-type: size;
  --lock-wallpaper-image: none;
  --lock-wallpaper-scale: 1;
  --lock-wallpaper-rotation: 0deg;
  --lock-wallpaper-offset-x: 0cqw;
  --lock-wallpaper-offset-y: 0cqh;
  background:
    radial-gradient(circle at 24% 18%, rgba(116, 171, 255, 0.52) 0%, transparent 34%),
    radial-gradient(circle at 82% 20%, rgba(255, 193, 128, 0.34) 0%, transparent 28%),
    linear-gradient(145deg, #1e3558 0%, #101523 48%, #080a10 100%);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: saturate(1.08);
  transform-origin: center;
}

.lock-wallpaper::before,
.lock-preview-wallpaper::before {
  content: "";
  position: absolute;
  inset: -35%;
  background-image: var(--lock-wallpaper-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform:
    translate(var(--lock-wallpaper-offset-x), var(--lock-wallpaper-offset-y))
    scale(var(--lock-wallpaper-scale))
    rotate(var(--lock-wallpaper-rotation));
  transform-origin: center;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  will-change: transform;
}

.lock-wallpaper.has-custom-wallpaper::before,
.lock-preview-wallpaper.has-custom-wallpaper::before {
  opacity: 1;
}

.lock-scrim,
.lock-preview-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, transparent 42%, rgba(0, 0, 0, 0.58) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.22), transparent 46%);
}

.lock-time-stack {
  position: relative;
  z-index: 1;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.42);
}

.lock-date {
  min-height: 20px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}

.lock-time {
  font-family: 'SF Pro Display', sans-serif;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0;
}

.lock-time.glow {
  text-shadow:
    0 0 18px currentColor,
    0 0 28px currentColor,
    0 0 36px currentColor;
  transition: text-shadow 180ms ease;
}

.lock-hold-hint {
  position: relative;
  z-index: 1;
  justify-self: center;
  align-self: end;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.78;
  text-transform: uppercase;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.lock-screen.is-holding .lock-hold-hint {
  opacity: 1;
  transform: scale(1.04);
}

.lock-screen.is-holding .lock-time-stack {
  transform: scale(0.985);
  transition: transform 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.lock-screen-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 34px);
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}

.lock-screen-actions * {
  pointer-events: auto;
}

.lock-btn {
  appearance: none;
  min-width: 178px;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  backdrop-filter: blur(24px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  transition:
    background 220ms ease,
    transform 220ms ease,
    border-color 220ms ease,
    opacity 220ms ease;
}

.lock-btn:hover,
.lock-btn:focus-visible {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.34);
  outline: none;
}

.lock-btn:active {
  transform: scale(0.98);
}

.lock-open-btn {
  background: rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

.lock-icon-btn {
  appearance: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  font-size: 20px;
  transition:
    background 220ms ease,
    transform 220ms ease,
    border-color 220ms ease;
}

.lock-icon-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.3);
}

.lock-icon-btn:active {
  transform: scale(0.94);
}

body.has-auth-prompt .lock-screen-actions {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.96);
}

body.motion-off .lock-screen-actions {
  opacity: 1 !important;
  transform: none !important;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(8px);
}

.auth-sheet {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 22px;
  z-index: 3;
  margin: 0;
  padding: 22px 20px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: rgba(16, 18, 25, 0.78);
  color: #ffffff;
  backdrop-filter: blur(28px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  animation: authSheetIn 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-sheet[data-auth-mode="pin4"],
.auth-sheet[data-auth-mode="pin6"] {
  text-align: center;
}

.auth-title {
  margin: 0;
  font-family: 'SF Pro Display', sans-serif;
  font-size: 24px;
  line-height: 1.05;
}

.auth-subtitle {
  margin: 8px 0 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.4;
}

.auth-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  min-height: 18px;
  margin: 18px 0 20px;
}

.auth-dot {
  width: 11px;
  height: 11px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  background: transparent;
  transform: scale(0.88);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.auth-dot.filled {
  background: #ffffff;
  border-color: #ffffff;
  transform: scale(1);
}

.auth-sheet.has-error .auth-dots,
.auth-sheet.has-error .auth-password-field {
  animation: passcodeShake 220ms ease;
}

.auth-keypad {
  width: min(100%, 252px);
  margin: 0 auto 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.auth-key,
.auth-key-spacer {
  width: 64px;
  height: 64px;
  justify-self: center;
}

.auth-key {
  appearance: none;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  cursor: pointer;
  font-family: 'SF Pro Display', sans-serif;
  font-size: 26px;
  font-weight: 600;
  backdrop-filter: blur(18px);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.auth-key:hover,
.auth-key:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.auth-key:active {
  transform: scale(0.96);
}

.auth-key:disabled {
  cursor: default;
  opacity: 0.56;
  transform: none;
}

.auth-key-delete {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-password-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 0 10px 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.07) 100%),
    rgba(255, 255, 255, 0.06);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 32px rgba(0, 0, 0, 0.16);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.auth-password-field[hidden] {
  display: none !important;
}

.auth-password-field:focus-within {
  border-color: rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.17) 0%, rgba(255, 255, 255, 0.08) 100%),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 4px rgba(255, 255, 255, 0.08),
    0 14px 34px rgba(0, 0, 0, 0.18);
}

.auth-sheet.has-error .auth-password-field {
  border-color: rgba(255, 180, 170, 0.68);
}

.auth-password-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.auth-input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0;
  outline: none;
  padding: 0;
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.48);
  font-weight: 600;
}

.auth-password-toggle {
  appearance: none;
  min-width: 58px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 0 14px;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.auth-password-toggle:active {
  transform: scale(0.96);
}

.auth-sheet[data-auth-mode="pin4"] .auth-input,
.auth-sheet[data-auth-mode="pin6"] .auth-input,
.auth-sheet[data-auth-mode="password"] .auth-dots,
.auth-sheet[data-auth-mode="password"] .auth-keypad {
  display: none;
}

.auth-error {
  min-height: 18px;
  margin: 10px 0 0;
  color: #ffb4aa;
  font-size: 12px;
  font-weight: 700;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.auth-sheet[data-auth-mode="pin4"] .auth-actions,
.auth-sheet[data-auth-mode="pin6"] .auth-actions {
  display: flex;
  justify-content: center;
  margin-top: 0;
}

.auth-sheet[data-auth-mode="pin4"] .auth-action-primary,
.auth-sheet[data-auth-mode="pin6"] .auth-action-primary {
  display: none;
}

.auth-action {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  padding: 0 18px;
}

.auth-action-primary {
  background: #ffffff;
  color: #10131b;
}

.auth-action-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

body.is-locked .app-frame,
body.setup-open .app-frame {
  filter: blur(8px);
  pointer-events: none;
}

.battery-pill {
  appearance: none;
  --battery-accent-start: #d8e1ef;
  --battery-accent-end: #f7f8fb;
  --battery-glow: rgba(247, 248, 251, 0.18);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 74px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(8, 10, 15, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  color: inherit;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-10px);
  animation: settleIn 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards 220ms;
  transition:
    color 180ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease,
    background 240ms ease;
}

.battery-pill:hover,
.battery-pill:focus-visible {
  outline: none;
  transform: translateY(-2px) scale(1.035);
}

.battery-pill::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: inherit;
  background: radial-gradient(circle, var(--battery-glow) 0%, transparent 72%);
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}

.battery-pill.is-charging::before {
  opacity: 1;
  animation: chargingAura 1.8s ease-in-out infinite;
}

.battery-text {
  min-width: 34px;
  text-align: right;
  color: var(--battery-accent-end);
  transition:
    color 220ms ease,
    text-shadow 220ms ease;
}

.battery-icon {
  position: relative;
  width: 25px;
  height: 13px;
  padding: 2px;
  border: 1.5px solid color-mix(in srgb, var(--battery-accent-end) 78%, white 22%);
  border-radius: 4px;
  transition: border-color 220ms ease;
}

.battery-icon::after {
  content: "";
  position: absolute;
  top: 3px;
  right: -4px;
  width: 2px;
  height: 5px;
  border-radius: 0 2px 2px 0;
  background: var(--battery-accent-end);
  transition: background 220ms ease;
}

.battery-icon-level {
  height: 100%;
  width: 28%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--battery-accent-start) 0%, var(--battery-accent-end) 100%);
  box-shadow: 0 0 10px color-mix(in srgb, var(--battery-accent-end) 30%, transparent);
  transition:
    width 320ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
}

.battery-pill.is-unknown {
  --battery-accent-start: #aebdce;
  --battery-accent-end: #f7f8fb;
  --battery-glow: rgba(247, 248, 251, 0.16);
}

.battery-pill.is-critical {
  --battery-accent-start: #ff9c90;
  --battery-accent-end: #ff584b;
  --battery-glow: rgba(255, 88, 75, 0.3);
}

.battery-pill.is-low {
  --battery-accent-start: #ffc681;
  --battery-accent-end: #ff8d45;
  --battery-glow: rgba(255, 141, 69, 0.28);
}

.battery-pill.is-mid {
  --battery-accent-start: #ffe28c;
  --battery-accent-end: #f3c84a;
  --battery-glow: rgba(243, 200, 74, 0.24);
}

.battery-pill.is-high {
  --battery-accent-start: #a5f2b9;
  --battery-accent-end: #47de78;
  --battery-glow: rgba(71, 222, 120, 0.26);
}

.battery-pill.is-full {
  --battery-accent-start: #90f1d6;
  --battery-accent-end: #42e0ba;
  --battery-glow: rgba(66, 224, 186, 0.28);
}

.battery-pill.is-charging {
  border-color: color-mix(in srgb, var(--battery-accent-end) 38%, rgba(255, 255, 255, 0.08));
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.18),
    0 0 24px var(--battery-glow);
}

.battery-pill.is-charging .battery-text {
  text-shadow:
    0 0 12px var(--battery-glow),
    0 0 22px var(--battery-glow);
  animation: chargingTextGlow 1.8s ease-in-out infinite;
}

.battery-pill.is-charging .battery-icon-level {
  box-shadow:
    0 0 10px color-mix(in srgb, var(--battery-accent-end) 52%, transparent),
    0 0 20px color-mix(in srgb, var(--battery-accent-end) 32%, transparent);
}

.battery-pill.is-outlet {
  --battery-accent-start: #d8b4fe;
  --battery-accent-end: #a855f7;
  --battery-glow: rgba(168, 85, 247, 0.42);
  border-color: color-mix(in srgb, var(--battery-accent-end) 42%, rgba(255, 255, 255, 0.12));
  background: rgba(49, 22, 85, 0.5);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.18),
    0 0 28px var(--battery-glow);
}

.battery-pill.is-outlet::before {
  opacity: 1;
  animation: chargingAura 1.8s ease-in-out infinite;
}

.battery-pill.is-outlet .battery-text {
  min-width: 48px;
  color: #f3e8ff;
  text-shadow:
    0 0 12px var(--battery-glow),
    0 0 22px var(--battery-glow);
}

.battery-pill.is-outlet .battery-icon-level {
  box-shadow:
    0 0 12px color-mix(in srgb, var(--battery-accent-end) 60%, transparent),
    0 0 24px color-mix(in srgb, var(--battery-accent-end) 36%, transparent);
}

body.battery-text-hidden .battery-pill {
  min-width: auto;
  padding-inline: 10px;
}

body.battery-text-hidden .battery-text {
  display: none;
}

body.battery-text-hidden .battery-pill.is-outlet .battery-text {
  display: inline;
}

.control-center {
  position: absolute;
  inset: 0;
  z-index: 98;
  pointer-events: none;
}

.control-center[hidden] {
  display: none !important;
}

.control-center-scrim {
  appearance: none;
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  pointer-events: auto;
}

.control-center-panel {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 58px);
  right: 14px;
  width: 190px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: rgba(18, 21, 29, 0.72);
  backdrop-filter: blur(30px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 28px 70px rgba(0, 0, 0, 0.34);
  pointer-events: auto;
  transform-origin: 100% 0;
  animation: panelIn 180ms ease;
}

.control-center-toggle {
  appearance: none;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(247, 248, 251, 0.74);
  cursor: pointer;
  font-size: 27px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.control-center-toggle:hover,
.control-center-toggle:focus-visible {
  outline: none;
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.control-center-toggle.is-active {
  color: #ffffff;
  border-color: rgba(125, 211, 252, 0.38);
  background:
    linear-gradient(180deg, rgba(125, 211, 252, 0.34), rgba(59, 130, 246, 0.22)),
    rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 24px rgba(96, 165, 250, 0.2);
}

.app-frame {
  position: relative;
  width: 100%;
  height: 100%;
}

.view {
  position: absolute;
  inset: 66px 18px 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(26px) scale(0.985);
  filter: blur(18px);
  transition:
    opacity 320ms ease,
    transform 460ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 460ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 460ms;
}

.view.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition-delay: 0s;
}

.view.screen {
  inset: 0;
}

.home-indicator-control {
  appearance: none;
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
  z-index: 28;
  width: 172px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 260ms;
  touch-action: none;
}

.home-indicator-control::before {
  content: "";
  width: 132px;
  height: 5px;
  border-radius: 999px;
  background: rgba(247, 248, 251, 0.78);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.15),
    0 10px 30px rgba(0, 0, 0, 0.36);
  transform: translateY(var(--home-indicator-drag, 0px));
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    transform 120ms ease;
}

body.app-open:not(.is-locked) .home-indicator-control {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}

body.has-auth-prompt .home-indicator-control,
body.viewing-lock-screen .home-indicator-control,
body.app-switcher-open .home-indicator-control,
body.setup-open .home-indicator-control {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 14px);
}

.home-indicator-control:hover::before,
.home-indicator-control:focus-visible::before,
.home-indicator-control.dragging::before {
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22),
    0 14px 34px rgba(0, 0, 0, 0.4);
}

.home-indicator-control:focus-visible {
  outline: none;
}

.home-indicator-control:focus-visible::before {
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.14),
    0 14px 34px rgba(0, 0, 0, 0.4);
}

.app-switcher {
  position: absolute;
  inset: 0;
  z-index: 58;
  display: grid;
  place-items: end center;
  padding: 76px 18px 24px;
  color: var(--text);
}

.app-switcher[hidden] {
  display: none !important;
}

.app-switcher-scrim {
  appearance: none;
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(16px);
  cursor: default;
}

.app-switcher-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 680px);
  max-height: min(76vh, 620px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%),
    rgba(12, 15, 23, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 30px 90px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(30px);
  overflow: hidden;
  animation: panelIn 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.app-switcher-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-switcher-kicker {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-switcher-title {
  margin: 4px 0 0;
  font-family: 'SF Pro Display', sans-serif;
  font-size: 24px;
  line-height: 1.05;
}

.app-switcher-done {
  appearance: none;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 0 14px;
}

.app-switcher-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(174px, 1fr));
  gap: 14px;
  overflow: auto;
  padding: 18px;
}

.app-switcher-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.app-switcher-card {
  appearance: none;
  min-height: 196px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.035) 100%),
    rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  animation: switcherCardIn 320ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--delay, 0ms);
  overflow: hidden;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.app-switcher-card:hover,
.app-switcher-card:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px) scale(1.01);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 100%),
    rgba(255, 255, 255, 0.04);
}

.app-switcher-card.active {
  border-color: rgba(169, 240, 206, 0.34);
}

.app-switcher-preview {
  min-height: 196px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
  padding: 16px;
  text-align: left;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, transparent 44%),
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
}

.app-switcher-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  font-size: 30px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.app-switcher-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-switcher-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.app-switcher-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.app-switcher-close {
  appearance: none;
  border: 0;
  align-self: flex-start;
  min-height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(247, 248, 251, 0.86);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 12px;
}

.app-switcher-empty {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.setup-overlay {
  position: absolute;
  inset: 0;
  z-index: 96;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(4, 6, 10, 0.38) 0%, rgba(4, 6, 10, 0.72) 100%);
  backdrop-filter: blur(22px);
}

.setup-overlay[hidden] {
  display: none !important;
}

.setup-card {
  width: min(100%, 440px);
  min-height: 560px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.04) 100%),
    rgba(13, 16, 24, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 34px 96px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(32px);
  overflow: hidden;
  animation: authSheetIn 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.setup-progress {
  display: flex;
  gap: 7px;
  padding: 18px 22px 4px;
}

.setup-progress-dot {
  height: 4px;
  flex: 1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition:
    background 180ms ease,
    opacity 180ms ease;
}

.setup-progress-dot.active,
.setup-progress-dot.complete {
  background: #f7f8fb;
}

.setup-step-count {
  padding: 0 24px;
  color: rgba(247, 248, 251, 0.54);
  font-size: 11px;
  font-weight: 800;
}

.setup-step {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 24px 20px;
  animation: panelIn 240ms ease;
}

.setup-step::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.setup-kicker {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.setup-title {
  margin: 8px 0 0;
  font-family: 'SF Pro Display', sans-serif;
  font-size: 40px;
  line-height: 0.98;
}

.setup-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.setup-profile-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 28px;
}

.setup-avatar {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(140, 190, 255, 0.86) 0%, rgba(74, 120, 255, 0.86) 100%),
    rgba(255, 255, 255, 0.08);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: #ffffff;
  font-family: 'SF Pro Display', sans-serif;
  font-size: 28px;
  font-weight: 700;
}

.setup-avatar.has-image {
  color: transparent;
}

.setup-profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding-left: 92px;
  flex-wrap: wrap;
}

.setup-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: rgba(247, 248, 251, 0.84);
  font-size: 13px;
  font-weight: 700;
}

.setup-field input,
.setup-field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(7, 9, 13, 0.42);
  color: var(--text);
  outline: none;
  padding: 0 14px;
}

.setup-field input:focus {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}

.setup-choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.setup-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
}

.setup-choice strong,
.setup-choice small {
  display: block;
}

.setup-choice strong {
  font-size: 14px;
}

.setup-choice small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.setup-security-fields {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.setup-security-help {
  margin: 12px 0 0;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(247, 248, 251, 0.72);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.setup-message {
  min-height: 18px;
  margin: 14px 0 0;
  color: rgba(247, 248, 251, 0.68);
  font-size: 12px;
  font-weight: 700;
}

.setup-message.is-error {
  color: #ffb4aa;
}

.setup-summary {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.setup-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.setup-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.setup-summary strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.setup-actions {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.setup-button {
  appearance: none;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 0 15px;
}

.setup-button:disabled {
  cursor: default;
  opacity: 0.38;
}

.setup-button-primary {
  background: #f7f8fb;
  color: #0d1117;
}

.setup-button-secondary,
.setup-button-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.setup-button-ghost {
  justify-self: start;
  background: transparent;
  color: var(--muted);
}

.screen {
  display: flex;
}

.screen-card {
  --text: #1d1d1f;
  --muted: #6e6e73;
  --app-line: rgba(60, 60, 67, 0.16);
  --app-line-strong: rgba(60, 60, 67, 0.26);
  --app-fill: #f5f5f7;
  --app-panel: #ffffff;
  --app-panel-soft: rgba(255, 255, 255, 0.72);
  --app-control: rgba(118, 118, 128, 0.12);
  --app-control-hover: rgba(118, 118, 128, 0.2);
  --app-blue: #007aff;
  --app-red: #ff3b30;
  --app-green: #34c759;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: var(--status-bar-space);
  border-radius: 0;
  color: var(--text);
  background: var(--app-fill);
  border: 0;
  backdrop-filter: none;
  box-shadow: none;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 340ms ease,
    transform 460ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 70ms;
}

.view.active .screen-card {
  opacity: 1;
  transform: translateY(0);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px 12px;
  background: color-mix(in srgb, var(--app-fill) 86%, transparent);
  border-bottom: 1px solid var(--app-line);
}

.topbar-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topbar-eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.topbar-title {
  font-family: 'SF Pro Display', sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.dropdown-native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dropdown {
  position: relative;
  width: 100%;
}

.dropdown-button {
  appearance: none;
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 12px 0 15px;
  cursor: pointer;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.025) 100%),
    rgba(7, 9, 13, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.14);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.screen-card .dropdown-button {
  background: var(--app-panel);
  border-color: var(--app-line);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.screen-card .dropdown-button:hover,
.screen-card .dropdown-button:focus-visible,
.screen-card .dropdown.open .dropdown-button {
  background: var(--app-panel);
  border-color: var(--app-line-strong);
  box-shadow:
    0 0 0 4px rgba(0, 122, 255, 0.1),
    0 8px 22px rgba(0, 0, 0, 0.08);
}

.dropdown-button:hover,
.dropdown-button:focus-visible,
.dropdown.open .dropdown-button {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.04) 100%),
    rgba(9, 12, 18, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 4px rgba(255, 255, 255, 0.035),
    0 16px 32px rgba(0, 0, 0, 0.18);
}

.dropdown-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}

.dropdown-icon {
  position: relative;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.screen-card .dropdown-icon {
  background: var(--app-control);
}

.screen-card .dropdown-icon::before,
.screen-card .dropdown-icon::after {
  border-color: rgba(60, 60, 67, 0.72);
}

.dropdown-icon::before,
.dropdown-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(247, 248, 251, 0.72);
  border-bottom: 2px solid rgba(247, 248, 251, 0.72);
  transition: transform 180ms ease;
}

.dropdown-icon::before {
  top: 4px;
  transform: rotate(225deg);
}

.dropdown-icon::after {
  bottom: 4px;
  transform: rotate(45deg);
}

.dropdown.open .dropdown-icon::before {
  transform: translateY(3px) rotate(225deg);
}

.dropdown.open .dropdown-icon::after {
  transform: translateY(-3px) rotate(45deg);
}

.dropdown-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 300;
  max-height: 230px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.035) 100%),
    rgba(16, 18, 25, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 52px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(22px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top center;
  transition:
    opacity 160ms ease,
    transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 160ms;
}

.screen-card .dropdown-menu {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--app-line);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.dropdown-menu::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.dropdown-option {
  appearance: none;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  cursor: pointer;
  color: var(--text);
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  transition:
    background 140ms ease,
    transform 140ms ease;
}

.screen-card .dropdown-option {
  color: var(--text);
}

.screen-card .dropdown-option:hover,
.screen-card .dropdown-option:focus-visible,
.screen-card .dropdown-option.active {
  background: var(--app-control);
}

.screen-card .dropdown-option[aria-selected="true"] {
  background: rgba(0, 122, 255, 0.12);
  color: var(--app-blue);
}

body.dark-mode .screen-card .dropdown-button,
body.dark-mode .screen-card .dropdown-button:hover,
body.dark-mode .screen-card .dropdown-button:focus-visible,
body.dark-mode .screen-card .dropdown.open .dropdown-button,
body.dark-mode .screen-card .dropdown-menu {
  background: var(--app-panel);
  border-color: var(--app-line);
}

body.dark-mode .screen-card .dropdown-icon::before,
body.dark-mode .screen-card .dropdown-icon::after {
  border-color: rgba(235, 235, 245, 0.72);
}

.dropdown-option:hover,
.dropdown-option:focus-visible,
.dropdown-option.active {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-option:active {
  transform: scale(0.99);
}

.dropdown-option[aria-selected="true"] {
  color: #f7f8fb;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.08) 100%),
    rgba(255, 255, 255, 0.06);
}

.dropdown-option[aria-selected="true"]::after {
  content: "✓";
  flex: none;
  color: #8cd3a0;
  font-size: 14px;
  font-weight: 800;
}

.screen-body {
  flex: 1;
  min-height: 0;
}

.screen-card > .screen-body {
  padding-bottom: var(--home-indicator-space);
}

body.app-open:not(.is-locked):not(.viewing-lock-screen):not(.setup-open) .status-bar {
  color: #1d1d1f;
  text-shadow: none;
}

body.app-open:not(.is-locked):not(.viewing-lock-screen):not(.setup-open) .battery-pill {
  --battery-accent-start: #1d1d1f;
  --battery-accent-end: #1d1d1f;
  --battery-glow: rgba(29, 29, 31, 0.12);
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(60, 60, 67, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body.app-open:not(.is-locked):not(.viewing-lock-screen):not(.setup-open) .battery-text {
  color: #1d1d1f;
  text-shadow: none;
}

body.app-open:not(.is-locked):not(.viewing-lock-screen):not(.setup-open) .home-indicator-control::before {
  background: rgba(29, 29, 31, 0.62);
  box-shadow: 0 8px 22px rgba(29, 29, 31, 0.16);
}

body.app-open:not(.is-locked):not(.viewing-lock-screen):not(.setup-open) .home-indicator-control:hover::before,
body.app-open:not(.is-locked):not(.viewing-lock-screen):not(.setup-open) .home-indicator-control:focus-visible::before,
body.app-open:not(.is-locked):not(.viewing-lock-screen):not(.setup-open) .home-indicator-control.dragging::before {
  background: rgba(29, 29, 31, 0.86);
  box-shadow: 0 10px 24px rgba(29, 29, 31, 0.2);
}

body.dark-mode.app-open:not(.is-locked):not(.viewing-lock-screen):not(.setup-open) .status-bar {
  color: #f5f5f7;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.35);
}

body.dark-mode.app-open:not(.is-locked):not(.viewing-lock-screen):not(.setup-open) .battery-pill {
  --battery-accent-start: #f5f5f7;
  --battery-accent-end: #f5f5f7;
  --battery-glow: rgba(245, 245, 247, 0.16);
  background: rgba(28, 28, 30, 0.72);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

body.dark-mode.app-open:not(.is-locked):not(.viewing-lock-screen):not(.setup-open) .battery-text {
  color: #f5f5f7;
}

body.app-open:not(.is-locked):not(.viewing-lock-screen):not(.setup-open) .battery-pill.is-outlet,
body.dark-mode.app-open:not(.is-locked):not(.viewing-lock-screen):not(.setup-open) .battery-pill.is-outlet {
  --battery-accent-start: #d8b4fe;
  --battery-accent-end: #a855f7;
  --battery-glow: rgba(168, 85, 247, 0.42);
  background: rgba(49, 22, 85, 0.62);
  border-color: color-mix(in srgb, var(--battery-accent-end) 42%, rgba(255, 255, 255, 0.12));
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.18),
    0 0 28px var(--battery-glow);
}

body.app-open:not(.is-locked):not(.viewing-lock-screen):not(.setup-open) .battery-pill.is-outlet .battery-text,
body.dark-mode.app-open:not(.is-locked):not(.viewing-lock-screen):not(.setup-open) .battery-pill.is-outlet .battery-text {
  color: #f3e8ff;
  text-shadow:
    0 0 12px var(--battery-glow),
    0 0 22px var(--battery-glow);
}

body.dark-mode.app-open:not(.is-locked):not(.viewing-lock-screen):not(.setup-open) .home-indicator-control::before {
  background: rgba(247, 248, 251, 0.78);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.15),
    0 10px 30px rgba(0, 0, 0, 0.36);
}

body.dark-mode.app-open:not(.is-locked):not(.viewing-lock-screen):not(.setup-open) .home-indicator-control:hover::before,
body.dark-mode.app-open:not(.is-locked):not(.viewing-lock-screen):not(.setup-open) .home-indicator-control:focus-visible::before,
body.dark-mode.app-open:not(.is-locked):not(.viewing-lock-screen):not(.setup-open) .home-indicator-control.dragging::before {
  background: rgba(255, 255, 255, 0.96);
}

body.dark-mode .screen-card {
  --text: #f5f5f7;
  --muted: rgba(235, 235, 245, 0.62);
  --app-line: rgba(255, 255, 255, 0.11);
  --app-line-strong: rgba(255, 255, 255, 0.18);
  --app-fill: #101010;
  --app-panel: #1c1c1e;
  --app-panel-soft: rgba(44, 44, 46, 0.72);
  --app-control: rgba(118, 118, 128, 0.24);
  --app-control-hover: rgba(118, 118, 128, 0.34);
  color: var(--text);
  background: var(--app-fill);
}

.screen-card .empty-state {
  background: var(--app-panel);
  border-color: var(--app-line);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.screen-card .empty-art {
  background: #f2f2f7;
  border-color: var(--app-line);
  box-shadow: none;
}

body.dark-mode .screen-card .empty-state {
  background: var(--app-panel);
  border-color: var(--app-line);
  box-shadow: none;
}

body.dark-mode .screen-card .empty-art {
  background: #2c2c2e;
}

.empty-state {
  width: min(100%, 280px);
  padding: 28px 22px;
  text-align: center;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 36px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 340ms ease,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 140ms;
}

.view.active .empty-state {
  opacity: 1;
  transform: translateY(0);
}

.empty-art {
  width: 94px;
  height: 94px;
  margin: 0 auto 16px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  font-size: 42px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.04) 100%),
    rgba(16, 20, 28, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.empty-title {
  margin: 0;
  font-family: 'SF Pro Display', sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.empty-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.switch input:focus-visible+.switch-track {
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.switch input:active+.switch-track::after {
  transform: translateX(2px) scale(0.96);
}

.switch input:checked:active+.switch-track::after {
  transform: translateX(18px) scale(0.96);
}

@keyframes wallpaperDrift {
  from {
    transform: scale(1.06) translate3d(0, 0, 0);
  }

  to {
    transform: scale(1.12) translate3d(-10px, -12px, 0);
  }
}

@keyframes settleIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes switcherCardIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes authSheetIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes passcodeShake {
  0%,
  100% {
    transform: translateX(0);
  }

  30% {
    transform: translateX(-7px);
  }

  60% {
    transform: translateX(7px);
  }
}

@keyframes chargingAura {

  0%,
  100% {
    opacity: 0.34;
    transform: scale(0.92);
  }

  50% {
    opacity: 0.85;
    transform: scale(1.04);
  }
}

@keyframes chargingTextGlow {

  0%,
  100% {
    text-shadow:
      0 0 8px var(--battery-glow),
      0 0 16px var(--battery-glow);
  }

  50% {
    text-shadow:
      0 0 14px var(--battery-glow),
      0 0 28px var(--battery-glow);
  }
}

body.motion-off *,
body.motion-off *::before,
body.motion-off *::after {
  animation: none !important;
  transition: none !important;
}

body.motion-off .status-time,
body.motion-off .battery-pill,
body.motion-off .home-copy,
body.motion-off .view.active .screen-card,
body.motion-off .view.active .empty-state,
body.motion-off .settings-page.active {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

body.motion-off #home.active .app {
  --home-app-lift: 0px;
  --home-app-scale: 1;
  --home-app-tilt: 0deg;
  opacity: 1 !important;
  filter: none !important;
}

@media (max-width: 420px) {
  .app-switcher {
    padding: 68px 12px 18px;
  }

  .app-switcher-panel {
    max-height: 78vh;
    border-radius: 26px;
  }

  .app-switcher-list {
    grid-template-columns: 1fr;
  }

  .setup-overlay {
    padding: 14px;
  }

  .setup-card {
    min-height: min(620px, 92vh);
    border-radius: 28px;
  }

  .setup-title {
    font-size: 34px;
  }

  .setup-profile-preview {
    grid-template-columns: 1fr;
  }

  .setup-profile-actions {
    padding-left: 0;
  }

  .setup-actions {
    grid-template-columns: 1fr;
  }

  .setup-button-ghost {
    justify-self: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
