:root {
    --green: #58cc02;
    --green-dark: #43c000;
    --green-pale: #f0fbe4;
    --green-ink: #3f9d02;
    --green-mid: #d7f5b0;
    --yellow: #ffc800;
    --yellow-pale: #fff8e0;
    --blue: #1cb0f6;
    --blue-pale: #e8f7fe;
    --red: #ff4b4b;
    --red-pale: #ffecec;
    --purple: #ce82ff;
    --purple-pale: #f5eeff;
    --text: #111827;
    --text-2: #4b5563;
    --text-3: #9ca3af;
    --border: #e5e7eb;
    --surface: #f9fafb;
    --white: #ffffff;
    --page-gutter: clamp(16px, 5vw, 80px);
    --content-width: 1100px;
    --radius-card: 20px;
}

@media (max-width: 640px) {
    :root {
        --page-gutter: 12px;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-size: 16px;
}

body {
    overflow-x: hidden;
    background: var(--white);
    color: var(--text);
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.5;
}

button,
input,
textarea,
select {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    display: block;
}

img {
    max-width: 100%;
}

main {
    display: block;
}

.container {
    width: min(var(--content-width), calc(100% - 32px));
    margin-inline: auto;
}

.narrow {
    max-width: 820px;
}

.surface-white {
    background: var(--white);
}

.surface-muted {
    background: var(--surface);
}

.tone-green {
    background: var(--green-pale);
}

.tone-yellow {
    background: var(--yellow-pale);
}

.tone-blue {
    background: var(--blue-pale);
}

.tone-red {
    background: var(--red-pale);
}

.tone-purple {
    background: var(--purple-pale);
}

.tone-white-glass {
    background: rgba(255, 255, 255, .2);
}

.pill-green {
    background: var(--green-pale);
    color: var(--green-ink);
}

.pill-yellow {
    background: var(--yellow-pale);
    color: #92400e;
}

.pill-blue {
    background: var(--blue-pale);
    color: #0369a1;
}

.pill-red {
    background: var(--red-pale);
    color: #b91c1c;
}

.pill-purple {
    background: var(--purple-pale);
    color: #7e22ce;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .55s ease, transform .55s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

/* Nút tải app (trang chủ + footer) */
.store-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px 8px 8px;
    border: 1.5px solid var(--border);
    border-radius: 16px;
    background: var(--white);
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    transition: transform .15s ease, border-color .15s ease;
}

.store-badge:hover {
    border-color: var(--green-mid);
    transform: translateY(-2px);
}

.store-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--white);
}

.store-badge-ios .store-badge-icon {
    background: linear-gradient(135deg, #38bdf8, #2563eb);
}

.store-badge-android .store-badge-icon {
    background: linear-gradient(135deg, var(--green), #2f9e00);
}

.store-badge-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.store-badge-text small {
    display: block;
    margin-bottom: 1px;
    color: var(--text-3);
    font-size: .7rem;
    font-weight: 600;
}

.store-badge.is-soon {
    cursor: default;
}

.store-badge.is-soon .store-badge-text small {
    color: #d97706;
}

.store-badges-note {
    flex-basis: 100%;
    color: var(--text-2);
    font-size: .8rem;
    text-align: center;
}

/* Nút theo trạng thái đăng nhập app (class is-authed gắn ở <html>) */
.auth-in {
    display: none;
}

.is-authed .auth-in {
    display: inline;
}

.is-authed .auth-out {
    display: none !important;
}
