#room-character-grid button{position:relative}
#room-character-grid .ranked-pick-badge{position:absolute;top:3px;right:3px;padding:2px 4px;border-radius:4px;background:#103f63;color:#fff1ab;font:900 8px/1.2 'Nunito Sans',sans-serif;letter-spacing:.3px;pointer-events:none}
#room-character-grid .ranked-pick-badge[hidden]{display:none}
#room-character-grid button.ranked-pick-taken:disabled{opacity:.65;filter:saturate(.55)}
.ranked-party .room-reveal-rule[data-team-pick-rule="true"]{color:#184d72;font-weight:800}

/* A disabled Ranked action must look unavailable, including the guest Ready button. */
#room-screen.ranked-party #room-primary-action:disabled{background:#b5c9d3;border-color:#d5e3e9;color:#4c6572;box-shadow:0 3px 0 #728b99;text-shadow:none;opacity:1;filter:none;cursor:not-allowed}
.arcade-room #room-screen.ranked-party .room-start{position:static}
#room-screen.ranked-party .room-reveal-rule{font-size:11px;line-height:1.35}
@media(min-height:521px){
 #room-screen.ranked-party .room-map-panel>.panel-heading{padding:4px 12px}
 #room-screen.ranked-party .room-map-panel>.panel-heading h2{font-size:16px;line-height:20px}
 #room-screen.ranked-party .room-map-copy{padding:4px 12px}
 #room-screen.ranked-party .room-map-copy>span{padding:0}
 #room-screen.ranked-party .room-map-copy strong{font-size:16px;line-height:20px}
 #room-screen.ranked-party .room-map-copy small{margin-top:2px;font-size:10px;line-height:13px}
 #room-screen.ranked-party .room-reveal-rule{margin:4px 8px 8px;padding:0}
}

@media(max-height:520px) and (min-width:650px){
 .arcade-room #room-screen.ranked-party:not(.matchmaking-open){height:calc(100dvh - 61px);min-height:0;padding:6px 8px;border-radius:16px;display:flex;flex-direction:column;gap:5px;overflow:hidden}
 #room-screen.ranked-party .room-heading{height:34px;min-height:34px;flex-wrap:nowrap;gap:10px;margin:0}
 #room-screen.ranked-party .room-heading>div:first-child{flex:1}
 #room-screen.ranked-party .room-kicker{font-size:7px;line-height:8px;letter-spacing:1px}
 #room-screen.ranked-party .room-heading h1{font-size:20px;line-height:22px;margin:0}
 #room-screen.ranked-party .room-code-badge{order:0;width:auto;padding:3px 8px;gap:7px;height:34px;box-sizing:border-box}
 #room-screen.ranked-party .room-code-badge small{font-size:7px;max-width:30px}
 #room-screen.ranked-party .room-code-badge strong{font-size:20px}
 #room-screen.ranked-party .room-code-badge button{min-width:32px;min-height:32px}
 #room-screen.ranked-party .room-back{height:34px;min-width:85px;padding:4px 8px;font-size:11px}
 .arcade-room #room-screen.ranked-party .room-body{flex:1;min-height:0;height:auto;overflow:visible;padding:0;display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto auto;gap:4px 8px;align-items:stretch}
 #room-screen.ranked-party .room-left{grid-column:1;grid-row:1;display:block;min-height:0;overflow:auto;overscroll-behavior:contain}
 #room-screen.ranked-party .room-right{display:contents}
 #room-screen.ranked-party .crew-panel{height:100%;min-height:0;display:flex;flex-direction:column}
 #room-screen.ranked-party .panel-heading{padding:3px 8px;min-height:22px;box-sizing:border-box}
 #room-screen.ranked-party .panel-heading h2{font-size:15px;line-height:18px}
 #room-screen.ranked-party .panel-heading span{font-size:10px}
 #room-screen.ranked-party #room-roster{padding:4px;gap:4px;flex:1;min-height:0;grid-template-rows:minmax(0,1fr)}
 .arcade-room #room-screen.ranked-party #room-roster .room-slot{height:100%;min-height:0;padding-bottom:2px;border-radius:8px}
 .arcade-room #room-screen.ranked-party #room-roster .slot-header{flex-basis:21px;padding:2px 3px}
 #room-screen.ranked-party #room-roster .slot-header b{width:16px;height:17px;line-height:17px;font-size:11px}
 #room-screen.ranked-party #room-roster .ready-badge{font-size:9px;letter-spacing:0}
 .arcade-room #room-screen.ranked-party #room-roster .slot-character{height:36px;min-height:20px;max-width:88%}
 .arcade-room #room-screen.ranked-party #room-roster .room-slot>strong{font-size:11px;line-height:17px;min-height:17px;flex-basis:17px;padding:0}
 .arcade-room #room-screen.ranked-party #room-roster .room-slot>small{font-size:9px;line-height:14px;min-height:14px;flex-basis:14px;padding:0;white-space:nowrap}
 .arcade-room #room-screen.ranked-party #room-roster .kick-player{top:24px;right:2px;min-height:32px;padding:0 4px;font-size:9px}
 #room-screen.ranked-party .crew-bottom{padding:2px 5px;gap:4px;flex-shrink:0}
 #room-screen.ranked-party .crew-bottom>span{font-size:10px;line-height:12px;max-width:none}
 #room-screen.ranked-party .crew-bottom button{min-height:32px;padding:3px 6px;font-size:10px;white-space:nowrap}
 #room-screen.ranked-party .chat-panel{margin-top:6px;min-height:170px}
 #room-screen.ranked-party .character-panel{grid-column:2;grid-row:1;display:grid;grid-template-columns:minmax(0,1fr) 108px;grid-template-rows:33px minmax(88px,1fr) 20px;position:relative;overflow:visible;border-radius:12px;min-height:0}
 #room-screen.ranked-party .selected-character{grid-column:1;grid-row:1;height:33px;padding:1px 6px;gap:4px}
 #room-screen.ranked-party .selected-character small{font-size:7px;line-height:9px;letter-spacing:.5px}
 #room-screen.ranked-party .selected-character h2{font-size:19px;line-height:19px;margin:0}
 #room-screen.ranked-party .selected-character p{display:none}
 #room-screen.ranked-party .selected-character>img{width:32px;height:33px}
 #room-screen.ranked-party #room-character-grid{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(44px,1fr));gap:4px;padding:3px 5px;min-height:0}
 #room-screen.ranked-party #room-character-grid button{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:2px;min-width:32px;min-height:44px;padding:2px;border-radius:7px}
 #room-screen.ranked-party #room-character-grid button img{width:30px;height:36px;min-width:0;object-fit:contain}
 #room-screen.ranked-party #room-character-grid button .creature-name{font-size:11px;line-height:12px}
 #room-screen.ranked-party #room-character-grid .ranked-pick-badge{top:0;right:0;padding:1px 3px;font-size:7px}
 #room-screen.ranked-party .room-kit-disclosure{grid-column:2;grid-row:1;border:0;align-self:center}
 #room-screen.ranked-party #room-kit-toggle{width:104px;min-height:32px;height:32px;padding:3px;font-size:11px;line-height:13px;margin:0}
 #room-screen.ranked-party #room-kit-detail:not(.hidden){position:absolute;z-index:50;right:2px;top:33px;width:min(380px,80vw);max-height:205px;overflow:auto;background:#f1fbff;border:2px solid #448aaa;border-radius:10px;box-shadow:0 6px 20px #082d6655}
 #room-screen.ranked-party .room-team-status{grid-column:1/-1;grid-row:3;padding:1px 6px;min-height:0;gap:4px}
 #room-screen.ranked-party .room-team-status>b{font-size:10px}
 #room-screen.ranked-party .room-team-status span{width:16px;height:16px;line-height:16px;font-size:9px}
 #room-screen.ranked-party .room-map-panel{grid-column:1/-1;grid-row:2;display:flex;align-items:center;gap:8px;padding:3px 7px;border-radius:8px;min-width:0}
 #room-screen.ranked-party .room-map-panel>.panel-heading{display:none}
 #room-screen.ranked-party .room-map-copy{padding:0;flex:0 0 80px}
 #room-screen.ranked-party .room-map-copy>span{padding:0}
 #room-screen.ranked-party .room-map-copy strong{font-size:12px;line-height:14px}
 #room-screen.ranked-party .room-map-copy small{display:none}
 #room-screen.ranked-party .room-reveal-rule{font-size:11px;line-height:13px;padding:0;margin:0;flex:1;color:#184d72}
 .arcade-room #room-screen.ranked-party .room-start{grid-column:1/-1;grid-row:3;position:static;display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:2px 10px;padding:3px 8px;min-height:50px;margin:0;box-sizing:border-box;border-radius:10px}
 .arcade-room #room-screen.ranked-party .room-start #room-hint{font-size:11px;line-height:13px;margin:0;text-align:left}
 .arcade-room #room-screen.ranked-party .room-start .start-battle{width:150px;height:44px;min-height:44px;font-size:19px;padding:3px 8px}
 .arcade-room #room-screen.ranked-party .room-start #room-status{grid-column:1;grid-row:2;font-size:10px;line-height:12px;margin:0}
 .arcade-room #room-screen.ranked-party .room-start .start-battle{grid-column:2;grid-row:1/3}
 #room-screen.ranked-party #matchmaking-screen{grid-template-rows:38px minmax(0,1fr) 25px minmax(0,1fr) auto;padding:7px 15px;gap:3px}
 #room-screen.ranked-party #matchmaking-screen footer{width:100%;gap:12px;justify-content:center;min-height:44px}
 #room-screen.ranked-party .matching-tip{font-size:11px;line-height:14px;margin:0;max-width:440px}
 #room-screen.ranked-party .matching-cancel{min-height:44px;min-width:112px;padding:6px 12px;font-size:11px;flex-shrink:0}
}
