* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* ---------- App bar ---------- */

.appbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  padding: 0 16px;
  background: var(--appbar-bg);
  color: var(--appbar-text);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 700;
  font-size: 17px;
  color: var(--appbar-text);
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.appbar-spacer {
  flex: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--appbar-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.appbar .btn:hover {
  background: var(--appbar-hover);
}

.btn-icon {
  padding: 8px;
  width: 38px;
  height: 38px;
  border-color: transparent;
}

.btn-icon svg {
  flex: none;
}

/* ---------- Layout ---------- */

.view {
  padding: 16px;
  max-width: 1100px;
  margin: 0 auto;
}

.hero {
  text-align: center;
  padding: 40px 16px 32px;
}

.hero-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
}

.hero-text {
  margin: 0 auto;
  max-width: 560px;
  color: var(--text-secondary);
  font-size: 15px;
}

/* ---------- App list ---------- */

.apps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}

.app-row:hover {
  box-shadow: var(--shadow-strong);
  transform: translateY(-1px);
  border-color: var(--primary);
}

.app-row-icon {
  flex: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--active);
  color: var(--accent);
}

.app-row-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.app-row-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.app-row-title::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}

.app-row-title:hover {
  color: var(--link);
}

.app-row-desc {
  color: var(--text-secondary);
  font-size: 13.5px;
}

.app-row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.badge {
  position: relative;
  z-index: 2;
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--active);
  color: var(--link);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.badge:hover {
  background: var(--hover);
  border-color: var(--primary);
}

.app-row-icon {
  flex: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--active);
  color: var(--accent);
}

.app-row-arrow {
  position: relative;
  flex: none;
  color: var(--text-secondary);
  text-decoration: none;
  z-index: 2;
}

.app-row:hover .app-row-arrow {
  color: var(--primary);
}

/* ---------- Cookie banner (matches new apps) ---------- */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-strong);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-message {
  font-size: 14px;
}

.cookie-dismiss {
  color: var(--on-primary);
  background: var(--primary);
  border-color: transparent;
}

/* ---------- Footer ---------- */

.footer {
  padding: 24px 16px 40px;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
}

.footer a {
  color: var(--link);
}

/* ---------- Responsive ---------- */

@media (max-width: 767px) {
  .view {
    padding: 12px;
  }
  .hero {
    padding: 28px 8px 24px;
  }
  .hero-title {
    font-size: 24px;
  }
}