/* Snakes & Ladders: the on-screen die and the phone layout (on top of the shared ludo.css). */
.die-value.pips{width:58px;height:58px;padding:8px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:2px;place-items:center;background:linear-gradient(145deg,#fffdf6,#e9e1cc);border-radius:14px;box-shadow:0 6px 16px rgba(0,0,0,.45),inset 0 -3px 0 rgba(0,0,0,.08)}
.die-value.pips i{width:10px;height:10px;border-radius:50%;background:transparent}.die-value.pips i.on{background:#1b140d;box-shadow:inset 0 1px 1px rgba(255,255,255,.25)}
.die-value.rolling{animation:dieTumble .34s linear infinite}
.die-value.landed{animation:dieLand .45s cubic-bezier(.2,1.6,.4,1)}
@keyframes dieTumble{0%{transform:rotate(0) scale(1)}25%{transform:rotate(90deg) scale(.92) translateY(-4px)}50%{transform:rotate(180deg) scale(1)}75%{transform:rotate(270deg) scale(.92) translateY(-4px)}100%{transform:rotate(360deg) scale(1)}}
@keyframes dieLand{0%{transform:scale(1.35)}100%{transform:scale(1)}}
.call.roll{opacity:.9}
/* phones */
html,body{height:100dvh;overscroll-behavior:none}
#board{touch-action:none}
.roll{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.bar{padding:max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 8px max(10px,env(safe-area-inset-left))}
.dock{bottom:max(12px,env(safe-area-inset-bottom))}
@media (max-width:640px){
  .bar{gap:6px}.home{width:38px;height:38px;font-size:20px}.tools{gap:4px}.tools button{min-width:38px;height:38px;padding:0 8px;font-size:13px}
  .players{gap:4px}.pl{padding:4px 7px;font-size:12px}.pl b{max-width:9.5em;overflow:hidden;text-overflow:ellipsis}
  .dock{gap:6px;width:calc(100% - 20px)}#message{font-size:14px;padding:6px 12px}
  .roll-row{width:100%;justify-content:center}.roll{flex:1;max-width:320px;height:58px;font-size:18px}
  .commentary{top:auto!important;bottom:calc(150px + env(safe-area-inset-bottom));max-width:calc(100% - 20px)}
  .commentary .call{font-size:13px!important;padding:4px 12px!important}.commentary .call:nth-child(n+3){display:none}
}
/* phone held sideways: little height, so the bars get out of the way of the board */
@media (max-height:500px) and (orientation:landscape){
  .dock{left:auto;right:max(12px,env(safe-area-inset-right));transform:none;width:auto;max-width:250px;align-items:stretch;bottom:max(10px,env(safe-area-inset-bottom))}
  .roll-row{justify-content:flex-end}.roll{min-width:150px;height:52px}#message{font-size:13px}
  .commentary{top:auto!important;bottom:max(10px,env(safe-area-inset-bottom));left:max(12px,env(safe-area-inset-left))!important;transform:none!important;max-width:34%;align-items:flex-start!important}
  .commentary .call{font-size:13px!important;padding:4px 12px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  .pl span{display:none}
}
