/* Desktop cooperation preparation has its own grid; short windows keep the
   action visible instead of inheriting the phone's small sidebar and offsets. */
#stage-select.coop-selection.stage-desktop {
  display:grid;grid-template-columns:clamp(230px,24vw,300px) minmax(0,1fr);
  grid-template-rows:32px minmax(0,1fr) 20px;gap:16px 24px;
  padding:84px max(24px,calc((100vw - 1320px)/2)) 18px;
  align-items:stretch;justify-items:stretch;justify-content:normal;overflow:auto;
}
#stage-select.coop-selection.stage-desktop .stage-eyebrow {
  position:static;display:block;grid-column:1/-1;grid-row:1;align-self:center;
  margin:0;font-size:14px;letter-spacing:3px;text-align:center;
}
#stage-select.coop-selection.stage-desktop .coop-invite-panel {
  position:static;transform:none;grid-column:1;grid-row:2;align-self:stretch;
  width:auto;max-width:none;height:100%;min-height:0;margin:0;padding:20px;
  display:flex;flex-direction:column;gap:16px;overflow:auto;border-radius:18px;
  background:linear-gradient(145deg,#17384ee8,#102337f5);
}
#stage-select.coop-selection.stage-desktop .coop-role-cards {display:grid;grid-template-columns:1fr 1fr;gap:10px}
#stage-select.coop-selection.stage-desktop .coop-role-card {padding:10px 6px!important;gap:10px;border-radius:12px}
#stage-select.coop-selection.stage-desktop .coop-role-card img {width:100%;height:clamp(120px,23vh,220px);object-fit:contain}
#stage-select.coop-selection.stage-desktop .coop-role-card strong {font-size:16px}
#stage-select.coop-selection.stage-desktop .coop-role-card svg {width:22px;height:22px}
#stage-select.coop-selection.stage-desktop .coop-invite-panel>button {min-height:44px;padding:10px 12px;font-size:15px}
#stage-select.coop-selection.stage-desktop .coop-invite-panel p {font-size:14px;line-height:1.65;margin:0}
#stage-select.coop-selection.stage-desktop #coop-test-enter {margin-top:auto}
#stage-select.coop-selection.stage-desktop .stage-carousel {
  grid-column:2;grid-row:2;align-self:stretch;display:grid;
  grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:14px;
  margin:0;width:100%;max-width:none;height:100%;min-height:0;
}
#stage-select.coop-selection.stage-desktop .stage-mode-wrap {
  display:flex;flex-direction:column;align-items:stretch;gap:12px;
  margin:0;width:100%;max-width:none;height:100%;min-height:0;
}
#stage-select.coop-selection.stage-desktop .stage-card {
  flex:1 1 0;width:100%;max-width:none;height:auto;min-height:0;max-height:none;border-radius:18px;
}
#stage-select.coop-selection.stage-desktop .stage-content {
  height:100%;min-height:0;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto auto auto;
  gap:10px;padding:clamp(70px,12vh,150px) 28px 18px;
}
#stage-select.coop-selection.stage-desktop .stage-content>p {font-size:15px;line-height:1.6;margin:0}
#stage-select.coop-selection.stage-desktop .stage-content>p:first-child {font-size:13px}
#stage-select.coop-selection.stage-desktop .stage-content h2 {font-size:clamp(25px,2.4vw,36px);line-height:1.25;margin:0}
#stage-select.coop-selection.stage-desktop #stage-facts {font-size:14px;line-height:1.55;margin:0}
#stage-select.coop-selection.stage-desktop #stage-play {min-height:48px;font-size:17px}
#stage-select.coop-selection.stage-desktop #stage-lock-hint {font-size:12px;line-height:1.5;margin:0}
#stage-select.coop-selection.stage-desktop .stage-card>.map-name {left:28px;top:18px}
#stage-select.coop-selection.stage-desktop .stage-number {font-size:86px;right:20px;top:14px}
#stage-select.coop-selection.stage-desktop .round-mode-controls {flex-direction:row;justify-content:center;gap:16px;margin:0}
#stage-select.coop-selection.stage-desktop .round-mode-controls button {width:62px;height:62px;min-height:62px;font-size:14px}
#stage-select.coop-selection.stage-desktop #stage-counter {grid-column:2;grid-row:3;align-self:center;justify-self:center;margin:0;font-size:14px}
#stage-select.coop-selection.stage-desktop .stage-preparation {top:14px;right:max(24px,calc((100vw - 1320px)/2));gap:12px}
#stage-select.coop-selection.stage-desktop .stage-preparation>button {width:60px;min-height:60px;padding:7px 4px;font-size:13px}
#stage-select.coop-selection.stage-desktop .stage-preparation>span {font-size:14px}
@media(max-height:620px) {
  #stage-select.coop-selection.stage-desktop {padding-top:76px;grid-template-rows:22px minmax(0,1fr) 18px;gap:8px 20px;padding-bottom:10px}
  #stage-select.coop-selection.stage-desktop .stage-eyebrow {font-size:13px;letter-spacing:2px}
  #stage-select.coop-selection.stage-desktop .coop-invite-panel {padding:14px;gap:10px}
  #stage-select.coop-selection.stage-desktop .coop-role-card img {height:100px}
  #stage-select.coop-selection.stage-desktop .stage-content {padding:42px 20px 12px;gap:5px}
  #stage-select.coop-selection.stage-desktop .stage-content h2 {font-size:25px}
  #stage-select.coop-selection.stage-desktop .stage-content>p,#stage-select.coop-selection.stage-desktop #stage-facts {font-size:14px;line-height:1.4}
  #stage-select.coop-selection.stage-desktop #stage-play {min-height:42px;font-size:16px}
  #stage-select.coop-selection.stage-desktop .stage-number {font-size:54px;top:6px}
  #stage-select.coop-selection.stage-desktop .stage-card>.map-name {top:10px;left:20px}
  #stage-select.coop-selection.stage-desktop .round-mode-controls button {width:48px;height:48px;min-height:48px;font-size:12px}
}

/* v100: wide, shorter desktop cards; handset selectors are untouched. */
#stage-select.coop-selection.stage-desktop {grid-template-columns:220px minmax(0,1fr);grid-template-rows:24px minmax(240px,350px) 20px;align-content:center;padding-top:86px;padding-bottom:26px;gap:14px 22px}
#stage-select.coop-selection.stage-desktop .coop-invite-panel {height:270px;max-height:100%;align-self:center;padding:12px;gap:9px}
#stage-select.coop-selection.stage-desktop .coop-role-card {padding:5px!important;gap:4px}
#stage-select.coop-selection.stage-desktop .coop-role-card img {height:86px;width:100%;object-fit:contain;object-position:center bottom}
#stage-select.coop-selection.stage-desktop .coop-role-card strong {font-size:14px}
#stage-select.coop-selection.stage-desktop .coop-role-card svg {height:17px;width:17px}
#stage-select.coop-selection.stage-desktop .coop-invite-panel>button {min-height:34px;padding:5px 8px;font-size:14px}
#stage-select.coop-selection.stage-desktop .coop-invite-panel p {font-size:12px;line-height:1.4}
#stage-select.coop-selection.stage-desktop .stage-mode-wrap {flex-direction:row;gap:14px}
#stage-select.coop-selection.stage-desktop .round-mode-controls {flex-direction:column}
#stage-select.coop-selection.stage-desktop .stage-content {padding:54px 24px 14px;gap:6px}
#stage-select.coop-selection.stage-desktop .stage-content h2 {font-size:28px}
#stage-select.coop-selection.stage-desktop .stage-number {font-size:64px;top:8px}
@media(max-height:560px){
 #stage-select.coop-selection.stage-desktop {grid-template-rows:18px minmax(220px,280px) 16px;gap:7px 18px;padding-top:74px;padding-bottom:10px}
 #stage-select.coop-selection.stage-desktop .coop-invite-panel {height:240px;gap:6px;padding:9px}
 #stage-select.coop-selection.stage-desktop .coop-role-card img {height:64px}
 #stage-select.coop-selection.stage-desktop .stage-content {padding-top:38px;gap:4px}
 #stage-select.coop-selection.stage-desktop .stage-content h2 {font-size:24px}
}
/* The original-map stage card follows the same desktop-only landscape shape. */
#stage-select.stage-desktop:not(.coop-selection){grid-template-rows:24px minmax(230px,350px) 20px;align-content:center;padding-top:86px;padding-bottom:26px;gap:14px}
#stage-select.stage-desktop:not(.coop-selection) .stage-carousel{width:min(100%,1100px);height:100%;margin:0}
#stage-select.stage-desktop:not(.coop-selection) .stage-mode-wrap{flex-direction:row;gap:14px}
#stage-select.stage-desktop:not(.coop-selection) .stage-content{padding:54px 26px 14px;gap:6px}
#stage-select.stage-desktop:not(.coop-selection) .stage-content h2{font-size:28px;margin:0}
#stage-select.stage-desktop:not(.coop-selection) .stage-content>p{margin:0;line-height:1.5}
#stage-select.stage-desktop:not(.coop-selection) .round-mode-controls{flex-direction:column}
@media(max-height:560px){#stage-select.stage-desktop:not(.coop-selection){grid-template-rows:18px minmax(210px,280px) 16px;padding-top:74px;padding-bottom:10px;gap:7px}#stage-select.stage-desktop:not(.coop-selection) .stage-content{padding:38px 24px 10px;gap:4px}}

/* v106: do not squeeze four Chinese characters into the old 48px circle. */
#stage-select.stage-desktop .round-mode-controls button,#stage-select.coop-selection.stage-desktop .round-mode-controls button{box-sizing:border-box;flex:0 0 auto;width:86px;height:72px;min-width:86px;min-height:72px;padding:8px 6px;border-radius:18px;font-size:14px;line-height:1.45;letter-spacing:0;white-space:normal;overflow-wrap:normal;display:flex;align-items:center;justify-content:center;text-align:center}
@media(max-height:620px){#stage-select.stage-desktop .round-mode-controls button,#stage-select.coop-selection.stage-desktop .round-mode-controls button{width:80px;min-width:80px;height:62px;min-height:62px;font-size:13px;padding:6px}}

/* V114: legacy cards use symmetric arrows; mode buttons do not offset the image. */
#stage-select.stage-desktop:not(.coop-selection){display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;justify-content:center;align-content:center}
#stage-select.stage-desktop:not(.coop-selection) .stage-carousel{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:14px;width:min(850px,calc(100vw - 240px));justify-self:center;align-items:center;margin:0 auto}
#stage-select.stage-desktop:not(.coop-selection) .stage-mode-wrap{position:relative;display:block;width:100%;height:100%;min-width:0}
#stage-select.stage-desktop:not(.coop-selection) .stage-card{width:100%;height:100%;min-height:0;margin:0}
#stage-select.stage-desktop:not(.coop-selection) .stage-art{background-position:center center!important}
#stage-select.stage-desktop:not(.coop-selection) .round-mode-controls{position:absolute;left:calc(100% + 72px);top:50%;transform:translateY(-50%);margin:0;flex-direction:column}
#stage-select.stage-desktop:not(.coop-selection) :is(.stage-eyebrow,#stage-counter){grid-column:1;justify-self:center;margin:0;text-align:center}
