#room-chat{box-sizing:border-box;width:min(520px,calc(100% - 24px));max-height:85dvh;padding:22px;border:1px solid #a882cf;border-radius:24px;background:#2b1c4d;color:#f2e9ff}#room-chat::backdrop{background:#130d24aa}.chat-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.chat-heading h2{margin:0;font-size:26px}.chat-heading small{color:#c3a8e3;font-size:12px}#close-chat{min-width:44px;min-height:44px;border:0;border-radius:12px;background:#ffffff12;color:white;font-size:28px}:is(#chat-messages,#quick-chat-messages){height: min(360px,42dvh);overflow-y:auto;overscroll-behavior:contain;margin:18px 0;padding:4px 8px;scrollbar-width:thin}:is(#chat-messages,#quick-chat-messages) article{padding:10px 12px;margin-bottom:9px;border-radius:14px;background:#ffffff09;overflow-wrap:anywhere}:is(#chat-messages,#quick-chat-messages) strong{font-size:13px;color:#b1f9df}:is(#chat-messages,#quick-chat-messages) time{margin-left:10px;font-size:10px;color:#c3a8e3}:is(#chat-messages,#quick-chat-messages) p{margin:5px 0 0;white-space:pre-wrap;font-size:14px;line-height:1.5}.chat-empty{color:#c3a8e3}.chat-compose{display:flex;gap:8px}.chat-compose input{min-width:0;flex:1;margin:0;font-size:16px}.chat-compose button{min-height:44px;padding:10px 16px}.chat-label{display:block;font-size:12px;margin-bottom:7px}#chat-status{font-size:12px;color:#ffdf7c;min-height:16px;margin:4px 0 8px}@media(max-width:720px){#room-chat{margin:auto auto 0;width:100%;max-width:100%;border-radius:24px 24px 0 0;padding:18px 14px max(18px,env(safe-area-inset-bottom))}.room-tools #open-chat{font-size:10px;min-width:52px}}
#chat-form .chat-compose input{width:0;flex:1 1 0;padding:12px}#chat-form .chat-compose button{width:auto;flex:0 0 auto;margin:0}
.avatar{position:relative}.avatar-chat-bubble{position:absolute;bottom:calc(100% + 9px);left:50%;transform:translateX(-50%);width:max-content;max-width:155px;max-height:88px;box-sizing:border-box;padding:8px 11px;border-radius:12px;background:#fff5d9;color:#302044;box-shadow:0 4px 18px #130d2455;font:600 12px/1.35 'Nunito',sans-serif;text-align:left;white-space:normal;overflow-wrap:anywhere;overflow:hidden;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;pointer-events:none;z-index:30}.seat:has(.avatar-chat-bubble){z-index:40}.seat.left .avatar-chat-bubble{left:0;transform:none}.seat.right .avatar-chat-bubble{left:auto;right:0;transform:none}#team-name-dialog{box-sizing:border-box;width:min(420px,calc(100% - 24px));border:1px solid #a882cf;background:#2b1c4d;color:#f2e9ff;border-radius:24px;padding:24px}#team-name-dialog h2{font-size:25px;margin:0 0 12px}#team-name-dialog p,#team-name-dialog label{font-size:13px}#team-name-dialog input{font-size:16px}.team-name-actions{display:flex;gap:10px}.team-name-actions button{flex:1}.team-score>span,.team-option-title strong{overflow-wrap:anywhere}.phone-team strong{max-width:130px;overflow:hidden;text-overflow:ellipsis}.room-tools{flex-wrap:wrap}@media(max-width:720px){.avatar-chat-bubble{max-width:128px;font-size:11px;max-height:78px;padding:7px 9px}.room-tools #rename-team{font-size:10px;min-height:38px}.room-heading{flex-wrap:wrap}.room-heading .room-tools{margin-left:auto}}

#quick-chat{margin:12px 0;padding:10px 12px;border:1px solid #a882cf55;border-radius:14px;background:#302155}#quick-chat label{display:block;font-size:11px;color:#d8c5e9;margin:0 0 6px}#quick-chat input{width:0;min-width:0;flex:1;margin:0;padding:10px;font-size:16px}#quick-chat button{width:auto;flex:0 0 auto;margin:0;min-height:42px;padding:8px 14px;font-size:12px}#quick-chat-status{display:block;color:#ffdf7c;font-size:11px;margin-top:3px}#quick-chat-status:empty{display:none}

#room-bottom-tools{display:flex;justify-content:center;align-items:center;gap:10px;margin:18px 0 4px;padding:14px 0 4px;border-top:1px solid #a882cf40}#room-bottom-tools button{min-height:44px;min-width:88px;border-radius:12px;font-size:12px;padding:10px 16px}#room-bottom-tools #leave{border:1px solid #a882cf55;color:#ebddfa}#room-bottom-tools #invite{font-size:12px}@media(max-width:720px){#room-bottom-tools{gap:8px;margin-top:12px}#room-bottom-tools button{flex:1;min-width:0;padding:10px 8px}#room-bottom-tools #invite{font-size:12px}}

.room-tools:empty{display:none}@media(max-width:420px){#room-bottom-tools{display:grid;grid-template-columns:1fr 1fr}#room-bottom-tools button{width:100%}}

#room-bottom-tools:empty,#desktop-room-social:empty{display:none}@media(min-width:721px){#room{max-width:1640px;margin:0 auto;padding:24px 3% 32px}.room-heading{gap:20px;align-items:center;margin-bottom:24px}.room-heading h2{margin:8px 0 0;font-size:26px}.room-heading .room-tools{display:flex;gap:8px;justify-content:flex-end}.room-tools button{min-height:42px;padding:10px 15px;font-size:12px;border-radius:12px;white-space:nowrap}.room-tools #leave{border:1px solid #a882cf55}.room-tools:empty{display:none}.play-area{min-width:0}.hand-dock{margin-top:34px}.table-trump{margin-bottom:36px}.activity{min-width:0}}@media(min-width:1200px){.game-layout{display:grid;grid-template-columns:190px minmax(440px,1fr) 260px;gap:24px;align-items:start}.activity{display:block;grid-column:auto}.play-area .table{max-width:700px;margin-left:35px;margin-right:35px}.table-drawer{margin-top:18px}.table-drawer>summary{display:none}#desktop-room-social #quick-chat{margin:0 0 16px;padding:16px}#desktop-room-social #quick-chat label{font-size:14px;font-weight:800;margin-bottom:12px}#desktop-room-social .voice-panel{margin:0;padding:16px}#desktop-room-social .voice-heading{flex-wrap:wrap}#desktop-room-social .voice-heading>div{min-width:140px}#desktop-room-social #voice-join{width:100%;justify-content:center;margin-top:8px}#desktop-room-social #voice-controls{gap:6px}#desktop-room-social #voice-controls button{flex:1}.table-drawer>.panel{margin-bottom:16px}.team-picker{margin-top:0}}

@media(min-width:1200px){#room{max-width:none;padding-left:24px;padding-right:24px}.game-layout{grid-template-columns:190px minmax(0,1fr) 260px;gap:24px}.play-area .table{width:calc(100% - 70px);max-width:none;margin-left:35px;margin-right:35px;height:clamp(320px,calc(100dvh - 560px),760px);border-radius:clamp(130px,12vw,230px)}.play-area .hand-dock{border-radius:20px}.play-area .table-trump{max-width:520px}}

.group-back{font-size:12px!important;min-height:42px;white-space:nowrap}@media(max-width:720px){header{height:auto!important;min-height:54px;gap:8px;flex-wrap:wrap;padding:8px 0}header>nav{justify-content:flex-end;flex-wrap:wrap;gap:5px}.friends-link{font-size:10px;max-width:none!important}.group-back{min-height:36px;font-size:10px!important}}

#quick-message-dialog[open]{display:flex;flex-direction:column;height:min(540px,calc(var(--game-height,100dvh) - 24px));overflow:hidden}#quick-message-dialog .chat-heading,#quick-message-dialog #quick-chat{flex:none}#quick-message-dialog #quick-chat-messages{flex:1;min-height:0;height:auto;margin:10px 0}#quick-message-dialog .chat-heading small{font-size:10px}
