/* EUROVISION 2026 LIVE — sparkles, sequins, snark.
   Self-contained styles. Mobile-first-ish. */

:root {
    --esc-bg: #08051f;
    --esc-bg-soft: #120a36;
    --esc-ink: #fdf6ff;
    --esc-ink-dim: rgba(253, 246, 255, 0.72);
    --esc-pink: #ff3ea5;
    --esc-magenta: #c026d3;
    --esc-violet: #7c3aed;
    --esc-cyan: #22d3ee;
    --esc-yellow: #facc15;
    --esc-gold: #f4d03f;
    --esc-coral: #ff6b6b;
    --esc-mint: #34d399;

    --esc-gradient-hot: linear-gradient(135deg, #ff3ea5 0%, #c026d3 50%, #7c3aed 100%);
    --esc-gradient-cool: linear-gradient(135deg, #22d3ee 0%, #7c3aed 100%);
    --esc-gradient-gold: linear-gradient(135deg, #fff4a3 0%, #facc15 40%, #ff8a00 100%);
    --esc-gradient-flag: linear-gradient(90deg, #ff3ea5, #facc15, #22d3ee, #7c3aed);

    --esc-font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --esc-display: 'Segoe UI Black', 'Trebuchet MS', system-ui, sans-serif;

    --esc-radius: 14px;
    --esc-shadow: 0 8px 24px rgba(124, 58, 237, 0.25);
}

* { box-sizing: border-box; }

html {
    margin: 0;
    padding: 0;
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
    font-family: var(--esc-font);
    color: var(--esc-ink);
    background:
        radial-gradient(circle at 15% 10%, rgba(255, 62, 165, 0.35) 0%, transparent 45%),
        radial-gradient(circle at 85% 5%, rgba(34, 211, 238, 0.30) 0%, transparent 40%),
        radial-gradient(circle at 50% 90%, rgba(192, 38, 211, 0.30) 0%, transparent 45%),
        var(--esc-bg);
    background-attachment: fixed;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: clip;
    line-height: 1.45;
}

/* ============================================================
   STAGE LIGHTS / SPARKLES
   ============================================================ */

.esc-stage-lights {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.esc-spotlight {
    position: absolute;
    width: 65vmax;
    height: 65vmax;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    mix-blend-mode: screen;
    animation: esc-drift 18s ease-in-out infinite;
}
.esc-spotlight-1 {
    background: radial-gradient(circle, rgba(255, 62, 165, 0.8), transparent 60%);
    top: -25vmax; left: -20vmax;
    animation-delay: -2s;
}
.esc-spotlight-2 {
    background: radial-gradient(circle, rgba(34, 211, 238, 0.7), transparent 60%);
    top: -10vmax; right: -25vmax;
    animation-delay: -8s;
}
.esc-spotlight-3 {
    background: radial-gradient(circle, rgba(250, 204, 21, 0.55), transparent 60%);
    bottom: -30vmax; left: 20%;
    animation-delay: -14s;
}

@keyframes esc-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(8vmax, 5vmax) scale(1.12); }
    66% { transform: translate(-6vmax, 8vmax) scale(0.92); }
}

.esc-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.esc-sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--esc-gold);
    box-shadow: 0 0 12px var(--esc-gold), 0 0 24px rgba(244, 208, 63, 0.6);
    animation: esc-sparkle-pop 2.5s ease-in-out infinite;
    opacity: 0;
}
@keyframes esc-sparkle-pop {
    0%, 100% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.4); opacity: 1; }
}

/* ============================================================
   HEADER
   ============================================================ */

.esc-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    padding-top: max(0.75rem, env(safe-area-inset-top, 0));
    background: rgba(8, 5, 31, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 2px solid transparent;
    border-image: var(--esc-gradient-flag) 1;
}

.esc-back {
    color: var(--esc-cyan);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    transition: background 0.15s ease;
}
.esc-back:hover { background: rgba(34, 211, 238, 0.15); }

.esc-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}
.esc-brand-mark {
    font-size: 1.6rem;
    animation: esc-wobble 4s ease-in-out infinite;
}
.esc-brand-mark:last-child { animation-delay: -2s; }

@keyframes esc-wobble {
    0%, 100% { transform: rotate(-6deg) scale(1); }
    50% { transform: rotate(8deg) scale(1.1); }
}

.esc-title {
    margin: 0;
    font-family: var(--esc-display);
    font-size: clamp(1.05rem, 2.6vw, 1.7rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--esc-gradient-hot);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 14px rgba(255, 62, 165, 0.25);
    white-space: nowrap;
}
.esc-title-year {
    background: var(--esc-gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.esc-title-live {
    background: var(--esc-gradient-cool);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 0.75em;
    padding-left: 0.4em;
}

.esc-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--esc-ink-dim);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
}
.esc-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--esc-yellow);
    box-shadow: 0 0 8px var(--esc-yellow);
    animation: esc-pulse 1.6s ease-in-out infinite;
}
.esc-status[data-state="live"] .esc-status-dot {
    background: var(--esc-mint);
    box-shadow: 0 0 10px var(--esc-mint);
}
.esc-status[data-state="offline"] .esc-status-dot {
    background: var(--esc-coral);
    box-shadow: 0 0 10px var(--esc-coral);
    animation: none;
}
@keyframes esc-pulse {
    0%, 100% { transform: scale(0.85); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* ============================================================
   SNARK BOX (Wogan/Norton-style commentary popups)
   ============================================================ */

.esc-snark {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    max-width: min(360px, 90vw);
    z-index: 60;
    pointer-events: none;
}
.esc-snark-bubble {
    display: block;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(8, 5, 31, 0.92);
    border: 1px solid rgba(250, 204, 21, 0.45);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    color: var(--esc-ink);
    font-size: 0.9rem;
    line-height: 1.35;
    pointer-events: auto;
    animation: esc-bubble-in 0.4s ease-out, esc-bubble-out 0.6s ease-in 6s forwards;
}
.esc-snark-bubble::before {
    content: '🎙️ ';
    margin-right: 0.2rem;
}

/* Variant: bubbles created from live comments */
.esc-snark-bubble--comment {
    border-color: rgba(34, 211, 238, 0.55);
    border-left: 4px solid var(--esc-pink);
    background: rgba(8, 5, 31, 0.94);
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.15s ease;
}
.esc-snark-bubble--comment:hover {
    transform: translateY(-2px);
    border-color: var(--esc-cyan);
}
.esc-snark-bubble--comment::before {
    content: '💬 ';
}
.esc-snark-bubble-author {
    font-weight: 700;
    color: var(--esc-cyan);
    margin-right: 0.3rem;
}
.esc-snark-bubble-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.05rem 0.45rem;
    margin-right: 0.3rem;
    background: rgba(255, 62, 165, 0.2);
    border: 1px solid rgba(255, 62, 165, 0.5);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--esc-ink);
}
.esc-snark-bubble-body { color: var(--esc-ink); }
@keyframes esc-bubble-in {
    from { transform: translateY(20px) scale(0.92); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes esc-bubble-out {
    to { transform: translateY(10px) scale(0.92); opacity: 0; }
}

/* ============================================================
   MAIN
   ============================================================ */

.esc-main {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 4rem;
    display: grid;
    gap: 1.75rem;
}

.esc-intro {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--esc-radius);
    padding: 1.25rem 1.4rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.esc-tagline {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 500;
}
.esc-tagline em {
    color: var(--esc-yellow);
    font-style: normal;
    font-weight: 700;
}
.esc-meta {
    margin: 0;
    color: var(--esc-ink-dim);
    font-size: 0.9rem;
}
.esc-rules {
    margin-top: 0.75rem;
    color: var(--esc-ink-dim);
    font-size: 0.88rem;
}
.esc-rules summary {
    cursor: pointer;
    color: var(--esc-cyan);
    font-weight: 600;
}
.esc-rules ul {
    margin: 0.6rem 0 0;
    padding-left: 1.1rem;
}
.esc-rules li { margin: 0.25rem 0; }

/* ============================================================
   SECTION SHELLS
   ============================================================ */

.esc-section {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--esc-radius);
    padding: 1.25rem 1.25rem 1.5rem;
    box-shadow: var(--esc-shadow);
    position: relative;
    overflow: hidden;
}
.esc-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--esc-gradient-flag);
    opacity: 0.06;
    pointer-events: none;
}

.esc-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    position: relative;
}
.esc-section-title {
    margin: 0;
    font-family: var(--esc-display);
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.esc-section-sub {
    font-size: 0.82rem;
    color: var(--esc-ink-dim);
}
.esc-scoreboard-meta {
    display: inline-flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.esc-pill {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 62, 165, 0.18);
    color: var(--esc-ink);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 62, 165, 0.4);
}
.esc-pill-muted {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--esc-ink-dim);
}

/* ============================================================
   SCOREBOARD
   ============================================================ */

.esc-leader {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    background: var(--esc-gradient-gold);
    color: #1a0a3d;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 8px 30px rgba(250, 204, 21, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: esc-leader-glow 2.4s ease-in-out infinite;
}
.esc-leader[hidden] { display: none; }
@keyframes esc-leader-glow {
    0%, 100% { box-shadow: 0 8px 30px rgba(250, 204, 21, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
    50% { box-shadow: 0 8px 40px rgba(255, 138, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
}
.esc-leader-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.8;
}
.esc-leader-flag { font-size: 2rem; line-height: 1; }
.esc-leader-text { line-height: 1.2; }
.esc-leader-text strong { display: block; font-size: 1.05rem; }
.esc-leader-text span { font-size: 0.85rem; font-weight: 500; opacity: 0.85; }
.esc-leader-points {
    font-family: var(--esc-display);
    font-size: 1.4rem;
    background: rgba(26, 10, 61, 0.88);
    color: var(--esc-gold);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
}

.esc-scoreboard {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
}
.esc-scoreboard-empty {
    color: var(--esc-ink-dim);
    text-align: center;
    padding: 1rem;
    font-size: 0.92rem;
}
.esc-score-row {
    display: grid;
    grid-template-columns: 2.2rem 1.8rem 1fr auto;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    transition: transform 0.25s ease, background 0.25s ease;
    position: relative;
}
.esc-score-row.is-rising {
    background: rgba(52, 211, 153, 0.18);
    border-color: rgba(52, 211, 153, 0.5);
}
.esc-score-row.is-falling {
    background: rgba(255, 107, 107, 0.12);
    border-color: rgba(255, 107, 107, 0.35);
}
.esc-score-row.is-you {
    border-color: var(--esc-cyan);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.4);
}
.esc-score-rank {
    font-family: var(--esc-display);
    font-size: 1rem;
    color: var(--esc-ink-dim);
    text-align: right;
}
.esc-score-flag { font-size: 1.5rem; line-height: 1; }
.esc-score-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.esc-score-name small {
    display: block;
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--esc-ink-dim);
}
.esc-score-points {
    font-family: var(--esc-display);
    font-size: 1.1rem;
    color: var(--esc-gold);
    text-align: right;
    min-width: 3.5rem;
}

/* ============================================================
   VOTING — CHIPS & ACTS
   ============================================================ */

.esc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.85rem;
    border-radius: 12px;
    background: rgba(8, 5, 31, 0.6);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    margin-bottom: 0.6rem;
}
.esc-chip {
    --chip-bg: var(--esc-gradient-cool);
    appearance: none;
    border: none;
    color: #fff;
    font-family: var(--esc-display);
    font-size: 1.1rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: var(--chip-bg);
    cursor: grab;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: transform 0.12s ease, opacity 0.2s ease, filter 0.2s ease;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-width: 3rem;
    min-height: 2.75rem;
}
.esc-chip[data-points="12"] { --chip-bg: var(--esc-gradient-gold); color: #1a0a3d; }
.esc-chip[data-points="10"] { --chip-bg: var(--esc-gradient-hot); }
.esc-chip[data-points="8"]  { --chip-bg: linear-gradient(135deg, #ff6b6b, #c026d3); }
.esc-chip[data-points="7"]  { --chip-bg: linear-gradient(135deg, #c026d3, #7c3aed); }
.esc-chip[data-points="6"]  { --chip-bg: linear-gradient(135deg, #7c3aed, #22d3ee); }
.esc-chip[data-points="5"]  { --chip-bg: linear-gradient(135deg, #22d3ee, #34d399); }
.esc-chip[data-points="4"]  { --chip-bg: linear-gradient(135deg, #34d399, #facc15); color: #1a0a3d; }
.esc-chip[data-points="3"]  { --chip-bg: rgba(255, 255, 255, 0.15); }
.esc-chip[data-points="2"]  { --chip-bg: rgba(255, 255, 255, 0.12); }
.esc-chip[data-points="1"]  { --chip-bg: rgba(255, 255, 255, 0.1); }

.esc-chip:hover { transform: translateY(-2px) scale(1.05); }
.esc-chip:active,
.esc-chip.is-dragging { cursor: grabbing; transform: scale(1.1); }
.esc-chip.is-placed { opacity: 0.3; filter: grayscale(0.6); cursor: not-allowed; transform: none; }
.esc-chip.is-selected {
    outline: 3px solid var(--esc-cyan);
    outline-offset: 2px;
    transform: scale(1.12);
}

.esc-chip-hint {
    margin: 0 0 1rem;
    color: var(--esc-ink-dim);
    font-size: 0.82rem;
    text-align: center;
}

.esc-desktop-only { display: inline; }
.esc-mobile-only { display: none; }
@media (hover: none) and (pointer: coarse) {
    .esc-desktop-only { display: none; }
    .esc-mobile-only { display: inline; }
}

.esc-acts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
    counter-reset: act;
}

.esc-act {
    display: block;
    padding: 0.7rem 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease, box-shadow 0.25s ease;
    counter-increment: act;
    position: relative;
}
.esc-act:hover { background: rgba(255, 255, 255, 0.07); }
.esc-act.is-drop-target { border-color: var(--esc-cyan); background: rgba(34, 211, 238, 0.1); }
.esc-act.is-selectable {
    cursor: pointer;
    border-color: rgba(34, 211, 238, 0.4);
}
.esc-act.is-selectable:hover { transform: translateY(-1px); }
.esc-act.has-points { border-color: var(--esc-pink); }
.esc-act.is-leader { border-color: var(--esc-gold); box-shadow: 0 0 16px rgba(244, 208, 63, 0.3); }
.esc-act.is-host {
    background: linear-gradient(90deg, rgba(255, 62, 165, 0.18), rgba(255, 255, 255, 0.04));
}
.esc-act.is-highlighted {
    animation: esc-act-flash 1.6s ease-out;
}
@keyframes esc-act-flash {
    0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.7); }
    40% { box-shadow: 0 0 0 8px rgba(34, 211, 238, 0.0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.esc-act-row {
    display: grid;
    grid-template-columns: 2.6rem 2.4rem 1fr 1.5rem 4rem;
    align-items: center;
    gap: 0.75rem;
}

.esc-act-running {
    font-family: var(--esc-display);
    font-size: 1.1rem;
    color: var(--esc-ink-dim);
    text-align: center;
}
.esc-act-running::before { content: counter(act); }

.esc-act-flag {
    font-size: 1.9rem;
    line-height: 1;
    text-align: center;
}

.esc-act-info {
    line-height: 1.25;
    min-width: 0;
    overflow: hidden;
}
.esc-act-country {
    font-weight: 700;
    font-size: 0.98rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.esc-act-host-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.05rem 0.4rem;
    background: var(--esc-gradient-hot);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    border-radius: 999px;
    vertical-align: middle;
}
.esc-act-song {
    font-size: 0.82rem;
    color: var(--esc-ink-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-word;
}
.esc-act-song strong { color: var(--esc-ink); font-weight: 600; }

.esc-act-more {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(8, 5, 31, 0.5);
    color: var(--esc-ink-dim);
    width: 1.5rem;
    height: 1.5rem;
    min-width: 1.5rem;
    min-height: 1.5rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.7rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
    padding: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.esc-act-more:hover { color: var(--esc-ink); border-color: var(--esc-cyan); transform: translateY(-1px); }
.esc-act-more[aria-expanded="true"] {
    background: var(--esc-gradient-cool);
    color: #fff;
    border-color: transparent;
}

.esc-act-details {
    margin-top: 0.65rem;
    padding: 0.75rem 0.85rem 0.6rem;
    background: rgba(8, 5, 31, 0.55);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    color: var(--esc-ink);
    font-size: 0.88rem;
    line-height: 1.45;
    animation: esc-fade-in 0.25s ease-out;
}
.esc-act-details[hidden] { display: none; }
.esc-act-fact {
    margin: 0 0 0.5rem;
    color: var(--esc-ink);
}
.esc-act-fact::before {
    content: '✨ ';
    color: var(--esc-yellow);
}
.esc-act-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.esc-act-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    color: var(--esc-cyan);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.esc-act-link:hover {
    background: rgba(34, 211, 238, 0.15);
    color: #fff;
    border-color: var(--esc-cyan);
}

.esc-act-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
}
.esc-act-points-chip {
    appearance: none;
    border: none;
    background: var(--esc-gradient-hot);
    color: #fff;
    font-family: var(--esc-display);
    font-size: 1.2rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(192, 38, 211, 0.45);
    animation: esc-chip-pop 0.35s ease-out;
}
.esc-act-points-chip[data-points="12"] { background: var(--esc-gradient-gold); color: #1a0a3d; }
.esc-act-points-empty {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.78rem;
    font-style: italic;
}
@keyframes esc-chip-pop {
    0% { transform: scale(0.4) rotate(-12deg); opacity: 0; }
    60% { transform: scale(1.2) rotate(6deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* ============================================================
   COMMENTS
   ============================================================ */

.esc-comment-form {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.esc-input,
.esc-textarea {
    width: 100%;
    background: rgba(8, 5, 31, 0.6);
    color: var(--esc-ink);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    font-family: var(--esc-font);
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    resize: vertical;
}
.esc-input:focus,
.esc-textarea:focus {
    outline: none;
    border-color: var(--esc-cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}
.esc-textarea { min-height: 4.5rem; }
.esc-comment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.esc-comment-row-tag {
    justify-content: flex-start;
    flex-wrap: wrap;
}
.esc-counter {
    font-size: 0.75rem;
    color: var(--esc-ink-dim);
}
.esc-comment-tag-label {
    font-size: 0.78rem;
    color: var(--esc-ink-dim);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
}
.esc-select {
    flex: 1 1 240px;
    background: rgba(8, 5, 31, 0.6);
    color: var(--esc-ink);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    font-family: var(--esc-font);
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--esc-cyan) 50%),
                      linear-gradient(135deg, var(--esc-cyan) 50%, transparent 50%);
    background-position: calc(100% - 18px) center, calc(100% - 12px) center;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2rem;
}
.esc-select:focus {
    outline: none;
    border-color: var(--esc-cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}
.esc-select option {
    background: #08051f;
    color: var(--esc-ink);
}

.esc-btn {
    appearance: none;
    border: none;
    cursor: pointer;
    font-family: var(--esc-display);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    transition: transform 0.12s ease, filter 0.12s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.esc-btn-primary {
    background: var(--esc-gradient-hot);
    color: #fff;
    box-shadow: 0 4px 16px rgba(192, 38, 211, 0.4);
}
.esc-btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.esc-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.esc-btn-ghost {
    background: transparent;
    color: var(--esc-ink-dim);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.esc-btn-ghost:hover { color: var(--esc-ink); background: rgba(255, 255, 255, 0.05); }

.esc-comments {
    display: grid;
    gap: 0.6rem;
}
.esc-comments-loading,
.esc-comments-empty {
    color: var(--esc-ink-dim);
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
}

.esc-comment {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    position: relative;
    animation: esc-fade-in 0.4s ease-out;
}
@keyframes esc-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.esc-comment-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}
.esc-comment-author {
    font-weight: 700;
    font-size: 0.9rem;
    background: var(--esc-gradient-cool);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.esc-comment-time {
    font-size: 0.72rem;
    color: var(--esc-ink-dim);
    margin-left: auto;
}
.esc-comment-tag {
    appearance: none;
    border: 1px solid rgba(255, 62, 165, 0.45);
    background: rgba(255, 62, 165, 0.12);
    color: var(--esc-ink);
    cursor: pointer;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: background 0.15s ease, transform 0.12s ease, border-color 0.15s ease;
}
.esc-comment-tag:hover {
    background: rgba(255, 62, 165, 0.25);
    transform: translateY(-1px);
    border-color: var(--esc-pink);
}
.esc-comment-tag-flag {
    font-size: 0.95rem;
    line-height: 1;
}
.esc-comment-body {
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.esc-reactions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
}
.esc-reaction {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: var(--esc-ink);
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1.2;
}
.esc-reaction:hover { transform: translateY(-1px); }
.esc-reaction.is-mine {
    background: rgba(255, 62, 165, 0.25);
    border-color: var(--esc-pink);
}
.esc-reaction-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--esc-ink-dim);
}
.esc-reaction.is-mine .esc-reaction-count { color: var(--esc-ink); }

.esc-reaction-add {
    appearance: none;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    background: transparent;
    color: var(--esc-ink-dim);
    border-radius: 999px;
    font-size: 0.85rem;
    padding: 0.15rem 0.55rem;
    cursor: pointer;
    transition: color 0.12s ease, border-color 0.12s ease;
    position: relative;
}
.esc-reaction-add:hover {
    color: var(--esc-ink);
    border-color: var(--esc-cyan);
}

.esc-reaction-picker {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    z-index: 5;
    display: flex;
    gap: 0.25rem;
    padding: 0.35rem 0.5rem;
    background: rgba(8, 5, 31, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    animation: esc-fade-in 0.18s ease-out;
}
.esc-reaction-picker button {
    appearance: none;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0.2rem 0.35rem;
    font-size: 1.15rem;
    border-radius: 999px;
    transition: transform 0.12s ease, background 0.12s ease;
}
.esc-reaction-picker button:hover {
    transform: scale(1.25);
    background: rgba(255, 255, 255, 0.1);
}

/* ============================================================
   FOOTER
   ============================================================ */

.esc-footer {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.25rem 1.25rem 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    color: var(--esc-ink-dim);
    font-size: 0.82rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.esc-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
}
.esc-footer a { color: var(--esc-cyan); text-decoration: none; font-weight: 600; }
.esc-footer a:hover { text-decoration: underline; }

/* ============================================================
   RESPONSIVE — tablets & phones
   ============================================================ */

@media (max-width: 720px) {
    .esc-header {
        padding: 0.6rem 0.75rem;
        padding-top: max(0.6rem, env(safe-area-inset-top, 0));
        gap: 0.5rem;
    }
    .esc-brand-mark { font-size: 1.2rem; }
    .esc-title {
        font-size: clamp(0.82rem, 3.8vw, 1rem);
        letter-spacing: 0.03em;
        white-space: normal;
        text-align: center;
        line-height: 1.2;
    }
    .esc-status {
        font-size: 0.65rem;
        padding: 0.3rem 0.5rem;
        max-width: 5.5rem;
    }
    .esc-status-text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .esc-main {
        padding: 1rem 0.75rem calc(6.5rem + env(safe-area-inset-bottom, 0));
        gap: 1.25rem;
    }
    .esc-intro { padding: 1rem 1rem; }
    .esc-section { padding: 1rem 0.85rem 1.25rem; }
    .esc-tagline { font-size: 0.95rem; }
    .esc-meta { font-size: 0.85rem; }

    .esc-section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .esc-section-title { font-size: 1rem; }
    .esc-scoreboard-meta { width: 100%; }
    .esc-scoreboard-section .esc-section-header {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
    .esc-scoreboard-section .esc-section-title {
        flex: 1 1 auto;
        min-width: 0;
    }

    .esc-leader {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto auto;
        gap: 0.5rem 0.65rem;
        padding: 0.75rem 0.85rem;
    }
    .esc-leader-label {
        grid-column: 1 / -1;
        grid-row: 1;
    }
    .esc-leader-flag {
        grid-column: 1;
        grid-row: 2;
        font-size: 1.75rem;
    }
    .esc-leader-text {
        grid-column: 2;
        grid-row: 2;
        min-width: 0;
    }
    .esc-leader-text strong {
        font-size: 0.98rem;
        overflow-wrap: anywhere;
    }
    .esc-leader-text span {
        display: block;
        font-size: 0.78rem;
        overflow-wrap: anywhere;
        line-height: 1.3;
    }
    .esc-leader-points {
        grid-column: 1 / -1;
        grid-row: 3;
        text-align: center;
        font-size: 1.25rem;
        padding: 0.4rem 0.65rem;
    }

    .esc-score-row {
        grid-template-columns: 1.6rem 1.6rem minmax(0, 1fr) auto;
        gap: 0.45rem;
        padding: 0.5rem 0.6rem;
        align-items: start;
    }
    .esc-score-name {
        font-size: 0.88rem;
        white-space: normal;
        line-height: 1.25;
    }
    .esc-score-name small {
        white-space: normal;
        line-height: 1.3;
        margin-top: 0.15rem;
    }
    .esc-score-points {
        font-size: 1rem;
        align-self: center;
        min-width: 2.75rem;
    }

    /* Voting chips: centred, thumb-friendly */
    .esc-chips {
        justify-content: center;
        gap: 0.45rem;
        padding: 0.75rem 0.5rem;
    }
    .esc-chip {
        font-size: 0.95rem;
        padding: 0.45rem 0.75rem;
        min-width: 2.75rem;
        min-height: 2.75rem;
    }

    /* Act cards: two-row grid so nothing squishes horizontally */
    .esc-act { padding: 0.65rem 0.7rem; }
    .esc-act-row {
        display: grid;
        grid-template-columns: 1.5rem 2rem minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        gap: 0.35rem 0.5rem;
        align-items: start;
    }
    .esc-act-running {
        grid-column: 1;
        grid-row: 1 / 3;
        align-self: center;
        font-size: 0.95rem;
    }
    .esc-act-flag {
        grid-column: 2;
        grid-row: 1 / 3;
        align-self: center;
        font-size: 1.65rem;
    }
    .esc-act-info {
        grid-column: 3 / 5;
        grid-row: 1;
    }
    .esc-act-country {
        font-size: 0.92rem;
        white-space: normal;
        line-height: 1.2;
    }
    .esc-act-song {
        font-size: 0.78rem;
        white-space: normal;
        line-height: 1.35;
        margin-top: 0.15rem;
    }
    .esc-act-more {
        grid-column: 3;
        grid-row: 2;
        justify-self: start;
        width: 1.5rem;
        height: 1.5rem;
        min-width: 1.5rem;
        min-height: 1.5rem;
        font-size: 0.68rem;
    }
    .esc-act-slot {
        grid-column: 4;
        grid-row: 2;
        justify-self: end;
        min-height: 2.75rem;
    }
    .esc-act-points-chip {
        font-size: 1rem;
        padding: 0.45rem 0.85rem;
        min-height: 2.75rem;
        min-width: 2.75rem;
    }
    .esc-act-details {
        font-size: 0.84rem;
        padding: 0.65rem 0.75rem;
    }
    .esc-act-links {
        flex-direction: column;
        align-items: stretch;
    }
    .esc-act-link {
        justify-content: center;
        padding: 0.55rem 0.75rem;
        font-size: 0.8rem;
    }

    /* Comments */
    .esc-input,
    .esc-textarea,
    .esc-select {
        font-size: 16px; /* prevents iOS zoom-on-focus */
    }
    .esc-comment-row-tag {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
    }
    .esc-select {
        flex: none;
        width: 100%;
        max-width: none;
    }
    .esc-comment-row:not(.esc-comment-row-tag) {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }
    .esc-btn-primary {
        width: 100%;
        min-height: 2.75rem;
        padding: 0.65rem 1rem;
    }
    .esc-btn-ghost {
        width: 100%;
        min-height: 2.75rem;
    }
    .esc-comment-head {
        align-items: flex-start;
    }
    .esc-comment-time {
        margin-left: 0;
        width: 100%;
    }
    .esc-reaction {
        min-height: 2.25rem;
        padding: 0.25rem 0.65rem;
    }
    .esc-reaction-add {
        min-height: 2.25rem;
        padding: 0.25rem 0.65rem;
    }
    .esc-reaction-picker {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        flex-wrap: wrap;
        justify-content: center;
        max-width: calc(100vw - 1.5rem);
        border-radius: 12px;
        padding: 0.45rem 0.55rem;
        z-index: 70;
    }
    .esc-reaction-picker button {
        min-width: 2.5rem;
        min-height: 2.5rem;
        font-size: 1.25rem;
    }

    /* Snark / comment toasts — full width, above home indicator */
    .esc-snark {
        left: max(0.5rem, env(safe-area-inset-left, 0));
        right: max(0.5rem, env(safe-area-inset-right, 0));
        max-width: none;
        bottom: calc(0.5rem + env(safe-area-inset-bottom, 0));
        max-height: min(42vh, 280px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    .esc-snark-bubble {
        font-size: 0.85rem;
        padding: 0.65rem 0.85rem;
        overflow-wrap: anywhere;
    }

    .esc-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0));
        font-size: 0.8rem;
    }
    .esc-footer-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .esc-footer a {
        word-break: break-word;
    }
}

/* Very narrow phones (e.g. iPhone SE, small Android) */
@media (max-width: 380px) {
    .esc-header {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }
    .esc-back {
        grid-column: 1;
        grid-row: 1;
        padding: 0.35rem 0.5rem;
        font-size: 0.82rem;
    }
    .esc-status {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        max-width: none;
    }
    .esc-brand {
        grid-column: 1 / -1;
        grid-row: 2;
        gap: 0.35rem;
    }
    .esc-brand-mark:last-child {
        display: none; /* one disco ball is enough on tiny screens */
    }
    .esc-title {
        font-size: 0.88rem;
    }

    .esc-chips { gap: 0.35rem; }
    .esc-chip {
        min-width: 2.5rem;
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }

    .esc-act-row {
        grid-template-columns: 1.25rem 1.75rem minmax(0, 1fr) auto;
    }
    .esc-act-flag { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce) {
    .esc-spotlight,
    .esc-sparkle,
    .esc-brand-mark,
    .esc-leader,
    .esc-status-dot {
        animation: none !important;
    }
}
