/* Fixed slots: changing text, room, category or rewards never reflows the board. */
.safe-area-probe{position:fixed;visibility:hidden;pointer-events:none;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
@media(max-width:899px){
 html,body{width:100%;height:100%;margin:0;overflow:hidden;overscroll-behavior:none;}
 .game{position:fixed;left:var(--board-x,50%);top:var(--board-y,50%);transform:translate(-50%,-50%) scale(var(--board-scale,1));transform-origin:center;width:360px;height:640px;min-height:0;max-width:none;margin:0;padding:8px;border:0;box-sizing:border-box;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:36px 34px minmax(0,1fr) 84px 48px 48px 36px 62px;gap:4px;overflow:hidden;}
 .game>*{min-width:0;min-height:0;}
 .heading{grid-column:1/-1;grid-row:1;margin:0;gap:5px;}
 .heading h1{font-size:15px;letter-spacing:0;margin:0;white-space:nowrap;}
 .heading h1 .title-pet{display:inline;margin-left:0;}
 #clock{font-size:9px;padding:3px 5px;border-width:1px;}
 .heading .round{width:34px;height:34px;flex-shrink:0;}
 .rooms{grid-column:1/-1;grid-row:2;margin:0;padding:0;gap:3px;}
 .rooms button{min-height:0;height:34px;padding:3px 0;font-size:11px;}
 .stage{grid-column:1/-1;grid-row:3;height:100%;min-height:0;margin:0;border-width:3px;border-radius:8px;}
 .stage .actor-blade{width:174px;}.stage .actor-baby{width:123px;}
 .stage .room-note{top:6px;left:6px;padding:4px 6px;}
 .stage .room-note span{font-size:9px;}
 .status.panel{grid-column:1/-1;grid-row:4;display:flex;align-content:center;gap:4px 6px;height:84px;min-height:0;margin:0;padding:5px 7px;border-radius:8px;}
 .status-top{gap:4px;}.status-top strong{font-size:11px;max-width:70px;}
 #attributes{font-size:9px;padding:2px 3px;}
 .status .bonds{flex:1;gap:5px;}.status .bonds>span{font-size:9px;}.status .bonds b{font-size:10px;margin:0 2px;}.status .bonds small{display:none;}
 .status .coin{font-size:10px;padding:2px 5px;margin-left:auto;border-width:1px;}
 .status .meters{gap:5px;width:100%;}.status .meter{gap:2px;}.status .meter label{font-size:9px;}.status .meter .track{margin:0;height:7px;}.status .meter b{width:16px;font-size:9px;}
 .speech.panel{grid-column:1/-1;grid-row:5;height:48px;min-height:0;margin:0;padding:5px 6px;border-width:6px;gap:6px;align-items:center;overflow-y:auto;overscroll-behavior:contain;}
 .speech .speaker{font-size:11px;}.speech p{font-size:11px;line-height:1.5;}
 .next-step{grid-column:1/3;grid-row:6;margin:0;padding:4px 7px;height:48px;border-radius:7px;gap:3px;overflow:hidden;}
 .next-step strong{font-size:11px;line-height:1.4;}.next-step small{font-size:9px;line-height:1.3;margin-top:2px;}
 .together-row{grid-column:3/5;grid-row:6;margin:0;gap:4px;height:48px;}
 .together-row button{min-height:0;height:48px;border-radius:7px;}
 .together-row #together{display:flex;justify-content:center;padding:3px;gap:0;}
 .together-row #together>.pixel-icon,.together-row #together b{display:none;}
 .together-row strong{font-size:12px;letter-spacing:0;white-space:nowrap;}
 .together-row #passball{width:56px;padding:2px;}.together-row #passball .pixel-icon{width:23px;height:23px;}.together-row #passball small{font-size:9px;}
 .poster-strip,.poster-strip[data-new="true"]{position:absolute;z-index:6;top:92px;right:17px;width:143px;height:28px;min-height:0;margin:0;padding:4px 6px;border:1px solid #b79560;border-radius:5px;background:#fff1d8ed;color:#634c32;font-size:10px;}
 .poster-strip b{font-size:9px;}
 .life-tabs{grid-column:1/-1;grid-row:7;margin:0;}.life-tabs button{min-height:0;height:36px;padding:4px 0;font-size:11px;}
 .feature-grid{grid-column:1/-1;grid-row:8;height:62px;margin:0;padding:3px;gap:4px;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:52px;overflow-y:auto;overscroll-behavior:contain;}
 .feature-grid button{min-height:0;height:52px;font-size:11px;padding:2px 0;border-radius:6px;line-height:1.3;}
 .feature-grid button .pixel-icon{width:24px;height:24px;margin:0 auto;}
 .feature-grid .feature-reason,.feature-grid .target-room{display:none;}
 .feedback{position:absolute;z-index:8;bottom:313px;left:20px;right:20px;padding:5px 7px;max-height:37px;overflow-y:auto;border:1px solid #bda375;border-radius:5px;background:#fff7e9ed;color:#694d32;font-size:10px;line-height:1.3;pointer-events:none;}
 .overlay{position:fixed;inset:0;width:100%;height:100%;padding:0;display:block;overflow:hidden;}
 .dialog{position:absolute;left:var(--board-x,50%);top:var(--board-y,50%);transform:translate(-50%,-50%) scale(var(--board-scale,1));transform-origin:center;width:344px;height:616px;min-height:0;max-height:none;max-width:none;margin:0;animation:none;}
 .dialog-head{padding:12px 14px;height:76px;box-sizing:border-box;}.dialog h2{font-size:19px;}
 #dialog-body{padding:16px;flex:1;}.dialog .cg-preview{max-height:220px;}
 .dialog .spoken-line{font-size:18px;}.dialog button.story-choice{min-height:58px;font-size:14px;}.dialog .recipe-card{min-height:82px;}
}

#growth-open{font-size:10px;padding:3px 5px;background:#f8d698;color:#503721;border:1px solid #a98450;border-radius:4px;white-space:nowrap;}

.status .weight-row{order:6;display:flex;align-items:center;justify-content:space-between;width:100%;min-width:0;padding:3px 5px;background:#f7e6be;border:1px solid #d6ba82;border-radius:5px;font-size:10px;line-height:1.3;color:#684d35;white-space:nowrap;}
#baby-weight{font-size:12px;font-variant-numeric:tabular-nums;color:#713d25;}
#weight-forms{display:flex;margin:0 0 0 4px;padding:0;list-style:none;}
#weight-forms li{padding:2px 4px;border:1px solid transparent;border-radius:3px;}
#weight-forms li[aria-current="step"]{background:#794b2f;border-color:#6b3c22;color:#fff8e8;font-weight:700;}

/* Landscape keeps readable text and intentional vertical scrolling. */
@media(max-width:899px) and (orientation:landscape){
 html,body{height:auto;min-height:100%;overflow:auto;overscroll-behavior:auto;}
 .game{position:relative;left:auto;top:auto;transform:none;margin:12px auto;width:360px;height:640px;}
 .dialog{left:50%;top:50%;transform:translate(-50%,-50%);width:calc(100vw - 24px);max-width:640px;height:calc(100dvh - 24px);}
 .dialog-head{height:64px;flex-shrink:0;}.dialog h2{font-size:20px;}
}

.dialog[data-kind=card] #dialog-body{padding:10px;}.dialog[data-kind=card] canvas{display:block;border-radius:10px;}.dialog[data-kind=card] .choice{min-height:44px;margin-top:8px;}
