:root {
  --bg: #0f141a; --panel: #18212b; --ink: #f3f6f9; --muted: #9fb0c2; --line: #2a3644;
  --ok: #3ddc84; --down: #ff6b6b; --focus: #ffd166;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex; flex-direction: column; min-height: 100vh; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.view { flex: 1; width: 100%; max-width: 1000px; margin: 0 auto; padding: 2rem 16px; }
.foot { text-align: center; color: var(--muted); font-size: .75rem; padding: 1rem; }
button, a { font: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 12px; }

/* Profilwahl */
.who-title { text-align: center; font-size: clamp(1.8rem, 6vw, 3rem); font-weight: 600; margin: 8vh 0 2.5rem; }
.profiles { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; }
.profile { background: none; border: 0; color: var(--muted); cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: .8rem; padding: .5rem; }
.profile:hover, .profile:focus-visible { color: var(--ink); }
.profile:hover .avatar, .profile:focus-visible .avatar { box-shadow: 0 0 0 4px var(--ink); transform: scale(1.04); }
.profile-name { font-size: 1.2rem; font-weight: 600; }
.avatar { display: grid; place-items: center; width: clamp(110px, 30vw, 150px); aspect-ratio: 1; border-radius: 50%;
  background: var(--c); color: #0f141a; font-size: clamp(2.8rem, 10vw, 4rem); font-weight: 800;
  box-shadow: inset 0 -10px 0 rgba(0,0,0,.18); transition: transform .15s, box-shadow .15s; }
.avatar.small { width: 44px; font-size: 1.3rem; box-shadow: none; }

/* Apps */
.apps-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.apps-head h1 { margin: 0; font-size: clamp(1.25rem, 5vw, 1.6rem); flex: 1; min-width: 8rem; }
.switch { background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 999px;
  min-height: 44px; padding: 0 1rem; cursor: pointer; }
.switch:hover { border-color: var(--muted); }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.tile { display: flex; flex-direction: column; gap: .3rem; min-height: 180px; padding: 1.2rem; border-radius: 18px;
  background: linear-gradient(160deg, var(--c), var(--panel) 85%); color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); transition: transform .15s, border-color .15s; }
a.tile:hover { transform: translateY(-2px); border-color: var(--muted); }
.tile.soon { opacity: .55; }
.app-icon { font-size: 2.6rem; line-height: 1; margin-bottom: auto; }
.app-name { font-size: 1.25rem; font-weight: 700; margin-top: 1rem; }
.app-desc { color: var(--muted); font-size: .9rem; }
.app-status { font-size: .85rem; color: var(--muted); display: inline-flex; align-items: center; gap: .4rem; }
.app-status::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--muted); }
.app-status[data-status="ok"] { color: var(--ink); }
.app-status[data-status="ok"]::before { background: var(--ok); }
.app-status[data-status="down"] { color: var(--down); }
.app-status[data-status="down"]::before { background: var(--down); }
.empty, .error { color: var(--muted); text-align: center; margin-top: 3rem; }
.error { color: var(--down); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
