:root {
    --bg: #f2f1ed;
    --bg-glow: #ffffff;
    --ink: #1d2327;
    --muted: #6b7075;
    --ring: rgb(0 0 0 / 0.08);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 8px 24px rgb(29 35 39 / 0.14);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / 0.1), 0 16px 36px rgb(29 35 39 / 0.2);
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121517;
        --bg-glow: #232a2f;
        --ink: #eef0f1;
        --muted: #8d9499;
        --ring: rgb(255 255 255 / 0.12);
        --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.45);
        --shadow-lift: 0 2px 4px rgb(0 0 0 / 0.45), 0 16px 36px rgb(0 0 0 / 0.6);
    }
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: radial-gradient(120% 70% at 50% 0%, var(--bg-glow), var(--bg) 70%) fixed, var(--bg);
    color: var(--ink);
    font: 16px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
        max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: clamp(24px, 8vh, 72px) 0 clamp(32px, 7vh, 64px);
}

.mark {
    width: 40px;
    height: 40px;
    border-radius: 22.5%;
    box-shadow: 0 0 0 1px var(--ring);
}

h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.grid {
    --icon: clamp(96px, 26vw, 136px);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 36px 20px;
    max-width: 760px;
    margin: 0 auto;
}

.app {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(var(--icon) + 16px);
    text-align: center;
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.app img {
    width: var(--icon);
    height: var(--icon);
    border-radius: 22.5%;
    box-shadow: var(--shadow), 0 0 0 1px var(--ring);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.app:hover img,
.app:focus-visible img {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift), 0 0 0 1px var(--ring);
}

.app:active img {
    transform: scale(0.94);
    transition-duration: 80ms;
}

.app:focus-visible {
    outline: none;
}

.app:focus-visible .name {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.name {
    margin-top: 12px;
    font-size: 16px;
    font-weight: 600;
}

.note {
    margin-top: 2px;
    font-size: 13px;
    color: var(--muted);
}

@media (max-width: 380px) {
    .grid {
        --icon: 84px;
        gap: 28px 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app img {
        transition: none;
    }
}
