:root {
  --bg: #0d1117;
  --card: #161b22;
  --card-hi: #1c2431;
  --line: #262d38;
  --fg: #e6edf3;
  --muted: #8b949e;
  --accent: #4f9dff;
}
html { background: #000; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: linear-gradient(180deg, #000000 0%, #140000 42%, #6b0a0a 80%, #a31212 100%) fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
  color: var(--fg);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding: max(18px, env(safe-area-inset-top)) 16px 40px;
  -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 980px; margin: 0 auto; }
header.top { display: block; text-align: center; margin-bottom: 20px; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.logo { display: block; width: min(320px, 80vw); height: auto; margin: 12px 0 2px; filter: drop-shadow(0 2px 10px rgba(0,0,0,.55)); }
h1 { font-size: 30px; margin: 0; letter-spacing: -0.02em; text-align: center; }
.sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.clock { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 15px; }
.search {
  width: 100%; padding: 12px 14px; margin: 4px 0 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  color: var(--fg); font-size: 16px; outline: none;
}
.search:focus { border-color: var(--accent); }
.group { margin-bottom: 22px; }
.group-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); }
.tile {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  background: rgba(16, 18, 22, .72); border: 1px solid var(--line); border-radius: 14px;
  text-decoration: none; color: inherit; transition: background .12s, border-color .12s, transform .12s;
  min-height: 62px;
}
.tile:hover, .tile:active { background: rgba(34, 38, 46, .85); border-color: #33404f; transform: translateY(-1px); }
.tile-icon { font-size: 22px; width: 76px; flex: none; display: flex; align-items: center; justify-content: center; }
.tile-icon-img { display: block; height: 44px; width: auto; max-width: 76px; object-fit: contain; }
.tile.is-primary .tile-icon-img { height: 46px; }
.tile-body { display: flex; flex-direction: column; min-width: 0; }
.tile-name { font-weight: 600; font-size: 15px; }
.tile-desc { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-badge { margin-left: auto; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; }
.tile.is-off { opacity: .45; }
/* Duidelijke, mobielvriendelijke knoppen (externe links, bijv. BMX) */
.tile.is-primary {
  min-height: 72px; padding: 15px 16px;
  background: linear-gradient(180deg, #1b2637, #161b22);
  border-color: #35507a;
}
.tile.is-primary .tile-name { font-size: 16.5px; line-height: 1.2; }
/* ondertitel op de primaire knoppen mag over twee regels lopen (niet afkappen) */
.tile.is-primary .tile-desc { white-space: normal; line-height: 1.25; margin-top: 1px; }
.tile.is-primary:hover, .tile.is-primary:active { border-color: var(--accent); background: var(--card-hi); }
.tile.is-primary .tile-icon { font-size: 24px; }
.tile.is-external::after {
  content: "↗"; margin-left: 8px; color: var(--muted); font-size: 14px; flex: none;
}
.tile.is-primary.is-external::after { color: var(--accent); }
@media (max-width: 420px) {
  .tile.is-primary { min-height: 78px; }  /* extra vingerruimte op de telefoon */
}
.empty { color: var(--muted); }
nav.pages { display: flex; gap: 8px; margin-bottom: 16px; }
nav.pages a { color: var(--fg); text-decoration: none; font-size: 13.5px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(16, 18, 22, .6); }
nav.pages a.active { border-color: var(--accent); color: var(--accent); }
.status { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.status.warn { color: #e3b341; }
.albums { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.album { text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.album:hover { border-color: #33404f; }
.album-cover { display: block; aspect-ratio: 1 / 1; background: #0b0f14; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-empty { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 34px; }
.album-meta { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 2px; }
.album-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-count { font-size: 12px; color: var(--muted); }
button.reload { background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-size: 13.5px; cursor: pointer; }
button.reload:hover { background: var(--card-hi); }
@media (max-width: 420px) {
  h1 { font-size: 22px; }
  .grid { grid-template-columns: 1fr; }
  .albums { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
