:root {
    color-scheme: dark;
    --bg: #0d110e;
    --surface: #151b17;
    --surface-2: #1a221c;
    --surface-3: #202a23;
    --line: rgba(255,255,255,.09);
    --line-strong: rgba(255,255,255,.16);
    --text: #f4f1e8;
    --muted: #9da79f;
    --gold: #c8aa6d;
    --gold-light: #ead7aa;
    --green: #65c77b;
    --red: #e18484;
    --orange: #d8a85f;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 0%, rgba(42, 83, 54, .22), transparent 33rem),
        radial-gradient(circle at 100% 100%, rgba(137, 104, 54, .13), transparent 35rem),
        var(--bg);
}
button, input { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 78px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(13,17,14,.88);
    backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; width: max-content; }
.brand-placeholder { display: grid; place-items: center; min-width: 54px; height: 36px; padding: 0 10px; border: 1px dashed rgba(234,215,170,.5); border-radius: 11px; color: var(--gold-light); font-size: .67rem; letter-spacing: .12em; }
.brand-name { font-size: 1.15rem; font-weight: 780; letter-spacing: -.035em; }
.live-summary { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .86rem; }
.live-summary strong { color: var(--text); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(101,199,123,.1); }
.summary-divider { width: 1px; height: 18px; margin: 0 6px; background: var(--line-strong); }
.profile-menu { justify-self: end; display: flex; align-items: center; gap: 8px; }
.profile-button { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--text); text-align: left; }
.profile-copy { display: grid; gap: 1px; }
.profile-copy small { color: var(--muted); }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(200,170,109,.35); background: linear-gradient(145deg, #26362b, #172019); color: var(--gold-light); font-weight: 800; }
.avatar.large { width: 52px; height: 52px; font-size: 1.05rem; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.03); color: var(--muted); font-size: 1.2rem; }
.icon-button:hover { border-color: var(--line-strong); color: var(--text); }

.lobby-grid {
    width: min(1540px,calc(100% - 36px));
    margin: 22px auto;
    display: grid;
    grid-template-columns: clamp(240px,18vw,290px) minmax(0,1fr) clamp(250px,19vw,310px);
    gap: 20px;
    align-items: start;
}
.left-column,
.right-column {
    display: grid;
    gap: 18px;
    align-self: start;
}

@media (min-width:1200px) {

    .left-column,
    .right-column {
        position: sticky;
        top: 96px;
    }
}
.panel, .hero-strip {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(21,27,23,.84);
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
.panel { padding: 20px; }
.hero-strip { min-height: 170px; padding: 28px 30px; display: flex; align-items: center; justify-content: space-between; gap: 28px; overflow: hidden; background: linear-gradient(135deg, rgba(33,63,42,.92), rgba(24,32,27,.9)); }
.hero-strip h1 { margin: 5px 0 8px; font-size: clamp(1.9rem, 4vw, 3.3rem); line-height: 1; letter-spacing: -.055em; }
.hero-strip p { margin: 0; color: #b8c0ba; }
.eyebrow { color: var(--gold-light); font-size: .68rem; font-weight: 800; letter-spacing: .18em; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.panel-heading.compact { margin-bottom: 14px; }
.panel-heading h2 { margin: 3px 0 0; font-size: 1.25rem; letter-spacing: -.035em; }
.table-stats { display: flex; gap: 14px; color: var(--muted); font-size: .78rem; }
.table-stats strong { color: var(--text); }

.search-box { height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.14); color: var(--muted); }
.search-box:focus-within { border-color: rgba(200,170,109,.55); box-shadow: 0 0 0 4px rgba(200,170,109,.08); }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.filter-row { display: flex; gap: 6px; margin: 12px 0; overflow-x: auto; scrollbar-width: none; }
.filter { padding: 7px 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); font-size: .75rem; white-space: nowrap; }
.filter.active { border-color: var(--line); background: rgba(255,255,255,.05); color: var(--text); }
.scroll-list { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }
.users-list { max-height: calc(100vh - 260px); min-height: 310px; }
.user-row { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 5px; border-bottom: 1px solid rgba(255,255,255,.055); }
.user-main { min-width: 0; }
.user-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.user-main small { color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .7rem; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #6f7871; }
.status-pill.online::before { background: var(--green); }
.status-pill.playing::before { background: var(--orange); }
.user-tags { display: flex; align-items: center; gap: 4px; }
.vip-tag { color: var(--gold-light); font-size: .66rem; }

.tables-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; min-height: 280px; }
.table-card { position: relative; min-height: 155px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.012)); transition: transform .16s, border-color .16s, background .16s; }
.table-card:hover { transform: translateY(-2px); border-color: rgba(200,170,109,.3); background: rgba(255,255,255,.045); }
.table-card-top { display: flex; justify-content: space-between; gap: 12px; }
.table-owner { min-width: 0; }
.table-owner strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-owner small { color: var(--muted); }
.table-state { height: max-content; padding: 5px 8px; border-radius: 999px; background: rgba(101,199,123,.1); color: #aee4b9; font-size: .68rem; }
.table-meta { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin-top: 20px; }
.table-meta div { padding: 9px 7px; border-radius: 10px; background: rgba(0,0,0,.13); text-align: center; }
.table-meta strong { display: block; font-size: .9rem; }
.table-meta span { display: block; margin-top: 2px; color: var(--muted); font-size: .64rem; }
.table-spectators { margin-top: 12px; color: var(--muted); font-size: .73rem; }

.notifications-list { max-height: 360px; min-height: 130px; }
.notification-item { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.055); }
.notification-item strong { display: block; font-size: .86rem; }
.notification-item p { margin: 4px 0 8px; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.notification-actions { display: flex; gap: 7px; }
.mini-button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.04); color: var(--text); font-size: .72rem; }
.mini-button.accept { border-color: rgba(101,199,123,.25); color: #bfe9c7; }
.mini-button.reject { color: #e7b0b0; }
.badge { min-width: 25px; height: 25px; display: grid; place-items: center; padding: 0 7px; border-radius: 999px; background: rgba(200,170,109,.14); color: var(--gold-light); font-size: .72rem; font-weight: 800; }
.quick-profile { display: flex; align-items: center; gap: 12px; margin-top: 15px; }
.quick-profile strong { font-size: 1rem; }
.quick-profile p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.profile-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin: 18px 0; }
.profile-metrics div { padding: 10px 4px; border-radius: 10px; background: rgba(0,0,0,.13); text-align: center; }
.profile-metrics strong, .profile-metrics span { display: block; }
.profile-metrics span { margin-top: 3px; color: var(--muted); font-size: .63rem; }

.primary-button, .secondary-button { border-radius: 12px; font-weight: 800; }
.primary-button { padding: 13px 17px; border: 0; background: linear-gradient(135deg, #dbc28c, #a9854a); color: #17130b; }
.primary-button:hover { filter: brightness(1.05); transform: translateY(-1px); }
.primary-button.full { width: 100%; margin-top: 10px; }
.secondary-button { width: 100%; padding: 11px 12px; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--muted); }

.drawer { position: fixed; z-index: 50; top: 0; right: 0; width: min(440px,100%); height: 100vh; padding: 28px; overflow-y: auto; border-left: 1px solid var(--line); background: rgba(18,24,20,.98); box-shadow: -30px 0 80px rgba(0,0,0,.35); transform: translateX(102%); transition: transform .22s ease; }
.drawer.open { transform: translateX(0); }
.drawer-header { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 24px; }
.drawer-header h2 { margin: 3px 0 0; font-size: 1.65rem; }
.drawer fieldset { margin: 0 0 22px; padding: 0; border: 0; }
.drawer legend { margin-bottom: 10px; font-size: .84rem; font-weight: 750; }
.choice-grid { display: grid; gap: 8px; }
.choice-grid.two { grid-template-columns: 1fr 1fr; }
.choice-card { display: block; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card span { min-height: 74px; display: flex; flex-direction: column; justify-content: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.choice-card.selected span { border-color: rgba(200,170,109,.55); background: rgba(200,170,109,.08); }
.choice-card strong, .choice-card small { display: block; }
.choice-card small { margin-top: 4px; color: var(--muted); }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }
.switch-row small { display: block; margin-top: 3px; color: var(--muted); }
.switch-row input { width: 19px; height: 19px; accent-color: var(--gold); }
.seat-selector { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.seat-button { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); color: var(--muted); }
.seat-button.selected { border-color: rgba(200,170,109,.55); background: rgba(200,170,109,.1); color: var(--gold-light); }
.inline-status { min-height: 22px; margin: 4px 0; color: var(--muted); font-size: .82rem; }
.inline-status.error { color: #efb0b0; }

.empty-state { min-height: 170px; display: grid; place-items: center; grid-column: 1 / -1; padding: 30px; border: 1px dashed var(--line); border-radius: 15px; color: var(--muted); text-align: center; }
.loading-row { padding: 15px 5px; color: var(--muted); font-size: .82rem; }
.toast-region { position: fixed; z-index: 100; right: 22px; bottom: 22px; display: grid; gap: 8px; }
.toast { max-width: 340px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #202821; box-shadow: 0 18px 50px rgba(0,0,0,.35); color: var(--text); font-size: .82rem; animation: toastIn .18s ease; }
.toast.error { border-color: rgba(225,132,132,.35); color: #f0b7b7; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }

@media (max-width:1120px) {

    .lobby-grid {
        grid-template-columns: 240px minmax(0,1fr);
    }

    .right-column {
        grid-column: 1 / -1;
    }
}

@media (max-width:820px) {

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

    .left-column {
        order: 2;
    }

    .center-column {
        order: 1;
    }

    .right-column {
        order: 3;
    }
}
@media (max-width: 560px) {
    .brand-name, .profile-copy { display: none; }
    .topbar { height: 66px; }
    .hero-strip { align-items: stretch; flex-direction: column; padding: 22px; }
    .hero-strip .primary-button { width: 100%; }
    .table-stats { display: none; }
    .choice-grid.two { grid-template-columns: 1fr; }
}


/* ===========================
   SPRINT 2C - REALTIME
   =========================== */

.connection-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 2px;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 999px;
    color: var(--muted);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}

.connection-state::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d2ae65;
    box-shadow: 0 0 0 4px rgba(210, 174, 101, .1);
}

.connection-state.connected {
    color: #bfe4c4;
    border-color: rgba(117, 209, 138, .2);
}

.connection-state.connected::before {
    background: #75d18a;
    box-shadow: 0 0 0 4px rgba(117, 209, 138, .1);
}

.connection-state.disconnected {
    color: #e4bfbf;
    border-color: rgba(211, 143, 143, .22);
}

.connection-state.disconnected::before {
    background: #d38f8f;
    box-shadow: 0 0 0 4px rgba(211, 143, 143, .1);
}

.table-card.realtime-enter {
    animation: realtime-enter 230ms ease both;
}

@keyframes realtime-enter {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 720px) {
    .connection-state {
        padding: 4px 7px;
        font-size: 0;
    }

    .connection-state::before {
        margin: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .table-card.realtime-enter {
        animation: none;
    }
}


/* ===========================
   SPRINT 2D - SOCIAL
   =========================== */

.social-summary {
    min-height: 24px;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: -3px 0 6px;
    color: var(--muted);
    font-size: .7rem;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.social-summary strong {
    color: var(--text);
}

.user-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    border-radius: 12px;
    transition: background .15s, border-color .15s;
}

.user-row:hover,
.user-row:focus-within {
    background: rgba(255,255,255,.027);
}

.user-row.blocked {
    margin: 4px 0;
    padding-left: 8px;
    padding-right: 8px;
    border: 1px solid rgba(211, 112, 112, .22);
    background: rgba(128, 35, 35, .09);
}

.user-row.blocked .avatar {
    border-color: rgba(211, 112, 112, .38);
    color: #efb8b8;
}

.user-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.user-action {
    min-width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1;
    transition: background .15s, border-color .15s, color .15s;
}

.user-action:hover,
.user-action:focus-visible {
    border-color: var(--line);
    background: rgba(255,255,255,.055);
    color: var(--text);
    outline: none;
}

.user-action.favorite.active {
    color: var(--gold-light);
}

.user-action.danger:hover,
.user-action.danger:focus-visible {
    border-color: rgba(211, 112, 112, .28);
    color: #efb8b8;
}

.user-action.friend.active {
    color: #bfe4c4;
}

.user-action:disabled,
.mini-button:disabled {
    opacity: .45;
    cursor: wait;
}

.notification-filters {
    display: flex;
    gap: 5px;
    margin: -3px 0 9px;
}

.notification-filter {
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: .69rem;
}

.notification-filter.active {
    border-color: var(--line);
    background: rgba(255,255,255,.045);
    color: var(--text);
}

.notification-item.pending-sent {
    opacity: .82;
}

.notification-kind {
    display: inline-flex;
    margin-bottom: 5px;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(200,170,109,.08);
    color: var(--gold-light);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.notification-time {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: .66rem;
}

@media (max-width: 1180px) {
    .user-action {
        min-width: 28px;
        padding: 0 6px;
    }
}


/* MEGA SPRINT 6 - CHAT */
.chat-panel { min-height: 360px; }
.chat-status { margin: -5px 0 8px; color: var(--muted); font-size: .65rem; font-weight: 750; }
.chat-status.connected { color: #9fd6a7; }
.chat-status.error, .chat-status.disconnected { color: #e5aaaa; }
.chat-list { height: 230px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.chat-empty { padding: 30px 10px; color: var(--muted); font-size: .75rem; text-align: center; }
.chat-message { padding: 8px 9px; margin-bottom: 7px; border: 1px solid rgba(255,255,255,.06); border-radius: 10px; background: rgba(255,255,255,.025); }
.chat-message.mine { border-color: rgba(200,170,109,.18); background: rgba(200,170,109,.05); }
.chat-message-head { display:flex; justify-content:space-between; gap:8px; }
.chat-message-head strong { color: var(--gold-light); font-size: .72rem; }
.chat-message-head time { color: var(--muted); font-size: .58rem; }
.chat-message p { margin: 5px 0 0; color: var(--text); font-size: .73rem; line-height: 1.4; overflow-wrap:anywhere; }
.chat-message-actions { display:flex; gap:8px; margin-top:6px; opacity:.65; }
.chat-message-actions button { padding:0; border:0; background:transparent; color:var(--muted); font-size:.58rem; }
.chat-message-actions button:hover { color:var(--gold-light); }
.chat-form { margin-top:9px; }
.chat-form textarea { width:100%; resize:none; padding:9px; border:1px solid rgba(255,255,255,.09); border-radius:10px; background:rgba(0,0,0,.17); color:var(--text); font:inherit; font-size:.73rem; }
.chat-form-footer { display:flex; justify-content:space-between; align-items:center; margin-top:6px; }
.chat-form-footer small { color:var(--muted); font-size:.58rem; }
.chat-form-footer button { padding:7px 12px; border:0; border-radius:8px; background:linear-gradient(135deg,#d6bd84,#aa874d); color:#17130c; font-weight:800; font-size:.68rem; }


.profile-link-button {
    display: block;
    text-align: center;
    text-decoration: none;
}


/* ===========================
   MEGA SPRINT 8 - PROFILO PUBBLICO
   =========================== */

.modal-backdrop {
    position: fixed;
    z-index: 300;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(5, 8, 6, .76);
    backdrop-filter: blur(9px);
}

.modal-backdrop[hidden] {
    display: none;
}

.public-profile-modal {
    position: relative;
    width: min(440px, 100%);
    padding: 28px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 22px;
    background: #182019;
    box-shadow: 0 30px 90px rgba(0,0,0,.5);
    text-align: center;
}

.modal-close {
    position: absolute;
    right: 13px;
    top: 11px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
    color: var(--text);
    font-size: 1.3rem;
}

.public-profile-avatar {
    width: 92px;
    height: 92px;
    margin: 0 auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(200,170,109,.32);
    border-radius: 27px;
    background: rgba(255,255,255,.04);
    color: var(--gold-light);
    font-size: 1.7rem;
    font-weight: 900;
}

.public-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.public-profile-modal h2 {
    margin: 15px 0 5px;
}

.public-profile-bio {
    min-height: 22px;
    margin: 0;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.45;
}

.public-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin-top: 18px;
}

.public-profile-stats div {
    padding: 10px 5px;
    border-radius: 11px;
    background: rgba(255,255,255,.035);
}

.public-profile-stats strong,
.public-profile-stats span {
    display: block;
}

.public-profile-stats span {
    margin-top: 3px;
    color: var(--muted);
    font-size: .6rem;
}

.public-profile-details {
    margin: 17px 0 0;
    text-align: left;
}

.public-profile-details div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.public-profile-details dt,
.public-profile-details dd {
    margin: 0;
    font-size: .7rem;
}

.public-profile-details dt {
    color: var(--muted);
}

.user-row [data-user-profile] {
    cursor: pointer;
}

.moderation-shortcut{position:fixed;right:18px;bottom:18px;width:42px;height:42px;display:grid;place-items:center;border:1px solid rgba(200,170,109,.25);border-radius:50%;background:#182019;color:var(--gold-light);text-decoration:none;box-shadow:0 12px 32px rgba(0,0,0,.3)}
\n.social-shortcut{position:fixed;right:68px;bottom:18px;width:42px;height:42px;display:grid;place-items:center;border:1px solid rgba(117,209,138,.25);border-radius:50%;background:#182019;color:#bfe4c4;text-decoration:none;box-shadow:0 12px 32px rgba(0,0,0,.3)}\n
.history-shortcut{position:fixed;right:68px;bottom:18px;z-index:120;width:42px;height:42px;display:grid;place-items:center;border:1px solid rgba(200,170,109,.25);border-radius:50%;background:#182019;color:var(--gold-light);text-decoration:none;font-size:1.15rem;font-weight:900;box-shadow:0 12px 32px rgba(0,0,0,.3)}


.public-private-chat-button {
    width: 100%;
    margin-top: 15px;
    padding: 10px 13px;
    border: 1px solid rgba(200,170,109,.3);
    border-radius: 10px;
    background: rgba(200,170,109,.08);
    color: var(--gold-light);
    font-weight: 800;
}

.rankings-shortcut{position:fixed;right:118px;bottom:18px;z-index:120;width:42px;height:42px;display:grid;place-items:center;border:1px solid rgba(200,170,109,.25);border-radius:50%;background:#182019;color:var(--gold-light);text-decoration:none;box-shadow:0 12px 32px rgba(0,0,0,.3)}


/* ===========================
   MEGA SPRINT 16
   SMAZZATE 1-6
   =========================== */

.choice-grid.deals-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rules-inline-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--gold-light);
    font-size: .69rem;
    font-weight: 750;
    text-decoration: none;
}

.rules-inline-link:hover {
    text-decoration: underline;
}

@media (max-width: 760px) {
    .choice-grid.deals-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 430px) {
    .choice-grid.deals-grid {
        grid-template-columns: 1fr;
    }
}

.vip-shortcut{position:fixed;right:168px;bottom:18px;z-index:120;width:42px;height:42px;display:grid;place-items:center;border:1px solid rgba(200,170,109,.3);border-radius:50%;background:#182019;color:var(--gold-light);text-decoration:none;box-shadow:0 12px 32px rgba(0,0,0,.3)}

.tournaments-shortcut{position:fixed;right:168px;bottom:18px;z-index:120;width:42px;height:42px;display:grid;place-items:center;border:1px solid rgba(200,170,109,.25);border-radius:50%;background:#182019;color:var(--gold-light);text-decoration:none;box-shadow:0 12px 32px rgba(0,0,0,.3)}

.marketplace-shortcut,.appeals-shortcut{position:fixed;bottom:18px;z-index:120;width:42px;height:42px;display:grid;place-items:center;border:1px solid rgba(200,170,109,.25);border-radius:50%;background:#182019;color:var(--gold-light);text-decoration:none;box-shadow:0 12px 32px rgba(0,0,0,.3)}
.marketplace-shortcut{right:218px}.appeals-shortcut{right:268px}


/* MEGA SPRINT 27 - MONOGRAMMA BRAND */
.brand-placeholder {
    min-width: 42px;
    width: 42px;
    padding: 0;
    border-style: solid;
    border-radius: 13px;
    color: var(--gold-light);
    font-size: .82rem;
    font-weight: 950;
    letter-spacing: -.04em;
}
/* ==========================================================
   MEGA SPRINT 28–29
   CENTRO NOTIFICHE + LOBBY PREMIUM
   ========================================================== */

.topbar-notification-button {
    position: relative;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255,255,255,.03);
    color: var(--gold-light);
    text-decoration: none;
    font-size: .72rem;
}

.topbar-notification-button strong {
    position: absolute;
    top: -5px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    border: 2px solid var(--bg);
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: .55rem;
    line-height: 1;
}

.notifications-shortcut {
    position: fixed;
    right: 318px;
    bottom: 18px;
    z-index: 120;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(200,170,109,.25);
    border-radius: 50%;
    background: #182019;
    color: var(--gold-light);
    text-decoration: none;
    box-shadow: 0 12px 32px rgba(0,0,0,.3);
}

.premium-table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 14px 0;
}

.premium-table-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.premium-table-filters button {
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.025);
    color: var(--muted);
    font-size: .67rem;
}

.premium-table-filters button.active {
    border-color: rgba(200,170,109,.4);
    background: rgba(200,170,109,.1);
    color: var(--gold-light);
}

.premium-table-search {
    min-width: 190px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(0,0,0,.13);
}

.premium-table-search input {
    min-width: 0;
    width: 100%;
    padding: 7px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.premium-tables-grid {
    grid-template-columns: 1fr;
    gap: 12px;
}

.premium-table-card {
    position: relative;
    min-height: 222px;
    padding: 15px;
    overflow: hidden;
    border-radius: 17px;
    background:
        radial-gradient(circle at 50% 50%, rgba(45,88,57,.17), transparent 55%),
        linear-gradient(145deg, rgba(27,36,30,.98), rgba(18,24,20,.98));
    transition:
        transform .16s ease,
        border-color .16s ease,
        box-shadow .16s ease;
}

.premium-table-card:hover {
    transform: translateY(-3px);
    border-color: rgba(200,170,109,.28);
    box-shadow: 0 22px 46px rgba(0,0,0,.27);
}

.premium-table-card.vip-table {
    border-color: rgba(200,170,109,.35);
    background:
        radial-gradient(circle at 50% 48%, rgba(200,170,109,.09), transparent 52%),
        linear-gradient(145deg, rgba(31,37,29,.98), rgba(20,24,18,.98));
}

.premium-table-card.full-table {
    opacity: .78;
}

.premium-table-accent {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--green);
}

.premium-table-card[data-status="playing"] .premium-table-accent {
    background: #6fa8dc;
}

.premium-table-card[data-status="paused"] .premium-table-accent {
    background: var(--orange);
}

.premium-table-card.vip-table .premium-table-accent {
    background: var(--gold);
}

.premium-owner {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.premium-owner-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255,255,255,.12);
    border-radius: 50%;
    background: #26362b;
    color: var(--gold-light);
    font-size: .7rem;
    font-weight: 900;
}

.premium-owner-avatar.vip {
    border-color: var(--gold);
    box-shadow: 0 0 14px rgba(200,170,109,.16);
}

.vip-label {
    display: inline-block;
    margin-left: 4px;
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(200,170,109,.12);
    color: var(--gold-light);
    font-size: .52rem;
    letter-spacing: .08em;
    vertical-align: middle;
}

.table-state.waiting {
    color: var(--green);
}

.table-state.ready,
.table-state.dealing {
    color: var(--gold-light);
}

.table-state.playing {
    color: #a7c9e8;
}

.table-state.paused {
    color: #e5bd7b;
}

.premium-table-visual {
    display: grid;
    grid-template-columns: 112px minmax(0,1fr);
    gap: 13px;
    align-items: center;
    margin-top: 14px;
}

.premium-mini-table {
    position: relative;
    width: 112px;
    height: 76px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(200,170,109,.24);
    border-radius: 50%;
    background:
        radial-gradient(circle, #326043, #21422d 68%, #172f20);
    box-shadow:
        inset 0 0 0 5px rgba(13,17,14,.22),
        0 9px 20px rgba(0,0,0,.25);
}

.premium-card-mark {
    width: 28px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    background: #eee7d7;
    color: #24412c;
    font-size: .55rem;
    font-weight: 950;
    transform: rotate(-7deg);
    box-shadow: 4px 3px 0 rgba(238,231,215,.46);
}

.premium-seats {
    position: absolute;
    inset: -9px;
}

.premium-seat {
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid #182019;
    border-radius: 50%;
    background: #4b554e;
}

.premium-seat.occupied {
    background: var(--green);
}

.premium-seat:nth-child(1) {
    top: -1px;
    left: calc(50% - 7px);
}

.premium-seat:nth-child(2) {
    right: -1px;
    top: calc(50% - 7px);
}

.premium-seat:nth-child(3) {
    bottom: -1px;
    left: calc(50% - 7px);
}

.premium-seat:nth-child(4) {
    left: -1px;
    top: calc(50% - 7px);
}

.premium-table-details strong,
.premium-table-details span {
    display: block;
}

.premium-table-details span {
    margin-top: 5px;
    color: var(--muted);
    font-size: .67rem;
}

.premium-occupancy {
    height: 6px;
    margin-top: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
}

.premium-occupancy div {
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(90deg, var(--green), var(--gold));
}

.premium-table-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 9px;
    color: var(--muted);
    font-size: .62rem;
}

.premium-table-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.premium-table-actions .mini-button {
    flex: 1;
}

@media (max-width: 760px) {
    .premium-table-toolbar {
        display: grid;
    }

    .premium-table-search {
        width: 100%;
    }

    .premium-tables-grid {
        grid-template-columns: 1fr;
    }

    .notifications-shortcut {
        right: 18px;
        bottom: 68px;
    }
}

@media (max-width: 430px) {
    .premium-table-visual {
        grid-template-columns: 96px minmax(0,1fr);
    }

    .premium-mini-table {
        width: 96px;
        height: 68px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .premium-table-card {
        transition: none;
    }

    .premium-table-card:hover {
        transform: none;
    }
}

.administration-shortcut{position:fixed;right:368px;bottom:18px;z-index:120;width:42px;height:42px;display:grid;place-items:center;border:1px solid rgba(200,170,109,.25);border-radius:50%;background:#182019;color:var(--gold-light);text-decoration:none;box-shadow:0 12px 32px rgba(0,0,0,.3)}@media(max-width:760px){.administration-shortcut{right:68px;bottom:68px}}

.release-shortcut,.about-shortcut{position:fixed;z-index:120;width:42px;height:42px;display:grid;place-items:center;border:1px solid rgba(200,170,109,.25);border-radius:50%;background:#182019;color:var(--gold-light);text-decoration:none;box-shadow:0 12px 32px rgba(0,0,0,.3);font-weight:900}.release-shortcut{right:418px;bottom:18px}.about-shortcut{right:468px;bottom:18px}@media(max-width:760px){.release-shortcut{right:118px;bottom:68px}.about-shortcut{right:168px;bottom:68px}}


/* R220 - branded empty lobby state from preview, tables only */
.tables-panel {
    position: relative;
    overflow: hidden;
}

.tables-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 8%, rgba(101, 199, 123, .08), transparent 19rem),
        radial-gradient(circle at 92% 14%, rgba(200, 170, 109, .08), transparent 18rem);
    opacity: .8;
}

.tables-panel > * {
    position: relative;
    z-index: 1;
}

.premium-tables-grid > .empty-state:only-child {
    position: relative;
    min-height: clamp(330px, calc(100vh - 315px), 560px);
    overflow: hidden;
    isolation: isolate;
    align-content: center;
    justify-items: center;
    padding: clamp(30px, 5vw, 58px);
    border: 1px solid rgba(234, 215, 170, .13);
    border-radius: 18px;
    color: #d5ded7;
    background:
        radial-gradient(circle at 28% 24%, rgba(101, 199, 123, .18), transparent 15rem),
        radial-gradient(circle at 76% 18%, rgba(234, 215, 170, .14), transparent 17rem),
        linear-gradient(145deg, rgba(19, 34, 24, .94), rgba(9, 17, 12, .92));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .04),
        inset 0 0 0 1px rgba(255, 255, 255, .025);
}

.premium-tables-grid > .empty-state:only-child::before {
    content: "SB";
    position: absolute;
    z-index: -1;
    top: 50%;
    left: 50%;
    width: clamp(150px, 20vw, 230px);
    height: clamp(150px, 20vw, 230px);
    display: grid;
    place-items: center;
    transform: translate(-50%, -54%);
    border: 1px solid rgba(234, 215, 170, .2);
    border-radius: 50%;
    color: rgba(234, 215, 170, .12);
    background:
        radial-gradient(circle at 35% 28%, rgba(234, 215, 170, .16), transparent 36%),
        radial-gradient(circle at 66% 70%, rgba(101, 199, 123, .14), transparent 42%),
        rgba(255, 255, 255, .025);
    font-family: Georgia, serif;
    font-size: clamp(3.7rem, 8vw, 6.8rem);
    font-weight: 950;
    letter-spacing: -.08em;
}

.premium-tables-grid > .empty-state:only-child::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 22px;
    border-radius: 15px;
    background-image:
        linear-gradient(30deg, transparent 47%, rgba(234, 215, 170, .12) 48%, transparent 49%),
        linear-gradient(150deg, transparent 47%, rgba(101, 199, 123, .1) 48%, transparent 49%);
    background-size: 76px 76px;
    opacity: .28;
    mask-image: radial-gradient(circle at center, #000 0 30%, transparent 68%);
}

.premium-tables-grid > .empty-state:only-child > div {
    max-width: 500px;
    display: grid;
    gap: 8px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.premium-tables-grid > .empty-state:only-child strong {
    color: #fff9ec;
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
    letter-spacing: -.02em;
}

@media (max-width: 760px) {
    .premium-tables-grid > .empty-state:only-child {
        min-height: 300px;
        padding: 28px 18px;
    }
}

/* R229 - Lobby table card compatta 2/4 giocatori */
.premium-table-card {
    min-height: 0;
    padding: 12px 14px;
}

.premium-table-card .table-card-top {
    align-items: center;
}

.premium-table-card .premium-owner-avatar,
.premium-table-card .table-seat-preview-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    flex: 0 0 34px;
    overflow: hidden;
    border-radius: 50%;
}

.premium-table-card .premium-owner-avatar img,
.premium-table-card .table-seat-preview-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
}

.premium-table-card .premium-table-visual {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) 84px minmax(130px, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 6px 14px;
    margin-top: 8px;
}

.premium-table-card .table-seat-preview {
    display: contents;
}

.premium-table-card .table-seat-preview-column {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.premium-table-card .table-seat-preview-column:first-child {
    grid-column: 1;
    grid-row: 1;
}

.premium-table-card .table-seat-preview-column:last-child {
    grid-column: 3;
    grid-row: 1;
}

.premium-table-card .table-seat-preview-slot {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
}

.premium-table-card .table-seat-preview-slot > div {
    min-width: 0;
}

.premium-table-card .table-seat-preview-slot strong,
.premium-table-card .table-seat-preview-slot span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.premium-table-card .table-seat-preview-slot strong {
    font-size: .76rem;
}

.premium-table-card .table-seat-preview-slot span {
    margin-top: 1px;
    color: var(--muted);
    font-size: .61rem;
}

.premium-table-card .premium-mini-table {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
}

.premium-table-card .premium-card-mark {
    width: auto;
    height: auto;
    background: transparent;
    box-shadow: none;
    transform: none;
    color: var(--gold-light);
    font-size: 1rem;
    font-weight: 950;
    letter-spacing: .08em;
}

.premium-table-card .premium-seats {
    display: none;
}

.premium-table-card .premium-table-details {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    min-width: 0;
    text-align: center;
}

.premium-table-card .premium-table-details strong,
.premium-table-card .premium-table-details span {
    display: inline;
    margin: 0;
    font-size: .65rem;
}

.premium-table-card .premium-table-details span::before {
    content: "· ";
}

.premium-table-card .premium-occupancy {
    height: 4px;
    margin-top: 7px;
}

.premium-table-card .premium-table-footer {
    margin-top: 6px;
    font-size: .6rem;
}

.premium-table-card .premium-table-actions {
    margin-top: 7px;
}

.premium-table-card .table-card-actions-three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.premium-table-card .table-card-actions-three .mini-button {
    width: 100%;
    min-width: 0;
    padding: 6px 7px;
}

@media (max-width: 560px) {
    .premium-table-card {
        padding: 11px;
    }

    .premium-table-card .premium-table-visual {
        grid-template-columns: minmax(90px, 1fr) 64px minmax(90px, 1fr);
        gap: 6px 8px;
    }

    .premium-table-card .premium-mini-table {
        width: 60px;
        height: 60px;
    }

    .premium-table-card .premium-owner-avatar,
    .premium-table-card .table-seat-preview-avatar {
        width: 29px;
        height: 29px;
        min-width: 29px;
        min-height: 29px;
        flex-basis: 29px;
    }

    .premium-table-card .table-seat-preview-slot {
        grid-template-columns: 29px minmax(0, 1fr);
        gap: 5px;
    }

    .premium-table-card .table-seat-preview-slot strong {
        font-size: .68rem;
    }

    .premium-table-card .table-seat-preview-slot span {
        font-size: .56rem;
    }

    .premium-table-card .premium-table-footer {
        gap: 6px;
        font-size: .56rem;
    }
}

/* R229.2 - Mini tavolo lobby con identità visiva SB */
.premium-table-card .premium-mini-table {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(234, 215, 170, .20);
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 28%, rgba(234, 215, 170, .16), transparent 36%),
        radial-gradient(circle at 66% 70%, rgba(101, 199, 123, .14), transparent 42%),
        linear-gradient(145deg, rgba(19, 34, 24, .94), rgba(9, 17, 12, .92));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .04),
        inset 0 0 0 1px rgba(255, 255, 255, .025),
        0 8px 18px rgba(0,0,0,.22);
}

.premium-table-card .premium-mini-table::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background-image:
        linear-gradient(30deg, transparent 47%, rgba(234, 215, 170, .10) 48%, transparent 49%),
        linear-gradient(150deg, transparent 47%, rgba(101, 199, 123, .09) 48%, transparent 49%);
    background-size: 28px 28px;
    opacity: .32;
    pointer-events: none;
}

.premium-table-card .premium-mini-table::after {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(234, 215, 170, .10);
    border-radius: 50%;
    pointer-events: none;
}

.premium-table-card .premium-card-mark {
    position: relative;
    z-index: 1;
    width: auto;
    height: auto;
    display: block;
    background: transparent;
    box-shadow: none;
    transform: none;
    color: rgba(234, 215, 170, .24);
    font-family: Georgia, serif;
    font-size: 1.55rem;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -.08em;
    text-shadow: 0 1px 0 rgba(255,255,255,.03);
}

@media (max-width: 560px) {
    .premium-table-card .premium-mini-table::before {
        inset: 6px;
        background-size: 22px 22px;
    }

    .premium-table-card .premium-mini-table::after {
        inset: 4px;
    }

    .premium-table-card .premium-card-mark {
        font-size: 1.22rem;
    }
}

/* R229.3 - Simmetria posti attorno al tavolo SB */
.premium-table-card .premium-table-visual {
    grid-template-columns:
        minmax(110px, 175px)
        78px
        minmax(110px, 175px);
    justify-content: center;
    column-gap: 18px;
}

.premium-table-card .table-seat-preview-column {
    width: 100%;
}

.premium-table-card .table-seat-preview-column:first-child
.table-seat-preview-slot {
    grid-template-columns: minmax(0, 1fr) 34px;
}

.premium-table-card .table-seat-preview-column:first-child
.table-seat-preview-avatar {
    grid-column: 2;
    grid-row: 1;
}

.premium-table-card .table-seat-preview-column:first-child
.table-seat-preview-slot > div {
    grid-column: 1;
    grid-row: 1;
    text-align: right;
}

.premium-table-card .table-seat-preview-column:last-child
.table-seat-preview-slot {
    grid-template-columns: 34px minmax(0, 1fr);
}

@media (max-width: 560px) {
    .premium-table-card .premium-table-visual {
        grid-template-columns:
            minmax(82px, 120px)
            60px
            minmax(82px, 120px);
        column-gap: 10px;
    }

    .premium-table-card .table-seat-preview-column:first-child
    .table-seat-preview-slot {
        grid-template-columns: minmax(0, 1fr) 29px;
    }

    .premium-table-card .table-seat-preview-column:last-child
    .table-seat-preview-slot {
        grid-template-columns: 29px minmax(0, 1fr);
    }
}

/* R229.4 - Logo favicon nel tavolo lobby */
.premium-table-card .premium-mini-table {
    width: 88px;
    height: 88px;
}

.premium-table-card .premium-card-mark {
    display: grid;
    place-items: center;
}

.premium-table-card .premium-card-mark img {
    display: block;
    width: 56px;
    height: 56px;
    max-width: 56px;
    max-height: 56px;
    object-fit: contain;
}

@media (max-width: 560px) {
    .premium-table-card .premium-mini-table {
        width: 68px;
        height: 68px;
    }

    .premium-table-card .premium-card-mark img {
        width: 44px;
        height: 44px;
        max-width: 44px;
        max-height: 44px;
    }
}

/* R229.5 - Tavolo lobby grande con logo trasparente */
.premium-table-card .premium-table-visual {
    grid-template-columns:
        minmax(110px, 175px)
        124px
        minmax(110px, 175px);
    column-gap: 22px;
}

.premium-table-card .premium-mini-table {
    width: 124px;
    height: 124px;
}

.premium-table-card .premium-card-mark img {
    width: 94px;
    height: 94px;
    max-width: 94px;
    max-height: 94px;
}

@media (max-width: 560px) {
    .premium-table-card .premium-table-visual {
        grid-template-columns:
            minmax(78px, 110px)
            88px
            minmax(78px, 110px);
        column-gap: 8px;
    }

    .premium-table-card .premium-mini-table {
        width: 88px;
        height: 88px;
    }

    .premium-table-card .premium-card-mark img {
        width: 66px;
        height: 66px;
        max-width: 66px;
        max-height: 66px;
    }
}

/* R229.6 - Tavolo lobby con verde più soffuso e bordo illuminato */
.premium-table-card .premium-mini-table {
    border: 1px solid rgba(234, 215, 170, .34);
    background:
        radial-gradient(circle at 50% 42%,
            rgba(76, 132, 91, .96) 0%,
            rgba(50, 96, 63, .97) 42%,
            rgba(28, 56, 39, .98) 72%,
            rgba(12, 24, 17, 1) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .05),
        inset 0 0 0 1px rgba(255, 255, 255, .03),
        0 0 0 1px rgba(101, 199, 123, .14),
        0 0 18px rgba(101, 199, 123, .16),
        0 0 34px rgba(234, 215, 170, .10),
        0 10px 24px rgba(0, 0, 0, .24);
}

.premium-table-card .premium-mini-table::after {
    inset: 4px;
    border: 1px solid rgba(234, 215, 170, .18);
    box-shadow:
        inset 0 0 10px rgba(234, 215, 170, .04);
}

@media (max-width: 560px) {
    .premium-table-card .premium-mini-table {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, .05),
            inset 0 0 0 1px rgba(255, 255, 255, .03),
            0 0 0 1px rgba(101, 199, 123, .12),
            0 0 14px rgba(101, 199, 123, .14),
            0 0 24px rgba(234, 215, 170, .08),
            0 8px 18px rgba(0, 0, 0, .22);
    }
}

/* R229.7 - Placeholder discreto per posti liberi */
.premium-table-card .table-seat-preview-avatar.seat-placeholder {
    display: grid;
    place-items: center;
    border: 1px solid rgba(234, 215, 170, .16);
    background:
        radial-gradient(circle at 35% 30%,
            rgba(255,255,255,.035),
            rgba(255,255,255,.012) 55%,
            rgba(0,0,0,.08));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.025);
    opacity: .78;
}

@media (max-width: 560px) {
    .premium-table-card .table-seat-preview-avatar.seat-placeholder {
        opacity: .72;
    }
}

/* R229.8 - Posti giocatore più leggibili */
.premium-table-card .premium-owner-avatar,
.premium-table-card .table-seat-preview-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    flex: 0 0 40px;
}

.premium-table-card .table-seat-preview-slot {
    gap: 8px;
}

.premium-table-card .table-seat-preview-slot strong {
    font-size: .84rem;
}

.premium-table-card .table-seat-preview-slot span {
    font-size: .67rem;
}

.premium-table-card .table-seat-preview-column:first-child
.table-seat-preview-slot {
    grid-template-columns: minmax(0, 1fr) 40px;
}

.premium-table-card .table-seat-preview-column:last-child
.table-seat-preview-slot {
    grid-template-columns: 40px minmax(0, 1fr);
}

@media (max-width: 560px) {
    .premium-table-card .premium-owner-avatar,
    .premium-table-card .table-seat-preview-avatar {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
        flex-basis: 34px;
    }

    .premium-table-card .table-seat-preview-slot strong {
        font-size: .74rem;
    }

    .premium-table-card .table-seat-preview-slot span {
        font-size: .61rem;
    }

    .premium-table-card .table-seat-preview-column:first-child
    .table-seat-preview-slot {
        grid-template-columns: minmax(0, 1fr) 34px;
    }

    .premium-table-card .table-seat-preview-column:last-child
    .table-seat-preview-slot {
        grid-template-columns: 34px minmax(0, 1fr);
    }
}

/* R229.9 - Dettagli tavolo più leggibili */
.premium-table-card .premium-table-details strong {
    font-size: .78rem;
}

.premium-table-card .premium-table-details span {
    font-size: .72rem;
}

@media (max-width: 560px) {
    .premium-table-card .premium-table-details strong {
        font-size: .72rem;
    }

    .premium-table-card .premium-table-details span {
        font-size: .66rem;
    }
}

/* R229.10 - Smazzate più leggibili */
.premium-table-card .premium-table-details span {
    color: #f4f1e8;
    font-weight: 700;
}

/* Private chat lobby panel: r232 */
.topbar-private-chat-button {
    position: relative;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255,255,255,.03);
    color: var(--gold-light);
    font-size: 1rem;
    cursor: pointer;
}

.topbar-private-chat-button:hover,
.topbar-private-chat-button:focus-visible {
    border-color: rgba(200,170,109,.48);
    background: rgba(200,170,109,.1);
    outline: none;
}

.topbar-private-chat-button strong {
    position: absolute;
    top: -5px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    border: 2px solid var(--bg);
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: .55rem;
}

.topbar-private-chat-button strong[hidden] {
    display: none;
}

.private-chat-drawer {
    z-index: 55;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.private-chat-drawer .drawer-header {
    margin-bottom: 0;
}

.private-chat-drawer-status {
    min-height: 20px;
    color: var(--muted);
    font-size: .76rem;
}

.private-chat-drawer-status.connected {
    color: #bfe4c4;
}

.private-chat-drawer-status.error {
    color: #efb0b0;
}

.private-chat-drawer-section,
.private-chat-drawer-list {
    display: grid;
    gap: 10px;
}

.private-chat-section-heading,
.private-chat-list-title,
.private-chat-list-preview,
.private-chat-list-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.private-chat-section-heading h3 {
    margin: 0;
    font-size: .92rem;
}

.private-chat-empty {
    padding: 18px 12px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.45;
    text-align: center;
}

.private-chat-request,
.private-chat-conversation {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr);
    gap: 10px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255,255,255,.025);
}

.private-chat-conversation {
    color: inherit;
    text-decoration: none;
}

.private-chat-conversation:hover,
.private-chat-conversation:focus-visible {
    border-color: rgba(200,170,109,.42);
    background: rgba(200,170,109,.075);
    outline: none;
}

.private-chat-list-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(200,170,109,.22);
    border-radius: 50%;
    background: rgba(200,170,109,.08);
    color: var(--gold-light);
    font-size: .72rem;
    font-weight: 900;
}

.private-chat-list-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.private-chat-list-copy {
    min-width: 0;
}

.private-chat-list-title strong,
.private-chat-list-preview span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.private-chat-list-title strong {
    font-size: .79rem;
}

.private-chat-list-preview {
    margin-top: 5px;
    color: var(--muted);
    font-size: .69rem;
}

.private-chat-list-meta {
    margin-top: 6px;
    color: var(--muted);
    font-size: .61rem;
}

.private-chat-unread {
    min-width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: .56rem;
    font-weight: 900;
}

.private-chat-closed {
    color: #e6b5b5;
}

.private-chat-request-actions {
    display: flex;
    gap: 7px;
    margin-top: 9px;
}

.private-chat-request-actions button {
    flex: 1;
}

.private-chat-vip-note {
    margin: auto 0 0;
    padding: 12px;
    border: 1px solid rgba(200,170,109,.18);
    border-radius: 12px;
    background: rgba(200,170,109,.055);
    color: var(--muted);
    font-size: .7rem;
    line-height: 1.5;
}

.private-chat-vip-note a {
    color: var(--gold-light);
}

@media (max-width: 560px) {
    .private-chat-drawer {
        padding: 20px 16px;
    }

    .topbar-private-chat-button {
        width: 36px;
        height: 36px;
    }
}

/* Private chat user search: r232 */
.private-chat-search-form {
    display: grid;
    gap: 7px;
}

.private-chat-search-form label {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 700;
}

.private-chat-search-row {
    display: flex;
    gap: 8px;
}

.private-chat-search-row input {
    min-width: 0;
    flex: 1;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    background: rgba(0,0,0,.18);
    color: var(--text);
    font: inherit;
    font-size: .76rem;
}

.private-chat-search-row input:focus {
    border-color: rgba(200,170,109,.52);
}

.private-chat-search-row button {
    flex: 0 0 auto;
}

.private-chat-search-status {
    min-height: 17px;
    color: var(--muted);
    font-size: .66rem;
}

.private-chat-search-status.error {
    color: #efb0b0;
}

.private-chat-search-result {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr);
    gap: 10px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255,255,255,.025);
}

.private-chat-search-result .mini-button {
    margin-top: 9px;
}

.private-chat-search-result .mini-button:disabled {
    opacity: .48;
    cursor: not-allowed;
}

@media (max-width: 430px) {
    .private-chat-search-row {
        display: grid;
    }

    .private-chat-search-row button {
        width: 100%;
    }
}

/* Private chat drawer redesign: r232 */
.private-chat-drawer {
    width: min(430px, 100%);
    padding: 24px;
    gap: 14px;
    background:
        radial-gradient(circle at 100% 0,
            rgba(200,170,109,.08),
            transparent 34%),
        rgba(15,22,17,.985);
}

.private-chat-drawer .drawer-header {
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,.065);
}

.private-chat-drawer .drawer-header h2 {
    font-size: 1.5rem;
}

.private-chat-drawer-status {
    min-height: 0;
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 9px;
    background: rgba(255,255,255,.025);
    font-size: .68rem;
}

.private-chat-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,.065);
    border-radius: 12px;
    background: rgba(0,0,0,.16);
}

.private-chat-tabs button {
    min-width: 0;
    padding: 9px 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: .7rem;
    font-weight: 800;
    cursor: pointer;
}

.private-chat-tabs button:hover,
.private-chat-tabs button:focus-visible {
    color: var(--text);
    outline: none;
}

.private-chat-tabs button.active {
    background: linear-gradient(
        135deg,
        rgba(200,170,109,.2),
        rgba(200,170,109,.09)
    );
    color: var(--gold-light);
    box-shadow: inset 0 0 0 1px rgba(200,170,109,.2);
}

.private-chat-drawer-section[hidden] {
    display: none;
}

.private-chat-drawer-section {
    gap: 8px;
    animation: privateChatPanelIn .16s ease;
}

.private-chat-section-heading {
    min-height: 32px;
}

.private-chat-section-heading h3 {
    margin: 1px 0 0;
    font-size: .86rem;
}

.private-chat-section-kicker {
    display: block;
    color: var(--gold);
    font-size: .52rem;
    font-weight: 900;
    letter-spacing: .15em;
}

.private-chat-empty {
    min-height: 62px;
    display: grid;
    place-items: center;
    padding: 13px;
    border-radius: 11px;
    font-size: .69rem;
}

.private-chat-request,
.private-chat-conversation,
.private-chat-search-result {
    grid-template-columns: 38px minmax(0,1fr);
    gap: 9px;
    padding: 10px;
    border-radius: 12px;
    transition:
        border-color .16s ease,
        background .16s ease,
        transform .16s ease;
}

.private-chat-conversation:hover,
.private-chat-conversation:focus-visible {
    transform: translateX(-2px);
}

.private-chat-list-avatar {
    width: 38px;
    height: 38px;
}

.private-chat-list-title strong {
    font-size: .76rem;
}

.private-chat-list-preview {
    margin-top: 3px;
    font-size: .66rem;
}

.private-chat-list-meta {
    margin-top: 4px;
    font-size: .58rem;
}

.private-chat-request-actions {
    margin-top: 7px;
}

.private-chat-request-actions button {
    padding: 7px 8px;
    font-size: .64rem;
}

.private-chat-search-form {
    gap: 6px;
}

.private-chat-search-row input {
    padding: 9px 10px;
}

.private-chat-search-clear {
    justify-self: end;
    padding: 6px 9px;
    font-size: .62rem;
}

.private-chat-vip-note {
    margin-top: 4px;
    padding: 10px;
    font-size: .65rem;
}

.private-chat-conversation-drawer {
    z-index: 60;
    width: min(760px, 100%);
    padding: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0,1fr);
    background: #0f1611;
}

.private-chat-conversation-drawer-header {
    min-height: 72px;
    display: grid;
    grid-template-columns: 40px minmax(0,1fr) 40px;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(
            135deg,
            rgba(200,170,109,.07),
            transparent 48%
        ),
        #111914;
}

.private-chat-conversation-drawer-header h2 {
    overflow: hidden;
    margin: 2px 0 0;
    font-size: 1.05rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.private-chat-drawer-back {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255,255,255,.03);
    color: var(--gold-light);
    font-size: 1.05rem;
    cursor: pointer;
}

.private-chat-drawer-back:hover,
.private-chat-drawer-back:focus-visible {
    border-color: rgba(200,170,109,.42);
    background: rgba(200,170,109,.1);
    outline: none;
}

#private-chat-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #0f1611;
}

@keyframes privateChatPanelIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
}

@media (max-width: 560px) {
    .private-chat-drawer {
        padding: 18px 14px;
    }

    .private-chat-conversation-drawer-header {
        min-height: 64px;
        padding: 9px 12px;
    }

    .private-chat-conversation-drawer-header h2 {
        font-size: .94rem;
    }
}

/* Private chat proportional drawer refinement: r232 */
.private-chat-drawer,
.private-chat-conversation-drawer {
    top: 78px;
    height: calc(100dvh - 78px);
}

.private-chat-drawer {
    width: min(400px, calc(100% - 16px));
}

.private-chat-conversation-drawer {
    width: min(520px, calc(100% - 16px));
    box-shadow: -22px 0 60px rgba(0,0,0,.4);
}

.private-chat-conversation-drawer-header {
    min-height: 64px;
    padding: 9px 14px;
}

@media (max-width: 560px) {
    .private-chat-drawer,
    .private-chat-conversation-drawer {
        top: 66px;
        width: 100%;
        height: calc(100dvh - 66px);
    }
}

/* Chat Lobby shadow correction: r232 */
.chat-panel {
    box-shadow: none;
}

/* Closed drawer shadow correction: r232 */
.drawer:not(.open) {
    box-shadow: none;
}


/* Topbar Social and Marketplace navigation: r233 */
.topbar-page-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.topbar-page-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255,255,255,.03);
    color: var(--muted);
    text-decoration: none;
    font-size: .72rem;
    font-weight: 800;
    white-space: nowrap;
}

.topbar-page-link:hover,
.topbar-page-link:focus-visible {
    border-color: rgba(200,170,109,.48);
    background: rgba(200,170,109,.1);
    color: var(--text);
    outline: none;
}

@media (max-width: 1120px) {
    .topbar-page-link {
        width: 38px;
        padding: 0;
        border-radius: 50%;
    }

    .topbar-page-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

@media (max-width: 980px) {
    .topbar {
        grid-template-columns: 1fr auto;
    }

    .live-summary {
        display: none;
    }
}

@media (max-width: 390px) {
    .topbar {
        gap: 6px;
        padding-inline: 8px;
    }

    .brand-placeholder {
        min-width: 42px;
        padding-inline: 6px;
    }

    .profile-menu,
    .topbar-page-links {
        gap: 4px !important;
    }

    .topbar-page-link,
    .topbar-private-chat-button,
    .topbar-notification-button,
    .profile-button .avatar,
    .icon-button {
        width: 34px;
        height: 34px;
        min-height: 34px;
    }
}


/* Realtime status hidden from topbar: r233 */
#lobby-connection {
    display: none !important;
}


/* My current game action: r233 */
.table-heading-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.my-current-game-button {
    min-height: 38px;
    white-space: nowrap;
    transition:
        opacity .16s,
        border-color .16s,
        background .16s,
        color .16s;
}

.my-current-game-button:disabled {
    opacity: .42;
    cursor: not-allowed;
}

.my-current-game-button:not(:disabled) {
    border-color: rgba(117, 209, 138, .42);
    background: rgba(117, 209, 138, .1);
    color: #c8efcf;
}

.my-current-game-button:not(:disabled):hover,
.my-current-game-button:not(:disabled):focus-visible {
    border-color: rgba(117, 209, 138, .68);
    background: rgba(117, 209, 138, .17);
    outline: none;
}

@media (max-width: 760px) {
    .tables-panel .panel-heading {
        flex-wrap: wrap;
    }

    .table-heading-actions {
        width: 100%;
        order: 3;
    }

    .table-heading-actions > button {
        flex: 1 1 0;
    }
}

@media (max-width: 390px) {
    .table-heading-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}


/* Table heading visual refinement: r233 */
.tables-panel .panel-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 16px;
}

.tables-panel .table-heading-actions {
    width: auto;
    display: flex;
    grid-column: 2;
    grid-row: 1;
    align-items: center;
    gap: 8px;
}

.tables-panel .table-heading-actions > button {
    min-height: 40px;
    height: 40px;
    padding: 0 13px;
    white-space: nowrap;
    line-height: 1;
}

.tables-panel .table-stats {
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-top: -2px;
}

.tables-panel .my-current-game-button:disabled {
    opacity: .62;
    color: #89928b;
}

@media (max-width: 760px) {
    .tables-panel .panel-heading {
        grid-template-columns: minmax(0, 1fr);
    }

    .tables-panel .table-heading-actions {
        width: 100%;
        grid-column: 1;
        grid-row: auto;
    }

    .tables-panel .table-heading-actions > button {
        flex: 1 1 0;
    }

    .tables-panel .table-stats {
        grid-column: 1;
        justify-content: flex-start;
        margin-top: 0;
    }
}


/* Hide successful private-chat realtime status: r233 */
.private-chat-drawer-status.connected {
    display: none;
}


/* Private chat iframe flash prevention: r233 */
#private-chat-frame {
    opacity: 0;
    background: #0f1611;
    color-scheme: dark;
}

#private-chat-frame.loaded {
    opacity: 1;
}


/* Lobby profile nickname single line: r233 */

/* Avatar, nickname e livello non vengono compressi su desktop. */
.profile-menu {
    min-width: max-content;
}

.profile-button {
    min-width: max-content;
    flex: 0 0 auto;
}

.profile-copy {
    min-width: 92px;
    flex: 0 0 auto;
}

.profile-copy strong,
.profile-copy small {
    display: block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 560px) {
    .profile-menu,
    .profile-button,
    .profile-copy {
        min-width: 0;
    }
}
