body.game-sudoku.atlas-game { --atlas-ink:#77510b; --atlas-wash:#fff3c8; --atlas-mark:#f6c44c; }
body.game-nonogramy.atlas-game { --atlas-ink:#494889; --atlas-wash:#eeedff; --atlas-mark:#b7abe7; }
body.game-sciezki.atlas-game { --atlas-ink:#94432f; --atlas-wash:#ffebdb; --atlas-mark:#eea47a; }
body.game-mini-krzyzowki.atlas-game { --atlas-ink:#86335b; --atlas-wash:#ffebf1; --atlas-mark:#e9a6bc; }
body.game-wykreslanki.atlas-game { --atlas-ink:#476522; --atlas-wash:#eef4d8; --atlas-mark:#bbd36b; }
body.game-kulki.atlas-game { --atlas-ink:#00655b; --atlas-wash:#ddf3e8; --atlas-mark:#91d3b6; }
body.game-2048.atlas-game { --atlas-ink:#92512a; --atlas-wash:#fff0d6; --atlas-mark:#efb36b; }
body.game-saper.atlas-game { --atlas-ink:#345a49; --atlas-wash:#e8f2df; --atlas-mark:#a3c68c; }
body.game-kakuro.atlas-game { --atlas-ink:#18566a; --atlas-wash:#e3f3ee; --atlas-mark:#8cc8c9; }
body.game-pasjans.atlas-game { --atlas-ink:#205f50; --atlas-wash:#e0f0e4; --atlas-mark:#8ac6af; }
body.game-freecell.atlas-game { --atlas-ink:#2b5b73; --atlas-wash:#e4eff6; --atlas-mark:#94c4d4; }
body.game-mahjong.atlas-game { --atlas-ink:#00695f; --atlas-wash:#e2f4e9; --atlas-mark:#87cbbb; }
body.game-szachy.atlas-game { --atlas-ink:#765336; --atlas-wash:#f4ebd8; --atlas-mark:#c8a47e; }
body.game-warcaby.atlas-game { --atlas-ink:#69495f; --atlas-wash:#f5e8ef; --atlas-mark:#d5aac1; }
/* Atlas gier. Kolory każdego działu dopasowują oprawę i czytnik, nigdy reguły. */
.atlas-game{--atlas-paper:#fffdf6;--atlas-navy:#1a2948;--atlas-rule:#dfd8c8}
.atlas-game::before,.atlas-game::after{display:none}
body.atlas-game.has-game-page .game-spread>.trail{min-height:32px;margin:4px 0 0;font-size:.82rem}
body.atlas-game.has-game-page .game-spread>.atlas-game-header{
 position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,32%);
 grid-template-areas:"copy scene";align-items:center;min-height:126px;
 border-radius:14px;margin:0 0 13px;padding:5px 0;gap:clamp(8px,1.8vw,30px);
}
body.atlas-game.has-game-page .atlas-game-header>.game-mast-copy{grid-area:copy;display:block;min-width:0;z-index:1;align-self:center}
body.atlas-game.has-game-page .atlas-game-header h1{
 font-family:var(--head),Portal,system-ui,sans-serif;font-size:clamp(32px,3.8vw,57px);line-height:1.06;
 letter-spacing:-.055em;margin:0;color:#1b2847;position:relative;width:fit-content;
}
.atlas-game-header h1::after{
 content:"";display:block;width:min(48%,8rem);height:5px;margin:1px 2% 0 auto;border-radius:94% 50% 80% 35%;
 background:var(--atlas-mark);transform:rotate(-1.5deg)
}
.atlas-game-intro{margin:7px 0 0;max-width:67ch;line-height:1.4;font-size:clamp(.91rem,1.1vw,1rem);color:#414a5d}
body.atlas-game.has-game-page .atlas-game-header .mast-links{display:flex;flex-wrap:wrap;align-items:center;gap:0 13px;margin:4px 0 0}
body.atlas-game.has-game-page .atlas-game-header .mast-links>span{font-size:.76rem;line-height:1.4;color:var(--atlas-ink);background:var(--atlas-wash);padding:4px 8px}
body.atlas-game.has-game-page .atlas-game-header .mast-links>a,.atlas-game .mast-links>[data-atlas-lekcja]{
 display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:44px;padding:0;border:0;background:none;
 color:#284682;font:650 .85rem/1.25 Portal,system-ui,sans-serif;text-underline-offset:.18em;text-decoration:underline;box-shadow:none
}
.atlas-game .mast-links>[hidden]{display:none!important}
body.atlas-game.has-game-page .atlas-game-header .room-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;border:1px solid #c9cbd0;background:#fffdfa;color:#23374d;padding:6px 12px;box-shadow:0 1px 1px #21314213;font:650 .84rem/1.18 Portal,system-ui,sans-serif;border-radius:9px}
.atlas-game-header .room-toggle svg{width:17px;height:17px;flex:none}
.atlas-game-scene{
 grid-area:scene;position:relative;align-self:stretch;min-width:0;overflow:hidden;border-radius:70% 18% 42% 22% / 25% 30% 20% 25%;
 background:var(--atlas-wash);isolation:isolate;transform:rotate(-1.1deg)
}
.atlas-game-scene .atlas-game-art{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:50% 46%;max-width:none}
.atlas-game-scene:after{content:"";position:absolute;inset:0;box-shadow:inset 0 0 0 1px #1e2d4c13;border-radius:inherit;pointer-events:none}
body.game-sudoku .atlas-game-scene img{object-position:65% 41%}
body.game-nonogramy .atlas-game-scene img{object-position:60% 40%}
.atlas-game .play-room:not(.is-expanded) :is(.classic-panel,.playbox){border-top:3px solid var(--atlas-mark);border-radius:14px;box-shadow:0 3px 12px #4338190b}
.atlas-game .classic-panel{--control-fill:var(--atlas-ink);--control-line:#cacec1}
.atlas-game .classic-starts button.primary,.atlas-game .puzzle-starts button.primary{background:var(--atlas-ink);color:#fff;border-color:var(--atlas-ink)}
.atlas-game .classic-result,.atlas-game .complete{border:1px solid var(--atlas-mark);background:var(--atlas-wash);border-radius:12px;color:#23334b}
.atlas-game .lesson-tip{border-color:var(--atlas-mark);background:var(--atlas-wash);border-radius:12px}
.atlas-game .lesson-count{display:inline-block; color:var(--atlas-ink);font-weight:bold}
.atlas-game .lesson-tip h2,.atlas-game .complete h2{font-family:var(--head),Portal,system-ui,sans-serif}
.atlas-game .game-spread>section.guide{margin:clamp(22px,4vw,54px) 0 0;border-width:1px;border-color:var(--atlas-rule);border-radius:18px;
 border-top:3px solid var(--atlas-mark);background:var(--atlas-paper);box-shadow:0 3px 16px #34260b07;padding:clamp(17px,3.5vw,44px)}
.atlas-game .guide>h2,.atlas-game .more-games>h2{font-family:var(--head),Portal,system-ui,sans-serif;font-size:clamp(1.4rem,2.5vw,2.15rem);letter-spacing:-.035em;line-height:1.16;color:var(--atlas-navy)}
.atlas-game .guide>p{max-width:76ch;line-height:1.62}
.atlas-game .guide .worked{border-left:3px solid var(--atlas-mark);border-radius:0 12px 12px 0;background:var(--atlas-wash)}
.atlas-studio-guide{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);align-items:stretch;gap:clamp(14px,2vw,30px);margin:clamp(22px,3vw,36px) 0}
.atlas-example{background:var(--atlas-wash);border-radius:14px;display:grid;align-items:center;grid-template-columns:minmax(90px,39%) 1fr;gap:12px;margin:0;padding:14px}
.atlas-example img{display:block;width:100%;height:auto}
.atlas-game .guide .atlas-studio-guide h3{font-family:var(--head),Portal,system-ui,sans-serif;line-height:1.23;letter-spacing:-.015em;font-size:clamp(1rem,1.5vw,1.17rem);margin:0 0 6px;color:var(--atlas-navy)}
.atlas-game .guide .atlas-studio-guide p{line-height:1.54;font-size:.94rem;color:#37445a;margin:0}
.atlas-strategy{align-self:center;border-inline-start:2px solid var(--atlas-mark);padding:3px 0 3px 16px}
.atlas-game .guide>details{border-color:var(--atlas-rule)}
.atlas-game .guide>details summary{font-weight:700;min-height:44px;align-content:center}
.atlas-game .shelf-card{box-shadow:0 2px 6px #18263d0d}
.atlas-game :is(.game-mast,.guide,.more-games) :is(a,button,summary):focus-visible{outline:3px solid #284ac0;outline-offset:2px}
.atlas-game .sudoku .cell.band:not(.selected,.same){background:#fff4cf}
.atlas-game .sudoku .cell.same:not(.selected){background:#dce7ff}
.atlas-game .sudoku .cell.selected{background:#ffde81;box-shadow:inset 0 0 0 2px #57506d}
.atlas-game .nonogram .cell.full{background:#3b559c;color:white}
.atlas-game .nonogram .cell:not(.full){color:#633b7b}
.atlas-game .nonogram .cell.selected{outline:3px double #20183a;outline-offset:-3px}
.atlas-game .nonogram .cell.full.selected{outline-color:#fff}
.atlas-game .paths .cell:not(.inert,.selected){background:#fff8e9}
.atlas-game .paths .cell.selected{background:#ffdfa4}
.atlas-game .paths .cell svg{color:#754331}
.atlas-game .kl-grid{box-shadow:0 3px 0 #c5dac9,inset 0 0 0 1px #255a52;border-color:#346459}
.atlas-game .kl-ball i{font-size:clamp(.8rem,2.45vw,1.12rem);font-weight:800}
.atlas-game .kl-next i{font-size:.68rem}
.atlas-game .kl-grid button.kl-picked{outline:2px solid #363656;outline-offset:-3px}
.atlas-game .t48-board{background:#554054;border-color:#49374a;box-shadow:0 3px 0 #362938,inset 0 1px 0 #93748d}
.atlas-game .t48-v0{background:#70566a}
.atlas-game .t48-v32{background:#ed9ea3}
.atlas-game .t48-v64{background:#bed4f0}
.atlas-game .cw-paper{background-color:#fffdf4}
.atlas-game .cw-board .cw-block{background:repeating-linear-gradient(135deg,#62374d 0 1px,#563346 1px 5px)}
.atlas-game .cw-active,.atlas-game .cw-board .cw-active{outline:3px solid #8b3057;outline-offset:-3px}
.atlas-game .ws-sheet{border-color:#acb784;background-color:#fffef4}
.atlas-game .ws-grid{outline-color:#627844}
.atlas-game .sm-grid{border-radius:7px;outline:1px solid #71826b}
.atlas-game .kk-grid{box-shadow:0 3px 0 #b3c7c3}
.atlas-game .kk-grid .kk-cell.kk-selected{background:#ffe4a0;box-shadow:inset 0 0 0 2px #37566a}
.atlas-game.game-pasjans .kd-table{background-color:#1d594c;background-image:radial-gradient(ellipse at top,#287261,transparent 77%),repeating-linear-gradient(30deg,transparent 0 3px,#12362a22 3px 4px)}
.atlas-game.game-freecell .kd-table{background-color:#174b59;background-image:radial-gradient(ellipse at top,#2c6876,transparent 76%),repeating-linear-gradient(42deg,transparent 0 3px,#134a6122 3px 4px)}
.atlas-game .kd-table .pg-card-back{background-image:url('/assets/classics/pajak-studio-3/back.svg')}
.atlas-game .mj-tray{background:#175f54 radial-gradient(ellipse at 44% 15%,#2d7567,transparent 83%);border-color:#21574e;box-shadow:inset 0 1px 0 #87b9a5,0 3px 0 #b8d4c3}
.atlas-game .mj-free:focus-visible,.atlas-game .mj-picked{outline-color:#293d75}
.atlas-game .ch-stage{--ch-light:#faeccf;--ch-dark:#bc9a78}
.atlas-game .ch-can-move::after{background:#2a493a;border-color:#17372c}
.atlas-game .wd-board{border-color:#44384b}
.atlas-game .wd-disc.wd-white,.atlas-game .wd-disc.wd-black{filter:drop-shadow(0 1px 1px #362e3e5c)}
@media(max-width:900px){.atlas-example{grid-template-columns:1fr}.atlas-example img{max-width:210px}.atlas-game-intro{font-size:.9rem}}
@media(max-width:700px){
 body.atlas-game.has-game-page .game-spread>.trail{display:none}
 body.atlas-game.has-game-page .game-spread>.atlas-game-header{display:grid;grid-template-columns:minmax(0,1fr) clamp(65px,22vw,117px);grid-template-areas:"copy scene";min-height:0;padding:5px 0 0;margin:0 0 5px;gap:0 6px;border-radius:0}
 body.atlas-game.has-game-page .atlas-game-header>.game-mast-copy{display:contents}
 body.atlas-game.has-game-page .atlas-game-header h1{grid-area:copy;align-self:center;font-size:clamp(22px,6.8vw,36px);word-break:normal;overflow-wrap:break-word}
 .atlas-game-header h1::after{height:3px;margin-top:0}
 .atlas-game .atlas-game-intro{display:none}
 .atlas-game .atlas-game-scene{height:clamp(39px,12.7vw,64px);border-radius:57% 18% 29% 24% / 30% 27% 24% 30%}
 body.atlas-game.has-game-page .atlas-game-header .mast-links{grid-column:1/-1;gap:0 10px;display:flex;flex-wrap:nowrap;margin:0}
 body.atlas-game.has-game-page .atlas-game-header .mast-links>span{display:none}
 body.atlas-game.has-game-page .atlas-game-header .mast-links> :is(a,button){font-size:clamp(.73rem,3.4vw,.86rem);min-height:44px}
 body.atlas-game.has-game-page .atlas-game-header .room-toggle{margin-left:auto;padding:4px 8px;background:transparent;border:0;box-shadow:none}
 .atlas-game .game-spread>.play-room:not(.is-expanded) :is(.classic-panel,.playbox){border-radius:9px;box-shadow:none}
 .atlas-studio-guide{grid-template-columns:1fr;gap:16px}.atlas-example{grid-template-columns:1fr;gap:5px}.atlas-example img{width:164px}
}
@media(orientation:landscape) and (max-height:520px){
 body.atlas-game.has-game-page .game-spread>.trail{display:none}
 body.atlas-game.has-game-page .game-spread>.atlas-game-header{display:flex;min-height:0;padding:0;margin:1px 0 3px}
 body.atlas-game.has-game-page .atlas-game-header .game-mast-copy{display:flex;align-items:center;justify-content:space-between;width:100%;gap:8px}
 body.atlas-game.has-game-page .atlas-game-header h1{font-size:clamp(18px,3.1vw,27px)}
 body.atlas-game.has-game-page .atlas-game-header h1::after,.atlas-game .atlas-game-scene,.atlas-game .atlas-game-intro,body.atlas-game.has-game-page .atlas-game-header .mast-links>span{display:none}
 body.atlas-game.has-game-page .atlas-game-header .mast-links{display:flex;width:auto;flex-wrap:wrap;margin:0}
}
@media(prefers-reduced-motion:no-preference){
 .atlas-game .shelf-card{transition:transform .16s,box-shadow .16s}.atlas-game .shelf-card:hover{transform:translateY(-2px)}
 .atlas-game .kl-picked .kl-ball{transform:translateY(-2px) scale(1.04)}
 .atlas-game .t48-in{animation-duration:.12s}
}
@media(forced-colors:active){
 .atlas-game-header h1::after,.atlas-game-scene{display:none}
 .atlas-game :is(.cell,.kl-cell,.mj-tile):focus-visible{outline:3px solid Highlight}
 .atlas-game .nonogram .cell.full{background:Highlight}
}
.atlas-lesson{margin:auto;width:min(31rem,calc(100% - 20px));max-height:calc(100dvh - 20px);overflow:auto;overscroll-behavior:contain;border:1px solid #c7ba98;border-top:5px solid var(--atlas-mark);border-radius:20px;background:#fffcf3;color:#1d2946;box-shadow:0 15px 65px #121b3055;padding:clamp(16px,4vw,30px)}
.atlas-lesson::backdrop{background:#17243a9c}
.al-meta,.al-foot{display:flex;align-items:center;justify-content:space-between;gap:10px}.al-meta{font-size:.84rem;font-weight:700;color:var(--atlas-ink)}
.atlas-lesson h2{margin:13px 0 8px;font-size:clamp(1.45rem,5vw,2rem);line-height:1.12}.al-intro,.al-feedback{line-height:1.42;margin:10px 0}.al-feedback{min-height:2.8em;font-weight:600;color:var(--atlas-ink)}
.atlas-lesson button{min-height:44px;border:1px solid #b7aea0;border-radius:9px;background:#fffdf7;color:#1e2f4d;font:inherit;font-weight:700;cursor:pointer}.atlas-lesson :is(button,h2):focus-visible{outline:3px solid #2651a5;outline-offset:2px}
.al-foot{border-top:1px solid #d8d2c0;padding-top:10px}.al-foot button{padding:5px 10px}.al-foot [data-al-next]{background:var(--atlas-ink);color:white;border-color:var(--atlas-ink)}
.al-exercise{background:var(--atlas-wash);border-radius:11px;padding:clamp(8px,3vw,15px);margin-top:16px}
.al-row,.al-choices{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:2px}.al-digits b{background:#fffbeb;text-align:center;padding:8px 0;font-size:1.16em}.al-digits .al-unknown{outline:2px solid var(--atlas-ink);outline-offset:-2px;background:#ffdc81}.al-choices{grid-template-columns:repeat(auto-fit,minmax(40px,1fr));margin-top:12px}.al-column{margin:6px 0;font-size:.88rem;color:var(--atlas-ink)}
.al-nono{display:flex;justify-content:center;align-items:center;gap:8px}.al-nono strong{font-size:.95rem}.al-nono-row{display:grid;grid-template-columns:repeat(5,minmax(0,44px));width:100%;max-width:228px;gap:1px}
.al-nono-row button{border-radius:2px;min-width:0;padding:0;font-size:1.4rem}.al-nono-row button[aria-pressed=true]{background:var(--atlas-ink);color:white}
.al-pipes{display:grid;grid-template-columns:repeat(var(--cols),minmax(0,56px));justify-content:center}.al-pipes>*{display:block;border:1px solid #cdbca4;border-radius:4px;background:#fffae8}.al-pipes>button{padding:0;color:#82513a}.al-pipes>span{color:#82513a}.al-pipes>.al-empty{background:transparent;border-color:transparent}.al-pipes svg{display:block;width:100%;height:auto}
.atlas-lesson [hidden]{display:none!important}
.atlas-game :is(.t48-board,.kl-grid){position:relative}
.atlas-game .atlas-flying{position:absolute!important;pointer-events:none!important;z-index:2;margin:0;transform-origin:center}
@media(min-width:800px) {
 .atlas-game .play-room:not(.is-expanded)[data-play-room="mahjong"] .mj-tray {
  --mj-max-height:clamp(220px,calc(100svh - 411px),690px)
 }
}
