/* The three games share controls while keeping their own setting. */
.cg-page{--cg-ink:#253a50;--cg-light:#edf4fa;--cg-line:#a8bdce;--cg-accent:#365f80;--cg-paper:#fff;--cg-space:24px}
.cg-theme-mari-lwyd{--cg-ink:#493b32;--cg-light:#fbf1dd;--cg-line:#d8bd86;--cg-accent:#916120}
.cg-theme-gryla{--cg-ink:#273d35;--cg-light:#eef2e6;--cg-line:#a1b09b;--cg-accent:#44654a}
.cg-page>*{min-width:0}
.cg-intro{padding:0 0 24px;gap:24px;margin-bottom:24px;border-bottom:1px solid var(--line)}
.cg-intro>img{width:150px;height:100px;border-radius:45% 45% 14px 14px;border:3px solid white;box-shadow:0 0 0 1px var(--cg-line)}
.cg-intro .cg-skill{font-size:15px;color:var(--cg-accent)}
.cg-workshop{padding:28px;border:1px solid var(--cg-line);background:var(--cg-light);border-radius:26px;box-shadow:0 7px 0 color-mix(in srgb,var(--cg-line) 35%,white)}
.cg-feedback{position:sticky;inset-block-start:8px;z-index:5;margin:0 0 22px;padding:12px 16px;min-height:48px;background:#fff;border:1px solid var(--cg-line);border-inline-start:5px solid var(--cg-accent);border-radius:4px 12px 12px 4px;font-size:14px;box-shadow:0 3px 10px #253a5010}
.cg-levels{gap:10px;margin-bottom:24px}
.cg-levels button{min-height:46px;padding:10px 20px;background:#ffffffbd;border:1px solid var(--cg-line);font-weight:600}
.cg-levels button[aria-pressed=true]{background:var(--cg-ink);border-color:var(--cg-ink);box-shadow:0 3px 0 #ffffff}
.cg-game-layout{grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);gap:28px}
.cg-game-layout>*,.cg-rhyme-layout>*{min-width:0}
.cg-board-meta{flex-direction:row;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:7px 14px;margin-bottom:15px;color:var(--cg-ink)}
.cg-board-meta strong{font-size:16px}
.cg-board-meta>span{font-size:13px}
.cg-flight-grid{padding:12px;gap:6px;border:5px solid #6688a2;border-radius:24px;background:#c1d7e9;box-shadow:0 6px 0 #47657b}
.cg-flight-cell{background:#f4f9fd;border-radius:10px;box-shadow:inset 0 -3px 0 #dce8f1}
.cg-flight-cell.cloud{background:#9fbdd4;box-shadow:inset 0 0 0 1px #86a7c1}
.cg-flight-cell.player{outline-color:#a9313f;outline-width:3px;background:#fff5dc}
.cg-controls{background:#fff;border-radius:18px;padding:22px;box-shadow:0 2px 0 var(--cg-line)}
.cg-controls h2{font-size:26px;color:var(--cg-ink)}
.cg-controls>p{font-size:14px;line-height:1.65;margin-bottom:18px}
.cg-command-buttons{gap:10px}
.cg-command-buttons button{gap:8px;min-height:62px;padding:10px 12px;background:#f3f7fb;border-color:#c0d0dd;font-size:14px;font-weight:600;text-align:start}
.cg-command-buttons button[data-cg-command=G]{background:#fff3d9;border-color:#dfc592}
.cg-command-buttons b{display:grid;place-items:center;min-width:28px;color:#355a77;font-size:27px}
.cg-command-buttons button:hover:not(:disabled){border-color:#365f80;background:#e8f1f8}
.cg-program-title{margin-top:25px;font-size:13px}
.cg-program{padding:10px;gap:7px;background:#edf3f7;min-height:85px;max-height:195px}
.cg-program li button{min-height:44px;background:#fff;border-color:#b8cad9;text-align:start}
.cg-program li.current button{background:#ffe2a2;border:2px solid #976a16;padding:7px}
.cg-actions{gap:10px;margin-top:18px}
.cg-actions .btn{padding:10px 15px;font-size:14px}
.cg-flight-actions{padding-bottom:8px}
.cg-controls>.link-button,.cg-actions>.link-button{padding:8px 0;min-height:44px;font-size:14px}
.cg-success{border:1px solid #a7bda1;background:#f0f7e9;border-radius:16px;padding:22px;box-shadow:0 3px 0 #d4e2c9}
.cg-success strong{color:#234d33}
.cg-success p{font-size:14px}
.cg-rhyme-progress{padding:0 3px;margin-bottom:22px;color:var(--cg-ink)}
.cg-progress-caption{display:block;font-size:12px;font-weight:400;color:#665c50;margin-top:4px}
.cg-door-lights{gap:7px;font-size:28px;color:#cbbf9f}
.cg-door-lights span{width:28px;line-height:36px;text-align:center}
.cg-door-lights .lit{color:#9a6518;text-shadow:0 2px #fff}
.cg-rhyme-layout{gap:28px;padding:0 0 14px;align-items:stretch}
.cg-rhyme-scene{border:3px solid #8d7555;border-radius:46% 46% 12px 12px;align-self:center;box-shadow:0 5px 0 #ddc89e;object-fit:contain}
.cg-rhyme-copy{position:relative;padding:28px;background:#fffdf7;border-radius:6px 22px 22px 22px;border:1px solid #dfcea8;box-shadow:0 5px 0 #e6d7b6}
.cg-rhyme-copy h2{font-size:25px;color:#59442e}
.cg-poem{font-size:clamp(22px,2.1vw,28px);line-height:1.9;margin:20px 0 26px}
.cg-blank{min-width:62px;border-bottom-color:#8d5e22;color:#74471e}
#cg-rhyme-question{font-size:14px;line-height:1.6}
.cg-rhyme-choices{gap:10px;margin:22px 0}
.cg-rhyme-choices button{background:#fff;border:2px solid #cdb580;min-height:56px;min-width:80px;padding:10px 18px;box-shadow:0 4px 0 #e3d4b2}
.cg-rhyme-choices button:hover:not(:disabled){background:#fff2d2;border-color:#956a2b}
.cg-rhyme-choices button.tried{background:#faf6ee;box-shadow:none}
.cg-rhyme-choices button.correct:disabled{background:#315d48;border-color:#315d48;box-shadow:0 3px 0 #173f30}
.cg-welcome{gap:32px;padding:12px 0 20px}
.cg-welcome>div{padding:26px;background:#fffdf7;border-radius:18px;box-shadow:0 4px 0 #dfcea8}
.cg-cave-frame{padding:46px 18px 18px;border:9px solid #405768;border-radius:clamp(60px,8vw,96px) clamp(60px,8vw,96px) 20px 20px;background:#718a99;box-shadow:inset 0 12px 0 #536d7d,0 5px 0 #b9c6c4}
.cg-packing-grid{gap:5px}
.cg-cave-cell{background:#e6eadc;border:1px solid #c0c6b7;border-radius:5px;box-shadow:inset 0 -3px 0 #cfd6c6}
.cg-cave-cell.rock:disabled{background:#34495e;box-shadow:none}
.cg-piece-bank{gap:10px}
.cg-piece{min-width:0;background:#f6f8f1;border:2px solid #d6dfcc;min-height:115px;padding:12px;border-radius:12px;box-shadow:0 3px 0 #e3e9db}
.cg-piece[aria-pressed=true]{border-color:#43654a;background:#edf5df;box-shadow:0 0 0 2px #43654a}
.cg-piece.placed{background:#fafbf8;border-style:dashed;box-shadow:none}
.cg-piece-name{font-size:14px;flex-wrap:wrap;row-gap:3px}
.cg-piece-name small{color:#4b674d}
.cg-selected{display:flex;align-items:center;gap:12px;min-height:72px;padding:18px 0 2px}
.cg-selected .cave-art{--art-size:44px}
.cg-selected>span:has(strong){display:grid;gap:4px;flex:1}
.cg-selected small{font-size:11px;color:#546a55}
.cg-selected .cg-mini{margin-inline-start:auto}
.cg-cave-cell.preview-good{outline:3px solid #254b36;outline-offset:-4px;background:#d9edc6!important;box-shadow:inset 0 0 0 2px #fff}
.cg-cave-cell.preview-bad{outline:3px dashed #982d3a;outline-offset:-4px;background:#fae0df!important;box-shadow:inset 0 0 0 2px #fff}
.cg-game-cards{gap:24px}
.cg-game-card{border-radius:24px 24px 12px 12px;border-color:#bfcdc6;box-shadow:0 5px 0 #e2e9e2}
.cg-game-card>div{padding:24px}
.cg-game-card .cg-skill{color:#486b60}
.cg-game-card h3{font-size:29px}
.cg-game-card .cg-small{color:#61736b}
.cg-game-card .btn{margin-top:16px}

/* Covers use actual printable pages; the coloring collection shows a small fan. */
.workshop-grid{gap:28px;align-items:stretch}
.workshop-card{overflow:hidden;border:1px solid #ced8ce;border-radius:20px 20px 10px 10px;box-shadow:0 4px 0 #e6ece6;display:flex;flex-direction:column}
.workshop-card .card-body{flex:1;display:flex;flex-direction:column;align-items:start}
.workshop-card .card-body>p{flex:1}
.workshop-card .btn{margin-top:22px}
.workshop-card .card-body h2{font-size:29px}
.workshop-art{position:relative;display:flex;align-items:center;justify-content:center;min-height:235px;padding:25px;background:#dce8e4;overflow:hidden}
.workshop-card:nth-child(3n+2) .workshop-art{background:#f2e7ce}
.workshop-card:nth-child(3n) .workshop-art{background:#dce8f1}
.workshop-art:before,.workshop-art:after{content:'✦';position:absolute;font:44px Georgia,serif;color:#fff9;inset-block-start:22px;inset-inline-start:22px;transform:rotate(-12deg)}
.workshop-art:after{font-size:25px;inset-block-start:auto;inset-block-end:27px;inset-inline-start:auto;inset-inline-end:24px;transform:rotate(15deg)}
.workshop-art>img{position:relative;z-index:1;width:auto;height:210px;max-width:80%;object-fit:contain;background:#fff;box-shadow:0 7px 14px #253a5029;border:5px solid #fff;transform:rotate(-3deg)}
.workshop-card:nth-child(even) .workshop-art>img{transform:rotate(3deg)}
.coloring-cover{position:relative;z-index:1;width:100%;height:220px;max-width:320px}
.coloring-cover img{position:absolute;inset-inline-start:50%;inset-block-start:50%;width:44%;max-width:138px;height:auto;aspect-ratio:210/297;object-fit:contain;background:#fff;border:4px solid #fff;box-shadow:0 6px 12px #253a5030}
.coloring-cover img:nth-child(1){transform:translate(-98%,-55%) rotate(-12deg)}
.coloring-cover img:nth-child(2){transform:translate(0,-55%) rotate(12deg)}
.coloring-cover img:nth-child(3){transform:translate(-50%,-42%) rotate(-3deg);z-index:1}
.workshop-pages{position:absolute;inset-inline-end:12px;inset-block-end:10px;z-index:2;padding:4px 9px;font-size:11px;font-weight:600;border-radius:14px;background:#fff;color:#3a5850}
.workshop-card .meta{gap:8px 14px;flex-wrap:wrap;margin:10px 0}
.workshop-tools{background:#edf3ee;border:0;border-inline-start:4px solid #6c8e79}
.print-preview:has(.designed-sheet){max-height:none;overflow:visible;background:#e7ece8;padding:18px}
.ws-preview-label{font-size:12px;font-weight:600;color:#4e6257;margin:0 0 10px}
.ws-preview-label:not(:first-child){margin-top:28px}
.designed-sheet{padding:24px 22px;background:#fff;box-shadow:0 3px 10px #233c3420}
.designed-sheet+.designed-sheet{border:0}
.ws-title{align-items:center}
.ws-title-art{display:flex;align-items:center;gap:9px;flex:none;color:#555}
.ws-title-art svg{width:23px;height:23px}
.ws-title-art svg:nth-child(2){width:30px;height:30px}
.ws-block-title .ws-country-step{display:grid;place-items:center;flex:none;width:27px;height:27px;border:1px solid #555;border-radius:50%;font:600 15px var(--font)}
.ws-drawing-open{border:0!important;box-shadow:none!important;background:none!important}
.coloring-choices img{aspect-ratio:210/297;max-height:150px}
.print-preview:has(.coloring-collection-sheet){max-height:none;overflow:visible}
.coloring-collection-sheet{padding:0;background:#fff}
.coloring-page-art{display:block;width:auto;height:auto;max-width:100%;max-height:min(60vh,580px);margin:auto;object-fit:contain}
@page coloring-page{size:A4 portrait;margin:0}
@media print{
 .print-sheet.coloring-collection-sheet{page:coloring-page;width:210mm;height:297mm;min-height:0;padding:0;margin:0;break-inside:avoid}
 .coloring-collection-sheet .coloring-page-art{width:210mm;height:297mm;max-width:none;max-height:none;margin:0;object-fit:contain}
}
.ws-festive .ws-header{display:grid;grid-template-columns:minmax(0,1fr) 132px;gap:14px;align-items:center;margin-bottom:24px}
.ws-header-copy{min-width:0}
.ws-festive .ws-header p{margin-bottom:0}
.ws-header-art{display:block;width:100%;height:auto;object-fit:contain}
.ws-block-title .ws-illustrated-step{display:block;position:relative;flex:none;width:44px;height:44px;border:0;border-radius:0}
.ws-illustrated-step img{display:block;width:100%;height:100%;object-fit:contain}
.ws-illustrated-step b{position:absolute;inset-inline-end:-2px;inset-block-end:-1px;display:grid;place-items:center;width:18px;height:18px;background:#fff;border:1px solid #444;border-radius:50%;font:600 11px var(--font)}
.pdf-page-nav{display:flex;align-items:end;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:24px 0 14px}
.pdf-page-nav label{display:grid;gap:5px;font-size:13px}
.pdf-page-nav select{min-height:44px;max-width:100%;padding:8px 12px;background:#fff;border:1px solid #93aaa1;border-radius:6px;color:inherit;font:inherit}
.pdf-page-nav .btn{min-height:44px}
@media(max-width:560px){
 .ws-festive .ws-header{grid-template-columns:minmax(0,1fr) 78px;gap:10px}
 .ws-festive .ws-title h1{font-size:24px}
 .pdf-page-nav{gap:10px}.pdf-page-nav label{flex:1 1 100%}
 .pdf-page-nav .btn{flex:1;padding:10px;font-size:13px}
}
@media print{
 .ws-festive .ws-header{grid-template-columns:minmax(0,122mm) 48mm;gap:6mm;align-items:start;margin-bottom:2mm}
 .ws-festive .ws-header-art{width:48mm;height:32mm}
 .ws-festive .ws-header p{margin-bottom:0}
 .ws-festive .ws-title h1{font-size:25pt}
 .ws-block-title .ws-illustrated-step{width:12mm;height:12mm;border:0}
 .ws-illustrated-step b{width:5.2mm;height:5.2mm;font-size:8pt}
}
@media(max-width:850px){
 .cg-game-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px}
 .cg-workshop{padding:22px}.cg-controls{padding:18px}.cg-command-buttons button{font-size:13px;padding:10px 7px}
 .cg-rhyme-copy{padding:22px}.cg-rhyme-layout{gap:22px}
 .workshop-art{min-height:225px}.workshop-card .card-body h2{font-size:27px}
}
@media(max-width:650px){
 .cg-intro{gap:17px;margin-bottom:22px;padding-bottom:22px}.cg-intro>img{width:105px;height:92px}
 .cg-intro p{font-size:13px}.cg-links{font-size:13px;gap:10px 16px}
 .cg-workshop{padding:14px;border-radius:20px}.cg-feedback{inset-block-start:5px;font-size:13px;line-height:1.5;padding:10px 12px;margin-bottom:18px}
 .cg-game-layout{grid-template-columns:minmax(0,1fr);gap:24px}.cg-controls{padding:20px 17px}
 .cg-flight-grid{padding:8px;gap:4px;border-width:4px;border-radius:18px}.cg-flight-cell{border-radius:6px}
 .cg-board-meta strong{font-size:15px}.cg-board-meta>span{font-size:12px}
 .cg-command-buttons button{font-size:14px;padding:11px 10px;min-height:58px}
 .cg-levels button{padding:10px 16px;min-height:44px}
 .cg-actions .btn{font-size:13px;padding:10px 12px}
 .cg-rhyme-layout,.cg-welcome{grid-template-columns:minmax(0,1fr);gap:24px}
 .cg-rhyme-scene{max-width:430px;border-width:2px}.cg-rhyme-copy{padding:24px 20px}
 .cg-poem{font-size:23px;line-height:1.9}.cg-rhyme-progress{align-items:start;gap:8px}
 .cg-door-lights{gap:1px;font-size:22px}.cg-door-lights span{width:23px;line-height:29px}
 .cg-rhyme-choices button{font-size:22px;min-width:67px;padding:8px 13px}
 .cg-cave-frame{padding:36px 12px 15px;border-width:7px}.cg-packing-grid{gap:4px}
 .cg-piece{padding:11px;min-height:108px}.cg-piece-name{font-size:14px;flex-wrap:wrap;row-gap:3px}
 .cg-cave-cell .cave-art{--art-size:90%}.cg-selected .cave-art{--art-size:38px}
 .workshop-art{min-height:250px}.workshop-art>img{height:225px}.workshop-card .card-body h2{font-size:29px}
 .designed-sheet{padding:22px 15px}.ws-title{gap:10px}.ws-title h1{font-size:25px}
 .ws-title-art{gap:4px}.ws-title-art svg{width:18px;height:18px}.ws-title-art svg:nth-child(2){width:23px;height:23px}
 .print-preview:has(.designed-sheet){padding:10px}
}
@media(max-width:360px){
 .cg-workshop{padding:10px}.cg-cave-frame{padding:30px 4px 9px;border-width:4px}
 .cg-rhyme-progress{flex-wrap:wrap}.cg-door-lights{gap:4px}
 .cg-rhyme-copy{padding:22px 15px}.cg-poem{font-size:21px}
 .cg-controls{padding:18px 14px}.cg-command-buttons button{font-size:13px;padding:10px 7px;gap:6px}
 .cg-command-buttons b{min-width:23px;font-size:25px}.cg-piece-name{font-size:13px}
 .ws-title-art svg:first-child,.ws-title-art svg:last-child{display:none}
}
@media print{
 .ws-preview-label{display:none!important}
 .print-sheet.designed-sheet{box-shadow:none}
 .designed-sheet .ws-title-art{gap:2mm}
 .designed-sheet .ws-title-art svg{width:6mm;height:6mm}
 .designed-sheet .ws-title-art svg:nth-child(2){width:8mm;height:8mm}
 .designed-sheet .ws-block-title .ws-country-step{width:7mm;height:7mm;font-size:12pt;border-color:#555}
 .designed-sheet .ws-drawing-open{border:0!important}
}

/* Keep Befana's board in view while editing or running the instructions. */
.cg-theme-befana .cg-intro-compact{padding-bottom:16px;margin-bottom:20px}
.cg-theme-befana .cg-intro-compact>div{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 24px;width:100%}
.cg-theme-befana .cg-intro-compact p{margin:0;font-size:13px}
.cg-theme-befana .cg-intro-compact .cg-links{margin-inline-start:auto;font-size:13px}
.cg-theme-befana .cg-workshop{padding:20px}
.cg-theme-befana .cg-levels{margin-bottom:18px}
.cg-theme-befana .cg-flight-board{position:sticky;inset-block-start:12px;align-self:start;min-width:0;background:var(--cg-light);padding-bottom:12px}
.cg-theme-befana .cg-flight-grid{box-sizing:border-box;width:100%;max-width:calc(100dvh - 180px);margin-inline:auto}
.cg-theme-befana .cg-flight-grid+.cg-small{margin:18px 0 0;line-height:1.6;font-size:13px}
.cg-theme-befana .cg-controls{padding:18px}
.cg-theme-befana .cg-controls h2{font-size:24px;margin-bottom:10px}
.cg-theme-befana .cg-controls>p:first-of-type{font-size:13px;line-height:1.55;margin-bottom:14px}
.cg-theme-befana .cg-command-buttons{gap:8px}
.cg-theme-befana .cg-command-buttons button{min-height:48px;padding:8px 10px;font-size:13px}
.cg-theme-befana .cg-command-buttons b{font-size:25px}
.cg-theme-befana .cg-program-title{margin:16px 0 8px}
.cg-theme-befana .cg-program{min-height:64px;max-height:112px;margin-bottom:14px}
.cg-theme-befana .cg-program li button{font-size:12px;padding:7px;min-height:40px}
.cg-theme-befana .cg-flight-actions{margin:12px 0 0;padding-bottom:2px;gap:8px}
.cg-theme-befana .cg-flight-actions .btn{padding:9px 12px;font-size:13px;min-height:44px}
.cg-theme-befana .cg-flight-feedback{position:static;margin:0 0 12px;padding:10px 12px;background:var(--cg-light);border-inline-start:3px solid var(--cg-accent);border-radius:3px 8px 8px 3px;font-size:13px;line-height:1.5}
.cg-theme-befana .cg-flight-feedback:empty{display:none}
.cg-theme-befana .cg-success{margin-top:14px;padding:16px}
.cg-theme-befana .cg-success strong{font-size:22px}
@media(max-width:650px){
 .cg-theme-befana .cg-workshop{padding:12px}
 .cg-theme-befana .cg-intro-compact .cg-links{margin-inline-start:0}
 .cg-theme-befana .cg-intro-compact>div{gap:8px 18px}
 .cg-theme-befana .cg-game-layout{gap:16px}
 .cg-theme-befana .cg-flight-board{display:contents;position:static;padding:0;border:0}
 .cg-theme-befana .cg-flight-grid{position:sticky;inset-block-start:0;z-index:3;align-self:start;max-width:min(240px,max(180px,calc(45svh - 20px)))}
 .cg-theme-befana .cg-board-meta{gap:4px 10px;margin-bottom:10px}
 .cg-theme-befana .cg-board-meta strong{font-size:13px}
 .cg-theme-befana .cg-board-meta>span{font-size:12px}
 .cg-theme-befana .cg-flight-grid+.cg-small{margin-top:16px;font-size:12px;line-height:1.5}
 .cg-theme-befana .cg-controls{padding:18px 14px}
 .cg-theme-befana .cg-flight-cell small{font-size:9px;padding-inline:3px}
 .cg-theme-befana .cg-broom b{font-size:15px}
 .cg-theme-befana .cg-start{font-size:9px}
}

.cg-theme-befana .cg-controls:has(.cg-success) .cg-flight-feedback{display:none}
.cg-theme-befana .cg-success .btn{margin-top:14px}

.cg-theme-befana{overflow-anchor:none}

.cg-theme-befana .cg-program button:disabled{opacity:1}

/* Keep Grýla's floor and the current action visible together. */
.cg-theme-gryla{overflow-anchor:none}
.cg-theme-gryla .cg-intro-compact{padding-bottom:16px;margin-bottom:20px}
.cg-theme-gryla .cg-intro-compact>div{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 24px;width:100%}
.cg-theme-gryla .cg-intro-compact p{margin:0;font-size:13px}
.cg-theme-gryla .cg-intro-compact .cg-links{margin-inline-start:auto;font-size:13px}
.cg-theme-gryla .cg-workshop{padding:20px}
.cg-theme-gryla .cg-levels{margin-bottom:18px}
.cg-packing-board{position:sticky;inset-block-start:12px;align-self:start;min-width:0;padding-bottom:12px}
.cg-theme-gryla .cg-cave-frame{box-sizing:border-box;width:100%;max-width:calc(100dvh - 200px);margin-inline:auto;padding:30px 12px 12px;border-width:6px}
.cg-theme-gryla .cg-cave-frame+.cg-small{margin:18px 0 0;font-size:12px;line-height:1.6}
.cg-theme-gryla .cg-controls{padding:16px}
.cg-theme-gryla .cg-controls h2{font-size:24px;margin-bottom:8px}
.cg-theme-gryla .cg-controls>p:first-of-type{font-size:13px;line-height:1.5;margin-bottom:12px}
.cg-theme-gryla .cg-piece-bank{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.cg-theme-gryla .cg-piece{position:relative;min-height:98px;padding:9px;gap:8px}
.cg-theme-gryla .cg-piece-name{font-size:12px;gap:5px;align-items:center}
.cg-theme-gryla .cg-piece-name .cave-art{--art-size:28px}
.cg-theme-gryla .cg-mini{grid-template-columns:repeat(var(--mini-cols),13px);min-height:28px}
.cg-theme-gryla .cg-mini i{width:13px;height:13px}
.cg-theme-gryla .cg-piece[aria-pressed=true]{background:#fbe4a0;border:3px solid #825515;padding:8px;box-shadow:0 3px 0 #825515;color:#3d2b13}
.cg-piece-chosen{display:block;font-weight:800;color:#594015}
.cg-theme-gryla .cg-selected{min-height:50px;padding:10px 0;gap:8px}
.cg-theme-gryla .cg-selected small{font-size:11px}
.cg-theme-gryla .cg-selected strong{font-size:14px}
.cg-theme-gryla .cg-selected .cave-art{--art-size:32px}
.cg-packing-feedback{margin:0 0 10px;padding:8px 10px;background:var(--cg-light);border-inline-start:3px solid var(--cg-accent);font-size:12px;line-height:1.5;border-radius:3px 8px 8px 3px}
.cg-theme-gryla .cg-actions{margin:8px 0;gap:8px}
.cg-theme-gryla .cg-actions .btn{min-height:44px;padding:9px 12px;font-size:13px}
.cg-theme-gryla .cg-actions .link-button{min-height:44px;font-size:12px}
.cg-theme-gryla .cg-success{margin-top:10px;padding:12px}
.cg-theme-gryla .cg-success strong{font-size:21px}
.cg-theme-gryla .cg-success .btn{margin-top:12px;min-height:44px}
.cg-theme-gryla .cg-controls:has(.cg-success) .cg-packing-feedback{display:none}
@media(max-width:1000px) and (min-width:651px){
 .cg-theme-gryla .cg-game-layout{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:18px}
 .cg-theme-gryla .cg-piece-name{font-size:11px}
}
@media(max-width:650px){
 .cg-theme-gryla .cg-workshop{padding:12px}
 .cg-theme-gryla .cg-intro-compact .cg-links{margin-inline-start:0}
 .cg-theme-gryla .cg-game-layout{gap:16px}
 .cg-packing-board{display:contents;position:static;padding:0}
 .cg-theme-gryla .cg-cave-frame{position:sticky;inset-block-start:0;z-index:3;align-self:start;max-width:300px;padding:18px 4px 8px;border-width:4px}
 .cg-theme-gryla .cg-board-meta{gap:4px 10px;margin-bottom:4px}
 .cg-theme-gryla .cg-board-meta strong{font-size:13px}
 .cg-theme-gryla .cg-cave-frame+.cg-small{margin-top:16px}
 .cg-theme-gryla .cg-piece-bank{grid-template-columns:repeat(2,minmax(0,1fr))}
 .cg-theme-gryla .cg-piece{min-height:94px}
 .cg-theme-gryla .cg-piece-name{font-size:13px}
 .cg-theme-gryla .cg-controls{padding:14px 12px}
}
@media(max-width:650px){
 .cg-theme-gryla .cg-controls h2{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .cg-theme-gryla .cg-controls>p:first-of-type:not(.cg-packing-feedback),.cg-theme-gryla .cg-selected{display:none}
 .cg-theme-gryla .cg-piece-bank{display:flex;overflow-x:auto;scroll-snap-type:x proximity;padding:2px 2px 6px;gap:7px}
 .cg-theme-gryla .cg-piece{flex:0 0 103px;min-height:76px;padding:6px;gap:4px;scroll-snap-align:start}
 .cg-theme-gryla .cg-piece-name{font-size:12px;gap:4px}
 .cg-theme-gryla .cg-piece-name .cave-art{--art-size:22px}
 .cg-theme-gryla .cg-mini{grid-template-columns:repeat(var(--mini-cols),9px);min-height:20px;gap:2px}
 .cg-theme-gryla .cg-mini i{width:9px;height:9px}
 .cg-theme-gryla .cg-piece[aria-pressed=true]{padding:5px}
 .cg-theme-gryla .cg-piece-chosen{font-size:10px}
 .cg-theme-gryla .cg-packing-feedback{margin:8px 0;font-size:12px;padding:6px 8px}
 .cg-theme-gryla .cg-controls{padding:10px}
}
.printable-pdf-preview figure{margin:0 0 22px}
.printable-pdf-preview figure:last-child{margin-bottom:0}
.printable-pdf-preview figcaption{font-size:12px;color:var(--muted);margin-bottom:8px}
.printable-pdf-preview img{display:block;max-width:100%;width:100%;height:auto;background:white;box-shadow:0 2px 8px #173f3b15}

/* Keep the larger coloring library compact above the selected A4 sheet. */
.coloring-choices{max-height:320px;overflow-y:auto;overscroll-behavior:contain;padding:5px;scrollbar-gutter:stable;border:1px solid var(--line);border-radius:6px}
.coloring-choices button:focus-visible{outline:3px solid var(--pine);outline-offset:1px}
@media(max-width:560px){.coloring-choices{max-height:235px}.coloring-choices img{max-height:110px}}

@page coloring-landscape-page{size:A4 landscape;margin:0}
.workshop-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-top:24px}
.workshop-filters label{display:grid;gap:7px;min-width:0;font-size:15px;font-weight:600}
.workshop-filters select{width:100%;min-width:0;min-height:48px;padding:10px 36px 10px 12px;border:1px solid #93aaa1;border-radius:6px;background-color:#fff;color:var(--ink);font:400 16px var(--font);appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23233c3b' stroke-width='1.7'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}
.workshop-filter-summary{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:18px 0 28px}
.workshop-filter-summary p{color:var(--muted);font-size:16px}
.workshop-filter-summary .btn{min-height:44px;padding:8px 18px;white-space:nowrap}
@media(max-width:979px){.creature-map-pan-hint{font-size:14px;border-top:0;border-bottom:1px solid #d4e1d8}}
@media(max-width:800px){.workshop-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}}
@media(max-width:430px){.workshop-filters{grid-template-columns:minmax(0,1fr)}.workshop-filter-summary{align-items:start}}
@media print{
 body.print-mode:has(#print-output .coloring-landscape),
 #print-output:has(.coloring-landscape){page:coloring-landscape-page}
 .print-sheet.coloring-collection-sheet.coloring-landscape{page:coloring-landscape-page;width:297mm;height:210mm}
 .coloring-landscape .coloring-page-art{width:297mm;height:210mm}
}

.single-game-layout{grid-template-columns:minmax(0,1fr);max-width:900px}
