/* =====================================================================
   PigeonPoul — Liquid Glass UI
   Mobile-first stylesheet. Huisstijl afgeleid van het logo:
   crimson/rose + zilver op donker marineblauw, met goud-accent.
   ===================================================================== */

:root {
    /* Huisstijlkleuren */
    --rose-300: #ff9bb0;
    --rose-400: #ff6f8d;
    --rose-500: #ec4666;   /* primair — uit het logo */
    --rose-600: #d11d45;
    --gold-400: #f5b53d;   /* trofee-accent */
    --silver:   #e7eaf3;

    /* Donkere achtergrond */
    --ink-900: #070b18;
    --ink-800: #0b1226;    /* basis marineblauw uit het logo */
    --ink-700: #131c39;

    /* Tekst */
    --text:        #eef1fb;
    --text-muted:  #a6adc8;

    /* Glas */
    --glass-bg:     rgba(255, 255, 255, 0.07);
    --glass-bg-2:   rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.16);
    --glass-shadow: 0 8px 32px rgba(3, 6, 18, 0.45);
    --glass-blur:   18px;

    /* Vorm & ritme */
    --radius:    22px;
    --radius-sm: 14px;
    --gap:       16px;
    --maxw:      560px;

    --font-display: "Sora", system-ui, sans-serif;
    --font-body:    "Inter", system-ui, sans-serif;

    /* Veilige insets voor de bottom-nav (notch/home-indicator). */
    --nav-h: 68px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--ink-900);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; }

/* ---------------------------------------------------------------------
   Aurora achtergrond (gekleurde, bewegende glow-vlekken)
   --------------------------------------------------------------------- */
.aurora {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(1200px 800px at 80% -10%, rgba(236, 70, 102, 0.18), transparent 60%),
        radial-gradient(900px 700px at -10% 20%, rgba(19, 28, 57, 0.9), transparent 60%),
        var(--ink-900);
}

.aurora__blob {
    position: absolute;
    width: 60vmax;
    height: 60vmax;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    will-change: transform;
    animation: drift 22s ease-in-out infinite alternate;
}
.aurora__blob--rose   { background: var(--rose-500); top: -20vmax; right: -15vmax; }
.aurora__blob--gold   { background: var(--gold-400); bottom: -25vmax; left: -10vmax; opacity: 0.28; animation-delay: -6s; }
.aurora__blob--silver { background: var(--silver);   top: 30vmax; left: 30vmax; opacity: 0.12; animation-delay: -12s; }

@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(4vmax, 6vmax, 0) scale(1.12); }
}

/* ---------------------------------------------------------------------
   Glas-primitief
   --------------------------------------------------------------------- */
.glass {
    background: linear-gradient(180deg, var(--glass-bg), var(--glass-bg-2));
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    box-shadow: var(--glass-shadow);
    position: relative;
}
/* Subtiele glans-rand bovenaan elk glaspaneel. */
.glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    opacity: 0.6;
}

/* ---------------------------------------------------------------------
   Layout-omhulling
   --------------------------------------------------------------------- */
.page {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: calc(72px + var(--gap)) var(--gap) calc(var(--nav-h) + var(--safe-bottom) + 32px);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ---------------------------------------------------------------------
   Topbar
   --------------------------------------------------------------------- */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 60px;
    padding: 0 16px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    border-top: none;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand__logo { width: 40px; height: auto; filter: drop-shadow(0 2px 6px rgba(236, 70, 102, 0.4)); }
.brand__text { display: flex; flex-direction: column; }
.brand__name { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.04em; font-size: 1rem; color: var(--silver); }
.brand__name strong { color: #fff; font-weight: 800; }
.brand__tag { font-size: 0.66rem; color: var(--text-muted); letter-spacing: 0.02em; }

/* ---------------------------------------------------------------------
   Knoppen
   --------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 13px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--sm { padding: 9px 14px; font-size: 0.82rem; }

.btn--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--rose-400), var(--rose-600));
    box-shadow: 0 10px 24px rgba(209, 29, 69, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn--primary:hover { box-shadow: 0 14px 30px rgba(209, 29, 69, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35); }

.btn--ghost {
    color: var(--text);
    background: var(--glass-bg);
    border-color: var(--glass-border);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------- */
.hero { display: flex; flex-direction: column; gap: 18px; padding-top: 8px; }
.hero__title { font-size: clamp(2rem, 9vw, 2.9rem); font-weight: 800; letter-spacing: -0.02em; }
.hero__lead { color: var(--text-muted); font-size: 1.05rem; max-width: 38ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hero--error { text-align: center; align-items: center; }

.pill {
    align-self: flex-start;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--rose-300);
    padding: 7px 14px;
    border-radius: 999px;
}

/* ---------------------------------------------------------------------
   Feature-kaarten
   --------------------------------------------------------------------- */
.features { display: grid; grid-template-columns: 1fr; gap: var(--gap); }
.card { border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.card__icon {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose-400), var(--rose-600));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.card__title { font-size: 1.12rem; font-weight: 700; }
.card__text { color: var(--text-muted); margin: 0; font-size: 0.95rem; }

.icon { width: 24px; height: 24px; }

/* ---------------------------------------------------------------------
   Sectiekoppen
   --------------------------------------------------------------------- */
.section-head { display: flex; flex-direction: column; gap: 6px; }
.section-head__title { font-size: 1.8rem; font-weight: 800; }
.section-head__sub { color: var(--text-muted); margin: 0; }

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

/* ---------------------------------------------------------------------
   Wedstrijd-kaart
   --------------------------------------------------------------------- */
.match {
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "stage kickoff" "teams teams";
    gap: 10px 12px;
    align-items: center;
}
.match__stage { grid-area: stage; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--rose-300); }
.match__kickoff { grid-area: kickoff; text-align: right; font-size: 0.8rem; color: var(--text-muted); }
.match__teams { grid-area: teams; display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.match__vs { color: var(--text-muted); font-weight: 400; }

/* ---------------------------------------------------------------------
   Ranglijst
   --------------------------------------------------------------------- */
.board { border-radius: var(--radius); padding: 8px; }
.board__list { list-style: none; margin: 0; padding: 0; }
.board__row {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    border-radius: var(--radius-sm);
}
.board__row + .board__row { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.board__rank-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 36px;
}
.board__rank {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 50%;
    font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}
.board__row--rank-1 .board__rank { background: linear-gradient(135deg, #ffe08a, var(--gold-400)); color: #5a3c00; box-shadow: 0 6px 16px rgba(245, 181, 61, 0.4); }
.board__row--rank-2 .board__rank { background: linear-gradient(135deg, #f4f6ff, #c4cbe0); color: #2a3050; }
.board__row--rank-3 .board__rank { background: linear-gradient(135deg, #f0b27a, #c77b3e); color: #fff; }
.board__name { font-weight: 600; min-width: 0; }
.board__name-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    row-gap: 4px;
}
.board__name-primary { line-height: 1.3; }
.board__handle {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--rose-300);
    background: rgba(236, 70, 102, 0.12);
    border: 1px solid rgba(236, 70, 102, 0.24);
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.2;
}
.board__points {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--rose-300);
}
.board__points small { color: var(--text-muted); font-weight: 500; font-size: 0.7rem; }
.board__delta {
    display: inline-flex;
    align-items: center;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 2px 7px;
    border-radius: 999px;
    line-height: 1.3;
    vertical-align: middle;
    animation: delta-pop 0.45s var(--ease-out) both;
}
.board__delta--gain {
    color: #9ff0c4;
    background: rgba(80, 200, 140, 0.2);
    border: 1px solid rgba(80, 200, 140, 0.35);
}
.board__delta--loss {
    color: #ffb3c4;
    background: rgba(236, 70, 102, 0.16);
    border: 1px solid rgba(236, 70, 102, 0.3);
}
.trend {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    line-height: 1;
}
.trend--rank .icon { width: 11px; height: 11px; stroke-width: 2.2; }
.trend--up { color: #5ee89a; }
.trend--down { color: #ff6f8d; }
.trend__num { font-size: 0.58rem; font-weight: 800; opacity: 0.95; }
@keyframes delta-pop {
    from { opacity: 0; transform: scale(0.85) translateY(2px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.code-chip {
    align-self: flex-start;
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: 0.3em;
    font-size: 1.4rem;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    color: #fff;
    margin-top: 6px;
}

.trace {
    margin-top: 20px; text-align: left;
    padding: 16px; border-radius: var(--radius-sm);
    font-size: 0.72rem; color: var(--text-muted);
    overflow-x: auto; max-width: 100%;
}

/* ---------------------------------------------------------------------
   Bottom-nav (mobile-first kern-navigatie)
   --------------------------------------------------------------------- */
.bottomnav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(12px + var(--safe-bottom));
    z-index: 30;
    width: min(calc(100% - 24px), var(--maxw));
    height: var(--nav-h);
    display: flex;
    align-items: center;
    border-radius: 22px;
    padding: 6px;
    gap: 2px;
}
.bottomnav__item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 100%;
    border-radius: 16px;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}
.bottomnav__item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bottomnav__item.is-active {
    color: #fff;
    background: linear-gradient(180deg, rgba(236, 70, 102, 0.28), rgba(236, 70, 102, 0.12));
}
.bottomnav__item.is-active .icon { filter: drop-shadow(0 2px 8px rgba(236, 70, 102, 0.6)); }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.74rem;
    padding: 0 16px calc(var(--nav-h) + var(--safe-bottom) + 24px);
}

/* ---------------------------------------------------------------------
   Tablet / desktop verfijning
   --------------------------------------------------------------------- */
@media (min-width: 720px) {
    :root { --maxw: 900px; }
    .features { grid-template-columns: repeat(3, 1fr); }
    .hero__title { font-size: 3.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    .aurora__blob { animation: none; }
    .btn { transition: none; }
}

/* =====================================================================
   Uitbreiding: auth, poules, voorspellen, vlaggen
   ===================================================================== */

/* --- Topbar auth --- */
.topbar__auth { display: flex; align-items: center; gap: 10px; margin: 0; }
.topbar__user { font-size: 0.8rem; color: var(--silver); font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Formulieren --- */
.form { border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.form--inline { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.field__label small { font-weight: 400; }
.field__input {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
}
.field__input:focus { outline: 2px solid var(--rose-400); outline-offset: 1px; }
select.field__input { appearance: none; -webkit-appearance: none; }
.field__input option, .field__input optgroup { color: #111; }
.field__input--code { letter-spacing: 0.3em; text-transform: uppercase; font-family: var(--font-display); font-weight: 700; }
.btn--block { width: 100%; }
.form__alert { background: rgba(209, 29, 69, 0.18); border: 1px solid rgba(236, 70, 102, 0.4); color: #ffd5dd; padding: 10px 14px; border-radius: var(--radius-sm); margin: 0; font-size: 0.9rem; }
.form__notice { background: rgba(53, 180, 120, 0.16); border: 1px solid rgba(80, 200, 140, 0.4); color: #c9f5dd; padding: 12px 14px; border-radius: var(--radius-sm); margin: 0; font-size: 0.92rem; }
.form__foot { color: var(--text-muted); font-size: 0.9rem; margin: 0; text-align: center; }
.form__foot--end { text-align: right; margin-top: -6px; }
.form__foot a, .form__text a { color: var(--rose-300); }
.form__text { margin: 0; color: var(--text-muted); }

/* --- Vlaggen / team-badge --- */
.team { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.team__flag { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
.team__flag--emoji { font-size: 1.1rem; box-shadow: none; }
.team__flag--code, .team__flag--tbd {
    display: grid; place-items: center;
    font-size: 0.6rem; font-weight: 700; color: var(--text-muted);
    background: rgba(255, 255, 255, 0.1); box-shadow: none;
}
.team__name { font-family: var(--font-display); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team--home { justify-content: flex-end; text-align: right; }
.team--home .team__name { order: -1; }
.team--away { justify-content: flex-start; }

/* --- Wedstrijd-kaart (home — score — away) --- */
.match { display: flex; flex-direction: column; gap: 10px; grid-template-areas: none; }
.match__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.match__score { display: flex; align-items: center; justify-content: center; gap: 6px; }
.match__sep { color: var(--text-muted); }
.match__result { font-size: 0.8rem; color: var(--gold-400); font-weight: 600; }
.match--locked { opacity: 0.9; }
.score-input {
    width: 44px; text-align: center; padding: 8px 6px;
    border-radius: 10px; background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border); color: var(--text);
    font-family: var(--font-display); font-weight: 700; font-size: 1rem;
    -moz-appearance: textfield;
}
.score-input::-webkit-outer-spin-button, .score-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.score-input:disabled { opacity: 0.5; }

/* --- Rondes / voorspellen --- */
.round { display: flex; flex-direction: column; gap: 12px; }
.round__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.round__title { font-size: 1.3rem; font-weight: 800; }
.round__deadline { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.round__note { margin: -4px 0 0; font-size: 0.8rem; color: var(--text-muted); }
.round--locked .round__deadline { color: var(--rose-300); }
.card__note { margin: -4px 0 10px; font-size: 0.82rem; color: var(--text-muted); }
.round form > .btn { margin-top: 12px; }
.tag { font-size: 0.7rem; background: rgba(255, 255, 255, 0.1); padding: 3px 8px; border-radius: 999px; color: var(--rose-300); font-weight: 600; vertical-align: middle; }
.lock-note { font-size: 0.8rem; color: var(--text-muted); }
.topscorers { margin-top: 4px; }
.ts-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 8px 0 14px; }
@media (min-width: 520px) { .ts-grid { grid-template-columns: 1fr 1fr; } }

/* --- Dashboard / poules --- */
.progress { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; margin: 6px 0 12px; }
.progress__bar { display: block; height: 100%; max-width: 100%; background: linear-gradient(90deg, var(--rose-400), var(--rose-600)); transition: width 0.3s ease; }
.empty { padding: 18px; border-radius: var(--radius-sm); color: var(--text-muted); text-align: center; }
.poul-row { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: var(--radius-sm); transition: background 0.2s ease; }
.poul-row:hover { background: rgba(255, 255, 255, 0.06); }
.poul-row__name { font-family: var(--font-display); font-weight: 700; }
.poul-row__meta { font-size: 0.8rem; color: var(--text-muted); }
.hero__actions--start { margin-top: 8px; }

/* --- Ranglijst-uitbreiding --- */
.board__break { display: block; font-weight: 500; color: var(--text-muted); font-size: 0.68rem; margin-top: 2px; }
.board__row--me { background: rgba(236, 70, 102, 0.12); }

/* ---------------------------------------------------------------------
   Eerstvolgende-wedstrijd chip (springt naar de wedstrijd op /voorspellen)
   --------------------------------------------------------------------- */
.next-up {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "head    head"
        "teams   teams"
        "meta    cta";
    row-gap: 10px;
    column-gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    border-color: rgba(236, 70, 102, 0.42);
    box-shadow: var(--glass-shadow), 0 0 0 1px rgba(236, 70, 102, 0.18) inset;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.next-up:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(209, 29, 69, 0.32), 0 0 0 1px rgba(236, 70, 102, 0.28) inset;
}
.next-up:active { transform: translateY(0); }

.next-up__head {
    grid-area: head;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.next-up__label {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rose-300);
}
.next-up__phase {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.next-up__teams {
    grid-area: teams;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    min-width: 0;
}
.next-up__teams .team { min-width: 0; }
.next-up__teams .team__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 8.5ch;
}
.next-up__vs {
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.82rem;
}

.next-up__meta {
    grid-area: meta;
    font-size: 0.84rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
}
.next-up__when { color: var(--text); font-weight: 600; }
.next-up__countdown { white-space: nowrap; }

.next-up__cta {
    grid-area: cta;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rose-400), var(--rose-600));
    box-shadow: 0 8px 18px rgba(209, 29, 69, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.next-up__cta .icon { width: 16px; height: 16px; }

/* Subtiele "iemand wacht op je"-pulse op de chip-rand. */
.next-up::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(236, 70, 102, 0.55);
    opacity: 0;
    animation: next-up-pulse 2.6s ease-out infinite;
    pointer-events: none;
}
@keyframes next-up-pulse {
    0%   { opacity: 0.0; transform: scale(1); }
    35%  { opacity: 0.5; transform: scale(1.012); }
    100% { opacity: 0.0; transform: scale(1.03); }
}

/* Het anker-doel licht even op zodat de gebruiker weet waar 'ie landde. */
.match:target {
    animation: match-flash 1.6s ease-out 1;
    box-shadow: 0 0 0 2px rgba(236, 70, 102, 0.45), var(--glass-shadow);
}
@keyframes match-flash {
    0%   { box-shadow: 0 0 0 0 rgba(236, 70, 102, 0.0), var(--glass-shadow); }
    25%  { box-shadow: 0 0 0 6px rgba(236, 70, 102, 0.28), var(--glass-shadow); }
    100% { box-shadow: 0 0 0 2px rgba(236, 70, 102, 0.45), var(--glass-shadow); }
}

@media (prefers-reduced-motion: reduce) {
    .next-up::after { animation: none; }
    .match:target { animation: none; }
}

/* =====================================================================
   App-polish — native-app gevoel, mobile-first
   ===================================================================== */

:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Native-achtig gedrag: geen tap-highlight, geen 300ms-delay, geen
   overscroll-glow, nette tekstselectie. */
html { scroll-behavior: smooth; }
body {
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
    accent-color: var(--rose-500);
}
a, button, select, input, label, .bottomnav__item { touch-action: manipulation; }
.btn, .bottomnav, .topbar, .tag, .pill { user-select: none; -webkit-user-select: none; }

/* Toegankelijke focus-ring voor toetsenbord/AT-gebruikers. */
:focus-visible { outline: 2px solid var(--rose-300); outline-offset: 2px; }
.btn:focus-visible { outline-offset: 3px; }
.field__input:focus { outline: none; border-color: var(--rose-400); box-shadow: 0 0 0 3px rgba(236, 70, 102, 0.25); }

/* Anker-sprongen vrijhouden van de vaste topbar. */
[id] { scroll-margin-top: calc(80px + var(--safe-top)); }

/* --- Topbar: notch-veilig + schaduw bij scrollen --- */
.topbar {
    height: auto;
    min-height: 60px;
    padding-top: calc(6px + var(--safe-top));
    padding-bottom: 6px;
    transition: box-shadow 0.25s ease, background 0.25s ease;
}
.topbar.is-scrolled {
    box-shadow: 0 6px 24px rgba(3, 6, 18, 0.5);
    background: linear-gradient(180deg, rgba(11, 18, 38, 0.85), rgba(11, 18, 38, 0.6));
}
.page { padding-top: calc(64px + var(--safe-top) + var(--gap)); }

/* --- Tap-feedback op aanraakbare panelen --- */
.poul-row, .match, .board__row, .card { transition: transform 0.18s var(--ease-out), background 0.2s ease, box-shadow 0.2s ease; }
.poul-row:active, a.poul-row:active { transform: scale(0.98); }
.match:active { transform: scale(0.99); }
.btn { min-height: 46px; }

/* --- Bottom-nav: actiever en app-achtiger --- */
.bottomnav { transition: box-shadow 0.25s ease; }
.bottomnav__item { transition: color 0.2s ease, background 0.2s ease, transform 0.12s ease; }
.bottomnav__item:active { transform: scale(0.92); }
.bottomnav__item .icon { transition: transform 0.2s var(--ease-out); }
.bottomnav__item.is-active .icon { transform: translateY(-1px) scale(1.06); }

/* --- Mooiere selects (eigen chevron) --- */
select.field__input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a6adc8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

/* --- Score-inputs: duidelijke focus --- */
.score-input:focus { outline: none; border-color: var(--rose-400); box-shadow: 0 0 0 3px rgba(236, 70, 102, 0.25); }

/* --- Flash-meldingen: binnenglijden --- */
.form__notice, .form__alert { animation: slide-down 0.4s var(--ease-out) both; }
.form__notice.is-dismissing, .form__alert.is-dismissing { animation: fade-out 0.35s ease forwards; }

@keyframes slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-out {
    to { opacity: 0; transform: translateY(-6px); height: 0; margin: 0; padding-top: 0; padding-bottom: 0; }
}

/* --- Entrance-reveal (alleen met JS + zonder reduced-motion) ---
   N.B. .card is bewust uitgesloten: die heeft op desktop een pointer-tilt
   die met een blijvende transform-transitie zou conflicteren. */
.reveal-ready .match,
.reveal-ready .poul-row,
.reveal-ready .board,
.reveal-ready .round,
.reveal-ready .empty {
    opacity: 0;
    transform: translateY(14px);
}
.reveal-ready .is-visible {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .poul-row:active, .match:active, .bottomnav__item:active { transform: none; }
    .form__notice, .form__alert { animation: none; }
    .board__delta { animation: none; }
}

/* --- Registratie-hulp: gebruikersnaam-suggesties --- */
.suggest-wrap { position: relative; }
.suggest {
    position: absolute;
    left: 0; right: 0;
    top: calc(100% + 6px);
    z-index: 40;
    margin: 0;
    padding: 6px;
    list-style: none;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, rgba(19, 28, 57, 0.98), rgba(11, 18, 38, 0.98));
    box-shadow: var(--glass-shadow);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    max-height: 244px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.suggest__item {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
}
.suggest__item:hover,
.suggest__item.is-active { background: rgba(236, 70, 102, 0.2); }
.suggest__name { font-family: var(--font-display); font-weight: 600; }
.suggest__meta { font-size: 0.78rem; color: var(--text-muted); }

.field__note { margin: 4px 0 0; font-size: 0.78rem; color: var(--text-muted); }
.form__notice--inline { margin-top: 12px; font-size: 0.85rem; }

/* Inline veld-validatie (bv. e-mailadressen die niet overeenkomen) */
/* display:flex zou anders het [hidden]-attribuut overschrijven. */
.field__error[hidden], .field__ok[hidden] { display: none; }
.field__error { margin: 6px 0 0; font-size: 0.8rem; color: var(--rose-300); display: flex; align-items: center; gap: 6px; }
.field__error::before { content: "!"; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: rgba(236, 70, 102, 0.22); color: #ffd5dd; font-size: 0.7rem; font-weight: 800; flex: none; }
.field__ok { margin: 6px 0 0; font-size: 0.8rem; color: #9ff0c4; display: flex; align-items: center; gap: 6px; }
.field__ok::before { content: "\2713"; flex: none; font-weight: 800; }
.field__input--invalid { border-color: rgba(236, 70, 102, 0.65) !important; box-shadow: 0 0 0 3px rgba(236, 70, 102, 0.18); }
.field__input--valid { border-color: rgba(80, 200, 140, 0.55) !important; }

/* ---------------------------------------------------------------------
   Account-instellingen
   --------------------------------------------------------------------- */
.account-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: var(--radius);
    margin-bottom: var(--gap);
}

.account-summary__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    color: #fff;
    background: linear-gradient(135deg, var(--rose-400), var(--rose-600));
    box-shadow: 0 8px 24px rgba(209, 29, 69, 0.35);
    flex: none;
}

.account-summary__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.account-summary__name { font-family: var(--font-display); font-size: 1.05rem; }
.account-summary__handle { font-size: 0.82rem; color: var(--text-muted); }

.account-form { gap: var(--gap); }
.account-card { gap: 14px; }
.account-card--confirm { border-color: rgba(236, 70, 102, 0.22); }

.account-danger {
    margin-top: calc(var(--gap) + 4px);
    border-color: rgba(236, 70, 102, 0.35);
    background: linear-gradient(180deg, rgba(209, 29, 69, 0.12), rgba(209, 29, 69, 0.05));
    gap: 14px;
}

.account-danger--final { margin-top: var(--gap); }

.account-danger__head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.account-danger__badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #ffd5dd;
    background: rgba(236, 70, 102, 0.25);
    border: 1px solid rgba(236, 70, 102, 0.45);
    flex: none;
}

.account-danger__list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.account-steps {
    list-style: none;
    margin: 0 0 var(--gap);
    padding: 14px 16px;
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.account-steps__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
}

.account-steps__item span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.account-steps__item--done span {
    background: rgba(80, 200, 140, 0.18);
    border-color: rgba(80, 200, 140, 0.45);
    color: #9ff0c4;
}

.account-steps__item--active {
    color: var(--text);
    font-weight: 600;
}

.account-steps__item--active span {
    background: linear-gradient(135deg, var(--rose-400), var(--rose-600));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 18px rgba(209, 29, 69, 0.35);
}

.account-delete-form { gap: 14px; }

.btn--danger {
    color: #fff;
    background: linear-gradient(135deg, #ff6f8d 0%, var(--rose-600) 55%, #a81235 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 24px rgba(209, 29, 69, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn--danger:hover {
    box-shadow: 0 14px 30px rgba(209, 29, 69, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
