/*
 * Indo-Deco decoration, loaded last: lattice background, double gold frames, jharokha arches
 * and diamond details. Ornament stays in frames and headings so questions remain easy to read.
 */
body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    url('../assets/images/jali.svg') repeat,
    radial-gradient(900px 520px at 50% -10%, rgba(46, 156, 120, 0.3), transparent 70%),
    radial-gradient(800px 600px at 105% 100%, rgba(156, 47, 94, 0.2), transparent 70%),
    var(--color-bg);
}

/* ---- headings ---- */
h1, h2 { letter-spacing: 0.04em; }
h1::after {
  content: '';
  display: block;
  width: 200px;
  max-width: 100%;
  height: 20px;
  margin-top: 14px;
  background: url('../assets/images/ornament.svg') left center / contain no-repeat;
}
.result h1::after { margin-left: auto; margin-right: auto; background-position: center; }
/* Questions stay plain so they are easy to read. */
h1.question::after { display: none; }

.brand { display: flex; align-items: center; gap: 12px; font-size: 24px; letter-spacing: 0.16em; text-transform: uppercase; }
.brand::before {
  content: '';
  width: 38px;
  height: 38px;
  background: url('../assets/images/lotus-mark.svg') center / contain no-repeat;
}

.header {
  padding-bottom: 20px;
  border-bottom: 3px double var(--color-accent);
}
.nav { font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; }
.nav a { padding: 10px 2px 8px; text-decoration: none; color: var(--color-muted); border-bottom: 1px solid transparent; }
.nav a[aria-current="page"],
.nav a:focus-visible { color: var(--color-accent-hover); border-bottom-color: var(--color-accent); }

/* ---- frames: a gold line, a gap, and a fainter inner line, with corner steps ---- */
.card,
.steps article,
.body-map__view,
.feature {
  position: relative;
  border: 1px solid var(--color-accent);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(15, 70, 71, 0.94), rgba(6, 38, 42, 0.96));
  box-shadow:
    inset 0 0 0 5px rgba(4, 26, 29, 0.75),
    inset 0 0 0 6px var(--gold-soft),
    0 18px 40px rgba(2, 14, 16, 0.45);
}
.card::before,
.card::after,
.feature::before,
.feature::after,
.steps article::before,
.steps article::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-accent);
  pointer-events: none;
}
.card::before, .feature::before, .steps article::before { top: -6px; left: -6px; border-right: 0; border-bottom: 0; }
.card::after, .feature::after, .steps article::after { right: -6px; bottom: -6px; border-left: 0; border-top: 0; }

/* Jharokha arches. */
.steps article { border-radius: 130px 130px 2px 2px; padding-top: 44px; }
.steps article::before, .steps article::after { display: none; }
.steps img { border-radius: 90px 90px 0 0; border: 1px solid var(--color-accent); }
.steps h2, .steps p { text-align: center; }
.body-map__view { border-radius: 140px 140px 2px 2px; padding-top: 28px; }
.body-map__view strong { font: 400 20px var(--font-heading); letter-spacing: 0.2em; text-transform: uppercase; color: var(--color-accent); }

.hero__art { border-radius: 2px; border: 1px solid var(--color-accent); }
.banner { border: 1px solid var(--color-accent); border-radius: 2px; }

.eyebrow,
.hero__text p.eyebrow { text-transform: uppercase; letter-spacing: 0.28em; font-size: 14px; color: var(--color-accent); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.feature { display: flex; flex-direction: column; gap: 10px; padding: 32px 28px; text-align: center; }
.feature p { color: var(--color-muted); line-height: 1.6; }
.section-title { margin-bottom: -32px; font-size: 34px; text-align: center; }

/* ---- controls ---- */
.button { transition: background-color 0.15s ease, box-shadow 0.15s ease; }
.button--primary { box-shadow: 0 0 0 3px var(--color-deep), 0 0 0 4px var(--color-accent); }
/* Hover styles only where there is a real pointer, so a tap on a phone does not leave them stuck. */
@media (hover: hover) {
  .nav a:hover { color: var(--color-accent-hover); border-bottom-color: var(--color-accent); }
  .button:not(:disabled):hover { background-color: var(--color-accent-hover); }
  .button--outline:not(:disabled):hover { background-color: var(--color-selected); }
  }
.choice, .chip { border-width: 1px; border-radius: 2px; font-weight: 500; letter-spacing: 0.02em; }
.choice { display: flex; align-items: center; gap: 14px; }
.choice::before {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  border: 1px solid var(--color-accent);
  transform: rotate(45deg);
}
.choice[aria-pressed="true"]::before { background: var(--color-accent); }
.choice[aria-pressed="true"],
.chip[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--color-accent); }

/* Progress and score bars as a row of small steps. */
.bar {
  border-radius: 0;
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 18px, transparent 18px 21px);
  mask-image: repeating-linear-gradient(90deg, #000 0 18px, transparent 18px 21px);
}
.bar > div { border-radius: 0; }

.body-point span { border: 2px solid var(--color-accent); border-radius: 2px; transform: rotate(45deg); width: 20px; height: 20px; }
.body-point[aria-pressed="true"] span { background: var(--color-accent-hover); box-shadow: 0 0 0 4px var(--color-deep), 0 0 0 5px var(--color-accent); }

.warning { border-left: 3px solid var(--color-accent); border-radius: 2px; }
.price { color: var(--color-accent); font-weight: 400; letter-spacing: 0.06em; }
.field input { border-width: 1px; border-radius: 2px; }

/* ---- history ---- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stats div { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--gold-soft); background: rgba(4, 26, 29, 0.6); text-align: center; }
.stats b { font: 400 30px var(--font-heading); color: var(--color-accent); }
.stats span { font-size: 14px; color: var(--color-muted); }

.sessions { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.session { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--gold-soft); border-top: 3px solid var(--chakra); background: rgba(4, 26, 29, 0.6); }
.session__text { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }

.badge { align-self: center; padding: 6px 14px; border-radius: 2px; border: 1px solid var(--color-border-strong); font-size: 14px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.badge--paid { border-color: #4FC08D; color: #8FE3BB; }

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}

/* ---- progress dashboard ---- */
.dashboard { display: flex; flex-direction: column; gap: 24px; }
.section-heading { margin-top: 8px; }
.stats--six { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
.stats--six b { font-size: 21px; line-height: 1.2; overflow-wrap: anywhere; }

.chart-scroll { overflow-x: auto; }
.chart { display: block; width: 100%; min-width: 480px; height: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; color: var(--color-muted); }
.legend span::before { content: ''; display: inline-block; width: 18px; height: 3px; margin-right: 8px; vertical-align: middle; background: var(--color-accent); }
.legend__before::before { background: var(--color-muted); }
.numbers { width: 100%; border-collapse: collapse; font-size: 14px; }
.numbers th, .numbers td { padding: 8px; border-bottom: 1px solid var(--gold-soft); text-align: left; }

.calendar__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calendar__head .chip { width: 44px; padding: 0; font-size: 22px; }
.calendar { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.calendar__name { text-align: center; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-muted); }
.day { min-height: 52px; padding: 6px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--gold-soft); background: rgba(4, 26, 29, 0.55); font-size: 14px; }
.day--blank { border-color: transparent; background: transparent; }
.day--active { border-color: var(--color-accent); }
.day__marks { display: flex; gap: 3px; }
.day__marks i { width: 8px; height: 8px; transform: rotate(45deg); }
.day__marks .day__mark--rated { background: transparent; border: 2px solid; box-sizing: border-box; }

.milestones { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.milestone { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--gold-soft); opacity: 0.8; }
.milestone span:last-child { margin-left: auto; font-size: 14px; white-space: nowrap; }
.milestone__mark { flex: none; width: 12px; height: 12px; border: 1px solid var(--color-accent); transform: rotate(45deg); }
.milestone--done { opacity: 1; border-color: var(--color-accent); }
.milestone--done .milestone__mark { background: var(--color-accent); }

.filters { display: flex; flex-wrap: wrap; gap: 16px; }
.field--inline { flex: 1 1 160px; }
.field--inline select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  background: var(--color-deep);
  color: var(--color-text);
  font: 400 16px var(--font-body);
}
.weeks { display: flex; flex-direction: column; gap: 32px; }

/* ---- the slider screen: sliders beside a live panel ---- */
.weekly { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.weekly__main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.deeper { display: flex; flex-direction: column; gap: 16px; }
.deeper:empty { display: none; }
@media (min-width: 960px) {
  .weekly { grid-template-columns: minmax(0, 1fr) 340px; }
  .live { position: sticky; top: 16px; }
}
@media (max-width: 959px) {
  /* On a phone the start button stays in reach while the sliders scroll. */
  .weekly { padding-bottom: 96px; }
}
.card--needs { box-shadow: 0 0 0 2px var(--color-accent); }

.answer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 0.9fr); align-items: center; gap: 2px 18px; padding: 6px 0; border-top: 1px solid var(--gold-soft); }
.answer:first-of-type { border-top: 0; }
.answer__text { font-size: 16px; line-height: 1.3; grid-column: 1; grid-row: 1; align-self: center; }
.answer__hint { grid-column: 1; grid-row: 2; align-self: start; font-size: 14px; color: var(--color-muted); }
.answer__row { grid-column: 2; grid-row: 1; align-self: center; display: flex; flex-direction: column; gap: 0; }
.answer__row input { width: 100%; height: 32px; accent-color: var(--color-accent); touch-action: pan-y; }
.answer__value { font-size: 14px; color: var(--color-accent); text-align: center; }
.answer__ends { display: none; }
@media (max-width: 640px) {
  .answer { grid-template-columns: 1fr; }
  .answer__text, .answer__hint, .answer__row { grid-column: 1; grid-row: auto; }
}

.priorities { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.priority { display: grid; grid-template-columns: 96px minmax(0, 1fr) 32px; align-items: center; gap: 10px; font-size: 14px; }
.priority .bar > div { transition: width 0.25s ease; }
.priority--top .priority__name { color: var(--color-accent-hover); font-weight: 600; }
.priority--empty { opacity: 0.55; }
.priority span:last-child { text-align: right; }
@media (prefers-reduced-motion: reduce) { .priority .bar > div { transition: none; } }

.suggestion { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--gold-soft); background: rgba(4, 26, 29, 0.55); }
.suggestion__label { font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--color-muted); }
.suggestion__title { font: 400 26px var(--font-heading); letter-spacing: 0.04em; }
.suggestion__meta { font-size: 15px; }

.tune summary, .body-details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 500; }
.tune .chips { margin-top: 10px; }
.body-details[open] summary { margin-bottom: 12px; }
.link { padding: 0; border: 0; background: none; color: var(--color-accent); font: inherit; text-decoration: underline; cursor: pointer; }
.chip:disabled { opacity: 0.5; cursor: default; }

/* Plans page and home sample */
.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 10px 8px; text-align: left; border-top: 1px solid var(--gold-soft); vertical-align: top; }
.compare thead th { border-top: 0; color: var(--color-accent); font-weight: 500; }
.compare tbody th { font-weight: 500; }
.plan-faq { padding: 8px 0; border-top: 1px solid var(--gold-soft); }
.plan-faq summary { cursor: pointer; font-weight: 500; }
.sample { padding: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px; align-items: center; }
.sample > .suggestion__meta { grid-column: 1 / -1; }
@media (max-width: 720px) { .sample { grid-template-columns: 1fr; } .compare { font-size: 14px; } }
.sample .priorities { gap: 12px; }
.sample .bar { height: 10px; }

/* ==== Responsive layout shared by every page ============================================ */
.footer { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--gold-soft); }
.footer a { white-space: nowrap; }
.screen { width: 100%; min-width: 0; }
.screen > * { min-width: 0; }
.card { padding: clamp(18px, 4vw, 28px); }
/* Comfortable line length, however wide the page is. */
.card p, .screen > p, .lead { max-width: 75ch; }
.screen > p.warning { max-width: none; }
form.card { width: 100%; max-width: 560px; }
.hero__text p { font-size: clamp(17px, 2.2vw, 20px); }

/* Cards sit side by side when there is room: account, plans, privacy. */
.screen--cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(16px, 3vw, 28px);
  align-items: start;
}
.screen--cards > :not(.card):not(form) { grid-column: 1 / -1; }
.screen--cards > .card--wide { grid-column: 1 / -1; }
.screen--cards > form.card { max-width: none; }

/* The result: headline and melody on the left, scores and offer on the right. */
.screen--result { display: grid; gap: clamp(16px, 3vw, 28px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .screen--result {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    grid-template-areas: "hero hero" "alts alts" "melody scores" "upgrade scores" "note note";
    grid-template-rows: auto auto auto auto auto;
    align-items: start;
  }
  .screen--result > .result { grid-area: hero; }
  .screen--result > .result__alts { grid-area: alts; }
  .screen--result > .result__melody { grid-area: melody; }
  .screen--result > .result__upgrade { grid-area: upgrade; }
  .screen--result > .result__scores { grid-area: scores; }
  .screen--result > .result__note { grid-area: note; }
}

/* Tablets and phones. */
@media (max-width: 900px) { .hero__art { margin-inline: auto; } }
@media (max-width: 760px) {
  .header { flex-direction: column; align-items: flex-start; gap: 10px; padding-bottom: 12px; }
  .brand { font-size: 20px; letter-spacing: 0.12em; }
  .brand::before { width: 30px; height: 30px; }
  .nav { gap: 0 16px; font-size: 14px; letter-spacing: 0.1em; }
  .nav a { padding: 9px 0 7px; }
  .hero { gap: 28px; }
  .hero__art { max-width: 360px; margin-inline: auto; }
  .button { width: 100%; padding-inline: 20px; }
  .actions { flex-direction: column; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
}
@media (max-width: 959px) {
}
/* Very wide screens keep the same container; only the spacing breathes. */
@media (min-width: 1400px) { .page { padding-block: 40px; } }

/* Expandable sections look clickable: a bordered row with a chevron that turns when open. */
.tune summary, .body-details summary {
  list-style: none;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid var(--gold-soft);
  background: rgba(4, 26, 29, 0.55);
  color: var(--color-text);
  transition: border-color 0.15s, background 0.15s;
}
.tune summary::-webkit-details-marker, .body-details summary::-webkit-details-marker { display: none; }
.tune summary::after, .body-details summary::after {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s;
}
.tune[open] > summary::after, .body-details[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
@media (hover: hover) { .tune summary:hover, .body-details summary:hover { border-color: var(--color-accent); background: rgba(21, 86, 80, 0.5); } }
.tune[open] > summary, .body-details[open] > summary { border-color: var(--color-accent); }
@media (prefers-reduced-motion: reduce) { .tune summary::after, .body-details summary::after { transition: none; } }

/* ---- home page, adapted to the signed-in tier ---- */
body[data-tier="loading"] [data-show] { visibility: hidden; }
body[data-tier="visitor"] [data-show]:not([data-show~="visitor"]),
body[data-tier="free"] [data-show]:not([data-show~="free"]),
body[data-tier="paid"] [data-show]:not([data-show~="paid"]) { display: none; }
.welcome { display: flex; flex-direction: column; gap: clamp(16px, 3vw, 28px); }
.welcome:empty { display: none; }
.feature--owned { border-color: #4FC08D; }
.feature--owned::before, .feature--owned::after { border-color: #4FC08D; }
.feature__badge {
  align-self: center;
  padding: 4px 12px;
  border: 1px solid #4FC08D;
  color: #8FE3BB;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.feature__badge::before { content: '✓ '; }
#perks { display: flex; flex-direction: column; gap: clamp(16px, 3vw, 28px); }
#perks > p:last-child { align-self: flex-start; }
#perks .section-title { margin-bottom: 0; }

/* ---- plans: the reader's own plan ---- */
.card--current { border-color: #4FC08D; }
.card--current::before, .card--current::after { border-color: #4FC08D; }
.plan-badge {
  align-self: flex-start;
  padding: 4px 12px;
  border: 1px solid #4FC08D;
  color: #8FE3BB;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.plan-badge::before { content: '✓ '; }
.compare .compare__you { background: rgba(79, 192, 141, 0.12); }
.compare thead .compare__you { color: #8FE3BB; }

/* Cards of different heights flow down newspaper-style columns, so there are no gaps between them. */
.screen--columns { display: block; columns: 2 340px; column-gap: clamp(16px, 3vw, 28px); }
.screen--columns > * { break-inside: avoid; margin-bottom: clamp(16px, 3vw, 28px); }
.screen--columns > h1, .screen--columns > .warning { column-span: all; }
.screen--columns > .card { width: 100%; }

/* ---- the slider screen is compact: little space around titles and between statements ---- */
.weekly__main { gap: 20px; }
.weekly .card { gap: 8px; padding: 16px clamp(16px, 3vw, 22px); }
.weekly .card h2 { font-size: 21px; line-height: 1.2; }
.weekly .card h3 { margin: 0; font: 400 19px/1.2 var(--font-heading); letter-spacing: 0.05em; color: var(--color-accent); }
.weekly .answer { padding: 3px 0; gap: 0 18px; }
.weekly .answer__text { font-size: 15.5px; }
.weekly .answer__row input { height: 28px; }
.weekly .answer__value { line-height: 1.1; }
.weekly .deeper { gap: 16px; }
.weekly .deeper > h2 { font-size: 21px; }
.weekly .deeper > p { font-size: 14px; }
.weekly .chips { gap: 8px; }
.weekly .chip { min-height: 38px; }
.weekly .body-details summary, .weekly .tune summary { min-height: 44px; }

/* ---- history: the weekly chart and the calendar are compact and sit side by side ---- */
.dash-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: stretch; }
.dash-pair > * { min-width: 0; }
.dash-pair > div > .card { height: 100%; }
@media (min-width: 900px) { .dash-pair { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); } }
.dash-pair .card { gap: 10px; padding: 16px clamp(16px, 3vw, 22px); }
.dash-pair .card h2 { font-size: 21px; }
.dash-pair .legend { gap: 14px; font-size: 14px; }
.dash-pair .chart { min-width: 0; }
.dash-pair .calendar { gap: 3px; }
.dash-pair .calendar__name { font-size: 14px; }
.dash-pair .day { min-height: 34px; padding: 3px 5px; font-size: 14px; }
.dash-pair .day__marks i { width: 6px; height: 6px; }
.dash-pair .calendar__head .chip { width: 34px; min-height: 34px; font-size: 18px; }
.dash-pair .calendar__head h2 { font-size: 19px; }

/* The logo links to the home page and keeps its look. */
a.brand { color: var(--color-text); text-decoration: none; }
@media (hover: hover) { a.brand:hover { color: var(--color-accent-hover); } }

/* Ratings of one melody on the history page */
.session__more { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px solid var(--gold-soft); font-size: 15px; }
.session__more p { margin: 0; }
.spark-row { display: flex; align-items: center; gap: 12px; }
.spark { width: 120px; height: 32px; flex: none; }
.ratings { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ratings li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.rate { display: block; }
.rate > .chips { margin-top: 8px; }

/* Confirmation overlay (ui/confirm.js), drawn like a card on a dimmed page */
.dialog, .sheet {
  /* .card sets position: relative, which would put the overlay at the end of the page, out of
     sight (seen on iPhones). A modal must stay fixed in the middle of what the customer sees. */
  position: fixed;
  inset: 0;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 28px 24px 22px;
  margin: auto;
  color: var(--color-text);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dialog:not([open]), .sheet:not([open]) { display: none; }
.dialog::before, .dialog::after, .sheet::before, .sheet::after { display: none; }
.sheet { border: 1px solid var(--color-accent); background: linear-gradient(180deg, rgba(15, 70, 71, 0.98), rgba(6, 38, 42, 0.99)); }
.sheet::backdrop { background: rgba(2, 14, 16, 0.72); }
.dialog::backdrop { background: rgba(2, 14, 16, 0.72); }
.dialog h2 { margin: 0 0 10px; }
.dialog p { margin: 0 0 18px; }
.dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.dialog--feedback { width: min(520px, calc(100vw - 32px)); display: none; }
.dialog--feedback[open] { display: flex; flex-direction: column; gap: 16px; }
.dialog--feedback h2, .dialog--feedback p { margin: 0; }
.dialog--feedback h2:focus { outline: none; }

/* ---- plans: membership card ---- */
.membership__price { margin: 0; font-size: 18px; color: var(--color-muted, inherit); }
.membership__price strong { font-size: 34px; font-weight: 500; color: var(--color-accent); margin-right: 4px; }
.membership__perks { list-style: none; margin: 8px 0; padding: 14px 0; border-block: 1px solid var(--gold-soft); display: grid; gap: 10px; }
.membership__perks li::before { content: '\2713'; color: #4FC08D; margin-right: 12px; }
.membership h3 { margin: 4px 0 0; font-size: 20px; }
.membership__agree { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.membership__agree input { width: 22px; height: 22px; flex: none; }
.membership .button { width: 100%; }
.membership .button:disabled { opacity: 0.55; cursor: not-allowed; }
.membership__foot { text-align: center; }

/* ---- footer, legal pages, cookie banner ---- */
.footer { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.footer p { margin: 0; }
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__name { font: 400 26px/1 var(--font-heading); letter-spacing: 0.16em; text-transform: uppercase; color: var(--color-accent); }
.footer__tagline { font-size: 16px; color: var(--color-muted); letter-spacing: 0.04em; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.footer__links a { white-space: normal; }
.legal { display: grid; gap: clamp(16px, 3vw, 24px); }
.legal > * { margin: 0; }
.legal .card { display: grid; gap: 10px; }
.legal .card h2 { font-size: 22px; }
.legal .card p, .legal .card ul { margin: 0; }
.legal__list { padding-left: 22px; display: grid; gap: 6px; }
.pref { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 14px 0; border-top: 1px solid var(--gold-soft); }
.pref:first-child { border-top: 0; padding-top: 0; }
.pref h2 { font-size: 22px; margin: 0 0 4px; }
.pref p { margin: 0; }
.pref__fixed { color: var(--color-accent); font-weight: 500; }
.pref__switch { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.pref__switch input { width: 22px; height: 22px; accent-color: var(--color-accent); }
.request { display: grid; gap: 16px; max-width: 560px; }
.request select, .request textarea {
  padding: 12px 14px; border: 2px solid var(--color-border); border-radius: 12px;
  background: var(--color-bg); color: var(--color-text); font: 400 16px var(--font-body);
}
.banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; max-width: 960px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding: 16px 20px; border: 1px solid var(--color-accent); border-radius: 16px;
  background: var(--color-bg); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}
.banner h2 { font-size: 20px; margin: 0 0 4px; }
.banner p { margin: 0; max-width: 60ch; }
.banner__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.footer__tagline em { font-style: italic; }
.footer__tagline sup { font-size: 0.6em; margin-left: 2px; font-style: normal; }

.membership--member { display: grid; gap: 20px clamp(24px, 5vw, 56px); align-items: center; }
.membership__plan { display: grid; gap: 10px; align-content: start; justify-items: start; }
.membership__plan .button { width: 100%; max-width: 360px; }
.membership__included .membership__perks { border-block: 0; margin: 0; padding: 0; }
@media (min-width: 800px) {
  .membership--member { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .membership__included { padding-left: clamp(24px, 5vw, 56px); border-left: 1px solid var(--gold-soft); }
}

/* ---- tester notes (testing period) ---- */
.footer__tester { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 22px; }
.footer__notes { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0; border: 0; background: none; color: var(--color-accent); font: inherit; cursor: pointer; text-decoration: underline; }
.dialog--notes { width: min(560px, calc(100vw - 32px)); }
.dialog--notes form { display: flex; flex-direction: column; gap: 14px; }
.dialog--notes h2, .dialog--notes p { margin: 0; }
.dialog--notes textarea, .legal input[type="search"] {
  padding: 12px 14px; border: 2px solid var(--color-border); border-radius: 12px;
  background: var(--color-bg); color: var(--color-text); font: 400 16px var(--font-body); width: 100%;
}
.notes-list { display: grid; gap: 12px; }
.note-item { display: grid; gap: 8px; }
.note-item p { margin: 0; }
.note-item__text { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ==== Mobile first (plan: .claude/docs/plans/mobile-first-ui-plan.md) ====================
   Everything below is the phone behaviour; larger screens opt out with min-width queries.
   Breakpoints: 600 (large phone), 760 (inline menu), 900/960 (side-by-side panels), 1200. */

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(217, 180, 91, 0.25); }
a, button, summary, label, input, select, textarea { touch-action: manipulation; }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100; padding: 12px 18px;
  background: var(--color-accent); color: var(--color-deep); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Disabled controls look disabled (dashed, flat) rather than a dimmed version of the live ones. */
.button:disabled, .button--primary:disabled {
  opacity: 1; background: #173F42; color: #C2D3C6; border: 1px dashed #7FA697; box-shadow: none; cursor: not-allowed;
}
.chip:disabled, .choice:disabled { opacity: 0.6; }

.check { min-height: 44px; align-items: center; }
.check input { width: 24px; height: 24px; }
.link { min-height: 44px; padding: 0 4px; }
.chip, .choice { min-height: 44px; }

/* ---- sliders: a 44 px touch area, a visible track and a large handle ---- */
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; padding: 0; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: #7FA697; }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 4px; background: #7FA697; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%;
  background: var(--color-accent); border: 3px solid var(--color-deep); box-shadow: 0 0 0 1px var(--color-accent);
}
input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; background: var(--color-accent); border: 3px solid var(--color-deep); box-shadow: 0 0 0 1px var(--color-accent);
}
.weekly .answer__row input[type="range"], .answer__row input[type="range"] { height: 44px; }
.answer__ends { display: flex; justify-content: space-between; grid-column: 2; grid-row: 2; font-size: 14px; color: var(--color-muted); }
.weekly .answer { padding: 12px 0; }
.answer__value { font-size: 14px; }
@media (max-width: 640px) {
  .answer__ends { grid-column: 1; grid-row: auto; }
  .answer__row { order: 0; }
}

/* ---- the phone start bar: leading theme and the start button stay in view ---- */
.startbar { display: block; }
.startbar__summary { display: none; }
@media (max-width: 959px) {
  .startbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
    padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: rgba(4, 26, 29, 0.97); border-top: 1px solid var(--color-accent); box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
  }
  .has-banner .startbar { bottom: calc(var(--banner-h, 0px) + 24px); }
  .startbar .button { width: auto; flex: 0 0 auto; padding-inline: 20px; white-space: nowrap; }
  .startbar__summary {
    display: flex; flex: 1; min-width: 0; flex-direction: column; justify-content: center; gap: 2px; min-height: 52px; padding: 4px 12px;
    border: 1px solid var(--gold-soft); background: rgba(21, 86, 80, 0.4); color: var(--color-text); font: inherit; text-align: left; cursor: pointer;
  }
  .startbar__label { font-size: 14px; color: var(--color-muted); }
  .startbar__text { font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---- header and menu sheet ---- */
.menu-button {
  display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border: 1px solid var(--gold-soft);
  background: rgba(4, 26, 29, 0.6); color: var(--color-text); font: 500 15px var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer;
}
.menu-button__bars {
  width: 18px; height: 14px;
  background: linear-gradient(currentColor 0 2px, transparent 2px 6px, currentColor 6px 8px, transparent 8px 12px, currentColor 12px 14px);
}
@media (max-width: 759px) {
  .header { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 12px; }
  .header .nav { display: none; }
  .menu-button { display: inline-flex; }
}
.menu-sheet nav { display: flex; flex-direction: column; }
.sheet__link {
  display: flex; align-items: center; min-height: 56px; padding: 0 8px;
  color: var(--color-text); font-size: 18px; letter-spacing: 0.04em; text-decoration: none;
}
/* The current page is marked as on desktop: gold text with a thin gold underline under the words. Every row
   keeps the same left edge, so the list stays aligned. */
.sheet__logout { width: 100%; border: 0; background: none; font-family: inherit; text-align: left; cursor: pointer; }
.sheet__logout[hidden] { display: none; }
/* The current page, a focused link and a hovered link are all marked as on desktop: gold text with a thin gold
   underline under the words, never a box. Every row keeps the same left edge. */
.sheet__link[aria-current="page"], .sheet__link:focus-visible {
  color: var(--color-accent-hover); outline: none;
  text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 1px; text-underline-offset: 9px;
}
@media (hover: hover) { .sheet__link:hover { color: var(--color-accent-hover); text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 1px; text-underline-offset: 9px; } }
.sheet__link { -webkit-tap-highlight-color: transparent; }
.sheet h2 { margin: 0 0 12px; }
.sheet .priorities { margin-bottom: 18px; }

/* ---- dialogs and sheets sit at the bottom of a phone, within thumb reach ---- */
@media (max-width: 599px) {
  .dialog, .sheet {
    width: 100%; max-width: none; margin: auto 0 0; border-radius: 16px 16px 0 0;
    padding: 24px max(18px, env(safe-area-inset-left)) calc(20px + env(safe-area-inset-bottom));
  }
  .dialog--notes { margin-bottom: var(--keyboard, 0px); }
  .dialog__actions { flex-direction: column-reverse; align-items: stretch; }
  .dialog__actions .button { width: 100%; }
}

/* ---- footer on phones: large link rows ---- */
@media (max-width: 599px) {
  .footer__links { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; width: 100%; }
  .footer__links a { display: flex; align-items: center; justify-content: center; min-height: 44px; text-align: center; }
  .footer__notes, .footer__tester a { min-height: 44px; }
}
.footer__notes { min-height: 44px; }

/* ---- cookie banner: compact ---- */
.has-banner .page { padding-bottom: calc(var(--banner-h, 0px) + 28px); }
@media (max-width: 599px) {
  .banner { left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); padding: 12px 14px; gap: 10px; }
  .banner h2 { font-size: 18px; }
  .banner p { font-size: 14px; line-height: 1.4; }
  .banner__actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .banner__actions .button { min-height: 48px; padding: 8px; font-size: 14px; letter-spacing: 0.06em; }
  .banner__actions a { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; min-height: 44px; }
}

/* ---- real switches for the cookie choices ---- */
.switch { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--color-text); font: 500 16px var(--font-body); cursor: pointer; }
.switch__track { position: relative; width: 52px; height: 32px; border: 2px solid #7FA697; border-radius: 16px; background: var(--color-deep); }
.switch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #C2D3C6; transition: transform 0.15s; }
.switch[aria-checked="true"] .switch__track { background: var(--color-selected); border-color: var(--color-accent); }
.switch[aria-checked="true"] .switch__track::after { transform: translateX(20px); background: var(--color-accent); }
.switch:disabled { opacity: 0.6; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .switch__track::after { transition: none; } }
.pref .actions, #prefs > .actions { margin-top: 8px; }
#prefs > .note { margin-top: 12px; }

/* ---- result page: the play button stays within reach while the card is on screen ---- */
@media (max-width: 959px) {
  .result__melody [data-key="play"] { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 5; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); }
}

/* ---- phones: roomier choices, readable headings ---- */
@media (max-width: 599px) {
  [aria-label="Your goal"], [aria-label="Goal"] { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  [aria-label="Your goal"] .chip, [aria-label="Goal"] .chip { min-height: 52px; padding: 6px 10px; border-radius: 2px; text-align: center; }
  .chips { gap: 10px; }
  .weekly .chip { min-height: 44px; }
  /* Poiret One has hairline strokes; below the page title it is replaced by Jost on small screens. */
  .card h2, .card h3, .screen h2, .screen h3, .section-heading, .weekly .card h3, .dialog h2, .sheet h2, .banner h2, .section-title {
    font-family: var(--font-body); font-weight: 500; letter-spacing: 0.01em;
  }
  .card h2, .screen h2 { font-size: 22px; }
  .dash-pair .day { min-height: 44px; }
  .dash-pair .calendar__head .chip { width: 44px; min-height: 44px; }
  .dash-pair .calendar { gap: 4px; }
  .session .button, .session .link, .ratings .link, .ratings button { min-height: 44px; }
  .ratings { gap: 10px; }
  .legend { font-size: 14px; }
}

/* ---- comparison tables become one card per row on phones ---- */
@media (max-width: 599px) {
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare { font-size: 15px; }
  .compare tr { padding: 14px 0; border-top: 1px solid var(--gold-soft); }
  .compare tbody th { padding: 0 0 6px; border: 0; font-size: 16px; color: var(--color-accent); }
  .compare td { display: flex; justify-content: space-between; gap: 16px; padding: 4px 6px; border: 0; }
  .compare td::before { content: attr(data-label); color: var(--color-muted); flex: none; }
  .compare td:not([data-label])::before { content: none; }
  .compare td { text-align: right; }
}
a.brand { min-height: 44px; }
.staff { min-width: 480px; }
.tap { display: inline-flex; align-items: center; min-height: 44px; }
/* Sound environment and length chips for people without a membership: tappable, marked as members' choices. */
.chip--locked { border-style: dashed; color: var(--color-muted); }
.chip--locked::after { content: '\1F512'; margin-left: 6px; font-size: 0.8em; }

/* ---- smooth page changes: the browser cross-fades between pages and the header and footer stay still ---- */
@view-transition { navigation: auto; }
.header { view-transition-name: site-header; }
.footer { view-transition-name: site-footer; }
::view-transition-group(root) { animation-duration: 0.18s; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none; } }
/* Content that scripts draw eases in instead of popping. */
#page > main, #page > p { animation: page-in 0.2s ease-out; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #page > main, #page > p { animation: none; } }

/* Pages whose content is drawn by scripts: keep the footer out of sight until the content is there,
   so it does not sit at the bottom of an empty screen and then jump down (a visible flicker). */
:is(#page, #app):not(:has(> :not(noscript))) + .footer { visibility: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- admin pages ---- */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.admin-tabs__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--gold-soft); border-radius: 999px; color: inherit; text-decoration: none; }
.admin-tabs__link[aria-current="page"] { background: var(--color-accent); color: #06262A; }
.admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .admin-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.admin-list { display: grid; gap: 12px; }
.admin-user__email { overflow-wrap: anywhere; font-size: 18px; }
.admin-user__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.admin-user__actions label { display: grid; gap: 4px; }
.admin-user__actions input { width: 90px; }
.admin-tabs ~ input, .admin-user__actions input, .admin-tabs ~ form input { min-height: 44px; font-size: 16px; }
.admin-tabs ~ input[type="search"] { width: 100%; }
.admin-section { display: grid; gap: 12px; margin-top: 24px; }
.admin-segments { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-segment { display: contents; }
.admin-segment .note { flex-basis: 100%; order: 99; margin: 0; }
.admin-filters { display: grid; gap: 12px; margin: 16px 0; }
@media (min-width: 760px) { .admin-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } .admin-insights { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } }
.admin-filters label, .admin-grant label { display: grid; gap: 4px; }
.admin-filters select, .admin-filters input, .admin-grant input { min-height: 44px; font-size: 16px; }
.admin-grant { display: grid; gap: 10px; margin-bottom: 12px; }
.admin-bar { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 8px; margin: 6px 0; }
.admin-bar i { display: block; height: 10px; border-radius: 5px; background: var(--color-accent); }
.admin-segments .choice { min-height: 44px; }
.admin-section input, .admin-section select { min-height: 44px; font-size: 16px; }
.admin-section input[type="search"] { width: 100%; }
.admin-section form label { display: grid; gap: 4px; }

/* ---- compact admin tables ---- */
.dtable { display: grid; gap: 8px; }
.dtable table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dtable th, .dtable td { padding: 4px 10px; border-top: 1px solid var(--gold-soft); text-align: left; vertical-align: middle; }
.dtable thead th { border-top: 0; padding: 0; white-space: nowrap; }
.dtable__sort { min-height: 44px; min-width: 44px; width: 100%; padding: 0 10px; border: 0; background: none; color: var(--color-accent); font: 500 14px var(--font-body, inherit); text-align: inherit; cursor: pointer; }
.dtable__num { text-align: right !important; font-variant-numeric: tabular-nums; }
.dtable__email { display: block; min-width: 180px; overflow-wrap: anywhere; }
.dtable__text { display: block; min-width: 240px; max-width: 520px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dtable td { white-space: nowrap; }
.dtable td:has(.dtable__email), .dtable td:has(.dtable__text) { white-space: normal; }
.dtable__action { min-height: 44px; padding: 0 12px; }
.dtable__pager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.dtable__pager[hidden] { display: none; }
.dtable__pager select { min-height: 44px; font-size: 16px; }
.dtable__info { margin: 0; }
@media (hover: hover) { .dtable tbody tr:hover { background: rgba(255, 255, 255, 0.04); } }

.promo-codes { margin: 0; padding: 12px; border: 1px solid var(--gold-soft); border-radius: 8px; font: 500 16px/1.6 ui-monospace, Menlo, monospace; letter-spacing: 0.08em; user-select: all; white-space: pre-wrap; }

.dialog label { display: grid; gap: 4px; }
.dialog input[type="number"] { min-height: 44px; font-size: 16px; }

.card--offer { border-color: var(--color-accent); }
.plan-badge--offer { background: var(--color-accent); color: #06262A; }

.dtable__code { font: 500 14px ui-monospace, Menlo, monospace; letter-spacing: 0.06em; user-select: all; }

.plan-outline { display: grid; gap: 8px; }
.plan-outline[hidden] { display: none; }
.plan-outline h2 { margin: 0; }
.plan-outline dl { display: grid; gap: 4px 12px; margin: 0; }
.plan-outline dt { color: var(--color-accent); font-weight: 500; margin-top: 8px; }
.plan-outline dd { margin: 0; }

/* ---- the picture shown while a melody plays ----
   A round frame centred on the dog: the video is larger than the frame and shifted so the dog and
   the bowl sit in the middle with even space around them (the empty left of the video is cropped). */
.playing-hero {
  position: fixed; z-index: 30;
  top: calc(env(safe-area-inset-top, 0px) + 76px); right: max(12px, env(safe-area-inset-right, 0px));
  width: clamp(104px, 22vw, 240px); aspect-ratio: 1;
  border: 2px solid var(--color-accent, #D9B45B); border-radius: 50%; overflow: hidden;
  background: #001a1f; box-shadow: 0 0 0 4px rgba(217, 180, 91, 0.18), 0 12px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none; visibility: hidden; opacity: 0; transform: translateY(-6px) scale(0.94);
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0s linear 0.45s;
}
@media (min-width: 760px) { .playing-hero { top: calc(env(safe-area-inset-top, 0px) + 108px); } }
.playing-hero.is-on { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.playing-hero video { position: absolute; display: block; width: 151.6%; height: auto; left: -55.3%; top: -1.6%; max-width: none; }
@media (prefers-reduced-motion: reduce) { .playing-hero { transition: none; } }

/* ---- the phone menu drops down from the line under the header ---- */
dialog.menu-sheet {
  position: fixed; inset: auto; top: var(--menu-top, 76px); left: var(--menu-left, 0px);
  width: var(--menu-width, 100%); max-width: none; margin: 0;
  max-height: calc(100dvh - var(--menu-top, 76px) - 12px); overflow-y: auto;
  padding: 4px 0 8px; border-top: 0; border-radius: 0 0 16px 16px;
}
dialog.menu-sheet:focus { outline: none; }
dialog.menu-sheet .sheet__link { padding: 0 18px; }
/* The header keeps its normal colours while the menu is open: only what lies below the header line is dimmed.
   (Browsers that do not pass --menu-top to the backdrop dim everything, as before.) */
dialog.menu-sheet::backdrop {
  background: linear-gradient(to bottom, transparent var(--menu-top, 0px), rgba(2, 14, 16, 0.72) var(--menu-top, 0px));
}
