:root {
  color-scheme: dark;
  --ink: #f8fafc;
  --muted: rgba(248, 250, 252, 0.68);
  --glass: rgba(255, 255, 255, 0.15);
  --glass-strong: rgba(255, 255, 255, 0.22);
  --stroke: rgba(255, 255, 255, 0.22);
  --shadow: rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #0f172a;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Avenir Next", "Trebuchet MS", Verdana, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(252, 211, 77, 0.35), transparent 30%),
    radial-gradient(circle at 86% 16%, rgba(56, 189, 248, 0.42), transparent 33%),
    radial-gradient(circle at 48% 82%, rgba(244, 114, 182, 0.36), transparent 31%),
    linear-gradient(145deg, #111827 0%, #0f172a 38%, #111827 100%);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.45), transparent 70%);
}

.phone {
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(68px, calc(env(safe-area-inset-top) + 42px)) 22px max(30px, env(safe-area-inset-bottom));
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 16px;
  margin: 0;
  padding: 4px 2px;
}

.app-tile {
  min-width: 0;
  color: inherit;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  animation: rise 620ms cubic-bezier(.2,.8,.2,1) both;
}

.app-tile:nth-child(2) {
  animation-delay: 80ms;
}

.app-tile:nth-child(3) {
  animation-delay: 160ms;
}

.app-tile:nth-child(4) {
  animation-delay: 240ms;
}

.app-tile:nth-child(5) {
  animation-delay: 320ms;
}

.app-tile:nth-child(6) {
  animation-delay: 400ms;
}

.icon {
  display: grid;
  width: min(24vw, 86px);
  aspect-ratio: 1;
  margin: 0 auto 10px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 24%;
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 160ms ease, filter 160ms ease;
}

.app-tile:active .icon {
  transform: scale(0.93);
  filter: brightness(1.12);
}

.icon svg {
  width: 68%;
  height: 68%;
  fill: none;
  stroke: white;
  stroke-width: 4.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cooking .icon {
  background: linear-gradient(145deg, #fb7185, #f97316 52%, #facc15);
}

.lidl .icon {
  background: linear-gradient(145deg, #2563eb, #1d4ed8 50%, #facc15 51%, #ef4444);
}

.budget .icon {
  background: linear-gradient(145deg, #14b8a6, #0f766e 55%, #052e2b);
}

.wiki .icon {
  background: linear-gradient(145deg, #f8fafc, #38bdf8 38%, #1e3a8a);
}

.projects .icon {
  background: linear-gradient(145deg, #a3e635, #16a34a 45%, #14532d);
}

.outfit .icon {
  background: linear-gradient(145deg, #fbcfe8, #ec4899 42%, #7f1d1d);
}

.label {
  display: block;
  overflow: hidden;
  color: rgba(255,255,255,0.94);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  text-shadow: 0 2px 12px rgba(0,0,0,0.38);
  white-space: nowrap;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 340px) {
  .phone {
    padding-inline: 16px;
  }

  .app-grid {
    gap: 20px 10px;
  }
}
