:root {
  --bg: #0d0d0d;
  --bg-2: #161616;
  --fg: #f5f5f5;
  --muted: #9aa0a6;
  --green: #1f7a3a;
  --green-2: #2ecc71;
  --red: #b22222;
  --red-2: #ff5252;
  --radius: 18px;
  --safe-top: env(safe-area-inset-top);
  --safe-bot: env(safe-area-inset-bottom);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 600px at 50% -10%, #1c1c1c 0%, var(--bg) 60%) fixed;
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100dvh;
  overscroll-behavior: none;
}

.wrap {
  max-width: 540px;
  margin: 0 auto;
  padding: calc(24px + var(--safe-top)) 20px calc(24px + var(--safe-bot));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero {
  text-align: center;
  padding: 12px 0 4px;
}

.hero h1 {
  font-size: clamp(2.2rem, 9vw, 3rem);
  margin: 0;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #2ecc71 0%, #ffd24a 50%, #ff5252 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

.hero .sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  flex: 1;
}

.tile {
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 18px;
  padding: 18px;
  background: var(--bg-2);
  border: 1px solid #262626;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--fg);
  min-height: 110px;
  position: relative;
  overflow: hidden;
  transition: transform .08s ease, border-color .15s ease;
  box-shadow: 0 6px 22px rgba(0,0,0,.35);
}

.tile:active { transform: scale(.98); }

.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent, transparent) 0%, transparent 60%);
  opacity: .18;
  pointer-events: none;
}

.tile--green { --accent: #2ecc71; border-color: #1f7a3a55; }
.tile--red   { --accent: #ff5252; border-color: #b2222255; }

.icon {
  width: 84px;
  height: 84px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
}

.icon svg { width: 64px; height: 64px; }

.label {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .5px;
}

.foot {
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  padding-top: 8px;
}

/* Bigger phones / tablets */
@media (min-width: 480px) {
  .tile { grid-template-columns: 96px 1fr; min-height: 120px; }
  .icon { width: 96px; height: 96px; }
  .label { font-size: 1.3rem; }
}

/* App page basic style */
.app-shell {
  max-width: 540px;
  margin: 0 auto;
  padding: calc(20px + var(--safe-top)) 20px calc(20px + var(--safe-bot));
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
  margin-bottom: 16px;
}
.back:active { color: var(--fg); }
.app-title { margin: 0 0 8px; }
.app-card {
  background: var(--bg-2);
  border: 1px solid #262626;
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.5;
}
