/* Journey page accordion (static/journey.js). Additive: nothing here applies without the script's classes. */
.srow-h { margin: 0; font-size: 1rem; font-weight: inherit; font-family: inherit; }
.srow-acc .srow-summary { margin: -6px 12px 10px 60px; }
.srows .srow-acc button.srow-link { width: 100%; text-align: left; background: none; border: 0; font: inherit; color: inherit;
  cursor: pointer; box-shadow: none; }
.srows .srow-acc button.srow-link:hover { background: var(--bg); }
.srow-chev { width: .55em; height: .55em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); margin: 0 4px 3px 6px; flex: none; }
.srow-acc.is-open .srow-chev { transform: rotate(225deg); margin-bottom: -3px; }
.srow-acc { scroll-margin-top: var(--jscroll, 80px); }

.acc-panel { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .25s ease, visibility 0s linear .25s; }
.acc-panel.is-open { grid-template-rows: 1fr; visibility: visible; transition-delay: 0s; }
.acc-inner { overflow: hidden; min-height: 0; }
.acc-body { padding: 4px 12px 16px 12px; }
@media (prefers-reduced-motion: reduce) { .acc-panel, .acc-panel.is-open { transition: none; } }

.acc-skeleton { display: grid; gap: 10px; padding: 8px 0; }
.acc-skeleton span { display: block; height: 14px; border-radius: 6px; background: var(--line); opacity: .6; }
.acc-skeleton span:nth-child(1) { width: 40%; } .acc-skeleton span:nth-child(2) { width: 90%; } .acc-skeleton span:nth-child(3) { width: 70%; }
@media (prefers-reduced-motion: no-preference) { .acc-skeleton span { animation: acc-pulse 1.4s ease-in-out infinite; } }
@keyframes acc-pulse { 50% { opacity: .25; } }

.jp-h { margin: 8px 0 4px; font-size: 1.05rem; }
.jp-h:focus { outline: none; }
.jp-h:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.jp-sub { margin: 14px 0 6px; font-size: .9rem; color: var(--muted); font-weight: 600; }
.jp-play { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.jp-phases { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.jp-settings { margin-top: 14px; }
.jp-settings textarea { width: 100%; }
.jp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.jp-error { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.jplayer { position: sticky; bottom: 0; z-index: 15; margin-top: 24px; }
/* The bar's own bottom padding clears the iPhone home indicator; the card itself is never cut off. */
.jplayer .player { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) }
.jplayer[hidden] { display: none; }
.jplayer .player { margin-top: 0; box-shadow: 0 -4px 18px rgba(0, 0, 0, .12); }
.jplayer { transform: translateZ(0); }       /* own layer: Safari repaints a sticky box over scrolling content cleanly */
@media (max-width: 560px) {
  /* Phones: pinned to the screen edge instead of sticky inside <main>, so the Safari toolbar and the end of
     the content can never leave it half cut off; the page gets room under the last section. */
  .jplayer { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding: 0 max(8px, env(safe-area-inset-left)) 0 max(8px, env(safe-area-inset-right)); }
  .jplayer .player { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-width: 0; }
  body:has(.jplayer:not([hidden])) main { padding-bottom: 210px; }
}
.jplayer .chapters { display: none; }
.jplayer .player .pp { width: 48px; height: 48px; font-size: 1.2rem; }
.srow-acc.is-playing .srow-title::before { content: "♪ "; }
.practise ul { padding-left: 1.2em; }

/* Ways to listen: one card, equal rows */
.ways { margin: 16px 0 24px; }
.ways h2 { margin-top: 0; font-size: 1.15rem; }
.ways-list { list-style: none; margin: 10px 0; padding: 0; }
.way { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.way:first-child { border-top: 0; }
.way-price { font-variant-numeric: tabular-nums; text-align: right; }
.way-act { min-width: 7.5rem; text-align: right; }
.way-act form { margin: 0; }
@media (max-width: 560px) {
  .way { grid-template-columns: minmax(0, 1fr) auto; }
  .way-label { grid-column: 1 / -1; }
  .way-act { grid-column: 1 / -1; text-align: left; }
  .way-act .btn { width: 100%; }
}

/* Locked rows: a quiet icon and "Session n"; the rule is stated once above the list */
.srow-n { color: var(--muted); font-size: .85rem; }
.unlock-note { margin: 0 0 8px; }

/* Flat session rows (2026-10-13): one Listen and "Edit text" per row; no panels. */
.srows .srow-flat { display: block; padding: 12px 8px; }
.srow-flat:hover { background: transparent; }
.srow-line { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; }
.srow-flat .srow-icon, .srow-flat.is-next .srow-icon { width: 1.6rem; height: 1.6rem; background: none; color: var(--faint); }
.srow-flat.is-next .srow-icon { color: var(--accent); }
.srow-flat .srow-icon .icon, .srow-flat.is-next .srow-icon .icon { width: 18px; height: 18px; margin: 0; }
.srow-flat.is-next { box-shadow: inset 3px 0 0 var(--glow); }
.srow-flat .srow-h { display: flex; gap: 6px; min-width: 0; align-items: baseline; }
.srow-flat .srow-n { text-align: left; min-width: 0; flex: none; }
.srow-flat .srow-summary { margin: 4px 0 0 calc(1.6rem + 10px); }
.srow-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 8px 0 0 calc(1.6rem + 10px); }
.srow-status:empty, .srow-lock:empty { display: none; }
.srow-status, .srow-lock { margin: 4px 0 0 calc(1.6rem + 10px); }
.srow-flat.is-playing .srow-title::before { content: "♪ "; }
@media (max-width: 560px) {
  .srow-line { grid-template-columns: 1.4rem minmax(0, 1fr); }
  .srow-line .srow-meta { grid-column: 2; }
  .srow-actions, .srow-flat .srow-summary, .srow-status, .srow-lock { margin-left: calc(1.4rem + 10px); }
}
.jtop { margin: 16px 0; }
.jtop-next { margin: 8px 0 0; }
.journey-edit { margin: 0 0 24px; }
.journey-edit h2 { margin-top: 0; font-size: 1.15rem; }
.journey-edit h2:focus { outline: none; }
.journey-edit details { margin: 12px 0; }
/* The journey settings row (a <details>): the summary is the label and shows the current values. */
.journey-edit > summary.jset-row { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding-right: 1.5rem; position: relative; min-height: 44px; align-content: center; }
.journey-edit > summary.jset-row::-webkit-details-marker { display: none; }
.journey-edit > summary.jset-row::after { content: ""; position: absolute; right: 4px; top: 50%; width: .5em; height: .5em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-70%) rotate(45deg); }
.journey-edit[open] > summary.jset-row::after { transform: translateY(-30%) rotate(225deg); }
.journey-edit > summary.jset-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.journey-edit[open] > summary.jset-row { margin-bottom: 8px; }

/* Settings panel (UX review 3.3, 2026-10-13): one panel, plain sections (no nested collapses); every field saves itself. */
.jset-section { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.jset-section > h3 { margin: 0 0 8px; font-size: 1rem; }
.jset-saved { margin: 12px 0 0; min-height: 1.4em; color: var(--muted); }
.journey-edit .guide-summary { display: flex; margin: 0 0 8px; }
.journey-edit select, .journey-edit input[type=range] { min-height: 44px; }
.live-action { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.live-action .btn { min-height: 44px; }
