/* Keep the page fluid without scaling text, hiding overflow, or resizing game pieces. */
body[data-da-view="home"] .site-layout {
  width:100%;margin-inline:auto;
  grid-template-columns:minmax(0,1fr) clamp(16rem,22vw,21.875rem);
  gap:clamp(.75rem,1.65vw,1.5rem);
  padding-inline:clamp(.75rem,2vw,1.75rem);
}
/* Wide desktop keeps even gutters instead of a fixed-width island. */
@media (min-width:1700px) {
  body[data-da-view="home"] .site-layout {
    max-width:none;
    padding-inline:clamp(1.5rem,1.5vw,3rem);
  }
}

body[data-da-view="home"] .site-layout.music-collapsed,
html[data-da-guest] body[data-da-view="home"] .site-layout {grid-template-columns:minmax(0,1fr)}
body[data-da-view="home"] .site-layout>main {max-width:none;container:home-main / inline-size}
.site-layout>main>header,.site-layout :is(.header-left,.header-tools,.brand) {
  min-width:0;flex-wrap:wrap;gap:clamp(.5rem,1.2vw,1.125rem);
}
.site-layout>main>header {row-gap:.85rem}
.site-layout .brand-title {min-width:0;overflow-wrap:anywhere}
.site-layout .header-province {min-width:0;max-width:100%}
.site-layout .header-tools {max-width:100%}
.site-layout .header-clock {margin:0}
.site-layout #desktop-music-toggle {white-space:normal}
.site-layout :is(.workspace,.today-items,.welcome-guide,.learning-sidebar,.music-panel) > * {min-width:0}
.site-layout :is(.today-items button,.welcome-guide>div,.learning-sidebar,.feature-launchers,.account-bar,.site-footer),
#program-drawer :is(.section-menu a,.da-theme-options label),
body[data-da-view="home"] dialog:is(.feature-dialog,.assistant-workspace,.program-drawer) {overflow-wrap:anywhere}
.site-layout .assistant-tabs.assistant-launchers {width:100%;max-width:none}
.site-layout .assistant-launchers>button {justify-content:start;align-content:start;line-height:1.3}
.site-layout .assistant-launchers .assistant-name {line-height:1.25}
.site-layout .assistant-launchers .assistant-name small {line-height:1.5}
.site-layout .workspace>.study>.feature-launchers-compact>.feature-launcher {white-space:normal;text-align:left;line-height:1.35}
.feature-launcher>*:first-child,.study-disclosure>summary>span:first-child {min-width:0;overflow-wrap:anywhere}
.site-layout :is(.welcome-guide,#academic-panel,.assistant-launchers>button,.today-items>button,.study-disclosure>summary),
#h-space .h-library-card {--home-radius:1rem;border-radius:var(--home-radius)}
#academic-panel .calendar-head>button {flex:0 0 2.25rem}
#academic-panel .calendar-head h3 {min-width:0;text-align:center}
#academic-panel #calendar-today {padding:.42rem .72rem;min-height:2.35rem;white-space:normal;line-height:1.25}
#academic-panel .calendar-date {min-width:0;padding-inline:1px}
#academic-panel .calendar-legend {display:flex;flex-wrap:wrap}
body[data-da-view="home"] #program-drawer .section-menu a>*,body[data-da-view="home"] #program-drawer .da-theme-options label>* {min-width:0}

@container home-main (min-width:55rem) {
  .site-layout .workspace {grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);gap:clamp(1rem,2.8vw,2.5rem)}
}
@container home-main (max-width:55rem) {
  .site-layout .workspace {grid-template-columns:minmax(0,1fr);gap:1.5rem}
  .site-layout .workspace>.study>.feature-launchers {align-self:stretch}
}
@container home-main (max-width:35rem) {
  .site-layout>main>header :is(.header-left,.header-tools) {width:100%;justify-content:space-between}
  .site-layout .header-province {flex:1 1 9rem}
  .site-layout .header-tools {justify-content:start}
  .site-layout .assistant-tabs.assistant-launchers {grid-template-columns:repeat(2,minmax(0,1fr))}
  .site-layout .today-items {grid-template-columns:minmax(0,1fr)}
  .learning-sidebar .academic-panel {padding:clamp(.65rem,4vw,1.125rem)}
}
@container home-main (max-width:21rem) {
  .site-layout .brand {flex:1 1 12rem}
  .site-layout .today-items button {grid-template-columns:minmax(0,1fr);gap:.25rem}
}
html[data-da-guest] body[data-da-view="home"] .site-layout :is(.workspace,.assistant-tabs.assistant-launchers) {grid-template-columns:minmax(0,1fr)}
@media(max-width:900px) {
  body[data-da-view="home"] .site-layout {grid-template-columns:minmax(0,1fr)}
  #open-program {display:none!important}
}

/* The game picker keeps visible captions and original wide artwork at every size. */
body:not(.h-game-mode) #h-space .h-content {min-width:0;max-width:100%;padding-inline:clamp(.75rem,2.8vw,3rem)}
#h-space .h-game-hub,#h-space .h-library-heading>div {min-width:0;max-width:100%}
#h-space .h-library-heading {flex-wrap:wrap;gap:clamp(.6rem,2vw,1.4rem)}
#h-space :is(.h-site-name,.h-mode-label,.h-library-heading,.h-card-details,.h-library-footnote,.h-return-note) {min-width:0;overflow-wrap:anywhere}
#h-space .h-library-grid {
  grid-template-columns:repeat(auto-fill,minmax(min(100%,11rem),1fr));
  width:100%;max-width:88rem;gap:clamp(.7rem,1.5vw,1.5rem);align-items:stretch;
}
#h-space .h-library-card {min-width:0;white-space:normal;line-height:1.32}
#h-space .h-card-details {width:100%;padding:clamp(.7rem,1.4vw,1.125rem)}
#h-space .h-card-details strong {font-size:clamp(1rem,1.45vw,1.3rem)}
#h-space .h-card-description {font-size:.82rem}
#h-space .h-card-action {gap:.4rem;align-items:center}
#h-space .h-card-action>span {flex:none}
#h-space :is(.h-cover-art .h-featured-cover-image,.h-couple-cover img) {width:100%;height:100%;object-fit:contain}
#h-space .h-room-dialog {padding:clamp(.85rem,4vw,1.75rem);overflow-wrap:anywhere}
#h-space .h-room-choices {grid-template-columns:repeat(2,minmax(0,1fr))}
#h-space .h-room-choices button {min-width:0;white-space:normal}
#h-space .h-room-code-row {flex-wrap:wrap}
#h-space .h-room-code-row input {flex:1 1 9rem;max-width:100%}
@media(max-width:560px) {
  body:not(.h-game-mode) #h-space {grid-template-columns:minmax(0,1fr)}
  body:not(.h-game-mode) #h-space .h-rail {
    min-height:0;flex-direction:row;flex-wrap:wrap;justify-content:space-between;
    gap:.5rem;padding:.5rem .75rem;border-right:0;border-bottom:1px solid #33415570;
  }
  body:not(.h-game-mode) #h-space .h-rail-links {flex-direction:row;gap:.4rem}
  body:not(.h-game-mode) #h-space .h-rail-footer {display:none}
  #h-space .h-topbar {grid-template-columns:minmax(0,1fr) auto}
  #h-space .h-mode-label {display:none}
  #h-space .h-library-heading {display:flex}
  #h-space .h-library-grid {grid-template-columns:repeat(auto-fill,minmax(min(100%,10.5rem),1fr))}
}
@media(max-width:360px) {
  #h-space .h-room-choices {grid-template-columns:minmax(0,1fr)}
}
