:root {
    --bg: #0a0d0a;
    --surface: #121712;
    --surface-2: #182018;
    --border: #243024;
    --green: #19e08b;
    --green-2: #0f9d58;
    --text: #e8f3e8;
    --muted: #8a978a;
    --win: #19e08b;
    --loss: #ef5350;
    --pending: #ffb300;
    --refund: #9aa39a;
    --radius: 12px;
    --content-width: 960px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--bg);
    background-image:
        radial-gradient(55% 45% at 85% 6%, rgba(25, 224, 139, 0.10), transparent 70%),
        radial-gradient(95% 60% at 50% -5%, var(--surface), transparent 60%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

a {
    color: var(--green);
    text-decoration: none;
}

a:hover {
    color: var(--text);
}

.page {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 24px 16px 64px;
    flex: 1 0 auto;
}

.page--auth {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--surface-2);
    color: var(--text);
    transition: transform 0.08s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    color: var(--text);
}

.btn:active {
    transform: translateY(0) scale(0.97);
}

.like-btn:active,
.lang-switch__btn:active,
.social__link:active {
    transform: scale(0.95);
}

.btn--ghost {
    background: transparent;
}

.btn--ghost:hover {
    border-color: var(--green-2);
}

.btn--primary {
    background: linear-gradient(135deg, var(--green), var(--green-2));
    border-color: transparent;
    color: #06120c;
    box-shadow: 0 0 0 rgba(25, 224, 139, 0);
}

.btn--primary:hover {
    color: #06120c;
    box-shadow: 0 6px 24px rgba(25, 224, 139, 0.28);
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.pill--active {
    background: rgba(25, 224, 139, 0.12);
    color: var(--green);
    border: 1px solid rgba(25, 224, 139, 0.4);
}

.brand-accent {
    color: var(--green);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 13, 10, 0.78);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}

.site-header__inner--minimal {
    display: flex;
    justify-content: center;
}

.site-header__left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cta-short {
    display: none;
}

.site-header__brand {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    text-align: center;
}

.site-header__right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.lang-switch {
    display: inline-flex;
    gap: 4px;
}

.lang-switch__btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: transparent;
    color: inherit;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    opacity: 0.65;
    transition: opacity 0.15s ease, border-color 0.15s ease;
}

.lang-switch__btn:hover {
    opacity: 1;
    border-color: var(--green-2);
}

.lang-switch__btn--active {
    display: none;
}

.lang-switch__flag {
    width: 18px;
    height: 12px;
    border-radius: 2px;
    display: block;
}

.user-menu {
    position: relative;
}

.user-menu__toggle {
    max-width: none;
}

.user-menu__email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}

.user-menu__dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 180px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.user-menu__item {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text);
}

.user-menu__item:hover {
    background: var(--surface-2);
    color: var(--green);
}

.user-menu__caret {
    font-size: 1.5rem;
    line-height: 1;
}

.nav-burger {
    display: none;
}

.flash-stack {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    width: max-content;
    max-width: min(92vw, 460px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.flash {
    pointer-events: auto;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    animation: flash-in 0.25s ease;
}

.flash.is-leaving {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes flash-in {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.auth-resend {
    margin: 0 0 14px;
}

.auth-resend__btn {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--green);
    text-decoration: underline;
    cursor: pointer;
}

.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface-2);
    font-size: 0.95rem;
}

.flash-success {
    border-color: rgba(25, 224, 139, 0.4);
    color: var(--green);
}

.flash-error {
    border-color: rgba(239, 83, 80, 0.4);
    color: var(--loss);
}

.flash-info,
.flash-dev {
    border-color: rgba(255, 179, 0, 0.4);
    color: var(--pending);
}

.hero {
    text-align: center;
    padding: 56px 0 32px;
}

.hero__logo {
    font-size: clamp(3rem, 12vw, 5.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    margin: 0;
    line-height: 1;
}

.hero__logo .brand-accent {
    text-shadow: 0 0 30px rgba(25, 224, 139, 0.5);
}

.hero__slogan {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 3vw, 1.3rem);
}

.hero .btn {
    margin-top: 28px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 24px 0 24px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
}

.stat-card__value {
    font-size: clamp(1.4rem, 5vw, 2rem);
    font-weight: 800;
    color: var(--green);
}

.stat-card__label {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.section-heading {
    font-size: 1.4rem;
    margin: 0 0 16px;
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--green);
}

.ticket-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feed-state {
    text-align: center;
    color: var(--muted);
    padding: 24px 0;
}

.feed-actions {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.ticket {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
}

.ticket--pending {
    border-color: rgba(255, 179, 0, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255, 179, 0, 0.06);
}

.ticket__top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge--win {
    background: rgba(25, 224, 139, 0.14);
    color: var(--win);
}

.badge--loss {
    background: rgba(239, 83, 80, 0.14);
    color: var(--loss);
}

.badge--pending {
    background: rgba(255, 179, 0, 0.14);
    color: var(--pending);
}

.badge--refund {
    background: rgba(154, 163, 154, 0.14);
    color: var(--refund);
}

.ticket__live {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--pending);
    letter-spacing: 0.05em;
}

.ticket__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.ticket__link:hover .ticket__description {
    text-decoration: underline;
}

.ticket__description {
    margin: 0 0 14px;
    font-size: 1.05rem;
}

.bets {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bet {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
}

.bet__main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.bet__title {
    font-weight: 600;
}

.bet__pick {
    color: var(--muted);
    font-size: 0.9rem;
}

.bet__meta {
    text-align: right;
    flex-shrink: 0;
}

.bet__odds {
    display: block;
    font-weight: 700;
    color: var(--green);
}

.bet__start {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
}

.ticket__summary {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.chip {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.ticket__actions {
    margin-bottom: 14px;
}

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.like-btn:hover {
    border-color: var(--green-2);
    color: var(--text);
}

.like-btn.is-active {
    border-color: rgba(25, 224, 139, 0.5);
    color: var(--green);
}

.like-btn__heart {
    font-size: 1.05rem;
    line-height: 1;
}

.comments {
    margin: 18px -18px -18px;
    padding: 16px 18px;
    background: rgba(0, 0, 0, 0.18);
    border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comments__header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments__title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.comments__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
}

.comments__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
}

.comment__head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.comment__author {
    font-weight: 600;
    font-size: 0.9rem;
}

.comment__date {
    color: var(--muted);
    font-size: 0.8rem;
}

.comment__text {
    font-size: 0.95rem;
    word-break: break-word;
}

.comment-form {
    display: flex;
    gap: 8px;
}

.comment-form__error {
    color: var(--loss);
    font-size: 0.85rem;
    margin: 4px 0 0;
}

.comment-form__input {
    flex: 1;
    min-width: 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text);
    font-size: 1rem;
}

.comment-form__input:focus {
    border-color: var(--green-2);
    box-shadow: 0 0 0 3px rgba(25, 224, 139, 0.12);
}

.comments__login {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.comments__more {
    display: inline-block;
    margin: 4px 0 12px;
    font-size: 0.9rem;
    color: var(--green);
    font-weight: 600;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    margin-top: 48px;
}

.site-footer__inner {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 32px 16px;
}

.social {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-bottom: 28px;
}

.social__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.08s ease;
}

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

.site-footer__cols {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.site-footer__col--right {
    text-align: right;
}

.footer-brand {
    font-weight: 700;
}

.footer-mail {
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-mail:hover {
    color: var(--green);
}

.footer-secure {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.footer-responsible {
    margin: 24px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.stripe-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 8px;
    background: #635bff;
    color: #fff;
    font-weight: 800;
    font-style: italic;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.stripe-badge:hover {
    color: #fff;
    opacity: 0.9;
}

/* settings */
.settings-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 16px;
}

.settings-card__title {
    margin: 0 0 14px;
    font-size: 1.1rem;
}

.settings-field {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
}

.settings-field__label {
    color: var(--muted);
}

.settings-subs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-sub {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    flex-wrap: wrap;
}

.settings-sub__main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-sub__title {
    font-weight: 600;
}

.settings-sub__dates {
    color: var(--muted);
    font-size: 0.85rem;
}

.settings-sub__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.settings-sub__price {
    font-weight: 700;
    color: var(--green);
}

.settings-sub__state {
    font-size: 0.85rem;
    font-weight: 600;
}

.settings-sub__state--active {
    color: var(--green);
}

.settings-sub__state--inactive {
    color: var(--muted);
}

.settings-sub__renewal-box {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.settings-sub__renewal {
    color: var(--pending);
    font-size: 0.85rem;
    font-weight: 600;
}

.settings-field__value {
    word-break: break-word;
    text-align: right;
}

.settings-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.settings-form__label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--muted);
}

.settings-input {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
}

.settings-input:focus {
    border-color: var(--green-2);
    box-shadow: 0 0 0 3px rgba(25, 224, 139, 0.12);
}

.settings-form__hint {
    margin: 8px 0 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.settings-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.settings-form__save {
    margin-top: 18px;
}

.settings-toggle__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
}

.settings-toggle__title {
    font-weight: 600;
}

.settings-toggle__desc {
    font-size: 0.82rem;
    color: var(--muted);
}

.switch {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    width: 48px;
    height: 28px;
    cursor: pointer;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch__slider {
    position: absolute;
    inset: 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: background 0.18s, border-color 0.18s;
}

.switch__slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--muted);
    transition: transform 0.18s, background 0.18s;
}

.switch input:checked + .switch__slider {
    background: rgba(25, 224, 139, 0.18);
    border-color: var(--green-2);
}

.switch input:checked + .switch__slider::before {
    transform: translateX(20px);
    background: var(--green);
}

.switch input:focus-visible + .switch__slider {
    box-shadow: 0 0 0 3px rgba(25, 224, 139, 0.12);
}

.settings-push__status {
    margin-top: 4px;
    font-size: 0.82rem;
    color: var(--muted);
}

.settings-push__status--ok {
    color: var(--green);
}

.settings-push__status--error {
    color: var(--pending);
}

.push-help {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--muted);
}

.push-help summary {
    cursor: pointer;
    color: var(--green);
    font-weight: 600;
}

.push-help__steps {
    margin: 8px 0 0;
    padding-left: 18px;
    line-height: 1.6;
}

/* admin */
.admin {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-nav__link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text);
    border: 1px solid transparent;
}

.admin-nav__link:hover {
    background: var(--surface-2);
    color: var(--green);
}

.admin-nav__link.is-active {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--green);
}

.admin-content {
    min-width: 0;
    overflow-x: auto;
}

.admin-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.admin-head .section-heading {
    margin: 0;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

.admin-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 14px;
    text-align: center;
    color: var(--text);
}

.admin-stat:hover {
    border-color: var(--green-2);
    color: var(--text);
}

.admin-stat__value {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--green);
}

.admin-stat__label {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table__desc {
    max-width: 280px;
}

.admin-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.pagination__info {
    color: var(--muted);
    font-size: 0.9rem;
}

.admin-inline-form {
    display: inline;
    margin: 0;
}

.btn--sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.btn--danger {
    background: rgba(239, 83, 80, 0.12);
    border-color: rgba(239, 83, 80, 0.4);
    color: var(--loss);
}

.btn--danger:hover {
    color: var(--loss);
    border-color: var(--loss);
}

.admin-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 640px;
}

.admin-form__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.admin-form label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.85rem;
}

.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="number"],
.admin-form input[type="datetime-local"],
.admin-form textarea,
.admin-form select {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    border-color: var(--green-2);
    box-shadow: 0 0 0 3px rgba(25, 224, 139, 0.12);
}

.admin-form__actions {
    display: flex;
    gap: 10px;
}

.admin-collection {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-collection__item {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 720px) {
    body {
        background-attachment: scroll;
    }

    .admin {
        grid-template-columns: 1fr;
    }

    .admin-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .user-menu__email {
        display: none;
    }

    .nav-desktop {
        display: none;
    }

    .nav-burger {
        display: block;
    }

    .site-header__left .btn {
        font-size: 0.85rem;
    }

    .site-header__left .pill {
        font-size: 0.78rem;
        padding: 6px 10px;
    }

    .cta-long {
        display: none;
    }

    .cta-short {
        display: inline;
    }

    .site-header__left .btn,
    .site-header__right .btn,
    .user-menu__toggle {
        min-height: 44px;
    }

    .lang-switch__label {
        display: none;
    }

    .lang-switch__btn {
        padding: 10px;
        min-width: 40px;
        min-height: 44px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .site-footer__cols {
        flex-direction: column;
    }

    .site-footer__col--right {
        text-align: left;
    }

    .bet {
        flex-direction: column;
        align-items: flex-start;
    }

    .bet__meta {
        text-align: left;
    }

    .site-header__inner {
        gap: 8px;
        padding: 10px 12px;
    }

    .site-header__left .btn,
    .site-header__right .btn {
        padding: 8px 10px;
        font-size: 0.82rem;
    }

    .site-header__brand {
        font-size: 1.2rem;
    }

    .comment-form {
        flex-direction: column;
    }

    .comment-form__input {
        width: 100%;
    }

    .comment-form__submit {
        width: 100%;
        justify-content: center;
    }
}

/* auth */
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    text-align: center;
}

.auth-logo {
    display: inline-block;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--text);
    margin-bottom: 18px;
}

.auth-logo:hover {
    color: var(--text);
}

.auth-title {
    margin: 0 0 6px;
    font-size: 1.5rem;
}

.auth-subtitle {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 0.95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    margin-bottom: 18px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-form label {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.auth-input {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
}

.auth-input:focus {
    border-color: var(--green-2);
    box-shadow: 0 0 0 3px rgba(25, 224, 139, 0.12);
}

.auth-field--check {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-field--check input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--green);
}

.auth-field--check label {
    flex: 1;
    font-weight: 400;
    line-height: 1.45;
}

.auth-submit {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 18px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-google {
    width: 100%;
    justify-content: center;
}

.auth-google__icon {
    width: 18px;
    height: 18px;
}

.auth-alt {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.auth-terms {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.auth-card .flash {
    text-align: left;
    margin-bottom: 14px;
}

.auth-card .flash-dev a {
    word-break: break-all;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px;
    }
}

.legal {
    max-width: 760px;
    margin: 0 auto;
    color: var(--text);
}

.legal__head {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.legal__title {
    margin: 0 0 8px;
    font-size: 1.8rem;
}

.legal__meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.legal__notice {
    background: var(--surface-2);
    border: 1px solid var(--pending);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 32px;
    font-size: 0.92rem;
    line-height: 1.6;
}

.legal__section {
    margin-bottom: 28px;
}

.legal__section h2 {
    font-size: 1.15rem;
    margin: 0 0 12px;
    color: var(--green);
}

.legal__section p {
    margin: 0 0 10px;
    font-size: 0.95rem;
    line-height: 1.65;
}

.legal__contact {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}

.legal__contact li {
    padding: 2px 0;
    font-size: 0.95rem;
}

.legal__download {
    margin-top: 32px;
}

.switch input:disabled + .switch__slider {
    opacity: 0.45;
    cursor: not-allowed;
}

.feed-locked {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    padding: 36px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.feed-locked__text {
    margin: 0;
    max-width: 420px;
    color: var(--muted);
    line-height: 1.6;
}

.feed-locked__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.settings-members-only {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--green);
    border-radius: var(--radius);
}

.settings-members-only__title {
    font-weight: 600;
}

.settings-members-only__text {
    font-size: 0.88rem;
    color: var(--muted);
}

.settings-members-only .btn {
    margin-top: 4px;
}

.info-guide__intro {
    font-size: 1.02rem;
    line-height: 1.7;
    margin: 0 0 28px;
}

.info-guide__cta {
    margin-top: 8px;
}

.info-steps {
    list-style: none;
    counter-reset: info-step;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.info-step {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
}

.info-step__title {
    display: block;
    font-weight: 600;
    color: var(--green);
    margin-bottom: 4px;
}

.info-step p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-example {
    background: rgba(25, 224, 139, 0.07);
    border: 1px solid rgba(25, 224, 139, 0.3);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin: 0 0 12px;
}

.info-example__label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--green);
    margin-bottom: 6px;
}

.info-example p {
    margin: 0 0 6px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-example p:last-child {
    margin-bottom: 0;
}

body.has-modal {
    overflow: hidden;
}

.welcome-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.welcome-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 5, 0.72);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.welcome-modal.is-open .welcome-modal__backdrop {
    opacity: 1;
}

.welcome-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px 24px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(12px) scale(0.98);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.welcome-modal.is-open .welcome-modal__dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.welcome-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
}

.welcome-modal__close:hover {
    color: var(--text);
}

.welcome-modal__title {
    margin: 0 0 10px;
    font-size: 1.5rem;
}

.welcome-modal__lead {
    margin: 0 0 18px;
    color: var(--text);
    line-height: 1.6;
}

.welcome-modal__cta {
    width: 100%;
    justify-content: center;
    font-size: 1.02rem;
}

.welcome-modal__login {
    margin: 14px 0 0;
    font-size: 0.92rem;
    color: var(--muted);
}

.welcome-modal__after {
    margin: 16px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--muted);
}

.results-intro {
    margin: -8px 0 20px;
    max-width: 640px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}

.pagination__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination__link,
.pagination__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    transition: transform 0.08s ease, border-color 0.2s ease, color 0.2s ease;
}

.pagination__link:hover,
.pagination__nav:hover {
    border-color: var(--green-2);
    color: var(--green);
}

.pagination__link:active,
.pagination__nav:active {
    transform: scale(0.95);
}

.pagination__link--active,
.pagination__link--active:hover {
    background: linear-gradient(135deg, var(--green), var(--green-2));
    border-color: transparent;
    color: #06120c;
    cursor: default;
}

/* stats */
.stats-summary {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.stats-note {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.stats-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 0.85rem;
}

.stats-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.stats-legend .cal-day {
    width: 18px;
    height: 18px;
    aspect-ratio: auto;
}

.stats-calendar {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.cal-month {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 16px;
}

.cal-month__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 14px;
}

.cal-month__title {
    margin: 0;
    font-size: 1.1rem;
}

.cal-month__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cal-chip {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.8rem;
    color: var(--text);
    white-space: nowrap;
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 6px;
}

.cal-weekday {
    text-align: center;
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.cal-day {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
}

.cal-day[tabindex] {
    cursor: pointer;
}

.cal-day[tabindex]:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

.cal-day__tip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
}

.cal-day:hover .cal-day__tip,
.cal-day:focus .cal-day__tip,
.cal-day:focus-within .cal-day__tip {
    display: block;
}

.cal-day.cal-day--positive-1 {
    background: color-mix(in srgb, var(--green) 24%, var(--surface-2));
    color: var(--text);
}

.cal-day.cal-day--positive-2 {
    background: color-mix(in srgb, var(--green) 45%, var(--surface-2));
    color: var(--text);
}

.cal-day.cal-day--positive-3 {
    background: color-mix(in srgb, var(--green) 70%, var(--surface-2));
    color: #06120c;
}

.cal-day.cal-day--positive-4 {
    background: var(--green);
    color: #06120c;
}

.cal-day.cal-day--negative-1 {
    background: color-mix(in srgb, #e0556b 24%, var(--surface-2));
    color: var(--text);
}

.cal-day.cal-day--negative-2 {
    background: color-mix(in srgb, #e0556b 45%, var(--surface-2));
    color: var(--text);
}

.cal-day.cal-day--negative-3 {
    background: color-mix(in srgb, #e0556b 70%, var(--surface-2));
    color: #1a0508;
}

.cal-day.cal-day--negative-4 {
    background: #e0556b;
    color: #1a0508;
}

.cal-day--positive {
    background: var(--green);
    color: #06120c;
}

.cal-day--negative {
    background: #e0556b;
    color: #1a0508;
}

.cal-day--neutral {
    background: var(--surface-2);
    color: var(--muted);
}

.cal-blank {
    aspect-ratio: 1;
}

.stats-widget {
    margin: 0 0 48px;
}

.stats-widget__link {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    color: inherit;
}

.stats-widget__link:hover {
    border-color: var(--green);
}

.stats-widget__label {
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stats-widget__days {
    display: flex;
    gap: 6px;
}

.stats-widget__days .cal-day {
    flex: 1;
    aspect-ratio: 1;
    max-width: 48px;
    font-size: 0.72rem;
}
