/* Approved central hub. Combat and replay keep their existing viewport layouts. */
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) { height: 100dvh; overflow: hidden; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) > .shell { height: 100dvh; width: min(1520px, calc(100% - 56px)); padding: 0 0 12px; display: flex; flex-direction: column; min-height: 0; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) > .shell > .hero { flex: 0 0 56px; min-height: 56px; height: 56px; margin: 0; padding: 0 60px 0 0; flex-direction: row; align-items: center; gap: 18px; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) .hero > div { padding: 0; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) .hero::before { display: none; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) .hero h1 { font-size: 20px; letter-spacing: -.02em; }
.hub-account { display: none; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) .hub-account { display: flex; align-items: center; gap: 16px; margin-left: auto; font-size: 13px; min-width: 0; }
.hub-account strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.hub-account button { padding: 8px; background: transparent; border: 0; color: #b4c7d8; font-size: 12px; cursor: pointer; }
.hub-account .status { background: none; color: #a9dc87; font-size: 11px; padding: 0; }
.hub-back { border: 1px solid #607b91; color: #f1f1ed; background: #122a3f; min-height: 40px; padding: 8px 14px; white-space: nowrap; cursor: pointer; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-lobby-panel { min-height: 0; flex: 1; display: flex; flex-direction: column; padding: 10px 0 0; margin: 0; border: 0; background: none; overflow: hidden; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 24px; position: relative; isolation: isolate; flex: 1; min-height: 0; }
.hub-combat { z-index: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.hub-combat h2 { font-family: "MdC Heavy", sans-serif; font-weight: 400; font-size: 44px; line-height: 1.14; letter-spacing: -.02em; text-transform: uppercase; margin: 0 0 8px; text-shadow: 0 2px 12px #07111c; }
.hub-intro { margin: 0 0 16px; color: #b4c7d8; font-size: 14px; }
.hub-destinations { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8px; }
.hub-destination { display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: 76px; padding: 14px 18px; border: 1px solid #687c8e; color: #f1f1ed; background: #112336eb; text-align: left; text-decoration: none; cursor: pointer; }
.hub-destination strong { font-family: "MdC Heavy", sans-serif; font-size: 21px; font-weight: 400; line-height: 1.2; text-transform: uppercase; }
.hub-destination small { color: #b4c7d8; font-size: 12px; margin-top: 5px; }
.hub-destination--primary { background: #ffeb20; border-color: #ffeb20; color: #0a1520; }
.hub-destination--primary small { color: #243245; }
.hub-destination:hover { filter: brightness(1.13); }
.hub-secondary { grid-column: 1/-1; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.hub-secondary .hub-destination { min-height: 48px; padding: 10px 12px; }
.hub-secondary strong { font-family: "MdC Display", sans-serif; font-size: 20px; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-grid { display: flex; flex-direction: column; gap: 12px; min-height: 0; position: relative; z-index: 2; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-card { clip-path: none; min-height: 0; padding: 0; border: 1px solid #43586c; background: #102033ed; overflow: hidden; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-card__heading { min-height: 0; padding: 14px 16px 10px; margin: 0; gap: 8px; flex: 0 0 auto; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-card__index,
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-card__heading .zone-label,
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-card__heading small { display: none; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-card__heading h3 { margin: 0; font-size: 25px; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-card__count { border: 0; width: auto; height: auto; font-size: 13px; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-card--friends { flex: 1; display: flex; flex-direction: column; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-card > :not(.social-card__heading) { margin: 0; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-card--friends .social-row__identity { display: block; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-card--friends .social-row__identity::before { display: none; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #friend-search-form { margin: 0; padding: 10px 14px; gap: 6px; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #friend-search-form input { min-width: 0; padding: 8px; font-size: 12px; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #friend-search-form button { padding: 7px; font-size: 12px; }
.hub-friends-body { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 14px; }
/* Search feedback occupies space only after a search produces content. */
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #friend-search-result:empty { display: none; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) .hub-friends-body .social-list { margin: 0; overflow: visible; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) .hub-friends-body .social-row { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 6px; padding: 12px 0; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) .hub-friends-body .social-row::before { display: none; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-row__identity { min-width: 0; width: 100%; flex: 0 0 auto; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-row__identity strong { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; font-size: 14px; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-row__identity small { display: none; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-row__meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-start; min-width: 0; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-row__meta .presence-dot { flex: 1 1 100%; font-size: 11px; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .button { min-height: 38px; padding: 6px 10px; font-size: 13px; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view #invitations-popup { flex: 0 1 auto; max-height: 42%; border-color: #ffeb20; display: flex; flex-direction: column; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #invitations-popup .social-card__heading { display: none; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #invitations-popup .social-card__heading h3 { font-size: 18px; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #invitations-list { min-height: 0; overflow-y: auto; padding: 0 12px; margin: 0; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #invitations-list .social-row { flex-wrap: wrap; padding: 8px 0; gap: 6px; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #invitations-list .social-row__identity small { display: block; font-size: 11px; }
.hub-search-toggle { display: none; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) .hub-status { flex: 0 0 auto; margin: 0; min-height: 24px; max-height: 44px; overflow-y: auto; padding: 6px 0 0; font-size: 11px; color: #b4c7d8; }
.hub-ribbon { position: absolute; left: 0; right: 0; z-index: 0; overflow: hidden; pointer-events: none; opacity: .38; }
.hub-ribbon__track { height: 100%; display: flex; width: max-content; animation: hub-card-pass 60s linear infinite; }
.hub-ribbon__cycle { display: flex; flex: none; height: 100%; gap: 14px; padding-right: 14px; }
.hub-ribbon img { display: block; height: 100%; width: auto; aspect-ratio: 840/1163; object-fit: contain; flex: none; }
@keyframes hub-card-pass { to { transform: translateX(-50%); } }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) :is(#custom-decks-panel,#match-history-panel) { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) :is(#entrenamiento,#tutorial-entry-root,#social-prep-panel) { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin-block: 0; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) :is(button,a,input,select):focus-visible { outline: 3px solid #ffeb20; outline-offset: 2px; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) ::selection { background: #ffeb20; color: #07111c; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) ::-webkit-scrollbar { width: 6px; height: 6px; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) ::-webkit-scrollbar-thumb { background: #658098; }
body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) ::-webkit-scrollbar-track { background: #0a1927; }
@media (max-height:520px) {
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) > .shell { width: calc(100% - 32px); padding-bottom: 4px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) > .shell > .hero { flex-basis: 40px; min-height: 40px; height: 40px; gap: 10px; padding-right: 46px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) .hero h1 { font-size: 16px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) .hub-account { gap: 8px; font-size: 12px; }
  .hub-account .status { display: none; }
  .hub-account strong { max-width: 140px; }
  .hub-account button { padding: 6px; font-size: 11px; }
  .hub-back { min-height: 36px; padding: 5px 8px; font-size: 12px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-lobby-panel { padding-top: 4px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view { grid-template-columns: minmax(0,1fr) 185px; gap: 12px; }
  .hub-combat h2 { font-size: 25px; margin-bottom: 8px; }
  .hub-intro { display: none; }
  .hub-destination { min-height: 40px; padding: 6px 10px; }
  .hub-destination strong { font-size: 15px; }
  .hub-destination small { display: none; }
  .hub-secondary { gap: 6px; }
  .hub-secondary .hub-destination { min-height: 34px; padding: 5px 8px; }
  .hub-secondary strong { font-size: 15px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-grid { gap: 6px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-card__heading { padding: 7px 8px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-card__heading h3 { font-size: 17px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-card__count { font-size: 11px; }
  .hub-search-toggle { display: block; margin-left: auto; background: #183047; border: 1px solid #526d83; color: #f1f1ed; min-height: 28px; padding: 4px 5px; font-size: 10px; cursor: pointer; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #friend-search-form { display: none; padding: 5px 7px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) .social-card--friends.is-searching #friend-search-form { display: flex; }
  .hub-friends-body { padding: 0 8px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-row__identity strong { font-size: 12px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) .hub-friends-body .social-row { padding: 8px 0; gap: 4px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .button { padding: 4px 6px; min-height: 28px; font-size: 10px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #friend-search-form input { min-height: 28px; padding: 4px 6px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view .social-row__meta { gap: 4px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #invitations-popup .social-card__heading { padding: 5px 8px 0; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #invitations-popup .social-card__heading h3 { font-size: 14px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #invitations-list { padding: 0 8px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) .hub-status { min-height: 20px; max-height: 30px; font-size: 10px; padding-top: 3px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) .audio-settings { inset-block-start: 3px; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) .audio-settings__trigger { width: 36px; height: 36px; }
}
@media (max-width:740px) and (max-height:520px) {
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view { grid-template-columns: minmax(0,1fr) 175px; gap: 10px; }
  .hub-secondary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) .hero h1 { font-size: 13px; }
  .hub-account strong { max-width: 90px; }
}
@media (orientation:portrait) {
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) #social-home-view { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); gap: 12px; }
  .hub-combat h2 { font-size: 28px; }
  .hub-destination { min-height: 48px; padding: 9px; }
  .hub-destination strong { font-size: 16px; }
  .hub-intro,.hub-destination small { display: none; }
  body.social-authenticated.hub-shell:not(.is-playing):not(.is-replay-mode) .hero h1 { font-size: 13px; }
  .hub-account .status,.hub-account strong { display: none; }
}
@media (prefers-reduced-motion:reduce) { .hub-ribbon__track { animation: none; } }
