#yc-ludo-root {
    position: relative;
    z-index: 10040;
    pointer-events: none;
}

.yc-ludo-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    z-index: 10040;
    pointer-events: none;
    box-sizing: border-box;
}

.yc-ludo-panel {
    width: min(520px, 100%);
    max-height: min(92dvh, 92vh);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, #1a1f35 0%, #0f1324 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    color: #f3f4f6;
    font-family: Tahoma, Arial, sans-serif;
    box-sizing: border-box;
    pointer-events: auto;
}

.yc-ludo-lobby-panel {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.yc-ludo-game-panel {
    --yc-ludo-chrome-h: 200px;
    width: min(560px, 100%);
    height: min(94dvh, 94vh);
    max-height: min(94dvh, 94vh);
    overflow: hidden;
}

.yc-ludo-classic-wrap {
    flex: 1 1 0;
    min-height: 0;
    padding: 4px 8px 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    container-type: size;
    container-name: yc-ludo-board;
}

.yc-ludo-classic-wrap .ludo-board-wrap {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    box-sizing: border-box;
}

.yc-ludo-head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.yc-ludo-head h2 {
    margin: 0;
    font-size: clamp(0.95rem, 3.5vw, 1.15rem);
    font-weight: 700;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yc-ludo-head__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.yc-ludo-close,
.yc-ludo-minimize {
    border: 0;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.yc-ludo-sub {
    margin: 0;
    padding: 10px 16px 0;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.yc-ludo-slots {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
}

.yc-ludo-slot {
    display: grid;
    grid-template-columns: 6px 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.yc-ludo-slot-name {
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yc-ludo-slot-status {
    font-size: 0.75rem;
    color: #93c5fd;
    white-space: nowrap;
    flex-shrink: 0;
}

.yc-ludo-slot-color {
    width: 8px;
    height: 36px;
    border-radius: 6px;
    background: var(--slot-color, #888);
}

.yc-ludo-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.yc-ludo-invite-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    padding: 0 16px 12px;
}

.yc-ludo-invite-row label {
    font-size: 0.85rem;
    color: #cbd5e1;
}

.yc-ludo-invite-row select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #111827;
    color: #fff;
    font-size: 0.9rem;
}

.yc-ludo-invite-row .yc-ludo-btn {
    width: 100%;
}

.yc-ludo-actions {
    padding: 0 16px 16px;
    display: flex;
    gap: 10px;
}

.yc-ludo-actions .yc-ludo-btn {
    flex: 1;
}

.yc-ludo-btn {
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 700;
    color: #fff;
}

.yc-ludo-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.yc-ludo-btn-primary { background: #2563eb; }
.yc-ludo-btn-success { background: #16a34a; }
.yc-ludo-btn-danger { background: #dc2626; }

.yc-ludo-invite-popup {
    position: fixed;
    inset: 0;
    z-index: 10210;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
}

.yc-ludo-invite-card {
    width: min(360px, 92vw);
    background: #1e293b;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    color: #fff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
}

.yc-ludo-invite-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 14px;
}

.yc-ludo-turn-bar {
    flex-shrink: 0;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.15);
    color: #bfdbfe;
    font-size: 0.92rem;
}

.yc-ludo-toolbar {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px 16px;
    align-items: start;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.22);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.yc-ludo-toolbar__section {
    min-width: 0;
}

.yc-ludo-toolbar__label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.yc-ludo-toolbar__hint {
    color: #64748b;
    font-size: 0.85rem;
}

.yc-ludo-toolbar__dice {
    display: flex;
    justify-content: center;
}

.yc-ludo-emoji-section {
    flex-shrink: 0;
    padding: 0 12px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.yc-ludo-emoji-label {
    padding-top: 8px;
    margin-bottom: 4px;
}

.yc-ludo-dice-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 72px;
}

.yc-ludo-dice-btn {
    border: 0;
    background: linear-gradient(180deg, #fff 0%, #e8e8e8 100%);
    border-radius: 12px;
    padding: 6px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    line-height: 0;
    transition: transform 0.15s, box-shadow 0.15s;
}

.yc-ludo-dice-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.yc-ludo-dice-btn:not(:disabled):active {
    transform: scale(0.95);
}

.yc-ludo-dice-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.yc-ludo-dice-face {
    display: block;
    width: clamp(52px, 14vw, 72px);
    height: clamp(52px, 14vw, 72px);
    background: center / contain no-repeat;
    border-radius: 8px;
}

.yc-ludo-dice-face.is-rolling {
    animation: ycLudoDiceRoll 0.55s ease;
}

.yc-ludo-dice-num {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fde047;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    min-height: 1.4em;
}

.yc-ludo-dice-label {
    font-size: 0.78rem;
    color: #94a3b8;
}

@keyframes ycLudoDiceRoll {
    0% { transform: rotate(0deg) scale(1); }
    35% { transform: rotate(180deg) scale(0.85); }
    70% { transform: rotate(360deg) scale(1.08); }
    100% { transform: rotate(360deg) scale(1); }
}

.yc-ludo-pieces {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
}

.yc-ludo-piece-btn {
    border: 0;
    border-radius: 10px;
    padding: 0;
    min-height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: background 0.15s, transform 0.12s;
}

.yc-ludo-piece-num {
    font-size: clamp(0.85rem, 3vw, 1rem);
}

.yc-ludo-piece-btn:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.18);
}

.yc-ludo-piece-btn.can-move {
    background: linear-gradient(180deg, #4ade80, #16a34a);
    color: #052e16;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.35);
}

.yc-ludo-piece-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.yc-ludo-emoji-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 4px 0 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.yc-ludo-emoji-btn {
    border: 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 4px 6px;
    font-size: 1.2rem;
    cursor: pointer;
}

.yc-ludo-emoji-float {
    min-height: 36px;
    padding: 0 12px 8px;
}

.yc-ludo-emoji-bubble {
    display: inline-block;
    margin: 4px 6px 0 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    animation: ycLudoEmojiPop 3.5s ease forwards;
}

@keyframes ycLudoEmojiPop {
    0% { opacity: 0; transform: translateY(8px); }
    10% { opacity: 1; transform: translateY(0); }
    85% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-6px); }
}

.yc-ludo-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10080;
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.yc-ludo-float-restore {
    position: fixed;
    bottom: 80px;
    right: 16px;
    left: auto;
    z-index: 10055;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.yc-ludo-float-restore img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yc-ludo-game-overlay.yc-ludo-minimized {
    display: none;
}

.yc-ludo-win-modal {
    position: fixed;
    inset: 0;
    z-index: 10090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(8, 12, 28, 0.82);
    backdrop-filter: blur(8px);
    animation: ycLudoWinFade 0.25s ease;
}

@keyframes ycLudoWinFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.yc-ludo-win-card {
    width: min(360px, 92vw);
    padding: 28px 24px;
    border-radius: 18px;
    background: linear-gradient(145deg, #1e2744 0%, #12182e 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    color: #f3f4f6;
}

.yc-ludo-win-icon {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 12px;
}

.yc-ludo-win-card h3 {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 800;
}

.yc-ludo-win-name {
    margin: 0 0 6px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fde047;
}

.yc-ludo-win-sub {
    margin: 0 0 20px;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.yc-ludo-win-card .yc-ludo-btn {
    min-width: 140px;
}

#yc-ludo-game .ludo-board-wrap {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

#yc-ludo-game .ludo-board {
    --ludo-frame: #8b5a3c;
    --ludo-frame-hi: #c9956e;
    --ludo-frame-lo: #5a3520;
    position: relative;
    width: min(100cqw, 100cqh);
    height: auto;
    max-width: min(100cqw, 100cqh, 100%);
    max-height: min(100cqh, 100cqw, 100%);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    grid-template-rows: repeat(15, 1fr);
    box-sizing: border-box;
    background-color: #6e3f28;
    background-image:
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(165deg, #b8724a 0, #8b5132 38%, #6e3f28 58%, #5c3322 100%);
    background-size: 8% 8%, 8% 8%, auto;
    border: clamp(3px, 1.2vw, 7px) solid;
    border-color: var(--ludo-frame-hi) var(--ludo-frame-lo) var(--ludo-frame-lo) var(--ludo-frame-hi);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,.2), 0 14px 40px rgba(0,0,0,.45),
        inset 0 0 0 2px rgba(255,255,255,.1);
    flex-shrink: 1;
}

@supports not (width: 1cqw) {
    #yc-ludo-game .ludo-board {
        width: 100%;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        aspect-ratio: 1 / 1;
    }
}

#yc-ludo-game .red-home { grid-column: 1 / 7; grid-row: 1 / 7; }
#yc-ludo-game .green-home { grid-column: 10 / 16; grid-row: 1 / 7; }
#yc-ludo-game .blue-home { grid-column: 1 / 7; grid-row: 10 / 16; }
#yc-ludo-game .yellow-home { grid-column: 10 / 16; grid-row: 10 / 16; }

#yc-ludo-game .red-home,
#yc-ludo-game .green-home,
#yc-ludo-game .blue-home,
#yc-ludo-game .yellow-home {
    border: clamp(2px, 0.5vw, 5px) solid rgba(0,0,0,.35);
    box-shadow: inset 0 2px 14px rgba(0,0,0,.22);
}

#yc-ludo-game .winner-home {
    grid-column: 7 / 10;
    grid-row: 7 / 10;
    position: relative;
    overflow: hidden;
    border-radius: 10%;
    background: #f0f0f0;
    box-shadow: inset 0 2px 10px rgba(255,255,255,.8), inset 0 -2px 8px rgba(0,0,0,.08);
    padding: 0;
}

#yc-ludo-game .winner-home .stack {
    position: absolute;
    margin: 0;
    padding: 0;
    border: none;
    width: 50%;
    height: 50%;
}

#yc-ludo-game .rwh {
    top: 0; left: 0;
    background: #ec3a28;
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

#yc-ludo-game .gwh {
    top: 0; right: 0;
    background: #0ebd46;
    clip-path: polygon(100% 0, 100% 100%, 0 0);
}

#yc-ludo-game .ywh {
    bottom: 0; right: 0;
    background: #f7c00b;
    clip-path: polygon(100% 100%, 0 100%, 100% 0);
}

#yc-ludo-game .bwh {
    bottom: 0; left: 0;
    background: #198afa;
    clip-path: polygon(0 100%, 0 0, 100% 100%);
}

#yc-ludo-game .step {
    position: relative;
    border: 1px solid rgba(0,0,0,.12);
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    min-height: 0;
    background: linear-gradient(158deg, #fff 0, #f3f3f3 52%, #ebebeb 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

#yc-ludo-game .step .fa {
    font-size: clamp(6px, 2.2vw, 11px);
    opacity: 0.85;
}

#yc-ludo-game .bg-red { background: linear-gradient(148deg, #ff6b5c, #ec3a28 45%, #b82418); }
#yc-ludo-game .bg-green { background: linear-gradient(148deg, #3be06b, #0ebd46 45%, #089030); }
#yc-ludo-game .bg-blue { background: linear-gradient(148deg, #4ca6ff, #198afa 45%, #0d5ea8); }
#yc-ludo-game .bg-yellow { background: linear-gradient(148deg, #ffd24a, #f7c00b 45%, #c79400); }

#yc-ludo-game .red-stop,
#yc-ludo-game .green-stop,
#yc-ludo-game .blue-stop,
#yc-ludo-game .yellow-stop {
    background-size: 100% 100%;
}

#yc-ludo-game .red-stop {
    background-image: repeating-linear-gradient(135deg, #ec3a28 0 25%, #e8e8e8 25% 50%, #ec3a28 50% 75%, #e8e8e8 75% 100%);
}

#yc-ludo-game .green-stop {
    background-image: repeating-linear-gradient(135deg, #0ebd46 0 25%, #e8e8e8 25% 50%, #0ebd46 50% 75%, #e8e8e8 75% 100%);
}

#yc-ludo-game .blue-stop {
    background-image: repeating-linear-gradient(135deg, #198afa 0 25%, #e8e8e8 25% 50%, #198afa 50% 75%, #e8e8e8 75% 100%);
}

#yc-ludo-game .yellow-stop {
    background-image: repeating-linear-gradient(135deg, #f7c00b 0 25%, #e8e8e8 25% 50%, #f7c00b 50% 75%, #e8e8e8 75% 100%);
}

#yc-ludo-game .super-center {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#yc-ludo-game .red-home { border-top-left-radius: 6px; }
#yc-ludo-game .green-home { border-top-right-radius: 6px; }
#yc-ludo-game .blue-home { border-bottom-left-radius: 6px; }
#yc-ludo-game .yellow-home { border-bottom-right-radius: 6px; }

#yc-ludo-game .white-box {
    width: 75%;
    height: 75%;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

#yc-ludo-game .red-home .white-box { background: radial-gradient(circle at 35% 30%, #e85a48, #7a2318); }
#yc-ludo-game .green-home .white-box { background: radial-gradient(circle at 35% 30%, #2daf56, #115e28); }
#yc-ludo-game .blue-home .white-box { background: radial-gradient(circle at 35% 30%, #3490e0, #12487d); }
#yc-ludo-game .yellow-home .white-box { background: radial-gradient(circle at 35% 30%, #e4b028, #8a6a0f); }

#yc-ludo-game .player-room {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    place-items: center;
    width: 78%;
    height: 78%;
    gap: 6%;
}

#yc-ludo-game .player {
    width: clamp(8px, 2.4vw, 16px);
    height: clamp(8px, 2.4vw, 16px);
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.95);
    box-shadow: 0 2px 5px rgba(0,0,0,.35);
    flex-shrink: 0;
}

#yc-ludo-game .step .player {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

#yc-ludo-game .step .player:nth-child(2) { transform: translate(calc(-50% + 18%), calc(-50% + 18%)); }
#yc-ludo-game .step .player:nth-child(3) { transform: translate(calc(-50% - 18%), calc(-50% + 18%)); }
#yc-ludo-game .step .player:nth-child(4) { transform: translate(calc(-50% + 18%), calc(-50% - 18%)); }

#yc-ludo-game .player.bg-red { background: radial-gradient(circle at 32% 28%, #ff8a7a, #951f14); }
#yc-ludo-game .player.bg-green { background: radial-gradient(circle at 32% 28%, #5ee889, #087d30); }
#yc-ludo-game .player.bg-yellow { background: radial-gradient(circle at 32% 28%, #ffe066, #b38900); }
#yc-ludo-game .player.bg-blue { background: radial-gradient(circle at 32% 28%, #5ab6ff, #0d5a9e); }

#yc-ludo-game .stack .player {
    position: absolute;
    width: clamp(6px, 1.8vw, 12px);
    height: clamp(6px, 1.8vw, 12px);
}

#yc-ludo-game .stack .player:nth-child(1) { top: 8%; left: 8%; }
#yc-ludo-game .stack .player:nth-child(2) { top: 22%; left: 22%; }
#yc-ludo-game .stack .player:nth-child(3) { top: 36%; left: 36%; }
#yc-ludo-game .stack .player:nth-child(4) { top: 50%; left: 50%; }

#yc-ludo-game .step .fa.fa-arrow-down.green { color: #0ebd46; }
#yc-ludo-game .step .fa.fa-arrow-right.red { color: #ec3a28; }
#yc-ludo-game .step .fa.fa-arrow-left.yellow { color: #f7c00b; }
#yc-ludo-game .step .fa.fa-arrow-up.blue { color: #198afa; }

@media (max-width: 520px) {
    .yc-ludo-overlay {
        padding: 0;
        align-items: stretch;
    }

    .yc-ludo-panel {
        width: 100%;
        max-height: 100dvh;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .yc-ludo-game-panel {
        height: 100dvh;
        max-height: 100dvh;
    }

    .yc-ludo-classic-wrap {
        padding: 4px 6px;
    }

    #yc-ludo-game .ludo-board {
        width: min(98cqw, 98cqh, 100%);
        max-width: min(98cqw, 98cqh, 100%);
        max-height: min(98cqh, 98cqw, 100%);
    }

    .yc-ludo-toolbar {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 8px 10px;
    }

    .yc-ludo-toolbar__dice {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
    }

    .yc-ludo-dice-box {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .yc-ludo-dice-face {
        width: clamp(48px, 12vw, 64px);
        height: clamp(48px, 12vw, 64px);
    }

    .yc-ludo-piece-btn {
        min-height: 44px;
    }

    .yc-ludo-slot-status {
        font-size: 0.68rem;
    }

    .yc-ludo-invite-actions {
        flex-direction: column;
    }

    .yc-ludo-invite-actions .yc-ludo-btn {
        width: 100%;
    }
}

@media (min-width: 521px) {
    .yc-ludo-panel {
        width: min(520px, 96vw);
    }

    .yc-ludo-lobby-panel {
        width: min(480px, 96vw);
    }

    .yc-ludo-game-panel {
        --yc-ludo-chrome-h: 188px;
        width: min(680px, calc(100vw - 24px), calc(100dvh - var(--yc-ludo-chrome-h)));
        height: min(96dvh, 96vh);
        max-height: min(96dvh, 96vh);
    }

    .yc-ludo-game-panel .yc-ludo-head {
        padding: 8px 12px;
    }

    .yc-ludo-game-panel .yc-ludo-turn-bar {
        padding: 5px 12px;
        font-size: 0.84rem;
    }

    .yc-ludo-slots {
        grid-template-columns: 1fr;
    }

    .yc-ludo-invite-row {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .yc-ludo-invite-row select {
        flex: 1;
        min-width: 160px;
        width: auto;
    }

    .yc-ludo-invite-row .yc-ludo-btn {
        width: auto;
        flex-shrink: 0;
    }

    .yc-ludo-emoji-section {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 10px 8px;
    }

    .yc-ludo-emoji-label {
        padding: 0;
        margin: 0;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .yc-ludo-emoji-bar {
        flex: 1;
        min-width: 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        max-height: none;
        padding: 0;
        scrollbar-width: thin;
    }

    .yc-ludo-emoji-btn {
        font-size: 1.05rem;
        padding: 3px 5px;
        flex-shrink: 0;
    }

    .yc-ludo-emoji-float {
        min-height: 20px;
        padding: 0 10px 4px;
    }

    .yc-ludo-toolbar {
        grid-template-columns: auto 1fr;
        align-items: center;
        padding: 8px 10px;
        gap: 8px 12px;
    }

    .yc-ludo-toolbar__label {
        margin-bottom: 4px;
        font-size: 0.68rem;
    }

    .yc-ludo-toolbar__dice {
        justify-content: flex-start;
    }

    .yc-ludo-dice-box {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

    .yc-ludo-dice-label {
        font-size: 0.72rem;
        max-width: 72px;
        line-height: 1.2;
    }

    .yc-ludo-dice-face {
        width: 46px;
        height: 46px;
    }

    .yc-ludo-dice-num {
        font-size: 1.05rem;
    }

    .yc-ludo-piece-btn {
        min-height: 36px;
    }

    .yc-ludo-classic-wrap {
        padding: 2px 6px;
    }

    #yc-ludo-game .ludo-board {
        width: min(100cqw, 100cqh);
        max-width: min(100cqw, 100cqh);
        max-height: min(100cqh, 100cqw);
    }
}

@media (min-width: 768px) {
    .yc-ludo-overlay {
        padding: 12px;
    }

    .yc-ludo-game-panel {
        --yc-ludo-chrome-h: 180px;
        width: min(720px, calc(100vw - 32px), calc(100dvh - var(--yc-ludo-chrome-h)));
    }

    .yc-ludo-lobby-panel {
        width: min(500px, 92vw);
    }

    .yc-ludo-slots {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .yc-ludo-game-panel {
        --yc-ludo-chrome-h: 175px;
        width: min(760px, calc(100vw - 40px), calc(100dvh - var(--yc-ludo-chrome-h)));
    }
}

.yc-ttt-overlay,
.yc-game-wait-overlay {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none;
    z-index: 10040 !important;
}

.yc-ttt-panel,
.yc-game-wait-card {
    pointer-events: auto;
}
