:root {
  --bg: #f4f4f6;
  --surface: #ffffff;
  --text: #1c1c1e;
  --text-muted: #6e6e73;
  --border: #e3e3e8;
  --accent: #0a84ff;
  --radius: 14px;
  --gap: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --surface: #1c1c1f;
    --text: #f2f2f7;
    --text-muted: #98989f;
    --border: #2c2c30;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: max(10vh, 48px) 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ---------- Suche ---------- */

.search-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}

.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.search__label {
  flex: 0 0 72px;
  padding-left: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.search__input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px 14px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 17px; /* ≥16px verhindert Auto-Zoom auf iOS */
  outline: none;
}

/* ---------- Schnelllinks ---------- */

.links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: var(--gap);
}

.link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 4px;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: background .15s;
}

.link:hover,
.link:focus-visible {
  background: var(--surface);
  outline: none;
}

.link__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-muted);
}

.link__icon img {
  width: 28px;
  height: 28px;
}

.link__name {
  max-width: 100%;
  font-size: 13px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}
