/* Pisaczek Rozrywka — Saper (R21). Marker: PNP_PISACZEK_GAMES_MINES_CSS_V1. MS1 (13.11.2026). Układ strony jak w Strzałkach (arrows-v1.css), plansza Sapera niżej. */
.gm-ms .gm-back { color: var(--gm-gold); text-decoration: none; font-size: 18px; }
.gm-ms .gm-ghost { background: rgba(255,255,255,.04); color: var(--gm-ink); border: 1px solid rgba(227,196,106,.45); }
.gm-ms .gm-btn, .gm-ms .gm-btn:hover { transform: none; } .gm-ms .gm-btn { min-height: 54px; font-size: 18px; gap: 8px; }
.gm-ms .gm-btn svg { width: 22px; height: 22px; } .gm-ms .gm-btn:disabled { opacity: .5; cursor: default; }
.ms-tabs { align-self: flex-start; display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 6px; border-radius: 20px; background: rgba(6,12,36,.55); border: 1px solid rgba(227,196,106,.35); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 30px rgba(0,0,0,.4); } /* klasa cw-tabs tylko po to, by napis „O co chodzi w tej grze?” stanął w tej linii */
.ms-tabs button { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 24px; border-radius: 15px; border: 1px solid transparent; background: transparent; color: var(--gm-ink); font: inherit; font-size: 19px; font-weight: 700; cursor: pointer; }
.ms-tabs button svg { width: 22px; height: 22px; } .ms-tabs button:hover { background: rgba(227,196,106,.12); color: var(--gm-gold3); }
.ms-tabs button[aria-pressed="true"] { color: #15120A; background: linear-gradient(180deg, var(--gm-gold3), var(--gm-gold) 55%, var(--gm-gold2)); }
.ms-tabs button:focus-visible, .ms-tool:focus-visible, .ms-lvl:focus-visible, .ms-lItem:focus-visible { outline: 3px solid var(--gm-teal); outline-offset: 2px; }
.ms-pane[hidden], .ms-pane [hidden], .gm-ms [hidden] { display: none !important; }
.ms-muted { color: var(--gm-mute); font-size: 17px; } .ms-lead { color: var(--gm-mute); font-size: 19px; line-height: 1.5; margin: 0; }
.ms-h2 { font-size: 26px; margin: 0 0 12px; color: var(--gm-gold3); }
.ms-row2 { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; } .ms-rowL { justify-content: flex-start; flex-wrap: nowrap; }
.ms-say { margin: 0; padding: 14px 16px; border-radius: 14px; font-size: 19px; line-height: 1.45; color: #0B1430; background: #EAF7F5; border-inline-start: 6px solid #1C9C8E; }
.ms-say.ok { background: #E3F6E8; border-color: #2BA05A; } .ms-say.bad { background: #FDECEA; border-color: #D0453A; } .ms-say.hint { background: #FFF6D8; border-color: #C7A23E; }
.ms-say:empty { display: none; }
.ms-now { padding: 16px 18px; border-radius: 16px; border: 2px solid var(--gm-gold); background: rgba(6,12,36,.7); }
.ms-now b { display: block; font-size: 18px; color: var(--gm-gold3); margin-bottom: 4px; } .ms-now p { margin: 0; font-size: 20px; line-height: 1.45; }
.ms-nowM { display: none; margin: 0; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--gm-gold); background: rgba(6,12,36,.75); font-size: 19px; line-height: 1.4; }
.ms-nowM:empty { display: none !important; }

/* układ: stół po lewej, panel po prawej (telefon: jedno pod drugim) */
.ms-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.ms-work { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ms-side { display: flex; flex-direction: column; gap: 14px; }
.ms-topbar { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 19px; }
.ms-topbar b { font-size: 21px; color: var(--gm-gold3); } .ms-stat { display: flex; gap: 16px; font-size: 18px; color: var(--gm-mute); } .ms-stat b { color: var(--gm-ink); font-size: 18px; }

/* stół i karty */
/* plansza (zamiast stołu): ciemne tło, w środku obrazy / siatka; uchwyt rozmiaru w rogu */
.ms-stage { direction: ltr; position: relative; width: 100%; min-height: 200px; border-radius: 18px; border: 2px solid rgba(227,196,106,.5); user-select: none; -webkit-user-select: none; box-sizing: border-box;
  background: radial-gradient(120% 90% at 50% 0%, #17265A, #0A1336 78%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 20px 50px rgba(0,0,0,.35); overflow: hidden; }
.ms-box0 { box-sizing: border-box; height: 100%; display: flex; justify-content: center; align-items: flex-start; }
.ms-stageOn .ms-grip { z-index: 50; }
.ms-prog { font-size: 19px; color: var(--gm-gold3); font-weight: 700; min-height: 24px; }
/* obrazy (różnice, ukryty przedmiot) */
.ms-glowCell { box-shadow: 0 0 0 4px #F1C64A, 0 0 18px 6px rgba(241,198,74,.85) !important; animation: msPulse 1.3s ease-in-out infinite; }
@keyframes msPulse { 50% { box-shadow: 0 0 0 6px #FFE08A, 0 0 28px 10px rgba(241,198,74,.95) !important; } }
/* Graj — wybór zabawy */
.ms-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ms-act { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; min-height: 190px; border-radius: 18px; border: 1.5px solid rgba(227,196,106,.4); background: rgba(6,12,36,.62); color: var(--gm-ink); font: inherit; text-align: start; cursor: pointer; }
.ms-act:hover { border-color: var(--gm-gold); background: rgba(227,196,106,.1); } .ms-act[aria-pressed="true"] { border: 2px solid var(--gm-gold); }
.ms-actName { font-size: 21px; color: var(--gm-gold3); } .ms-actD { font-size: 17px; color: var(--gm-mute); line-height: 1.35; } .ms-actDone { font-size: 17px; font-weight: 700; color: #8FE3D8; margin-top: auto; }
.ms-actArt { display: block; height: 60px; margin-bottom: 4px; } .ms-actArt svg { width: 52px; height: 52px; }
.ms-backActs { margin-bottom: 14px; }
.ms-lvlArt { display: flex; gap: 5px; height: 40px; margin-bottom: 4px; } .ms-lvlArt i { width: 22px; height: 30px; border-radius: 5px; background: #FFFDF6; box-shadow: 0 2px 5px rgba(0,0,0,.4); }
.ms-contArt { width: 50px; height: 50px; flex: none; display: grid; place-items: center; border-radius: 12px; background: rgba(227,196,106,.16); color: var(--gm-gold3); } .ms-contArt svg { width: 34px; height: 34px; }
.ms-chArt { flex: none; } .ms-chArt .ms-aa2 i, .ms-chArt .ms-aa4 i, .ms-chArt .ms-aa5 i { width: 34px; height: 38px; } .ms-chArt svg { width: 30px; height: 30px; } .ms-chArt .ms-aa3 { grid-template-columns: repeat(3, 11px); } .ms-chArt .ms-aa3 i { width: 11px; height: 11px; }
/* narzędzia pod stołem */
.ms-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.ms-tool { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 10px 18px; border-radius: 14px; border: 1.5px solid rgba(227,196,106,.5); background: rgba(6,12,36,.65); color: var(--gm-ink); font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; flex: 1 1 auto; }
.ms-tool svg { width: 24px; height: 24px; } .ms-tool:hover { background: rgba(227,196,106,.14); }
.ms-glow { animation: wsGlow 1.2s ease-in-out infinite; } @keyframes wsGlow { 50% { box-shadow: 0 0 0 4px #2BC26A, 0 0 24px 6px rgba(43,194,106,.8); } }

/* okno wygranej */
.ms-dlg { position: absolute; left: 50%; top: 90px; transform: translateX(-50%); z-index: 4000; width: min(520px, calc(100% - 24px)); box-sizing: border-box; padding: 24px 22px; border-radius: 22px; text-align: center;
  background: linear-gradient(180deg, rgba(14,24,64,.97), rgba(6,12,36,.97)); border: 2px solid var(--gm-gold); box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.ms-dlg h2 { margin: 0 0 8px; font-size: 28px; color: var(--gm-gold3); } .ms-dlg p { font-size: 20px; margin: 0 0 14px; } .ms-dlg .gm-autoNote { margin-top: 12px; }
.ms-chRes { color: var(--gm-gold3); font-weight: 700; }

/* panel boczny */
.ms-lvlPick { display: flex; align-items: center; gap: 10px; font-size: 18px; } .ms-lvlPick select { flex: 1; min-height: 50px; font: inherit; font-size: 18px; border-radius: 12px; padding: 6px 10px; background: #0B1430; color: var(--gm-ink); border: 1.5px solid rgba(227,196,106,.5); }
.ms-how { border-radius: 14px; border: 1px solid rgba(227,196,106,.3); background: rgba(6,12,36,.55); padding: 12px 16px; font-size: 18px; line-height: 1.5; }
.ms-how summary { cursor: pointer; font-weight: 700; color: var(--gm-gold3); min-height: 32px; } .ms-how p { margin: 10px 0 0; }
.ms-opt { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 18px; cursor: pointer; } .ms-opt input { width: 24px; height: 24px; accent-color: var(--gm-gold); flex: none; }
.ms-optSet { border: 0; padding: 0; margin: 14px 0 0; } .ms-optSet legend { font-weight: 700; color: var(--gm-mute); }

/* Graj — wybór poziomu */
.ms-cont { display: flex; align-items: center; gap: 18px; padding: 18px 20px; margin-bottom: 22px; border-radius: 18px; border: 2px solid var(--gm-gold); background: rgba(6,12,36,.7); }
.ms-cont b { font-size: 21px; color: var(--gm-gold3); } .ms-cont p { margin: 4px 0 0; font-size: 18px; } .ms-cont > div { flex: 1; } .ms-contArt { width: 46px; height: 62px; flex: none; border-radius: 6px; background: linear-gradient(160deg, #FFFEF8, #E6DAB8); border: 1px solid #B9A97F; box-shadow: -4px 4px 0 #CDBB8C, -7px 7px 0 #8F7A45; position: relative; }
.ms-levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ms-lvl { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; min-height: 170px; border-radius: 18px; border: 1.5px solid rgba(227,196,106,.4); background: rgba(6,12,36,.62); color: var(--gm-ink); font: inherit; text-align: start; cursor: pointer; }
.ms-lvl:hover { border-color: var(--gm-gold); background: rgba(227,196,106,.1); } .ms-lvl[aria-pressed="true"] { border: 2px solid var(--gm-gold); }
.ms-lvlName { font-size: 21px; color: var(--gm-gold3); } .ms-lvlD { font-size: 17px; color: var(--gm-mute); line-height: 1.35; } .ms-lvlDone { font-size: 17px; font-weight: 700; color: #8FE3D8; margin-top: auto; }
.ms-lvlArt { display: flex; height: 54px; margin-bottom: 4px; } .ms-lvlArt i { width: 38px; height: 50px; border-radius: 6px; background: linear-gradient(160deg, #FFFEF8, #E6DAB8); border: 1px solid #B9A97F; box-shadow: -3px 3px 0 #CDBB8C, -5px 5px 0 #8F7A45; margin-inline-end: -10px; margin-top: calc(var(--k, 0) * 1px); position: relative; }
.ms-lvlArt-pro i { box-shadow: 0 0 0 2px var(--gm-gold), 0 2px 5px rgba(0,0,0,.4); }
.ms-note { margin: 14px 0 0; }
.ms-daily { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding: 18px 20px; border-radius: 18px; border: 1.5px solid rgba(227,196,106,.4); background: rgba(6,12,36,.62); }
.ms-daily > div { flex: 1; display: flex; flex-direction: column; gap: 4px; } .ms-daily b { font-size: 19px; } .ms-dailyArt svg { width: 46px; height: 46px; color: var(--gm-gold); }

/* Naucz się */
.ms-lesson h2 { margin: 6px 0 4px; font-size: 26px; color: var(--gm-gold3); } .ms-lnSteps { margin: 0 0 12px; color: var(--gm-mute); font-size: 18px; }
.ms-lesson { display: flex; flex-direction: column; gap: 14px; } .ms-lesson > * { margin-top: 0; margin-bottom: 0; }
.ms-desc { border-radius: 14px; border: 1px solid rgba(227,196,106,.3); background: rgba(6,12,36,.55); padding: 12px 16px; font-size: 18px; line-height: 1.5; } .ms-desc summary { cursor: pointer; font-weight: 700; color: var(--gm-gold3); }
.ms-keep { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(227,196,106,.12); }
.ms-lnAll { align-self: flex-start; }
.ms-lessons { display: flex; flex-direction: column; gap: 10px; }
.ms-lItem { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 16px; border-radius: 14px; border: 1.5px solid rgba(227,196,106,.35); background: rgba(6,12,36,.6); color: var(--gm-ink); font: inherit; font-size: 18px; text-align: start; cursor: pointer; }
.ms-lItem span:nth-child(2) { flex: 1; display: flex; flex-direction: column; } .ms-lItem b { font-size: 15px; color: var(--gm-mute); font-weight: 600; } .ms-lItem i { font-style: normal; color: #8FE3D8; font-size: 22px; }
.ms-lNo { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: rgba(227,196,106,.18); color: var(--gm-gold3); flex: none; } .ms-lItem.done .ms-lNo { background: #2BA05A; color: #fff; }

/* Ze znajomymi i okna */
.ms-frHead { margin-bottom: 18px; } .ms-frH { font-size: 22px; margin: 26px 0 12px; color: var(--gm-gold3); }
.ms-card0, .ms-chCard { padding: 18px 20px; border-radius: 18px; border: 1.5px solid rgba(227,196,106,.4); background: rgba(6,12,36,.62); font-size: 18px; }
.ms-card0 h3 { margin: 0 0 8px; font-size: 21px; color: var(--gm-gold3); } .ms-card0 p { margin: 0 0 14px; line-height: 1.5; }
.ms-chCard { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; } .ms-chCard > div { flex: 1; display: flex; flex-direction: column; gap: 6px; } .ms-chCard p { margin: 0; }
.ms-chCard .ms-row2 { justify-content: flex-start; margin-top: 6px; } .ms-chHot { border-color: var(--gm-gold); box-shadow: 0 0 0 2px var(--gm-gold); }
.ms-chHead { padding: 12px 16px; border-radius: 14px; background: rgba(227,196,106,.14); border: 1.5px solid var(--gm-gold); font-size: 19px; margin-bottom: 12px; }
.ms-big { position: fixed; inset: 0; z-index: 2147483200; display: grid; place-items: center; padding: 16px; background: rgba(2,4,14,.72); }
.ms-box { width: min(560px, 100%); box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 22px; background: linear-gradient(180deg, #0E1840, #060C24); border: 2px solid var(--gm-gold); font-size: 19px; }
.ms-box h2 { margin: 0; color: var(--gm-gold3); font-size: 25px; } .ms-box p { margin: 0; line-height: 1.5; } .ms-box input { flex: 1; min-width: 0; min-height: 52px; font: inherit; font-size: 18px; border-radius: 12px; padding: 8px 12px; border: 1.5px solid rgba(227,196,106,.5); background: #0B1430; color: var(--gm-ink); }
.ms-lbl { font-weight: 700; } .ms-or { text-align: center; color: var(--gm-mute); }

@media (max-width: 1100px) { .ms-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ms-acts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 999px) { .ms-layout { grid-template-columns: minmax(0, 1fr); } .ms-nowM { display: block; } .ms-pane .ms-side > .ms-now { display: none; } /* MS1b: na telefonie to samo zdanie stoi nad planszą (było #wsGame — nie działało) */ }
@media (max-width: 560px) {
  .ms-tabs { align-self: stretch; } .ms-tabs button { padding: 10px 14px; flex: 1 1 auto; justify-content: center; }
  .ms-stage { margin-inline: -12px; width: calc(100% + 24px); border-radius: 12px; border-width: 1.5px; }
  .ms-tool { padding: 8px 10px; font-size: 17px; flex: 1 1 40%; } .ms-dlg { top: 40px; padding: 20px 14px; } .ms-dlg h2 { font-size: 24px; }
  .ms-levels, .ms-acts { grid-template-columns: minmax(0, 1fr); } .ms-lvl, .ms-act { min-height: 0; } .ms-cont, .ms-daily { flex-wrap: wrap; } .ms-cont .gm-btn, .ms-daily .gm-btn { width: 100%; }
  .ms-rowL { flex-wrap: wrap; } .ms-topbar { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .ms-glow, .ms-glowCell, .ms-k.guideK, .ms-txtIn.ms-guideIn { animation: none !important; } .ms-ans { transition: none !important; } }

/* S1.2 (30.10, prośba właściciela): Podpowiedź — duży złoty przycisk pod „Co dalej” (telefon: pod zdaniem nad stołem) */
.gm-ms .ms-hintBtn { width: 100%; min-height: 60px; font-size: 20px; border-radius: 16px; gap: 10px; box-shadow: 0 10px 26px rgba(227,196,106,.35), inset 0 1px 0 rgba(255,255,255,.6); }
.gm-ms .ms-hintBtn svg { width: 28px; height: 28px; } .gm-ms .ms-hintBtn:hover { box-shadow: 0 12px 32px rgba(227,196,106,.55), inset 0 1px 0 rgba(255,255,255,.6); }
.ms-hintM { display: none !important; } .ms-side .ms-hintBtn { margin-top: -4px; }
/* S1.2: rozmiar stołu — suwaki pod stołem i uchwyt w rogu */
.ms-size { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(227,196,106,.3); background: rgba(6,12,36,.55); font-size: 18px; }
.ms-size > b { color: var(--gm-gold3); font-size: 18px; } .ms-sz { display: flex; align-items: center; gap: 10px; flex: 1 1 200px; } .ms-sz span { white-space: nowrap; }
.ms-sz input { flex: 1; min-width: 110px; height: 32px; accent-color: var(--gm-gold); } .ms-szReset { flex: 0 0 auto; min-height: 48px; font-size: 17px; }
.ms-grip { position: absolute; right: 2px; bottom: 2px; width: 34px; height: 34px; z-index: 3100; cursor: nwse-resize; touch-action: none; border-radius: 0 0 14px 0;
  background: linear-gradient(135deg, transparent 50%, rgba(227,196,106,.85) 50%, rgba(227,196,106,.85) 56%, transparent 56%, transparent 66%, rgba(227,196,106,.85) 66%, rgba(227,196,106,.85) 72%, transparent 72%, transparent 82%, rgba(227,196,106,.85) 82%, rgba(227,196,106,.85) 88%, transparent 88%); }
.ms-grip:hover { background-color: rgba(227,196,106,.12); }
.ms-layout.ms-stack { grid-template-columns: minmax(0, 1fr); } .ms-layout.ms-stack .ms-side { max-width: 760px; }
@media (max-width: 999px) { .ms-hintM { display: inline-flex !important; } .ms-side .ms-hintBtn:not(.ms-hintM) { display: none; } .gm-ms .ms-hintBtn.ms-hintM { min-height: 56px; } }
@media (max-width: 560px) { .ms-size { padding: 10px 12px; } .ms-sz { flex-basis: 100%; } .ms-szReset { width: 100%; } }
/* S1.4: „Jak to działa?” w Ze znajomymi */
.ms-howList { margin: 0 0 16px; padding-inline-start: 26px; font-size: 18px; line-height: 1.5; } .ms-howList li { margin-bottom: 8px; } .ms-howList li::marker { color: var(--gm-gold); font-weight: 800; }
.ms-frLogin { margin-top: 14px; }
/* S1.5: rozmiar stołu — układ może wyjść poza środkową kolumnę strony (przesunięcie left), uchwyt po stronie, która się rusza */
.ms-layout { position: relative; } .ms-resizing, .ms-resizing * { cursor: nwse-resize !important; } 
[dir="rtl"] .ms-grip { right: auto; left: 2px; transform: scaleX(-1); cursor: nesw-resize; }

/* WS1: pytanie — obraz, odpowiedzi, „Dlaczego?” */
.ms-chArt svg { width: 34px; height: 34px; } .ms-chArt .ms-aa4 svg, .ms-chArt .ms-aa5 svg { width: 48px; height: 34px; } .ms-chArt .ms-aa1 { width: 44px; height: 36px; } .ms-chArt .ms-aa1 svg { width: 26px; height: 26px; }

/* ---------------------------------------------------------------- SD1: kafelki prób i klawiatura */




/* ================================================================= MS1: plansza Sapera */
.ms-stage { padding: 10px 6px; display: flex; justify-content: center; background: radial-gradient(120% 90% at 50% 0%, #1A2A63, #0A1336 78%); }
.ms-play { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ms-svg { display: block; width: 100%; max-width: min(100%, calc(var(--ms-w, 8) * 62px)); max-height: calc(100vh - 210px); height: auto; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; outline: none; overflow: visible; }
.ms-svg:focus-visible { outline: 3px solid var(--gm-teal); outline-offset: 4px; border-radius: 18px; }
.ms-bg { fill: #10183A; stroke: rgba(227,196,106,.3); stroke-width: 3; }
.ms-svg.won .ms-bg { animation: msBoardWin 1.2s ease-out; }
@keyframes msBoardWin { 25% { stroke: #FFE08A; stroke-width: 10; fill: #1F2D66; } }
.ms-svg.shake { animation: msBoardShake .5s cubic-bezier(.36,.07,.19,.97); }
@keyframes msBoardShake { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); } 30%, 50%, 70% { transform: translate(-7px, 3px); } 40%, 60% { transform: translate(7px, -2px); } }

/* pole: zakryte (wypukła płytka), odkryte (płaskie, liczba), flaga, mina */
.ms-g { cursor: pointer; transform-box: fill-box; transform-origin: center; }
.ms-t { stroke: rgba(255,255,255,.10); stroke-width: 2; transition: filter .12s, transform .12s; transform-box: fill-box; transform-origin: center; }
.ms-o { fill: #0D1330; stroke: rgba(120,140,220,.14); stroke-width: 2; display: none; }
.ms-hl { fill: rgba(255,255,255,.16); pointer-events: none; }
.ms-n { font: 800 58px/1 var(--gm-font, system-ui), system-ui, sans-serif; display: none; pointer-events: none; paint-order: stroke; stroke: rgba(0,0,0,.35); stroke-width: 4px; }
.ms-uf, .ms-um, .ms-us, .ms-ux { display: none; pointer-events: none; }
.ms-ux { stroke: #FF5A4E; stroke-width: 9; stroke-linecap: round; fill: none; }
.ms-g.cl:hover .ms-t { filter: brightness(1.18); }
.ms-g.cl.press .ms-t { transform: scale(.9); filter: brightness(.9); }
.ms-g.op .ms-t, .ms-g.op .ms-hl { display: none; } .ms-g.op .ms-o { display: block; } .ms-g.op .ms-n { display: block; }
.ms-g.op.n0 { cursor: default; }
.ms-g.fl .ms-uf { display: block; } .ms-g.fl .ms-t { filter: brightness(1.05) saturate(1.1); }
.ms-g.bm .ms-o { fill: #E5484D; stroke: #FF8A7E; } .ms-g.bm .ms-um { display: block; } .ms-g.bm .ms-n { display: none; }
.ms-g.rv .ms-um { display: block; } .ms-g.rv .ms-t { filter: brightness(.75); }
.ms-g.wf .ms-ux { display: block; } .ms-g.wf .ms-t { filter: brightness(.7); }
.ms-g.sw .ms-uf, .ms-g.sw .ms-um { display: none; } .ms-g.sw .ms-us { display: block; } .ms-g.sw .ms-t { filter: brightness(1.1) hue-rotate(-10deg); }
.ms-g.foc .ms-t, .ms-g.foc .ms-o { stroke: #8FE3D8; stroke-width: 6; }
.ms-g.pop .ms-o, .ms-g.pop .ms-n { animation: msOpen .34s cubic-bezier(.2, 1.3, .4, 1) both; animation-delay: inherit; transform-box: fill-box; transform-origin: center; }
@keyframes msOpen { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: none; } }
.ms-g.pop1 { animation: msPop1 .28s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes msPop1 { from { transform: scale(.7); } to { transform: none; } }
.ms-g.nudge { animation: msNudge .38s ease-in-out; }
@keyframes msNudge { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.ms-g.warnC .ms-t, .ms-g.warnC .ms-o { animation: msWarn .9s ease-out; }
@keyframes msWarn { 0%, 40% { fill: #E5484D; stroke: #FF8A7E; stroke-width: 6; } }
.ms-g.warnC { animation: msNudge .38s ease-in-out; }
/* pole startowe: kropka z pulsującym pierścieniem */
.ms-start { pointer-events: none; }
.ms-startD { fill: #7DFFB0; filter: drop-shadow(0 0 6px rgba(125,255,176,.9)); }
.ms-startR { fill: none; stroke: #7DFFB0; stroke-width: 5; opacity: .8; transform-box: fill-box; transform-origin: center; animation: msRing 1.6s ease-out infinite; }
@keyframes msRing { from { transform: scale(.5); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.ms-start.nudgeS .ms-startD { animation: msStartN .7s ease-out; transform-box: fill-box; transform-origin: center; }
@keyframes msStartN { 30% { transform: scale(1.8); } }
/* fala wybuchu */
.ms-wave { fill: none; stroke: #FFB15A; stroke-width: 14; opacity: .9; transform-box: fill-box; transform-origin: center; animation: msWave .65s ease-out forwards; }
@keyframes msWave { to { transform: scale(14); opacity: 0; stroke-width: 2; } }
/* zielona ramka prowadząca i żółte ramki liczb (lekcje, „Podpowiedź”) */
.ms-arrow { pointer-events: none; }
.ms-gGlow { fill: none; stroke: #2ECC71; stroke-width: 22; opacity: .7; animation: msGlowP 1.2s ease-in-out infinite; }
.ms-gBox { fill: rgba(46,204,113,.16); stroke: #7DFFB0; stroke-width: 8; }
.ms-gBox.mine { fill: rgba(255,90,78,.12); }
.ms-gBy { fill: none; stroke: #FFD84D; stroke-width: 7; stroke-dasharray: 16 10; animation: msMarch .8s linear infinite; }
@keyframes msGlowP { 50% { opacity: .3; } }
@keyframes msMarch { to { stroke-dashoffset: -26; } }
.ms-parts { pointer-events: none; }
/* przełącznik Odkryj / Flaga */
.ms-mode { display: inline-flex; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(6,12,36,.7); border: 1.5px solid rgba(227,196,106,.4); }
.ms-mode button { display: inline-flex; align-items: center; gap: 8px; min-height: 50px; padding: 6px 20px; border-radius: 12px; border: 0; background: transparent; color: var(--gm-ink); font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; }
.ms-mode button[aria-pressed="true"] { color: #15120A; background: linear-gradient(180deg, var(--gm-gold3), var(--gm-gold) 55%, var(--gm-gold2)); }
.ms-mode button:focus-visible { outline: 3px solid var(--gm-teal); outline-offset: 2px; }
.ms-ico { width: 22px; height: 22px; display: inline-block; background: center / contain no-repeat; }
.ms-icoDig { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='18' height='18' rx='4' fill='%234A5A92' stroke='%23E8ECF8' stroke-width='1.5'/%3E%3Cpath d='M9 15l6-6M10 9h5v5' stroke='%23fff' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ms-icoFlag { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3v17' stroke='%23E8ECF8' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M7.5 4l11 4.5-11 4.5z' fill='%23FF5A4E'/%3E%3Cpath d='M4 20.5h7' stroke='%23E8ECF8' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ms-play.fm .ms-svg { cursor: crosshair; }
.ms-play.fm .ms-g.cl:hover .ms-t { filter: brightness(1.1) sepia(.3) hue-rotate(-20deg); }

/* wynik nad planszą: miny, życia, gwiazdki, czas */
.ms-score { display: flex; gap: 8px; }
.ms-sc { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px; border-radius: 14px; border: 1px solid rgba(227,196,106,.3); background: rgba(6,12,36,.6); }
.ms-sc b { font-size: 22px; color: var(--gm-gold3); font-variant-numeric: tabular-nums; line-height: 1.15; }
.ms-sc span { font-size: 14px; color: var(--gm-mute); text-align: center; }
.ms-scStars b, .ms-scLives b { letter-spacing: 2px; }
.ms-scStars i, .ms-bigStars i, .ms-scLives i { font-style: normal; color: rgba(255,255,255,.18); }
.ms-scStars i.on { color: #FFD84D; text-shadow: 0 0 10px rgba(255,216,77,.6); }
.ms-scLives i.on { color: #FF5A6E; text-shadow: 0 0 10px rgba(255,90,110,.55); }
.ms-scLives b.drop i:not(.on) { animation: msStarOut .6s ease-out; }
@keyframes msStarOut { 0% { color: #FF5A6E; transform: scale(1.5); } 100% { color: rgba(255,255,255,.18); transform: none; } }
.ms-bigStars { display: flex; justify-content: center; gap: 10px; font-size: 58px; line-height: 1; margin: 0 0 6px; }
.ms-bigStars i { display: inline-block; }
.ms-bigStars i.on { color: #FFD84D; text-shadow: 0 0 22px rgba(255,216,77,.75); }
.ms-bigStars i.pop { animation: msStarPop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes msStarPop { from { transform: scale(.2) rotate(-40deg); } to { transform: none; } }

/* poziomy u góry gry (HP1/WC2) */
.ms-lvBar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ms-lvBar button { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 6px 14px; border-radius: 13px; border: 1.5px solid rgba(227,196,106,.4); background: rgba(6,12,36,.62); color: var(--gm-ink); font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; }
.ms-lvBar button small { font-weight: 500; color: var(--gm-mute); font-size: 15px; }
.ms-lvBar button svg { width: 20px; height: 20px; }
.ms-lvBar button:hover { border-color: var(--gm-gold); }
.ms-lvBar button[aria-pressed="true"] { color: #15120A; border-color: var(--gm-gold3); background: linear-gradient(180deg, var(--gm-gold3), var(--gm-gold) 55%, var(--gm-gold2)); }
.ms-lvBar button[aria-pressed="true"] small { color: #3A2E0A; }
.ms-lvBar button:focus-visible { outline: 3px solid var(--gm-teal); outline-offset: 2px; }

.ms-mini { width: 54px; height: 54px; }
.ms-lvlArt { height: 58px; }
.ms-lvlStars { font-size: 16px; color: #FFD84D; font-weight: 700; }
.ms-chArt .ms-mini { width: 40px; height: 40px; }
.ms-tool:disabled { opacity: .45; cursor: default; }
.ms-also { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(227,196,106,.25); }
/* „Twoja zaczęta gra”: złoty kwadrat z ikoną */
.ms-cont .ms-contArt { width: 50px; height: 50px; border-radius: 12px; border: 0; box-shadow: none; background: rgba(227,196,106,.16); color: var(--gm-gold3); display: grid; place-items: center; }
.ms-cont .ms-contArt svg { width: 32px; height: 32px; }

/* MS1b telefon: plansza mieści się na ekranie razem z licznikami i rzędem Odkryj/Flaga/Podpowiedź (wcześniej max-height: none — 9×12 i większe wychodziły pod dolny pasek) */
@media (max-width: 999px) {
  .ms-svg { max-height: max(calc(100vh - 370px), 360px); max-height: max(calc(100dvh - 370px), 360px); }
  .ms-modeRow { display: flex; gap: 8px; align-items: stretch; justify-content: center; width: 100%; }
  .ms-modeRow .ms-mode { flex: 1 1 0; min-width: 0; width: auto; max-width: 420px; } .ms-modeRow .ms-mode button { flex: 1; justify-content: center; padding: 6px 10px; }
  .gm-ms .ms-modeRow .ms-hintBtn.ms-hintM { flex: 0 0 auto; width: auto; max-width: 46%; min-height: 0; margin: 0; padding: 6px 14px; font-size: 17px; border-radius: 16px; }
  .gm-ms .ms-hintM[hidden] { display: none !important; }
  .ms-pane .ms-nowM { padding: 9px 12px; font-size: 17px; line-height: 1.35; }
  #msGame .ms-nowM { padding: 7px 11px; font-size: 15.5px; line-height: 1.3; border-width: 1.5px; }
}
@media (max-width: 400px) { .ms-modeRow { gap: 6px; } .ms-modeRow .ms-mode button { padding: 6px 6px; font-size: 16px; gap: 5px; } .gm-ms .ms-modeRow .ms-hintBtn.ms-hintM { padding: 6px 10px; font-size: 16px; } }
@media (max-width: 560px) {
  .ms-stage { padding: 6px 2px; }
  .ms-mode { width: calc(100% - 8px); } .ms-mode button { flex: 1; justify-content: center; min-height: 52px; }
  .ms-sc { padding: 6px 4px; } .ms-sc b { font-size: 19px; } .ms-sc span { font-size: 13px; }
  .ms-bigStars { font-size: 48px; }
  .ms-lvBar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -12px; padding: 2px 12px 4px; margin-bottom: 10px; }
  .ms-lvBar::-webkit-scrollbar { display: none; }
  .ms-lvBar button { flex: 0 0 auto; min-height: 42px; font-size: 15px; padding: 6px 12px; white-space: nowrap; }
  .ms-lvBar button small { font-size: 13px; }
  .ms-score { gap: 6px; } .ms-sc { padding: 5px 4px; border-radius: 12px; } .ms-sc b { font-size: 18px; } .ms-sc span { font-size: 12px; }
}
/* telefon: plansza od razu na ekranie — w Graj bez stałego zdania nad planszą (podpowiedź zostaje) */
@media (max-width: 999px) {
  #msGame .ms-nowM:not(.on) { display: none !important; }
  #msGame .ms-topbar { font-size: 16px; } #msGame .ms-topbar b { font-size: 18px; }
  .gm-ms .ms-hintBtn.ms-hintM { min-height: 50px; font-size: 18px; }
  #msGame .ms-work { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .ms-g.pop .ms-o, .ms-g.pop .ms-n, .ms-g.pop1, .ms-g.nudge, .ms-startR, .ms-gGlow, .ms-gBy, .ms-bigStars i.pop, .ms-svg.won .ms-bg, .ms-svg.shake, .ms-wave { animation: none !important; } }

/* MS2 (17.11.2026): komputer — plansza z licznikami i Odkryj/Flaga na jednym ekranie; telefon — okno wygranej w ekranie, powiększenie dużych plansz; rekord, statystyki */
@media (min-width: 1000px) { .ms-svg { max-height: max(calc(100vh - 330px), 380px); } }
.ms-zoomWrap { width: 100%; display: flex; justify-content: center; }
.ms-zoomWrap.on { display: block; overflow: auto; max-height: max(calc(100vh - 420px), 320px); max-height: max(calc(100dvh - 420px), 320px); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; border-radius: 14px; }
.ms-zoomWrap.on .ms-svg { max-width: none; max-height: none; touch-action: pan-x pan-y; }
.ms-play > .ms-zoomBtn { align-self: flex-end; margin: -2px 4px -4px; }
.ms-zoomBtn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 14px; border-radius: 12px; border: 1.5px solid rgba(227,196,106,.55); background: rgba(6,12,36,.7); color: var(--gm-gold3); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.ms-zoomBtn[hidden] { display: none; } .ms-zoomBtn[aria-pressed="false"] { background: linear-gradient(180deg, var(--gm-gold3), var(--gm-gold) 55%, var(--gm-gold2)); color: #15120A; }
.ms-zoomBtn:focus-visible { outline: 3px solid var(--gm-teal); outline-offset: 2px; }
#msGame.ms-over .ms-mode, #msGame.ms-over .ms-modeRow { display: none !important; }
.ms-dlg p.ms-doneRec { color: #8FE3D8; font-weight: 700; font-size: 18px; } .ms-dlg p.ms-doneRec.new { color: var(--gm-gold3); font-size: 20px; } .ms-dlg [hidden] { display: none !important; }
.ms-lvlSt { display: block; margin-top: 4px; font-size: 15px; color: #8FE3D8; } .ms-lvlSt[hidden] { display: none; }
@media (max-width: 999px) { #msDone { position: fixed; top: 12px; max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px); overflow-y: auto; overscroll-behavior: contain; } }
@media (min-width: 1000px) { #msDone { position: fixed; top: 50%; transform: translate(-50%, -50%); max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; } } /* MS2: okno nie wydłuża strony — pierwsze kliknięcie (koniec odliczania) nie przesuwa przycisków spod myszy */
