/* Member navigation: primary destinations, audio, and account tools each have a place. */
html{scroll-padding-top:calc(var(--member-header-height,0px) + 12px)}
.domain-workspace{scroll-margin-top:16px}
/* Collection labels keep their full width; only this row scrolls on small screens. */
#explore-view .domain-tabs{max-width:100%;gap:24px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
#explore-view .domain-tabs button{flex:0 0 auto;min-width:44px;min-height:48px;white-space:nowrap}
#explore-view .domain-tabs .tab-dot{flex-shrink:0}
@media(max-width:700px){
  #explore-view .view-title{padding:12px 0 0;margin-bottom:16px}
  #explore-view .view-title h2{font-size:28px;line-height:1.25}
  #explore-view .view-title>p:last-child{margin:10px 0 0;line-height:1.55}
  #explore-view .domain-workspace{margin-top:0}
  #explore-view .domain-tabs{gap:20px}
}
.header.app-header{position:sticky;top:0;z-index:9;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:24px;height:auto;min-height:82px;padding:12px 4%;background:#fcfaf8;border-bottom:1px solid #e8dfe2}
.app-header .brand-caption{display:none}
.app-header .topnav{position:static;display:flex;justify-content:center;gap:22px;margin:0;padding:0;height:auto;min-height:0;flex-wrap:nowrap}
.app-header .topnav button{padding:12px 0;min-height:44px;flex:none;font-size:14px;line-height:1.25}
.app-header .header-end{display:flex;align-items:center;gap:10px;margin:0;min-width:0}
.header-soundscapes,.account-menu>summary{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:10px 14px;border:1px solid #ded0d7;border-radius:12px;background:#fff;color:#533847;font-size:14px;line-height:1.2;cursor:pointer;white-space:nowrap}
.header-soundscapes[aria-expanded=true]{background:#f2e6eb;border-color:#b88ca2}
.account-menu{position:relative}
.account-menu>summary{list-style:none}
.account-menu>summary::-webkit-details-marker{display:none}
.account-menu>summary::after{content:'⌄';font-size:16px}
.account-menu[open]>summary{background:#f2e6eb}
.account-menu-panel{position:absolute;top:calc(100% + 10px);right:0;width:min(300px,calc(100vw - 32px));max-height:calc(100dvh - 150px);overflow:auto;display:flex;flex-direction:column;gap:4px;padding:12px;border:1px solid #ded0d7;border-radius:16px;background:#fffcf9;box-shadow:0 14px 40px #30202b25}
.account-menu:not([open]) .account-menu-panel{display:none}
.account-menu-identity{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 6px 12px;margin-bottom:4px;border-bottom:1px solid #e8dfe2}
.account-menu-identity span{font-size:13px;color:#675460;overflow-wrap:anywhere;min-width:0}
.account-menu-identity .avatar{flex-shrink:0}
.account-menu-panel>.text-link{display:flex;align-items:center;min-height:44px;padding:10px 12px;border-radius:8px;text-align:left;color:#533847;font-size:14px;text-decoration:none}
.account-menu-panel>.text-link:hover{background:#f2e6eb}
.app-header :focus-visible{outline:3px solid #4268c6;outline-offset:3px}
.soundscape-player#soundscape-player{max-height:calc(100dvh - var(--soundscape-bottom,14px) - var(--soundscape-top,14px))}
.soundscape-player .soundscape-head{position:sticky;top:-12px;z-index:1;background:#fffcf9;padding:4px 0}
@media(max-width:1050px){
  .header.app-header{grid-template-columns:1fr auto;gap:8px 16px;padding:10px 3%}
  .app-header .topnav{grid-column:1/-1;grid-row:2;justify-content:flex-start;border-top:1px solid #eee5e8;padding-top:4px;gap:26px}
  .app-header .header-end{grid-column:2;grid-row:1}
}
@media(max-width:600px){
  .header.app-header{min-height:72px;padding:10px 16px;gap:8px}
  .app-header .brand{font-size:30px}
  .app-header .header-end{gap:6px}
  .header-soundscapes,.account-menu>summary{font-size:12px;padding:9px 10px}
  .app-header .topnav{position:fixed;top:auto;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;min-height:calc(68px + env(safe-area-inset-bottom));padding:6px 8px calc(6px + env(safe-area-inset-bottom));border-top:1px solid #ded0d7;background:#fcfaf8;backdrop-filter:none;z-index:8}
  .app-header .topnav button{display:flex;align-items:center;justify-content:center;min-width:0;min-height:54px;padding:6px 3px;margin:0;font-size:12px;line-height:1.25;white-space:normal;overflow-wrap:anywhere;border-radius:10px}
.app-header .topnav .active{background:#f1e2e9;font-weight:600}
  .app-header .topnav .active:after{display:none}
  #app>main{padding-bottom:calc(90px + env(safe-area-inset-bottom))}
}
@media(max-width:350px){
  .header.app-header{padding-inline:10px;gap:4px}
  .app-header .brand{font-size:26px}
  .app-header .header-end{gap:4px}
  .header-soundscapes,.account-menu>summary{padding-inline:8px}
}

/* The member's mobile entry is a short intention -> plan -> action loop. */
.mobile-start,.mobile-day-summary{display:none}
@media(max-width:700px){
  #system-view{display:flex;flex-direction:column}
  #system-view .welcome{order:0}
  #system-view .mobile-start{order:1}
  #system-view .system-layout{order:2}
  #system-view .plan-entry{order:3}
  #system-view .welcome{margin:0 0 12px}
  #system-view .welcome h1,#system-view .welcome .checkin-button{display:none}
  #system-view .welcome .eyebrow{margin:0;font-size:13px;letter-spacing:.03em;color:#705c68}
  #system-view .intention-bar,#system-view .date-toolbar{display:none}
  #system-view .mobile-start{display:block;padding:22px 20px 20px;margin:0 0 16px;border:1px solid #e7d9df;border-radius:22px;background:#fffdfb;box-shadow:0 8px 28px #51333c0b}
  #system-view .mobile-start h2{font:500 clamp(27px,8vw,36px)/1.15 Manrope,sans-serif;letter-spacing:-1.1px;color:#503443;margin:0 0 12px}
  #system-view .mobile-start>p:not(.eyebrow){font-size:15px;line-height:1.55;color:#69545f;margin:0 0 22px}
  #system-view .mobile-start-group{margin:0 0 21px}
  #system-view .mobile-start-label{display:block;font-size:13px;font-weight:700;color:#59424f;margin:0 0 10px}
  #system-view .mobile-intents,#system-view .mobile-times{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  #system-view .mobile-start-group button{min-height:48px;padding:8px 5px;background:#fff;border:1px solid #ddcdd5;border-radius:12px;color:#503443;font-size:13px;line-height:1.2}
  #system-view .mobile-start-group button[aria-pressed="true"]{background:#eee2e8;border:2px solid #764b62;font-weight:700}
  #system-view .mobile-build{display:block;width:100%;min-height:52px;font-weight:700}
  #system-view .mobile-start-footer{display:flex;justify-content:space-between;gap:8px;margin-top:12px}
  #system-view .mobile-start-footer .text-link{padding:12px 2px;min-height:44px;font-size:13px;text-align:left}
  #system-view:not(.mobile-has-plan) .plan-entry,#system-view:not(.mobile-has-plan) .day-card{display:none}
  #system-view.mobile-has-plan .mobile-start{display:none}
  #system-view.mobile-has-plan .plan-entry{order:3;margin:14px 0 0;padding:15px 0 0;border:0}
  #system-view.mobile-has-plan .plan-entry-copy{display:none}
  #system-view.mobile-has-plan .plan-entry .rhythm-tools{display:flex;gap:10px}
  #system-view.mobile-has-plan .plan-entry .rhythm-tools .button{font-size:13px;min-height:44px}
  #system-view .system-layout{display:block}
  #system-view .day-card{background:#fffdfb;color:#503443;border:1px solid #e7d9df;box-shadow:0 8px 28px #51333c0b;padding:20px;border-radius:22px;gap:0}
  #system-view .day-card .eyebrow,#system-view .day-card .day-item small{color:#704c60}
  #system-view .day-card-top,#system-view #day-title,#system-view #day-description,#system-view .day-total,#system-view #open-rhythm{display:none}
  #system-view .day-card .today-next{order:0;border:1px solid #e8dce2;border-radius:16px;background:#f7f0f3;padding:17px}
  #system-view .day-card .today-next h3{font:600 21px/1.25 Manrope,sans-serif;margin:3px 0 8px}
  #system-view .day-card .today-next p{line-height:1.5}
  #system-view .day-card .today-next .button{width:100%;min-height:46px}
  #system-view .mobile-day-summary{display:block;order:-1;margin-bottom:18px}
  #system-view .mobile-day-summary h2{font:500 27px/1.18 Manrope,sans-serif;letter-spacing:-.7px;margin:2px 0 7px}
  #system-view .mobile-day-summary p{font-size:13px;color:#765f6b;margin:0 0 11px}
  #system-view .mobile-day-summary progress{display:block;width:100%;height:8px;appearance:none;border:0;border-radius:8px;background:#eadde3}
  #system-view .mobile-day-summary progress::-webkit-progress-bar{border-radius:8px;background:#eadde3}
  #system-view .mobile-day-summary progress::-webkit-progress-value{border-radius:8px;background:#764b62}
  #system-view .mobile-day-summary progress::-moz-progress-bar{border-radius:8px;background:#764b62}
  #system-view .mobile-day-links{display:flex;justify-content:space-between;gap:12px;margin:11px 0 0}
  #system-view .mobile-day-links .text-link{min-height:44px;padding:10px 0;color:#704359;font-size:13px}
  #system-view .day-list{order:1;margin:18px 0 4px}
  #system-view .day-item.timeline-item{border-color:#e9dfe3}
  #system-view .day-time{font-size:12px;color:#765f6b}
  #system-view .timeline-open{color:#503443;text-align:left}
  #system-view .timeline-completion{color:#634d59}
  #system-view .timeline-completion input{accent-color:#764b62}
  #system-view .finish-day{order:2;margin-top:16px;min-height:48px}
  #system-view .day-caption{order:3;color:#78616d;font-size:12px;line-height:1.5}
  #system-view .day-card .timeline-open:focus-visible,#system-view .day-card .timeline-completion input:focus-visible{outline-color:#4268c6}
  .app-header .topnav{grid-template-columns:repeat(4,minmax(0,1fr))}
}
