/* responsive.css — Responsive cơ bản: điện thoại dọc, ngang, máy tính bảng */
/* v8: responsive điện thoại dọc / ngang */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
:root{padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
button,.item,.court{touch-action:manipulation}
.items .item{touch-action:none}
.owner{left:calc(12px + env(safe-area-inset-left,0px))}
.phone{right:calc(14px + env(safe-area-inset-right,0px))}
.sheet{padding-left:calc(14px + env(safe-area-inset-left,0px));padding-right:calc(14px + env(safe-area-inset-right,0px))}
.over{padding-left:calc(16px + env(safe-area-inset-left,0px))!important;padding-right:calc(16px + env(safe-area-inset-right,0px))!important}
header{flex-wrap:nowrap;min-width:0}
.pill{min-width:0}
.money{white-space:nowrap}

/* điện thoại nhỏ (dọc) */
@media (max-width:370px){
  .app{padding-left:8px;padding-right:8px}
  header{gap:5px}
  .clock{font-size:1.12rem;padding:2px 8px}
  .clock small{font-size:.66rem}
  .ib{width:34px;height:34px;border-radius:11px}
  .money{font-size:.92rem;padding:2px 8px}
  .sign div{font-size:1.1rem;padding:2px 12px}
  .courts{gap:10px 5px}
  .cnum{font-size:.72rem;padding:0 5px}
  .court small{font-size:.6rem}
  .tag{font-size:.58rem}
  .owner .me{width:70px;height:70px}
  .phone{width:52px;height:52px;font-size:1.45rem}
  .card h1{font-size:1.7rem}
  .prep-row .e{font-size:1.3rem;width:26px}
  .stepper button{width:30px;height:30px}
  .stepper span{min-width:28px}
  .sc-ui{width:92%}
}

/* điện thoại xoay ngang (màn thấp) */
@media (orientation:landscape) and (max-height:520px){
  .app{max-width:none;padding:0 calc(12px + env(safe-area-inset-right,0px)) 90px calc(12px + env(safe-area-inset-left,0px))}
  header{padding:6px 0}
  .clock{font-size:1.25rem}
  .sign{margin:0 0 8px}
  .sign div{font-size:1rem;padding:0 14px;box-shadow:0 3px 0 var(--ink)}
  .hall{padding:26px 10px 10px}
  .mini{max-width:62px}
  .desks{grid-template-columns:1fr 1fr}
  .owner .me{width:56px;height:56px;box-shadow:0 3px 0 var(--ink)}
  .owner .tagname{font-size:.6rem;left:4px}
  .owner .ob{margin-bottom:26px;max-width:220px;font-size:.8rem}
  .phone{width:48px;height:48px;font-size:1.35rem;border-radius:14px}
  .sheet{max-height:94%;max-width:860px;border-radius:18px 18px 0 0}
  .chat{max-height:26vh}
  .khay{min-height:70px;padding:8px 12px}
  .items{grid-template-columns:repeat(auto-fill,minmax(88px,1fr))}
  .tl-track{height:30px}.tl-lab{padding:5px 6px}
  .over{padding-top:60px!important}
  .over.prep{padding-top:110px!important}
  .card{max-width:560px}
  .card .hero{width:84px;height:84px;margin-top:-54px}
  .card h1{font-size:1.7rem}
  .toasts{top:calc(env(safe-area-inset-top,0px) + 50px)}
  /* màn hình mở đầu: chữ bên trái, bảng bên phải */
  .sc-title{left:calc(12px + env(safe-area-inset-left,0px));right:auto;width:52%;top:10px}
  .sc-title .w1{font-size:clamp(1.6rem,11vh,2.6rem)}
  .sc-title .w2{font-size:clamp(1.3rem,9vh,2.1rem)}
  .sc-time{left:auto;right:calc(16px + env(safe-area-inset-right,0px));transform:none;top:10px;animation:none}
  .sc-ui{left:auto;right:calc(16px + env(safe-area-inset-right,0px));top:50%;bottom:auto;transform:translateY(-50%);width:min(40%,330px);animation-name:scUpL}
  .sbtn{font-size:1.2rem}
  .guide .gcard{max-height:92%}
}
@keyframes scUpL{from{transform:translate(70px,-50%);opacity:0}}
/* ngang nhưng rộng (điện thoại lớn): 10 sân 1 hàng */
@media (orientation:landscape) and (max-height:520px) and (min-width:700px){
  .courts{grid-template-columns:repeat(10,1fr);gap:10px 6px}
}
/* máy tính bảng ngang */
@media (orientation:landscape) and (min-height:521px) and (min-width:1000px){
  .app{max-width:980px}
  .courts{grid-template-columns:repeat(10,1fr)}
}

.staffs[hidden]{display:none!important}
@media (orientation:landscape) and (max-height:520px){
  .scn-inner,.prep-bg .mk-in{max-width:none}
  .prep-sum{position:static}
}
