:root {
  --bg: #eef3f6;
  --bg-top: #14305a;
  --card: #ffffff;
  --text: #13243b;
  --muted: #5b6b7f;
  --line: #dbe3ea;
  --accent: #0e7c7b;
  --shadow: 0 1px 2px rgba(20, 48, 90, .06), 0 4px 14px rgba(20, 48, 90, .07);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1526;
    --card: #14233a;
    --text: #e8eef6;
    --muted: #93a3b8;
    --line: #22344f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(20px + env(safe-area-inset-top)) 16px 52px;
  background: linear-gradient(135deg, #14305a, #0e7c7b);
  color: #fff;
}
.top img { border-radius: 10px; }
.top h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: .2px; }
.top p { margin: 2px 0 0; font-size: 14px; opacity: .8; }

main {
  max-width: 720px;
  margin: -36px auto 0;
  padding: 0 16px calc(24px + env(safe-area-inset-bottom));
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  height: 100%;
  padding: 20px 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:active { transform: scale(.97); }
@media (hover: hover) {
  .card:hover { transform: translateY(-2px); }
}
.card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.card img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  margin-bottom: 8px;
  object-fit: cover;
}
.name { font-weight: 700; font-size: 17px; }
.desc { font-size: 13px; color: var(--muted); }

.foot, .note {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
