/* 4 in a Row: standalone responsive presentation, no effect on other games. */
#fourInARowStage { text-align:center; }
#fourInARowStage h3 { margin:12px 0; }
.four-status { font-size:clamp(1rem,2.5vw,1.2rem); font-weight:700; margin:10px 0; }
.four-legend { display:flex; justify-content:center; gap:clamp(12px,4vw,28px); flex-wrap:wrap; margin:12px 0; font-size:.9rem; }
.four-legend > span { display:inline-flex; align-items:center; gap:7px; }
.four-dot { display:inline-block; width:18px; height:18px; border-radius:50%; box-shadow:inset 0 0 0 1px #0003; }
.four-red { background:#d9424a; }
.four-yellow { background:#f5c842; }
.four-board-shell { width:min(100%, 650px, calc((100dvh - 260px) * 7 / 6)); min-width:0; margin:12px auto; }
.four-board { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:clamp(2px,.6vw,6px); padding:clamp(6px,1.4vw,12px); background:#2057a7; border:3px solid #133c7d; border-radius:12px; box-shadow:0 7px 18px #10294a35; }
.four-column { display:grid; grid-template-rows:repeat(6,minmax(0,1fr)); gap:clamp(2px,.6vw,6px); border:0; padding:0; min-width:0; background:transparent; cursor:pointer; border-radius:6px; }
.four-column:disabled { opacity:1; cursor:default; }
.four-column:enabled:hover .four-empty { background:#c0d9f2; }
.four-column:focus-visible { outline:3px solid #fff; outline-offset:2px; }
.four-cell { display:block; width:100%; aspect-ratio:1; border-radius:50%; border:clamp(1px,.3vw,3px) solid #123d79; box-shadow:inset 0 2px 5px #17274435; }
.four-empty { background:#e6eef8; }
.four-winning { outline:clamp(2px,.5vw,5px) solid #fff; outline-offset:-5px; box-shadow:0 0 0 3px #173b68, inset 0 2px 6px #17274445; }
.four-last:not(.four-winning) { box-shadow:inset 0 0 0 3px #fff9; }
.four-help { margin:12px auto 4px; color:#53647a; font-size:.9rem; }
.four-error { color:#a33; min-height:1.3em; }
.four-result { margin:12px auto; padding:14px; max-width:500px; border:2px solid #2c6dba; border-radius:10px; font-weight:700; background:#eaf4ff; color:#123b70; }
@media(max-width:480px) { .four-board-shell { width:100%; } .four-board { border-width:2px; padding:5px; } .four-winning { outline-offset:-3px; } }

/* Centered final-result dialog; the board stays visible and unchanged behind it. */
.four-result-overlay:not([hidden]) { position:fixed; inset:0; z-index:1100; display:flex; justify-content:center; align-items:center; padding:20px; background:rgba(13,26,49,.7); }
.four-result-overlay[hidden] { display:none !important; }
.four-result-dialog { width:min(100%,420px); background:#fff; color:#173257; border-radius:18px; padding:clamp(22px,5vw,36px); text-align:center; box-shadow:0 20px 65px #07152a77; }
.four-result-dialog h2 { margin:12px 0; font-size:clamp(1.6rem,4vw,2rem); }
.four-result-dialog p { line-height:1.5; margin:10px 0 24px; }
.four-result-dialog button { min-width:180px; }
.four-result-symbol { width:72px; height:72px; margin:0 auto; border-radius:50%; border:5px solid #193b68; box-shadow:inset 0 3px 7px #0002; }
.four-result-red { background:#d9424a; }
.four-result-yellow { background:#f5c842; }
.four-result-draw { display:grid; place-items:center; background:#dce5f0; font-size:2.5rem; font-weight:800; }
