/* ===== v92: phone first (js/36m-phone.js) =====
   Peanut is played on a phone, by children of four to ten. This sheet comes after main.css and settles everything
   a small screen and a small hand need: the page never zooms or slides away, nothing is drawn off the edge,
   buttons are big enough to hit, choices come one step at a time, and long lists turn pages instead of scrolling. */

/* ---------- the page stays put ---------- */
html{height:100%;overflow:hidden;overscroll-behavior:none;-webkit-text-size-adjust:100%;text-size-adjust:100%;touch-action:pan-x pan-y}
body{position:fixed;inset:0;width:100%;height:auto;overflow:hidden;overscroll-behavior:none;touch-action:pan-x pan-y;-webkit-touch-callout:none}
img,canvas,svg{-webkit-user-drag:none;-webkit-touch-callout:none}
button,[role=button],.chip,.tile,.heroCard{touch-action:manipulation}
/* iOS zooms the whole page into any field whose letters are smaller than 16px — and never zooms back out */
input,textarea,select{font-size:16px!important}
:root{--kb:0px}
/* a sheet with a field in it stays above the on-screen keyboard */
#sheetWrap,#heroMake,#pnAcc,#petAdopt,#pearlStyle,#phoneUI,#songMaker,#voteSheet{padding-bottom:var(--kb)!important;box-sizing:border-box}

/* ---------- playing: bigger buttons, a finger instead of a key ---------- */
.rb{width:54px;height:54px}
#side{gap:9px;right:10px}
#acts{right:12px;bottom:calc(16px + env(safe-area-inset-bottom,0px));gap:10px}
#bAct{width:88px;height:88px;font-size:16px}
#bJump{width:62px;height:62px}
#bAlt{width:70px;height:70px;font-size:14px}
#bBuddy{width:62px;height:62px}
#joy{width:124px;height:124px;margin:-62px 0 0 -62px;z-index:4}
#joy i{width:52px;height:52px;margin:-26px 0 0 -26px}
.prompt{pointer-events:auto;cursor:pointer;font-size:16px;padding:6px 14px 6px 6px;gap:8px;touch-action:manipulation}
.prompt .k{position:relative;width:26px;height:26px;background:var(--nut)}
.prompt .k::before{content:"";width:9px;height:9px;border-radius:50%;background:#fff}
.prompt .k::after{content:"";position:absolute;inset:-5px;border-radius:50%;border:2px solid var(--nut);animation:tapPulse 1.2s ease-out infinite}
@keyframes tapPulse{from{transform:scale(.7);opacity:.9}to{transform:scale(1.25);opacity:0}}
.tapRing{position:absolute;width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 2px rgba(75,52,40,.55),inset 0 0 0 2px rgba(75,52,40,.35);pointer-events:none;animation:tapRing .65s ease-out forwards}
@keyframes tapRing{from{transform:scale(.25);opacity:1}to{transform:scale(1.15);opacity:0}}
@media (prefers-reduced-motion:reduce){.prompt .k::after{animation:none;opacity:0}}

/* ---------- words that float over the planet never run off the screen or under the side buttons ---------- */
#toast{left:12px;right:74px;margin:0 auto;width:fit-content;max-width:none;transform:translateY(-8px);white-space:normal;text-align:center;word-break:keep-all;overflow-wrap:anywhere;line-height:1.3;border-radius:22px;padding:9px 16px;z-index:45;text-wrap:balance}
#toast.show{transform:none}
#psTut{left:12px;right:74px;margin:0 auto;width:fit-content;max-width:none;transform:none;top:calc(env(safe-area-inset-top,0px) + 78px);border-radius:22px;padding:8px 10px 8px 14px;gap:8px;text-align:left;animation:psBobY 1.6s ease-in-out infinite}
#psTut small{white-space:nowrap}#psTut b{font-weight:400;word-break:keep-all;min-width:0}
#psTut span{white-space:nowrap;font:14px var(--disp);padding:8px 12px;flex:none}
@keyframes psBobY{50%{transform:translateY(-3px)}}
#nav{max-width:min(calc(100vw - 96px),360px)}
#nav .t1{white-space:normal;word-break:keep-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
#dlg{bottom:calc(120px + env(safe-area-inset-bottom,0px));padding:20px 18px 12px}
#dlg .tx{font-size:18px;line-height:1.55;word-break:keep-all}
#dlg .choices .btn,#dlgChoices button{min-height:52px;font-size:16px}
#placeUI{width:min(420px,calc((100vw - 24px)/var(--ui)));max-width:none;padding:10px 12px 12px;gap:8px;justify-items:stretch;text-align:center}
#placeUI .plHead{display:grid;gap:2px;justify-items:center}
#placeUI .row{flex-wrap:nowrap;gap:8px}
#placeUI .row .btn{flex:1;min-height:52px!important;font-size:16px!important;padding:6px 8px!important;white-space:nowrap;box-shadow:0 3px 0 var(--cocoa)}
#placeUI #plOk{flex:1.6}

/* ---------- buttons and sheets ---------- */
.btn{min-height:50px;font-size:16px}
.btn.sm{min-height:40px;font-size:14px;padding:6px 14px}
.x{width:46px;height:46px;font-size:18px;flex:none}
.chips.pick .chip{min-height:42px;padding:8px 14px;font-size:15px;display:inline-flex;align-items:center}
.seg button{min-height:48px;font-size:15px}
.sheet,.hmCard{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
/* the buttons at the foot of a sheet are always in sight, however long the sheet is */
.sheet .foot{position:sticky;bottom:calc(-18px - env(safe-area-inset-bottom,0px));z-index:2;background:var(--paper);margin:14px -18px calc(-18px - env(safe-area-inset-bottom,0px));padding:10px 18px calc(14px + env(safe-area-inset-bottom,0px));border-top:2px dashed var(--line)}
.tile{min-height:44px}

/* ---------- choosing one thing at a time (rowSteps / the hero maker) ---------- */
.rsNav{display:flex;align-items:center;gap:8px;margin-top:10px}
.rsNav .rsMid{flex:1;min-width:0;text-align:center;display:grid;gap:2px}
.rsNav .rsLabel{font:19px var(--disp);font-weight:400;word-break:keep-all}
.rsNav .rsCount{font:12px var(--body);color:var(--soft);font-variant-numeric:tabular-nums}
.rsBtn{flex:none;width:54px;height:54px;border-radius:18px;border:2px solid var(--cocoa);background:var(--cream);color:var(--cocoa);font:22px var(--disp);cursor:pointer;box-shadow:0 3px 0 var(--cocoa);display:grid;place-items:center;padding:0;touch-action:manipulation}
.rsBtn:active{transform:translateY(2px);box-shadow:0 1px 0 var(--cocoa)}
.rsBtn:disabled{opacity:.28;box-shadow:none}
.rowSteps .optRow{display:none;margin-top:8px}
.rowSteps .optRow.rsOn:not([hidden]){display:grid;min-height:var(--rs-h,212px);align-content:center}
.rowSteps .optRow>span{display:none}
.rowSteps .sw{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;justify-items:center}
.rowSteps .sw button{width:100%;max-width:46px;height:auto;aspect-ratio:1}
.rowSteps .sw:has(button.tx){grid-template-columns:repeat(3,1fr);gap:8px;justify-items:stretch}
.rowSteps .sw button.tx{width:auto;max-width:none;aspect-ratio:auto;height:auto;min-height:48px;padding:6px 4px;font-size:15px;border-radius:16px;word-break:keep-all;line-height:1.15}

/* ---------- 새 주인공: a wizard that fits one screen ---------- */
#heroMake .hmCard{display:flex;flex-direction:column;overflow:hidden;height:calc((100dvh - 16px - var(--kb))/var(--ui));max-height:calc(720px/var(--ui));padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))}
#heroMake .shHead{position:static;margin:0 0 6px;padding:0;flex:none}
#hmBody{flex:1;min-height:0;display:flex;flex-direction:column}
.hmWiz{flex:1;min-height:0;display:flex;flex-direction:column;gap:8px}
.hmBar{flex:none;height:10px;border:2px solid var(--cocoa);border-radius:999px;background:var(--cream);overflow:hidden}
.hmBar i{display:block;height:100%;width:0;background:var(--mint);transition:width .25s}
.hmWiz .hmPv{flex:0 1 230px;min-height:96px;width:auto;align-self:center;aspect-ratio:5/7;border-radius:20px}
.hmWiz .hmPv canvas{width:auto;height:100%;max-width:100%}
.hmWiz .hmPv .dice{width:48px;height:48px;font-size:22px;right:-22px;bottom:6px;box-shadow:0 3px 0 var(--cocoa)}
.hmStep{flex:1 0 auto;display:grid;gap:8px;align-content:center;min-height:212px}
.hmStep[hidden]{display:none}
.hmStep h3{margin:0;font:22px var(--disp);font-weight:400;text-align:center;word-break:keep-all}
.hmStep .hmSub{margin:0;font:13px/1.45 var(--body);color:var(--soft);text-align:center;word-break:keep-all}
#hmName{font:24px var(--disp)!important;text-align:center;padding:12px;border:2.5px dashed var(--nut);border-radius:18px;background:var(--cream);color:var(--cocoa);width:100%;box-sizing:border-box}
#hmName:focus{outline:none;border-style:solid}
.hmLook{--rs-h:156px;align-content:start}.hmLook .optRow.rsOn:not([hidden]){margin-top:0}
.hmFoot{flex:none;display:flex;gap:10px;align-items:stretch}
.hmFoot .btn{flex:1;min-height:58px;font-size:19px}
.hmFoot .rsBtn{width:58px;height:58px}
.hmFoot .rsBtn[hidden]{display:none}
#hmDel{flex:none;justify-self:center;min-height:40px;font-size:14px}
/* birthday: three wheels with big arrows */
.bdPick{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:10px}
.bdCol{display:grid;justify-items:center;gap:4px}
.bdCol button{width:100%;height:46px;border-radius:14px;border:2px solid var(--cocoa);background:var(--cream);color:var(--cocoa);font:18px var(--disp);cursor:pointer;box-shadow:0 3px 0 var(--cocoa);touch-action:manipulation;padding:0}
.bdCol button:active{transform:translateY(2px);box-shadow:0 1px 0 var(--cocoa)}
.bdCol b{font:30px var(--disp);font-weight:400;font-variant-numeric:tabular-nums;line-height:1.1}
.bdCol b small{font:14px var(--disp);color:var(--soft);margin-left:2px}

/* ---------- 누구의 행성으로: big cards, no sideways scrolling ---------- */
#start{padding-bottom:calc(5vh + env(safe-area-inset-bottom,0px));gap:10px}
#start p{font-size:14px;line-height:1.5;word-break:keep-all}
.heroCard{width:128px;padding:12px 8px}
.heroCard canvas{width:70px;height:98px}
.heroCard .ed{width:36px;height:36px;font-size:16px;right:2px;top:2px}
.heroCard.add{min-height:170px}

/* ---------- 건설 모드: one tidy strip at the bottom ---------- */
#bldUI,#homeUI{width:min(560px,calc((100vw - 12px)/var(--ui)));padding:8px;gap:6px;bottom:calc(6px + env(safe-area-inset-bottom,0px));zoom:var(--ui)}
#bldTools{display:grid;grid-template-columns:repeat(4,1.2fr) repeat(3,1fr);gap:4px}
.bldT{min-width:0;min-height:56px;padding:5px 1px;justify-content:center;gap:2px;font:12px var(--disp);border-radius:14px;touch-action:manipulation;white-space:nowrap}
.bldT .emo,.bldT img{width:24px;height:24px}
.bldT[data-x]{background:var(--paper);font-size:11px}
.bldT[data-x=close]{background:#ffe9e4;border-color:#f0b8ae}
#bldTabs{gap:6px}#bldTabs button{flex:1;min-height:42px;font-size:15px;padding:4px 6px}
.bldIt{width:auto;flex:1 1 0;min-width:84px;max-width:120px;min-height:84px;padding:8px 4px;touch-action:manipulation}
.bldIt .e{font-size:26px}.bldIt .e img{width:30px;height:30px}.bldIt b{font-size:14px;word-break:keep-all}.bldIt small{font-size:12px}
#bldList,#homeList{justify-content:center;padding-bottom:2px}
.bldFoot{gap:6px 8px;flex-wrap:nowrap;align-items:center;min-height:30px}
#bldHint{min-width:0;font:14px/1.3 var(--disp);word-break:keep-all}
#bldMats{flex:none;white-space:nowrap}
#bldTurn{display:flex;gap:6px;flex:none}#bldTurn .btn{min-height:44px;min-width:48px;font-size:20px;padding:0 8px}
/* while a thing is being put down, only its own card shows: name, why not, and three big buttons */
body.building:has(#placeUI:not([hidden])) #bldUI{display:none}
body.building #placeUI{top:auto!important;bottom:calc(10px + env(safe-area-inset-bottom,0px))!important}
body.building .prompt{display:none!important}
#homeMove{width:min(420px,calc((100vw - 24px)/var(--ui)));box-sizing:border-box}
.homeMvBtn{width:50px;height:50px}

/* ---------- page-turning lists (js/36k-steps.js): arrows a thumb can hit ---------- */
.stepBtn{width:46px;min-height:60px;font-size:20px;touch-action:manipulation}
.stepDots{font-size:12px}

/* ---------- nothing wider than the screen ---------- */
#top{left:10px;right:10px}
#brand{max-width:calc(100vw - 20px);box-sizing:border-box;flex-wrap:wrap}
#pills{max-width:calc(100vw - 24px)}
.sheet,.hmCard,.polaroid,#pnAcc .pnCard{max-width:calc(100vw/var(--ui))}

/* ---------- a long sheet becomes tabs (sheetTabs) ---------- */
.shTabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px}
.shTabs button{flex:1 1 auto;min-height:46px;padding:6px 12px;border:2px solid var(--line);border-radius:16px;background:var(--cream);color:var(--cocoa);font:15px var(--disp);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:5px;word-break:keep-all;touch-action:manipulation}
.shTabs button.on{background:var(--nut);border-color:var(--cocoa);color:#fff;box-shadow:0 2px 0 var(--cocoa)}
.shTabs .pxe{width:20px;height:20px}
.shOff{display:none!important}
.shTabbed>.section{margin-top:0;border-top:0;padding-top:0}
.shTabbed>.section>h3{display:none}
/* the tutorial card and the way-finding pill never sit on top of an open sheet */
#psTut{z-index:6}
/* 전화번호 등록 */
.phEdit .hmTop{position:static;display:block;border:0;padding:0;margin:0;background:none}
.phEdit[data-tab="0"] :is(.hmPv,.phClips,.rsNav,.optRow),.phEdit[data-tab="1"] :is(.hmPv,.fld,.rsNav,.optRow),.phEdit[data-tab="2"] :is(.fld,.phClips){display:none!important}
.phEdit[data-tab="2"] .hmPv{margin:0 auto;width:132px;height:176px}
.phEdit .phClips{gap:10px}.phEdit .phClip{display:flex;align-items:center;gap:8px}.phEdit .phClip .btn{min-height:50px;font-size:16px}
.phEdit .foot{position:sticky;bottom:0;background:var(--paper);padding:10px 0 2px;margin-top:10px}
.phEdit{--rs-h:190px}

/* ---------- small things made big enough for a small finger ---------- */
.vtX{width:46px;height:46px;font-size:18px;flex:none}
.dice{width:44px!important;height:44px!important;font-size:20px!important}
.stCol{width:36px;height:36px}
.csTabs{overflow:visible;gap:4px}.csTabs button{min-width:0;min-height:52px}
#cafeShop .btn.sm,.csGrid .btn.sm{min-height:40px;padding:4px 12px;font-size:14px}
#petShop .psBtn{min-height:42px;padding:6px 16px;font-size:15px}
#petShop .psGrid{grid-template-columns:repeat(2,1fr)}
#petShop .psBody{overflow:hidden}
.fsTabs button{min-height:46px}
.fsBody{overscroll-behavior:contain}
.lgLink{min-height:40px}
.pn{width:50px;height:50px}
.mailRow{min-height:52px}
.tgl{min-height:40px}.tgl input[type=checkbox]{width:24px;height:24px;flex:none;accent-color:#c98b52}
/* 기타로 노래 만들기: fits one screen */
#songMaker{padding:6px}
#songMaker .smCard{padding:8px 10px 10px;gap:6px;max-height:100%}
.stepWrap .fsGrid{grid-template-columns:repeat(3,minmax(0,1fr))}
.fsChips button{min-height:40px;padding:4px 14px;font-size:14px}
#songMaker .smCard{overflow-x:hidden}#songMaker .smTip{display:none}
#songMaker .smBar .btn{min-height:44px;padding:6px 12px;font-size:14px}
/* answers in a conversation: two tidy columns of big buttons */
#dlg .choices{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#dlg .choices .btn{white-space:normal;word-break:keep-all;line-height:1.2;padding:6px 10px}
#dlg .choices .btn:last-child:nth-child(odd){grid-column:1/-1}
#psTut{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:10px;row-gap:0;align-items:center}
#psTut small{grid-column:1;grid-row:1}#psTut b{grid-column:1;grid-row:2}#psTut span{grid-column:2;grid-row:1/3}
/* 창작물 보내기: ① 오리기 ② 말해 주기 */
.steps span{padding:8px 0;font-size:14px}
.crSay{display:grid;gap:10px;justify-items:stretch}
.crSay .pvBox{justify-self:center;width:132px;height:168px}
.sayOpt{min-height:56px;justify-content:center}.sayOpt .sayT{font-size:18px}
.drop{padding:36px 16px;font-size:18px}
.crSay:has(#qTextBox:not([hidden])) .pvBox{width:80px;height:102px}
.crSay:has(#qTextBox:not([hidden])) .pvBox .cap{display:none}
/* 조개 거울 · 기타로 노래 만들기 on a short phone */
#pearlStyle .psCard{--rs-h:150px}
#pearlStyle .psCard>.stack{overflow-x:hidden}
#pearlStyle .hmPv{width:104px}#pearlStyle .hmPv canvas{width:96px;height:134px}
#songMaker button:not(.smC):not(.x){min-height:40px}
@media (max-height:680px){.smC{aspect-ratio:1.3}#songMaker .smTop input{padding:6px 10px}}
/* 토리의 건설 의뢰 · 보호자 계정 */
.lvRow{min-height:56px;box-sizing:border-box}.lvRow .btn.sm{min-height:44px;font-size:15px;white-space:nowrap}
.lvSheet .stepWrap.grid>.stepList{flex-wrap:nowrap}
#pnAcc{overflow-x:hidden}
#pearlStyle .hmTop>.stack{min-width:0}#pearlStyle .hmTop .btn{white-space:normal;line-height:1.2}
/* ---------- a phone held sideways: the picture on the left, the question on the right ---------- */
@media (orientation:landscape) and (max-height:540px){
  .hmWiz{display:grid;grid-template-columns:minmax(120px,26%) 1fr;grid-template-rows:auto 1fr auto;column-gap:14px;row-gap:6px}
  .hmWiz .hmBar{grid-column:1/-1}
  .hmWiz .hmPv{grid-column:1;grid-row:2/4;align-self:center;justify-self:center;height:auto;max-height:100%;width:100%;max-width:170px}
  .hmWiz .hmStep{grid-column:2;grid-row:2;min-height:0}
  .hmWiz .hmFoot{grid-column:2;grid-row:3}
  .hmStep h3{font-size:18px}.hmLook{--rs-h:0px}
  .hmStep .hmSub{display:none}
  .rowSteps .sw:has(button.tx){grid-template-columns:repeat(4,1fr)}
  .rowSteps .sw button.tx{min-height:42px;font-size:14px}
  .bdCol button{height:38px}.bdCol b{font-size:24px}
  .hmFoot .btn,.hmFoot .rsBtn{min-height:48px;height:48px}
  #heroMake .shHead h2{font-size:18px}#heroMake .shHead{margin-bottom:2px}
  #side{grid-auto-flow:column;grid-template-rows:repeat(4,auto);direction:rtl}
  #dlg{bottom:calc(14px + env(safe-area-inset-bottom,0px));width:min(520px,calc((100vw - 250px)/var(--ui)))}
  #start{justify-content:center;padding-bottom:16px}#start p{display:none}#start h1{font-size:48px}
}
@media (orientation:landscape) and (max-height:540px){
  #start .sub{display:none}.heroCard{padding:8px}.heroCard canvas{width:48px;height:67px}.heroCard.add{min-height:128px}.heroWait{height:120px}
}

/* ===== v93: the build view — the whole screen is the map (js/36g-builder.js) ===== */
body.building #side,body.building #top,body.building #psTut,body.building #pills,body.building #busy{display:none!important}
#bldBar{position:fixed;left:10px;right:10px;top:calc(8px + env(safe-area-inset-top,0px));z-index:9;display:flex;align-items:center;gap:8px;pointer-events:none;zoom:var(--ui)}
#bldBar[hidden],#bldZoom[hidden]{display:none}
#bldBar>*{pointer-events:auto}
#bldBar b{font:18px var(--disp);font-weight:400;padding:8px 14px;border-radius:999px;display:flex;align-items:center;gap:6px;white-space:nowrap}
#bldBar .pxe{width:20px;height:20px}
#bldMats{flex:0 1 auto;min-width:0;margin-right:auto;padding:8px 12px;border-radius:999px;font:14px var(--disp);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#bldMats .pxe{width:16px;height:16px;vertical-align:-3px}
#bldX{width:52px;height:52px;font-size:22px;background:var(--paper);box-shadow:0 3px 0 var(--cocoa)}
#bldZoom{position:fixed;right:10px;top:calc(76px + env(safe-area-inset-top,0px));z-index:9;display:grid;gap:8px;zoom:var(--ui)}
#bldZoom .rb{font:26px/1 var(--disp);color:var(--cocoa)}#bldZoom .pxe{width:26px;height:26px}
/* the strip at the bottom: what to do (three big tools), what to build, and one line that says what to tap next */
#bldTools{grid-template-columns:repeat(3,1.3fr) 1fr}
.bldT{min-height:58px;font-size:13px}
.bldT .emo,.bldT img{width:26px;height:26px}
.bldFoot{min-height:26px;justify-content:center;text-align:center}
#bldHint{flex:1;font-size:15px}
body.building #toast{top:calc(72px + env(safe-area-inset-top,0px));right:74px}
body.building .hmStep{min-height:0}
#placeUI #plRot{flex:.8}
body.building #wallet,body.building #nutHud{display:none!important}

/* ===== v94 ===== */
/* turning with a slider, like straightening a photo: a ruler of little marks and a big thumb */
.rotS{display:flex;align-items:center;gap:10px;width:100%;box-sizing:border-box;padding:2px 4px}
.rotS[hidden]{display:none}
.rotS .rotIc{font:20px var(--disp);color:var(--nut-d);flex:none}
.rotS .rotV{flex:none;min-width:46px;text-align:right;font:16px var(--disp);font-weight:400;font-variant-numeric:tabular-nums;color:var(--cocoa)}
.rotS input[type=range]{-webkit-appearance:none;appearance:none;flex:1;min-width:0;height:44px;margin:0;background:transparent;touch-action:pan-y;cursor:pointer}
.rotS input[type=range]::-webkit-slider-runnable-track{height:22px;border-radius:6px;background:repeating-linear-gradient(90deg,var(--soft) 0 2px,transparent 2px 12px) center/100% 10px no-repeat,linear-gradient(90deg,transparent calc(50% - 1.5px),var(--cocoa) calc(50% - 1.5px) calc(50% + 1.5px),transparent calc(50% + 1.5px)),var(--cream);border:2px solid var(--line)}
.rotS input[type=range]::-moz-range-track{height:22px;border-radius:6px;background:var(--cream);border:2px solid var(--line)}
.rotS input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:30px;height:40px;margin-top:-11px;border-radius:12px;background:var(--nut);border:2.5px solid var(--cocoa);box-shadow:0 3px 0 var(--cocoa)}
.rotS input[type=range]::-moz-range-thumb{width:28px;height:36px;border-radius:12px;background:var(--nut);border:2.5px solid var(--cocoa)}
#plRot{display:none!important}
#bldTurn{display:flex}#bldTurn[hidden]{display:none}
/* putting a thing down indoors: the same card as outside (js/36o-room-build.js, 36h-home.js) */
#homeMove,#rbCard{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(10px + env(safe-area-inset-bottom,0px));z-index:9;width:min(420px,calc((100vw - 24px)/var(--ui)));box-sizing:border-box;display:grid;gap:8px;justify-items:stretch;padding:10px 12px 12px;text-align:center;border-radius:18px;zoom:var(--ui);font:15px var(--disp);color:var(--cocoa)}
#homeMove[hidden],#rbCard[hidden]{display:none}
#homeMove .plHead,#rbCard .plHead{display:grid;gap:2px;justify-items:center}
#homeMove .plHead b,#rbCard .plHead b{font-weight:400;font-size:17px}
#homeMove .plHead small,#rbCard .plHead small,#placeUI .plHead small{font:13px var(--body);color:var(--warn);min-height:0}
#homeMove .plHead small:empty,#rbCard .plHead small:empty,#placeUI .plHead small:empty{display:none}
#homeMove .row,#rbCard .row{flex-wrap:nowrap;gap:8px}
#homeMove .row .btn,#rbCard .row .btn{flex:1;min-height:52px;font-size:16px;white-space:nowrap}
#homeMove #hmOk2,#rbCard #rbOk{flex:1.6}
body.roomBuild #homeUI{bottom:calc(6px + env(safe-area-inset-bottom,0px))}
body.roomBuild:has(#homeMove:not([hidden])) #homeUI{display:none}
body.building #cafeCancel,body.building #cafeEditBar,body.building #cafeHud{display:none!important}
.homeMvRow{display:none!important}
/* the first-steps card: a small progress bar while someone is talking; the step and its button only when nobody is */
#psTut .psBar{grid-column:1;grid-row:2;display:block;height:8px;border-radius:999px;background:var(--cream);border:1.5px solid var(--cocoa);overflow:hidden;min-width:90px;margin:2px 0}
#psTut .psBar u{display:block;height:100%;background:var(--mint);text-decoration:none}
#psTut b{grid-row:3}#psTut span{grid-row:1/4}
#psTut.mini{pointer-events:none;animation:none;box-shadow:0 2px 0 var(--line);padding:6px 14px;margin:0;right:auto;left:12px;top:calc(env(safe-area-inset-top,0px) + 10px);display:grid;grid-template-columns:auto;opacity:.92}
#psTut.mini small{font-size:12px}
body.talking #nav{opacity:0;pointer-events:none}
/* sending a creation: the photo being cut and, beside it, what will be left */
.crCut{display:flex;gap:10px;align-items:stretch}
.crCut .cropWrap{flex:1;min-width:0}
.crCut .pvBox{flex:none;width:96px;height:auto;min-height:124px;align-self:center}
.crCut .pvBox canvas{width:100%;height:auto}
#crPvB .pvBox{margin:0 auto;width:132px;height:168px}
.crSay:has(#qTextBox:not([hidden])) #crPvB .pvBox{width:80px;height:102px}
.crCut .pvBox .cap{font-size:10.5px;white-space:nowrap;left:4px;top:4px;padding:1px 6px}

/* ===== v95 ===== */
/* 토리의 건설 의뢰: what can be bought looks like it can; only what cannot (yet) is faded */
.lvRow{opacity:1}
.lvRow.poor,.lvRow.lock{opacity:.6}
.lvRow.can{border-color:var(--nut-d);background:#fffaf0;box-shadow:0 2px 0 var(--nut-d)}
.lvRow .lvT small{word-break:keep-all;line-height:1.3}
.lvRow .lvT b{word-break:keep-all}
/* a list one column wide keeps its whole width: ◀ 1 / 3 ▶ sits underneath (js/36k-steps.js) */
.stepWrap.col{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px 10px;padding-bottom:0}
.stepWrap.col>.stepList{grid-column:1/-1;grid-row:1}
.stepWrap.col>.stepBtn{grid-row:2;width:72px;min-height:46px}
.stepWrap.col>.stepBtn.prev{grid-column:1;justify-self:end}
.stepWrap.col>.stepBtn.next{grid-column:3;justify-self:start}
.stepWrap.col>.stepDots{position:static;transform:none;grid-row:2;grid-column:2;font-size:15px;min-width:44px;text-align:center}
/* one font: letters that were drawn a little too wide for their boxes get room */
#brand .wx,.tile .s,.heroCard .ha,.bldIt small,.fld small{letter-spacing:0}
.btn,.chip,.bldIt b,.bldT span,.tile .n{word-break:keep-all}
.bldIt b{font-size:13px;line-height:1.15}

/* ===== v96: one pill — way-finding first, a quiet suggestion when there is none (js/36p-suggest.js) ===== */
#psTut{display:none!important}   /* the first-steps card is the first suggestion in the pill */
#nav{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;column-gap:10px;row-gap:0;padding:7px 14px 7px 8px;border-radius:24px;flex-wrap:nowrap;text-align:left}
#nav>div{min-width:0;display:grid;gap:1px}
#nav .ar{width:36px;height:36px;background:var(--mint)}
#nav .t1{font-size:16px;line-height:1.2}
#nav .t1 .pxe{width:18px;height:18px;vertical-align:-3px}
#nav .t2{font-size:12px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#nav .t2[hidden]{display:none}
#nav.off{opacity:1}#nav.off .ar{background:var(--nut-l)}#nav.off #navAr{opacity:.45}
#navPic{grid-column:2;margin:2px 0 0;flex-basis:auto}
/* a suggestion: softer than an errand, and with nowhere to point it shows a lamp instead of an arrow */
#nav.sug{border-style:dashed}
#nav.sug .t2{color:var(--nut-d)}
#nav.sug #navPic{display:none}
#nav.noway .ar{background:var(--nut-l)}#nav.noway #navAr{display:none}
#nav.noway .ar::before{content:"";width:20px;height:20px;background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 2.2a5.6 5.6 0 0 0-3.3 10.1c.5.4.8 1 .8 1.6h5c0-.6.3-1.2.8-1.6A5.6 5.6 0 0 0 10 2.2z' fill='%23ffd35c' stroke='%234b3428' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M7.8 16.4h4.4M8.6 18.3h2.8' stroke='%234b3428' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E")}
@keyframes navIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
#nav.sug:not([hidden]){animation:navIn .5s ease-out}
@media (prefers-reduced-motion:reduce){#nav.sug:not([hidden]){animation:none}}
body.sheetOpen #nav{visibility:hidden}

/* how many peanuts there are: in the top right corner, clear of the way-finding pill */
#wallet{left:auto;right:10px;transform:none}
#nav{max-width:min(calc((100vw - 20px)/var(--ui) - 76px),340px)}   /* v96: everything left of the side buttons; the counter steps aside by itself (38-hud-layout.js) */
#bAct.none{visibility:hidden;pointer-events:none}
