.guided-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: clamp(.85rem, 2.6vw, 1.75rem);
}

.guided-choice {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--rule);
  border-radius: .8rem;
  background: var(--public-surface);
}

.guided-choice-link {
  display: grid;
  align-content: start;
  flex: 1;
  border-radius: inherit;
  color: inherit;
  text-decoration: none;
}

.guided-art {
  display: block;
  width: 100%;
  height: clamp(9rem, 14vw, 12.5rem);
  border-radius: .75rem .75rem 0 0;
  background: #121715;
  object-fit: cover;
}

.guided-choice-copy {
  position: relative;
  padding: clamp(.9rem, 2.5vw, 1.7rem);
  padding-inline-end: clamp(2.5rem, 5vw, 4rem);
}
.guided-choice-copy h2 { margin: .28rem 0 .4rem; font-size: clamp(1.45rem, 3vw, 1.875rem); }
.guided-detail, .guided-summary { color: var(--muted); }
.guided-detail { font-size: .875rem; }
.guided-choice-arrow {
  position: absolute;
  right: clamp(.75rem, 2.4vw, 1.5rem);
  bottom: clamp(.9rem, 2.5vw, 1.7rem);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--public-action);
}
.guided-choice-link:is(:hover, :focus-visible) .guided-choice-arrow {
  border-color: var(--public-action);
  background: var(--public-action);
  color: var(--public-surface);
}

.guided-session {
  border: 1px solid var(--rule);
  border-radius: .75rem;
  background: var(--public-surface);
}
.guided-session-copy { padding: clamp(1rem, 4vw, 2rem); }
.guided-session-copy p { max-width: 52ch; }
.guided-completion {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 .8rem;
  padding: .18rem clamp(.9rem, 2.5vw, 1.7rem);
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .875rem;
}
.guided-completion a {
  min-height: 44px;
  padding-block: .7rem;
  color: var(--public-action);
  font-weight: 400;
}
.guided-timer-controls { display: flex; flex-wrap: wrap; gap: .5rem; }
.guided-timer-panel input {
  box-sizing: border-box;
  width: 5rem;
  min-height: 44px;
  padding: .45rem;
  border: 1px solid currentColor;
  border-radius: .3rem;
  color: inherit;
  font: inherit;
}

html:has(.guided-active[open]) { overflow: hidden; overscroll-behavior: none; }

.guided-active {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: max(clamp(.85rem, 3vw, 2rem), env(safe-area-inset-top))
    max(clamp(.85rem, 3vw, 2rem), env(safe-area-inset-right))
    max(clamp(.85rem, 3vw, 2rem), env(safe-area-inset-bottom))
    max(clamp(.85rem, 3vw, 2rem), env(safe-area-inset-left));
  border: 0;
  background: #080808;
  color: #fff4df;
  color-scheme: dark;
}
.guided-active[open] {
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.guided-active::backdrop { background: #080808; }
.guided-active:is(.guided-active--bells, .guided-active--river) { background: #17211d; }
.guided-active:is(.guided-active--bells, .guided-active--river)::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(#101815a8, transparent 23%, transparent 70%, #101815c4);
  pointer-events: none;
  content: "";
}
.guided-lake-scene, .guided-river-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.guided-river-motion { visibility: hidden; pointer-events: none; }
.guided-river-motion[data-motion-ready] { visibility: visible; }
.guided-river-scene { filter: brightness(.88); }

.guided-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.guided-icon[hidden] { display: none; }
.guided-icon::-webkit-details-marker { display: none; }
.guided-icon svg {
  flex: 0 0 auto;
  width: 1.3rem;
  height: 1.3rem;
  filter: drop-shadow(0 1px 2px #000);
}
.guided-icon:hover, details[open] > .guided-icon { color: #fff; }
.guided-icon:is(:focus-visible, :has(:focus-visible)) {
  border-radius: .35rem;
  outline: 2px solid #fff4df;
  outline-offset: -2px;
}
.guided-active:not([data-practice-fullscreen]) [data-control-icon="contract"],
.guided-active[data-practice-fullscreen] [data-control-icon="expand"] { display: none; }
.guided-active :focus-visible { outline-color: #dcc4a8; }
.guided-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.guided-active-header, .guided-active-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .4rem .85rem;
}
.guided-active-header h2 { color: inherit; font-size: clamp(1.25rem, 3vw, 1.875rem); }
.guided-active-footer { grid-row: 3; z-index: 2; }
.guided-active[data-practice-fullscreen] { overflow: hidden; overscroll-behavior: none; }
.guided-active[data-practice-fullscreen] :is(.guided-active-header, .guided-cue, .guided-timer, .guided-toggle, [data-guided-end], [data-audio-retry], .guided-audio-status) {
  display: none;
}
.guided-active[data-controls-hidden] { cursor: none; }
.guided-active :is(.guided-active-header, .guided-active-footer) { transition: opacity .18s ease; }
.guided-active[data-controls-hidden] :is(.guided-active-header, .guided-active-footer) {
  opacity: 0;
  pointer-events: none;
}
.guided-active[data-controls-hidden] :is(.guided-active-header, .guided-active-footer) * {
  cursor: none;
}
.guided-cue { color: #fff4dfd9; font-size: .9rem; }
.guided-bell-total { color: #fff4df; font-size: 1.15rem; font-weight: 600; }
.guided-audio-status {
  position: relative;
  z-index: 1;
  align-self: center;
  justify-self: center;
  text-align: center;
}
.guided-session-settings {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  max-width: 100%;
  gap: .15rem;
  margin-inline-start: auto;
}
.guided-bell-mode {
  width: auto;
  min-width: 44px;
  padding-inline: .35rem;
  font-size: .82rem;
}
.guided-bell-mode[aria-pressed="true"] {
  text-decoration: underline;
  text-underline-offset: .28em;
  text-decoration-thickness: 2px;
}
.guided-bell-mode[aria-busy="true"] { opacity: .65; }
.guided-volume-panel, .guided-timer-panel {
  position: absolute;
  z-index: 1;
  inset-inline-end: 0;
  bottom: calc(100% + .55rem);
  border: 1px solid #fff4df85;
  border-radius: .55rem;
  background: #18221e;
}
.guided-volume-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .7rem;
  width: min(14rem, calc(100vw - 2rem));
  padding: .2rem .75rem;
  font-size: .875rem;
}
.guided-volume-panel input {
  width: 100%;
  min-height: 44px;
  padding: 0;
  background: transparent;
  accent-color: #dcc4a8;
}
.guided-volume-panel output { font-variant-numeric: tabular-nums; }
.guided-toggle input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}
.guided-toggle:has(input:checked)::after {
  position: absolute;
  inset: auto calc(50% - .23rem) .23rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
  pointer-events: none;
}
.guided-clock { font-variant-numeric: tabular-nums; }
.guided-clock [data-guided-remaining]:empty { display: none; }
.guided-clock:has([data-guided-remaining]:not(:empty)) { width: auto; gap: .25rem; padding-inline: .4rem; }
.guided-timer-controls { gap: .2rem; }
.guided-timer-panel {
  width: max-content;
  max-width: min(17rem, calc(100vw - 2rem));
  padding: .9rem;
}
.guided-timer-panel label { display: block; margin-bottom: .35rem; font-size: .875rem; }
.guided-timer-panel input { background: #0e1511; }

@media (max-width: 42rem) {
  .guided-choices { grid-template-columns: 1fr; }
  .guided-choice-link { grid-template-columns: clamp(5rem, 25vw, 8rem) minmax(0, 1fr); align-content: stretch; }
  .guided-choice .guided-art { height: 100%; min-height: 7.6rem; border-radius: .75rem 0 0 .75rem; }
  .guided-choice-copy h2 { font-size: 1.45rem; }
  .guided-summary { font-size: .9rem; }
  .guided-choice-arrow { width: 1.6rem; height: 1.6rem; bottom: .8rem; }
  .guided-active-footer { align-content: end; }
}

@media (max-aspect-ratio: 3/4) {
  .guided-active--river { overflow: hidden; }
  .guided-active--river::before {
    position: absolute;
    inset: -24px;
    background: url("assets/guided-river-ashram.webp") center / cover;
    filter: blur(24px) brightness(.44);
    content: "";
  }
  .guided-river-scene {
    inset-block: 19% auto;
    height: 62%;
    object-position: 56% center;
    mask-image: linear-gradient(transparent, black 8%, black 92%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .guided-active :is(.guided-active-header, .guided-active-footer) { transition: none; }
}
