/**
 * PentathlonMag Mobile - Native App Style CSS
 * Inspired by IBU Biathlon App
 */

/* === ROOT VARIABLES === */
:root {
    --pm-primary: #0ea5e9;
    --pm-primary-dark: #0284c7;
    --pm-secondary: #64748b;
    --pm-accent: #f59e0b;
    --pm-success: #22c55e;
    --pm-error: #ef4444;
    --pm-live: #ef4444;
    
    --pm-bg-dark: #0f172a;
    --pm-bg-medium: #1e293b;
    --pm-bg-light: #f1f5f9;
    --pm-bg-card: #ffffff;
    
    --pm-text-primary: #0f172a;
    --pm-text-secondary: #64748b;
    --pm-text-light: #ffffff;
    --pm-text-muted: #94a3b8;
    --pm-border: #e2e8f0;
    --pm-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --pm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    --pm-radius: 12px;
    --pm-radius-lg: 20px;
    --pm-radius-full: 9999px;
    
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --bottom-nav-height: 70px;
}

/* === DARK THEME VARIABLE OVERRIDES (data-theme="dark") === */
[data-theme="dark"] {
    --pm-bg-light:       var(--ink, #0b0f1a);
    --pm-bg-card:        var(--ink2, #111827);
    --pm-bg-medium:      var(--ink3, #1a2236);
    --pm-text-primary:   var(--white, #EEF4FF);
    --pm-text-secondary: var(--muted, #5a7098);
    --pm-text-muted:     var(--muted2, #3a4f6e);
    --pm-border:         var(--rule, #1e2d45);
    --pm-shadow:         0 4px 6px -1px rgba(0,0,0,0.5);
    --pm-shadow-lg:      0 10px 15px -3px rgba(0,0,0,0.5);
}

/* Override DaisyUI body background — specificity (0,1,1) beats DaisyUI's (0,1,1) since mobile.css loads after CDN */
html[data-theme="dark"] body {
    background-color: var(--ink, #0b0f1a);
    color: var(--white, #EEF4FF);
}
html[data-theme="light"] body {
    background-color: var(--ink, #F3F4F6);
    color: var(--white, #111827);
}

/* === IBU DARK THEME === */
body.ibu-theme {
    --pm-bg-light: #000000; /* Main background */
    --pm-bg-card: #151515;  /* Card background */
    --pm-text-primary: #ffffff;
    --pm-text-secondary: #a3a3a3;
    --pm-text-muted: #737373;
    --pm-border: #262626;
    --pm-shadow: none;
    
    background-color: #000000;
    color: #ffffff;
}

body.ibu-theme .tab-bar {
    background: #000000;
    border-bottom: 1px solid #262626;
}

body.ibu-theme .tab-item {
    color: #737373;
}

body.ibu-theme .tab-item.active {
    color: #38bdf8; /* Light blue accent */
    border-bottom-color: #38bdf8;
    position: relative;
}

/* IBU Tab Indicator style (Glow) */
body.ibu-theme .tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #38bdf8;
    box-shadow: 0 -2px 10px rgba(56, 189, 248, 0.5);
}

body.ibu-theme .mobile-card {
    border: 1px solid #262626;
    background: linear-gradient(180deg, #1a1a1a 0%, #151515 100%);
}

/* IBU Progress Bars */
body.ibu-theme .stat-bar {
    background: #262626;
    height: 6px;
}

body.ibu-theme .stat-bar-fill {
    background: linear-gradient(90deg, #38bdf8 0%, #a3e635 100%); /* Blue to Lime gradient */
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

/* IBU Badges */
body.ibu-theme .badge-icon {
    background: transparent;
    border: 2px solid #38bdf8;
    color: #38bdf8;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
}

body.ibu-theme .badge-name {
    color: #dedede;
    margin-top: 8px;
}

/* === RESET & BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Utility: hidden (used by notification modal & other components) */
.hidden { display: none !important; }

html {
    --font-display: 'Bebas Neue', sans-serif;
    --btn-radius: 10px;
    --btn-font-size: 13px;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--ink, var(--pm-bg-dark));
    color: var(--white, var(--pm-text-light));
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
}

/* === MOBILE HEADER === */
.mobile-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--pm-bg-dark);
    color: var(--pm-text-light);
    padding: 16px 20px;
    padding-top: max(16px, env(safe-area-inset-top));
}

.mobile-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-header-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.mobile-header-subtitle {
    font-size: 0.75rem;
    color: var(--pm-text-muted);
    margin-top: 2px;
}

.mobile-header-actions {
    display: flex;
    gap: 12px;
}

.mobile-header-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--pm-radius);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--pm-text-light);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.mobile-header-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.2);
}

/* === TAB BAR === */
.tab-bar {
    display: flex;
    background: var(--pm-bg-dark);
    padding: 0 16px;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab-bar::-webkit-scrollbar {
    display: none;
}

.tab-item {
    flex: 1;
    min-width: max-content;
    padding: 14px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pm-text-muted);
    text-decoration: none;
    text-align: center;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.tab-item.active {
    color: var(--pm-primary);
    border-bottom-color: var(--pm-primary);
}

.tab-item:active {
    opacity: 0.7;
}

/* === BOTTOM NAVIGATION === */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
    background: var(--pm-bg-card);
    border-top: 1px solid var(--pm-border);
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding-top: 8px;
    padding-bottom: var(--safe-area-bottom);
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--pm-text-secondary);
    font-size: 0.65rem;
    font-weight: 600;
    transition: color 0.2s, background 0.2s;
    position: relative;
}

.bottom-nav-item i {
    font-size: 1.4rem;
    transition: transform 0.2s;
}

.bottom-nav-item.active {
    color: var(--pm-primary);
}

.bottom-nav-item.active i {
    transform: scale(1.1);
}

.bottom-nav-item:active {
    transform: scale(0.95);
}

.bottom-nav-badge {
    position: absolute;
    top: 2px;
    right: 8px;
    min-width: 18px;
    height: 18px;
    background: var(--pm-live);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: var(--pm-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* === CARDS === */
.mobile-card {
    background: var(--pm-bg-card);
    border-radius: var(--pm-radius-lg);
    margin: 16px;
    padding: 20px;
    box-shadow: var(--pm-shadow);
}

.mobile-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.mobile-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--pm-radius);
    background: var(--pm-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pm-primary);
    font-size: 1.1rem;
}

.mobile-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pm-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* === ATHLETE RESULT ROW === */
.athlete-row {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--pm-border);
    gap: 12px;
}

.athlete-row:last-child {
    border-bottom: none;
}

.athlete-rank {
    width: 32px;
    height: 32px;
    border-radius: var(--pm-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.athlete-rank.gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: white; }
.athlete-rank.silver { background: linear-gradient(135deg, #cbd5e1, #94a3b8); color: white; }
.athlete-rank.bronze { background: linear-gradient(135deg, #d97706, #b45309); color: white; }
.athlete-rank.other { background: var(--pm-bg-light); color: var(--pm-text-secondary); }

.athlete-photo {
    width: 50px;
    height: 50px;
    border-radius: var(--pm-radius-full);
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--pm-border);
}

.athlete-info {
    flex: 1;
    min-width: 0;
}

.athlete-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--pm-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.athlete-name span {
    font-weight: 400;
    color: var(--pm-text-secondary);
}

.athlete-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--pm-text-secondary);
}

.athlete-meta .bib {
    font-weight: 600;
    color: var(--pm-text-muted);
}

.athlete-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
}

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

.athlete-time {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--pm-text-primary);
    font-variant-numeric: tabular-nums;
}

.athlete-gap {
    font-size: 0.75rem;
    color: var(--pm-error);
    font-weight: 600;
}

/* === SHOOTING INDICATORS === */
.shooting-indicators {
    display: flex;
    gap: 4px;
}

.shot {
    width: 20px;
    height: 20px;
    border-radius: var(--pm-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
}

.shot.hit { background: var(--pm-bg-dark); color: white; }
.shot.miss { background: var(--pm-error); color: white; }

/* === LIVE BADGE === */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--pm-live);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--pm-radius-full);
    text-transform: uppercase;
}

.live-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: live-pulse 1.5s infinite;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* === EVENT CARD === */
.event-card {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--pm-bg-card);
    border-radius: var(--pm-radius);
    margin-bottom: 12px;
    box-shadow: var(--pm-shadow);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s, color 0.2s, opacity 0.2s;
}

.event-card:active {
    transform: scale(0.98);
}

.event-date {
    text-align: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.event-date-day {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--pm-primary);
    line-height: 1;
}

.event-date-month {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--pm-text-muted);
    text-transform: uppercase;
}

.event-info {
    flex: 1;
    min-width: 0;
}

.event-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--pm-text-primary);
}

.event-location {
    font-size: 0.8rem;
    color: var(--pm-text-secondary);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.event-arrow {
    color: var(--pm-text-muted);
    font-size: 1.2rem;
}

/* === SECTION HEADER === */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 12px;
}

.section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pm-text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-count {
    width: 24px;
    height: 24px;
    background: var(--pm-bg-light);
    border-radius: var(--pm-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--pm-text-secondary);
}

.section-action {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pm-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* === HERO SLIDER === */
.hero-slider {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.hero-slide {
    position: relative;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.hero-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

/* === STATS BARS === */
.stat-item {
    margin-bottom: 20px;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.stat-label {
    font-weight: 600;
    color: var(--pm-text-primary);
}

.stat-value {
    font-weight: 700;
    color: var(--pm-text-secondary);
}

.stat-bar {
    height: 8px;
    background: var(--pm-bg-light);
    border-radius: var(--pm-radius-full);
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    border-radius: var(--pm-radius-full);
    background: linear-gradient(90deg, var(--pm-primary) 0%, var(--pm-accent) 100%);
    transition: width 0.5s ease-out;
}

/* === BADGES GRID === */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.badge-icon {
    width: 60px;
    height: 60px;
    background: var(--pm-bg-light);
    border-radius: var(--pm-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 1.5rem;
    color: var(--pm-primary);
}

.badge-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--pm-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* === PROFILE HEADER === */
.profile-header {
    background: linear-gradient(135deg, var(--pm-bg-dark) 0%, var(--pm-bg-medium) 100%);
    padding: 24px 20px;
    color: white;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.profile-photo {
    width: 80px;
    height: 80px;
    border-radius: var(--pm-radius-full);
    border: 3px solid rgba(255,255,255,0.3);
    object-fit: cover;
}

.profile-name {
    font-size: 1.4rem;
    font-weight: 800;
}

.profile-name span {
    font-weight: 400;
}

.profile-country {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 0.875rem;
    color: var(--pm-text-muted);
}

.profile-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--pm-primary);
    color: white;
    border: none;
    border-radius: var(--pm-radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 12px;
    cursor: pointer;
}

/* === UTILITIES === */
.px-container {
    padding-left: 20px;
    padding-right: 20px;
}

.py-section {
    padding-top: 16px;
    padding-bottom: 16px;
}

.text-center { text-align: center; }
.text-muted { color: var(--pm-text-muted); }
.font-bold { font-weight: 700; }
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }

/* === ANIMATIONS === */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fade-in 0.3s ease-out;
}

/* === iOS/Android Safe Areas === */
@supports (padding: max(0px)) {
    .bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
    .mobile-header {
        padding-top: max(16px, env(safe-area-inset-top));
    }
}

/* === COMMENTS === */
.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: fade-in 0.3s ease-out;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--pm-bg-light);
    border: 1px solid var(--pm-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    color: var(--pm-text-secondary);
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
}

.comment-bubble {
    background: var(--pm-bg-card);
    border: 1px solid var(--pm-border);
    border-radius: 0 16px 16px 16px;
    padding: 12px 16px;
    color: var(--pm-text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.comment-meta {
    font-size: 0.75rem;
    color: var(--pm-text-muted);
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-author {
    font-weight: 700;
    color: var(--pm-text-primary);
}

.comment-admin {
    font-size: 0.65rem;
    background: var(--pm-primary);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

/* === PREMIUM REDESIGN UTILS === */
@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}
.animate-\[shimmer_2s_infinite\] {
    animation: shimmer 2s infinite;
}
.premium-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}
.premium-glow {
    position: relative;
}
.premium-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--pm-primary), var(--pm-accent), var(--pm-primary));
    z-index: -1;
    filter: blur(10px);
    opacity: 0.5;
    border-radius: inherit;
}

/* ═══════════════════════════════════════════════
   NEW DESIGN SYSTEM — v2 (2026)
   ═══════════════════════════════════════════════ */

/* ── Tab Bar ── */
.pm-tab-bar {
    display: flex;
    border-bottom: 1px solid var(--rule);
    background: var(--ink);
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
    position: sticky;
    top: 54px;
    z-index: 30;
}
.pm-tab-bar::-webkit-scrollbar { display: none; }
.pm-tab {
    flex-shrink: 0;
    padding: 10px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
    transition: color 0.15s, border-color 0.15s;
}
.pm-tab.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

/* ── Hero ── */
.pm-hero {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    display: block;
    text-decoration: none;
}
.pm-hero-img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    display: block;
    border-radius: 0;
    transition: transform 0.4s ease;
}
.pm-hero:active .pm-hero-img { transform: scale(1.02); }
.pm-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        var(--ink) 0%,
        color-mix(in srgb, var(--ink) 70%, transparent) 40%,
        color-mix(in srgb, var(--ink) 20%, transparent) 75%,
        transparent 100%
    );
}
.pm-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 16px 22px;
}
.pm-live-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--live);
    border-radius: 4px;
    padding: 4px 9px;
}
.pm-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
    animation: pm-dot-pulse 1.4s infinite;
}

/* ── Tags ── */
.pm-tag {
    display: inline-flex;
    align-items: center;
    font-size: 9px;
    font-weight: 800;
    color: var(--blue);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(43,95,255,0.15);
    border: 1px solid rgba(43,95,255,0.3);
    padding: 3px 8px;
    border-radius: 4px;
}

/* ── Competition strip (next event highlight) ── */
.pm-comp-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--ink2);
    border-bottom: 1px solid var(--rule);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}
.pm-comp-strip:active { background: var(--ink3); }

/* ── Date block ── */
.pm-date-block {
    text-align: center;
    background: var(--ink3);
    border-radius: 10px;
    width: 46px;
    padding: 6px 4px;
    flex-shrink: 0;
}
.pm-date-day {
    font-family: var(--font-display);
    font-size: 26px;
    color: var(--blue);
    line-height: 1;
    display: block;
}
.pm-date-month {
    font-size: 9px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: block;
}

/* ── Section headers ── */
.pm-section-header {
    padding: 20px 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pm-section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    color: var(--white);
    letter-spacing: 0.06em;
}
.pm-section-more {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    color: var(--blue);
    letter-spacing: 0.06em;
    text-decoration: none;
}

/* ── Article rows ── */
.pm-article-row {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--rule);
    cursor: pointer;
    align-items: flex-start;
    text-decoration: none;
    transition: background 0.15s;
}
.pm-article-row:active { background: var(--ink2); }
.pm-article-thumb {
    flex-shrink: 0;
    width: 88px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
}
.pm-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}
.pm-article-body { flex: 1; min-width: 0; }
.pm-article-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.35;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pm-article-sub {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pm-article-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--muted2);
}

/* ── Competition rows ── */
.pm-comp-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--rule);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.pm-comp-row:active { background: var(--ink2); }

/* ── Premium card ── */
.pm-premium-card {
    margin: 8px 16px 16px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--ink2);
    border: 1px solid var(--rule);
    position: relative;
}
.pm-premium-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 90% 50%, rgba(43,95,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.pm-premium-inner { padding: 20px 20px 18px; position: relative; }

/* ── Stories row ── */
.pm-stories {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 12px 16px;
    scrollbar-width: none;
}
.pm-stories::-webkit-scrollbar { display: none; }
.pm-story {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 64px;
    flex-shrink: 0;
    text-decoration: none;
}
.pm-story-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 2.5px;
    margin-bottom: 6px;
    flex-shrink: 0;
}
.pm-story-ring.active  { background: linear-gradient(135deg, var(--blue), var(--blue-hi)); }
.pm-story-ring.inactive { background: color-mix(in srgb, var(--muted) 30%, transparent); }
.pm-story-img-wrap {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 2.5px solid var(--ink);
}
/* Compétition sans image : date sur la couleur de sa discipline (au lieu de la même photo grisée partout). */
.pm-story-date-pastille {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    line-height: 1;
}
.pm-story-date-pastille strong { font-family: 'Bebas Neue', 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 700; }
.pm-story-date-pastille small { font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
.pm-story-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--white);
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pm-story-date {
    font-size: 9px;
    color: var(--muted);
    text-align: center;
}

/* ── Athlete strip ── */
.pm-athlete-strip {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 0 16px 8px;
    scrollbar-width: none;
}
.pm-athlete-strip::-webkit-scrollbar { display: none; }

/* ── Animations ── */
@keyframes pm-dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

/* ── Header new style ── */
.pm-header {
    height: 54px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: var(--ink);
    border-bottom: 1px solid var(--rule);
    position: sticky;
    top: 0;
    z-index: 40;
    padding-top: max(0px, env(safe-area-inset-top));
}
.pm-icon-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.15s;
    text-decoration: none;
    color: var(--muted);
    flex-shrink: 0;
}
.pm-icon-btn:active { background: var(--ink3); }

/* ══════════════════════════════════════════
   DESIGN TOKENS v3 — unified button system
   ══════════════════════════════════════════ */

/* Base pill/CTA button */
.pm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--btn-radius);
    font-size: var(--btn-font-size);
    font-weight: 800;
    letter-spacing: 0.03em;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s, transform 0.1s;
    flex-shrink: 0;
}
.pm-btn:active { opacity: 0.8; transform: scale(0.97); }

.pm-btn-primary {
    background: linear-gradient(90deg, #2B5FFF, #6d28d9);
    color: #fff;
}
.pm-btn-secondary {
    background: var(--ink3);
    color: var(--white);
    border: 1px solid var(--rule);
}
.pm-btn-ghost {
    background: transparent;
    color: var(--blue);
    border: 1px solid rgba(43,95,255,0.35);
}
.pm-btn-sm {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 8px;
}
.pm-btn-pill { border-radius: 999px; }


@media (prefers-reduced-motion: reduce) {
    .animate-fade-in,
    .pm-live-dot,
    .live-badge::before,
    [class*="animate-"],
    [class*="pulse"] {
        animation: none;
    }
}
