/* The game fits its own iframe; long books and menus scroll within it. */
html,body{width:100%;height:100%;height:100dvh;min-height:0;overflow:hidden}
body{display:flex;flex-direction:column}header{width:100%;flex:0 0 auto;padding:6px 18px;min-height:48px}
.header-logo{display:block;width:92px;height:50px;object-fit:contain}.brand{letter-spacing:0}
main{width:100%;flex:1 1 0;min-height:0;max-width:1100px;padding:6px 18px 10px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
body>footer{display:none}.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap}
.intro.title-screen{display:grid;grid-template-columns:minmax(170px,30%) minmax(0,1fr);align-items:center;gap:10px 24px;max-width:1000px;margin:0 auto;height:100%;min-height:0}
.title-screen .title-logo{grid-column:1;grid-row:1 / span 3;width:100%;height:auto;max-height:240px;object-fit:contain;justify-self:center}
.title-screen .title-tagline{grid-column:1;grid-row:4;font-size:14px}.title-screen>p:not(.title-tagline){grid-column:1;grid-row:5;font-size:12px}
.title-choices{grid-column:2;grid-row:1 / span 5;gap:8px;margin:0}.title-choices>button{padding:12px;min-height:76px;font-size:15px;gap:5px}.title-choices small{font-size:11px;line-height:1.35}
.title-screen .more-modes{grid-column:1 / -1;grid-row:6}.more-mode-buttons{margin-top:6px}.more-modes summary{min-height:36px;padding:6px 12px}
dialog{width:min(720px,calc(100vw - 20px));max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px);margin:auto;padding:20px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}#close-dialog{position:sticky;top:0;float:right;z-index:5;background:#fffaf0}dialog h2{font-size:clamp(25px,4vw,40px);padding-right:28px}dialog p{overflow-wrap:anywhere}.special-name{max-width:100%;width:100%}.guided-chapters,.level-grid,.postcard-grid{min-width:0}.guided-chapter button{white-space:normal}.chapter-pages{flex-wrap:wrap}
body:not(.title-open) main:has(#pour-area:not([hidden])){display:flex;flex-direction:column;overflow:hidden}
#pour-area{display:flex;flex-direction:column;flex:1 1 0;min-height:0}#pour-area[hidden]{display:none}
.game-card{display:flex;flex-direction:column;flex:1 1 0;min-height:0}.game-top{flex:0 0 auto;padding:6px 16px;gap:12px}.puzzle-meta{padding:5px 16px 0;font-size:11px}.rule-note{padding:0 16px;font-size:11px;margin:5px 0;line-height:1.4}
.cafe-orders{flex:0 0 auto;display:flex;overflow-x:auto;flex-wrap:nowrap;padding:4px 12px;margin:0;gap:6px;scrollbar-width:thin}.cat-order,.cat-order.next,.cat-order.waiting{min-height:0;min-width:180px;flex:1 0 180px;padding:5px;grid-template-columns:28px 1fr;gap:5px}.cat-order .cat-portrait{width:28px;height:28px}.order-name{font-size:11px;margin:0}.order-request{font-size:10px;margin:0;line-height:1.3}.order-label,.order-status{font-size:9px;margin:0}.recipe-stack{margin:0;width:28px}.order-request:has(.recipe-stack){display:flex;align-items:center;gap:6px}.recipe-layer{height:11px;font-size:9px}.recipe-direction,.recipe-caption{font-size:9px}
.play-area{flex:1 1 0;min-height:0;padding:12px 10px 4px;overflow:auto;overscroll-behavior:contain;display:flex;flex-direction:column;justify-content:center;scrollbar-width:thin}.board{width:100%;max-width:900px;min-height:0;gap:18px 22px;align-content:center;flex:0 0 auto}.tube:not(.recipe-glass){height:135px;width:49px}.tube:not(.recipe-glass) .layer{height:28px}.tube-number{margin-top:5px}.serve-drink{min-height:32px;padding:5px 9px;margin-top:3px;font-size:11px}#message{margin:8px 0 0;font-size:11px;flex:0 0 auto}
.game-bottom{flex:0 0 auto;padding:5px 10px;gap:18px}.game-bottom .tool{min-height:36px}.recipe-tools{flex:0 0 auto;padding:5px 10px;gap:5px}.recipe-tools button{min-height:36px;padding:5px 9px;font-size:11px}.recipe-tools p{margin:3px;font-size:10px}.recipe-tools:has(#paw-tool[hidden]):has(#spoon-tool[hidden]){display:none}.session-tools{flex:0 0 auto;margin:3px 0;font-size:10px}.under-card,.how-row,.cafe-story{display:none}
.reward-reveal{flex:0 0 auto;margin-bottom:5px}.reward-notice>summary{min-height:32px;padding:5px 0;font-size:12px}.reward-notice[open]{max-height:35dvh;overflow:auto}.postcard-reward{padding:8px}.reward-cards figure{flex-basis:140px}.reward-cards figcaption{font-size:11px}.postcard-reward h3{font-size:18px;margin:5px}.postcard-reward button{padding:7px}
.play-area:has(.win:not([hidden])){justify-content:center;padding:6px}.win{width:100%;padding:8px}.win h2{font-size:28px}.win .result-share{margin-top:5px}.win .result-share-feedback{min-height:16px}.result-share-buttons{gap:6px}.result-share button,.result-share select{min-height:40px}
#catnap-host,#catwords-host{min-height:0;height:100%}#catnap-host[hidden],#catwords-host[hidden]{display:none}.catnap-card,.catwords-card{min-height:0;max-width:100%;padding:12px;border-radius:18px}.catnap-header h2,.catwords-heading h2{font-size:26px;margin:2px 0}.catnap-header p{font-size:11px;margin:3px 0}.catnap-rules{font-size:11px;line-height:1.4;margin:5px 0}.catnap-meta{padding:5px 0;font-size:11px}.catnap-eyebrow{display:none}.catnap-board-wrap{padding:12px;overflow:hidden}.catnap-board{min-width:0;gap:4px}.catnap-card .catnap-tile{min-height:0;height:clamp(34px,calc((100dvh - 235px)/6),65px);padding:2px}.catnap-tile .cat-portrait{height:clamp(20px,calc((100dvh - 310px)/6),40px);width:auto;max-width:100%}.catnap-symbol{font-size:11px}.catnap-selection{min-height:0;font-size:11px;margin:4px 0}.catnap-message{font-size:11px;min-height:0;margin:4px 0}.catnap-controls{gap:5px}.catnap-card button,.catnap-card select{min-height:36px;padding:6px 9px;font-size:11px}.catnap-controls label{min-height:36px;font-size:11px}.catnap-save{font-size:10px;margin:4px}.catnap-story,.catnap-journey{margin-top:8px;padding-top:5px}.catnap-story>summary,.catnap-journey>summary{min-height:32px;font-size:12px;cursor:pointer}.catnap-card>.result-share-host .result-share{margin-top:8px;padding:10px}
.catwords-card>p{font-size:11px;line-height:1.4;margin:5px 0}.catwords-heading .tiny-label{display:none}.catclues-scene{width:145px;min-height:100px;margin:5px auto}.catclues-cat{padding:4px}.catclues-cat .cat-portrait{width:65px;height:60px}.catclues-blanket{padding:4px}.catwords-board{margin:8px auto;gap:7px;min-height:32px}.catwords-letter{height:30px;max-width:26px}.catwords-message{min-height:26px}.catwords-keyboard{gap:4px}.catwords-keyboard button{min-height:38px;padding:5px}.catclues-actions{margin:6px}.catclues-actions button{min-height:36px;font-size:11px}.catwords-book{margin-top:8px;padding-top:5px}.catwords-book summary{min-height:32px;font-size:12px}
@media(max-width:700px){header{padding:4px 12px;min-height:44px}.header-logo{width:76px;height:42px}.header-right .icon-button{width:36px;height:36px}main{padding:4px 10px 6px}.intro.title-screen{display:flex;gap:6px;justify-content:center;margin:0;max-width:520px}.title-screen .title-logo{width:210px;max-height:140px}.intro.title-screen .title-tagline{font-size:13px}.intro.title-screen>p:not(.title-tagline){font-size:11px}.title-choices{gap:6px;margin:4px 0}.title-choices>button{min-height:68px;padding:9px;font-size:13px;gap:3px}.title-choices small{font-size:10px}.title-screen .more-modes{width:100%}.more-mode-buttons>button{font-size:11px;padding:7px}.game-top{padding:5px 12px}.level-picker{min-width:90px;font-size:16px}.progress-text{font-size:10px;margin-bottom:4px}.moves strong{font-size:19px}.tiny-label{margin-bottom:3px}.puzzle-meta{padding:4px 12px 0;font-size:10px}.rule-note{font-size:10px;padding:0 12px}.board{gap:12px 14px}.tube:not(.recipe-glass){height:120px;width:43px}.tube:not(.recipe-glass) .layer{height:25px}.catnap-controls label{flex-basis:100%;justify-content:center}.catnap-card .catnap-tile{height:clamp(34px,calc((100dvh - 265px)/6),65px)}.catnap-tile .cat-portrait{height:clamp(20px,calc((100dvh - 340px)/6),40px)}.win h2{font-size:25px}.win .primary,#daily-finish{min-height:40px;padding:8px 12px;font-size:12px}.win .result-share{padding:8px}.win .result-share h3{font-size:17px}.win .result-share label{flex-basis:auto}.win-spark{display:none}.win #win-copy{font-size:11px}}
@media(max-height:600px){.title-screen .title-logo{max-height:105px}.catclues-scene{display:none}.catwords-save,.catwords-stats{font-size:10px!important}.catnap-header>div>p:not(.catnap-eyebrow){display:none}.catnap-save{display:none}.win .result-share>p:not(.result-share-feedback){display:none}}
@media(max-height:460px){header{min-height:36px;padding:2px 12px}.header-logo{height:32px;width:70px}.header-right .icon-button{height:30px;width:30px}.rule-note,.session-tools,.recipe-tools p{display:none}.catnap-rules,.catnap-selection{display:none}.catnap-controls label{flex-basis:auto}.catnap-story,.catnap-journey{margin-top:4px}.catwords-card>p:first-of-type{display:none}.catwords-heading h2{font-size:21px}.catwords-card>p{margin:3px 0}.catwords-board{margin:4px}.catwords-message{min-height:18px}.catwords-save,.catwords-stats{display:none}.catwords-book{margin-top:4px}.catwords-keyboard button{min-height:32px}.win h2{font-size:23px}.win .result-share h3{display:none}.win #win-copy{font-size:10px}.reward-reveal{display:none}}
@media(min-width:501px) and (max-height:460px){.intro.title-screen{display:grid;grid-template-columns:170px 1fr;gap:5px 14px;max-width:860px}.title-screen .title-logo{grid-column:1;grid-row:1 / span 3;max-height:160px}.title-screen .title-tagline{grid-column:1;grid-row:4}.title-screen>p:not(.title-tagline){grid-column:1;grid-row:5}.title-choices{grid-column:2;grid-row:1 / span 5}.title-choices>button{min-height:53px;padding:7px;font-size:12px}.title-choices small{font-size:10px}.title-screen .more-modes{grid-column:1 / -1;grid-row:6}}

body:has(#catnap-host:not([hidden])) .reward-reveal,body:has(#catwords-host:not([hidden])) .reward-reveal{display:none}
.catnap-card .catnap-tile{height:clamp(24px,calc((100dvh - 270px)/var(--nap-rows,6)),65px)}.catnap-tile .cat-portrait{height:calc(100% - 12px);max-height:40px;width:auto}
.catnap-card:has(.result-share-host:not([hidden])) .catnap-board-wrap,.catnap-card:has(.result-share-host:not([hidden])) .catnap-selection{display:none}
.catnap-card .result-share h3,.catwords-card .result-share h3{font-size:19px;margin:0}.catnap-card .result-share p,.catwords-card .result-share p{font-size:11px;margin:4px 0}.catnap-card .result-share,.catwords-card .result-share{padding:10px;margin-top:8px}.catnap-card .result-share-feedback,.catwords-card .result-share-feedback{min-height:16px}
@media(min-width:701px){.title-screen .title-logo{max-height:220px}.intro.title-screen{grid-template-rows:1fr auto auto auto;gap:10px 24px}.title-screen .title-logo{grid-row:1}.title-screen .title-tagline{grid-row:2}.title-screen>p:not(.title-tagline){grid-row:3}.title-choices{grid-row:1 / span 3}.title-screen .more-modes{grid-row:4}}
@media(max-width:700px){.catnap-card .catnap-tile{height:clamp(24px,calc((100dvh - 306px)/var(--nap-rows,6)),65px)}}
@media(max-height:460px){.catnap-card .catnap-tile{height:clamp(24px,calc((100dvh - 215px)/var(--nap-rows,6)),50px)}.title-screen .title-logo{max-height:145px}.catnap-card .result-share>p:not(.result-share-feedback),.catwords-card .result-share>p:not(.result-share-feedback){display:none}}

.catwords-card.completed .catwords-keyboard,.catwords-card.completed .catclues-actions{display:none}
.catwords-card.completed .catclues-scene{display:none}
.catwords-card.completed .catwords-save{display:none}
@media(max-width:700px) and (max-height:600px){.title-screen .title-logo{max-height:100px}.intro.title-screen{gap:5px}.title-choices>button{min-height:60px}.intro.title-screen>p:not(.title-tagline){display:none}}

.catnap-meta{flex-wrap:nowrap;gap:5px;font-size:10px}.catnap-meta>span{white-space:nowrap}.catnap-story>summary,.catnap-journey>summary{min-height:26px;font-size:11px}.catnap-story,.catnap-journey{margin-top:4px;padding-top:3px}.catnap-selection:empty{display:none}.catnap-message{line-height:1.3}.catnap-card button.catnap-tile{border-radius:8px}.destination-badge{padding:3px 5px;margin-top:4px}.serve-drink{min-width:55px;max-width:68px;font-size:10px}.glass-capacity{font-size:9px}.catnap-controls label{min-height:28px}.catnap-header>button{min-height:32px}
@media(max-height:600px){.catnap-rules{font-size:10px}.catnap-controls button{min-height:32px}.catnap-message{font-size:10px}.catnap-story>summary,.catnap-journey>summary{min-height:22px}}

.board .tube-wrap{flex:0 0 60px;width:60px;min-width:0}.tube-number{font-size:9px;line-height:11px}.glass-capacity{font-size:8px;line-height:10px}.serve-drink{width:60px;min-width:0;max-width:60px;min-height:28px;line-height:1.15;padding:3px;font-size:9px}.destination-badge{max-width:60px;font-size:9px;line-height:11px}.play-area{justify-content:flex-start}.board{margin-top:auto;margin-bottom:auto}
@media(max-width:700px){.board{gap:10px 6px}.board .tube-wrap{flex-basis:46px;width:46px}.tube,.recipe-glass.tube{max-width:43px}.serve-drink{width:46px;max-width:46px;font-size:8px}.destination-badge{font-size:8px;padding:3px;max-width:46px}.rule-note{display:none}.puzzle-meta{font-size:9px;gap:3px;padding:3px 10px 0}.game-top{padding:4px 10px}.recipe-tools p{display:none}.recipe-tools{flex-wrap:nowrap}.recipe-layer{height:9px;font-size:8px}.catnap-meta{font-size:9px}}
@media(max-height:600px){.catnap-card .catnap-journey>summary,.catnap-card .catnap-story>summary{min-height:18px}.catwords-book>summary{min-height:24px}.catwords-save,.catwords-stats{font-size:9px!important}}

.board{display:flex;flex-wrap:wrap}

.recipe-tools p{display:none}.session-tools{gap:6px;line-height:1.25;margin:3px 0;min-height:28px}.session-tools #save-status{font-size:9px}.session-tools #speed{min-height:28px;padding:4px 8px;font-size:10px;white-space:nowrap}.catwords-card>p.catwords-save,.catwords-card>p.catwords-stats{margin:3px 0}
@media(max-height:650px){.rule-note{display:none}}

.game-top{line-height:1.25}.tiny-label{line-height:1.25}.level-picker{line-height:1.25}.progress-text{line-height:1.3;margin-bottom:4px}.tube-number{margin-top:2px;line-height:10px}.glass-capacity{margin-top:2px;line-height:9px}#message{min-height:0;line-height:1.2;margin:3px 0 0}.play-area{padding-top:7px;padding-bottom:3px}.recipe-tools{padding:3px 8px}.recipe-tools button{min-height:32px}.game-bottom{padding:3px 8px}.game-bottom .tool{min-height:32px}
@media(min-width:701px) and (max-height:650px){.game-card:has(.recipe-glass){display:grid;grid-template-columns:185px minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto auto}.game-card:has(.recipe-glass) .game-top{grid-column:1 / -1;grid-row:1}.game-card:has(.recipe-glass) .puzzle-meta{grid-column:1 / -1;grid-row:2}.game-card:has(.recipe-glass) .cafe-orders{grid-column:1;grid-row:3 / span 2;flex-direction:column;overflow-x:hidden;overflow-y:auto;align-items:stretch;padding:6px;min-height:0}.game-card:has(.recipe-glass) .cat-order{flex:0 0 auto;min-width:0}.game-card:has(.recipe-glass) .play-area{grid-column:2;grid-row:3}.game-card:has(.recipe-glass) .recipe-tools{grid-column:2;grid-row:4}.game-card:has(.recipe-glass) .game-bottom{grid-column:1 / -1;grid-row:5}.game-card:has(.win:not([hidden])){display:flex}}

.win h2{line-height:1.2}.win #win-copy{line-height:1.4}.win .result-share h3{line-height:1.3}.win .result-share p{line-height:1.4}
@media(max-width:700px){.win{display:grid;grid-template-columns:1fr 1fr;gap:5px;justify-items:center;padding:5px}.win[hidden]{display:none}.win h2,.win #win-copy,.win #pour-share{grid-column:1 / -1;margin:0}.win .primary,.win #daily-finish{margin:0;padding:8px;font-size:11px;min-height:38px;line-height:1.3}.win .primary:has(+ #daily-finish[hidden]){grid-column:1 / -1}.win .result-share{margin:4px 0 0}.win .result-share h3{font-size:17px}.win .result-share p{font-size:10px}.result-share button,.result-share select{min-height:36px;font-size:11px}.win .result-share-buttons{gap:5px}}

.catwords-card.completed>p:first-of-type,.catwords-card.completed .catclues-category,.catwords-card.completed .catclues-clue{display:none}
@media(max-width:700px) and (max-height:600px){.catnap-card .result-share-host:not([hidden]) .result-share>p:not(.result-share-feedback){display:none}.catnap-card:has(.result-share-host:not([hidden])) .catnap-rules{display:none}}

/* The title artwork supplies branding on the main menu. */
body.title-open header .brand{visibility:hidden;pointer-events:none}


/* The daily landing page is a single viewport, with no scrolling. */
.daily-launch{display:none}.daily-hub main{overflow:hidden;display:flex;align-items:center;justify-content:center}.daily-hub main> :not(#daily-launch){display:none!important}.daily-hub .daily-launch{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;width:min(760px,100%);max-height:100%;padding:8px}.daily-launch h1{font:36px Georgia,serif;margin:0}.daily-launch p{margin:0;font-size:14px;line-height:1.4}.daily-launch-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:12px;margin:8px 0}.daily-launch-choices button{min-height:96px;padding:14px;border:1px solid #bea48a;border-radius:18px;display:flex;flex-direction:column;justify-content:center;gap:8px;background:#fffaf1;font-size:17px}.daily-launch-choices small{font-size:13px}.daily-launch .primary{min-height:44px;margin:0;font-size:14px}.daily-launch .daily-launch-note{font-size:12px;max-width:520px}.daily-launch-progress{color:#536a50;font-weight:600}
@media(max-width:600px){.daily-launch h1{font-size:26px}.daily-launch-choices{grid-template-columns:1fr;gap:8px;margin:3px 0}.daily-launch-choices button{min-height:64px;padding:9px;gap:3px;font-size:15px}.daily-launch-choices small{font-size:12px}.daily-hub .daily-launch{gap:8px}.daily-launch p{font-size:12px}}
@media(max-height:460px) and (min-width:601px){.daily-hub .daily-launch{gap:5px}.daily-launch h1{font-size:26px}.daily-launch-choices button{min-height:70px;padding:8px}.daily-launch-choices{margin:3px 0}.daily-launch p{font-size:12px}}
