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

html,
body {
    height: 100%;
    overflow: hidden;
    background: #1a0b2e;
    font-family: 'Trebuchet MS', 'Segoe UI', sans-serif;
}

#wrap {
    position: relative;
    width: 100vw;
    height: 100vh;
    touch-action: none;
    user-select: none;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 24px;
    gap: 14px;
    background: radial-gradient(ellipse at 50% 30%, rgba(120, 60, 180, 0.55), rgba(20, 8, 40, 0.9));
    backdrop-filter: blur(2px);
}

.hidden {
    display: none !important;
}

.title {
    font-size: clamp(34px, 11vw, 68px);
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #ffd1f5, #b794ff, #8ee8ff, #ffd1f5);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 24px rgba(183, 148, 255, 0.4);
    line-height: 1;
}

.sub {
    font-size: clamp(15px, 4.5vw, 20px);
    color: #e7d6ff;
    max-width: 420px;
    line-height: 1.5;
}

.btn {
    margin-top: 8px;
    padding: 16px 40px;
    font-size: clamp(18px, 5.5vw, 24px);
    font-weight: 700;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    color: #2a0e44;
    background: linear-gradient(135deg, #ffe3a3, #ffb6e6);
    box-shadow: 0 8px 0 rgba(140, 60, 160, 0.5), 0 14px 30px rgba(0, 0, 0, 0.35);
    transition: transform .08s, box-shadow .08s;
}

.btn:active {
    transform: translateY(5px);
    box-shadow: 0 3px 0 rgba(140, 60, 160, 0.5);
}

.stat {
    font-size: clamp(20px, 6vw, 30px);
    font-weight: 800;
    color: #ffe3a3;
}

.small {
    font-size: 13px;
    color: #c9b3e8;
    opacity: .85;
}

#hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-weight: 800;
    font-size: clamp(16px, 5vw, 22px);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

#cookies::before {
    content: "🍪 ";
}

#dist::after {
    content: " m";
}
