:root {
  color-scheme: light dark;
  --bg: #f2f2f7;
  --card: #ffffff;
  --label: #000000;
  --secondary: rgba(60, 60, 67, 0.6);
  --separator: rgba(60, 60, 67, 0.18);
  --pressed: rgba(0, 0, 0, 0.06);
  --green: #34c759;
  --red: #ff3b30;
  --gray: #8e8e93;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.04);
  font: -apple-system-body;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --label: #ffffff;
    --secondary: rgba(235, 235, 245, 0.6);
    --separator: rgba(84, 84, 88, 0.6);
    --pressed: rgba(255, 255, 255, 0.08);
    --green: #30d158;
    --red: #ff453a;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--label);
  -webkit-font-smoothing: antialiased;
}
.page {
  max-width: 640px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 28px) max(16px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 32px) max(16px, env(safe-area-inset-left));
}
.hero { padding: 0 4px 20px; }
.eyebrow {
  margin: 0 0 2px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--secondary);
}
h1 {
  margin: 0;
  font-size: 2.125rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.section-title {
  margin: 0 0 6px;
  padding: 0 16px;
  font-size: 0.8125rem;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--secondary);
}
.apps {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.apps:empty { min-height: 88px; }
.apps li + li .app-text { border-top: 0.5px solid var(--separator); }
.app {
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding: 0 0 0 16px;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s;
}
.app:active { background: var(--pressed); transition: none; }
.app:focus-visible { outline: 3px solid #0a84ff; outline-offset: -3px; border-radius: 14px; }
.icon {
  flex: none;
  align-self: center;
  width: 56px;
  height: 56px;
  margin: 12px 0;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}
.icon-tile {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 82%, #fff), var(--tint));
  color: #fff;
  font-size: 1.625rem;
  font-weight: 600;
}
.icon-tile.emoji { font-size: 1.875rem; }
.app-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 12px 0;
}
.app-name { font-size: 1.0625rem; font-weight: 600; }
.app-desc {
  font-size: 0.9375rem;
  color: var(--secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 0.8125rem;
  color: var(--secondary);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gray); }
.status-online .dot { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); }
.status-offline { color: var(--red); }
.status-offline .dot { background: var(--red); }
.status-checking .dot { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
.chevron {
  flex: none;
  align-self: center;
  width: 9px;
  height: 9px;
  margin: 0 18px 0 4px;
  border-top: 2px solid var(--gray);
  border-right: 2px solid var(--gray);
  transform: rotate(45deg);
  opacity: 0.6;
}
.empty {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 16px;
  text-align: center;
  color: var(--secondary);
}
.empty strong { color: var(--label); font-size: 1.0625rem; }
.footer {
  margin: 10px 0 0;
  padding: 0 16px;
  min-height: 1.2em;
  font-size: 0.8125rem;
  color: var(--secondary);
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
