/* Arcade games (Snake, Serigala Seru), Tuan Putri 2026-10-21. Dark brand panel so both site themes look the same. */
.arcade-page { padding-top: 20px; padding-bottom: 48px; }
.arcade-back { display: inline-flex; gap: 6px; align-items: center; margin-bottom: 14px; font-weight: 700; color: var(--cta, #0066ff); text-decoration: none; }
.arcade-back:hover { text-decoration: underline; }

.arcade { position: relative; overflow: hidden; border-radius: 24px; color: #fff; padding: 22px 22px 26px;
    background: linear-gradient(135deg, #0b1450 0%, #2a1a7a 55%, #5a1780 100%); box-shadow: 0 16px 40px rgba(7, 11, 46, .25); }
.arcade__ride { position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, #01a2fe, #0160fe, #7d2dfc, #fb05c4, #fd6c4c, #fe9723, #fed535); }
.arcade__head { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; }
.arcade__title { margin: 0; font-size: clamp(26px, 4vw, 38px); line-height: 1.1; color: #fff; }
.arcade__lead { margin: 6px 0 0; color: #c9cdf7; font-size: 15px; }
.arcade__toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.arcade__help { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); font-size: 13px; color: #c9cdf7; }
.arcade__help li { background: rgba(255, 255, 255, .07); border-radius: 12px; padding: 10px 12px; }
.arcade__help strong { color: #fff; }

.arcade-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.arcade-seg button { border: 0; background: transparent; color: #e6e7ff; font: inherit; font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.arcade-seg button[aria-pressed="true"] { background: #fff; color: #0b1450; }

.arcade-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; padding: 11px 20px;
    font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .14); text-decoration: none; }
.arcade-btn:hover { background: rgba(255, 255, 255, .24); }
.arcade-btn--primary { background: #0066ff; box-shadow: 0 10px 22px rgba(0, 102, 255, .35); }
.arcade-btn--primary:hover { background: #0160fe; }
.arcade-btn--sun { background: #fed535; color: #412402; }
.arcade-btn--sun:hover { background: #fe9723; }
.arcade-btn--danger { background: #fd6c4c; }
.arcade-btn--danger:hover { background: #e2553a; }
.arcade-btn:disabled { opacity: .45; cursor: not-allowed; }
.arcade-btn:focus-visible, .arcade-seg button:focus-visible, .snake-pad button:focus-visible, .ww-pick:focus-visible { outline: 3px solid #fed535; outline-offset: 2px; }

/* Snake */
.snake-hud { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.snake-hud__item { background: rgba(255, 255, 255, .09); border-radius: 12px; padding: 8px 14px; min-width: 96px; }
.snake-hud__item span { display: block; font-size: 12px; color: #b9bdf0; }
.snake-hud__item strong { font-family: Unbounded, system-ui, sans-serif; font-size: 20px; }
.snake-stage { position: relative; max-width: 760px; margin: 0 auto; border-radius: 16px; padding: 10px; background: #2b2f3a; box-shadow: inset 0 -6px 0 #1b1e26; touch-action: none; }
.snake-stage canvas { display: block; width: 100%; height: auto; border-radius: 8px; image-rendering: pixelated; }
.snake-overlay { position: absolute; inset: 10px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    text-align: center; padding: 16px; background: rgba(11, 20, 80, .78); }
.snake-overlay[hidden] { display: none; }
.snake-overlay__title { margin: 0; font-size: clamp(22px, 4vw, 32px); color: #fed535; }
.snake-overlay__text { margin: 0; max-width: 420px; color: #e6e7ff; font-size: 15px; line-height: 1.5; }
.snake-pad { display: none; grid-template-columns: repeat(3, 64px); grid-template-areas: ". up ." "left pause right" ". down ."; gap: 8px; justify-content: center; margin-top: 14px; }
.snake-pad button { height: 56px; border: 0; border-radius: 16px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 20px; cursor: pointer; touch-action: manipulation; }
.snake-pad button:active { background: #0066ff; }
.snake-pad [data-dir="up"] { grid-area: up; } .snake-pad [data-dir="left"] { grid-area: left; } .snake-pad [data-pause] { grid-area: pause; font-size: 14px; }
.snake-pad [data-dir="right"] { grid-area: right; } .snake-pad [data-dir="down"] { grid-area: down; }
@media (hover: none), (max-width: 760px) { .snake-pad { display: grid; } }
/* Duel needs one shared keyboard, so touch phones only get Klasik. */
@media (hover: none) and (pointer: coarse) { .arcade--snake [data-mode="duel"], .snake-help-duel { display: none; } }
@media (max-width: 560px) {
    .snake-stage { max-width: 420px; padding: 8px; } .snake-overlay { inset: 8px; } .snake-overlay__text { font-size: 14px; }
    .snake-hud { gap: 6px; margin-bottom: 8px; } .snake-hud__item { min-width: 0; flex: 1; padding: 6px 10px; } .snake-hud__item strong { font-size: 17px; }
    .snake-pad { grid-template-columns: repeat(3, 58px); gap: 6px; margin-top: 10px; } .snake-pad button { height: 48px; }
    .arcade--snake .arcade__head { margin-bottom: 10px; }
}

/* Serigala Seru */
.ww-screen { max-width: 640px; margin: 0 auto; text-align: center; }
.ww-screen h2 { font-family: Unbounded, system-ui, sans-serif; font-size: clamp(20px, 3.4vw, 28px); margin: 6px 0 8px; color: #fff; }
.ww-screen p { color: #e6e7ff; font-size: 15px; line-height: 1.55; margin: 0 0 12px; }
.ww-phase { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 6px 12px; background: rgba(255, 255, 255, .12); }
.ww-phase--night { background: #070b2e; color: #fed535; }
.ww-phase--day { background: #fe9723; color: #412402; }
.ww-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.ww-card { margin: 14px auto; max-width: 300px; border-radius: 20px; padding: 22px 18px; background: #fffaf0; color: #2a1a7a; box-shadow: 0 0 0 4px var(--ww-tone, #7d2dfc); }
.ww-card svg { width: 72px; height: 72px; }
.ww-card h3 { font-family: Unbounded, system-ui, sans-serif; margin: 8px 0 6px; font-size: 22px; color: var(--ww-tone, #7d2dfc); }
.ww-card p { color: #3c3489; font-size: 14px; margin: 0; }
.ww-card .ww-mates { margin-top: 10px; font-weight: 700; color: #993c1d; }
.ww-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 14px 0; text-align: left; }
.ww-pick { position: relative; display: flex; align-items: center; gap: 10px; border: 2px solid transparent; border-radius: 14px; padding: 10px; cursor: pointer;
    background: rgba(255, 255, 255, .1); color: #fff; font: inherit; font-weight: 700; text-align: left; }
.ww-pick:hover { background: rgba(255, 255, 255, .18); }
.ww-pick[aria-pressed="true"] { border-color: #fed535; background: rgba(254, 213, 53, .18); }
.ww-pick:disabled { opacity: .4; cursor: not-allowed; }
.ww-pick small { display: block; font-weight: 600; color: #b9bdf0; font-size: 12px; }
.ww-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #070b2e; }
.ww-votes { margin-left: auto; font-family: Unbounded, system-ui, sans-serif; font-size: 18px; color: #fed535; }
.ww-minus { margin-left: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; font-weight: 800; }
.ww-setup { text-align: left; }
.ww-count { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 8px 0 16px; }
.ww-count strong { font-family: Unbounded, system-ui, sans-serif; font-size: 30px; min-width: 48px; text-align: center; }
.ww-count button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-size: 22px; font-weight: 800; cursor: pointer; }
.ww-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ww-names label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #b9bdf0; }
.ww-names input { border: 0; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 15px; background: #fff; color: #0b1450; }
.ww-names input:focus-visible { outline: 3px solid #fed535; }
.ww-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 14px 0; text-align: left; }
.ww-roles div { background: rgba(255, 255, 255, .08); border-radius: 12px; padding: 10px; font-size: 13px; color: #e6e7ff; }
.ww-roles svg { width: 28px; height: 28px; display: block; margin-bottom: 4px; }
.ww-timer { font-family: Unbounded, system-ui, sans-serif; font-size: clamp(40px, 9vw, 64px); color: #fed535; margin: 6px 0; }
.ww-error { color: #ffb4a3 !important; font-weight: 700; }
.ww-result { display: inline-block; margin: 8px 0 4px; padding: 10px 18px; border-radius: 14px; font-family: Unbounded, system-ui, sans-serif; font-size: 20px; }
.ww-result--wolf { background: #fd6c4c; color: #fff; }
.ww-result--safe { background: #10c98a; color: #04342c; }
.ww-list { list-style: none; padding: 0; margin: 12px auto; max-width: 420px; text-align: left; }
.ww-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .07); margin-bottom: 6px; }
.ww-list li.is-out { opacity: .55; }
.ww-list em { margin-left: auto; font-style: normal; font-weight: 700; font-size: 13px; }
@media (max-width: 560px) { .arcade { padding: 18px 14px 22px; border-radius: 18px; } .ww-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Gambar Apa Hayo? */
.gah-steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; flex-wrap: wrap; }
.gah-steps li { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 6px 12px; background: rgba(255, 255, 255, .12); color: #e6e7ff; }
.gah-steps li.is-on { background: #fed535; color: #412402; }
.gah-panel[hidden] { display: none !important; }
.gah-card { max-width: 480px; margin: 8px auto; background: rgba(255, 255, 255, .08); border-radius: 18px; padding: 20px; text-align: center; }
.gah-card h2 { font-size: 20px; margin: 0 0 6px; color: #fff; }
.gah-card p { margin: 0 0 14px; color: #c9cdf7; font-size: 14px; line-height: 1.5; }
.gah-input { width: 100%; box-sizing: border-box; border: 0; border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 17px; background: #fff; color: #0b1450; }
.gah-input--sm { font-size: 15px; padding: 10px 12px; }
.gah-input:focus-visible { outline: 3px solid #fed535; }
/* Silent keypad (Tuan Putri 2026-10-22): fixed QWERTY; no hover, press, focus or tap highlight, so a live stream cannot tell which key was tapped. */
.gah-input--secret { text-align: center; letter-spacing: 4px; caret-color: transparent; cursor: default; }
.gah-input--secret:focus, .gah-input--secret:focus-visible { outline: 3px solid #fed535; }
.gah-keypad { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.gah-key { appearance: none; -webkit-appearance: none; border: 0; height: 44px; border-radius: 11px; padding: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, .16); color: #fff; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.gah-key:hover, .gah-key:active, .gah-key:focus, .gah-key:focus-visible { background: rgba(255, 255, 255, .16); color: #fff; outline: none; transform: none; box-shadow: none; }
.gah-keyrow { display: flex; justify-content: center; gap: 5px; }
.gah-keyrow .gah-key { flex: 1 1 0; min-width: 0; max-width: calc((100% - 45px) / 10); }
.gah-input--secret::placeholder { letter-spacing: 0; }
.gah-keypad-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 6px; margin-top: 6px; }
.gah-keypad-row .arcade-btn { width: 100%; margin: 0; border-radius: 12px; }
.gah-key--back svg { width: 22px; height: 22px; }
.gah-setup .gah-error:empty { min-height: 0; margin: 0 !important; }
@media (max-width: 380px) { .gah-keyrow { gap: 4px; } .gah-keyrow .gah-key { max-width: calc((100% - 36px) / 10); } .gah-key { height: 40px; font-size: 14px; border-radius: 8px; } }
.gah-error { min-height: 18px; margin: 6px 0 8px !important; color: #ffb4a3 !important; font-weight: 700; font-size: 13px !important; text-align: left; }
.gah-play { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.gah-canvas { background: #fff; border-radius: 16px; overflow: hidden; touch-action: pinch-zoom; }
.gah-canvas canvas { display: block; width: 100%; height: auto; cursor: crosshair; }
.gah-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.gah-colors { display: flex; flex-wrap: wrap; gap: 6px; }
.gah-color { width: 28px; height: 28px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.gah-color[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px #fed535; }
.gah-tool { border: 0; border-radius: 999px; padding: 8px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .14); }
.gah-tool[aria-pressed="true"] { background: #fff; color: #0b1450; }
.gah-tool--icon { display: inline-grid; place-items: center; width: 40px; height: 36px; padding: 0; } /* Penghapus and Urungkan as icons (Tuan Putri 2026-10-22) */
.gah-tool--icon svg { width: 20px; height: 20px; }
.gah-tool:focus-visible, .gah-color:focus-visible, .gah-link:focus-visible { outline: 3px solid #fed535; outline-offset: 2px; }
.gah-side { background: rgba(255, 255, 255, .08); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.gah-label { margin: 0; font-size: 12px; color: #b9bdf0; font-weight: 700; }
.gah-tries { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.gah-try { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #fb05c4; color: #fff; }
.gah-try.is-used { background: rgba(255, 255, 255, .12); color: #b9bdf0; }
.gah-tries span:last-child { font-size: 13px; color: #c9cdf7; }
.gah-history { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 6px; }
.gah-history li { display: flex; align-items: center; gap: 8px; border-radius: 10px; padding: 8px 10px; background: rgba(255, 255, 255, .07); font-size: 14px; }
.gah-history small { color: #b9bdf0; font-size: 12px; }
.gah-history .gah-mark { margin-left: auto; font-weight: 800; font-size: 13px; }
.gah-history .is-right .gah-mark { color: #10c98a; } .gah-history .is-wrong .gah-mark { color: #fd8a70; }
.gah-guess { display: flex; flex-direction: column; gap: 6px; }
.gah-guess .arcade-btn { margin-top: 2px; }
.gah-link { border: 0; background: none; color: #c9cdf7; font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 4px 0; text-align: left; }
.gah-link:hover { color: #fff; }
.gah-result { text-align: center; }
.gah-verdict { margin: 0 0 6px; font-size: clamp(20px, 3.4vw, 28px); }
.gah-answer { margin: 4px 0 14px; font-size: clamp(30px, 6vw, 48px); color: #fed535; letter-spacing: 2px; word-break: break-word; }
.gah-result__body { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: flex-start; margin-bottom: 16px; }
.gah-snap { width: min(420px, 100%); border-radius: 14px; background: #fff; }
.gah-history--final { min-width: 220px; max-width: 320px; text-align: left; }
@media (max-width: 860px) { .gah-play { grid-template-columns: 1fr; } }

/* Gambar Apa Hayo full screen (Tuan Putri 2026-10-22): like Tebak Kata, the game fills the whole window with no card
   border; Keluar top-left, light/night toggle top-right; one centered group (title + steps, canvas with the guess panel
   beside it, colours and tools under the canvas). Light and night variants. */
html.arcade-full-on, html.arcade-full-on body { overflow: hidden; }
.arcade--draw { position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100dvh; margin: 0; border-radius: 0; box-shadow: none; box-sizing: border-box;
  display: flex; flex-direction: column; overflow: auto; scrollbar-width: none; padding: clamp(10px, 1.4vw, 18px) clamp(12px, 1.8vw, 24px) 12px;
  background: linear-gradient(165deg, #21156d 0%, #32118b 40%, #700098 100%); }
.arcade--draw .arcade__ride { display: none; }
.gah-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 3px solid rgba(255, 255, 255, .2); }
.gah-exit { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 800;
  text-decoration: none; color: #fff; background: rgba(255, 255, 255, .14); }
.gah-exit:hover { background: rgba(255, 255, 255, .24); }
.gah-exit:focus-visible { outline: 3px solid #fed535; outline-offset: 2px; }
.arcade--draw .arcade__head { flex-direction: column; justify-content: center; align-items: center; gap: 8px; margin-bottom: 14px; text-align: center; }
.arcade--draw .arcade__title { font-size: clamp(22px, 2.6vw, 34px); margin: 0; }
.arcade--draw .gah-steps { justify-content: center; }
.arcade--draw .gah-setup { display: flex; align-items: flex-start; justify-content: center; padding-top: clamp(4px, 2vh, 24px); }
.arcade--draw .gah-setup .gah-card { width: min(480px, 100%); margin: 0 auto; }
.arcade--draw .gah-play { display: flex; justify-content: center; align-items: flex-start; gap: 16px; }
.arcade--draw .gah-board { flex: 0 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.arcade--draw .gah-side { flex: 0 0 280px; }
.arcade--draw .gah-tools { justify-content: center; }
.arcade--draw .gah-canvas { width: fit-content; max-width: 100%; margin: 0 auto; }
.arcade--draw .gah-canvas canvas { width: auto; max-width: 100%; height: auto; max-height: calc(100dvh - 250px); }
.arcade--draw .gah-result { flex: 1; }
.arcade--draw .gah-snap { max-height: calc(100dvh - 380px); width: auto; max-width: 100%; }
@media (max-width: 860px) {
  .arcade--draw .gah-play { flex-direction: column; align-items: stretch; }
  .arcade--draw .gah-side { flex-basis: auto; }
  .arcade--draw .gah-canvas canvas { max-height: 56dvh; }
  .arcade--draw .gah-setup { padding-top: 0; }
}

/* Light mode */
:root:not([data-theme="night"]) .arcade--draw { color: #101d59; background: linear-gradient(165deg, #f7faff 0%, #fff3fb 50%, #edf4ff 100%); }
:root:not([data-theme="night"]) .arcade--draw .gah-topbar { border-bottom-color: #dbe2ff; }
:root:not([data-theme="night"]) .gah-exit { color: #101d59; background: #fff; box-shadow: 0 6px 16px rgba(6, 26, 95, .1), inset 0 0 0 1.5px #e3e8f6; }
:root:not([data-theme="night"]) .gah-exit:hover { background: #f3f5fd; }
:root:not([data-theme="night"]) .arcade--draw .arcade__title { color: #101d59; }
:root:not([data-theme="night"]) .arcade--draw .gah-steps li { background: #eef0ff; color: #5b6488; }
:root:not([data-theme="night"]) .arcade--draw .gah-steps li.is-on { background: #fed535; color: #412402; }
:root:not([data-theme="night"]) .arcade--draw .gah-card,
:root:not([data-theme="night"]) .arcade--draw .gah-side { background: #fff; box-shadow: 0 14px 34px rgba(6, 26, 95, .08), inset 0 0 0 1.5px #e3e8f6; }
:root:not([data-theme="night"]) .arcade--draw .gah-card h2 { color: #101d59; }
:root:not([data-theme="night"]) .arcade--draw .gah-input { box-shadow: inset 0 0 0 1.5px #d6dcf2; }
:root:not([data-theme="night"]) .arcade--draw .gah-key,
:root:not([data-theme="night"]) .arcade--draw .gah-key:hover,
:root:not([data-theme="night"]) .arcade--draw .gah-key:active,
:root:not([data-theme="night"]) .arcade--draw .gah-key:focus { background: #eef0ff; color: #101d59; }
:root:not([data-theme="night"]) .arcade--draw .gah-canvas { box-shadow: 0 14px 34px rgba(6, 26, 95, .1), 0 0 0 1.5px #e3e8f6; }
:root:not([data-theme="night"]) .arcade--draw .arcade-seg { background: #eef0ff; }
:root:not([data-theme="night"]) .arcade--draw .arcade-seg button { color: #5b6488; }
:root:not([data-theme="night"]) .arcade--draw .arcade-seg button[aria-pressed="true"] { background: #101d59; color: #fff; }
:root:not([data-theme="night"]) .arcade--draw .gah-tool { background: #eef0ff; color: #101d59; }
:root:not([data-theme="night"]) .arcade--draw .gah-tool[aria-pressed="true"] { background: #101d59; color: #fff; }
:root:not([data-theme="night"]) .arcade--draw .gah-color { box-shadow: inset 0 0 0 1px rgba(16, 29, 89, .25); }
:root:not([data-theme="night"]) .arcade--draw .gah-color[aria-pressed="true"] { border-color: #101d59; box-shadow: 0 0 0 2px #fed535; }
:root:not([data-theme="night"]) .arcade--draw .gah-label,
:root:not([data-theme="night"]) .arcade--draw .gah-tries span:last-child { color: #5b6488; }
:root:not([data-theme="night"]) .arcade--draw .gah-try.is-used { background: #eef0ff; color: #8a90b4; }
:root:not([data-theme="night"]) .arcade--draw .gah-history li { background: #f3f5fd; }
:root:not([data-theme="night"]) .arcade--draw .gah-history small { color: #8a90b4; }
:root:not([data-theme="night"]) .arcade--draw .gah-history .is-wrong .gah-mark { color: #e2553a; }
:root:not([data-theme="night"]) .arcade--draw .gah-link { color: #5b6488; }
:root:not([data-theme="night"]) .arcade--draw .gah-link:hover { color: #101d59; }
:root:not([data-theme="night"]) .arcade--draw .gah-answer { color: #e4009f; }
:root:not([data-theme="night"]) .arcade--draw .gah-error { color: #d23b1f !important; }
:root:not([data-theme="night"]) .arcade--draw .gah-snap { box-shadow: 0 0 0 1.5px #e3e8f6; }

/* Live mode button (same floating monitor button as the other games); the shared preference also tightens spacing. */
.gah-live-toggle { position: fixed; z-index: 1001; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
  width: 48px; height: 48px; padding: 0; border: 0; border-radius: 16px; display: grid; place-items: center; cursor: pointer;
  background: rgba(16, 12, 60, .55); color: #9ba4ca; box-shadow: 0 10px 24px rgba(6, 10, 40, .3); }
.gah-live-toggle svg { width: 26px; height: 26px; }
.gah-live-toggle:hover { background: rgba(16, 12, 60, .7); }
.gah-live-toggle[aria-pressed="true"] { color: #23f57a; background: rgba(16, 12, 60, .7); box-shadow: 0 0 0 2px #23f57a, 0 0 18px rgba(35, 245, 122, .55), 0 10px 24px rgba(6, 10, 40, .3); }
.gah-live-toggle[aria-pressed="true"] svg { filter: drop-shadow(0 0 6px rgba(35, 245, 122, .8)); }
.gah-live-toggle:focus-visible { outline: 3px solid #fed535; outline-offset: 2px; }
:root:not([data-theme="night"]) .gah-live-toggle { background: #fff; color: #a3abc8; box-shadow: 0 10px 24px rgba(6, 26, 95, .16), inset 0 0 0 1.5px #e3e8f6; }
:root:not([data-theme="night"]) .gah-live-toggle[aria-pressed="true"] { background: #fff; color: #0fbf5c; box-shadow: 0 0 0 2px #23f57a, 0 0 18px rgba(35, 245, 122, .45), 0 10px 24px rgba(6, 26, 95, .16); }
.arcade--draw.arcade--live { padding-top: clamp(8px, 1vw, 12px); }
.arcade--draw.arcade--live .gah-topbar { padding-bottom: 6px; margin-bottom: 8px; }
.arcade--draw.arcade--live .gah-canvas canvas { max-height: calc(100dvh - 235px); }

/* The page-enter animation leaves a transform on <main>, which would trap the fixed full-screen game inside it after
   arriving from /game (Tuan Putri 2026-10-22 live check). No entry animation on this page. */
html.arcade-full-on main, main:has(> * .arcade--draw), main:has(.arcade--draw) { animation: none !important; transform: none !important; }

/* Cara main (Tuan Putri 2026-10-22): pill button under the title and a rules dialog; light and night. */
.gah-howto-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 6px 14px 6px 10px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 800; color: #fff; background: rgba(255, 255, 255, .14); }
.gah-howto-btn svg { width: 18px; height: 18px; }
.gah-howto-btn:hover { background: rgba(255, 255, 255, .24); }
.gah-howto-btn:focus-visible, .gah-howto__close:focus-visible { outline: 3px solid #fed535; outline-offset: 2px; }
.gah-howto { padding: 0; border: 0; background: transparent; width: min(520px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); overflow: visible; color: #fff; }
.gah-howto::backdrop { background: rgba(5, 8, 36, .62); backdrop-filter: blur(3px); }
.gah-howto__card { position: relative; box-sizing: border-box; max-height: calc(100dvh - 32px); overflow: auto; padding: 26px 24px 22px; border-radius: 24px;
  background: linear-gradient(165deg, #2a1a7a 0%, #1b1460 55%, #3b0f6e 100%); box-shadow: 0 30px 80px rgba(3, 5, 30, .6), inset 0 0 0 1.5px rgba(255, 255, 255, .12); }
.gah-howto__close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: inherit; background: rgba(255, 255, 255, .12); }
.gah-howto__close svg { width: 16px; height: 16px; }
.gah-howto__title { margin: 0 36px 14px 0; font-size: 21px; line-height: 1.2; color: inherit; }
.gah-howto__steps { margin: 0 0 16px; padding: 0; list-style: none; counter-reset: howto; display: grid; gap: 10px; }
.gah-howto__steps li { counter-increment: howto; position: relative; padding: 10px 12px 10px 48px; border-radius: 14px; background: rgba(255, 255, 255, .08); font-size: 14px; line-height: 1.5; color: #e6e7ff; }
.gah-howto__steps li::before { content: counter(howto); position: absolute; left: 12px; top: 10px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 900; font-size: 13px; background: #fed535; color: #412402; }
.gah-howto__steps strong { color: #fff; }
.gah-howto__tip { margin: 0 0 16px; font-size: 13px; color: #c9cdf7; }
.gah-howto__ok { width: 100%; }
:root:not([data-theme="night"]) .gah-howto-btn { color: #101d59; background: #fff; box-shadow: 0 6px 16px rgba(6, 26, 95, .1), inset 0 0 0 1.5px #e3e8f6; }
:root:not([data-theme="night"]) .gah-howto-btn:hover { background: #f3f5fd; }
:root:not([data-theme="night"]) .gah-howto { color: #101d59; }
:root:not([data-theme="night"]) .gah-howto::backdrop { background: rgba(16, 29, 89, .35); }
:root:not([data-theme="night"]) .gah-howto__card { background: linear-gradient(165deg, #fff 0%, #f7f2ff 60%, #fff1fa 100%); box-shadow: 0 30px 70px rgba(16, 29, 89, .25), inset 0 0 0 1.5px #ece6ff; }
:root:not([data-theme="night"]) .gah-howto__close { background: #eef0fb; }
:root:not([data-theme="night"]) .gah-howto__steps li { background: #fff; color: #3b4470; box-shadow: inset 0 0 0 1.5px #ece6ff; }
:root:not([data-theme="night"]) .gah-howto__steps strong { color: #101d59; }
:root:not([data-theme="night"]) .gah-howto__tip { color: #5b6488; }
@media (max-width: 420px) { .gah-howto__card { padding: 22px 16px 18px; } .gah-howto__steps li { font-size: 13.5px; padding-left: 44px; } }
.gah-howto__card:focus { outline: none; }

/* Live mode 40% larger (Tuan Putri 2026-10-22): title, steps, Cara main, setup card, guess panel, tools and the result
   text are zoomed 1.4x; the canvas keeps fitting the screen. Desktop widths only, so phones never overflow. */
@media (min-width: 900px) {
  .arcade--draw.arcade--live .arcade__head,
  .arcade--draw.arcade--live .gah-setup .gah-card,
  .arcade--draw.arcade--live .gah-side,
  .arcade--draw.arcade--live .gah-tools,
  .arcade--draw.arcade--live .gah-result > :not(.gah-result__body),
  .arcade--draw.arcade--live .gah-history--final { zoom: 1.4; }
  .arcade--draw.arcade--live .gah-setup .gah-card { width: min(480px, calc((100vw - 48px) / 1.4)); }
  .arcade--draw.arcade--live .gah-side { flex-basis: 280px; }
  .arcade--draw.arcade--live .gah-canvas canvas { max-height: calc(100dvh - 395px); }
  .arcade--draw.arcade--live .gah-snap { max-height: calc(100dvh - 520px); }
}

/* Bruce QA 2026-10-22 (BRUCE-QA-20261022-SNAKE-WEREWOLF, -SI-ULAR-MOBILE-BUTTONS, Tuan Putri 2026-10-24).
   Desktop: the board is also sized by the viewport height, so board, HUD and result fit one screen (440:300 board). */
@media (hover: hover) and (min-width: 761px) {
  /* Sticky site header (88 px) + title row and HUD (~160 px) + board fit the window once the game is scrolled up (snake.js bringIntoView). */
  .arcade--snake .snake-stage { width: min(760px, 100%, calc((100svh - 290px) * 440 / 300 + 20px)); min-width: 320px; }
  .arcade--snake .arcade__head { margin-bottom: 10px; }
  .arcade--snake .snake-hud { margin-bottom: 8px; }
}
/* Phones: bigger arrow and pause buttons (Nyong: "buttonnya kekecilan"). */
.snake-pad { grid-template-columns: repeat(3, 84px); gap: 10px; }
.snake-pad button { height: 72px; font-size: 26px; border-radius: 18px; }
.snake-pad [data-pause] { font-size: 18px; }
@media (max-width: 560px) { .snake-pad { grid-template-columns: repeat(3, 74px); gap: 8px; } .snake-pad button { height: 64px; } }
@media (max-width: 340px) { .snake-pad { grid-template-columns: repeat(3, 66px); } .snake-pad button { height: 58px; } }
/* Serigala Seru: votes left this round. */
.ww-quota { margin: 6px 0 12px; font-size: 13px; font-weight: 700; color: #fed535; }
/* Gambar Apa Hayo desktop: bigger canvas (Nyong via Bruce, BRUCE-QA-20261022-GAMBAR-DESKTOP-FILL and
   -20261023-GAMBAR-SMALL-CANVAS: 271x181 at 1280x576 was too small; Tuan Putri 2026-10-24). During a round the tools
   move to a column beside the canvas and the title row becomes one line, so the canvas takes the remaining height.
   Colours, Tipis/Sedang/Tebal, eraser, undo and Kanvas Baru stay visible without scrolling. Phones are unchanged. */
@media (min-width: 900px) {
  .arcade--draw:has(.gah-play:not([hidden])) .arcade__head { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: 18px; row-gap: 6px; margin-bottom: 8px; }
  .arcade--draw .gah-board { flex-direction: row; align-items: flex-start; gap: 12px; }
  .arcade--draw .gah-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 170px; margin-top: 0; justify-content: stretch; }
  .arcade--draw .gah-tools .gah-colors { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, 28px); justify-content: space-between; gap: 6px; }
  .arcade--draw .gah-tools .arcade-seg { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; }
  .arcade--draw .gah-tools .arcade-seg button { width: 100%; }
  .arcade--draw .gah-tools .gah-tool--icon { width: 100%; }
  .arcade--draw .gah-tools [data-clear] { grid-column: 1 / -1; }
  .arcade--draw .gah-canvas canvas { aspect-ratio: 3 / 2; height: auto; max-height: none; max-width: none; width: min(calc((100dvh - 140px) * 1.5), calc(100vw - 280px - 170px - 28px - 48px)); }
  .arcade--draw.arcade--live .gah-tools { zoom: 1.2; }
  .arcade--draw.arcade--live .gah-canvas canvas { max-height: none; max-width: none; width: min(calc((100dvh - 150px) * 1.5), calc(100vw - 392px - 204px - 32px - 48px)); }
}

/* Si Ular full screen (Tuan Putri 2026-10-24): like the other games, no frame; Keluar + light/night toggle on top; title
   and Cara Bermain centered; score/best/level stacked beside the board; mode switches under the board; all centered. */
.arcade--snake.arcade--full { position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100dvh; margin: 0; border-radius: 0; box-shadow: none;
  box-sizing: border-box; display: flex; flex-direction: column; align-items: stretch; overflow: auto; scrollbar-width: none;
  padding: clamp(10px, 1.4vw, 18px) clamp(12px, 1.8vw, 24px) 16px; background: linear-gradient(165deg, #21156d 0%, #32118b 40%, #700098 100%); }
.arcade--snake.arcade--full .arcade__ride { display: none; }
.arcade--snake.arcade--full .arcade__head { flex-direction: column; justify-content: center; align-items: center; gap: 8px; margin: 0 0 14px; text-align: center; }
.arcade--snake.arcade--full .arcade__title { font-size: clamp(24px, 2.8vw, 36px); margin: 0; }
.snake-main { display: flex; justify-content: center; align-items: center; gap: 14px; }
.arcade--snake.arcade--full .snake-hud { flex-direction: column; flex-wrap: nowrap; gap: 8px; margin: 0; width: 132px; flex-shrink: 0; }
.arcade--snake.arcade--full .snake-hud__item { min-width: 0; text-align: center; padding: 10px 12px; }
.arcade--snake.arcade--full .snake-stage { margin: 0; flex: 0 1 auto; min-width: 0;
  width: min(760px, calc(100vw - 200px), calc((100dvh - 250px) * 440 / 300 + 20px)); }
.arcade--snake.arcade--full .snake-modes { justify-content: center; margin-top: 14px; }
.arcade--snake.arcade--full .snake-pad { margin-top: 14px; }
@media (max-width: 760px) {
  /* Phones: the three numbers sit in one row above the board so the board keeps the full width. */
  .snake-main { flex-direction: column; align-items: stretch; gap: 10px; }
  .arcade--snake.arcade--full .snake-hud { flex-direction: row; width: auto; }
  .arcade--snake.arcade--full .snake-hud__item { flex: 1; padding: 6px 8px; }
  .arcade--snake.arcade--full .snake-stage { width: 100%; max-width: 520px; margin: 0 auto; }
  .arcade--snake.arcade--full .snake-modes { margin-top: 10px; }
  .arcade--snake.arcade--full .snake-pad { margin-top: 10px; }
}
:root:not([data-theme="night"]) .arcade--snake.arcade--full { color: #101d59; background: linear-gradient(165deg, #f7faff 0%, #fff3fb 50%, #edf4ff 100%); }
:root:not([data-theme="night"]) .arcade--snake.arcade--full .gah-topbar { border-bottom-color: #dbe2ff; }
:root:not([data-theme="night"]) .arcade--snake.arcade--full .arcade__title { color: #101d59; }
:root:not([data-theme="night"]) .arcade--snake.arcade--full .snake-hud__item { background: #fff; box-shadow: 0 10px 24px rgba(6, 26, 95, .08), inset 0 0 0 1.5px #e3e8f6; }
:root:not([data-theme="night"]) .arcade--snake.arcade--full .snake-hud__item span { color: #5b6488; }
:root:not([data-theme="night"]) .arcade--snake.arcade--full .arcade-seg { background: #eef0ff; }
:root:not([data-theme="night"]) .arcade--snake.arcade--full .arcade-seg button { color: #5b6488; }
:root:not([data-theme="night"]) .arcade--snake.arcade--full .arcade-seg button[aria-pressed="true"] { background: #101d59; color: #fff; }
:root:not([data-theme="night"]) .arcade--snake.arcade--full .snake-pad button { background: #eef0ff; color: #101d59; }
:root:not([data-theme="night"]) .arcade--snake.arcade--full .snake-pad button:active { background: #0066ff; color: #fff; }

/* Si Ular on touch screens (Tuan Putri 2026-10-24): the board, the mode switches and the whole arrow pad fit one screen on
   every phone/tablet. The board width follows the height that is left after title, numbers, switches and pad
   (--snake-chrome); phone boards are 15x17 cells, tablets 22x15. Short screens get a more compact layout. */
@media (hover: none), (max-width: 760px) {
  .arcade--snake.arcade--full { --snake-chrome: 520px; --snake-ratio: calc(15 / 17); padding-bottom: 10px; }
  .arcade--snake.arcade--full .snake-stage { width: max(170px, min(100%, 520px, calc((100dvh - var(--snake-chrome)) * var(--snake-ratio) + 16px))); max-width: none; margin: 0 auto; }
  .arcade--snake.arcade--full .snake-pad { grid-template-columns: repeat(3, 72px); gap: 8px; margin-top: 10px; }
  .arcade--snake.arcade--full .snake-pad button { height: 60px; }
}
@media (hover: none) and (min-width: 761px) {
  .arcade--snake.arcade--full { --snake-chrome: 500px; --snake-ratio: calc(22 / 15); }
  .arcade--snake.arcade--full .snake-stage { width: max(260px, min(760px, calc(100vw - 200px), calc((100dvh - var(--snake-chrome)) * var(--snake-ratio) + 20px))); }
}
@media (hover: none) and (max-height: 760px), (max-width: 760px) and (max-height: 760px) {
  .arcade--snake.arcade--full { --snake-chrome: 440px; padding-top: 8px; }
  .arcade--snake.arcade--full .gah-topbar { padding-bottom: 6px; margin-bottom: 6px; }
  .arcade--snake.arcade--full .arcade__head { flex-direction: row; gap: 10px; margin-bottom: 8px; }
  .arcade--snake.arcade--full .arcade__title { font-size: 22px; }
  .arcade--snake.arcade--full .snake-hud__item { padding: 4px 8px; }
  .arcade--snake.arcade--full .snake-hud__item strong { font-size: 16px; }
  .arcade--snake.arcade--full .snake-main { gap: 8px; }
  .arcade--snake.arcade--full .snake-modes { margin-top: 8px; }
  .arcade--snake.arcade--full .arcade-seg button { padding: 6px 12px; }
  .arcade--snake.arcade--full .snake-pad { grid-template-columns: repeat(3, 62px); gap: 6px; margin-top: 8px; }
  .arcade--snake.arcade--full .snake-pad button { height: 50px; font-size: 22px; border-radius: 14px; }
}
@media (hover: none) and (max-height: 620px), (max-width: 760px) and (max-height: 620px) {
  .arcade--snake.arcade--full { --snake-chrome: 372px; }
  .arcade--snake.arcade--full .snake-hud__item span { font-size: 10px; }
  .arcade--snake.arcade--full .snake-hud__item strong { font-size: 14px; }
  .arcade--snake.arcade--full .snake-pad { grid-template-columns: repeat(3, 54px); gap: 5px; }
  .arcade--snake.arcade--full .snake-pad button { height: 42px; font-size: 18px; }
}
/* Phones in landscape: the arrow pad floats on the right, the board takes the height that is left. */
@media (hover: none) and (orientation: landscape) and (max-height: 500px) {
  .arcade--snake.arcade--full { --snake-ratio: calc(22 / 15); padding-right: 230px; }
  .arcade--snake.arcade--full .gah-topbar { margin-right: -206px; }
  .arcade--snake.arcade--full .snake-stage { width: max(200px, min(100%, calc((100dvh - 240px) * var(--snake-ratio) + 20px))); }
  .arcade--snake.arcade--full .snake-pad { position: fixed; right: max(12px, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); margin: 0; z-index: 2;
    grid-template-columns: repeat(3, 62px); gap: 6px; }
  .arcade--snake.arcade--full .snake-pad button { height: 54px; }
}
/* Short screens: the start/pause message fits inside a small board. */
@media (max-height: 620px) and (hover: none), (max-height: 620px) and (max-width: 760px) {
  .arcade--snake.arcade--full .snake-overlay { gap: 6px; padding: 6px; }
  .arcade--snake.arcade--full .snake-overlay__title { font-size: 18px; }
  .arcade--snake.arcade--full .snake-overlay__text { font-size: 12px; line-height: 1.35; }
  .arcade--snake.arcade--full .snake-overlay .arcade-btn { padding: 8px 16px; font-size: 13px; }
}

/* Si Ular swipe-only (Tuan Putri 2026-11-13): no arrow pad, one small Jeda pill; the game area takes the swipe. */
.arcade .snake-pad.snake-pad--swipe { display: flex; justify-content: center; width: 100%; margin-top: 12px; }
.arcade .snake-pad.snake-pad--swipe [data-pause] { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: auto; height: 44px; min-height: 44px; padding: 0 22px; border-radius: 999px; font-size: 14px; font-weight: 800; white-space: nowrap; }
.arcade--snake .snake-main { touch-action: none; }
