/**
 * PUBLIC.CSS - Stili pagine pubbliche tornei
 * Usa le CSS variables da style.css + design system DM Sans
 */

/* ===== LAYOUT BASE ===== */
.pub-body {
    background: var(--color-bg-page);
    min-height: 100vh;
}

/* ===== HEADER PUBBLICO ===== */
.pub-topbar {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary-mid) 50%, var(--color-primary-light) 100%);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.pub-topbar .pub-logo {
    font-family: 'Georgia', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.pub-topbar .pub-logo span {
    color: #a855f7;
}

.pub-topbar .pub-logo:hover {
    opacity: 0.9;
}

.pub-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pub-topbar-right .pub-lang {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
}

/* ===== TOURNAMENT HERO ===== */
.pub-hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 60%, #475569 100%);
    color: white;
    padding: 32px 28px 28px;
    position: relative;
    overflow: hidden;
}

.pub-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(168,85,247,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.pub-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(52,152,219,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.pub-hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.pub-hero h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.pub-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    font-size: 0.9rem;
    opacity: 0.85;
    margin-bottom: 4px;
}

.pub-hero-meta svg {
    width: 16px;
    height: 16px;
    vertical-align: -2px;
    opacity: 0.7;
    margin-right: 4px;
}

.pub-hero-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* Badge stato */
.pub-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pub-badge-iscrizioni {
    background: rgba(52,152,219,0.2);
    color: #93c5fd;
    border: 1px solid rgba(52,152,219,0.3);
}

.pub-badge-in_corso {
    background: rgba(39,174,96,0.2);
    color: #6ee7b7;
    border: 1px solid rgba(39,174,96,0.3);
}

.pub-badge-in_corso::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6ee7b7;
    animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.pub-badge-concluso {
    background: rgba(148,163,184,0.2);
    color: #cbd5e1;
    border: 1px solid rgba(148,163,184,0.3);
}

/* CTA Iscrizione */
.pub-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-accent-green);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 16px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(39,174,96,0.3);
}

.pub-cta:hover {
    background: #219a52;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39,174,96,0.4);
}

.pub-cta svg {
    width: 18px;
    height: 18px;
}

/* ===== TABS ===== */
.pub-tabs {
    display: flex;
    background: white;
    border-bottom: 2px solid var(--color-border);
    padding: 0 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pub-tab {
    flex-shrink: 0;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--color-text-light);
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    white-space: nowrap;
}

.pub-tab:hover {
    color: var(--color-text-dark);
    background: var(--color-bg-light);
}

.pub-tab.active {
    color: var(--color-accent-blue);
    border-bottom-color: var(--color-accent-blue);
}

/* ===== GIRONI NAV ===== */
.pub-gironi-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 20px 0;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 8px 12px;
    flex-wrap: wrap;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.pub-gironi-back {
    color: var(--color-accent-blue);
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.15s;
}

.pub-gironi-back:hover {
    background: #eff6ff;
}

.pub-gironi-sep {
    width: 1px;
    height: 24px;
    background: var(--color-border);
}

.pub-gironi-group {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.pub-girone-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.15s;
    border: 2px solid transparent;
}

/* ===== CONTENT AREA ===== */
.pub-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== CARDS ===== */
.pub-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    overflow: hidden;
    margin-bottom: 20px;
}

.pub-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-text-dark);
}

.pub-card-body {
    padding: 0;
}

.pub-card-body.padded {
    padding: 20px;
}

/* ===== TABLES ===== */
.pub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.pub-table th {
    background: var(--color-bg-light);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--color-text-medium);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.pub-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.pub-table tbody tr:hover {
    background: #f8fafc;
}

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

.pub-table .text-center {
    text-align: center;
}

.pub-table .text-right {
    text-align: right;
}

/* Player name in table */
.pub-player-link {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.pub-player-link:hover {
    color: var(--color-accent-blue);
}

/* Titolo FIDE badge */
.pub-title-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: middle;
}

.pub-title-badge.gm { background: #fbbf24; color: #78350f; }
.pub-title-badge.im { background: #c084fc; color: #3b0764; }
.pub-title-badge.fm { background: #67e8f9; color: #164e63; }
.pub-title-badge.cm { background: #86efac; color: #14532d; }
.pub-title-badge.wgm { background: #fbbf24; color: #78350f; }
.pub-title-badge.wim { background: #c084fc; color: #3b0764; }
.pub-title-badge.wfm { background: #67e8f9; color: #164e63; }
.pub-title-badge.wcm { background: #86efac; color: #14532d; }

/* Posizione */
.pub-pos {
    font-weight: 700;
    color: var(--color-text-medium);
    min-width: 30px;
    text-align: center;
}

.pub-pos-1 { color: #d97706; }
.pub-pos-2 { color: #6b7280; }
.pub-pos-3 { color: #b45309; }

/* Punti */
.pub-points {
    font-weight: 700;
    color: var(--color-text-dark);
}

/* Spareggi */
.pub-tb {
    color: var(--color-text-light);
    font-size: 0.82rem;
    text-align: center;
}

/* ===== PAIRINGS TABLE ===== */
.pub-pairing-row {
    display: grid;
    grid-template-columns: 50px 1fr 50px 70px 50px 1fr;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.88rem;
    gap: 4px;
}

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

.pub-pairing-row:hover {
    background: #f8fafc;
}

.pub-pairing-tav {
    font-weight: 700;
    color: var(--color-text-light);
    text-align: center;
    font-size: 0.8rem;
}

.pub-pairing-white,
.pub-pairing-black {
    min-width: 0;
}

.pub-pairing-white {
    text-align: right;
    padding-right: 4px;
}

.pub-pairing-black {
    text-align: left;
    padding-left: 4px;
}

.pub-pairing-pts {
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.82rem;
}

.pub-pairing-result {
    text-align: center;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--color-text-dark);
    background: var(--color-bg-light);
    border-radius: 6px;
    padding: 4px 0;
}

/* Mobile info in pairings */
.pub-mobile-info {
    display: none;
}

/* ===== FILTER ===== */
.pub-filter {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}

.pub-filter input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--color-bg-light);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pub-filter input:focus {
    outline: none;
    border-color: var(--color-accent-blue);
    box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
    background: white;
}

/* ===== PLAYER CARD (HERO) ===== */
.pub-player-hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 60%, #475569 100%);
    color: white;
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.pub-player-hero h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 6px 0;
    letter-spacing: -0.01em;
}

.pub-player-hero .pub-player-info {
    opacity: 0.8;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.pub-player-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.pub-stat {
    text-align: center;
    min-width: 70px;
}

.pub-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.pub-stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.7;
    margin-top: 2px;
}

.pub-elo-pos { color: #6ee7b7; }
.pub-elo-neg { color: #fca5a5; }

/* Color indicators in game table */
.pub-color-w {
    display: inline-block;
    background: #fff;
    border: 1px solid #d1d5db;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
}

.pub-color-b {
    display: inline-block;
    background: #1f2937;
    color: #fff;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Result classes */
.pub-win { color: var(--color-accent-green); font-weight: 700; }
.pub-draw { color: var(--color-accent-orange); font-weight: 600; }
.pub-loss { color: var(--color-accent-red); font-weight: 600; }

/* ===== REGISTRATION FORM ===== */
.pub-reg-hero {
    background: linear-gradient(135deg, #065f46 0%, #059669 60%, #34d399 100%);
    color: white;
    padding: 28px;
    text-align: center;
}

.pub-reg-hero h1 {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 8px 0;
}

.pub-reg-hero .pub-reg-tournament {
    font-size: 1.1rem;
    opacity: 0.9;
}

.pub-reg-hero .pub-reg-details {
    margin-top: 6px;
    opacity: 0.75;
    font-size: 0.9rem;
}

.pub-reg-form {
    max-width: 520px;
    margin: 24px auto 0;
}

.pub-form-group {
    margin-bottom: 16px;
}

.pub-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--color-text-dark);
}

.pub-form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pub-form-group input:focus {
    outline: none;
    border-color: var(--color-accent-green);
    box-shadow: 0 0 0 3px rgba(39,174,96,0.1);
}

.pub-form-group small {
    color: var(--color-text-light);
    font-size: 0.78rem;
    margin-top: 4px;
    display: block;
}

.pub-btn-submit {
    background: var(--color-accent-green);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(39,174,96,0.3);
}

.pub-btn-submit:hover {
    background: #219a52;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39,174,96,0.4);
}

/* Search section */
.pub-search-section {
    background: var(--color-bg-light);
    border: 2px dashed var(--color-border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}

.pub-search-section h4 {
    margin: 0 0 10px 0;
    color: var(--color-text-medium);
    font-size: 0.88rem;
    font-weight: 600;
}

.pub-autocomplete-wrapper {
    position: relative;
}

.pub-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.pub-autocomplete-results.show {
    display: block;
}

.pub-ac-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}

.pub-ac-item:hover {
    background: #eff6ff;
}

.pub-ac-item .name {
    font-weight: 600;
    color: var(--color-text-dark);
}

.pub-ac-item .details {
    font-size: 0.78rem;
    color: var(--color-text-light);
    margin-top: 2px;
}

.pub-ac-item .rating {
    float: right;
    background: var(--color-accent-blue);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.pub-selected-player {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 10px;
    display: none;
}

.pub-selected-player.show {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pub-selected-player .player-name {
    font-weight: 700;
    color: #065f46;
}

.pub-selected-player .btn-remove {
    background: none;
    border: none;
    color: var(--color-accent-red);
    cursor: pointer;
    font-size: 20px;
    padding: 4px;
    line-height: 1;
}

.pub-or-divider {
    text-align: center;
    color: var(--color-text-light);
    margin: 16px 0;
    font-style: italic;
    font-size: 0.88rem;
}

.pub-manual-section.hidden {
    display: none;
}

.pub-success-box {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
}

.pub-success-box h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

/* ===== SHARE SECTION ===== */
.pub-share {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pub-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: white;
    color: var(--color-text-medium);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0;
}

.pub-share-btn:hover {
    background: var(--color-bg-light);
    border-color: var(--color-accent-blue);
    color: var(--color-accent-blue);
}

.pub-share-btn svg {
    width: 18px;
    height: 18px;
}

.pub-share-btn.whatsapp:hover { border-color: #25d366; color: #25d366; }
.pub-share-btn.telegram:hover { border-color: #0088cc; color: #0088cc; }
.pub-share-btn.facebook:hover { border-color: #1877f2; color: #1877f2; }
.pub-share-btn.x:hover { border-color: #000; color: #000; }
.pub-share-btn.qr:hover { border-color: var(--color-text-dark); color: var(--color-text-dark); }
.pub-share-btn.copy-link:hover { border-color: var(--color-accent-green); color: var(--color-accent-green); }

/* QR Modal */
.pub-qr-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

.pub-qr-overlay.show {
    display: flex;
}

.pub-qr-modal {
    background: white;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    max-width: 340px;
    width: 90%;
}

.pub-qr-modal h3 {
    margin: 0 0 6px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-dark);
}

.pub-qr-modal p {
    color: var(--color-text-light);
    font-size: 0.82rem;
    margin-bottom: 16px;
}

.pub-qr-modal #qrcode {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.pub-qr-close {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 8px 24px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--color-text-medium);
    transition: all 0.15s;
}

.pub-qr-close:hover {
    background: var(--color-bg-light);
}

/* ===== FOOTER ===== */
.pub-footer {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 20px 32px;
    text-align: center;
}

.pub-footer-inner {
    border-top: 1px solid var(--color-border);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pub-footer-brand {
    font-size: 0.82rem;
    color: var(--color-text-light);
}

.pub-footer-brand a {
    color: var(--color-accent-blue);
    text-decoration: none;
    font-weight: 600;
}

.pub-footer-brand a:hover {
    text-decoration: underline;
}

.pub-footer-links {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
}

.pub-footer-links a {
    color: var(--color-text-light);
    text-decoration: none;
}

.pub-footer-links a:hover {
    color: var(--color-accent-blue);
}

/* ===== BACK BUTTON ===== */
.pub-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-accent-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 8px 0;
    margin-bottom: 12px;
    transition: color 0.15s;
}

.pub-back:hover {
    color: #2980b9;
}

.pub-back svg {
    width: 16px;
    height: 16px;
}

/* ===== PRINT BUTTON ===== */
.pub-btn-print {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text-medium);
    text-decoration: none;
    transition: all 0.15s;
}

.pub-btn-print:hover {
    background: white;
    border-color: var(--color-accent-blue);
    color: var(--color-accent-blue);
}

.pub-btn-print svg {
    width: 14px;
    height: 14px;
}

/* ===== ROUND NAVIGATION ===== */
.pub-round-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pub-round-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--color-accent-blue);
    color: white;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
}

.pub-round-btn:hover {
    background: #2980b9;
    color: white;
}

/* ===== CROSS-TABLE ===== */
.pub-crosstable {
    font-size: 0.82rem;
}

.pub-crosstable th,
.pub-crosstable td {
    padding: 6px 8px;
}

.pub-ct-cell {
    text-align: center;
    min-width: 36px;
    font-size: 0.8rem;
}

.pub-ct-diag {
    background: #f1f5f9;
    color: var(--color-text-light);
}

.pub-ct-white {
    background: #fefce8;
}

.pub-ct-black {
    background: #f0f4ff;
}

.pub-ct-bye {
    background: #fef3c7;
    font-style: italic;
}

.pub-ct-forfeit .pub-ct-result {
    color: #8e44ad;
}

.pub-ct-result {
    font-weight: 700;
}

.pub-ct-opp {
    font-size: 0.7rem;
    color: var(--color-text-light);
}

/* ===== ALERT ===== */
.pub-alert {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.pub-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.pub-alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* ===== SORTABLE HEADER ===== */
.pub-sortable {
    cursor: pointer;
    user-select: none;
}

.pub-sortable:hover {
    color: var(--color-accent-blue);
}

/* ===== ISCRIZIONI CHIUSE ===== */
.pub-closed-card {
    max-width: 500px;
    margin: 40px auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
    .pub-hero {
        padding: 24px 16px 20px;
    }

    .pub-hero h1 {
        font-size: 1.3rem;
    }

    .pub-hero-meta {
        font-size: 0.82rem;
    }

    .pub-tabs {
        padding: 0 12px;
    }

    .pub-tab {
        padding: 12px 14px;
        font-size: 0.82rem;
    }

    .pub-content {
        padding: 12px;
    }

    .pub-table {
        font-size: 0.8rem;
    }

    .pub-table th,
    .pub-table td {
        padding: 8px;
    }

    /* Pairings: switch to table layout on mobile */
    .pub-pairing-row {
        grid-template-columns: 40px 1fr 60px 1fr;
        grid-template-rows: auto auto;
        padding: 8px 12px;
    }

    .pub-pairing-pts {
        display: none;
    }

    .pub-mobile-info {
        display: inline;
    }

    .pub-player-stats {
        gap: 16px;
    }

    .pub-stat-value {
        font-size: 1.2rem;
    }

    .pub-player-hero {
        padding: 20px 16px;
    }

    .pub-player-hero h2 {
        font-size: 1.2rem;
    }

    .pub-share {
        justify-content: center;
    }

    .pub-qr-modal {
        padding: 24px;
    }

    .pub-reg-hero {
        padding: 20px 16px;
    }
}

@media (max-width: 480px) {
    .pub-topbar {
        padding: 10px 14px;
    }

    .pub-topbar .pub-logo {
        font-size: 1.1rem;
    }
}

/* ===== PRINT ===== */
@media print {
    .pub-topbar,
    .pub-share,
    .pub-footer,
    .pub-cta,
    .pub-round-btn,
    .pub-btn-print,
    .pub-filter,
    .pub-qr-overlay {
        display: none !important;
    }

    .pub-hero,
    .pub-player-hero,
    .pub-reg-hero {
        background: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .pub-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    body {
        background: white;
    }
}
