:root {
  --navy: #0f2438;
  --navy-soft: #1d3a56;
  --blue: #1b9de0;
  --blue-dark: #1284c2;
  --text: #24344a;
  --muted: #5d7189;
  --bg: #ffffff;
  --bg-soft: #f4f8fb;
  --border: #e3ebf3;
  --green: #16a34a;
  --danger: #b42318;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--blue-dark); }
button, input, select, textarea { font-family: inherit; }
.wrap { max-width: 1220px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 480px; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 16px; }
.logo-link { display: flex; align-items: center; text-decoration: none; }
.logo-link img { height: 42px; width: auto; display: block; }
.main-nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: .94rem; font-weight: 500; }
.main-nav a:hover { color: var(--navy); }
.nav-cta {
  background: var(--blue); color: #fff !important;
  padding: 10px 16px; border-radius: 10px; font-weight: 600 !important;
}
.nav-cta:hover { background: var(--blue-dark); }
.nav-signin { font-weight: 600 !important; color: var(--navy) !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; font-weight: 700; padding: 12px 18px;
  border-radius: 12px; font-size: .98rem; border: none; cursor: pointer;
  transition: background .15s, transform .15s, border-color .15s;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 24px -8px rgba(27,157,224,.55); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-dark); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-soft); }
.btn-danger { background: #fff; color: var(--danger); border: 1.5px solid #f0d0cc; }

.flash { background: #e9f6fd; color: var(--navy); }
.flash .wrap { padding-top: 12px; padding-bottom: 12px; font-weight: 600; }

.hero-band {
  background:
    radial-gradient(900px 420px at 88% 0%, rgba(27,157,224,.18), transparent 60%),
    linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%);
  padding: 72px 0 36px;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 42px; align-items: center; }
h1 {
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  font-weight: 800; color: var(--navy);
  line-height: 1.12; letter-spacing: -.8px; margin: 0 0 16px;
}
h1 em { font-style: normal; color: var(--blue); }
.lead { color: var(--muted); font-size: 1.08rem; margin: 0 0 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.fine { color: var(--muted); font-size: .88rem; margin-top: 14px; }

.page { padding-top: 42px; padding-bottom: 72px; }
.page h1 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.sec { padding: 72px 0; }
.sec.alt { background: var(--bg-soft); }
.sec-head { text-align: center; max-width: 680px; margin: 0 auto 36px; }
.sec-eyebrow {
  font-size: .78rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; color: var(--blue); margin-bottom: 8px;
}
.sec-head h2, .block h2, .prose h2 {
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  font-weight: 800; color: var(--navy); letter-spacing: -.4px; margin: 0 0 10px;
}
.sec-head p { color: var(--muted); margin: 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 22px; text-decoration: none; color: inherit; display: block;
}
a.card:hover { box-shadow: 0 16px 40px -24px rgba(15,36,56,.35); transform: translateY(-1px); }
.card h3 { margin: 0 0 6px; color: var(--navy); font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: .94rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
.step .num {
  width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 12px;
}
.step h3 { margin: 0 0 6px; color: var(--navy); font-size: 1rem; }
.step p { margin: 0; color: var(--muted); font-size: .92rem; }

.prose p { color: var(--text); font-size: 1.02rem; }
.prose h2 { margin-top: 32px; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--navy); }
.updated { color: var(--muted); font-size: .85rem; margin-top: -6px; }

.note {
  background: #f8fafc; border: 1px solid var(--border); border-left: 4px solid var(--blue);
  border-radius: 12px; padding: 14px 16px; color: var(--text); margin: 22px 0;
}
.caution {
  background: #fff8f1; border: 1px solid #f3e0cc; border-radius: 12px;
  padding: 14px 16px; color: #6b4b2a; margin: 22px 0;
}

.faq details { border-top: 1px solid var(--border); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.faq p { margin: 8px 0 0; color: var(--muted); }

.mini-list { display: flex; flex-direction: column; gap: 10px; }
.mini {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px; align-items: center;
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 12px;
}
.mini-copy { display: flex; flex-direction: column; min-width: 0; }
.mini-copy strong { color: var(--navy); }
.mini-copy span { color: var(--muted); font-size: .88rem; }
.mini a { font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.mini-play, .play-btn {
  background: var(--navy); color: #fff; border: 0; border-radius: 999px;
  padding: 10px 16px; font-weight: 800; cursor: pointer; min-width: 76px;
}
.mini-play:hover, .play-btn:hover { background: var(--navy-soft); }
.mini-play[aria-pressed="true"], .play-btn[aria-pressed="true"] { background: var(--blue); }

.transport {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 14px 16px; position: sticky; top: 74px; z-index: 20;
  box-shadow: 0 12px 30px -24px rgba(15,36,56,.5);
}
.transport .grow { flex: 1; min-width: 180px; }
.vol-row, .fader { display: flex; flex-direction: column; gap: 4px; }
.vol-row span, .fader > span, .eq-row span {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: .9rem; font-weight: 650; color: var(--navy);
}
.fader small, .eq-row small, .vol-row small { color: var(--muted); font-weight: 600; }
.hint { color: var(--muted); font-size: .82rem; margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip, .filter-chip {
  border: 1px solid var(--border); background: #fff; color: var(--navy);
  border-radius: 999px; padding: 7px 12px; font-weight: 650; font-size: .88rem;
  cursor: pointer; text-decoration: none;
}
.chip:hover, .filter-chip:hover, .chip.active { border-color: var(--blue); color: var(--blue-dark); background: #f3faff; }
.panel {
  background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 18px;
  margin-top: 16px;
}
.panel h2 { margin: 0 0 4px; font-size: 1.05rem; color: var(--navy); }
.studio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.eq-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 28px; background: transparent; margin: 0;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 6px; background: #e3ebf3; border-radius: 99px;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--blue); margin-top: -6px; border: 0;
}
input[type=range]::-moz-range-track { height: 6px; background: #e3ebf3; border-radius: 99px; border: 0; }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--blue); }

.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.status { min-height: 1.2em; color: var(--muted); font-size: .9rem; margin: 8px 0 0; }
.check { display: flex; gap: 8px; align-items: center; font-size: .92rem; color: var(--text); }
.check[hidden] { display: none; }

.card-form, .modal-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 26px;
  box-shadow: 0 20px 50px -32px rgba(15,36,56,.45);
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-weight: 650; color: var(--navy); font-size: .92rem; }
.field input, .field textarea, .field select {
  border: 1px solid var(--border); border-radius: 11px; padding: 12px 12px;
  font-size: 1rem; font-weight: 500; color: var(--text); background: #fff;
}
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid rgba(27,157,224,.35); border-color: var(--blue); }
.form-error { background: #fdecec; color: #8a2424; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 12px; }

.modal-back {
  position: fixed; inset: 0; background: rgba(15,36,56,.48);
  display: flex; align-items: center; justify-content: center;
  z-index: 80; padding: 18px;
}
.modal-back[hidden] { display: none; }
.modal-card { width: min(460px, 100%); }

.mix-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mix-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.mix-card h3 { margin: 0; font-size: 1.08rem; }
.mix-card h3 a { color: var(--navy); text-decoration: none; }
.mix-card h3 a:hover { color: var(--blue-dark); }
.by, .sum, .meta { color: var(--muted); font-size: .88rem; margin: 0; }
.blurb { margin: 0; color: var(--text); }
.mix-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

footer { padding: 28px 0 40px; color: var(--muted); font-size: .88rem; background: transparent; }
.is-home footer { background: #fff; }
.foot-inner { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 16px 22px; flex-wrap: wrap; justify-content: center; }
.foot-copy { margin: 0; white-space: nowrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--navy); }
.credits li { margin: 0 0 12px; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

@media (max-width: 900px) {
  .hero-grid, .studio-grid, .grid-3, .steps, .mix-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .main-nav { gap: 12px 14px; }
  .mini { grid-template-columns: auto 1fr; }
  .mini a { grid-column: 2; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .hero-band { padding: 42px 0 20px; }
  .sec { padding: 48px 0; }
  .transport { top: 64px; }
}

/* The studio is the page. Pictures carry the sounds. */
.is-studio { background: #eef3f8; }
.stage { max-width: 1220px; margin: 0 auto; padding: 18px 20px 48px; }
.stage .transport { background: #fff; }

.studio-body {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 16px;
}
.library {
  position: sticky; top: 78px;
  max-height: calc(100vh - 96px);
  overflow: auto;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 18px 50px -28px rgba(15,36,56,.45);
  padding: 14px 12px 18px;
}
.lib-search {
  width: 100%;
  border: 1px solid #e6edf4;
  background: #f6f9fc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238aa0b5' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='M10.5 10.5L14 14'/%3E%3C/svg%3E") 12px 50% no-repeat;
  border-radius: 12px;
  padding: 10px 12px 10px 36px;
  font-size: .92rem;
  color: var(--navy);
}
.lib-tabs {
  display: flex; gap: 4px;
  background: #f1f5f8;
  border-radius: 999px;
  padding: 4px;
  margin: 12px 0 8px;
}
.lib-tabs button {
  flex: 1; border: 0; background: transparent; cursor: pointer;
  border-radius: 999px; padding: 8px 10px;
  font-weight: 700; color: #6b8296; font-size: .92rem;
}
.lib-tabs button.on { background: var(--blue); color: #fff; }
.lib-group-name {
  font-size: .75rem; color: #8aa0b5; font-weight: 700;
  padding: 12px 10px 4px;
}
.lib-browse {
  display: block; margin: 14px 10px 6px; color: var(--blue);
  font-size: .84rem; font-weight: 700;
}
.lib-row {
  width: 100%;
  display: flex; align-items: flex-start; gap: 10px;
  border: 0; background: transparent; cursor: pointer;
  border-radius: 12px; padding: 6px 8px;
  text-align: left; color: var(--navy); font-weight: 650; font-size: .95rem;
}
.lib-row:hover { background: #f4f8fb; }
.lib-row.active { background: #e8f5fc; }
.lib-thumb {
  width: 42px; height: 42px; border-radius: 10px; flex: none;
  background-size: cover; background-position: center;
}
.lib-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lib-label { min-width: 0; }
.lib-about { display: block; font-weight: 500; font-size: .75rem; line-height: 1.35; color: var(--muted); }
.lib-check {
  margin-left: auto; margin-top: 12px;
  width: 18px; height: 18px; border-radius: 999px;
  border: 1.5px solid #d5e0ea;
  color: transparent; font-size: .72rem; line-height: 16px; text-align: center;
  flex: none;
}
.lib-row.on .lib-check { background: var(--blue); border-color: var(--blue); color: #fff; }
.lib-panel[hidden], .lib-row[hidden], .lib-group[hidden],
.noise-strip[hidden], .scene[hidden] { display: none !important; }

.scene.noise-strip { display: block; }
.noise-main { gap: 10px; padding: 14px 16px 16px; }
.noise-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.color-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.color-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: #fff; color: var(--navy);
  border-radius: 999px; padding: 4px 11px 4px 4px;
  font-weight: 650; font-size: .82rem; cursor: pointer;
}
.color-pill .swatch {
  width: 22px; height: 22px; border-radius: 999px;
  background-size: cover; background-position: center;
  box-shadow: inset 0 0 0 1px rgba(15,36,56,.12);
}
.color-pill:hover { border-color: var(--blue); }
.color-pill.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.eq-box { background: #f5f8fb; border-radius: 14px; padding: 10px 12px 8px; }
.eq-head {
  display: flex; justify-content: space-between;
  font-size: .72rem; font-weight: 700; color: #8aa0b5; margin-bottom: 4px;
}
.eq-head span:first-child { color: var(--navy); }
.eq-bars { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 2px; }
.eq-col { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.eq-col span { font-size: .66rem; color: var(--muted); font-weight: 700; line-height: 1; }
.eq-col input[type=range] {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 24px;
  height: 84px;
  margin: 0;
}
.eq-col input[type=range]::-webkit-slider-runnable-track { width: 4px; height: 100%; }
.eq-col input[type=range]::-webkit-slider-thumb { margin-top: 0; margin-left: -7px; width: 18px; height: 18px; }
.eq-col input[type=range]::-moz-range-track { width: 4px; height: 100%; }

.scene.flash { animation: scene-flash 1.2s ease; }
@keyframes scene-flash {
  0%, 100% { box-shadow: 0 16px 36px -22px rgba(15,36,56,.65); }
  25% { box-shadow: 0 0 0 4px var(--blue), 0 16px 36px -22px rgba(15,36,56,.65); }
}

.play-main {
  display: inline-flex; align-items: center; gap: 10px;
  min-width: 0; padding: 8px 22px 8px 8px;
  background: var(--blue); font-size: 1.05rem;
  box-shadow: 0 10px 24px -12px rgba(27,157,224,.9);
}
.play-main:hover { background: var(--blue-dark); }
.play-main[aria-pressed="true"] { background: var(--navy); box-shadow: none; }
.play-icon {
  position: relative; width: 38px; height: 38px; border-radius: 999px;
  background: #fff; flex: none;
}
.play-icon::before {
  content: ""; position: absolute; left: 14px; top: 11px;
  border-style: solid; border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent var(--blue);
}
.play-main[aria-pressed="true"] .play-icon::before,
.play-main[aria-pressed="true"] .play-icon::after {
  content: ""; position: absolute; top: 12px; left: 13px;
  width: 4px; height: 14px; border: 0; border-radius: 1px; background: var(--navy);
}
.play-main[aria-pressed="true"] .play-icon::after { left: 21px; }
#studio:not(.is-playing) .play-main { animation: play-pulse 2.2s ease-in-out infinite; }
@keyframes play-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(27,157,224,.45), 0 10px 24px -12px rgba(27,157,224,.9); }
  50% { box-shadow: 0 0 0 10px rgba(27,157,224,0), 0 10px 24px -12px rgba(27,157,224,.9); }
}
.play-hint { color: var(--blue-dark); font-weight: 700; font-size: .9rem; }
#studio.is-playing .play-hint { display: none; }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 70;
  display: flex; align-items: center; gap: 14px;
  background: var(--navy); color: #fff; border-radius: 14px; padding: 12px 14px 12px 18px;
  box-shadow: 0 18px 40px -18px rgba(15,36,56,.8); font-size: .92rem; max-width: calc(100% - 32px);
}
.toast[hidden] { display: none; }
.toast-undo {
  border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer;
  background: #fff; color: var(--navy); font-weight: 800;
}
.toast-undo[hidden] { display: none; }

.scene-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.scene {
  --level: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 16px 36px -22px rgba(15,36,56,.65);
}
.scene-photo {
  position: relative;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
}
.scene-photo::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(7, 16, 28, .45);
  opacity: calc(1 - var(--level) / 118);
  pointer-events: none;
}
.scene.asleep .scene-photo { filter: grayscale(1) brightness(0.9); }
.scene.asleep .scene-photo::before {
  background: rgba(232, 236, 241, .5);
  opacity: 1;
}
.scene-face {
  position: absolute; inset: 0; z-index: 2;
  border: 0; padding: 0; background: transparent; cursor: pointer;
}
.scene-mark { display: none; }
.scene.asleep .scene-mark {
  display: grid; place-items: center;
  position: absolute; left: 50%; top: 50%;
  width: 54px; height: 54px; margin: -27px 0 0 -27px;
  border-radius: 999px; background: var(--blue);
  box-shadow: 0 10px 24px rgba(15,36,56,.35);
}
.scene.asleep .scene-mark::before {
  content: "";
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}
.scene-body { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; }
.scene-name {
  margin: 0;
  color: var(--navy);
  font-weight: 750;
  font-size: 1.15rem;
}
.scene-name small { font-weight: 650; color: var(--muted); font-size: .85rem; }
.scene-about { margin: 0; color: var(--text); font-size: .95rem; line-height: 1.45; }
.scene-actions { display: flex; gap: 8px; }
.scene-act { min-height: 36px; padding: 6px 14px; font-size: .88rem; font-weight: 750; }
.noise-strip .scene-act {
  background: var(--blue); color: #fff; border: 0; min-width: 84px;
  box-shadow: 0 8px 18px -10px rgba(27,157,224,.95);
}
.noise-strip .scene-act:hover { background: var(--blue-dark); color: #fff; }
.scene-grid .scene-act[data-sleep] { background: var(--navy); color: #fff; border: 0; }
.scene-grid .scene-act[data-sleep]:hover { background: var(--navy-soft); color: #fff; }
.scene-grid .scene-act[data-remove] { background: #fff1ef; color: var(--danger); border: 1.5px solid #f0c2bc; }
.scene-grid .scene-act[data-remove]:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.scene input[type=range] { width: 100%; }

.save-mix .heart { margin-right: 6px; }
.stage-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 14px; color: var(--muted); font-size: .9rem;
}

@media (max-width: 860px) {
  .studio-body { grid-template-columns: 1fr; }
  .library { position: relative; top: 0; max-height: 440px; }
}
@media (max-width: 640px) {
  .stage { padding: 12px 12px 36px; }
  .scene-grid { grid-template-columns: 1fr; gap: 12px; }
  .play-hint { display: none; }
  .transport { position: static; }
}

/* Guide pages and picture cards */
.mini { grid-template-columns: 52px auto minmax(0, 1fr) auto; }
a.mini-play { color: #fff; text-decoration: none; font-weight: 800; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
a.mini-more { white-space: normal; text-align: right; line-height: 1.3; max-width: 18rem; font-weight: 600; }
.mini-thumb {
  width: 52px; height: 52px; border-radius: 10px;
  background-size: cover; background-position: center; background-color: var(--bg-soft);
}
.guide-head { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 32px; align-items: start; }
.guide-hero { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; display: block; }
.players { margin: 26px 0 8px; }
.players-title { font-size: 1.1rem; font-weight: 800; color: var(--navy); margin: 0 0 10px; }
.players .hint { margin-top: 10px; }
.setup { padding-left: 22px; }
.setup li { margin: 0 0 8px; font-size: 1.02rem; }
.grid-title { font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 800; color: var(--navy); margin: 44px 0 14px; letter-spacing: -.3px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.pcard {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit;
  transition: box-shadow .15s, transform .15s;
}
.pcard:hover { box-shadow: 0 16px 40px -24px rgba(15,36,56,.4); transform: translateY(-2px); }
.pcard-img { display: block; aspect-ratio: 16 / 10; background-size: cover; background-position: center; background-color: var(--bg-soft); }
.pcard-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.pcard-body strong { color: var(--navy); font-size: 1rem; }
.pcard-body span { color: var(--muted); font-size: .88rem; line-height: 1.4; }
.guide-group { margin-top: 40px; }
.guide-group h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 800; color: var(--navy); margin: 0 0 4px; }
.guide-group .hint { margin-bottom: 14px; font-size: .95rem; }

.home-uses { background: #fff; border-top: 1px solid var(--border); padding: 52px 0 64px; }
.home-uses h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.home-uses h2 { font-size: 1.3rem; font-weight: 800; color: var(--navy); margin: 40px 0 12px; }
.home-uses .home-sub { color: var(--muted); max-width: 760px; margin: -4px 0 14px; }
.home-uses h2 + .pgrid { margin-top: 0; }
.home-part { margin-top: 48px; }
.home-part > h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 8px; }
.home-part > .home-sub { font-size: 1.05rem; margin: 0 0 24px; }
.home-kicker {
  margin: 0 0 6px; font-size: .8rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--blue-dark);
}
.home-more { font-size: 1.05rem; color: var(--navy); margin: 36px 0 12px; }
.home-work {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 24px;
  padding: 36px clamp(16px, 3vw, 36px) 40px;
}

.ublocks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.ublock {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden; transition: box-shadow .15s, transform .15s;
}
.ublock:hover { box-shadow: 0 20px 44px -26px rgba(15,36,56,.45); transform: translateY(-2px); }
.ublock-img { display: block; aspect-ratio: 16 / 10; background-size: cover; background-position: center; background-color: var(--bg-soft); }
.ublock-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.ublock-eyebrow { margin: 0 0 6px; font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--blue-dark); }
.ublock h3 { margin: 0 0 8px; font-size: 1.22rem; line-height: 1.25; }
.ublock h3 a { color: var(--navy); text-decoration: none; }
.ublock-body > p:not(.ublock-eyebrow) { margin: 0 0 18px; color: var(--muted); line-height: 1.5; flex: 1; }
.ublock-btn { align-self: flex-start; }
.ublock-btn span { margin-left: 6px; transition: transform .15s; }
.ublock:hover .ublock-btn span { transform: translateX(3px); }
.ublock-wide { flex-direction: row; margin-bottom: 22px; }
.ublock-wide .ublock-img { flex: 0 0 52%; aspect-ratio: auto; min-height: 320px; }
.ublock-wide .ublock-body { justify-content: center; padding: 32px 36px; }
.ublock-wide h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.ublock-wide .ublock-body > p:not(.ublock-eyebrow) { flex: 0; font-size: 1.05rem; }
@media (max-width: 960px) { .ublocks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .ublocks { grid-template-columns: 1fr; }
  .ublock-wide { flex-direction: column; }
  .ublock-wide .ublock-img { min-height: 0; aspect-ratio: 16 / 10; }
  .ublock-wide .ublock-body { padding: 20px 22px 22px; }
}

/* Full guide layout (lib/guide-rich.php) */
.rg { padding-bottom: 64px; }
.rg-hero {
  position: relative; background-size: cover; background-position: center; color: #fff;
  min-height: 520px; display: flex; align-items: flex-end;
}
.rg-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,25,40,.88) 0%, rgba(10,25,40,.62) 48%, rgba(10,25,40,.15) 100%);
}
.rg-hero-inner { position: relative; width: 100%; padding-top: 48px; padding-bottom: 72px; }
.rg-hero-inner > * { max-width: 680px; }
.rg-crumbs { font-size: .86rem; color: rgba(255,255,255,.75); margin: 0 0 28px; }
.rg-crumbs a { color: rgba(255,255,255,.75); text-decoration: none; }
.rg-crumbs a:hover { color: #fff; }
.rg-eyebrow { margin: 0 0 10px; font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8fd3f7; }
.rg-hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.1; margin: 0 0 16px; }
.rg-intro { font-size: 1.12rem; line-height: 1.6; color: rgba(255,255,255,.9); margin: 0 0 26px; }
.rg-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.rg-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; font-size: 1rem; }
.rg-btn svg { width: 18px; height: 18px; }

.rg-benefits {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
  margin-top: -44px;
}
.rg-benefit {
  background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 22px 22px 20px;
  box-shadow: 0 18px 40px -28px rgba(15,36,56,.5);
}
.rg-num {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: #e6f4fc; color: var(--blue-dark); font-weight: 800; margin-bottom: 12px;
}
.rg-benefit h2 { font-size: 1.12rem; color: var(--navy); margin: 0 0 6px; }
.rg-benefit p { margin: 0; color: var(--muted); line-height: 1.5; }

.rg-block { margin-top: 64px; }
.rg-title { font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--navy); margin: 0 0 8px; }
.rg-sub { color: var(--muted); margin: 0 0 24px; max-width: 720px; font-size: 1.04rem; }

.rg-mixes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rg-mix {
  display: flex; background: #fff; border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
}
.rg-mix-pic {
  position: relative; flex: 0 0 168px; background-size: cover; background-position: center;
  display: grid; place-items: center;
}
.rg-mix-play {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--navy); box-shadow: 0 8px 20px rgba(0,0,0,.25);
  transition: transform .15s;
}
.rg-mix-play svg { width: 22px; height: 22px; margin-left: 3px; }
.rg-mix-pic:hover .rg-mix-play { transform: scale(1.08); }
.rg-mix-body { padding: 18px 20px; display: flex; flex-direction: column; }
.rg-mix-body h3 { margin: 0 0 4px; color: var(--navy); font-size: 1.12rem; }
.rg-mix-body p { margin: 0 0 8px; color: var(--muted); font-size: .95rem; line-height: 1.45; }
.rg-mix-body .rg-mix-when { color: var(--text); flex: 1; }
.rg-mix-body .btn { align-self: flex-start; margin-top: 6px; }

.rg-setup { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-top: 64px; padding: 56px 0; }
.rg-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: center; }
.rg-split-one { grid-template-columns: minmax(0, 760px); }
.rg-pic { width: 100%; height: auto; border-radius: 20px; display: block; box-shadow: 0 24px 50px -30px rgba(15,36,56,.55); }
.rg-steps { list-style: none; counter-reset: step; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 12px; }
.rg-steps li {
  counter-increment: step; position: relative; background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px 14px 60px; line-height: 1.5; color: var(--text);
}
.rg-steps li::before {
  content: counter(step); position: absolute; left: 14px; top: 12px; width: 32px; height: 32px;
  border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800;
  display: grid; place-items: center; font-size: .92rem;
}
.rg-story .prose h2 { margin-top: 0; font-size: clamp(1.4rem, 2.4vw, 1.8rem); color: var(--navy); }
.rg-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 40px; }
.rg-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 22px 24px; }
.rg-card h2 { margin: 0 0 8px; font-size: 1.15rem; color: var(--navy); }
.rg-card p { font-size: .98rem; line-height: 1.6; margin: 0 0 10px; }
.rg-card p:last-child { margin-bottom: 0; }

.rg-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 48px; }
.rg-list { border-radius: 18px; padding: 24px 26px; border: 1px solid; }
.rg-list h2 { margin: 0 0 14px; font-size: 1.15rem; color: var(--navy); }
.rg-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rg-list li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.rg-list svg { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px; }
.rg-list-yes { background: #f0faf3; border-color: #cdebd6; }
.rg-list-yes svg { color: var(--green); }
.rg-list-no { background: #fff6f4; border-color: #f2d6d0; }
.rg-list-no svg { color: var(--danger); }

.rg-faq .faq { max-width: 860px; }
.rg-cta {
  margin-top: 64px; background: var(--navy); color: #fff; border-radius: 24px;
  padding: 36px clamp(20px, 4vw, 44px); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.rg-cta h2 { color: #fff; margin: 0 0 6px; font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.rg-cta p { margin: 0; color: rgba(255,255,255,.8); max-width: 560px; }

@media (max-width: 860px) {
  .rg-hero { min-height: 460px; }
  .rg-hero::before { background: linear-gradient(180deg, rgba(10,25,40,.55) 0%, rgba(10,25,40,.88) 70%); }
  .rg-benefits, .rg-mixes, .rg-lists, .rg-split { grid-template-columns: 1fr; }
  .rg-benefits { margin-top: -28px; }
  .rg-split { gap: 24px; }
}
@media (max-width: 520px) {
  .rg-mix { flex-direction: column; }
  .rg-mix-pic { flex-basis: 150px; }
}
.sound-links { display: flex; flex-wrap: wrap; gap: 8px; }
.sound-links a {
  border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px;
  font-size: .9rem; font-weight: 600; color: var(--navy); text-decoration: none; background: #fff;
}
.sound-links a:hover { border-color: var(--blue); color: var(--blue-dark); }

@media (max-width: 900px) {
  .guide-head { grid-template-columns: 1fr; }
  .guide-hero { order: -1; }
  a.mini-play, a.mini-more { grid-column: auto; }
}
.pgrid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.pgrid-4 .pcard-body { padding: 16px 16px 18px; gap: 6px; }
.pgrid-4 .pcard-body strong { font-size: 1.08rem; }
.pgrid-4 .pcard-body span { font-size: .94rem; }
.pgrid-4 .pcard-img { aspect-ratio: 16 / 9; }

@media (max-width: 800px) {
  .pgrid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 600px) {
  .mini { grid-template-columns: 44px auto minmax(0, 1fr); }
  .mini-thumb { width: 44px; height: 44px; }
  a.mini-more { grid-column: 2 / -1; justify-self: start; text-align: left; max-width: none; }
  .pgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* Mix picture cards (community, my soundscapes, shared mix) */
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #6c5ce7); color: #fff;
  font-size: .72rem; font-weight: 800;
}
.avatar-lg { width: 64px; height: 64px; font-size: 1.6rem; }
.btn-sm { padding: 7px 12px; font-size: .86rem; border-radius: 10px; }
.btn-glass { background: rgba(255,255,255,.14); color: #fff; border: 1.5px solid rgba(255,255,255,.45); backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255,255,255,.24); }
.icon-btn {
  width: 32px; height: 32px; border-radius: 10px; border: 1.5px solid var(--border);
  background: #fff; color: var(--muted); cursor: pointer; font-size: .8rem;
}
.icon-btn:hover { color: var(--danger); border-color: #f0d0cc; }

.like-form { margin: 0; }
.like-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--border); background: #fff; color: var(--navy);
  border-radius: 999px; padding: 5px 12px; font-weight: 700; font-size: .88rem;
  cursor: pointer; text-decoration: none;
}
.like-heart { color: #c4ceda; font-size: 1rem; line-height: 1; transition: transform .15s; }
.like-btn:hover { border-color: #f4b4c4; }
.like-btn:hover .like-heart { color: #e8547a; transform: scale(1.15); }
.like-btn.liked { background: #fff1f4; border-color: #f4b4c4; }
.like-btn.liked .like-heart { color: #e8547a; }

.mcard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.mcard {
  display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  box-shadow: 0 14px 34px -28px rgba(15,36,56,.55);
  transition: transform .18s, box-shadow .18s;
}
.mcard:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -26px rgba(15,36,56,.55); }
.mcard-pic {
  position: relative; aspect-ratio: 3 / 2; background: #dfe8f0 center / cover no-repeat;
}
.mcard-pic::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(15,36,56,0) 45%, rgba(15,36,56,.45));
}
.mcard-cover { position: absolute; inset: 0; z-index: 1; }
.mcard-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: rgba(255,255,255,.92); color: var(--navy); text-decoration: none;
  font-size: .74rem; font-weight: 800; padding: 4px 10px; border-radius: 999px;
}
.mcard-play, .hero-play {
  position: absolute; z-index: 2; display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer; font-size: 0; color: transparent;
  background: #fff; box-shadow: 0 10px 24px -8px rgba(15,36,56,.6);
  transition: transform .15s, background .15s; padding: 0; min-width: 0;
}
.mcard-play { right: 12px; bottom: 12px; width: 48px; height: 48px; }
.mcard-play:hover, .hero-play:hover { transform: scale(1.07); background: #fff; }
.mcard-play::before, .hero-play::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  translate: calc(-50% + 2px) -50%;
  width: 0; height: 0; margin: 0;
  border-style: solid; border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--navy);
}
.mcard-play[aria-pressed="true"], .hero-play[aria-pressed="true"] { background: var(--blue); }
.mcard-play[aria-pressed="true"]::before, .hero-play[aria-pressed="true"]::before {
  translate: -50% -50%; margin: 0; width: 14px; height: 16px; border: 0;
  background: linear-gradient(90deg, #fff 0 36%, transparent 36% 64%, #fff 64%);
}
.mcard.is-playing { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,157,224,.18); }
.mcard-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.mcard-body h3 { margin: 0; font-size: 1.06rem; line-height: 1.3; }
.mcard-body h3 a { color: var(--navy); text-decoration: none; }
.mcard-body h3 a:hover { color: var(--blue-dark); }
.mcard-by { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: .88rem; }
.mcard-note { margin: 0; color: var(--muted); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mcard-layers { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; padding: 0; }
.mcard-layers li {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-soft); border-radius: 999px; padding: 3px 10px 3px 3px;
  font-size: .78rem; font-weight: 600; color: var(--text);
}
.mcard-layers li span { width: 20px; height: 20px; border-radius: 50%; background: center / cover; }
.mcard-layers li.noise-chip { padding-left: 10px; }
.mcard-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; }
.mcard-stats { margin-right: auto; color: var(--muted); font-size: .82rem; }
.mcard-new {
  align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 300px; border: 2px dashed #cfdbe7; background: var(--bg-soft);
  box-shadow: none; text-decoration: none; color: var(--muted); padding: 20px;
}
.mcard-new strong { color: var(--navy); font-size: 1.05rem; }
.mcard-new-plus {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--blue); font-size: 1.8rem; font-weight: 300;
  box-shadow: 0 8px 20px -12px rgba(15,36,56,.5); margin-bottom: 6px;
}

.comm-hero {
  position: relative; border-radius: 24px; overflow: hidden; margin-bottom: 26px;
  background: var(--navy) center / cover no-repeat; min-height: 300px;
  display: flex; align-items: flex-end;
}
.comm-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10,26,42,.88) 0%, rgba(10,26,42,.6) 50%, rgba(10,26,42,.1) 100%);
}
.comm-hero-copy { position: relative; padding: 42px 40px; max-width: 620px; color: #fff; }
.comm-hero .sec-eyebrow { color: #8fd3f7; }
.comm-hero h1 { color: #fff; margin: 4px 0 10px; }
.comm-hero p { color: rgba(255,255,255,.85); font-size: 1.05rem; margin: 0; }
.comm-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.comm-bar .chips { margin: 0; }
.filter-chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.seg { display: inline-flex; background: var(--bg-soft); border-radius: 12px; padding: 4px; }
.seg a { padding: 7px 14px; border-radius: 9px; font-size: .88rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.seg a.active { background: #fff; color: var(--navy); box-shadow: 0 2px 8px -4px rgba(15,36,56,.4); }
.comm-hint { margin: -6px 0 16px; }

.empty-card {
  text-align: center; background: var(--bg-soft); border-radius: 22px;
  padding: 44px 24px; border: 1px solid var(--border);
}
.empty-card h2 { color: var(--navy); margin: 18px 0 6px; font-size: 1.3rem; }
.empty-card p { color: var(--muted); margin: 0 auto 18px; }
.empty-pics { display: flex; justify-content: center; }
.empty-pics span {
  width: 78px; height: 78px; border-radius: 18px; background: center / cover;
  border: 4px solid #fff; box-shadow: 0 10px 24px -14px rgba(15,36,56,.6); margin: 0 -8px;
}
.empty-pics span:nth-child(1) { transform: rotate(-8deg); }
.empty-pics span:nth-child(2) { transform: translateY(-8px); z-index: 1; }
.empty-pics span:nth-child(3) { transform: rotate(8deg); }

.mine-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 28px; }
.mine-title { flex: 1; min-width: 220px; }
.mine-title h1 { margin: 2px 0 6px; }
.mine-stats { display: flex; gap: 18px; margin: 0; color: var(--muted); font-size: .92rem; }
.mine-stats strong { color: var(--navy); }
.mine-actions { display: flex; gap: 10px; }

.mix-hero {
  position: relative; border-radius: 24px; overflow: hidden; min-height: 380px;
  background: var(--navy) center / cover no-repeat; display: flex; align-items: flex-end;
}
.mix-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,26,42,0) 30%, rgba(10,26,42,.82));
}
.mix-hero-copy { position: relative; padding: 32px 36px; padding-right: 130px; color: #fff; }
.mix-hero .mcard-tag { position: static; display: inline-block; margin-bottom: 10px; }
.mix-hero h1 { color: #fff; margin: 0 0 8px; font-size: clamp(2rem, 4vw, 3rem); }
.mix-hero-by { display: flex; align-items: center; gap: 8px; margin: 0; color: rgba(255,255,255,.88); }
.hero-play { right: 32px; bottom: 32px; width: 76px; height: 76px; }
.hero-play::before { border-width: 13px 0 13px 22px; translate: calc(-50% + 3px) -50%; }
.hero-play[aria-pressed="true"]::before { width: 22px; height: 26px; }
.mix-hero.is-playing .hero-play { animation: play-pulse 2.4s ease-in-out infinite; }
.mix-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; margin-top: 28px; align-items: start; }
.mix-note { margin-top: 0; }
.mix-sub { color: var(--navy); font-size: 1.15rem; margin: 0 0 12px; }
.mix-more { margin-top: 44px; }
.mix-layers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.mix-layers li {
  display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 6px;
  align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 8px 12px 8px 8px;
}
.ml-pic { grid-row: span 2; width: 44px; height: 44px; border-radius: 10px; background: center / cover; }
.ml-name { font-weight: 700; color: var(--navy); font-size: .92rem; }
.ml-bar { height: 5px; border-radius: 3px; background: var(--bg-soft); overflow: hidden; }
.ml-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #6c5ce7); border-radius: 3px; }
.side-card {
  display: flex; flex-direction: column; gap: 10px; background: #fff;
  border: 1px solid var(--border); border-radius: 18px; padding: 20px;
  box-shadow: 0 14px 34px -28px rgba(15,36,56,.55); position: sticky; top: 90px;
}
.side-likes { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; margin-bottom: 4px; }
.side-card .hint { margin-top: 4px; }

/* Save dialog picture picker */
.save-card { max-height: calc(100vh - 36px); overflow-y: auto; width: min(520px, 100%); }
.pic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.pic-opt {
  position: relative; aspect-ratio: 3 / 2; border-radius: 10px; cursor: pointer;
  border: 2px solid transparent; background: var(--bg-soft) center / cover no-repeat; padding: 0;
  outline: 1px solid var(--border);
}
.pic-opt.active { border-color: var(--blue); outline: 3px solid rgba(27,157,224,.3); }
.pic-opt.active::after {
  content: "✓"; position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: .7rem; display: grid; place-items: center;
}
.pic-upload { display: grid; place-items: center; text-align: center; border: 2px dashed #c7d5e3; outline: 0; }
.pic-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pic-upload span { font-size: .72rem; font-weight: 700; color: var(--muted); padding: 4px; line-height: 1.2; }
.pic-upload.has-pic span { background: rgba(255,255,255,.88); border-radius: 6px; color: var(--navy); }
.pic-upload.active { border-style: solid; }

@media (max-width: 860px) {
  .mix-layout { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .comm-hero-copy { padding: 30px 24px; }
  .mix-hero { min-height: 300px; }
  .mix-hero-copy { padding: 24px; padding-right: 110px; }
  .hero-play { right: 22px; bottom: 22px; width: 64px; height: 64px; }
}
.avatar-official { background: #fff url('/images/logo.png') center / 80% no-repeat; border: 1px solid var(--border); }
.official-badge {
  display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: -3px;
  border-radius: 50%; background: var(--blue); color: #fff; font-size: .55rem; font-weight: 900;
}
.mix-hero .avatar-official { border-color: transparent; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 30px; color: var(--muted); font-size: .92rem; }

.main-nav a.active { color: var(--navy); font-weight: 700; }

/* Sleep timer pill */
.timer-field {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  background: var(--bg-soft); border: 1.5px solid var(--border); border-radius: 14px;
  padding: 7px 34px 7px 10px; cursor: pointer; min-width: 168px;
  transition: border-color .15s, background .15s;
}
.timer-field::after {
  content: ""; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; margin-top: -5px;
  border-right: 2px solid #8aa0b5; border-bottom: 2px solid #8aa0b5; transform: rotate(45deg);
}
.timer-field:hover { border-color: var(--blue); }
.timer-icon {
  width: 30px; height: 30px; padding: 6px; border-radius: 9px; flex: none;
  background: #fff; fill: #b7c4d2; box-shadow: 0 2px 6px -3px rgba(15,36,56,.35);
}
.timer-copy { display: flex; flex-direction: column; line-height: 1.15; }
.timer-title { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.timer-left { font-size: .95rem; font-weight: 750; color: var(--navy); font-variant-numeric: tabular-nums; }
.timer-field select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 1rem; }
.timer-field.on { background: #0f2438; border-color: #0f2438; }
.timer-field.on .timer-icon { background: #1d3a56; fill: #ffd76a; box-shadow: 0 0 14px -2px rgba(255,215,106,.55); }
.timer-field.on .timer-title { color: #9fb3c8; }
.timer-field.on .timer-left { color: #fff; }
.timer-field.on::after { border-color: #9fb3c8; }
.timer-field:focus-within { outline: 3px solid rgba(27,157,224,.3); }

/* Mix bar above the noise card */
.mix-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 12px 14px; margin-bottom: 14px;
  box-shadow: 0 10px 28px -24px rgba(15,36,56,.5);
}
.mix-bar-pic { width: 52px; height: 52px; border-radius: 12px; flex: none; background: var(--bg-soft) center / cover; }
.mix-bar-heart { display: grid; place-items: center; color: #e8547a; font-size: 1.35rem; background: #fff1f4; }
.mix-bar-copy { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.mix-bar-copy strong { color: var(--navy); font-size: 1.05rem; }
.mix-bar-copy span { color: var(--muted); font-size: .88rem; }
.mix-bar-copy a, .linkish { color: var(--blue-dark); font-weight: 600; text-decoration: none; }
.linkish { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.mix-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mix-bar[data-kind="owner"] .mix-bar-actions { display: none; }
.mix-bar.is-dirty { border-color: #9fd6f3; background: #f5fbff; }
.mix-bar.is-dirty .mix-bar-actions { display: flex; }
.mix-bar.is-dirty [data-mix-note] { color: var(--navy); }
.home-why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 44px; }
.home-why h2 { margin-top: 0 !important; font-size: 1.12rem !important; }
.home-why p { color: var(--text); margin: 0; line-height: 1.6; }
@media (max-width: 860px) { .home-why { grid-template-columns: 1fr; } }

/* Recordings people make, and the recorder. */
.clip-swatch {
  background: linear-gradient(145deg, hsl(var(--h, 200), 62%, 50%), hsl(calc(var(--h, 200) + 34), 46%, 30%));
}
.mcard-layers li span.clip-swatch,
.ml-pic.clip-swatch { background: linear-gradient(145deg, hsl(var(--h, 200), 62%, 50%), hsl(calc(var(--h, 200) + 34), 46%, 30%)); }
.scene-photo.clip-photo {
  background:
    radial-gradient(circle at 28% 36%, rgba(255,255,255,.32), transparent 46%),
    linear-gradient(160deg, hsl(var(--h, 200), 58%, 48%), hsl(calc(var(--h, 200) + 30), 42%, 24%));
}
.scene-photo.clip-photo::after {
  content: "";
  position: absolute; left: 14%; right: 14%; top: 46%; height: 34%;
  transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.9) 0 3px, transparent 3px 9px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  opacity: .7; pointer-events: none;
}
.lib-empty { margin: 2px 10px 10px; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.lib-clip { display: flex; align-items: center; gap: 2px; }
.lib-clip .lib-row { flex: 1; width: auto; min-width: 0; }
.lib-clip .lib-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-clip .lib-about {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lib-thumb.clip-swatch {
  background: #e7eef4;
  box-shadow: inset 0 0 0 1px #d5e2ec;
}
.lib-delete {
  flex: none; align-self: center; margin-right: 6px;
  border: 0; background: transparent; color: #8aa0b5;
  font-weight: 700; font-size: .78rem; cursor: pointer; padding: 6px;
}
.lib-delete:hover { color: var(--danger); }
.lib-like, .lib-you {
  flex: none; align-self: center; margin-right: 4px;
  border: 0; background: transparent; color: #8aa0b5;
  font-weight: 700; font-size: .82rem; cursor: pointer; padding: 6px;
}
.lib-like.liked, .like-act.liked { color: #e8547a; }
.lib-you {
  cursor: default; font-size: .68rem; letter-spacing: .04em; text-transform: uppercase;
  background: #eef6fb; color: var(--blue-dark); border-radius: 999px; padding: 4px 7px;
}
.rec-launch {
  width: 100%; display: flex; align-items: center; gap: 12px;
  border: 1.5px dashed #b9d7ea; background: #f3f9fd; color: var(--navy);
  border-radius: 14px; padding: 10px 12px; cursor: pointer; text-align: left; margin: 4px 0 8px;
}
.rec-launch:hover { border-color: var(--blue); background: #e7f5fc; }
.rec-launch-dot {
  width: 34px; height: 34px; border-radius: 50%; flex: none; background: #fff;
  box-shadow: inset 0 0 0 2px #e23b3b; position: relative;
}
.rec-launch-dot::after {
  content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #e23b3b;
}
.rec-launch-copy { display: flex; flex-direction: column; gap: 1px; }
.rec-launch-copy strong { font-size: .95rem; }
.rec-launch-copy small { color: var(--muted); font-size: .75rem; font-weight: 500; }
.rec-launch.rec-stage-launch {
  grid-column: 1 / -1; margin: 0; padding: 20px 22px; border-radius: 20px;
  background: #f3f9fd; border: 1.5px dashed #b7d4e8;
  box-shadow: 0 16px 36px -22px rgba(15,36,56,.65);
}
.rec-launch.rec-stage-launch:hover { border-color: var(--blue); background: #e7f5fc; }
.rec-launch.rec-stage-launch .rec-launch-copy { gap: 4px; }
.rec-launch.rec-stage-launch .rec-launch-copy strong { font-size: 1.2rem; }
.rec-launch.rec-stage-launch .rec-launch-copy small {
  font-size: .98rem; line-height: 1.45; max-width: 40rem; color: var(--text); font-weight: 500;
}
.rec-launch.rec-stage-launch .rec-launch-dot { width: 48px; height: 48px; }
.rec-launch.rec-stage-launch .rec-launch-dot::after { inset: 12px; }
.rec-launch-go { margin-left: auto; flex: none; pointer-events: none; white-space: nowrap; }
.record-card { width: min(520px, 100%); max-height: calc(100vh - 36px); overflow: auto; }
.rec-stage { display: flex; align-items: center; gap: 16px; margin: 8px 0 16px; }
.rec-go {
  display: inline-flex; align-items: center; gap: 10px;
  border: 0; background: var(--navy); color: #fff; border-radius: 999px;
  padding: 12px 18px; font-weight: 800; cursor: pointer; font-size: 1rem;
}
.rec-go:hover { background: var(--navy-soft); }
.rec-dot { width: 14px; height: 14px; border-radius: 50%; background: #ff5a6a; box-shadow: 0 0 0 4px rgba(255,90,106,.18); }
.rec-stage.is-recording .rec-dot { border-radius: 3px; animation: rec-pulse 1.2s ease-in-out infinite; }
@keyframes rec-pulse { 50% { transform: scale(.86); } }
.rec-time { margin: 0; font-variant-numeric: tabular-nums; font-weight: 800; color: var(--navy); font-size: 1.2rem; }
.record-card audio { width: 100%; margin-bottom: 12px; }
.record-card [data-rec-photo-preview] {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; margin: 0 0 12px;
}
.check.clip-share { align-items: flex-start; line-height: 1.4; }
.check.clip-share input { margin-top: 3px; flex: none; }
.sound-search { display: flex; gap: 8px; flex: 1; min-width: 220px; }
.sound-search input {
  flex: 1; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: .95rem;
}
.scard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.scard {
  background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 14px 34px -28px rgba(15,36,56,.55);
}
.scard.is-playing { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,157,224,.18); }
.scard-top { display: flex; gap: 12px; align-items: center; }
.clip-swatch-lg { width: 54px; height: 54px; border-radius: 16px; flex: none; }
.scard h3 { margin: 0; color: var(--navy); font-size: 1.05rem; }
.scard-by { margin: 2px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.35; }
.scard-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; }
.scard-actions .like-form, .scard-actions .like-btn { margin-left: auto; }
.mine-sounds { margin: 8px 0 28px; }
.mine-sounds-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.mine-sounds h2 { margin: 0; font-size: 1.2rem; color: var(--navy); }
.my-clips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.my-clip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 12px;
}
.my-clip .clip-swatch, .my-clip .my-clip-pic { width: 42px; height: 42px; border-radius: 12px; flex: none; }
.my-clip .my-clip-pic { background: #dfe8f0 center/cover no-repeat; }
.my-clip-copy { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.my-clip-copy strong { color: var(--navy); }
.my-clip-copy span { color: var(--muted); font-size: .84rem; }

/* Sign-in and register share one screen: a photograph, then the account. */
.is-auth { background: var(--bg-soft); }
.auth-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
  min-height: calc(100vh - 71px);
  align-items: stretch;
}
.auth-story {
  position: relative;
  min-height: 640px;
  color: #fff;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--navy);
}
.auth-slides { position: absolute; inset: 0; }
.auth-slides img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 32%;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.auth-slides img.is-on { opacity: 1; }
.auth-mark {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 20%;
  width: min(500px, 72%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.auth-mark img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
}
.auth-emblem { z-index: 1; }
.auth-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 12px solid rgba(78, 190, 238, .8);
  box-shadow:
    0 0 28px 10px rgba(27, 157, 224, .45),
    inset 0 0 22px 6px rgba(27, 157, 224, .28);
  filter: blur(2px);
  transform: translate(-50%, -50%) scale(.44);
  opacity: 0;
  animation: auth-shield 6.6s linear infinite;
}
.auth-ring:nth-child(2) { animation-delay: -2.2s; }
.auth-ring:nth-child(3) { animation-delay: -4.4s; }
@keyframes auth-shield {
  0% { transform: translate(-50%, -50%) scale(.44); opacity: 0; }
  12% { opacity: .95; }
  62% { opacity: .5; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}
.auth-scene {
  position: absolute;
  z-index: 3;
  top: 22px;
  left: 22px;
  margin: 0;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(15, 36, 56, .42);
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .01em;
  backdrop-filter: blur(8px);
}
@media (prefers-reduced-motion: reduce) {
  .auth-slides img { transition: none; }
  .auth-ring { animation: none; opacity: 0; }
  .auth-ring:first-child {
    opacity: .4;
    transform: translate(-50%, -50%) scale(.7);
  }
}
.auth-story::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,36,56,.18) 0%, rgba(15,36,56,.02) 28%, rgba(15,36,56,.55) 58%, rgba(15,36,56,.92) 100%);
}
.auth-story-copy {
  position: relative; z-index: 3;
  padding: 48px 52px 52px;
  max-width: 560px;
}
.auth-kicker {
  margin: 0 0 10px;
  font-size: .78rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: #8fd4f6;
}
.auth-story h1 {
  color: #fff;
  font-size: clamp(2.05rem, 3.5vw, 3rem);
  letter-spacing: -.6px;
  margin-bottom: 12px;
}
.auth-story-copy > p {
  margin: 0;
  color: rgba(255,255,255,.9);
  font-size: 1.05rem;
  max-width: 46ch;
}
.auth-points {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-points li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.auth-points li > span {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blue); color: #fff;
  font-weight: 800; font-size: .9rem;
  box-shadow: 0 8px 18px -10px rgba(27,157,224,.9);
}
.auth-points strong {
  display: block;
  color: #fff;
  font-size: 1rem;
  line-height: 1.3;
}
.auth-points li div span {
  display: block;
  margin-top: 2px;
  color: rgba(255,255,255,.82);
  font-size: .92rem;
  line-height: 1.45;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px 56px;
}
.auth-card {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px 22px 26px;
  box-shadow: 0 28px 60px -36px rgba(15,36,56,.55);
}
.auth-switch {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 6px;
  padding: 5px;
  margin: 0 0 22px;
  background: var(--bg-soft);
  border-radius: 14px;
}
.auth-switch a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 11px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
  font-size: .9rem;
  line-height: 1.2;
  text-align: center;
}
.auth-switch a[data-mode="register"]:not([aria-current="page"]) { color: var(--blue-dark); }
.auth-switch a:hover { background: rgba(255,255,255,.7); }
.auth-switch a[aria-current="page"] {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 10px 22px -14px rgba(15,36,56,.8);
}
.auth-switch a[aria-current="page"]:hover { background: var(--navy-soft); color: #fff; }
.auth-card h2 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 1.55rem;
  letter-spacing: -.35px;
  line-height: 1.2;
}
.auth-card .lead { font-size: 1rem; margin-bottom: 18px; }
.auth-card .btn { width: 100%; margin-top: 2px; padding: 14px 18px; }
.auth-card .fine { margin-bottom: 0; }
.auth-note {
  margin: 0 0 8px;
  color: var(--text);
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 12px 14px;
}
.auth-invite {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: .95rem;
}
.auth-invite a { font-weight: 700; }
@media (max-width: 980px) {
  .auth-stage { grid-template-columns: 1fr; }
  .auth-story { min-height: 0; }
  .auth-mark { top: 72px; width: 196px; transform: translate(-50%, 0); }
  .auth-story-copy { padding: 286px 22px 32px; max-width: none; }
  .auth-panel { padding: 22px 16px 48px; align-items: stretch; }
  .auth-card { width: min(520px, 100%); margin: 0 auto; }
}
@media (max-width: 600px) {
  .auth-points { gap: 12px; }
  .auth-switch a { font-size: .8rem; padding: 8px 6px; }
}
.my-clip-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.my-clip-share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.my-clip-share .check { margin: 0; max-width: 280px; }
.clip-badge {
  font-size: .75rem; font-weight: 800; color: var(--blue-dark);
  background: #e7f5fc; border-radius: 999px; padding: 6px 10px;
}
