#sc-guide-game-actions[hidden],
#sc-guide-game-dialog [hidden] { display: none !important; }

#sc-guide-game-actions {
    position: absolute;
    right: 0;
    bottom: calc(100% + .4rem);
    display: flex;
    gap: .35rem;
    white-space: nowrap;
    z-index: 4;
}

#sc-guide-game-dialog {
    box-sizing: border-box;
    width: min(94vw, 740px);
    max-height: 92dvh;
    margin: auto;
    padding: clamp(.8rem, 3vw, 1.5rem);
    border: 1px solid #b5d5c6;
    border-radius: 16px;
    color: #18382e;
    background: #f6fcf9;
    overflow: auto;
}

#sc-guide-game-dialog::backdrop { background: rgb(12 34 29 / 65%); }
#sc-guide-game-stage:fullscreen { display: grid; place-items: center; background: #152b25; }
#sc-guide-game-stage:fullscreen canvas { width: min(100vw, 150vh); }
#sc-guide-game-dialog .sc-game-bar,
#sc-guide-game-dialog .sc-game-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .65rem; }
#sc-guide-game-dialog .sc-game-bar h2 { margin: 0 auto 0 0; color: #18382e; font-size: 1.35rem; }
#sc-guide-game-actions button,
#sc-guide-game-dialog button,
#sc-guide-game-dialog a { cursor: pointer; padding: .5rem .65rem; border: 1px solid #8fbfa9; border-radius: 8px; background: white; color: #13563e; font-weight: 600; }
#sc-guide-game-dialog button:disabled { cursor: wait; opacity: .6; }
#sc-guide-game-dialog :focus-visible { outline: 2px solid #067553; outline-offset: 2px; }

#sc-guide-game-share { padding: .7rem; margin-bottom: .65rem; border-radius: 8px; background: #e5f4eb; }
#sc-guide-game-share label { display: block; font-weight: 600; }
#sc-guide-game-share input { flex: 1 1 12rem; min-width: 0; padding: .4rem; }
#sc-guide-game-dialog p { margin: 0 0 .5rem; color: #355346; text-align: left; }
#sc-guide-game-stage canvas {
    position: static;
    display: block;
    width: min(100%, 78vh);
    height: auto;
    margin-inline: auto;
    border-radius: 8px;
    background: #152b25;
    touch-action: none;
}
#sc-guide-game-dialog .sc-game-controls { margin: .65rem 0 0; }

#sc-guide-game-dialog.sc-game-expanded {
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border-radius: 0;
}
#sc-guide-game-dialog.sc-game-expanded #sc-guide-game-stage canvas {
    width: min(100%, 105vh);
}
@media (max-width: 600px) {
    #sc-guide #sc-guide-game {
        display: block !important;
        left: 12px;
        right: auto;
        bottom: 16px;
        width: 28px;
        height: 24px;
    }
}

#sc-guide-game-dialog #sc-guide-pong:not([hidden]) { display: block !important; }
