:root {
  --ink: #231b32;
  --muted: #746f87;
  --paper: #f6f1fb;
  --white: #fffaf1;
  --linen: #ece3f5;
  --teal: #6650b7;
  --rose: #b96d8f;
  --gold: #d8a95f;
  --sage: #728d92;
  --cosmic: #130d2d;
  --cosmic-2: #2e1d5f;
  --line: rgba(71, 45, 112, .16);
  --shadow: 0 18px 46px rgba(26, 14, 55, .13);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 0%, rgba(216, 169, 95, .24), transparent 28rem),
    radial-gradient(circle at 8% 8%, rgba(146, 108, 224, .28), transparent 30rem),
    linear-gradient(180deg, #160f34 0%, #29184f 34%, #f6f1fb 34%, #f6f1fb 100%);
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: .7;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  padding: 0;
  border-bottom: 1px solid rgba(255, 231, 184, .18);
  background: rgba(19, 13, 45, .94);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 32px rgba(12, 7, 31, .24);
}

.brand-banner {
  display: none;
}

.brand-banner span {
  position: relative;
  display: block;
  max-width: min(46vw, 620px);
  font-family: "Dream Avenue", "Italiana", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 7.8vw, 124px);
  font-weight: 400;
  line-height: .92;
  letter-spacing: 0;
  text-shadow:
    0 2px 14px rgba(9, 6, 28, .92),
    0 0 24px rgba(216, 169, 95, .44);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  overflow-x: visible;
  scrollbar-width: none;
  padding: 12px clamp(16px, 4vw, 42px);
  background:
    linear-gradient(90deg, rgba(9, 8, 30, .96), rgba(39, 24, 84, .9), rgba(9, 8, 30, .96));
}

.nav::-webkit-scrollbar { display: none; }

.nav button,
.primary,
.secondary,
.ghost,
.chip,
.icon {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 250, 241, .78);
  color: var(--ink);
}

.nav button {
  border-color: rgba(255, 231, 184, .2);
  background: rgba(255, 250, 241, .1);
  color: rgba(255, 250, 241, .9);
}

.nav button.active,
.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--white);
}

.nav button.active {
  border-color: rgba(216, 169, 95, .6);
  background: rgba(216, 169, 95, .22);
  color: var(--white);
}

.nav .donate-nav {
  border-color: rgba(216, 169, 95, .44);
  background: rgba(216, 169, 95, .16);
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(102, 80, 183, .13);
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.pill.rose {
  background: rgba(185, 109, 143, .14);
  color: var(--rose);
}

.pill.teal {
  background: rgba(102, 80, 183, .14);
  color: var(--teal);
}

.pill.gold {
  background: rgba(216, 169, 95, .18);
  color: #9b6b25;
}

.secondary {
  border-color: rgba(216, 169, 95, .38);
  background: rgba(216, 169, 95, .12);
  color: var(--ink);
  backdrop-filter: blur(10px);
}

.hero .secondary {
  border-color: rgba(255, 250, 241, .34);
  background: rgba(255, 250, 241, .18);
  color: var(--white);
}

.secondary.danger {
  border-color: rgba(151, 57, 57, .32);
  background: rgba(151, 57, 57, .1);
  color: #7d3030;
}

.ghost {
  background: transparent;
}

.hidden-panel {
  display: none;
}

.icon {
  width: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 19px;
}

.hero {
  min-height: clamp(680px, 88vh, 920px);
  display: grid;
  align-items: center;
  padding: clamp(24px, 6vw, 76px);
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(18, 15, 38, .82) 0%, rgba(47, 32, 70, .62) 34%, rgba(148, 89, 90, .18) 62%, rgba(30, 33, 58, .1) 100%),
    radial-gradient(circle at 26% 58%, rgba(244, 181, 107, .16), transparent 20rem),
    url("./assets/home-hero-ocean-joanna-2026-07-05.png") center top / cover no-repeat;
}

.hero > div {
  max-width: 680px;
  padding-bottom: 0;
}

.hero-brand {
  margin: 0 0 18px;
  color: #fff8e9;
  font-family: "Dream Avenue", "Italiana", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 8.2vw, 128px);
  font-weight: 400;
  line-height: .88;
  letter-spacing: 0;
  text-shadow:
    0 2px 18px rgba(6, 7, 22, .88),
    0 0 24px rgba(216, 169, 95, .28);
}

.hero h1,
.hero + .band h2 {
  font-family: "Dream Avenue", "Italiana", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.hero h1 {
  max-width: 650px;
  font-size: clamp(34px, 4.4vw, 62px);
  line-height: 1.02;
  text-shadow: 0 2px 14px rgba(6, 7, 22, .72);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 16px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: .97;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.2;
}

.lead {
  max-width: 640px;
  color: rgba(255, 253, 248, .9);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 22px;
}

.band {
  padding: clamp(34px, 6vw, 78px) clamp(16px, 5vw, 64px);
  background:
    radial-gradient(circle at 82% 10%, rgba(216, 169, 95, .16), transparent 24rem),
    radial-gradient(circle at 4% 20%, rgba(102, 80, 183, .12), transparent 28rem),
    var(--paper);
}

.band.alt {
  background:
    radial-gradient(circle at 14% 0%, rgba(216, 169, 95, .18), transparent 22rem),
    linear-gradient(180deg, rgba(236, 227, 245, .96), rgba(246, 241, 251, .98));
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-head.tight {
  align-items: center;
  margin-bottom: 14px;
}

.section-head p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.55;
}

.grid,
.path-grid,
.stats {
  display: grid;
  gap: 16px;
}

.grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.path-grid,
.stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.path,
.panel,
.stat,
.row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 241, .84);
  box-shadow: 0 14px 34px rgba(26, 14, 55, .1);
  backdrop-filter: blur(10px);
}

.card:hover,
.path:hover {
  border-color: rgba(216, 169, 95, .36);
  box-shadow: 0 18px 42px rgba(26, 14, 55, .15);
}

.path,
.panel,
.stat {
  padding: 18px;
}

.path strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.path p,
.card p,
.panel p,
.row small,
.muted {
  color: var(--muted);
  line-height: 1.52;
}

.card {
  overflow: hidden;
}

.card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center top;
  background: var(--linen);
}

.full-cover-card img {
  object-fit: cover;
  object-position: center center;
  background:
    radial-gradient(circle at 50% 20%, rgba(216, 169, 95, .18), transparent 60%),
    var(--cosmic);
}

.detail-cover-image {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center top;
  border-radius: 8px;
  background: var(--linen);
}

.detail-cover-image.full-cover-image {
  object-fit: cover;
  object-position: center center;
  background:
    radial-gradient(circle at 50% 20%, rgba(216, 169, 95, .18), transparent 60%),
    var(--cosmic);
}

.card-body {
  padding: 18px;
}

.inline-editor {
  margin-top: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, .74);
}

.inline-editor h3 {
  margin-bottom: 12px;
}

.image-manager {
  display: grid;
  gap: 16px;
}

.image-edit-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, .74);
}

.image-edit-card > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center top;
  border-radius: 8px;
  background: var(--linen);
}

.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(216, 169, 95, .2);
  color: #6e4d1e;
  font-size: 12px;
  font-weight: 800;
}

.tag.teal { background: rgba(102, 80, 183, .15); color: #4c3a91; }
.tag.rose { background: rgba(185, 109, 143, .16); color: #8a3f63; }
.tag.sage { background: rgba(114, 141, 146, .18); color: #405f65; }

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(47, 124, 130, .08);
}

.summary-row.compact {
  min-height: auto;
  margin-top: 12px;
  padding: 10px;
  font-size: 14px;
}

.summary-row.compact strong {
  overflow-wrap: anywhere;
  text-align: right;
}

.payment-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.payment-option {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, .64);
}

.primary-payment-option {
  border-color: rgba(47, 124, 130, .32);
  background: linear-gradient(180deg, rgba(47, 124, 130, .1), rgba(255, 253, 248, .76));
}

.payment-option-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.payment-option h3 {
  margin-bottom: 6px;
}

.payment-option p {
  margin-bottom: 0;
}

.payment-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  text-decoration: none;
}

.payment-setup-note {
  margin-top: 14px;
}

.payment-backups summary {
  cursor: pointer;
  font-weight: 850;
}

.payment-backups[open] summary {
  margin-bottom: 10px;
}

.donation-page {
  min-height: 560px;
}

.donation-panel {
  display: grid;
  gap: 18px;
  max-width: 880px;
}

.donation-panel h3 {
  max-width: 640px;
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.05;
}

.donation-cta {
  min-width: min(100%, 220px);
  justify-content: center;
}

.donation-panel .actions {
  align-items: stretch;
}

.donation-panel .payment-link {
  text-align: center;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filters {
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chip.active {
  border-color: var(--rose);
  background: var(--rose);
  color: var(--white);
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.side-list {
  display: grid;
  gap: 8px;
}

.side-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.side-list button.active {
  border-color: rgba(47, 124, 130, .28);
  background: rgba(47, 124, 130, .1);
}

.stat strong {
  display: block;
  margin-bottom: 4px;
  font-size: 30px;
}

.list {
  display: grid;
  gap: 10px;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(110px, .5fr) minmax(130px, .7fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 12px;
}

.row.compact {
  min-height: 54px;
  box-shadow: none;
}

.content-manager {
  margin-top: 20px;
}

.media-row small {
  overflow-wrap: anywhere;
}

.media-status {
  margin-top: 16px;
}

.formatted-text p {
  margin: 0 0 12px;
}

.formatted-text p:last-child {
  margin-bottom: 0;
}

.formatted-text a {
  color: var(--teal);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.lesson-notes {
  margin-top: 10px;
}

.lesson-notes summary {
  cursor: pointer;
  color: var(--teal-dark);
  font-weight: 700;
}

.lesson-notes .formatted-text {
  margin-top: 10px;
  color: var(--muted);
}

.player {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 241, .78);
}

.player img {
  width: 92px;
  height: 92px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
  background: var(--linen);
}

.player img.full-player-image {
  object-fit: cover;
  object-position: center center;
  background: var(--cosmic);
}

.player audio,
.embedded-player audio,
.embedded-player video {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 10px;
}

.embedded-player video {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #171412;
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(71, 45, 112, .14);
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

input, select, textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--white);
  color: var(--ink);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 76px;
}

.password-toggle {
  position: absolute;
  top: 6px;
  right: 6px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(255, 253, 248, .92);
  color: var(--ink);
}

textarea {
  min-height: 92px;
  padding: 12px;
  resize: vertical;
}

.full { grid-column: 1 / -1; }

.notice {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(120, 148, 127, .18);
  color: #405d48;
  font-weight: 800;
}

.notice.show { display: block; }

button:disabled {
  cursor: wait;
  opacity: .62;
}

.auth-notice {
  margin-top: 0;
  margin-bottom: 18px;
}

@media (max-width: 960px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-banner {
    min-height: 220px;
    background:
      linear-gradient(90deg, rgba(6, 7, 22, .88) 0%, rgba(18, 12, 47, .58) 44%, rgba(48, 31, 86, .18) 78%, rgba(9, 10, 31, .28) 100%),
      radial-gradient(circle at 74% 48%, rgba(230, 198, 238, .16), transparent 16rem),
      url("./assets/header-joanna-cosmos-2026-07-05.png") center top / 100% auto no-repeat;
  }

  .brand-banner span {
    max-width: 48vw;
  }

  .grid,
  .grid.two,
  .path-grid,
  .stats,
  .layout {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .payment-option-head {
    flex-direction: column;
  }

  .image-edit-card {
    grid-template-columns: 1fr;
  }

  .summary-row.compact {
    align-items: start;
    flex-direction: column;
  }

  .summary-row.compact strong {
    text-align: left;
  }

  .row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand-banner {
    min-height: 190px;
    padding: 18px 16px;
    background:
      linear-gradient(90deg, rgba(6, 7, 22, .92) 0%, rgba(18, 12, 47, .7) 58%, rgba(48, 31, 86, .24) 100%),
      radial-gradient(circle at 78% 48%, rgba(230, 198, 238, .14), transparent 12rem),
      url("./assets/header-joanna-cosmos-2026-07-05.png") center top / 100% auto no-repeat;
  }

  .brand-banner span {
    max-width: 54vw;
    font-size: clamp(34px, 10vw, 52px);
  }

  .hero {
    min-height: 590px;
    padding: 24px 16px;
    background-position: 58% top;
  }

  .hero-brand {
    font-size: clamp(46px, 15vw, 72px);
  }

  .hero h1 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .donation-page {
    min-height: 0;
  }

  .donation-panel {
    gap: 16px;
    padding: 16px;
  }

  .donation-panel h3 {
    font-size: 30px;
  }

  .donation-panel .actions {
    flex-direction: column;
  }

  .donation-panel .payment-link {
    width: 100%;
    min-height: 46px;
  }

  .card img { height: 188px; }

  .player {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .player img {
    width: 72px;
    height: 72px;
  }

  .player .primary,
  .player .secondary {
    grid-column: 1 / -1;
  }

  form {
    grid-template-columns: 1fr;
  }
}
