:root{
  --bg:#f6f2ea; --fg:#1f1d1a; --muted:#6b655b; --card:#fff; --line:#e3dccf;
  --accent:#9a5b2e; --accent-fg:#fff; --hl:#f3e3cf;
}
@media (prefers-color-scheme:dark){
  :root{ --bg:#1a1816; --fg:#f1ece3; --muted:#a49d90; --card:#25221f; --line:#38332d;
         --accent:#d9965b; --accent-fg:#1a1816; --hl:#3a2f24; }
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--fg);
  font:17px/1.6 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}
main{max-width:640px;margin:0 auto;padding:0 16px 40px}
.loading,.error{padding:40px 0;text-align:center;color:var(--muted)}
a{color:var(--accent)}

.hero{margin:0 -16px;aspect-ratio:4/3;background:var(--line) center/cover no-repeat}
@media(min-width:640px){.hero{margin:0;border-radius:0 0 16px 16px}}
h1{font-size:1.7rem;line-height:1.2;margin:20px 0 6px}
.meta{color:var(--muted);font-size:.95rem;margin:0 0 20px}

.player{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:16px;
  position:fixed;left:50%;transform:translateX(-50%);bottom:0;z-index:20;
  width:100%;max-width:640px;border-radius:16px 16px 0 0;border-bottom:0;
  padding:12px 16px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -4px 20px rgba(0,0,0,.15)}
.has-audio main,body.has-audio main{padding-bottom:190px}
.row{display:flex;align-items:center;justify-content:center;gap:14px}
button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.btn{background:none;border:0;min-width:48px;min-height:48px;border-radius:50%;
  display:grid;place-items:center;font-size:.8rem;font-weight:600;color:var(--muted)}
.btn:active{background:var(--hl)}
.play{width:60px;height:60px;border-radius:50%;border:0;background:var(--accent);color:var(--accent-fg);
  display:grid;place-items:center}
.ic{width:1em;height:1em;display:block}
.icw{display:grid;place-items:center;line-height:0}
.play .ic{width:30px;height:30px}
.btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0}
.btn .ic{width:24px;height:24px}
.btn small{font-size:.7rem;font-weight:600;line-height:1}
.seek{width:100%;margin:0 0 2px;accent-color:var(--accent);height:28px}
.times{margin-bottom:6px;display:flex;justify-content:space-between;color:var(--muted);font-size:.85rem;font-variant-numeric:tabular-nums}
.speed{border:1px solid var(--line);border-radius:999px;padding:0 12px;min-height:36px;background:none}
.noaudio{color:var(--muted);text-align:center;margin:0}

h2{font-size:1.15rem;margin:28px 0 8px}
.transcript p{margin:0 0 16px;white-space:pre-line}
.hl{cursor:pointer;border-radius:4px;transition:background .25s;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.hl.active{background:var(--hl);box-shadow:0 0 0 3px var(--hl)}

.list{list-style:none;padding:0;margin:0}
.list a{display:flex;gap:14px;align-items:center;text-decoration:none;color:inherit;
  background:var(--card);border:1px solid var(--line);border-radius:14px;padding:10px;margin-bottom:10px}
.thumb{width:64px;height:64px;border-radius:10px;background:var(--line) center/cover;flex:none}
.list b{display:block}
.list small{color:var(--muted)}
.back{display:inline-block;margin:14px 0 0;text-decoration:none;font-size:.95rem}
.back:focus-visible,button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--accent);outline-offset:2px}

.gallery{margin:56px -16px 0}
.gallery figure{margin:0 0 20px}
.gallery img{display:block;width:100%;height:auto;min-height:120px;background:var(--line);cursor:zoom-in}
.gallery figcaption{font-size:.8rem;line-height:1.4;color:var(--muted);padding:6px 16px 0}
@media(min-width:640px){.gallery{margin-left:0;margin-right:0}.gallery img{border-radius:12px}.gallery figcaption{padding-left:0}}
.lightbox{position:fixed;inset:0;z-index:50;background:rgba(0,0,0,.94);display:flex;flex-direction:column;
  padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);color:#fff}
.lb-img{flex:1;min-height:0;width:100%;object-fit:contain}
.lb-close{align-self:flex-end;width:48px;height:48px;margin:8px;border:0;background:none;color:#fff;font-size:1.6rem;display:grid;place-items:center}
.lb-foot{display:flex;align-items:center;gap:8px;padding:8px 8px 16px}
.lb-text{flex:1;text-align:center;font-size:.95rem}
.lb-text .count{color:#aaa;font-size:.8rem}
.lb-nav{width:48px;height:48px;border:0;background:none;color:#fff;font-size:1.6rem;display:grid;place-items:center}

.contacts{margin-top:40px;padding-top:20px;border-top:1px solid var(--line);font-size:.9rem;color:var(--muted)}
.contacts p{margin:0 0 6px}
.contacts a{color:inherit;text-decoration:none;font-weight:600}
.contacts .org{color:var(--fg);font-weight:600;font-size:1rem}
