:root { font-family: "Segoe UI", system-ui, sans-serif; }
body { padding-bottom: 0; }
.shell { max-width: 90rem; margin: 0 auto; display: grid; grid-template-columns: 13rem minmax(0, 1fr); min-height: 100vh; grid-template-rows: auto 1fr auto; }
.shell-header {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 1rem;
  padding: max(.8rem, env(safe-area-inset-top)) clamp(1rem, 3vw, 2.25rem) .8rem;
  border-bottom: 1px solid var(--rt-border);
}
.brand { text-decoration: none; color: var(--rt-text); letter-spacing: -.015em; margin-right: auto; }
.settings-link { font-size: .94rem; font-weight: 650; }
#connection { color: var(--rt-muted); font-size: .88rem; }
.main-nav { grid-row: 2 / 4; padding: 1.4rem .8rem; border-right: 1px solid var(--rt-border); }
.main-nav a { display: flex; align-items: center; padding: .68rem .65rem; margin-bottom: .25rem; gap: .7rem; border-radius: 12px; color: var(--rt-muted); font-weight: 650; text-decoration: none; }
.main-nav a span { width: 1.35rem; text-align: center; font-size: 1.35rem; line-height: 1; }
.main-nav a[aria-current="page"], .main-nav a:hover { background: var(--rt-surface); color: var(--rt-accent); }
main { padding: 0 clamp(1rem, 3vw, 2.5rem) 2rem; min-width: 0; }
main > section { max-width: 72rem; margin-inline: auto; padding-top: 1.25rem; }
.page-heading { margin: .3rem 0 1.35rem; }
.page-heading h1 { font-size: clamp(1.85rem, 4vw, 2.8rem); line-height: 1.12; letter-spacing: -.04em; margin-bottom: .45rem; }
.page-heading p, .card > p, .full-controls > p, .demo-callout p, .section-copy { color: var(--rt-muted); }
.card > p + a, .card > p + .actions { display: inline-flex; margin-top: .85rem; }
.home-hero { min-height: clamp(17rem, 40vw, 27rem); margin-top: 0; border-radius: 25px; background-image: linear-gradient(90deg, #0b192beb, #122740a6 50%, #1323390a), url("assets/mountain.webp"); }
.home-hero h1 { font-size: clamp(2.7rem, 6vw, 5rem); font-family: Georgia, serif; font-weight: 500; line-height: 1.03; }
.home-hero p { color: #ebf6f8; margin: .9rem 0 1.2rem; max-width: 29rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; }
.action { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; text-align: center; padding: .5rem .85rem; border-radius: 10px; border: 1px solid var(--rt-border); color: var(--rt-text); font-weight: 700; text-decoration: none; background: var(--rt-elevated); }
.action.primary { background: var(--rt-button); color: var(--rt-buttonText); }
.hero-secondary { border-color: #edf7ff80; background: #17283c70; color: white; }
.action:hover { text-decoration: underline; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.feature-grid .card { height: 100%; }
.feature-art { border-radius: 11px; min-height: 6rem; background: #193247 var(--art) center / cover; }
.feature .feature-art { margin-bottom: .8rem; }
.art-mountain { --art: url("assets/mountain.webp"); }
.art-forest { --art: url("assets/forest.webp"); }
.art-ocean { --art: url("assets/ocean.webp"); }
.art-waterfall { --art: url("assets/waterfall.webp"); }
.collection-hero { margin-top: .6rem; background-image: linear-gradient(90deg, #0a192bf5, #12274092 65%, #13233933), var(--art); }
.section-copy { margin-bottom: 1rem; }
.stack { display: grid; gap: 1rem; }
.lower-card { margin-top: 1rem; }
.library-tools { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: end; }
.library-tools label, .setting-field, .player-options label { display: grid; gap: .35rem; min-width: 0; font-size: .94rem; font-weight: 650; }
input[type="search"], input[type="number"] { min-width: 0; padding: .45rem .6rem; border: 1px solid var(--rt-border); border-radius: 10px; background: var(--rt-elevated); color: var(--rt-text); }
input[type="search"] { width: 100%; min-height: 44px; }
input[type="range"] { accent-color: var(--rt-accent); }
.meter input[type="number"] { grid-column: 2; width: 5.8rem; min-height: 36px; }
.track-list { list-style: none; padding-left: 0; margin-block: .8rem 0; }
.track-row { min-height: 3rem; display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .85rem; padding: .45rem .1rem; border-bottom: 1px solid var(--rt-border); }
.track-row > :first-child { flex: 1 1 10rem; overflow-wrap: anywhere; }
.track-row > .recording-label { min-width: 0; }
.track-row > .recording-notes { flex: 0 0 100%; min-width: 0; overflow-wrap: anywhere; }
.compact-inner {
  display: grid; align-items: center; gap: .25rem .8rem;
  grid-template: "info transport options full" "time time time time" / minmax(0, 1fr) auto auto auto;
  max-width: 74rem; margin-inline: auto;
}
.compact-info { grid-area: info; min-width: 0; color: var(--rt-text); text-decoration: none; }
.compact-info > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-info .compact-context { display: flex; gap: .25rem; }
.compact-player #mini-kind:not([hidden]) { display: flex; }
.compact-player #mini-progress { display: inline; margin-inline: 0; }
#mini-group { overflow: hidden; text-overflow: ellipsis; }
#mini-track-count { flex-shrink: 0; }
.compact-info > span, .compact-mix-time { color: var(--rt-muted); font-size: .84rem; }
.compact-info .compact-repeat-status { color: var(--rt-accent); }
.compact-transport { grid-area: transport; display: flex; gap: .25rem; align-items: center; }
.compact-transport button, .compact-options button { min-width: 44px; min-height: 44px; }
.compact-full { grid-area: full; white-space: nowrap; justify-self: end; }
.compact-more { grid-area: more; display: none; justify-self: end; white-space: nowrap; min-height: 44px; }
.compact-options { grid-area: options; display: flex; gap: .45rem; align-items: center; min-width: 0; }
.compact-options label { display: flex; align-items: center; gap: .35rem; font-size: .84rem; }
.compact-options input { width: clamp(3.8rem, 7vw, 6.5rem); min-height: 32px; }
.compact-options select { min-width: 0; max-width: 100%; }
.compact-timeline { grid-area: time; display: flex; align-items: center; gap: .5rem; font-size: .8rem; font-variant-numeric: tabular-nums; }
.compact-timeline input { flex: 1; min-width: 0; height: 28px; margin: 0; }
.compact-mix-time { grid-area: time; margin: 0; }
@media (max-width: 58rem) {
  .compact-inner {
    grid-template: "info full" "transport more" "time time" "options options" / minmax(0, 1fr) auto;
    gap: .15rem .35rem;
  }
  .compact-more { display: block; }
  .compact-player:not(.controls-open) .compact-options { display: none; }
  .compact-options { flex-wrap: wrap; }
  .compact-options input { width: clamp(4rem, 15vw, 7rem); }
}
@media (max-width: 27rem) {
  .compact-player { padding-top: .35rem; padding-bottom: .35rem; }
  #mini-player.compact-player { padding-inline: max(.5rem, env(safe-area-inset-left)) max(.5rem, env(safe-area-inset-right)); }
  .compact-transport { gap: .15rem; }
  .compact-transport button, .compact-more, .compact-full, .compact-options button { font-size: .8rem; padding-inline: .38rem; }
  .compact-options select { font-size: .8rem; }
  .compact-player .compact-options label[for="mini-volume"] { display: grid; gap: 0; }
  .compact-player .compact-options #mini-volume { min-height: 24px; width: clamp(2.75rem, 13vw, 4.75rem); }
  .compact-player .compact-options .compact-repeat { flex: 1 1 9.5rem; min-width: 0; }
  .compact-player .compact-options #mini-repeat { width: 100%; }
}
.track-row span, .track-row small { color: var(--rt-muted); }
.track-row[aria-current="true"] { color: var(--rt-accent); }
.demo-callout { display: flex; align-items: center; justify-content: space-between; gap: .8rem 1.2rem; flex-wrap: wrap; }
.theme-colors { display: flex; gap: 1.25rem; margin-top: .8rem; }
.theme-colors label { display: grid; justify-items: start; gap: .3rem; }
.theme-colors input { width: 3.5rem; height: 2.75rem; }
.setting-field { max-width: 23rem; }
.full-player { display: grid; grid-template-columns: minmax(10rem, .7fr) minmax(0, 1fr); gap: 1.2rem; }
.full-player .feature-art { min-height: 12rem; }
.page-heading.full-player-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1rem; }
.full-player-heading h1 { margin-bottom: 0; }
#full-player-view .full-player #full-art { align-self: start; overflow: hidden; min-height: clamp(8rem, 23vw, 15rem); }
#full-player-view #full-art .collection-cover { height: clamp(8rem, 25vw, 16rem); }
#full-player-view #full-title { overflow-wrap: anywhere; }
#full-player-view .player-options label { max-width: 100%; }
#full-player-view #repeat-help { flex: 0 0 100%; margin: 0; }
#mini-player.player-expanded .compact-inner { grid-template: "info full" / minmax(0, 1fr) auto; }
#mini-player.player-expanded :is(.compact-transport, .compact-more, .compact-options, .compact-timeline, .compact-mix-time) { display: none; }
.composer-workspace .music-card { grid-column: 1 / -1; }
.music-card > :is(.field, .hint, div) { margin-top: .55rem; }
.music-card .field > :is(select, input) { margin-top: .25rem; }
.music-card .field > input:not([type="range"]) { width: 100%; }
.composer-fields { display: grid; gap: .5rem; }
.composer-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem .85rem; }
.composer-fields details, #saved-composition-controls { border-top: 1px solid var(--rt-border); padding-top: .65rem; }
.composer-fields details > :not(summary) { margin-top: .65rem; }
#composer-more > details { margin-inline: .7rem; }
.composer-range { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .45rem; }
.composer-range input { grid-column: 1 / -1; width: 100%; }
.composer-range output { color: var(--rt-accent); }
.composer-part { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .25rem .8rem;
  border-bottom: 1px solid var(--rt-border); padding-block: .45rem; }
.composer-part label { min-width: 0; font-size: .85rem; }
.composer-part label input { display: block; width: 100%; margin-inline: 0; }
.composer-workspace .playback > .action { grid-column: 1 / -1; justify-self: start; margin: 0; }
@media (max-width: 29rem) { .music-card .composer-pair { grid-template-columns: minmax(0, 1fr); } }
.full-controls > .actions, .full-controls .player-options { margin-top: .85rem; }
.player-options { display: flex; align-items: end; flex-wrap: wrap; gap: .8rem 1rem; }
.player-options label { flex: 0 1 12rem; }
#seek { width: 100%; margin: .6rem 0 0; min-height: 1.65rem; }
.elapsed { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; color: var(--rt-muted); font-size: .875rem; }
.shell-footer { display: flex; gap: .7rem 1.2rem; flex-wrap: wrap; padding: 1rem clamp(1rem, 3vw, 2.5rem); border-top: 1px solid var(--rt-border); font-size: .9rem; }
.shell:has(#mini-player:not([hidden])) .shell-footer { margin-bottom: var(--mini-height, 4.5rem); }
#mini-player { position: fixed; z-index: 3; inset: auto 0 0; background: var(--rt-surface); border-top: 1px solid var(--rt-border); padding: .55rem max(1rem, env(safe-area-inset-right)) calc(.55rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); }
.mini-inner { display: flex; align-items: center; gap: .5rem; max-width: 74rem; margin-inline: auto; }
.mini-info { flex: 1; min-width: 0; font-size: .9rem; color: var(--rt-text); text-decoration: none; }
.mini-info span { display: block; color: var(--rt-muted); font-size: .84rem; }
.mini-info .mini-mobile-title { display: none; }
.mini-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#mini-progress { color: var(--rt-muted); font-size: .9rem; font-variant-numeric: tabular-nums; margin-inline: .5rem; }
.notice { position: fixed; z-index: 4; bottom: calc(var(--mini-height, 0px) + var(--navigation-height, 0px) + .8rem); inset-inline: 1rem; margin-inline: auto; max-width: 32rem; background: var(--rt-surface); padding: .8rem 1rem; border: 1px solid var(--rt-accent); border-radius: 10px; box-shadow: 0 5px 20px #0004; }
.skip { position: fixed; z-index: 6; top: .5rem; left: .5rem; background: var(--rt-bg); padding: .5rem; transform: translateY(-150%); }
.skip:focus { transform: none; }
@media (max-width: 56rem) {
  .shell { display: flex; flex-direction: column; }
  main { flex: 1; }
  .main-nav { position: fixed; z-index: 3; inset: auto 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: .25rem max(.15rem, env(safe-area-inset-right)) calc(.25rem + env(safe-area-inset-bottom)) max(.15rem, env(safe-area-inset-left)); margin: 0; background: var(--rt-bg); border: 0; border-top: 1px solid var(--rt-border); }
  .main-nav a { display: flex; flex-direction: column; justify-content: center; text-align: center; gap: .25rem; padding: .3rem .12rem; margin: 0; font-size: .82rem; min-height: 49px; line-height: 1.13; }
  .shell-footer { padding-bottom: calc(1rem + var(--navigation-height, 56px)); }
  #mini-player { bottom: var(--navigation-height, 56px); padding-bottom: .55rem; }
}
@media (max-width: 39rem) {
  .full-player, .library-tools { grid-template-columns: minmax(0, 1fr); }
  .full-player .feature-art { min-height: 9rem; }
  #full-player-view .full-player { gap: .75rem; }
  #full-player-view .full-player #full-art { min-height: clamp(6.75rem, 27vw, 9rem); }
  #full-player-view #full-art .collection-cover { height: clamp(6.75rem, 28vw, 9.5rem); }
  .home-hero { background-position: center, 58% center; }
  .mini-full, #mini-kind { display: none; }
  .mini-info .mini-mobile-title { display: block; }
}
@media (min-width: 24rem) and (max-width: 39rem) {
  .presets { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 26rem) {
  #mini-progress { display: none; }
  .mini-inner button { padding-inline: .55rem; }
}
.recording-layers { grid-column: 1 / -1; }
.recording-pickers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.recording-pickers .layer { border: 0; margin: 0; padding: 0; min-width: 0; }
#recording-layer-status:empty, #reminder-status:empty { display: none; }
.catalog-modes { margin-bottom: .8rem; }
.catalog-modes [aria-pressed="true"] { background: var(--rt-button); color: var(--rt-buttonText); }
.collection-group { margin: 0 0 1.4rem; }
.collection-group > h2 { margin-bottom: .65rem; }
.collection-cover { display: block; width: 100%; height: 8.5rem; object-fit: contain; }
.feature-art:has(.collection-cover) { background: var(--rt-elevated); padding: .4rem; }
.collection-hero { justify-content: space-between; gap: .75rem 1.2rem; flex-wrap: wrap; }
.collection-hero .collection-cover { width: auto; max-width: 100%; border-radius: 9px; }
.track-access { display: block; }
#listening-reminder { color: var(--rt-text); background: var(--rt-surface); border: 1px solid var(--rt-border); padding: clamp(1rem, 4vw, 1.7rem); border-radius: 16px; width: min(38rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); }
#listening-reminder::backdrop { background: #07121bbd; }
#listening-reminder p, #listening-reminder .actions { margin-top: .8rem; }
#listening-reminder ul { padding-inline-start: 1.2rem; }

.mixer-recording-access { grid-column: 1 / -1; border-top: 1px solid var(--rt-border); padding-top: .35rem; }
.mixer-recording-access .hint { margin: .25rem 0; min-height: 0; }
.mixer-recording-access a { display: inline-block; margin-top: .2rem; font-size: .875rem; }
.app-update {
  position: fixed; z-index: 5; inset: max(4.6rem, env(safe-area-inset-top)) 1rem auto auto;
  width: min(calc(100% - 2rem), 25rem); padding: 1rem;
  box-shadow: 0 .55rem 1.7rem #0005;
}
.app-update h2 { font-size: 1.12rem; }
.app-update .actions { margin-top: .75rem; }
#update-indicator { min-height: 2rem; padding: .25rem .55rem; font-size: .82rem; }
#update-confirmation {
  color: var(--rt-text); background: var(--rt-surface); border: 1px solid var(--rt-border);
  border-radius: 16px; padding: 1.2rem; width: min(28rem, calc(100% - 2rem));
}
#update-confirmation::backdrop { background: #07121bbd; }
#update-confirmation .actions { margin-top: 1rem; }
@media (max-width: 30rem) {
  .shell-header:has(#update-indicator:not([hidden])) { flex-wrap: wrap; gap: .45rem .75rem; }
}

.composer-workspace .composer-help > summary { min-height: 44px; align-content: center; }
.composer-workspace .composer-help dl { margin: .25rem 0 .7rem; font-size: .9rem; }
.composer-workspace .composer-help dt { font-weight: 650; }
.composer-workspace .composer-help dd { margin: 0 0 .45rem; }
.music-card #composer-count { margin-bottom: 0; }
.music-card #composer-summary { margin-top: 0; overflow-wrap: anywhere; }
.music-card .composer-fields .hint, .music-card #composer-status { color: var(--rt-text); }
.music-card .composer-pair p { margin: .35rem 0 .55rem; }
.music-card .composer-pair button:active { background: var(--rt-button); color: var(--rt-buttonText); }
.music-card .composer-selection { border-inline-start: .2rem solid var(--rt-accent); padding-inline-start: .75rem; }
.music-card .composer-selection p { margin-block: .3rem; }
.music-card #composer-ready { font-weight: 650; }
.custom-duration { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-top: .5rem; }
.custom-duration input { width: 100%; min-height: 44px; margin-top: .28rem; }
.timing-option { grid-column: 1 / -1; }
.timing-option .hint, #timer-status { color: var(--rt-text); margin-block: .35rem; }
#timer-status:empty { display: none; }
#recording-loop-controls summary { margin-bottom: .4rem; }
.password-field { display: flex; gap: .45rem; align-items: stretch; }
#account-password { min-width: 0; flex: 1; min-height: 44px; padding: .45rem .65rem; border: 1px solid var(--rt-border);
  border-radius: 10px; background: var(--rt-elevated); color: var(--rt-text); }
#password-toggle { flex: none; min-width: 44px; min-height: 44px; padding: .5rem; color: var(--rt-text); }
#password-toggle svg { display: block; width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#password-toggle:not([data-revealed]) .icon-eye-off, #password-toggle[data-revealed] .icon-eye { display: none; }
@media (max-width: 38rem) { .listen-duration { grid-column: 1 / -1; } }
.composer-part label output { display: block; font-variant-numeric: tabular-nums; }

.main-nav #member-nav[data-member-sign-in] { background: var(--rt-button); color: var(--rt-buttonText); }
.main-nav #member-nav .member-nav-label { width: auto; font-size: inherit; line-height: inherit; }
#member-badge { border: 1px solid var(--rt-border); border-radius: 999px; padding: .25rem .6rem; color: var(--rt-accent); font-size: .875rem; font-weight: 700; }
.member-reminder { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.25rem; margin-block: 1rem; }
.member-reminder h2, .member-mixes-access h2, .member-access-dialog h2 { margin: 0; }
.member-reminder p, .member-mixes-access p, .member-access-dialog p { color: var(--rt-muted); margin: .35rem 0 0; }
.member-mixes-access .actions, .member-access-dialog .actions { margin-block: .85rem; }
.member-access-dialog { color: var(--rt-text); width: min(30rem, calc(100% - 2rem)); max-height: 85vh; margin: auto; }
.member-access-dialog::backdrop { background: #07121bbd; }
.member-access-dialog form { margin: 0; }
.member-help, .account-recovery { min-height: 44px; padding: .4rem 0; border: 0; border-radius: 0; background: transparent; color: var(--rt-accent); text-align: start; text-decoration: underline; text-underline-offset: .2em; }
.member-help { display: block; }
.account-recovery { display: inline-flex; width: fit-content; align-items: center; }
@media (max-width: 30rem) {
  .shell-header { gap: .5rem; flex-wrap: wrap; }
  .main-nav #member-nav .member-nav-label { max-width: 4.8rem; text-wrap: balance; }
}
