/* The podcast island (see podcast-island.js): a dark plate at the right edge with the Oratio
   mark, a hand-drawn edge, cream and gold as on the player. Closed it is just the mark; near
   the pointer, on focus or on a tap it opens leftward into title, chapter, time and buttons. */
.pi{position:fixed;z-index:80;right:max(12px,env(safe-area-inset-right));bottom:max(22vh,calc(18px + env(safe-area-inset-bottom)));
  --pi-bg:#1F1D1A;--pi-fg:#E9E2D2;--pi-gold:#C2A06A;
  display:grid;grid-template-columns:52px 0fr 0fr;align-items:center;gap:0;height:60px;padding:4px;box-sizing:border-box;
  background:var(--pi-bg);color:var(--pi-fg);border-radius:30px;box-shadow:0 10px 28px rgba(0,0,0,.28),0 2px 6px rgba(0,0,0,.18);
  opacity:0;translate:16px 0;transition:grid-template-columns .45s cubic-bezier(.65,0,.35,1),gap .45s,opacity .4s,translate .5s cubic-bezier(.22,1,.36,1),border-radius .45s;
  font-family:'Golos Text',system-ui,sans-serif}
.pi.is-in{opacity:1;translate:0 0}
.pi.is-gone{opacity:0;translate:16px 0}
.pi.is-open{grid-template-columns:52px 1fr auto;gap:10px;border-radius:14px;padding-right:8px}
.pi-frame{position:absolute;inset:3px;width:calc(100% - 6px);height:calc(100% - 6px);fill:none;stroke:var(--pi-fg);stroke-linecap:round;overflow:visible;pointer-events:none;opacity:0;transition:opacity .3s .1s}
.pi-frame path{vector-effect:non-scaling-stroke;stroke-width:.9;opacity:.5}.pi-frame path+path{stroke-width:.6;opacity:.28}
.pi.is-open .pi-frame{opacity:1}
.pi button,.pi a{all:unset;box-sizing:border-box;cursor:pointer;-webkit-tap-highlight-color:transparent}
.pi .pi-dial{width:52px;height:52px;display:grid;place-items:center;border-radius:50%;color:var(--pi-fg)}
.pi-dial .o-mk{width:40px;height:30px;overflow:visible}
.pi-dial .o-mk-base{opacity:.35}
.pi-dial:focus-visible,.pi-act:focus-visible{outline:1px dashed var(--pi-gold);outline-offset:2px}
/* Playing: the waves and the dot breathe, as on Oratio's own mark. */
.pi.is-on .o-mk-w1{animation:pi-w 1.8s ease-in-out infinite}.pi.is-on .o-mk-w2{animation:pi-w 1.8s ease-in-out .25s infinite}
.pi.is-on .o-mk-dot{animation:pi-w 1.8s ease-in-out .5s infinite}
@keyframes pi-w{0%,100%{opacity:1}50%{opacity:.35}}
.pi-body{min-width:0;overflow:hidden;display:grid;gap:2px;opacity:0;transition:opacity .25s}
.pi.is-open .pi-body{opacity:1;transition-delay:.15s}
.pi-kick{font:400 9.5px/1.2 'Old Standard TT',Georgia,serif;letter-spacing:.14em;text-transform:uppercase;color:var(--pi-gold);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pi-title{font:400 14px/1.2 'Old Standard TT',Georgia,serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px}
.pi-time{font:400 11.5px/1.2 'Old Standard TT',Georgia,serif;letter-spacing:.04em;opacity:.7;font-variant-numeric:tabular-nums;white-space:nowrap}
.pi-acts{display:flex;gap:2px;overflow:hidden;opacity:0;transition:opacity .25s}
.pi.is-open .pi-acts{opacity:1;transition-delay:.18s}
.pi .pi-act{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;color:var(--pi-fg)}
.pi-act svg{width:17px;height:17px}
.pi .pi-act:hover{background:rgba(233,226,210,.1)}
.pi .pi-toggle{color:var(--pi-gold)}
.pi-line{position:absolute;left:16px;right:16px;bottom:5px;height:1px;background:rgba(233,226,210,.14);opacity:0;transition:opacity .3s}
.pi-line i{display:block;height:100%;background:var(--pi-gold);transform-origin:left;transform:scaleX(0)}
.pi.is-open .pi-line{opacity:1}
/* Waiting for one tap (the browser would not start the sound by itself). */
.pi.is-waiting:not(.is-on) .pi-dial{animation:pi-ask 2.4s ease-in-out infinite}
@keyframes pi-ask{0%,100%{box-shadow:0 0 0 0 rgba(194,160,106,0)}50%{box-shadow:0 0 0 6px rgba(194,160,106,.25)}}
@media (max-width:600px){.pi.is-open{grid-template-columns:52px minmax(0,1fr) auto}.pi-title{max-width:150px}}
@media (prefers-reduced-motion:reduce){.pi,.pi *{transition:none!important;animation:none!important}}
/* The page opened over the one that holds the sound (see podcast-island.js). */
.pi-frame-page{position:fixed;inset:0;z-index:70;width:100%;height:100%;border:0;background:var(--frame-bg)}
html.pi-framed,html.pi-framed body{overflow:hidden}
/* At night the plate sits on a dark page: a fine cream edge keeps it in sight. */
:root:not([data-mode="day"]) .pi{box-shadow:0 0 0 1px rgba(233,226,210,.22),0 10px 28px rgba(0,0,0,.4)}

/* ——— The island in the site's current look: the site's own ground and ink, a hand-drawn
   frame, the typewriter face, terracotta for what plays, and Oratio's microphone whose three
   dots breathe while the sound plays. ——— */
.pi{--pi-bg:var(--frame-bg,#F4F1EA);--pi-fg:var(--frame-fg,#2A2620);--pi-gold:#A9614E;
  font-family:'PT Mono','Courier New',monospace;border-radius:30px;
  box-shadow:0 0 0 1px color-mix(in srgb,var(--pi-fg) 22%,transparent),0 10px 26px -8px rgba(0,0,0,.25)}
:root[data-mode="night"] .pi{--pi-gold:#C9957F;box-shadow:0 0 0 1px color-mix(in srgb,var(--pi-fg) 20%,transparent),0 10px 26px -8px rgba(0,0,0,.5)}
.pi.is-open{border-radius:6px}
.pi .pi-dial .o-mk{width:34px;height:34px}
.pi .pi-hand{filter:url(#pi-tremor)}
.pi .pi-d{opacity:.45}
.pi.is-on .pi-d{animation:pi-dot 1.5s ease-in-out infinite;opacity:1}
.pi.is-on .pi-d:nth-of-type(2){animation-delay:.25s}.pi.is-on .pi-d:nth-of-type(3){animation-delay:.5s}
@keyframes pi-dot{50%{opacity:.25}}
.pi.is-on .o-mk-w1,.pi.is-on .o-mk-w2,.pi.is-on .o-mk-dot{animation:none}
.pi-kick{font:400 9.5px/1.2 'PT Mono',monospace;letter-spacing:.08em}
.pi-title{font:400 13px/1.25 'PT Mono',monospace}
.pi-time{font:400 10.5px/1.2 'PT Mono',monospace;letter-spacing:0}
.pi .pi-toggle{color:var(--pi-gold)}
.pi-frame path{opacity:.55}
/* Open, only the hand-drawn frame shows the edge; closed, a fine round line. */
.pi.is-open{box-shadow:0 10px 26px -8px rgba(0,0,0,.25);border-radius:2px}
:root[data-mode="night"] .pi.is-open{box-shadow:0 10px 26px -8px rgba(0,0,0,.55)}
/* Closed: no round line, a rough hand-drawn circle with a few hatch strokes instead. */
.pi:not(.is-open){box-shadow:0 8px 22px -10px rgba(0,0,0,.35);background:var(--pi-bg)}
.pi-ring{position:absolute;left:0;top:0;width:60px;height:60px;color:var(--pi-fg);pointer-events:none;transition:opacity .25s}
.pi.is-open .pi-ring{opacity:0}
/* A larger microphone; its three dots blink one after another. */
.pi .pi-dial .o-mk{width:44px;height:44px}
.pi.is-on .pi-d{animation:pi-seq 1.5s steps(1,end) infinite;opacity:.25}
.pi.is-on .pi-d:nth-of-type(1){animation-delay:0s}.pi.is-on .pi-d:nth-of-type(2){animation-delay:.5s}.pi.is-on .pi-d:nth-of-type(3){animation-delay:1s}
@keyframes pi-seq{0%{opacity:1}33.3%{opacity:.25}}
:root[data-mode="night"] .pi:not(.is-open),:root:not([data-mode="day"]) .pi:not(.is-open){box-shadow:0 8px 22px -10px rgba(0,0,0,.6)}
