#gamesPanel { max-width: 100vw; }
#gamesPanel .extra-game { text-align: left; }
#gamesPanel .extra-game h2 { font-size: 21px; margin: 0 0 10px; }
#gamesPanel .extra-game p { margin: 8px 0; font-size: 13px; line-height: 1.45; color: #d3ced2; }
#gamesPanel .extra-game .eg-status { min-height: 1.5em; color: #f0b5ac; }
#gamesPanel .eg-score { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
#gamesPanel .eg-board, #gamesPanel .eg-road { box-sizing: border-box; width: 100%; touch-action: none; user-select: none; border: 1px solid #554148; border-radius: 9px; }
#gamesPanel .eg-road { display: block; height: auto; }
#gamesPanel .eg-board { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; padding: 5px; background: #14151a; }
#gamesPanel .eg-tile { aspect-ratio: 1; background: #24252e; border-radius: 5px; display: grid; align-content: center; justify-items: center; line-height: 1; gap: 3px; }
#gamesPanel .eg-tile[data-level] { background: hsl(var(--h) 32% var(--l)); color: white; }
#gamesPanel .eg-tile b { font-size: clamp(17px,5vw,23px); }
#gamesPanel .eg-tile svg { width: 34px; height: 15px; fill: currentColor; opacity: .8; }
#gamesPanel .eg-tile small { font-size: 9px; }
#gamesPanel .eg-controls { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
#gamesPanel .eg-controls button { min-height: 42px; border: 1px solid #69404a; border-radius: 6px; background: #38252d; color: #fff; padding: 6px 12px; cursor: pointer; }
#gamesPanel .eg-controls button { flex: 1; font-size: 17px; }
#gamesPanel .extra-game :focus-visible { outline: 2px solid #ed9290; outline-offset: 2px; }
@media (max-width: 768px) {
    body #gamesToggle { display: block !important; }
    body #gamesToggle.eg-open { display: none !important; }
    #gamesPanel { height: 100dvh; overscroll-behavior: contain; }
}

#gamesPanel .eg-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
#gamesPanel :is(.eg-action, .eg-pause) {
    margin: 0;
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    background: #2b2e3d;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s;
}
#gamesPanel .eg-pause[hidden] { display: none; }
#gamesPanel :is(.eg-action, .eg-pause):hover { background: #383c50; }

body #gamesToggle {
    animation: none;
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    white-space: nowrap;
    letter-spacing: .045em;
    line-height: 1;
    width: 40px;
    padding: 13px 0;
    text-align: center;
    box-sizing: border-box;
    border: 1px solid #623a42;
    border-right: 0;
    border-radius: 10px 0 0 10px;
    background: linear-gradient(105deg, #46262e, #25232c 75%);
    color: #f5edef;
    box-shadow: inset 2px 0 #aa505b, -3px 4px 14px rgba(0,0,0,.24);
}
body #gamesToggle::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin: 0 0 7px;
    vertical-align: middle;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e4a0a5' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 6h10c2 0 3 2 3.5 4l1 5c.6 3-1.6 4.7-3.7 2.5L15 15H9l-2.8 2.5C4 19.7 2 18 2.5 15l1-5C4 8 5 6 7 6Z'/%3E%3Cpath d='M6 10.5h4m-2-2v4m7-2.5h.2m2 2h.2'/%3E%3C/svg%3E");
}
body #gamesToggle:hover { border-color: #9c575f; background: linear-gradient(105deg, #582d38, #302832 75%); }
body #gamesToggle:focus-visible { outline: 2px solid #e6a1a5; outline-offset: 2px; }
@media (max-width: 768px) {
    body #gamesToggle { padding: 10px 0; width: 44px; font-size: 13px; }
}
