/* Room content flows vertically so the hand and controls cannot cover plays. */
.room-view{overflow-y:auto;overflow-x:hidden;min-height:600px}
.room-header{flex-shrink:0}
.table-wrap{display:flex;flex-direction:column;min-height:0;padding:10px 22px 5px;gap:0;background-image:none}
.table-topline{position:static;flex-shrink:0;min-height:20px;align-items:center}
.table-arena{position:relative;flex:1 0 auto;min-height:220px;background:radial-gradient(ellipse at 50% 55%,#376d5030,transparent 70%)}
.bottom-cards{top:6px}
.opponent{top:12px;width:130px;gap:6px}
.opponent.left{left:0}.opponent.right{right:0}
.seat-avatar-wrap{display:flex;align-items:center;gap:8px}
.seat-count{display:flex;align-items:baseline;gap:3px;padding:5px 9px;border-radius:9px;background:#123d30;color:#f6d58b;min-width:46px;justify-content:center}
.seat-count strong{font-size:24px;font-weight:750;font-variant-numeric:tabular-nums;line-height:1.1}
.seat-count small{font-size:10px;color:#a7bd97}
.opponent .seat-detail{font-size:10px}
.table-center{top:65px;max-width:50%;width:420px}
.table-center>p{margin:4px 0;font-size:12px;line-height:1.7}
.room-view[data-phase="waiting"] .table-center{top:70px}
.room-view[data-phase="waiting"] .table-center .waiting-title{font-size:22px}
.room-view[data-phase="waiting"] .table-center .waiting-code{font-size:27px;margin:9px 0}
.played-area{position:absolute;display:flex;flex-direction:column;align-items:center;gap:6px;width:40%;max-width:420px;--play-card-width:42px;--play-card-height:59px}
.played-left{left:0;top:125px}.played-right{right:0;top:125px}
.played-self{left:50%;bottom:8px;transform:translateX(-50%);width:65%;max-width:570px}
.played-label{font-size:10px;line-height:16px;color:#a5bd96;text-align:center;white-space:normal}
.played-area.latest .played-label{color:#f7d997}
.played-row{display:flex;justify-content:center;align-items:flex-end;width:100%;padding:0 5px}
.played-row .playing-card{width:var(--play-card-width);height:var(--play-card-height);padding:5px;font-size:15px;margin-left:-17px;border-radius:5px;box-shadow:0 2px 0 #afbea0}
.played-row .playing-card:first-child{margin-left:0}
.played-row .suit{font-size:14px}.played-row .large-suit{font-size:20px;right:4px;bottom:4px}
.played-row .joker{font-size:8px}.played-row .joker .suit{font-size:21px}
.played-pass{font-size:17px;font-weight:650;color:#d4dcb9;padding:3px 14px;border-radius:8px;background:#204d39}
.room-note{position:static;min-height:19px;flex-shrink:0;font-size:10px;padding:2px 0}
.self-meta{position:static;display:flex;flex-shrink:0;min-height:46px;gap:10px;padding:3px 0}
.self-card-count{margin-left:auto;font-size:13px;color:#f3d694;white-space:nowrap;background:#153e30;border-radius:7px;padding:7px 10px;font-variant-numeric:tabular-nums}
.self-meta .turn-clock{margin-left:0}.self-meta .chat-toggle{flex-shrink:0}
.action-bar{position:static;min-height:54px;flex-shrink:0;gap:9px;padding:4px 0}
.action-bar .clear-button{min-width:46px;padding-left:10px;padding-right:10px;font-size:11px}
.hand{position:static;display:flex;flex-direction:column;align-items:stretch;justify-content:center;flex-shrink:0;min-height:108px;height:auto;padding:0 6px;overflow-x:auto;overflow-y:hidden;touch-action:none;user-select:none;-webkit-user-select:none}
.hand-row{display:flex;align-items:flex-end;justify-content:safe center;min-height:106px;padding:18px 2px 4px;flex-shrink:0}
.hand .playing-card{margin-left:-23px;flex-shrink:0;touch-action:none}
.hand-row .playing-card:first-child{margin-left:0}
.hand .playing-card.selected{transform:translateY(-13px)}
.hand-tip{position:static;min-height:20px;padding:4px 0;flex-shrink:0;font-size:10px;line-height:1.4}
.room-view.finished .table-center{top:63px;max-width:50%;width:440px}
.room-view.finished .result-title{font-size:24px!important;margin:0 0 8px!important}
.room-view.finished .result-table{display:none}
.room-view.finished .hand .playing-card{cursor:default}
@media(max-width:760px){
  .table-wrap{padding:7px 14px 4px}
  .opponent{width:92px;top:11px;gap:5px}
  .seat-avatar-wrap{gap:5px}.opponent .avatar{width:38px;height:38px;font-size:20px}
  .seat-count{padding:4px 6px;min-width:39px;border-radius:7px}.seat-count strong{font-size:21px}.seat-count small{font-size:9px}
  .opponent-name{max-width:92px;font-size:11px}.opponent .seat-detail{font-size:9px}
  .table-center{top:62px;max-width:46%}.table-center>p{font-size:10px}
  .room-view[data-phase="waiting"] .table-center{top:82px;max-width:60%}.room-view[data-phase="waiting"] .table-center .waiting-title{font-size:19px}
  .played-area{--play-card-width:30px;--play-card-height:43px;width:44%;gap:5px}
  .played-left,.played-right{top:125px}.played-self{width:70%;bottom:7px}
  .played-row{padding:0 2px}.played-row .playing-card{margin-left:-14px;font-size:12px;padding:3px}
  .played-row .suit{font-size:11px}.played-row .large-suit{font-size:15px;bottom:3px;right:3px}
  .played-row .joker{font-size:6px;padding-top:5px}.played-row .joker .suit{font-size:17px;margin-top:2px}
  .played-label{font-size:9px;line-height:14px}.played-pass{font-size:15px}
  .self-meta{min-height:43px;gap:7px}.self-meta .avatar{width:33px;height:33px;font-size:18px}.self-meta strong{font-size:11px}.self-meta small{font-size:10px}
  .self-card-count{font-size:12px;padding:6px 8px}.self-meta .chat-toggle{width:31px;height:31px}.turn-clock{font-size:14px;min-width:34px;padding:6px}
  .action-bar{min-height:49px;gap:7px}.action-bar .button{min-width:67px;padding:11px 13px;font-size:12px;min-height:40px}.action-bar .clear-button{min-width:42px;padding:9px;font-size:10px}
  .hand-row{min-height:97px;padding-top:17px}.hand .playing-card{width:48px;height:75px;margin-left:-22px;font-size:17px;padding:5px}
  .hand-tip{font-size:9px;min-height:18px}.room-note{font-size:9px;min-height:18px}
  .room-view.finished .result-title{font-size:20px!important}.room-view.finished .result-score{font-size:12px}
}
@media(max-width:600px){
  .hand{min-height:91px}.hand.two-rows{min-height:174px}
  .hand-row{min-height:87px;padding-top:14px;padding-bottom:3px}
  .hand .playing-card{width:43px;height:70px;margin-left:-12px;font-size:16px;padding:4px}
  .hand .playing-card .suit{font-size:15px}.hand .playing-card .large-suit{font-size:22px;bottom:5px;right:4px}
  .hand .playing-card.joker{font-size:8px}.hand .playing-card.joker .suit{font-size:22px}
  .table-center .waiting-title{font-size:17px}.table-center .waiting-code{font-size:23px}
  .played-area{--play-card-width:28px;--play-card-height:41px}
  .played-row .playing-card{font-size:12px}.played-row .large-suit{font-size:14px}
  .played-self{width:66%}.self-meta>div{max-width:130px}.self-meta strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
@media(max-width:360px){
  .table-wrap{padding-left:9px;padding-right:9px}.hand{padding-left:0;padding-right:0}
  .hand .playing-card{width:40px;margin-left:-14px;padding:3px;font-size:15px}
  .self-card-count{font-size:10px;padding:6px}.self-meta>div{max-width:95px}
  .action-bar .button{min-width:61px;padding:10px;font-size:11px}.action-bar .clear-button{min-width:38px}
}
