/* Pisaczek Rozrywka — ekran Szachy (marker PNP_PISACZEK_GAMES_CHESS_CSS_V1), v11 (16.10: przegląd partii; v9: Stockfish; v8: zapisane = belki; zakładki górne w games-v1.css TABS_V2; v5: rama z obwódką widoczna w każdym wariancie, złoty szklany suwak między panelami, przewijanie do dna; v4: naturalna plansza z ramą 3D i słojem, litery na ramie, osobne przewijanie paneli, cel bez gwiazdy; v3: 6 wyglądów; v2: szerokość, podsumowania): własna plansza, figury „Luksus 3D”, przeciąganie, lekcje, gra. Dziedziczy gm-* z games-v1.css; tekst ≥ 18 px, przyciski ≥ 48 px (seniorzy). */
:root { --ch-l: #EADFC6; --ch-d: #8A6A45; --ch-pscale: .88; }
.gm-back { color: var(--gm-gold); text-decoration: none; font-size: 17px; }
.gm-back:hover { color: var(--gm-gold3); }
.gm-tabs button[aria-pressed="true"] { color: #15120A; background: linear-gradient(180deg, var(--gm-gold3), var(--gm-gold) 45%, var(--gm-gold2)); border-color: rgba(255,241,194,.6); border-bottom-color: #5B4A2E; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 2px 0 #7A6224, 0 4px 0 #5B4A2E, 0 6px 0 #3A2E12, 0 12px 24px rgba(227,196,106,.35); }
.gm-tabs button[aria-pressed="true"] svg { color: #15120A; filter: none; }
.gm-chess .gm-stage { perspective: none; }
/* v2: na całą szerokość strony — plansza dostaje ok. 55 % szerokości, panel resztę */
.gm-chess.gm-main { max-width: none; padding-left: clamp(12px, 2vw, 32px); padding-right: clamp(12px, 2vw, 32px); }
.gm-chessPanel { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr); gap: 32px; align-items: start; animation: none; --z: 0px; transform: none; }
.gm-boardCol { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 0 6px 12px; } /* v4: lewy i prawy panel przewijają się osobno */
.gm-chessSide { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-inline-end: 8px; }
.gm-chessSide { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.gm-chessSide h2 { margin: 0; font-family: var(--gm-head); font-size: 28px; font-weight: 400; line-height: 1.15; }
.gm-chessSide h3 { margin: 0; font-family: var(--gm-head); font-size: 24px; font-weight: 400; color: var(--gm-gold3); }
.gm-chessSide p { margin: 0; color: var(--gm-mute); font-size: 18px; line-height: 1.5; }
.gm-cubeActions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gm-ghost { background: rgba(255,255,255,.04); color: var(--gm-ink); border: 1px solid rgba(227,196,106,.45); }
.gm-ghost:hover { border-color: var(--gm-gold); }
.gm-chess .gm-btn, .gm-chess .gm-btn:hover, .gm-chess .gm-btn:active, .gm-chess .gm-pill, .gm-chess .gm-lessonBtn { transform: none !important; transition: box-shadow .12s, filter .12s, border-color .12s; }
.gm-chess .gm-btn:hover { filter: brightness(1.08); } .gm-chess .gm-btn:active, .gm-chess .gm-pill:active { filter: brightness(.85); }
.gm-btn[disabled] { opacity: .5; cursor: default; }
.gm-big { font-size: 24px; min-height: 64px; padding-inline: 34px; }
.gm-pill { font: inherit; font-size: 17px; min-height: 48px; padding: 6px 16px; border-radius: 999px; cursor: pointer; color: var(--gm-ink); background: rgba(255,255,255,.05); border: 1px solid rgba(227,196,106,.4); }
.gm-pill[aria-pressed="true"] { color: #15120A; background: linear-gradient(180deg, var(--gm-gold3), var(--gm-gold2)); }
.gm-check { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; cursor: pointer; } .gm-check input { width: 24px; height: 24px; accent-color: var(--gm-gold); }
.gm-kicker { font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--gm-kick); }
.gm-status { min-height: 1.5em; font-size: 18px; color: var(--gm-mute); } .gm-err { color: #FFB4A8; }
.gm-stepBig { margin: 0; font-family: var(--gm-head); font-size: 28px; font-weight: 400; color: var(--gm-gold3); }
.gm-col { display: inline-block; padding: 1px 10px; border-radius: 999px; font-weight: 700; border: 1px solid rgba(255,255,255,.25); } .gm-col[data-c="w"] { background: #F4F4F4; color: #15120A; } .gm-col[data-c="b"] { background: #1B1B22; color: #F3EEE2; }
.gm-cubeLoading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-size: 18px; color: var(--gm-mute); background: rgba(5,6,12,.5); border-radius: 12px; z-index: 6; }
.gm-spin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(227,196,106,.25); border-top-color: var(--gm-gold); animation: chSpin 1s linear infinite; }
@keyframes chSpin { to { transform: rotate(360deg); } }
/* lektor pod planszą — zawsze zajmuje miejsce, plansza nie skacze */
.gm-say { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 64px; width: 100%; margin: 0; padding: 8px 14px; border-radius: 14px; background: rgba(0,0,0,.35); border: 1px solid rgba(227,196,106,.35); font-size: 20px; color: var(--gm-ink); }
.gm-say[hidden] { display: flex; visibility: hidden; }
.gm-say b { color: var(--gm-gold3); font-family: var(--gm-head); font-weight: 400; font-size: 24px; } .gm-sayPre { color: var(--gm-mute); }
.gm-say[data-tone="wrong"] { border-color: #FFB4A8; background: rgba(217,48,48,.18); } .gm-say[data-tone="wrong"] .gm-sayPre { color: #FFD3CC; }
.gm-say[data-tone="ok"] { border-color: var(--gm-teal); background: rgba(86,214,200,.16); } .gm-say[data-tone="ok"] .gm-sayPre { color: #BFF0E8; font-weight: 700; }
.ch-hints { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; width: 100%; font-size: 16px; color: var(--gm-mute); } .gm-ver { opacity: .6; }
/* ---- plansza v4: naturalna, jak prawdziwa — gruba drewniana rama 3D z literami, słój drewna (filtr SVG #chGrain), lakier; wyglądy = zmienne --fr*, --l*, --d* ---- */
.ch-wrap { position: relative; width: 100%; max-width: 100%; --fpad: 34px; }
.ch-frame { position: relative; padding: var(--fpad); border-radius: calc(var(--fpad) * .45);
  --fr1: #8A5A32; --fr2: #5E3A1C; --fr3: #3B2210; --fr4: #2A170A; --inlay: #E3C46A; --l1: #F1E6CF; --l2: #DCCBA6; --d1: #A07A4F; --d2: #7C5A36; --grain: .5; --coord: rgba(255,238,205,.82); --rim: #E3C46A; --rim2: #FFF1C2;
  background: linear-gradient(135deg, var(--fr1), var(--fr2) 38%, var(--fr1) 62%, var(--fr3));
  box-shadow: inset 0 2px 0 var(--rim2), inset 0 -2px 0 rgba(0,0,0,.45), inset 2px 0 0 rgba(255,241,194,.25), inset -2px 0 0 rgba(0,0,0,.35), 0 0 0 2px var(--rim), 0 0 0 3px rgba(0,0,0,.5), 0 10px 0 var(--fr4), 0 11px 0 rgba(0,0,0,.5), 0 12px 0 2px var(--rim), 0 34px 60px rgba(0,0,0,.65), 0 0 50px rgba(227,196,106,.12); } /* v5: obwódka --rim dookoła i pod spodem = rama widoczna na każdym tle */
.ch-frame::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1; background: repeating-linear-gradient(1deg, rgba(0,0,0,.09) 0 2px, transparent 2px 7px, rgba(255,255,255,.04) 7px 9px, transparent 9px 16px); opacity: var(--grain); filter: url(#chGrain); mix-blend-mode: multiply; }
.ch-frame::after { content: ""; position: absolute; inset: calc(var(--fpad) - 5px); pointer-events: none; z-index: 1; border-radius: 3px; box-shadow: 0 0 0 1.5px var(--inlay), 0 0 0 3px var(--fr4), inset 0 0 0 2px var(--fr4), inset 0 3px 8px rgba(0,0,0,.55); } /* intarsja: złota linia + ciemna listwa i cień rzucany przez ramę na pola */
.ch-board { position: relative; z-index: 2; width: 100%; aspect-ratio: 1; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); overflow: visible; touch-action: none; user-select: none; -webkit-user-select: none; direction: ltr; outline: none; }
.ch-board:focus-visible { box-shadow: 0 0 0 3px var(--gm-teal); }
.ch-sq { position: relative; }
.ch-sq.ch-l { background: linear-gradient(160deg, var(--l1), var(--l2)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.ch-sq.ch-d { background: linear-gradient(160deg, var(--d1), var(--d2)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.ch-grain { position: absolute; inset: 0; pointer-events: none; z-index: 1; background: repeating-linear-gradient(92deg, rgba(0,0,0,.10) 0 1px, transparent 1px 6px, rgba(0,0,0,.05) 6px 8px, transparent 8px 13px); opacity: var(--grain); filter: url(#chGrain); mix-blend-mode: multiply; } /* jedna warstwa słoju nad polami (pod figurami) */
.ch-sheen { position: absolute; inset: 0; pointer-events: none; z-index: 4; background: linear-gradient(115deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.05) 26%, transparent 44%, rgba(0,0,0,.05) 100%); } /* lakier */
.ch-sq.ch-last { box-shadow: inset 0 0 0 100px rgba(227,196,106,.38); }
.ch-sq.ch-sel { box-shadow: inset 0 0 0 100px rgba(86,214,200,.45); }
.ch-sq.ch-dot::after { content: ""; position: absolute; left: 50%; top: 50%; width: 30%; height: 30%; translate: -50% -50%; border-radius: 50%; background: rgba(43,194,106,.8); box-shadow: 0 0 10px rgba(43,194,106,.7); }
.ch-sq.ch-cap::after { content: ""; position: absolute; inset: 6%; border-radius: 50%; border: 5px solid rgba(43,194,106,.85); box-sizing: border-box; }
/* cel kroku lekcji: złota tarcza (koncentryczne kółka) — bez gwiazd i symboli */
.ch-sq.ch-star::before { content: ""; position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(circle, #FFF1C2 0 14%, transparent 15% 30%, rgba(227,196,106,.95) 31% 44%, transparent 45% 60%, rgba(227,196,106,.85) 61% 72%, transparent 73%); box-shadow: 0 0 16px rgba(255,241,194,.7); animation: chStar 1.6s ease-in-out infinite; }
.ch-sq.ch-danger { box-shadow: inset 0 0 0 100px rgba(217,48,48,.42); }
.ch-sq.ch-check { box-shadow: inset 0 0 0 100px rgba(217,48,48,.55); animation: chPulse 1s ease-in-out infinite; }
.ch-sq.ch-hintFrom { box-shadow: inset 0 0 0 5px var(--gm-teal), inset 0 0 0 100px rgba(86,214,200,.3); animation: chPulse 1.2s ease-in-out infinite; }
.ch-sq.ch-hintTo { box-shadow: inset 0 0 0 5px var(--gm-gold3), inset 0 0 0 100px rgba(227,196,106,.4); animation: chPulse 1.2s ease-in-out infinite; }
@keyframes chStar { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes chPulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
.ch-pieces { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.ch-pc { position: absolute; width: 12.5%; height: 12.5%; object-fit: contain; pointer-events: none; transition: left .22s ease, top .22s ease; transform: scale(var(--ch-pscale)); transform-origin: 50% 70%; filter: drop-shadow(0 6px 6px rgba(0,0,0,.45)); will-change: left, top; }
.ch-pc.ch-noAnim { transition: none; }
.ch-pc.ch-drag { transition: none; z-index: 5; transform: scale(calc(var(--ch-pscale) * 1.18)); filter: drop-shadow(0 18px 18px rgba(0,0,0,.6)); }
.ch-pc.ch-shake { animation: chShake .4s ease; }
@keyframes chShake { 0%, 100% { translate: 0 0; } 25% { translate: -6% 0; } 75% { translate: 6% 0; } }
.ch-board { cursor: default; } .ch-board:has(.ch-drag) { cursor: grabbing; }
/* litery i cyfry wyryte na ramie (poza polami) */
.ch-coords { position: absolute; inset: 0; pointer-events: none; z-index: 3; font: 700 calc(var(--fpad) * .48)/1 var(--gm-body); color: var(--coord); text-shadow: 0 1px 0 rgba(0,0,0,.55), 0 -1px 0 rgba(255,255,255,.12); letter-spacing: .02em; }
.ch-cf { position: absolute; bottom: calc(-1 * var(--fpad)); width: 12.5%; height: var(--fpad); display: flex; align-items: center; justify-content: center; }
.ch-cr { position: absolute; left: calc(-1 * var(--fpad)); width: var(--fpad); height: 12.5%; display: flex; align-items: center; justify-content: center; }
/* promocja: własne okienko (bez prompt/alert) */
.ch-promo { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; border-radius: 12px; background: rgba(5,6,12,.78); }
.ch-promo p { margin: 0; font-size: 20px; color: var(--gm-ink); text-align: center; }
.ch-promoList { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.ch-promoBtn { display: flex; flex-direction: column; align-items: center; gap: 4px; font: inherit; font-size: 17px; min-width: 96px; padding: 8px; border-radius: 14px; cursor: pointer; color: var(--gm-ink); background: rgba(255,255,255,.06); border: 1px solid rgba(227,196,106,.5); }
.ch-promoBtn img { width: 72px; height: 72px; object-fit: contain; } .ch-promoBtn:hover { border-color: var(--gm-gold3); background: rgba(227,196,106,.18); }
/* suwaki wielkości */
.ch-size { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.08); }
.ch-sizeRow { display: grid; grid-template-columns: minmax(120px, 1fr) 48px minmax(120px, 2fr) 48px; align-items: center; gap: 10px; font-size: 17px; color: var(--gm-mute); }
.ch-sizeRow label { color: var(--gm-ink); }
.ch-sizeOpts { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.ch-pm { min-width: 48px; padding: 0; font-size: 24px; font-weight: 700; }
.ch-size input[type="range"] { width: 100%; height: 36px; accent-color: var(--gm-gold); cursor: pointer; }
/* lekcje */
.ch-lessonList { display: flex; flex-direction: column; gap: 8px; }
.gm-lessonBtn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 8px 12px; border-radius: 14px; cursor: pointer; text-align: start; font: inherit; color: var(--gm-ink); background: rgba(255,255,255,.04); border: 1px solid rgba(227,196,106,.35); }
.gm-lessonBtn:hover { border-color: var(--gm-gold); background: rgba(227,196,106,.1); }
.gm-lessonBtn[aria-pressed="true"] { border-color: var(--gm-gold3); background: rgba(227,196,106,.18); box-shadow: 0 0 18px rgba(227,196,106,.25); }
.gm-lessonBtn[data-state="done"] { border-color: rgba(86,214,200,.6); } .gm-lessonBtn[data-state="locked"] { opacity: .6; }
.gm-lessonBtn img { width: 46px; height: 46px; object-fit: contain; flex: none; }
.gm-lessonT { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .gm-lessonT b { font-size: 19px; } .gm-lessonT small { font-size: 15px; color: var(--gm-mute); line-height: 1.3; }
.gm-lessonStar { margin-inline-start: auto; font-size: 24px; color: var(--gm-teal); }
.gm-guide { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 14px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.08); }
.gm-guideHead { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--gm-gold); }
.ch-task { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; background: rgba(227,196,106,.10); border: 1px solid rgba(227,196,106,.35); }
.ch-taskText { font-size: 21px !important; color: var(--gm-ink) !important; line-height: 1.45; }
.ch-why { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border-radius: 14px; background: rgba(86,214,200,.08); border: 1px solid rgba(86,214,200,.35); }
.ch-why p { color: #D8F5F1 !important; }
.ch-pcChip { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; padding: 0 8px 0 2px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); font-weight: 700; color: var(--gm-ink); }
.ch-pcChip img { width: 30px; height: 30px; object-fit: contain; }
.ch-sqChip { display: inline-block; padding: 0 8px; border-radius: 8px; background: rgba(227,196,106,.22); border: 1px solid rgba(227,196,106,.5); font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: var(--gm-gold3); }
.gm-solvedTag { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: rgba(86,214,200,.16); border: 1px solid var(--gm-teal); color: #BFF0E8; font-size: 20px; font-weight: 700; }
/* gość */
.gm-lock { position: relative; z-index: 5; display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; background: linear-gradient(180deg, rgba(14,24,64,.96), rgba(8,14,40,.96)); border: 1px solid var(--gm-gold); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.gm-lock h3 { margin: 0; font-family: var(--gm-head); font-size: 24px; font-weight: 400; color: var(--gm-gold3); } .gm-lock p { margin: 0; color: var(--gm-ink); font-size: 18px; }
/* gra */
.ch-coach { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; background: rgba(86,214,200,.1); border: 1px solid rgba(86,214,200,.4); } .ch-coach p { color: var(--gm-ink) !important; font-size: 19px; }
.gm-movesLine { display: flex; flex-direction: column; gap: 6px; }
.ch-moves { margin: 0; padding: 10px 12px 10px 34px; min-height: 2em; max-height: 180px; overflow: auto; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.08); font: 17px/1.6 ui-monospace, Consolas, monospace; column-width: 140px; }
.ch-moves:empty::before { content: attr(data-empty); color: var(--gm-mute); font-family: var(--gm-body); margin-left: -22px; }
.ch-moves li { break-inside: avoid; } .ch-moves b { color: var(--gm-gold3); font-weight: 400; margin-inline-end: 10px; }
/* telefon: zakładki pod ikonką, plansza na całą szerokość, panel pod planszą */
.gm-tabsToggle { display: none; align-items: center; gap: 10px; font: inherit; font-weight: 700; font-size: 18px; min-height: 52px; padding: 8px 16px; border-radius: 14px; color: #15120A; background: linear-gradient(180deg, var(--gm-gold3), var(--gm-gold2)); border: 1px solid rgba(255,241,194,.6); cursor: pointer; margin-bottom: 12px; }
.gm-tabsToggle svg { width: 26px; height: 26px; }
@media (max-width: 900px) {
  .gm-tabsToggle { display: inline-flex; }
  .gm-tabs { display: none; } .gm-tabs.gm-open { display: flex; flex-direction: column; align-items: stretch; } .gm-tabs.gm-open button { justify-content: flex-start; }
  .gm-chessPanel { grid-template-columns: 1fr; gap: 16px; } .gm-boardCol, .gm-chessSide { position: static; max-height: none; overflow: visible; padding: 0; }
  .gm-chess .gm-main { padding-left: 6px; padding-right: 6px; gap: 14px; } .gm-chess .gm-chessPanel.gm-tile { padding: 10px 6px; }
  .ch-sizeRow { grid-template-columns: 1fr 48px minmax(80px, 2fr) 48px; font-size: 16px; }
  .gm-say { font-size: 18px; } .gm-say b { font-size: 21px; }
}
@media (max-width: 560px) { .ch-sizeRow { grid-template-columns: 48px 1fr 48px; } .ch-sizeRow label { grid-column: 1 / -1; } .ch-sizeOpts { display: flex; } }
/* v2: podsumowanie po lekcji + licznik lekcji */
.ch-learned { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 14px; background: rgba(86,214,200,.12); border: 1px solid rgba(86,214,200,.5); }
.ch-learned p { color: #E6FBF8 !important; font-size: 19px; line-height: 1.5; }
.ch-lessonsCount { font-size: 17px; color: var(--gm-mute); margin: -6px 0 0; }
.gm-chessSide h2 small { display: block; font-family: var(--gm-body); font-size: 17px; color: var(--gm-mute); margin-top: 4px; }
.gm-solvedTag { flex-direction: column; align-items: flex-start; }
/* v4: wyglądy = materiał ramy i pól (zmienne), wszystkie z grubą ramą 3D */
.ch-frame[data-theme="oldwood"] { --fr1: #5A3A1C; --fr2: #3A2410; --fr3: #2A1808; --fr4: #150C04; --inlay: #9C7B3A; --rim: #B8923E; --rim2: #D9B46A; --l1: #CDB68A; --l2: #B3985F; --d1: #6E4B2A; --d2: #4E311A; --grain: .8; --coord: rgba(255,230,190,.75); }
.ch-frame[data-theme="oldwood"] .ch-sheen { background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0,0,0,.3) 100%), linear-gradient(115deg, rgba(255,255,255,.07), transparent 40%); }
.ch-frame[data-theme="futur"] { --fr1: #C9D2E0; --fr2: #8E9AAE; --fr3: #B4BFCF; --fr4: #3C4658; --inlay: #56D6C8; --rim: #56D6C8; --rim2: #F2F6FA; --l1: #1F2F60; --l2: #152248; --d1: #0D1736; --d2: #080F28; --grain: .25; --coord: rgba(191,240,232,.85); }
.ch-frame[data-theme="futur"]::before { background: repeating-linear-gradient(0deg, rgba(86,214,200,.08) 0 1px, transparent 1px 5px); filter: none; mix-blend-mode: normal; }
.ch-frame[data-theme="futur"]::after { box-shadow: 0 0 0 1.5px var(--inlay), 0 0 0 3px var(--fr4), 0 0 18px rgba(86,214,200,.45), inset 0 0 0 1px rgba(86,214,200,.35), inset 0 3px 8px rgba(0,0,0,.6); }
.ch-frame[data-theme="futur"] .ch-sq.ch-l, .ch-frame[data-theme="futur"] .ch-sq.ch-d { box-shadow: inset 0 0 0 1px rgba(86,214,200,.3); }
.ch-frame[data-theme="futur"] .ch-sq.ch-last { box-shadow: inset 0 0 0 2px var(--gm-teal), inset 0 0 0 100px rgba(86,214,200,.22); }
.ch-frame[data-theme="futur"] .ch-coords { text-shadow: 0 0 6px rgba(86,214,200,.7); }
.ch-frame[data-theme="futur"] .ch-pc { filter: drop-shadow(0 0 6px rgba(86,214,200,.35)) drop-shadow(0 6px 6px rgba(0,0,0,.6)); }
.ch-frame[data-theme="modern"] { --fr1: #E6D7B6; --fr2: #CBB68E; --fr3: #DCCBA6; --fr4: #7A684A; --inlay: #3A3A3A; --rim: #5A5A5A; --rim2: #FFF8E8; --l1: #EEEED2; --l2: #E6E6C8; --d1: #779956; --d2: #6F8F50; --grain: .3; --coord: rgba(60,45,25,.8); }
.ch-frame[data-theme="modern"] .ch-sq.ch-l, .ch-frame[data-theme="modern"] .ch-sq.ch-d { box-shadow: none; }
.ch-frame[data-theme="modern"] .ch-sq.ch-last { box-shadow: inset 0 0 0 100px rgba(255,255,0,.35); }
.ch-frame[data-theme="modern"] .ch-coords { text-shadow: 0 1px 0 rgba(255,255,255,.4); }
/* mahoń: ciemnoczerwone, szlachetne drewno; pola = klon i mahoń */
.ch-frame[data-theme="mahog"] { --fr1: #7A3020; --fr2: #4A1A10; --fr3: #6A2818; --fr4: #2A0C06; --inlay: #E3C46A; --rim: #E3C46A; --rim2: #F0C8A0; --l1: #EFDDBB; --l2: #DEC79A; --d1: #8E3A26; --d2: #6E2616; --grain: .6; --coord: rgba(255,230,205,.85); }
.ch-frame[data-theme="glass"] { --fr1: #F1D98A; --fr2: #C7A23E; --fr3: #E3C46A; --fr4: #7A5E1C; --inlay: #FFF1C2; --rim: #FFF1C2; --rim2: #FFFBEA; --l1: rgba(255,241,194,.38); --l2: rgba(255,241,194,.24); --d1: rgba(10,18,50,.6); --d2: rgba(6,12,36,.75); --grain: 0; --coord: rgba(255,241,194,.95); }
.ch-frame[data-theme="glass"]::before { filter: none; background: linear-gradient(115deg, rgba(255,255,255,.3), transparent 40%, rgba(255,255,255,.12) 70%, transparent); mix-blend-mode: normal; opacity: 1; }
.ch-frame[data-theme="glass"] .ch-sq.ch-l, .ch-frame[data-theme="glass"] .ch-sq.ch-d { box-shadow: inset 0 0 0 1px rgba(227,196,106,.45); }
.ch-frame[data-theme="glass"] .ch-coords { color: rgba(70,50,10,.85); text-shadow: 0 1px 0 rgba(255,255,255,.5); }
/* wybór wyglądu: miniaturowe plansze 2×2 */
.ch-themes { display: flex; flex-wrap: wrap; gap: 10px; }
.ch-th { display: flex; flex-direction: column; align-items: center; gap: 6px; font: inherit; font-size: 15px; min-width: 96px; padding: 8px 10px; border-radius: 14px; cursor: pointer; color: var(--gm-ink); background: rgba(255,255,255,.04); border: 1px solid rgba(227,196,106,.35); }
.ch-th:hover { border-color: var(--gm-gold); } .ch-th[aria-pressed="true"] { border-color: var(--gm-gold3); background: rgba(227,196,106,.16); box-shadow: 0 0 14px rgba(227,196,106,.3); }
.ch-thSw { display: grid; grid-template-columns: 1fr 1fr; width: 48px; height: 48px; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 3px var(--f1), 0 0 0 4px var(--f2); } .ch-thSw i { display: block; } .ch-thSw i:nth-child(1), .ch-thSw i:nth-child(4) { background: var(--l); } .ch-thSw i:nth-child(2), .ch-thSw i:nth-child(3) { background: var(--d); }
.ch-th[data-theme="wood"] .ch-thSw { --l: #EADFC6; --d: #8A6A45; --f1: #5E3A1C; --f2: #E3C46A; } .ch-th[data-theme="oldwood"] .ch-thSw { --l: #C4AC80; --d: #5C3C20; --f1: #241709; --f2: #9C7B3A; }
.ch-th[data-theme="futur"] .ch-thSw { --l: #1B2A58; --d: #0B1430; --f1: #0A1430; --f2: #56D6C8; } .ch-th[data-theme="modern"] .ch-thSw { --l: #EEEED2; --d: #769656; --f1: #2B2B2B; --f2: #444; }
.ch-th[data-theme="mahog"] .ch-thSw { --l: #E9D5B0; --d: #7A2E1E; --f1: #4A1A10; --f2: #E3C46A; } .ch-th[data-theme="glass"] .ch-thSw { --l: rgba(255,241,194,.45); --d: rgba(10,18,50,.8); --f1: rgba(14,24,64,.8); --f2: #E3C46A; }
.ch-coach { margin-bottom: 4px; } .ch-coach p { overflow-wrap: anywhere; }
/* v3: odstępy w panelu Graj (ramka trenera nie styka się z przyciskami) + zakładka Zapisane */
#playSetup, #playGame { display: flex; flex-direction: column; gap: 14px; } #playGame[hidden], #playSetup[hidden] { display: none; }
.ch-saved { display: flex; flex-direction: column; gap: 10px; }
.ch-sv { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(180deg, rgba(14,24,64,.7), rgba(8,14,40,.75)); border: 1px solid rgba(227,196,106,.4); box-shadow: 0 10px 26px rgba(0,0,0,.4); }
.ch-sv[data-status="finished"] { border-color: rgba(86,214,200,.5); } .ch-sv[data-current="1"] { border-color: var(--gm-gold3); box-shadow: 0 0 18px rgba(227,196,106,.3); }
.ch-svHead { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; } .ch-svHead b { font-family: var(--gm-head); font-weight: 400; font-size: 21px; color: var(--gm-gold3); }
.ch-svMeta { font-size: 16px; color: var(--gm-mute); line-height: 1.5; } .ch-svMeta span { display: block; }
.ch-svMini { display: grid; grid-template-columns: repeat(8, 1fr); width: 100%; max-width: 160px; aspect-ratio: 1; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 2px #3B2A17; } .ch-svMini i { display: block; position: relative; } .ch-svMini i.l { background: #EADFC6; } .ch-svMini i.d { background: #8A6A45; } .ch-svMini img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; }
.ch-svActions { display: flex; flex-wrap: wrap; gap: 8px; } .ch-svActions .gm-pill { min-height: 44px; font-size: 16px; }
.ch-svName { font: inherit; font-size: 17px; min-height: 44px; padding: 6px 12px; border-radius: 10px; color: var(--gm-ink); background: rgba(0,0,0,.35); border: 1px solid rgba(227,196,106,.45); width: 100%; }
.ch-resume { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(227,196,106,.12); border: 1px solid rgba(227,196,106,.5); font-size: 18px; }
/* v5: złoty, szklany suwak między panelami (prawy panel ma suwak po lewej stronie = pośrodku ekranu) */
html[dir="ltr"] .gm-chessSide { direction: rtl; } html[dir="ltr"] .gm-chessSide > * { direction: ltr; }
html[dir="rtl"] .gm-boardCol { direction: ltr; }
.gm-chessSide, .gm-boardCol { scrollbar-color: #E3C46A rgba(14,24,64,.55); scrollbar-width: auto; }
.gm-chessSide::-webkit-scrollbar, .gm-boardCol::-webkit-scrollbar { width: 16px; }
.gm-chessSide::-webkit-scrollbar-track, .gm-boardCol::-webkit-scrollbar-track { background: linear-gradient(180deg, rgba(14,24,64,.55), rgba(6,12,36,.7)); border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(227,196,106,.45), inset 0 2px 6px rgba(0,0,0,.6); margin: 6px 0; }
.gm-chessSide::-webkit-scrollbar-thumb, .gm-boardCol::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #FFF8E0 0%, #F1D98A 18%, #E3C46A 50%, #C7A23E 100%); border-radius: 10px; border: 3px solid rgba(8,14,40,.75); background-clip: padding-box; box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -1px 0 rgba(120,90,20,.6); }
.gm-chessSide::-webkit-scrollbar-thumb:hover, .gm-boardCol::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #FFFFFF 0%, #FFF1C2 20%, #E3C46A 55%, #D4AE4A 100%); }
.gm-chessSide { padding-inline-end: 0; padding-inline-start: 10px; padding-bottom: 24px; } /* zapas na dole: ostatni element nigdy nie ginie pod krawędzią */
/* v8: zapisane partie = belki: po lewej nazwa + data i godzina, po prawej opcje (bez szachownicy) */
.ch-svLeft { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; }
.ch-svLeft b { font-family: var(--gm-head); font-weight: 400; font-size: 20px; color: var(--gm-gold3); overflow-wrap: anywhere; line-height: 1.2; }
.ch-svLeft .ch-svMeta { font-size: 15px; } .ch-svLeft .ch-svMeta span { display: inline; } .ch-svLeft .ch-svMeta span + span::before { content: " · "; color: rgba(227,196,106,.6); }
.ch-svWhen { font-size: 17px; color: var(--gm-ink); }
.ch-svActions { display: grid; grid-template-columns: auto auto; gap: 6px; flex: 0 0 auto; justify-items: stretch; } .ch-svActions .gm-btn { min-height: 44px; padding: 8px 14px; font-size: 16px; } .ch-svActions .gm-pill { font-size: 15px; padding: 4px 12px; }
.ch-svMini { display: none; }
@media (max-width: 700px) { .ch-sv { flex-direction: column; align-items: stretch; } .ch-svActions { grid-template-columns: 1fr 1fr; } }
/* v9: Stockfish — poziomy, tryby, Licencje */
.ch-levels .gm-pill b { font-family: var(--gm-head); font-weight: 400; margin-inline-end: 4px; }
.ch-licBtn { font: inherit; font-size: 15px; color: var(--gm-gold); background: none; border: 0; cursor: pointer; text-decoration: underline; padding: 0 4px; }
.ch-lic { width: 100%; padding: 12px 16px; border-radius: 14px; background: rgba(0,0,0,.3); border: 1px solid rgba(227,196,106,.35); font-size: 16px; color: var(--gm-mute); } .ch-lic h3 { margin: 0 0 6px; font-family: var(--gm-head); font-weight: 400; font-size: 20px; color: var(--gm-gold3); } .ch-lic p { margin: 0 0 8px; } .ch-lic ul { margin: 0; padding-inline-start: 20px; } .ch-lic li { margin: 4px 0; line-height: 1.5; } .ch-lic a { color: var(--gm-teal); } .ch-lic b { color: var(--gm-ink); }
.ch-coach[data-cls="best"], .ch-coach[data-cls="good"] { border-color: rgba(43,194,106,.6); background: rgba(43,194,106,.1); } .ch-coach[data-cls="inacc"] { border-color: rgba(227,196,106,.6); background: rgba(227,196,106,.12); } .ch-coach[data-cls="mistake"], .ch-coach[data-cls="blunder"] { border-color: #FFB4A8; background: rgba(217,48,48,.16); }
.ch-coach .ch-cls { font-family: var(--gm-head); font-size: 20px; color: var(--gm-gold3); display: block; margin-bottom: 2px; }
/* v11: przegląd partii */
.ch-acc { display: flex; flex-wrap: wrap; gap: 10px; } .ch-acc div { flex: 1 1 140px; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.08); } .ch-acc b { display: block; font-family: var(--gm-head); font-size: 28px; font-weight: 400; color: var(--gm-gold3); } .ch-acc span { font-size: 14px; color: var(--gm-mute); }
.ch-chart { width: 100%; height: 160px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.08); cursor: pointer; } .ch-chart .w { fill: rgba(255,241,194,.85); } .ch-chart .b { fill: rgba(40,50,80,.95); } .ch-chart .mid { stroke: rgba(227,196,106,.5); stroke-width: 1; } .ch-chart .cur { stroke: var(--gm-teal); stroke-width: 2; } .ch-chart .mm { fill: #FF8A7A; }
.ch-moments { display: flex; flex-direction: column; gap: 8px; }
.ch-mom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-radius: 12px; background: rgba(0,0,0,.28); border: 1px solid rgba(227,196,106,.35); } .ch-mom[data-cls="blunder"], .ch-mom[data-cls="mistake"] { border-color: #FFB4A8; } .ch-mom[data-cls="inacc"] { border-color: rgba(227,196,106,.6); }
.ch-momTxt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; } .ch-momTxt b { font-size: 18px; color: var(--gm-ink); } .ch-momTxt span { font-size: 15px; color: var(--gm-mute); }
.ch-momAct { display: flex; gap: 6px; } .ch-momAct .gm-pill { font-size: 15px; min-height: 42px; }

/* v13 Strategia */
.ch-paras { display: flex; flex-direction: column; gap: 8px; } .ch-paras p { margin: 0; }
.ch-rule { padding: 12px 14px; border-radius: 12px; background: rgba(227,196,106,.12); border-inline-start: 4px solid var(--gm-gold); } .ch-rule p { margin: 4px 0 0; font-size: 18px; font-weight: 600; }
.ch-why.ch-whyHint { background: rgba(227,196,106,.1); border-color: rgba(227,196,106,.45); }
.ch-why.ch-whyOk { background: rgba(86,214,200,.12); border-color: rgba(86,214,200,.45); }
.ch-stratLvl { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; } .ch-stratLvl h3 { margin: 6px 0 0; font-size: 20px; color: var(--gm-gold); } .ch-stratLvl > .gm-status { margin: -4px 0 4px; }
#stratTurn { margin: 2px 0 0; font-size: 16px; }
