@font-face {
  font-family: Portal;
  src: url('/assets/art/regular.woff2') format('woff2');
  font-weight: 400 550;
  font-display: swap;
}
@font-face {
  font-family: Portal;
  src: url('/assets/art/bold.woff2') format('woff2');
  font-weight: 600 950;
  font-display: swap;
}
@font-face {
  font-family: Kredka;
  src: url('/assets/art/kredka/naglowki.woff2') format('woff2');
  font-weight: 650 950;
  font-display: swap;
}
:root {
  --paper: #fff6e3;
  --sheet: #fffcf4;
  --white: #fffefa;
  --ink: #1d2544;
  --muted: #525266;
  --accent: #2749ad;
  --deep: #2446a8;
  --line: #d9ccaf;
  --focus: #1647be;
  --yellow: #ffcc4d;
  --pink: #ed849a;
  --cobalt: #3056b9;
  --head: Kredka, ui-rounded, 'Arial Rounded MT Bold', Portal, system-ui, sans-serif;
  font: 16px/1.55 Portal, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 50% 10%,#fffaf0 2%,transparent 72%),var(--paper); }
a { color: var(--accent); text-underline-offset: .2em; }
a,button,select,summary { touch-action: manipulation; }
button,select,input,textarea { font: inherit; color: inherit; }
button,select,summary { cursor: pointer; }
button,.btn { min-height: 44px; }
button,.btn {
  border: 1px solid #bcb6a5; border-radius: 10px;
  background: var(--white); padding: 8px 13px; font-weight: 700;
}
button:hover:enabled { background: #f3eedf; border-color: #9895a1; }
button:disabled { opacity: .47; cursor: default; }
:where(a,button,select,input,summary,textarea):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -150px; z-index: 9; background: white; padding: 12px; }
.skip:focus { top: 8px; }
.wrap { width: min(1160px,calc(100% - 80px)); margin-inline: auto; }
.ico { width: 19px; height: 19px; flex: none; vertical-align: middle; }
.head,.foot,.brand,.head nav,.navitem,.btn,.section-head,.game-meta,.card-play,.crumb,.game-head,.pill,.bar,.controls,.panel-title,.inline-row,.statline { display: flex; align-items: center; }
.sr-only,.game-card:not(.custom-title) .card-body h2 {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.hidden,[hidden] { display: none !important; }

header { border-bottom: 1px solid #dfd2b4; background: #fff9eb; }
.head { min-height: 82px; gap: 19px; }
.brand { gap: 7px; min-height: 44px; text-decoration: none; color: var(--ink); flex: none; }
.brand-logo { width: clamp(155px,17vw,204px); height: auto; display: block; }
.brand-mark { width: 35px; height: 38px; object-fit: contain; }
.brand-name { font: 900 29px/1 var(--head); letter-spacing: -.05em; }
.brand-sub { max-width: 18ch; border-left: 1px solid var(--line); padding-left: 16px; color: var(--muted); font-size: .79rem; line-height: 1.38; }
.head nav { margin-left: auto; gap: 5px; }
.navitem { gap: 8px; min-height: 44px; padding: 7px 14px; color: #454657; text-decoration: none; font-size: .91rem; font-weight: 700; border-radius: 12px; }
.navitem.current { color: #223d94; background: #e9edff; }
.navitem:hover { color: var(--accent); background: #efede4; }
.foot { padding: 23px 0 28px; border-top: 1px solid var(--line); justify-content: space-between; gap: 18px; }
.foot .brand-logo { width: 142px; }
.foot nav { display: flex; gap: 4px 20px; align-items: center; flex-wrap: wrap; }
.foot nav a,.related { font-size: .86rem; color: var(--muted); }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; }

.edition {
  display: grid; grid-template-columns: minmax(0,.88fr) minmax(0,1.12fr); align-items: stretch; position: relative;
  overflow: hidden; isolation: isolate; margin-top: 27px;
  background: #fff9eb; border: 1px solid #dacaa4; border-radius: 22px 25px 21px 23px;
  box-shadow: 0 3px 0 #ddcca253;
}
.edition-copy { align-self: center; padding: clamp(26px,3.4vw,45px); }
.edition-date { display: flex; gap: 8px; align-items: center; color: #555265; font-size: .84rem; font-weight: 700; line-height: 1.3; }
.edition-date .ico { width: 16px; height: 16px; color: var(--accent); }
.edition-date span::first-letter { text-transform: uppercase; }
.edition .edition-title,.game-head h1,.section-head h1,.page-intro h1,.article h1,.game-card h2,.side h2,.guide h2,.archive-card h2,.complete h2,.paused h2,.statbox h2,.admin h1,.game-mast h1,.reading h2,.more-games h2 {
  font-family: var(--head); font-weight: 900; letter-spacing: -.045em;
}
.edition .edition-title {
  position: relative; width: fit-content; max-width: 100%; z-index: 0; font-size: clamp(44px,4.85vw,66px); line-height: 1.09; margin: 11px 0 14px;
}
.edition-title::after {
  content: ''; position: absolute; z-index: -1; right: -1%; bottom: .015em; width: 43%; height: .095em;
  background: var(--yellow); border-radius: 65% 45% 60% 35%; transform: rotate(-2deg);
}
.edition-detail { font-size: .84rem; font-weight: 700; color: #534936; margin: 0 0 8px; }
.edition-intro { color: var(--muted); max-width: 42ch; font-size: .96rem; line-height: 1.5; margin: 0; }
.edition-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 20px; }
.btn,.card-play { gap: 8px; justify-content: center; text-decoration: none; font-weight: 700; }
.btn { padding: 11px 17px; display: inline-flex; line-height: 1.3; }
.primary,button.primary { background: var(--deep); color: white; border-color: var(--deep); }
.primary:hover,button.primary:hover { background: #1d3587; color: white; border-color: #1d3587; }
.btn .ico,.card-play .ico { width: 14px; height: 14px; }
.edition-start .ico,.card-play .ico { fill: currentColor; }
.edition-start { box-shadow: 0 2px 0 #152b6a; }
.edition-archive { display: inline-flex; align-items: center; min-height: 44px; font-size: .84rem; color: #3a4267; }
.edition-art { min-width: 0; align-self: stretch; display: grid; position: relative; overflow: hidden; background: #ffe7a1; }
.edition-art img { display: block; width: 100%; height: 100%; min-height: 0; aspect-ratio: 600 / 338; object-fit: cover; }
.collection { padding: 29px 0 40px; }
.section-head { gap: 20px; margin-bottom: 16px; }
.section-head::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.section-head h1,.game-head h1,.page-intro h1,.article h1 { margin: 0; font-size: clamp(28px,2.7vw,40px); line-height: 1.18; }
.cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(14px,1.85vw,23px); }
.mint { --tint: #fff0bf; --tone: #765006; --swatch: #ffcc4d; --border: #e3c77c; }
.lilac { --tint: #e9edff; --tone: #2948ab; --swatch: #375cbf; --border: #b9c5e7; }
.peach { --tint: #ffebee; --tone: #8c3854; --swatch: #ed849a; --border: #e6bec7; }
.game-card {
  min-width: 0; position: relative; display: flex; flex-direction: column; overflow: hidden; color: var(--ink); text-decoration: none;
  background: var(--sheet); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 2px 0 color-mix(in srgb,var(--swatch) 27%,transparent);
  transition: transform .18s ease,box-shadow .18s ease;
}
.game-card:hover { box-shadow: 0 4px 0 color-mix(in srgb,var(--swatch) 35%,transparent); transform: translateY(-2px); }
.game-card .thumb { display: flex; align-items: flex-end; min-width: 0; background: var(--paper); }
.game-card .thumb img { display: block; width: 100%; height: auto; }
.card-body { padding: 13px 16px 11px; flex: 1; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px 10px; align-items: center; }
.game-meta { gap: 7px; color: var(--tone); font-size: .78rem; font-weight: 700; line-height: 1.4; }
.game-meta i { width: 3px; height: 3px; background: currentColor; border-radius: 50%; }
.game-card p { grid-column: 1/-1; margin: 0; color: var(--muted); font-size: .875rem; line-height: 1.5; align-self: start; }
.game-card h2 { font-size: 1.45rem; margin: 0; line-height: 1.2; }
.game-card.custom-title .card-body h2 { grid-row: 1; grid-column: 1/-1; }
.game-card.custom-title .game-meta { grid-row: 2; }
.card-play { grid-row: 1; grid-column: 2; min-height: 25px; color: var(--ink); font-size: .8rem; }
.custom-title .card-play { grid-row: 2; }
.card-play .ico { width: 10px; height: 10px; }
.game-card:hover .card-play { text-decoration: underline; text-underline-offset: .19em; }
#resume:not(:empty) { margin-top: 15px; padding: 10px 15px; display: flex; align-items: center; gap: 7px 14px; flex-wrap: wrap; background: #fffdf5; border: 1px dashed #b6a46c; border-radius: 13px; font-size: .89rem; }
#resume a { margin-left: auto; }

.game-spread,.more-games,.reading,.shelf,.info-links { max-width: 1020px; margin-inline: auto; }
.trail,.crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; min-height: 40px; font-size: .83rem; color: var(--muted); }
.trail a,.crumb,.mast-links a,.info-links a,.archive-guide { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.game-mast,.game-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin: 0 0 15px; }
.game-mast h1 { margin: 0; font-size: clamp(34px,4.1vw,55px); line-height: 1.12; }
.mast-detail { width: clamp(112px,15vw,164px); height: clamp(54px,7vw,76px); object-fit: cover; border: 1px solid var(--border); border-radius: 13px; }
.mast-links { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .87rem; }
.mast-links>span,.pill { padding: 3px 9px; font-weight: 700; border-radius: 7px; color: var(--tone); background: var(--tint); }
.mast-links .ico,.crumb .ico { width: 15px; height: 15px; }
.game-layout { display: grid; grid-template-columns: minmax(0,600px) minmax(225px,1fr); gap: 22px; align-items: start; }
.playbox,.side,.guide,.article,.statbox,.archive-card,.reading { background: var(--sheet); border: 1px solid var(--line); border-radius: 16px; }
.playbox { min-width: 0; padding: 15px; border-top: 4px solid var(--swatch); box-shadow: 0 2px 0 #e3d8ba; }
.bar,.inline-row,.panel-title { gap: 8px; flex-wrap: wrap; }
.bar { justify-content: space-between; margin-bottom: 10px; font-size: .94rem; font-weight: 700; }
.timer { font-variant-numeric: tabular-nums; }
.utilities { display: flex; align-items: center; gap: 9px; }
.mini { min-width: 44px; display: grid; place-items: center; padding: 5px; }
.side { padding: 0; overflow: hidden; }
.settings-body { padding: 21px; }
.side h2,.guide h2,.archive-card h2,.statbox h2,.reading h2,.more-games h2 { font-size: clamp(21px,2.3vw,28px); margin: 0 0 14px; line-height: 1.25; }
.side label,.admin label { display: block; font-size: .88rem; font-weight: 700; margin: 12px 0 5px; }
select,input,textarea { min-height: 44px; padding: 7px 10px; background: var(--white); border: 1px solid #9e9eac; border-radius: 9px; }
.side select { width: 100%; margin-bottom: 3px; }
.small,.side p,.guide p,.related,.article p,.reading p { color: var(--muted); }
.small,.side p { font-size: .9rem; }
.side hr { border: 0; border-top: 1px solid var(--line); margin: 17px 0; }
.settings-toggle { display: flex; align-items: center; justify-content: space-between; text-align: left; width: 100%; min-height: 48px; gap: 12px; padding-inline: 16px; border: 0; border-radius: 0; background: var(--tint); }
.settings-label { color: var(--accent); text-decoration: underline; text-underline-offset: .17em; }
.settings-toggle:focus-visible { outline-offset: -4px; }
.controls { gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.controls button { flex: 1 1 auto; font-size: .84rem; }
.controls button[aria-pressed="true"] { color: white; border-color: var(--deep); background: var(--deep); }
button[data-action="hint"] { border-color: var(--border); background: var(--tint); }
.keypad { display: grid; grid-template-columns: repeat(9,minmax(0,1fr)); gap: 4px; margin-top: 11px; }
.keypad button { min-width: 0; padding: 0; font-size: 1.24rem; background: #ffedb2; color: var(--ink); border-color: #dcc17d; }
.boardwrap { overflow: auto; max-width: 100%; border-radius: 6px; overscroll-behavior: contain; position: relative; }
.board { display: grid; aspect-ratio: 1; grid-template-columns: repeat(var(--n),minmax(0,1fr)); border: 2px solid #354367; overflow: hidden; background: #c9bec1; }
.cell { display: grid; place-items: center; position: relative; aspect-ratio: 1; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 0; background: #fffefa; box-shadow: inset -1px -1px #c0bfd0; font: 700 clamp(17px,2.7vw,31px)/1 Portal,system-ui,sans-serif; font-variant-numeric: tabular-nums; }
.cell:hover:enabled { background: #ecedfb; }
.cell.band { background: #fff1c7; }
.cell.same { background: #ffe196; }
.cell.selected { background: #ffd260; outline: 2px solid #3d4782; outline-offset: -2px; z-index: 1; }
.cell:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; z-index: 2; }
.cell.user { color: #204bae; }
.cell.err { color: #a71745; text-decoration: underline wavy; text-underline-offset: 3px; }
.cell.thick-r { border-right: 2px solid #576282; }
.cell.thick-b { border-bottom: 2px solid #576282; }
.notes { width: 96%; height: 93%; display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr); align-items: center; font-size: clamp(8px,1.1vw,13px); color: #55587c; }
.notice { margin: 10px 0 0; background: #edf0fd; border-radius: 8px; padding: 9px 12px; font-size: .9rem; }
.notice:empty { display: none; }
.board.nonogram { aspect-ratio: auto; grid-template-columns: minmax(34px,auto) repeat(var(--n),minmax(0,1fr)); background: #e4eafe; }
.nonogram .clue { display: flex; align-items: center; justify-content: center; white-space: pre; font-size: clamp(10px,1.1vw,14px); line-height: 1.18; font-weight: 700; padding: 3px; }
.nonogram .row-clue { justify-content: flex-end; }
.nonogram .col-clue { align-items: flex-end; text-align: center; }
.nonogram .cell { color: #30428d; font-size: clamp(12px,2.3vw,24px); box-shadow: inset -1px -1px #b7c2df; }
.nonogram .cell.full { background: #3155b3; }
.nonogram .cell.selected { outline-offset: -3px; outline-color: #8c4467; }
.nonogram .full.selected { outline: 2px dashed white; outline-offset: -4px; }
.nonogram.zoom { min-width: calc(var(--n)*44px + 84px); }
.paths .cell { background: #fffaf4; box-shadow: inset -1px -1px #d7bec7; }
.paths .cell.selected { background: #ffe1e8; }
.paths .cell svg { width: 100%; height: 100%; pointer-events: none; color: #314eaa; }
.paths .cell svg circle { fill: #2b3151; }
.paths .cell.inert { background: #f4e5e3; }
.paused,.complete { display: grid; align-content: center; justify-items: center; text-align: center; min-height: 220px; aspect-ratio: 1; background: var(--tint); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.paused h2,.complete h2 { margin: 12px 0 4px; }
.win-tick { font-size: 2.3rem; line-height: 1; color: var(--accent); }
.complete p { margin: 3px 0 8px; }
.complete .inline-row { justify-content: center; margin: 10px 0; }

.article,.guide,.reading { padding: clamp(20px,3.2vw,34px); margin-block: 24px; }
.article { max-width: 840px; margin-inline: auto; min-height: 265px; }
.article h1 { margin-bottom: 18px; }
.guide p,.reading p,.article p { max-width: 76ch; margin: 0 0 13px; line-height: 1.65; }
.guide h3 { font-size: 1.08rem; margin: 16px 0 5px; }
.guide .faq-head { margin-top: 24px; }
.guide details { border-top: 1px solid var(--line); }
.guide summary { color: #262e50; font-weight: 700; min-height: 44px; padding: 12px 0; }
.worked { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; padding: 16px 18px; background: var(--tint); border-left: 4px solid var(--swatch); border-radius: 4px 12px 12px 4px; margin-block: 20px; }
.worked>div:first-child { flex: 1 1 275px; }
.worked h3 { margin: 0 0 5px; }
.worked p { margin: 0; }
.demo-squares,.demo-nono,.demo-path { flex: none; }
.demo-squares { display: grid; grid-template-columns: repeat(9,19px); border: 1px solid #586487; }
.demo-squares b,.demo-nono b { display: grid; place-items: center; background: var(--white); border: 1px solid #bdc1cd; }
.demo-squares b { height: 24px; line-height: 1; }
.demo-squares b:nth-child(3n):not(:last-child) { border-right: 2px solid #687491; }
.demo-nono>div { display: flex; margin: 3px 0; }
.demo-nono b { width: 17px; height: 17px; }
.demo-nono .marked { background: #a5b7f3; }
.demo-nono .certain { background: #3457b4; }
.demo-path { width: 105px; }
.info-links,.shelf { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-block: 15px 24px; }
.more-games { margin-block: 24px 32px; }
.shelf-card { flex: 1 1 220px; min-width: 0; display: flex; align-items: stretch; gap: 0; color: var(--ink); text-decoration: none; background: var(--tint); border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
.shelf-card:hover strong { text-decoration: underline; text-underline-offset: .15em; }
.shelf-scene { width: 36%; height: auto; object-fit: cover; align-self: stretch; }
.shelf-caption { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 69px; padding: 9px 13px; flex: 1; }
.shelf-caption strong,.shelf-caption small { display: block; }
.shelf-caption strong { font: 800 1.25rem/1.25 var(--head); }
.shelf-caption small { font-size: .79rem; color: var(--tone); }
.shelf-arrow .ico { width: 15px; }
.related { text-align: center; margin: 20px 0 30px; }
.related a,.archive-card .inline-row a { display: inline-flex; min-height: 44px; align-items: center; }
.page-intro { margin: 18px 0 22px; }
.page-intro p { max-width: 72ch; margin: 8px 0 0; color: var(--muted); }
.statbox,.archive-card { padding: 20px; margin-bottom: 14px; }
.stats-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.stats-grid .statbox { border-top: 4px solid var(--yellow); }
.stats-grid .statbox:nth-child(2) { border-top-color: var(--cobalt); }
.stats-grid .statbox:nth-child(3) { border-top-color: var(--pink); }
.statbox strong { font-size: 1.55rem; display: block; color: var(--deep); font-variant-numeric: tabular-nums; }
.statline { justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 9px 0; }
#wyzwania>label { margin-right: 10px; }
#archive-items { margin-top: 20px; }
.archive-card { display: flow-root; border-color: var(--border); }
.archive-art { float: right; width: clamp(118px,21%,214px); height: auto; aspect-ratio: 2.2; object-fit: cover; margin: 0 0 8px 15px; border-radius: 11px; }
.archive-card .btn { color: var(--tone); background: var(--tint); border-color: var(--border); }
.archive-guide { font-size: .84rem; }
.promo { padding: 24px; margin: 40px auto; color: var(--muted); }
.admin { max-width: 800px; margin-bottom: 40px; }
.admin .statbox,.admin form { margin-top: 12px; }
.admin label input:not([type=checkbox]),.admin textarea,.admin select { display: block; width: 100%; margin-top: 4px; }
.admin input[type=checkbox] { min-height: 0; }
.admin summary { min-height: 44px; align-content: center; font-weight: 700; }
.admin form>button { margin: 12px 0; }

@media (max-width:930px) {
  .wrap { width: calc(100% - 44px); }
  .head { min-height: 72px; }
  .brand-sub { display: none; }
  .edition-copy { padding: 24px; }
  .edition .edition-title { font-size: clamp(42px,5.4vw,57px); }
  .edition-actions { gap: 5px 12px; margin-top: 14px; }
  .game-layout { grid-template-columns: minmax(0,1.62fr) minmax(210px,1fr); gap: 16px; }
  .card-body { padding: 10px 12px; gap: 4px 6px; }
  .game-meta { font-size: .74rem; }
}
@media (max-width:700px) {
  .wrap { width: calc(100% - 30px); }
  .head { min-height: 62px; gap: 5px; }
  .brand-logo { width: clamp(128px,34vw,160px); }
  .head nav { gap: 2px; }
  .navitem { justify-content: center; flex-direction: column; gap: 3px; padding: 4px 6px; font-size: .69rem; line-height: 1.1; min-width: 44px; }
  .navitem .ico { width: 16px; height: 16px; }
  .edition { margin-top: 15px; grid-template-columns: minmax(0,1fr) minmax(0,1.05fr); gap: 0 3px; padding: 14px 14px 9px; border-radius: 16px; }
  .edition[data-feature="sudoku"] { background: linear-gradient(112deg,#fff4cf 5%,#ffe392 62%,#ffd76e); }
  .edition-date { grid-area: 1/1/2/3; }
  .edition .edition-title { grid-area: 2/1/3/2; align-self: end; }
  .edition-detail { grid-area: 3/1/4/2; align-self: start; }
  .edition-title::after { left: 0; right: auto; width: 1.9em; bottom: -.025em; }
  .edition-actions { grid-area: 4/1/5/3; }
  .edition-art { grid-area: 2/2/4/3; }
  .edition-copy { display: contents; }
  .edition-date { gap: 5px; font-size: .69rem; }
  .edition-date .ico { width: 13px; height: 13px; }
  .edition .edition-title { font-size: clamp(24px,7.1vw,38px); line-height: 1.1; margin: 5px 0; }
  .edition-detail { font-size: .73rem; margin: 0 0 7px; }
  .edition-intro { display: none; }
  .edition-actions { align-items: center; flex-direction: row; gap: 1px 14px; margin-top: 5px; }
  .edition-start { padding: 8px 10px; font-size: .76rem; min-height: 44px; }
  .edition-archive { min-height: 44px; font-size: .72rem; }
  .edition-art { background: transparent; align-self: center; overflow: visible; padding: 0; }
  .edition-art img { width: 100%; height: auto; object-fit: contain; }
  .collection { padding: 22px 0 26px; }
  .section-head { margin-bottom: 13px; gap: 12px; }
  .section-head h1 { font-size: 28px; }
  .cards { grid-template-columns: 1fr; gap: 13px; }
  .game-card { border-radius: 14px; }
  .game-card .thumb { aspect-ratio: auto; }
  .card-body { grid-template-columns: minmax(0,1fr) auto; padding: 5px 12px 7px; gap: 0 8px; }
  .game-meta,.card-play { font-size: .79rem; }
  .game-card p { display: none; }
  .game-mast { margin: 0 0 9px; }
  .game-mast h1 { font-size: clamp(29px,7.5vw,37px); }
  .mast-links { font-size: .78rem; gap: 11px; }
  .mast-detail { width: clamp(70px,19vw,105px); height: clamp(39px,10vw,51px); border-radius: 9px; }
  .trail { font-size: .77rem; }
  .game-layout { display: flex; flex-direction: column; gap: 11px; }
  .playbox,.side { width: 100%; }
  .playbox { padding: 9px; border-radius: 13px; }
  .settings-body { padding: 15px; }
  .keypad { gap: 3px; }
  .keypad button { font-size: 1.12rem; border-radius: 7px; }
  .controls button { font-size: .78rem; padding: 5px 7px; }
  .cell { font-size: clamp(17px,5.3vw,25px); }
  .notes { font-size: clamp(8px,2vw,11px); }
  .article,.guide,.reading { margin-block: 15px; }
  .guide h2,.reading h2,.more-games h2 { font-size: 1.44rem; }
  .shelf { display: grid; grid-template-columns: 1fr; gap: 9px; }
  .shelf-scene { width: 31%; max-height: 90px; }
  .stats-grid { gap: 6px; }
  .stats-grid .statbox { font-size: .78rem; padding: 9px; }
  .statbox strong { font-size: 1.28rem; }
  .archive-card { padding: 15px; }
  .archive-art { width: 88px; aspect-ratio: 1.8; margin-left: 7px; }
  .archive-card .inline-row { clear: both; }
  .foot { align-items: flex-start; flex-wrap: wrap; gap: 2px 15px; padding-block: 16px 20px; }
  .foot nav { gap: 0 13px; }
  .foot .brand-logo { width: 123px; }
}
@media (max-width:380px) {
  .wrap { width: calc(100% - 20px); }
  .navitem { padding-inline: 4px; }
  .brand-logo { width: 124px; }
  .edition { padding-inline: 12px; }
  .edition-detail { font-size: .7rem; }
}
@media (forced-colors:active) {
  .cell.selected { outline: 2px solid Highlight; }
  .nonogram .cell.full { background: Highlight; forced-color-adjust: none; }
  .paths .cell svg { forced-color-adjust: none; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Katalog i wspólny stół gier. */
.game-filters {display:flex;flex-wrap:wrap;gap:6px;margin:0 0 17px}
.game-filters button {padding:6px 13px;min-height:38px;border:1px solid #d9ccaf;border-radius:22px;background:#fffdf5;color:#45445a;font-size:.84rem}
.game-filters [aria-pressed="true"] {border-color:#202c4d;background:#263450;color:#fff}
.klondike {--swatch:#6ac5a8;--tint:#dcf3e8;--tone:#176747;--border:#a0cdb6}
.spider {--swatch:#95c0ad;--tint:#e6f1e9;--tone:#234e41;--border:#b3cabc}
.tiles {--swatch:#7cb8a7;--tint:#e0efe8;--tone:#215d4f;--border:#a7c7ba}
.draughts {--swatch:#eea16b;--tint:#ffe5cd;--tone:#85401f;--border:#dcac89}
.chess {--swatch:#bd935d;--tint:#f4e8d7;--tone:#66462f;--border:#cfb598}
.game-card.table-card:not(.custom-title) .card-body h2 {position:static;clip-path:none;width:auto;height:auto;margin:0;overflow:visible;white-space:normal}
.table-card .card-body h2 {grid-row:1;grid-column:1}
.table-card .thumb img {aspect-ratio:5/2;object-fit:cover}
.table-card .card-body {padding:12px 15px}
.start-lesson {color:#2649a5;font-weight:700}
.mast-links {flex-wrap:wrap}
.classic-panel {padding:clamp(12px,2.3vw,24px);background:#fffdf6;border:1px solid var(--border);border-top:5px solid var(--swatch);border-radius:20px;box-shadow:0 3px 0 var(--border);min-width:0}
.classic-top,.classic-clock,.classic-tools,.classic-result,.lesson-buttons {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.classic-top {justify-content:space-between;margin-bottom:13px}
.classic-top label {display:flex;align-items:center;gap:9px;font-weight:700;color:var(--tone);font-size:.88rem}
.classic-top select {max-width:100%;min-height:44px;border:1px solid var(--border);border-radius:9px;background:var(--tint);padding:5px 8px}
.classic-clock {color:var(--tone);font-weight:700;font-variant-numeric:tabular-nums}
.classic-clock button,.classic-tools button {font-size:.88rem}
.classic-table {min-width:0}
.classic-tools {border-top:1px solid var(--border);padding-top:10px}
.classic-menu {margin-left:auto;max-width:100%}
.classic-menu[open] {flex-basis:100%}
.classic-menu summary {display:flex;align-items:center;text-decoration:underline;min-height:44px;font-size:.9rem;font-weight:700;color:var(--tone)}
.classic-menu div {display:flex;gap:7px}
.classic-menu p {font-size:.86rem;margin:8px 0}
.classic-notice {font-weight:600;font-size:.9rem;margin:0;min-height:11px;color:#303c54}
.classic-notice:not(:empty) {padding:9px 0}
.lesson-tip {display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;background:var(--tint);padding:13px 16px;border-radius:13px;margin:0 0 13px}
.lesson-tip>div:first-child {flex:1 1 290px}
.lesson-count {font-weight:700;color:var(--tone);font-size:.81rem}
.lesson-tip h2 {margin:3px 0;font:800 1.24rem/1.18 var(--head)}
.lesson-tip p {margin:4px 0;line-height:1.45}
.lesson-buttons button {font-size:.85rem}
.classic-table .lesson-target {outline:3px dashed #1f48c3!important;outline-offset:-3px;box-shadow:inset 0 0 0 5px #fff4b8!important;z-index:20}
.classic-result,.table-paused {border:1px solid var(--border);background:var(--tint);border-radius:12px;padding:16px;margin:8px 0}
.classic-result strong {font-size:1.25rem}
.table-paused {display:grid;place-content:center;min-height:220px;text-align:center}
@media(max-width:700px) {
 .game-filters {gap:4px;margin-bottom:12px}.game-filters button {font-size:.77rem;padding-inline:9px;min-height:40px}
 .table-card {display:grid;grid-template-columns:minmax(0,1.18fr) minmax(0,1fr)}
 .table-card .thumb img {height:100%;min-height:86px;object-fit:cover}
 .table-card .card-body {display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:7px;padding:9px 11px}
 .game-card.table-card .card-body h2 {font-size:1.2rem}
 .classic-panel {padding:8px;border-radius:13px}.classic-top label{gap:5px;font-size:.76rem}
 .classic-top{gap:4px}.classic-clock{gap:4px}.classic-clock button{font-size:.78rem;padding:6px}
 .lesson-tip {padding:10px;gap:6px}.lesson-tip p{font-size:.88rem}
 .game-spread:has([data-classic]) .game-mast .mast-detail{width:62px}
}

/* Daily endgames on the game table and in the date archive. */
.classic-day-title { min-width:0; flex:1 1 12rem; }
.classic-day-title small,.classic-day-title span { display:block; color:var(--tone,var(--muted)); font-size:.82rem; }
.classic-day-title h2,.classic-unavailable h2 { margin:.15rem 0; font:750 clamp(1.1rem,2.7vw,1.6rem)/1.18 var(--head); }
.classic-day-links { display:flex; align-items:center; flex-wrap:wrap; gap:.15rem 1rem; font-size:.86rem; margin:.55rem 0 0; }
.classic-day-links a { display:inline-flex; align-items:center; min-height:44px; color:var(--tone,var(--accent)); }
.classic-unavailable { padding:clamp(1rem,3vw,1.7rem); }
.classic-unavailable p,.archive-body>p { color:var(--muted); }
.archive-body>p { margin:-.3rem 0 .55rem; }

.stat-records { width:100%; border-collapse:collapse; font-variant-numeric:tabular-nums; }
.stat-records th,.stat-records td { text-align:right; padding:.55rem .4rem; border-bottom:1px solid var(--line); }
.stat-records th:first-child { text-align:left; padding-left:0; }
.stat-records thead th { color:var(--muted); font-size:.84rem; line-height:1.3; }
.stat-records tbody th { font-weight:600; }
@media (max-width:480px) {
 .stat-records { font-size:.87rem; }
 .stat-records th,.stat-records td { padding:.5rem .25rem; }
 .stat-records thead th { font-size:.75rem; }
}
.mines {--swatch:#eab84f;--tint:#fff0c5;--tone:#534321;--border:#d3b875}
.guide-link {margin:1rem 0 1.25rem}

.wordsearch {--swatch:#dba444;--tint:#fff0c9;--tone:#72501b;--border:#d4b782}
.freecell {--swatch:#62a69b;--tint:#e1f1e9;--tone:#24574d;--border:#a4c4b7}
.kakuro {--swatch:#9e8ec7;--tint:#eee7f8;--tone:#57427b;--border:#bfb0d4}

.crosswords {--swatch:#e6a0ae;--tint:#fcecf0;--tone:#764359;--border:#d6aeb7}
.color-lines {--swatch:#6cbbae;--tint:#e3f5ea;--tone:#245d51;--border:#9ac8ae}
.merge-tiles {--swatch:#e5b752;--tint:#fff2c8;--tone:#705017;--border:#d3b87a}
.catalogue-more {display:block;margin:18px auto 0;min-height:44px;border:1px solid #aab5cd;border-radius:12px;background:#fffaf0;color:#253a77;padding:8px 20px;font-weight:700}
.catalogue-more[hidden],.game-card[hidden]{display:none}
