/* APARTMANLAR · original fifth game, shared platform visual system */
.sky-catalog-art{background:linear-gradient(140deg,#eef5ff,#e4ebfb);color:#354c85;overflow:hidden}
.sky-catalog-graphic{font-weight:950;font-size:clamp(1.45rem,2.8vw,2.5rem);letter-spacing:.12em;line-height:1.45;text-align:center;white-space:pre}
.sky-command-bar .arena-head-actions .btn{background:linear-gradient(180deg,#0fa39a,#0c857f);color:#fff;border-color:#0b726e;box-shadow:0 4px 0 #0a5c59}.sky-command-bar .arena-head-actions .btn:hover:not(:disabled){background:#0b877f!important;color:#fff!important}
.sky-playground{background:var(--theme-bg,#f7fafb);display:flex;align-items:center;justify-content:center;overflow:hidden;min-height:0}
.sky-play-area{height:100%;width:min(100%,710px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:0}
.sky-board{--sky-size:510px;--sky-n:4;width:min(100%,var(--sky-size));height:auto;aspect-ratio:1;flex:0 0 auto;display:grid;grid-template-columns:repeat(calc(var(--sky-n) + 2), minmax(0,1fr));grid-template-rows:repeat(calc(var(--sky-n) + 2), minmax(0,1fr));border:4px solid #294658;border-radius:16px;box-shadow:0 0 0 8px #edf3f7,0 16px 30px #092b3a20;background:#f7fbfe;overflow:hidden;touch-action:manipulation}
.sky-cell,.sky-clue{appearance:none;border:0;min-width:0;min-height:0;display:grid;place-items:center;font:900 clamp(1.2rem,3.2vmin,2.1rem)/1 inherit;color:#223d56;background:#fff;padding:0;user-select:none;cursor:pointer}
.sky-cell{border-right:1px solid #adbecd;border-bottom:1px solid #adbecd;font-size:clamp(1.18rem,3.4vmin,2.1rem);font-family:Nunito,Arial,sans-serif}
.sky-cell.chosen{background:#ffdfb3;box-shadow:inset 0 0 0 3px #dc8840}
.sky-cell:hover:not(.chosen){background:#eaf6f4}
.sky-clue{background:#dce9f4;color:#25445d;cursor:default;font-size:clamp(.95rem,2.5vmin,1.7rem);font-family:Nunito,Arial,sans-serif}
.sky-clue.sky-empty{background:#e9f0f5}
.sky-pad{display:flex;justify-content:center;flex-wrap:nowrap;gap:9px}.sky-pad .pad-number{width:55px;height:47px}
.sky-controls{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.sky-controls .btn{min-width:115px;min-height:42px}
.sky-play-area .feedback{width:min(100%,620px);min-height:28px}
.sky-race-area{gap:8px}.sky-race-board{--sky-size:355px;box-shadow:0 0 0 5px #fff7,0 10px 20px #19314520}.sky-race-board .sky-clue{font-size:clamp(.75rem,1.65vmin,1.35rem)}.sky-race-board .sky-cell{font-size:clamp(.85rem,2vmin,1.5rem)}.sky-race-pad{display:flex;justify-content:center;gap:5px}.sky-race-pad .pad-number{width:37px;height:36px;font-size:1rem}
html[data-theme="dark"] .sky-catalog-art{background:linear-gradient(140deg,#1d294b,#283b6b);color:#d3e3ff}
html[data-theme="dark"] .sky-playground{background:#182735}html[data-theme="dark"] .sky-board{background:#1f3346;border-color:#a6bcd0;box-shadow:0 0 0 7px #263b4f,0 16px 30px #0004}
html[data-theme="dark"] .sky-cell{background:#273d50;color:#f8fbff;border-color:#5d768c}html[data-theme="dark"] .sky-cell.chosen{background:#77522f;box-shadow:inset 0 0 0 3px #ebb16f}html[data-theme="dark"] .sky-clue{background:#365268;color:#edf6ff}html[data-theme="dark"] .sky-clue.sky-empty{background:#284357}
@media(min-width:701px){.game-catalog{grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);overflow-y:auto;align-content:start}.catalog-card{min-width:0}}
@media(max-width:700px){.game-catalog{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:auto;overflow-y:auto;min-height:0}.catalog-card{min-height:0}.sky-board{border-width:3px;border-radius:13px}.sky-pad .pad-number{width:39px;height:41px;font-size:1.1rem}.sky-cell{font-size:clamp(.92rem,4.5vw,1.4rem)}.sky-clue{font-size:clamp(.8rem,3.5vw,1.2rem)}.sky-controls .btn{min-width:90px;min-height:38px;font-size:.83rem}}
@page skyA4{size:A4 portrait;margin:5mm}
@media print{.sky-print-sheet{page:skyA4;width:200mm!important;height:287mm!important;max-height:287mm!important}.sky-print-sheet .sheet-head{height:25mm!important;min-height:25mm!important;padding-top:.25mm}.sky-print-sheet .sheet-head h1{font-size:18pt!important}.sky-print-sheet .print-howto{font-size:8.5pt!important;margin-top:1mm!important}.sky-print-sheet .print-rule{font-size:9.2pt!important;margin-top:.5mm!important}.sky-print-body{flex:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:1.5mm;min-height:0;align-items:center;justify-items:center}.sky-print-card{width:64.3mm;height:76.3mm;max-width:100%;min-height:0;display:flex;align-items:center;justify-content:center;border:.28mm solid #909090;border-radius:1.6mm;break-inside:avoid}.sky-print-grid{display:grid;grid-template-columns:repeat(var(--sky-grid),minmax(0,1fr));grid-template-rows:repeat(var(--sky-grid),minmax(0,1fr));width:59mm;height:59mm}.sky-print-cell,.sky-print-outside{display:grid;place-items:center;font-family:Arial,sans-serif;font-weight:700;font-size:10pt;color:#171717}.sky-print-cell{border-right:.2mm solid #444;border-bottom:.2mm solid #444}.sky-print-outside{color:#333}.sky-print-sheet .sheet-footer{height:8mm}}

/* Five-game catalog: exactly four columns in each desktop row, while ensuring
   every card's title and action stays inside its own card at 768px high. */
@media(min-width:701px){
 .game-library{padding:clamp(12px,1.6vw,24px);gap:clamp(8px,1.1vh,14px)}
 .library-heading h2{font-size:clamp(1.45rem,2.25vw,2.15rem);margin:3px 0 6px}
 .library-heading p{font-size:clamp(.72rem,1vw,.94rem)}
 .game-catalog{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:clamp(10px,1.2vw,17px);overflow:hidden;align-content:stretch}
 .catalog-card{padding:clamp(8px,1.05vw,13px);border-radius:16px}
 .catalog-art{flex:0 0 clamp(65px,11.5vh,105px);min-height:0;max-height:105px;padding:8px;overflow:hidden}
 .catalog-art svg{max-height:90px}
 .abc-demo{font-size:clamp(.92rem,1.25vw,1.45rem);line-height:1.14}
 .catalog-sudoku-grid{max-height:95px;max-width:95px}
 .catalog-info{padding-top:7px;gap:4px;min-height:0}
 .catalog-number{font-size:clamp(.48rem,.58vw,.65rem);line-height:1.15;letter-spacing:.06em}
 .catalog-info>strong{font-size:clamp(.98rem,1.3vw,1.3rem);line-height:1.1}
 .catalog-info>small{font-size:clamp(.65rem,.83vw,.81rem);line-height:1.18;max-height:2.5em;overflow:hidden}
 .catalog-features{font-size:clamp(.58rem,.75vw,.74rem)}
 .catalog-open{font-size:clamp(.7rem,.88vw,.9rem);margin-top:auto;padding-top:5px}
 .catalog-open b{width:27px;height:27px}
 .library-footer{font-size:.65rem}
}
@media(max-width:700px) and (min-width:461px){
 .game-catalog{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));overflow:hidden;gap:7px}
 .catalog-art{flex:0 0 60px;min-height:0;max-height:60px;overflow:hidden}
 .catalog-info>strong{font-size:.95rem}.catalog-info>small{font-size:.58rem}.catalog-number{font-size:.46rem}
}
@media(max-width:460px){
 .game-catalog{grid-template-columns:1fr;grid-template-rows:repeat(5,minmax(0,1fr));overflow:hidden;align-content:stretch;gap:5px}
 .catalog-card{height:auto;min-height:0;max-height:none;padding:7px;gap:9px;flex-direction:row}
 .catalog-art{flex:0 0 31%;width:31%;min-height:0;max-height:none;height:100%;padding:3px;overflow:hidden}
 .catalog-info{flex:1;min-width:0;padding:0;gap:2px}
 .catalog-info>strong{font-size:1rem}
 .catalog-info>small{font-size:.58rem;line-height:1.1}
 .catalog-number{font-size:.46rem}
 .catalog-features{font-size:.49rem}
 .catalog-open{padding-top:2px;font-size:.65rem}
 .catalog-open b{width:19px;height:19px}
 .sky-catalog-graphic{font-size:1.4rem}
}
/* Outside clue buttons are disabled to prevent accidental entry, but must
   remain visually solid and legible in both themes. */
.sky-clue:disabled{opacity:1!important;color:#23485d}
html[data-theme="dark"] .sky-clue:disabled{color:#edf6ff}
/* Final thumbnail containment at every scale. */
.sky-catalog-graphic{font-size:clamp(1.08rem,1.7vw,1.62rem);line-height:1.16;letter-spacing:.08em}
@media(min-width:701px){.catalog-sudoku-grid{transform:scale(.76);transform-origin:center}}
@media(max-width:460px){
 .game-catalog{grid-template-rows:repeat(5,minmax(0,1fr))!important}
 .game-catalog .catalog-card{height:100%!important;max-height:100%!important;align-self:stretch!important;overflow:hidden}
 .game-catalog .catalog-art{height:clamp(54px,8.5vh,77px)!important;max-height:77px!important;min-height:0!important;align-self:center!important;overflow:hidden!important}
 .game-catalog .abc-demo{font-size:clamp(.63rem,2.7vw,.82rem)!important;line-height:1.09!important;letter-spacing:.08em!important}
 .game-catalog .fence-demo{font-size:clamp(.68rem,2.8vw,.80rem)!important;line-height:1.08!important}
 .game-catalog .sky-catalog-graphic{font-size:clamp(.9rem,4vw,1.2rem)!important;line-height:1.08!important;letter-spacing:.04em!important}
 .game-catalog .catalog-sudoku-grid{transform:scale(.78);transform-origin:center}
}
@media print{
  /* Browser print must show a closed frame around every individual grid,
     matching the four sides in the directly downloaded PDF. */
  .sky-print-cell{border:.12mm solid #707070!important}
}
