/* R1359: PC-only responsive repairs. Phone rules and controllers stay unchanged. */
@media (min-width:1100px), (min-width:768px) and (pointer:fine) {
  /* The entire login drawer is the scrollport, including its footer. */
  html body #ethnosAuthDrawer {
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior:contain;
  }

  /* The status grid must not impose its intrinsic width on the card body. */
  html body .joinMain>.joinCard[data-current-view="profile-choice"] {
    grid-template-columns:minmax(0,1fr) !important;
  }
  html body .joinCard:has([data-view="profile-choice"].isVisible) > .joinCardBody {
    min-width:0 !important;
    width:100% !important;
    max-width:100% !important;
    box-sizing:border-box !important;
  }
  html body .joinPage [data-view="profile-choice"] :is(.profileChoiceWorkspace,.profileChoiceEditor,.profileChoiceCopy,.statusChoiceGrid) {
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
  }
  html body .joinPage [data-view="profile-choice"] .statusChoiceGrid {
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
  html body .joinPage [data-view="profile-choice"] .statusChoice {
    min-width:0 !important;
    max-width:100% !important;
    overflow-wrap:anywhere;
  }

  /* Keep every Messages dashboard card reachable in a short window. */
  html[data-ethnos-ui] body#ethnosMobileDiscoveryR1234.atlasNativeMounted #memberDrawer-messages-r575[data-messages-page="true"] .ethnosMessagesR575Dashboard {
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior:contain;
    grid-template-rows:auto auto minmax(0,1fr) !important;
  }
}

@media (min-width:768px) and (max-width:1099.98px) and (pointer:fine) {
  body.atlasNativeMounted {--atlas-rail-width:168px;}
  body.atlasNativeMounted .atlasLiveRail {padding:14px 8px;font-size:13px;}
  body.atlasNativeMounted .atlasLiveBrand {gap:4px;}
  body.atlasNativeMounted .atlasLiveBrand strong {font-size:24px;}
  body.atlasNativeMounted .atlasLiveRail nav button {padding:9px 8px;gap:8px;min-width:0;overflow-wrap:anywhere;}
  body.atlasNativeMounted .atlasLiveTop {padding-inline:12px;gap:8px;}
  body.atlasNativeMounted .atlasLiveActions {gap:4px;min-width:0;}
  body.atlasNativeMounted .atlasLiveTop .atlasLiveActions button,
  body.atlasNativeMounted .atlasLiveTop>button {
    flex-direction:column;gap:3px;padding:5px 8px;
    font-size:11px;line-height:1.25;text-align:center;min-width:44px;max-width:110px;
  }
  body.atlasNativeMounted .atlasLiveTop .atlasButtonLabel {white-space:normal;overflow-wrap:anywhere;}
  body.atlasNativeMounted .atlasLiveRail .atlasLiveSurprise {padding:10px !important;}

  html[data-ethnos-ui] body#ethnosMobileDiscoveryR1234.atlasNativeMounted .bodyView-world .atlasDemo {
    padding-inline:18px !important;
    & .intro {flex-wrap:wrap !important;}
    & .toolbar {flex-wrap:wrap !important;gap:8px !important;}
    & .toolbar>.search {flex-basis:100% !important;max-width:none !important;}
    & .mapstage {height:auto !important;min-height:0 !important;}
    & #atlas-world {position:relative !important;width:100% !important;height:320px !important;inset:auto !important;}
    & #atlas-country-list {position:relative !important;inset:auto !important;min-height:220px !important;max-height:320px !important;margin:54px 16px 16px !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
    & .destination {position:relative !important;inset:auto !important;width:auto !important;max-height:360px !important;margin:12px !important;}
    & .atlasHomeFeatures .atlasHomeStory {grid-template-columns:minmax(0,1fr);grid-template-areas:"media" "copy";gap:24px;}
    & .tiles {grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  }
  html[data-ethnos-ui] body#ethnosMobileDiscoveryR1234.atlasNativeMounted .atlasLiveMenu.atlasLanguageMenu {padding:20px !important;}
  html[data-ethnos-ui] body#ethnosMobileDiscoveryR1234.atlasNativeMounted .memberApp .memberLayout:has(.ethnosSalonR573Left) {
    grid-template-columns:180px minmax(0,1fr) !important;
  }
  html[data-ethnos-ui] body#ethnosMobileDiscoveryR1234.atlasNativeMounted .ethnosSalonR573Left {min-width:0 !important;width:100% !important;}
  html[data-ethnos-ui] body#ethnosMobileDiscoveryR1234.atlasNativeMounted .memberApp .memberLayout>.memberExplorerPanel.isOpen:has(>.ethnosSalonR573Left) {
    min-width:0 !important;width:100% !important;max-width:100% !important;
  }
  html[data-ethnos-ui] body#ethnosMobileDiscoveryR1234.atlasNativeMounted .ethnosSalonR573ComposerRow {
    grid-template-columns:34px minmax(0,1fr) auto !important;
    & textarea {grid-column:1/-1 !important;grid-row:1 !important;min-width:0 !important;width:100% !important;}
    & .r1285Attach {grid-column:1 !important;grid-row:2 !important;}
    & .ethnosSalonR642ComposerActions {grid-column:2 !important;grid-row:2 !important;min-width:0 !important;}
    & .ethnosR310SendOfficial {grid-column:3 !important;grid-row:2 !important;}
  }
  html[data-ethnos-ui] body#ethnosMobileDiscoveryR1234.atlasNativeMounted #memberDrawer-messages-r575[data-messages-page="true"] {
    & .ethnosMessagesR575Dashboard {padding:18px !important;}
    & .ethnosMessagesR575Hero {flex-wrap:wrap !important;}
    & .ethnosMessagesR575Counters {grid-template-columns:repeat(2,minmax(0,1fr)) !important;grid-template-rows:none !important;grid-auto-rows:minmax(120px,auto) !important;height:auto !important;max-height:none !important;overflow:visible !important;}
  }
}
