/* ===== v96: the rules every screen follows (js/36t-ui.js explains them) ===== */
/* 2. words stay whole; a word longer than its line still breaks instead of running out of the box */
html,body{word-break:keep-all;overflow-wrap:anywhere;line-break:strict}
button,.btn,.rb,.pill,h1,h2,h3,#nav .t1,.poBubble,.tile .n,.plHead b,.lvRow b{text-wrap:balance}
#dlg .tx,.memoStory,p,.hint{text-wrap:pretty}
/* 3. a button is its words, centred, on at most two lines (the fitter makes them smaller before a third) */
.btn{line-height:1.2;text-align:center;min-width:0;max-width:100%}
.btn .pxe,.btn img,.btn svg{flex:none}
#bAct,#bAlt{line-height:1.15;text-align:center;padding:0 7px;box-sizing:border-box}
#bActTx,#bAltTx{display:block;max-width:100%}
/* 4. a bar of buttons: equal shares of the row; two rows when the words do not fit in one */
.poBtns,[data-bar]{display:grid;grid-template-columns:repeat(var(--bar-n,4),minmax(0,1fr));gap:8px;justify-content:stretch;align-items:stretch}
.poBtns{left:0;right:0;padding:0 12px;zoom:var(--ui);width:auto;max-width:calc(560px);margin:0 auto}
.poBtns .btn,[data-bar] .btn{flex-direction:column;gap:3px;padding:8px 6px;min-height:64px;font-size:16px;width:100%}
.poBtns .btn .pxe{width:24px;height:24px}
.uiBar2{grid-template-columns:repeat(var(--bar-n,2),minmax(0,1fr))}
.uiBar2 .btn{flex-direction:row;min-height:50px;gap:6px}
#dlg .choices{display:grid;grid-template-columns:repeat(var(--bar-n,2),minmax(0,1fr));gap:8px}
#dlg .choices .btn{width:100%;min-height:44px;padding:6px 10px;font-size:15px}
#dlg .choices.uiBar2{grid-template-columns:repeat(var(--bar-n,2),minmax(0,1fr))}
/* 5. one peanut counter: a screen that has its own does not get the floating one on top of it */
body:has(#wallet:not([hidden])) .poNut{display:none}
.poBubble{zoom:var(--ui);width:min(420px,calc((100vw - 28px)/var(--ui)));box-sizing:border-box}
/* no empty room inside a box: once the choices are up, the talk box is only as tall as its words and its buttons */
#dlg:has(.choices:not([hidden])) .tx{min-height:0}
#dlg:has(.choices:not([hidden])) .bar:not(:has(button:not([hidden]))){display:none}
#dlg .choices{margin-top:10px}
/* 1. one size: the screens that were drawn at their own size now follow --ui like everything else.
      (A screen that is a drawing surface or a game — pond, meteor, word blocks, the sewing studio — keeps its own
      fitting, because it measures its canvas itself.) */
#voteSheet,#phoneUI,#cafeShop,#starMap,#petShop,#songMaker,#flowerShop{zoom:var(--ui)}
.vtPanel{width:min(480px,100%)}
.csPanel{width:min(520px,100%);max-height:min(720px,100%)}
/* no empty room inside a box: a card is as tall as what is in it (up to the screen), not always full height */
#flowerShop .fsCard{height:auto;max-height:calc(100% - 4px)}
