/* V30.64 phone friendly layer + gold primary buttons (loaded last on every page) */
:root{--gold:#ffce72;--gold-d:#e8a317;--gold-ink:#121c2b}
/* ---- gold instead of green for primary actions ---- */
.btn.green,.sh-go,.hm-btns button.primary,.hm-st.on,.tb-bal button,.v10-gold{background:var(--gold)!important;color:var(--gold-ink)!important;box-shadow:0 4px 12px #e8a31744!important}
.sh-go[disabled]{background:#e4dccb!important;color:#8a7f69!important;box-shadow:none!important}
.hm-card.active{border-color:var(--gold-d)!important;background:#fffaf0!important}
.tb-bal button{font-weight:800}
/* ---- tap targets ---- */
.footer a:not(.brand){padding:11px 0;margin:0;min-height:44px;display:flex;align-items:center}
.footer a.brand-footer{display:inline-flex;min-height:44px;align-items:center}
.view-all{display:inline-flex;align-items:center;min-height:44px}
@media(max-width:760px){
  .container{padding-left:16px;padding-right:16px}
  img,video,iframe,table{max-width:100%}
  input,select,textarea{font-size:16px}  /* stops iOS zooming into fields */
  .footer-bottom{gap:6px}
}
/* ---- game screen (life.php) ---- */
@media(max-width:760px){
  .topbar{padding:5px 6px 5px 12px;gap:7px}
  .tb-mood b{display:none}
  .tb-bal b{font-size:14px}
  #tb-online #online-n+*{}
  .topbar #ib-sound-btn{margin-left:-2px}
  .side-cards{max-width:calc(100vw - 84px)}
  .qcard{max-width:100%}
  .qcard>div{min-width:0}.qcard b,.qcard small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:150px;display:block}
  .drawer{padding-bottom:max(12px,env(safe-area-inset-bottom))}
  .dock{bottom:max(8px,env(safe-area-inset-bottom))}
  .rbtns button{min-width:44px;min-height:44px}
}
@media(max-width:380px){
  .tb-bal{font-size:13px;padding:3px 3px 3px 9px;gap:6px}.tb-bal button{width:30px;height:30px;font-size:20px}
  .topbar{gap:6px;font-size:11px}
  .qcard b{max-width:110px}
  .rbtns{right:6px}
  .dock button small{font-size:11px}
}
@media(max-height:700px) and (max-width:760px){
  .rbtns{gap:7px;bottom:150px}.rbtns button{width:44px;height:44px}
  .side-cards{gap:5px}.qcard{padding:4px 12px 4px 6px}.qicon{width:30px;height:30px}.qcard small{display:none}
  .statbar{bottom:84px}.portrait{width:48px;height:48px}.bar{width:44px}
}
/* landscape phones: keep things compact */
@media(max-height:480px) and (orientation:landscape){
  .topbar{top:4px}.side-cards{top:48px}.rbtns{bottom:70px;gap:6px}.rbtns button{width:40px;height:40px}
  .statbar{bottom:70px;left:6px}.dock{width:min(420px,calc(100vw - 16px));left:50%;transform:translateX(-50%)}.dock button{padding:4px 6px}
  .drawer{top:50px;bottom:66px}
  .mp-sheet{max-height:86vh}
}
/* ---- map / home map ---- */
@media(max-width:560px){
  .mp-tools button,.mp-tools a{width:42px;height:42px;font-size:18px}
  .mp-tools{gap:6px;right:8px}
  .mp-dock{max-width:calc(100vw - 16px)}.mp-dock button{min-width:56px;padding:8px 8px}
  .mp-sheet{max-height:80vh;padding-left:14px;padding-right:14px}
  .mp-x{width:40px;height:40px;right:10px;top:10px}
  .sh-go,.sh-later{min-height:48px}
  .mp-pill .mp-sep:first-of-type{display:none}
  .pin i{width:32px;height:32px}
}
@media(max-width:600px){
  body.home-map.is-guest .mp-tools{top:182px;bottom:auto}
  body.home-map.is-member .mp-tools{top:236px;bottom:auto}
  body.home-map .bottom-panel{padding:12px 14px calc(12px + env(safe-area-inset-bottom));border-radius:20px;bottom:8px;width:min(450px,calc(100vw - 16px))}
  body.home-map .bp-row{gap:8px;margin-bottom:8px}
  body.home-map .avatars span{font-size:20px}
  body.home-map .bottom-buttons .btn{min-height:48px;padding:10px 12px}
  body.home-map .social a,body.home-map .social span{min-width:40px;min-height:40px}
  .mp-cats{max-width:calc(100vw - 16px)}
}
@media(max-height:640px) and (max-width:600px){
  body.home-map .avatars{display:none}
  body.home-map .bottom-panel .social{display:none}
}
/* ---- arcade ---- */
@media(max-width:420px){.rc-hud{flex-wrap:wrap}}
/* ---- notch / home-indicator safe areas ---- */

/* ---- V30.64 compact sizing: everything smaller on phones ---- */
@media(max-width:760px){
  /* game */
  .topbar{top:6px;padding:4px 5px 4px 10px;gap:6px;font-size:11px;border-radius:30px}
  .tb-bal{font-size:12px;padding:3px 3px 3px 9px;gap:6px}.tb-bal button{width:26px;height:26px;font-size:18px}
  .topbar #ib-sound-btn{width:28px!important;height:28px!important;font-size:14px!important}
  .side-cards{top:48px;left:6px;gap:5px}
  .qcard{padding:3px 11px 3px 4px;gap:7px}.qcard b{font-size:11.5px;max-width:120px}.qcard small{font-size:10px}.qicon{width:28px;height:28px;font-size:13px}
  .clean-btn{padding:6px 11px;font-size:11px}
  .rbtns{right:6px;bottom:128px;gap:6px}.rbtns button{width:38px;height:38px;min-width:38px;min-height:38px}.rbtns button svg{width:18px;height:18px}
  #social-btn{width:38px!important;height:38px!important;font-size:17px!important;top:50px!important;right:6px!important}
  .statbar{left:6px;bottom:72px}.portrait{width:44px;height:44px}.needs-pill{padding:5px 10px 5px 16px;gap:4px 9px}.bar{width:40px;height:6px}.nb i{font-size:12px}
  .dock{bottom:max(6px,env(safe-area-inset-bottom));padding:4px}.dock button{padding:5px 4px;border-radius:18px}.dock button small{font-size:10.5px}.dock button svg{width:20px;height:20px}
  .drawer{top:48px;bottom:68px}
  /* map + home map */
  .mp-top{top:max(6px,env(safe-area-inset-top))}
  .mp-back{padding:7px 10px;font-size:11px}.mp-pill{padding:5px 10px;font-size:11px;gap:6px}.mp-pill b{padding:3px 8px}
  .mp-tabs{top:calc(max(6px,env(safe-area-inset-top)) + 40px);padding:3px}.mp-tabs button{padding:6px 9px;font-size:11px}
  .mp-tools button,.mp-tools a{width:36px;height:36px;font-size:16px}.mp-tools{gap:5px;right:6px;top:calc(max(6px,env(safe-area-inset-top)) + 84px)}
  .pin i{width:26px;height:26px;font-size:14px;border-width:1.5px}.pin.poi i{width:24px;height:24px;font-size:13px}.pin span{font-size:10px;padding:2px 6px}
  .mp-dock{padding:4px;border-radius:20px}.mp-dock button{padding:5px 8px;min-width:50px;font-size:10.5px;border-radius:16px}
  .mp-sheet h2,.sh-head h2{font-size:17px}.sh-head .em{width:42px;height:42px;font-size:22px}.sh-mode{padding:7px 3px}.sh-go{font-size:15px;padding:11px}
  .mp-cats{padding:3px;gap:3px;top:calc(max(6px,env(safe-area-inset-top)) + 78px)}.mp-cats button{padding:5px 9px;font-size:11px}
  body.home-map .topbar{top:6px}
  body.home-map .mp-tabs{top:58px}
  body.home-map .mp-cats{top:96px}
  body.home-map.is-guest .mp-tools,body.home-map.is-member .mp-tools{top:136px}
  body.home-map.is-member .mp-top{top:56px}
  body.home-map.is-member .mp-tabs{top:100px}
  body.home-map.is-member .mp-cats{top:138px}
  body.home-map.is-member .mp-tools{top:178px}
  body.home-map .bottom-panel{padding:9px 12px calc(9px + env(safe-area-inset-bottom))}
  body.home-map .bottom-buttons .btn{min-height:42px;font-size:14px;padding:8px 10px}
  body.home-map .bp-row p{font-size:12px;margin:0}.bp-sub{font-size:11px}
  body.home-map .social a,body.home-map .social span{min-width:34px;min-height:34px;font-size:12px}
  /* content pages */
  html{font-size:15px}
  h1{font-size:clamp(26px,8vw,34px)!important}
}
@media(max-width:760px){
  body.home-map .topbar{height:42px;padding:3px 5px 3px 10px;gap:6px}
  body.home-map .topbar .brand{font-size:15px;gap:5px}body.home-map .topbar .brand svg,body.home-map .topbar .brand img{width:18px;height:18px}
  body.home-map .topbar .btn,body.home-map .topbar button,body.home-map .topbar a.btn{padding:6px 11px!important;font-size:12px!important;min-height:30px;border-radius:20px}
}

@media(max-width:760px){
  body.home-map .bottom-panel{bottom:calc(8px + env(safe-area-inset-bottom))}
  .dock{padding:3px!important;gap:0!important;border-radius:22px!important}
  .dock button{padding:4px 2px!important;gap:1px!important;border-radius:18px!important;font-size:16px!important;line-height:1.1}
  .dock button *{max-height:22px}.dock button small{font-size:10px!important}
  .statbar{bottom:60px}
  .rbtns{bottom:112px}
}
@media(max-width:380px){
  body.home-map .topbar .brand b{font-size:14px}body.home-map .topbar #my-home{padding:6px 9px!important}body.home-map .topbar .account{gap:4px}
  body.home-map .topbar .brand small{display:none}
}

/* players button lives in the header (only shown once logged in) */
.topbar #social-btn{position:relative!important;top:auto!important;right:auto!important;left:auto!important;width:34px!important;height:34px!important;font-size:16px!important;box-shadow:none!important;background:#f1f3f4!important;flex:none;z-index:auto}
.topbar #social-btn[hidden]{display:none!important}
.topbar #social-btn i{top:-5px!important;right:-5px!important;min-width:16px!important;height:16px!important;font-size:10px!important;line-height:16px!important;padding:0 4px!important}
@media(max-width:760px){.topbar #social-btn{width:28px!important;height:28px!important;font-size:14px!important}}
body:has(#drawer:not(.hidden)) .topbar #social-btn:not([hidden]){display:grid!important}
@media(max-width:760px){body #ib-sound-btn.in-bar,body #ib-sound-btn.in-row,body #ib-sound-btn.in-pill{width:28px!important;height:28px!important;font-size:14px!important}}
@media(max-width:380px){.topbar .tb-online{font-size:0}.topbar .tb-online b{font-size:12px}.topbar{gap:5px;padding-left:8px}.tb-bal b{font-size:12px}}
/* V30.64 gold accents for the remaining green buttons (need bars and online dot stay green: they signal status) */
#onb-next,#next-step.primary,.ed-save,.primary:not(.hm-btns *){background:var(--gold)!important;color:var(--gold-ink)!important;box-shadow:0 4px 12px #e8a31744!important}
#onb-progress i.on,.hv-spin{background:var(--gold-d)!important}
.hv-spin{background:none!important;border-top-color:var(--gold-d)!important}
.selected,.dream-option.selected,.sw.selected{border-color:var(--gold-d)!important}
.step,#step-name{color:#a8741a!important}

.sc-virt b{display:flex;flex-direction:column;line-height:1.15}.sc-vtag{font-weight:600;font-size:10.5px;color:#7a8799;margin-top:1px}

.dock button .dk-ic,.mp-dock button .dk-ic{width:30px;height:28px;object-fit:contain;display:block;pointer-events:none;margin:0 auto}@media(max-width:560px){.dock button .dk-ic,.mp-dock button .dk-ic{width:24px;height:22px}}

#ib-ver{position:fixed;right:8px;bottom:2px;z-index:3;font:600 10px system-ui,sans-serif;color:#42536a;opacity:.6;pointer-events:none;background:#ffffff99;border-radius:8px;padding:1px 6px}#ib-ver.old{opacity:1;color:#fff;background:#d33;pointer-events:auto}

/* V30.64 polish: bigger touch targets without changing the look */
@media(pointer:coarse){
  #ib-sound-btn,#social-btn,#add-funds,.topbar button{position:relative}
  #ib-sound-btn::after,#social-btn::after,#add-funds::after{content:"";position:absolute;inset:-7px;border-radius:inherit}
}
/* V30.64 polish: short landscape phones - declutter the home screen */
@media(max-height:430px) and (orientation:landscape){
  .side-cards{top:44px;left:6px;gap:4px}
  .side-cards .qcard{padding:3px;border-radius:22px}
  .side-cards .qcard>span:not(.qicon){display:none}
  .side-cards .qicon{width:32px;height:32px;font-size:15px}
  .clean-btn{display:none}
  #loc-pill{top:auto;bottom:62px;font-size:12px;padding:5px 6px 5px 12px}
  #loc-pill button{padding:6px 10px;font-size:12px}
  .needs-pill{grid-template-columns:repeat(4,auto);gap:4px 8px;padding:4px 10px 4px 16px}
  .rbtns{bottom:62px;gap:4px;flex-direction:row;right:6px}
  .cam-pad{flex-direction:row;gap:4px;margin:0}
  .cam-pad button,.rbtns button{width:36px;height:36px;font-size:16px}
}
/* V30.64 */
.topbar{margin-top:env(safe-area-inset-top,0px)}
.side-cards{margin-top:calc(env(safe-area-inset-top,0px) + 12px)}   /* V30.64: the left quick-action cards keep a clear gap under the top bar */
