/* v1.11 – routine card, situation switch, prayer times at a glance, listening-time heroes, badge worlds.
   Only tokens from app.css (light/dark handled there). No inline styles anywhere (CSP style-src 'self'). */

/* ---- "Jetzt passend" ------------------------------------------------------------------------------ */
.routine-now { display: flex; flex-direction: column; gap: 10px; }
.rn-meta { align-items: center; }
.rn-ctx { display: inline-flex; align-items: center; gap: 6px; color: var(--text-on-accent); }
.rn-ctx .icon { width: 18px; height: 18px; fill: currentColor; }
.rn-steps { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: rn; }
.rn-steps li { counter-increment: rn; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--text-on-accent) 13%, transparent); color: var(--text-on-accent); font-size: .9rem; font-weight: 600; }
.rn-steps li::before { content: counter(rn); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--text-on-accent); color: var(--surface-accent-2); font-size: .72rem; font-weight: 800; }
.rn-switches { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: flex-start; }
.rn-pick { min-width: 0; }
.rn-pick > summary { cursor: pointer; list-style: none; min-height: 44px; display: inline-flex; align-items: center; gap: 6px;
  font-size: .9rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.rn-pick > summary::-webkit-details-marker { display: none; }
.card.hero .rn-pick > summary { color: var(--text-on-accent); }
.rn-pick[open] { flex: 1 1 100%; }
.rn-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 8px; }
.rn-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 999px; font: inherit; font-size: .9rem;
  font-weight: 600; cursor: pointer; text-decoration: none; background: var(--surface); color: var(--text-primary); border: 1px solid var(--border); }
.rn-chip .icon { width: 18px; height: 18px; fill: currentColor; }
.rn-chip:hover { border-color: var(--accent); color: var(--text-primary); }
.rn-chip[aria-pressed="true"], .rn-chip[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
/* inside the green card the chosen chip must not dissolve into the card: gold, like the stage pips */
.card.hero .rn-chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--text-on-gold); box-shadow: 0 0 0 2px var(--text-on-accent); }
.card.hero .rn-pick .hint { color: var(--text-on-accent-muted); }
.rn-player { margin-top: 6px; }
.rn-player > summary { text-decoration: none; color: var(--text-muted); }
.rn-player > summary .icon { width: 16px; height: 16px; fill: currentColor; }
.rn-change { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; margin-inline-start: 4px; }
.rn-advanced > summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 2px; min-height: 44px; }
.rn-advanced > summary::-webkit-details-marker { display: none; }
.rn-advanced > summary h2 { display: flex; align-items: center; gap: 8px; }
.rn-advanced > summary h2::after { content: "▾"; font-size: .8em; color: var(--text-muted); }
.rn-advanced[open] > summary h2::after { content: "▴"; }
.rn-advanced .icon { width: 20px; height: 20px; fill: currentColor; }

/* ---- prayer times at a glance (start page) ----------------------------------------------------------- */
.pm-times { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.pm-times li { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border-radius: 10px; background: var(--surface-2);
  font-size: .72rem; color: var(--text-muted); text-align: center; min-width: 0; }
.pm-times li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pm-times li b { font-size: .92rem; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.pm-times li.pm-sunrise { background: transparent; border: 1px dashed var(--border); }
.pm-times li.pm-next { background: var(--accent); color: var(--on-accent); }
.pm-times li.pm-next b { color: var(--on-accent); }
@media (max-width: 420px) { .pm-times { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---- prayer times page (below the clock) --------------------------------------------------------------- */
.pt-page { max-width: 980px; margin: 24px auto 0; display: flex; flex-direction: column; gap: 16px; }
.pt-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 10px; }
.pt-fact { padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.pt-fact p { margin: 0; }
.pt-fact .pt-k { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
html[dir="rtl"] .pt-fact .pt-k { letter-spacing: 0; }
.pt-fact .pt-v { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.pt-fact .pt-n { font-size: .86rem; color: var(--text-muted); }
.pt-week { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pt-week th, .pt-week td { padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--border); white-space: nowrap; }
.pt-week th:first-child, .pt-week td:first-child { text-align: start; }
.pt-week thead th { font-size: .78rem; color: var(--text-muted); font-weight: 700; }
.pt-week .pt-sunrise { color: var(--text-muted); font-style: italic; }
.pt-week tr.pt-today td { background: var(--accent-soft); font-weight: 700; }
.pt-week tr.pt-friday td:first-child::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-inline-start: 6px; border-radius: 50%; background: var(--gold); vertical-align: middle; }
.pt-page .ltr { font-family: inherit; }
@media (max-width: 480px) {
  .pt-week { font-size: .8rem; }
  .pt-week th, .pt-week td { padding: 7px 3px; }
  .pt-week thead th { font-size: .66rem; white-space: normal; }
}
.pt-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-note { font-size: .86rem; color: var(--text-muted); }
.pt-page h2 { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; }
.pt-page h2 .icon { width: 20px; height: 20px; fill: currentColor; }
@media (max-height: 520px) and (orientation: landscape) { body.prayer-page .pt-page { display: none; } }
body.tablet .pt-page { display: none; }

/* ---- prayer settings: simple first ------------------------------------------------------------------ */
.ps-advanced { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 6px; }
.ps-advanced > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); list-style: none; }
.ps-advanced > summary::-webkit-details-marker { display: none; }
.ps-advanced > summary::after { content: "▾"; }
.ps-advanced[open] > summary::after { content: "▴"; }
.ps-preview { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin: 10px 0; }
.ps-preview div { text-align: center; padding: 6px 2px; border-radius: 10px; background: var(--surface-2); font-size: .72rem; color: var(--text-muted); }
.ps-preview b { display: block; font-size: .95rem; color: var(--text-primary); font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .ps-preview { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---- listening-time heroes (/stats, /impact) ------------------------------------------------------- */
.lt-hero { display: grid; gap: 14px; padding: 20px; border-radius: var(--radius); color: var(--text-on-accent);
  background: linear-gradient(135deg, var(--surface-accent) 0%, var(--surface-accent-2) 100%); }
.lt-hero.lt-impact { background: linear-gradient(135deg, #6b4f1d 0%, #3d2c10 100%); }
.lt-hero .lt-k { margin: 0; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-on-accent-muted); }
html[dir="rtl"] .lt-hero .lt-k { letter-spacing: 0; }
.lt-hero .lt-big { margin: 0; font-size: clamp(2.2rem, 9vw, 3.4rem); line-height: 1.05; font-weight: 800; font-variant-numeric: tabular-nums; }
.lt-hero .lt-big small { font-size: .42em; font-weight: 700; color: var(--text-on-accent-muted); margin-inline-start: 4px; }
.lt-hero .lt-sub { margin: 0; color: var(--text-on-accent-muted); font-size: .92rem; }
.lt-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: 8px; }
.lt-row div { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--text-on-accent) 11%, transparent); }
.lt-row b { display: block; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.lt-row span { font-size: .78rem; color: var(--text-on-accent-muted); }
.lt-hero a { color: var(--text-on-accent); }

/* ---- badge worlds ---------------------------------------------------------------------------------- */
.bw { margin-top: 18px; }
.bw-head { display: flex; align-items: center; gap: 12px; }
.bw-head .badge-art { flex: 0 0 auto; }
.bw-head h3 { margin: 0; font-size: 1.05rem; }
.bw-head p { margin: 0; font-size: .86rem; color: var(--text-muted); }
.bw-next { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.bw-next .bw-k { margin: 0; font-size: .74rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
html[dir="rtl"] .bw-next .bw-k { letter-spacing: 0; }
.bw-next .bw-t { margin: 2px 0 6px; font-weight: 700; }
.bw-next progress, .bw-stage progress { width: 100%; height: 8px; border: 0; border-radius: 999px; overflow: hidden; background: var(--border); accent-color: var(--accent);
  -webkit-appearance: none; appearance: none; }
.bw-next progress::-webkit-progress-bar, .bw-stage progress::-webkit-progress-bar { background: var(--border); border-radius: 999px; }
.bw-next progress::-webkit-progress-value, .bw-stage progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
.bw-next progress::-moz-progress-bar, .bw-stage progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.bw-next .bw-c { margin: 4px 0 0; font-size: .82rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.bw-stages { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.bw-stage { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); text-align: center; }
.bw-stage .bw-n { font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums; }
.bw-stage .bw-d { font-size: .7rem; color: var(--text-muted); }
.bw-stage.is-open { background: transparent; border-style: dashed; }
.bw-stage.is-open .badge-art { opacity: .35; filter: grayscale(1); }
.bw-stage.is-next { border-color: var(--accent); border-style: solid; }
.bw-stage.is-next .badge-art { opacity: .7; filter: grayscale(.75); }
.bw-stage progress { height: 5px; }

/* celebration: calm, 2–3 s, skippable, nothing moves with reduced motion */
.ms-celebrate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px;
  background: color-mix(in srgb, #04110c 72%, transparent); }
.ms-celebrate[hidden] { display: none; }
.ms-cel-card { max-width: 22rem; width: 100%; padding: 26px 22px 18px; border-radius: 22px; text-align: center; background: var(--surface); color: var(--text-primary);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35); animation: ms-pop .5s cubic-bezier(.2, .9, .3, 1.2) both; }
.ms-cel-card .badge-art { width: 132px; height: 132px; animation: ms-glow 2.4s ease-in-out both; }
.ms-cel-card h2 { margin: 10px 0 4px; font-size: 1.3rem; }
.ms-cel-card p { margin: 0 0 12px; color: var(--text-muted); }
.ms-cel-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
@keyframes ms-pop { from { transform: scale(.86); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ms-glow { 0% { filter: drop-shadow(0 0 0 rgba(211, 178, 108, 0)); } 50% { filter: drop-shadow(0 0 18px rgba(211, 178, 108, .75)); } 100% { filter: drop-shadow(0 0 4px rgba(211, 178, 108, .3)); } }
@media (prefers-reduced-motion: reduce) {
  .ms-cel-card, .ms-cel-card .badge-art { animation: none; }
}

/* the longer "Gebetszeiten" label must not push the product name onto two lines */
.brand { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 1100px) { .topnav a { padding-inline: 9px; } }
