/* In-site library pages (/library/...), design "Simple and friendly".
   Loaded after self-compassion-exercises.css, which supplies the fonts,
   colour tokens (--paper, --ink, --muted, --crimson, --crimson-dark,
   --blush, --line, --teal, --shadow), header and footer. Everything here is
   scoped to body.lib so it cannot reach another page. */
.lib{background:var(--blush)}
.lib img{max-width:100%;height:auto}
.lib button{font:inherit;cursor:pointer}
.lib :focus-visible{outline:3px solid var(--teal);outline-offset:3px;border-radius:8px}
.c-wrap{display:block;width:min(680px,calc(100% - 32px));margin-inline:auto;padding-bottom:40px}
.c-top{padding:20px 0 0}
.c-back{display:inline-flex;align-items:center;gap:6px;font-weight:800;text-decoration:none}
.c-hero{margin:16px 0 0;background:#fff;border-radius:28px;padding:16px;box-shadow:var(--shadow)}
.c-cover{display:block;width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:18px;background:var(--blush)}
.c-hero-body{padding:18px 8px 8px}
.c-pill{display:inline-block;margin:0;padding:4px 12px;border-radius:999px;background:var(--blush);color:var(--crimson-dark);font-size:.82rem;font-weight:800}
.lib h1{font-size:clamp(2rem,7vw,2.8rem);margin:12px 0 8px;letter-spacing:-.02em}
.lib h2{font-size:1.45rem;margin-bottom:14px}
.c-who{display:flex;align-items:center;gap:10px;margin:0 0 14px;color:var(--muted)}
.c-summary{margin:0 0 18px;color:var(--muted);font-size:1.05rem}
.c-access{margin:14px 0 0;color:var(--muted);font-size:.9rem}
.c-avatar{flex:none;width:56px;height:56px;border-radius:50%;display:grid;place-items:center;background:var(--blush);color:var(--crimson-dark);font:700 1.15rem "PT Serif",Georgia,serif;border:1px solid var(--line)}
.c-avatar-sm{width:36px;height:36px;font-size:.85rem}
/* Photo avatar: same circle and size as the initials one (the .lib img
   height:auto reset would otherwise win). */
.lib img.c-avatar{display:block;height:56px;object-fit:cover}
.lib img.c-avatar-sm{height:36px}
.c-hero audio{display:block;width:100%;margin-top:4px}
.lib [data-play-toggle] .i-pause{display:none}
html.library-playing .lib [data-play-toggle] .i-play{display:none}
html.library-playing .lib [data-play-toggle] .i-pause{display:block}
.c-cover-wrap{position:relative}
.c-nav,.c-cover-play{position:absolute;display:grid;place-items:center;border-radius:50%;color:#fff;background:rgba(59,15,30,.62);text-decoration:none;transition:background-color .2s ease}
.c-nav{top:50%;width:44px;height:44px;transform:translateY(-50%)}
.c-nav-prev{left:10px}.c-nav-next{right:10px}
.c-nav svg{width:26px;height:26px}
.c-nav:hover,.c-cover-play:hover{background:rgba(59,15,30,.85);color:#fff}
.c-cover-play{left:50%;bottom:14px;width:64px;height:64px;border:0;transform:translateX(-50%);background:var(--crimson);box-shadow:0 8px 22px rgba(168,18,62,.35)}
.c-cover-play:hover{background:var(--crimson-dark)}
.c-cover-play[hidden]{display:none}
.c-cover-play svg{width:30px;height:30px}
.lib .c-nav:focus-visible,.lib .c-cover-play:focus-visible{outline-color:#fff;box-shadow:0 0 0 6px var(--teal)}
.c-under{display:flex;align-items:center;gap:12px;margin-top:14px;color:var(--muted)}
.c-time{flex:0 0 3.2em;white-space:nowrap;font-variant-numeric:tabular-nums;font-size:.9rem}
.c-time:last-child{text-align:right}
/* Control row: mute at the far left, transport (rewind, play, forward) in
   the middle column. The two .c-time columns above are the same fixed width,
   so the seek track is centred in the row and the transport sits centred
   under it. */
.c-controls{display:grid;grid-template-columns:minmax(48px,1fr) auto minmax(48px,1fr);align-items:center;gap:12px;margin-top:10px}
.c-controls .c-mute{justify-self:start}
.c-transport{grid-column:2;display:flex;align-items:center;gap:12px}
.c-ctl{flex:none;width:48px;height:48px;border-radius:50%;border:1px solid var(--line);background:#fff;color:var(--crimson-dark);display:grid;place-items:center;transition:background-color .2s ease}
.c-ctl:hover{background:var(--paper)}
.c-ctl svg{width:26px;height:26px}
.c-ctl-main{width:64px;height:64px;border:0;background:var(--crimson);color:#fff;box-shadow:0 8px 20px rgba(168,18,62,.28)}
.c-ctl-main:hover{background:var(--crimson-dark)}
.c-ctl-main svg{width:30px;height:30px}
.c-mute .i-mute{display:none}
.c-mute.is-muted .i-vol{display:none}
.c-mute.is-muted .i-mute{display:block}
.c-status{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:4px;padding:10px 14px;border-radius:14px;background:var(--blush);color:var(--ink);font-weight:700}
.c-status[hidden]{display:none}
.c-retry{min-height:44px;padding:0 18px;border:0;border-radius:12px;background:var(--crimson);color:#fff;font-weight:800}
.c-retry:hover{background:var(--crimson-dark)}
.c-retry[hidden]{display:none}
.is-loading [data-status-text]::before{content:"";display:inline-block;width:.8em;height:.8em;margin-right:8px;border:2px solid var(--line);border-top-color:var(--crimson);border-radius:50%;animation:c-spin .8s linear infinite}
@keyframes c-spin{to{transform:rotate(360deg)}}
.c-seek{-webkit-appearance:none;appearance:none;flex:1;min-width:0;height:44px;background:transparent;cursor:pointer;--progress:0%}
.c-seek::-webkit-slider-runnable-track{height:6px;border-radius:99px;background:linear-gradient(90deg,var(--crimson) var(--progress),var(--line) var(--progress))}
.c-seek::-moz-range-track{height:6px;border-radius:99px;background:var(--line)}
.c-seek::-moz-range-progress{height:6px;border-radius:99px;background:var(--crimson)}
.c-seek::-webkit-slider-thumb{-webkit-appearance:none;width:18px;height:18px;margin-top:-6px;border-radius:50%;background:var(--crimson);border:3px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.25)}
.c-seek::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:var(--crimson);border:3px solid #fff}
.c-block{margin:16px 0 0;background:#fff;border-radius:24px;padding:24px}
.c-intro{margin-top:16px}
.c-steps{list-style:none;margin:0;padding:0;counter-reset:step}
.c-steps li{counter-increment:step;display:grid;grid-template-columns:40px 1fr;gap:14px;padding:12px 0}
.c-steps li::before{content:counter(step);width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--blush);color:var(--crimson-dark);font-weight:800}
.c-steps strong{display:block}
.c-steps span{color:var(--muted);font-size:.95rem}
.c-prose{overflow-wrap:break-word}
.c-prose p{margin:0 0 1.1em}
.c-prose h2,.c-prose h3,.c-prose h4,.c-prose h5,.c-prose h6{font-family:"PT Serif",Georgia,serif;margin:1.4em 0 .5em}
.c-prose h3,.c-prose h4,.c-prose h5,.c-prose h6{font-size:1.25rem}
.c-prose blockquote{margin:1.4em 0;padding-left:18px;border-left:3px solid var(--crimson);color:var(--muted)}
.c-prose ul,.c-prose ol{padding-left:1.4em}
.c-read{font-size:1.1rem;line-height:1.8}
.c-read > *{max-width:68ch}
.c-meta{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.c-teacher{display:flex;gap:16px;align-items:flex-start}
.c-teacher p{margin:0}
.c-teacher-label{font-size:.72rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--teal)}
.c-teacher-name{font:700 1.2rem/1.3 "PT Serif",Georgia,serif;margin-top:2px!important}
.c-teacher-title{color:var(--muted);font-size:.92rem}
.c-teacher-summary{color:var(--muted);margin-top:8px!important;font-size:.95rem}
.c-rows{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.c-rows a{display:grid;grid-template-columns:64px 1fr auto;gap:14px;align-items:center;padding:10px;border-radius:18px;background:var(--paper);text-decoration:none;color:var(--ink);transition:background-color .2s ease,box-shadow .2s ease}
.c-rows a:hover{background:#fff;box-shadow:var(--shadow)}
.c-rows img,.c-thumb{display:block;width:64px;height:64px;border-radius:14px;object-fit:cover;background:var(--blush)}
.c-row-text strong{display:block;font-size:1.02rem;line-height:1.3}
.c-row-text small{color:var(--muted)}
.c-go{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#fff;color:var(--crimson);border:1px solid var(--line);transition:background-color .2s ease,color .2s ease,transform .2s ease}
.c-go svg{width:20px;height:20px;display:block}
.c-rows a:hover .c-go,.c-rows a:focus-visible .c-go{background:var(--crimson);color:#fff;border-color:var(--crimson);transform:translateX(2px)}
.c-all{margin:16px 0 0;font-weight:800}
.c-chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}
.c-chips a{padding:10px 18px;border-radius:999px;background:var(--paper);font-weight:800;text-decoration:none;border:1px solid var(--line)}
.c-quiet{padding:18px 24px}.c-quiet p{margin:0;color:var(--muted)}
/* Educational boundary: a quiet card in the same family as .c-block (white,
   rounded, site tokens) but lower emphasis: hairline border, no shadow,
   smaller muted text. Always visible text. */
.c-boundary{margin:16px 0 0;padding:16px 24px;border-radius:20px;background:#fff;border:1px solid var(--line)}
.c-boundary p{margin:0;color:var(--muted);font-size:.88rem;line-height:1.55}
.c-soft{margin:12px 0 0;padding:0 24px;color:var(--muted);font-size:.85rem;line-height:1.55}
.c-soft p{margin:0}
.c-soft-teasers{display:flex;flex-wrap:wrap;gap:4px 16px;margin:6px 0 0;padding:0;list-style:none}
.c-soft-teasers a{color:var(--muted);text-decoration:underline}
.c-button{display:inline-flex;align-items:center;min-height:52px;padding:0 22px;border-radius:16px;background:var(--crimson);color:#fff;font-weight:800;text-decoration:none;margin:6px 8px 0 0}
.c-button:hover{background:var(--crimson-dark);color:#fff}
.c-button-quiet{background:var(--paper);color:var(--crimson-dark);border:1px solid var(--line)}
.c-button-quiet:hover{background:#fff;color:var(--crimson-dark)}
/* Sticky mini player: starts right of the floating Privacy choices button
   (bottom-left, 44px) so it never covers it. */
.c-mini{position:fixed;left:72px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));z-index:30;display:flex;align-items:center;gap:12px;max-width:560px;margin:0 auto;padding:8px 16px 8px 8px;border-radius:999px;background:#3b0f1e;color:#fff;box-shadow:0 12px 30px rgba(30,6,14,.35)}
.c-mini[hidden]{display:none}
.c-mini-btn{flex:none;width:48px;height:48px;border:0;border-radius:50%;background:#fff;color:#3b0f1e;display:grid;place-items:center}
.c-mini-btn svg{width:22px;height:22px}
.c-mini-btn:focus-visible{outline-color:#fff}
.c-mini-title{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:800}
@media(max-width:640px){.c-hero{border-radius:22px;padding:10px}.c-block{padding:20px;border-radius:20px}}
/* Tablet: a little more room, still one column. */
@media(min-width:720px){.c-wrap{width:min(760px,calc(100% - 48px))}}
/* Desktop: hero splits into cover + player, body becomes a reading column
   with a sticky side column. Mobile markup order is unchanged, so phones and
   screen readers get the same sequence. */
@media(min-width:960px){
  .c-wrap{width:min(1180px,calc(100% - 64px))}
  .c-hero{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:40px;align-items:center;padding:24px;margin-top:20px}
  .c-hero .c-cover{aspect-ratio:4/3;max-height:440px;border-radius:20px}
  .c-hero:not(:has(.c-cover)){grid-template-columns:minmax(0,1fr)}
  .c-hero-body{padding:8px 16px 8px 0}
  .lib h1{font-size:clamp(2.4rem,3.4vw,3.2rem)}
  .c-summary{font-size:1.12rem}
  .c-layout{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:24px;align-items:start;margin-top:8px}
  .c-col-side{position:sticky;top:24px}
  .c-col-main > .c-block:first-child,.c-col-side > .c-block:first-child{margin-top:16px}
  .c-read{font-size:1.15rem}
  .c-block{padding:32px}
  .c-col-side .c-block{padding:24px}
  .c-index .c-intro{padding:40px}
  .c-index .c-rows{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  .c-quiet,.c-boundary,.c-soft{max-width:none}
}
@media(min-width:1200px){.c-index .c-rows{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.lib *,.lib *::before,.lib *::after{transition:none!important;animation:none!important}}
