/* POC additions on top of the prototype styles (styles.css). */
.brand{text-decoration:none;color:inherit}
.toolbtn{background:white;border:1px solid var(--line);border-radius:12px;padding:10px 14px;color:var(--navy);font-weight:800;text-decoration:none;font-size:14px}
.side a{display:block;border-radius:13px;padding:14px 12px;font-weight:900;color:var(--ink);text-decoration:none}
.side a.sel{background:var(--mint);color:#007e77}
.mobile a{flex:1;text-align:center;font-size:11px;font-weight:800;color:var(--ink);text-decoration:none;padding:6px 0}
.cover img{width:100%;height:100%;object-fit:cover;display:block}
.cover{position:relative}
.badge{position:absolute;top:8px;left:8px;background:#ffffffe6;border-radius:999px;padding:3px 9px;font-size:11px;font-weight:900;color:var(--navy)}
#toast{position:fixed;left:50%;bottom:90px;transform:translateX(-50%);background:var(--navy);color:white;padding:12px 18px;border-radius:14px;font-weight:800;opacity:0;transition:opacity .2s;pointer-events:none;max-width:90vw;z-index:20}
#toast.show{opacity:1}
.error{background:#FFECEC;border:1px solid #FFC9C9;color:#9B1C1C;border-radius:14px;padding:12px 14px;margin:12px 0}
.bar{height:10px;background:var(--line);border-radius:99px;overflow:hidden}
.bar>div{height:100%;background:var(--teal);transition:width .4s}
.steps-list{list-style:none;padding:0;margin:16px 0}
.steps-list li{padding:8px 0;color:var(--muted);font-weight:800}
.steps-list li.now{color:var(--navy)}
.steps-list li.done{color:#007e77}
.chapters{display:grid;gap:8px;margin-top:10px}
.chapters button{text-align:left;background:white;border:1px solid var(--line);border-radius:14px;padding:12px 14px;font-weight:800;color:var(--navy)}
.chapters button.on{background:var(--mint);border-color:var(--teal)}
.quizbox{margin-top:18px}
.quizbox .choices button{display:block;width:100%;text-align:left;margin:8px 0;padding:16px;border-radius:16px;border:2px solid var(--line);background:white;font-weight:900;font-size:16px;color:var(--navy)}
.quizbox .choices button.right{border-color:var(--teal);background:var(--mint)}
.quizbox .choices button.wrong{border-color:var(--coral);background:#FFF0F0}
.quizbox .choices button:disabled{cursor:default}
.nowtext{font-size:15px;line-height:1.6;color:var(--ink);max-height:180px;overflow:auto}
.controls{display:flex;gap:10px;justify-content:center;align-items:center;margin:14px 0}
.controls .btn{min-width:56px}
.kv{display:flex;gap:6px;flex-wrap:wrap}
textarea{width:100%;min-height:80px;border:1px solid var(--line);border-radius:14px;padding:12px}
@media (max-width:640px){.quizbox .choices button{padding:18px;font-size:17px}}
a.btn{text-decoration:none;display:inline-block}
/* v2: Marta, language switch, player polish */
/* Marta the Parrot (#272): static/img/marta.png (whole body) and marta-head.png (the tiny one), temporary art */
.marta{display:block;height:auto;object-fit:contain}
.marta.hero{width:170px;max-width:36%;flex-shrink:0;padding:0;background:none;border-radius:0;filter:drop-shadow(0 6px 14px #0d2b5522)} /* the img also has .hero: not the hero card */
.marta.mini{width:64px;height:64px}
.marta.tiny{width:26px;height:26px;display:inline-block;vertical-align:middle}
.marta.glow{width:130px;transform-origin:50% 100%;animation:bob 2.4s ease-in-out infinite}
@keyframes bob{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-6px) rotate(-3deg)}}
@media (prefers-reduced-motion:reduce){.marta.glow{animation:none}}
.sidecard{padding:13px;margin-top:20px;font-size:12px;display:flex;gap:8px;align-items:center}
.sidecard p{margin:0}
/* header language switch (#79): flag + code, menu of every language in its own name */
.langmenu{position:relative}
.tools .langbtn{display:inline-flex;align-items:center;gap:7px;min-height:44px}
.langbtn .flag{font-size:20px;line-height:1}
.langbtn .caret{font-size:11px;color:var(--muted)}
.langlist{position:absolute;right:0;top:calc(100% + 6px);z-index:30;margin:0;padding:6px;list-style:none;min-width:190px;
  max-height:min(70vh,420px);overflow:auto;background:white;border:1px solid var(--line);border-radius:14px;box-shadow:0 12px 30px #0d2b5526}
.langlist[hidden]{display:none}
.tools .langlist button{display:flex;align-items:center;gap:10px;width:100%;border:0;border-radius:10px;padding:11px 12px;
  background:transparent;text-align:left;font-weight:800;color:var(--navy);min-height:44px}
.tools .langlist button:hover,.tools .langlist button:focus-visible{background:var(--cloud)}
.tools .langlist button[aria-checked="true"]{background:var(--mint);color:#007e77}
.langlist .flag{font-size:20px;line-height:1}
.langlist .tick{margin-left:auto}
.card{text-decoration:none;color:inherit;position:relative}
.row-tight{margin:8px 0;padding:12px 16px}
.review{display:flex;justify-content:space-between;align-items:center;gap:12px}
.player .cover{align-self:start}
.modes{margin:10px 0 4px}
.controls .btn.big{width:72px;height:72px;border-radius:50%;font-size:24px}
.quizbox .choices button{display:flex;gap:12px;align-items:center}
.quizbox .choices button span{background:var(--cloud);border-radius:10px;min-width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center}
.quizbox .choices button.right span{background:var(--teal);color:white}
.quizbox .choices button.wrong span{background:var(--coral);color:white}
.waiting{display:flex;gap:8px;align-items:center;color:#007e77;font-weight:800}
.center{text-align:center}

/* ---- seek bar (#50) ---- */
.seek{position:relative;padding:10px 0;cursor:pointer;touch-action:none;user-select:none}
.seek .track{height:10px;background:var(--line);border-radius:99px;overflow:hidden}
.seek .fill{height:100%;background:var(--teal)}
.seek .mark{position:absolute;top:6px;width:3px;height:18px;margin-left:-1px;background:var(--navy);opacity:.35;border-radius:2px;pointer-events:none}
.seek:focus-visible{outline:3px solid var(--gold);outline-offset:2px;border-radius:12px}
.controls{flex-wrap:wrap}
.controls .btn.icon{min-width:48px;font-size:18px}

/* ---- mini-player (#34, #35) ---- */
div.mini{position:fixed;left:50%;transform:translateX(-50%);bottom:14px;width:min(760px,calc(100% - 24px));z-index:20;
  background:#0B7F78;color:white;border-radius:18px;box-shadow:0 10px 30px #0d2b5533;display:flex;align-items:center;gap:10px;padding:10px 12px 12px;overflow:hidden}
div.mini[hidden]{display:none}
.mini-progress{position:absolute;left:0;right:0;bottom:0;height:4px;background:#ffffff33}
.mini-fill{height:100%;background:white}
.mini-info{display:flex;align-items:center;gap:10px;flex:1;min-width:0;color:white;text-decoration:none}
.mini-info .cover{width:48px;height:48px;border-radius:10px;flex:none}
.mini-info span{min-width:0;display:flex;flex-direction:column}
.mini-info b,.mini-info small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mini-info small{opacity:.85;font-size:12px}
.mini-next{opacity:.7!important;font-style:italic}
.mini-ctrl{display:flex;align-items:center;gap:4px;flex:none}
.mini-ctrl button{background:transparent;border:0;color:white;font-weight:900;font-size:14px;padding:8px;border-radius:10px;min-width:40px}
.mini-ctrl button:hover{background:#ffffff22}
.mini-ctrl .mini-play{font-size:20px}
.mini-ctrl button:disabled{opacity:.4}
@media(max-width:800px){.mini-ctrl button{min-width:34px;padding:6px}} /* position and page padding: phones block below */
.seek .track{position:relative}
.seek .qzone{position:absolute;top:0;bottom:0;background:var(--navy);opacity:.16;pointer-events:none}
.seek.over-quiz{cursor:default}
.mini-progress .mini-qzone{position:absolute;top:0;bottom:0;background:var(--navy);opacity:.3;pointer-events:none}

/* ---- delete failed / archive finished creations (#67, #68) ---- */
.actions.tight{margin-top:8px;gap:8px;flex-wrap:wrap}
.btn.out.danger{color:#9B1C1C;border-color:#FFC9C9}
.archived{margin-top:28px}
.archived summary{cursor:pointer;font-weight:900;color:var(--muted);padding:8px 0}

/* accounts (#72) */
.auth{max-width:440px}
.auth input.otp{font-family:Menlo,Consolas,monospace;font-size:24px;letter-spacing:4px;text-align:center}
.sub.small{font-size:12px;margin-top:-10px}
.toolbtn .hide-sm{max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;vertical-align:bottom}
@media(max-width:520px){.toolbtn .hide-sm{display:none}.tools{gap:6px}}
.gbtn{min-height:44px;margin:16px 0 4px}
.or{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:13px;margin:12px 0 0}
.or::before,.or::after{content:"";flex:1;height:1px;background:var(--line)}

/* ---- chapter list (#52): cover crop + number, duration, listened bar ---- */
.chapters .chitem{display:flex;align-items:center;gap:12px;padding:10px 12px 10px 10px;cursor:pointer;width:100%}
.chitem .chthumb{position:relative;width:64px;height:64px;flex:none;border-radius:12px;overflow:hidden;background:var(--cloud)}
.chitem .chthumb img,.chitem .chthumb .cover{position:absolute;inset:0;width:100%;height:100%;margin:0;border-radius:0;object-fit:cover;
  transform:scale(2.1);transform-origin:var(--x) var(--y)}
.chitem .chthumb::after{content:"";position:absolute;inset:0;background:linear-gradient(160deg,transparent 45%,var(--tint) 120%)}
.chthumb.c0{--tint:var(--teal)}.chthumb.c1{--tint:var(--coral)}.chthumb.c2{--tint:var(--gold)}.chthumb.c3{--tint:var(--navy)}
.chitem .chnum{position:absolute;left:5px;bottom:5px;z-index:1;min-width:24px;height:24px;padding:0 6px;border-radius:99px;
  display:inline-flex;align-items:center;justify-content:center;background:white;color:var(--navy);font-size:13px;font-weight:900;box-shadow:0 1px 4px #0d2b5533}
.chitem.done .chnum{background:var(--teal);color:white}
.chitem .chtext{flex:1;min-width:0;display:grid;gap:4px}
.chitem .chtext b{font-size:15px;line-height:1.25;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.chitem .chtext small{color:var(--muted);font-weight:800;font-size:12.5px}
.chitem .chbar{height:6px;background:var(--line);border-radius:99px;overflow:hidden}
.chitem .chbar i{display:block;height:100%;background:var(--coral);border-radius:99px;transition:width .4s}
.chitem.done .chbar i{background:var(--teal)}
.chitem .chgo{flex:none;width:34px;height:34px;border-radius:99px;display:grid;place-items:center;background:var(--cloud);color:var(--navy);font-size:13px}
.chitem.on .chgo{background:var(--teal);color:white}
.chitem:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
@media (prefers-reduced-motion:reduce){.chitem .chbar i{transition:none}}

/* profile (#74) and the header profile button (#48) */
.pfbtn{display:inline-flex;text-decoration:none;border-radius:50%}
.pfimg{width:42px;height:42px;border-radius:50%;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:white;border:1px solid var(--line);color:var(--navy);font-weight:900}
.pfimg img,.avatar img{width:100%;height:100%;object-fit:cover;display:block}
.pfimg svg,.avatar svg{width:60%;height:60%}
.pfimg.empty{background:var(--mint);color:#007e77;border-color:transparent}
.avatar{width:64px;height:64px;border-radius:50%;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:var(--mint);color:#007e77;font-weight:900;font-size:24px;flex:none}
.avatar.big{width:96px;height:96px;font-size:36px}
.photo-row{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.photo-row label.btn{cursor:pointer}
.profile-edit{max-width:560px;margin-top:14px}
.at{display:flex;align-items:center;border:1px solid #cbdde5;border-radius:12px;background:white;padding-left:13px}
.at span{color:var(--muted);font-weight:900}
.field .at input{border:0;padding-left:4px}
.sub.small.ok{color:#007e77}.sub.small.bad{color:#9B1C1C}
.right{text-align:right}
.at + .sub.small{margin-top:6px}
/* hearts (#76, #59) */
.titlerow{display:flex;align-items:flex-start;gap:12px;justify-content:space-between}
.titlerow h1{margin-right:auto}
.heart{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:white;color:var(--navy);border-radius:999px;padding:8px 14px;font-weight:900;font-size:15px;flex:none;margin-top:6px;cursor:pointer}
.heart i{font-style:normal;color:var(--coral);font-size:20px;line-height:1}
.heart.on{background:#FFF0F0;border-color:#FFC9C9}
.heart:disabled{opacity:.6}
.heart.small{border:0;background:none;padding:0;margin:0;font-size:12px;gap:3px;cursor:default;color:inherit}
.heart.small i{font-size:13px;color:var(--muted)}
.heart.small.on i{color:var(--coral)}
.card .body .metarow{display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap}
.card .body .metarow .heart.small{margin-left:auto}
/* sharing (#56) */
.sharebtn.off{opacity:.55}
.titletools{display:flex;gap:8px;align-items:flex-start;flex:none}
.sharebtn.icononly{margin-top:6px;padding:8px 13px;border-radius:999px;font-size:16px}
.modal{border:0;border-radius:20px;padding:0;max-width:min(440px,calc(100% - 32px));box-shadow:0 20px 60px #0d2b5540}
.modal::backdrop{background:#0d2b5566}
.modal-body{padding:22px}
.modal-body h2{margin-top:0}
.linkbox{width:100%;border:1px solid #cbdde5;border-radius:12px;padding:12px;margin:8px 0;font-size:14px}
/* visitors hear chapter 1, then Marta's invite to a free account (#270) */
.gate{margin-top:16px;max-width:420px}
.gatehead{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.gatehead .marta{flex:none;width:72px;height:72px}
.gate h2{margin:0}
.gate .bubble{margin:0 0 8px;color:var(--ink)}
.gate .free{margin:0;font-weight:900;color:#007e77}
.modal-body .gate{margin-top:0}
.trynote{margin:8px 0 0}
.chitem.locked{opacity:.8}
.chitem.locked .chthumb{filter:grayscale(.6)}
/* personal page (#75) */
.userhead{display:flex;gap:22px;align-items:center;margin-bottom:22px;flex-wrap:wrap}
.userhead h1{margin:0 0 4px;word-break:break-all}
.avatar.huge{width:120px;height:120px;font-size:44px}
.uname{font-weight:900;color:var(--navy);margin:0 0 6px}
.ubio{margin:0 0 8px;color:var(--ink);max-width:520px}
.eyebrow a{color:inherit}
@media(max-width:520px){.userhead{flex-direction:column;align-items:flex-start;gap:12px}.avatar.huge{width:96px;height:96px}}
/* listens (#46) and sorting */
.listens{display:inline-flex;align-items:center;gap:3px;font-size:12px;color:inherit;white-space:nowrap}
.listens i{font-style:normal;font-size:12px}
.card .body .metarow .listens{margin-left:auto;margin-right:8px}
.card .body .metarow .listens + .heart.small{margin-left:0}
.sortchips{margin:-8px 0 18px}.between .sortchips{margin:0}
.chip.small{padding:7px 12px}
.badge.right{left:auto;right:8px;max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* reports (#110) */
.reportline{margin-top:22px;text-align:right}
.linkbtn{background:none;border:0;color:var(--muted);font-weight:800;font-size:13px;text-decoration:underline;padding:4px}
.field label.radio{display:flex;gap:10px;align-items:center;font-weight:700;margin:8px 0;text-align:left}
.field label.radio input{width:auto;flex:none;margin:0}
/* public and private podcasts (#269) */
.visbox{margin-top:22px}
.visbox p{margin:4px 0}
.nudge{color:#007e77;font-weight:800}
.linkbtn.nudge{text-align:left}
.warnline{color:var(--coral)}
/* the welcome gift (#268) */
.giftnotice{margin:14px 0}
.giftnotice h2{margin:0 0 6px}
.nudgebox{margin-top:16px}
.shelves{margin:18px 0 0}
/* feedback (#111) */
.fbbox{margin-top:22px}
.fbbtn.on{background:var(--mint);border-color:var(--teal);color:#007e77}
.sub.small{font-size:13px}
.legal-ok{font-size:12.5px;margin-top:14px}.legal-ok a,.footer a{color:inherit;text-decoration:underline}
.btn.danger:not(.out){background:#B42318;color:white}
/* the profile page (#335): sign out at the top next to who is signed in; deleting the account is a quiet danger zone at the bottom */
.account-bar{display:flex;align-items:center;justify-content:space-between;gap:14px 18px;flex-wrap:wrap;margin:0 0 18px;padding:14px 18px}
.account-bar .who{display:flex;align-items:center;gap:12px;min-width:0;flex:1 1 220px}
.account-bar .avatar{width:48px;height:48px;font-size:20px}
.who-text{display:flex;flex-direction:column;min-width:0}
.who-text .sub{margin:2px 0 0;overflow-wrap:anywhere}
.who-name{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.signout-actions{display:flex;gap:8px;flex-wrap:wrap}
.danger-zone{margin-top:44px;padding-top:16px;border-top:1px dashed #E3C4C4}
.danger-zone h2{font-size:14px;margin:0 0 4px;color:#9B1C1C}
.danger-zone .sub{font-size:13px;margin:0 0 10px;max-width:640px}
.btn.sm{padding:8px 12px;font-size:13px;border-radius:11px}
@media(max-width:520px){.signout-actions{width:100%}.signout-actions .btn{flex:1 1 auto}}

/* credits (#27): the grown-ups' page (offers, history) and the header count */
.offers{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}
.offer{display:flex;flex-direction:column;gap:4px}.offer .price{font-size:22px;font-weight:1000;margin:6px 0 0}.offer .btn{margin-top:auto}
.history{list-style:none;padding:0;margin:0}.history li{display:grid;grid-template-columns:auto 1fr auto auto;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line);font-size:14px}
.history .when,.history .after{color:var(--muted);font-size:12px}.history .plus{color:#007e77}.history .minus{color:var(--coral)}
.costline{margin-top:12px}.toolbtn.credits{font-weight:1000}
@media(max-width:520px){.history li{grid-template-columns:1fr auto}.history .when,.history .after{grid-column:1/-1}}
/* ---- phones (#214) 1/3: iPhone safe area (#222), bottom navigation + mini-player (#216), language list (#215).
   Bar heights come from --navh and env(safe-area-inset-*); checked by tests/e2e/mobile.mjs. ---- */
:root{--navh:60px;--safe-b:env(safe-area-inset-bottom,0px)}
.shell{padding-top:max(18px,env(safe-area-inset-top));padding-left:max(24px,env(safe-area-inset-left));padding-right:max(24px,env(safe-area-inset-right))}
div.mini{bottom:calc(14px + var(--safe-b))}
body.has-mini .shell{padding-bottom:calc(110px + var(--safe-b))}
@media(max-width:800px){
  .shell{padding-top:max(13px,env(safe-area-inset-top));padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));
    padding-bottom:calc(var(--navh) + var(--safe-b) + 20px)}
  body.has-mini .shell{padding-bottom:calc(var(--navh) + var(--safe-b) + 100px)}
  /* the bottom navigation has a fixed height; the mini-player and the toast sit above it, never on it */
  .mobile{height:calc(var(--navh) + var(--safe-b));padding:4px max(4px,env(safe-area-inset-right)) var(--safe-b) max(4px,env(safe-area-inset-left));align-items:stretch}
  .mobile a{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 2px;line-height:1.25;border-radius:12px}
  .mobile a.sel{color:#007e77}
  div.mini{bottom:calc(var(--navh) + var(--safe-b) + 8px);width:calc(100% - 16px);border-radius:14px}
  #toast{bottom:calc(var(--navh) + var(--safe-b) + 16px)}
  body.has-mini #toast{bottom:calc(var(--navh) + var(--safe-b) + 96px)}
  /* the language list opens full width under the header, so it never runs off the side */
  .header{position:relative}
  .langmenu{position:static}
  .langlist{left:0;right:0;top:calc(100% - 16px);min-width:0;max-height:calc(100dvh - 140px)}
}
@media(max-width:800px),(max-height:500px){ /* two columns: every language fits on a phone screen */
  .langlist:not([hidden]){display:grid;grid-template-columns:1fr 1fr;gap:2px}
}
@media(max-height:500px) and (min-width:801px){
  .langlist{min-width:380px;max-height:calc(100dvh - 90px)}
}

/* ---- phones (#214) 2/3: at least 44 x 44 px for everything tappable on touch screens (#218, WCAG 2.5.5) ---- */
@media(pointer:coarse){
  .chip,.btn,.toolbtn,.linkbtn,.heart:not(.small),.btn.sm{min-height:44px}
  .chip,a.btn,.linkbtn{display:inline-flex;align-items:center;justify-content:center}
  .chip{min-width:44px}
  .heart:not(.small),.sharebtn.icononly{min-width:44px;justify-content:center;margin-top:0}
  .brand{min-height:44px}
  .pfimg{width:44px;height:44px}
  .mini-ctrl button{min-width:44px;min-height:44px}
  .seek{padding:17px 0}
  .seek .mark{top:13px}
  .field label.radio{min-height:44px;margin:0}
  .side a{min-height:44px}
  summary{min-height:44px;line-height:44px}
  .linkbox{min-height:44px}
}

/* ---- phones (#214) 3/3: the player's first screen (#219), the mini-player title (#220), the home hero (#221) ---- */
.quizbox{scroll-margin:12px}
@media(max-width:800px){
  .quizbox{scroll-margin:12px 0 calc(var(--navh) + var(--safe-b) + 12px)}
  .detail.player{gap:14px}
  .detail.player .cover{height:min(130px,20vh)}
  .player .titlerow h1{font-size:25px;margin:8px 0}
}
@media(max-width:800px),(max-height:500px){ /* the player: controls (then the quiz) first, the listening mode under them */
  #playerbox,#idlebox{display:flex;flex-direction:column}
  #playerbox > .pill,#idlebox > .pill{align-self:flex-start}
  #playerbox > .quizbox{order:1}
  #playerbox > .modes,#playerbox > p.sub:not(.center),#idlebox > .modes,#idlebox > p.sub{order:2}
}
@media(max-width:480px),(max-height:500px){ /* the six player buttons on one row */
  .controls{gap:4px}
  .controls .btn,.controls .btn.icon{min-width:44px;padding:12px 6px}
  .controls .btn.big{width:60px;height:60px;padding:0}
}
@media(max-width:400px){.stage{padding:14px}}
@media(max-height:500px) and (min-width:801px){ /* phones in landscape: a slimmer header, side menu and player */
  .header{padding-bottom:12px}
  .header .tag,.sidecard{display:none}
  .layout{grid-template-columns:190px minmax(0,1fr);gap:14px}
  .stage{padding:18px;min-height:0}
  .detail.player{grid-template-columns:180px 1fr;gap:18px}
  .detail.player .cover{height:170px}
  .player .titlerow h1{font-size:25px;margin:8px 0}
  div.mini{left:auto;right:max(24px,env(safe-area-inset-right));transform:none;width:min(560px,calc(100% - 290px))}
}
@media(max-width:480px){.mini-ctrl [data-skip]{display:none}} /* play and next only: the title stays readable */
@media(max-width:520px){ /* Marta small above the text, the text full width */
  .hero{flex-direction:column-reverse;align-items:flex-start;gap:0}
  .hero .marta.hero{width:96px;max-width:30%;margin:-6px 0 -10px auto}
  .hero h1{max-width:none}
}

/* ---- footer: "Powered by PlayPrompt" and its popover (#276, app/powered.js). Very small; the popover opens above the line ---- */
.pp{position:relative;display:block;width:max-content;max-width:100%;margin:6px auto 0}
.pp-btn{display:inline-flex;align-items:center;gap:4px;background:none;border:0;border-radius:8px;padding:3px 6px;color:#8ca0ad;font-size:10.5px;font-weight:700;line-height:1}
.pp-btn img{width:14px;height:12px;display:block}
.pp-btn .pp-name{font-weight:900;color:#6f8696}
.pp-btn:hover .pp-name,.pp-btn[aria-expanded="true"] .pp-name{color:var(--navy)}
.pp-pop{position:absolute;left:50%;bottom:calc(100% + 10px);transform:translateX(-50%);z-index:25;width:min(280px,calc(100vw - 32px));
  background:white;border:1px solid var(--line);border-radius:16px;box-shadow:0 14px 40px #0d2b5526;padding:14px 16px 12px;text-align:left;
  color:var(--navy);font-size:13px;animation:pp-in .16s ease-out}
.pp-pop[hidden]{display:none}
.pp-pop::before{content:"";position:absolute;left:0;right:0;bottom:-12px;height:12px} /* hover bridge from the line to the popover */
.pp-pop::after{content:"";position:absolute;left:50%;bottom:-7px;width:12px;height:12px;margin-left:-6px;background:white;
  border-right:1px solid var(--line);border-bottom:1px solid var(--line);transform:rotate(45deg)}
.pp-head{display:flex;align-items:center;gap:9px;font-size:15px}
.pp-head img{width:34px;height:30px;display:block}
.pp-pop p{margin:8px 0 0;line-height:1.45}
.pp-pop .pp-title{font-weight:800}
.pp-pop .pp-about{color:var(--muted);font-size:12.5px}
.footer .pp-link{display:inline-flex;align-items:center;gap:4px;margin-top:10px;color:#007e77;font-weight:900;text-decoration:none}
.footer .pp-link:hover{text-decoration:underline}
.pp-link:focus-visible,.pp-btn:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
.pp-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@keyframes pp-in{from{opacity:0;transform:translate(-50%,4px)}to{opacity:1;transform:translate(-50%,0)}}
@media (prefers-reduced-motion:reduce){.pp-pop{animation:none}}
@media(pointer:coarse){.pp-btn{min-height:44px;padding:0 10px}.footer .pp-link{min-height:44px}}

/* ---- create your podcast (#254): Vanni's three steps, mobile first ---- */
.cflow{list-style:none;padding:0;margin:18px 0 0;display:grid;gap:14px}
.cstep{background:#fff;border:1px solid var(--line);border-radius:20px;padding:16px;min-width:0}
.cstep h2{display:flex;align-items:center;gap:10px;font-size:18px;margin:0 0 14px}
.cstep .num{flex:none;width:30px;height:30px;border-radius:50%;background:var(--teal);color:#fff;display:inline-grid;place-items:center;font-size:15px}
.cstep .field{margin:14px 0 0}
.cstep textarea.title2{min-height:0;resize:none;font-weight:800;font-size:17px;line-height:1.35}
.cstep .hint{display:flex;justify-content:space-between;gap:10px;font-size:12.5px;color:var(--muted);margin-top:6px;min-height:18px}
.cstep .hint .ok{color:#007e77}.cstep .hint .bad{color:#9B1C1C}
.cstep .hint .count{flex:none;font-variant-numeric:tabular-nums}
.cstep .locate{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:14px}
.cstep .locate .hint{margin:0}
.agenote{background:#f1f4f6;color:#4f6273;border-radius:14px;padding:12px 14px;margin:12px 0 0;font-size:14px}
details.eplang{margin-top:16px;color:var(--ink)}
details.eplang summary{cursor:pointer;font-size:14px}
details.eplang summary u{color:#007e77;font-weight:800}
details.eplang .chips{margin-top:10px}
@media(min-width:801px){.cstep{padding:20px 22px}}

/* ---- "About this episode" (#367): a quiet, collapsed block at the foot of a podcast's page ---- */
details.about{margin-top:28px;border-top:1px solid var(--line);padding-top:6px;color:var(--ink);font-size:14px}
details.about>summary{cursor:pointer;font-weight:900;color:var(--muted);padding:8px 0}
details.about h3{font-size:15px;margin:18px 0 6px;color:var(--navy)}
details.about p{margin:6px 0}
details.about .about-facts{margin-top:4px}
details.about ol,details.about ul{margin:6px 0;padding-left:22px}
details.about li{margin:6px 0;line-height:1.5}
details.about-answer{margin-top:8px}
details.about-answer>summary{cursor:pointer;font-weight:800;color:#007e77}
/* ---- a podcast's page plays in place (#389): a visitor's invitation above the player, the bar while listening ---- */
.landhero{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 24px;margin-bottom:18px;border:1px solid #c7eee8}
.landhero h2{margin:6px 0;font-size:26px;line-height:1.15}
.landhero p{margin:0;color:var(--ink);max-width:560px}
.landhero .actions{align-items:center;margin-top:14px}
.landmore{display:inline-flex;align-items:center;min-height:44px;padding:0 6px;font-weight:900;text-decoration:none}
.marta.landmarta{width:120px;flex:none;filter:drop-shadow(0 6px 14px #0d2b5522)}
.ownlink{margin:0 0 10px;font-weight:900}
.ownlink a{text-decoration:none}
.epinfo{margin-top:14px}
.epinfo .sub{margin:8px 0}
.gate .own{margin:8px 0 0;font-weight:800;color:var(--navy)}
.landbar{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(14px + var(--safe-b));width:min(760px,calc(100% - 24px));z-index:19;
  display:flex;align-items:center;gap:10px;background:white;border:1px solid #c7eee8;border-radius:16px;padding:8px 8px 8px 12px;box-shadow:0 10px 30px #0d2b5526}
.landbar[hidden],body.has-mini .landbar{display:none}
.landbar b{flex:1;min-width:0;font-size:14px;line-height:1.25}
.landbar .btn{flex:none;padding:10px 14px;font-size:14px;min-height:44px}
body.has-landbar .shell{padding-bottom:calc(100px + var(--safe-b))}
@media(max-width:800px){
  .landbar{bottom:calc(var(--navh) + var(--safe-b) + 8px);width:calc(100% - 16px)}
  body.has-landbar .shell{padding-bottom:calc(var(--navh) + var(--safe-b) + 116px)}
  body.has-landbar #toast{bottom:calc(var(--navh) + var(--safe-b) + 86px)}
}
@media(max-width:520px){ /* compact, so the player's controls stay on the first screen: Marta in the corner */
  .landhero{display:block;position:relative;padding:14px 16px;margin-bottom:12px}
  .landhero .eyebrow{display:block;font-size:10.5px;letter-spacing:.06em;padding-right:62px}
  .landhero h2{font-size:20px;margin:4px 0;padding-right:62px}
  .landhero p{font-size:14px;line-height:1.4}
  .landhero .actions{margin-top:10px}
  .landhero .landmore{display:none} /* the Library is one tap away in the bottom bar */
  .marta.landmarta{position:absolute;top:8px;right:10px;width:58px}
  .landhero ~ .landplayer .detail.player .cover{height:min(104px,14vh)} /* a slimmer cover under the hero */
  .landhero ~ .landplayer{margin-top:10px!important}
}
@media(max-height:500px) and (min-width:521px){ /* phones in landscape: a slimmer hero, the player soon after */
  .landhero{padding:14px 18px;margin-bottom:12px}
  .landhero h2{font-size:20px}
  .landhero p{font-size:14px}
  .landhero .actions{margin-top:8px}
  .marta.landmarta{width:76px}
}
/* #420: the library's category chips (up to 16): they wrap on a wide screen and are one row that scrolls sideways
   on a phone */
.chips.cats{margin:22px 0}
@media(max-width:800px){
  .chips.cats{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:4px;margin:18px 0}
  .chips.cats::-webkit-scrollbar{display:none}
  .chips.cats .chip{flex:none;white-space:nowrap}
}

/* Library search (#419): one wide box under the shelves, at least 44px tall for small fingers */
.libsearch{margin:18px 0 0}
.libsearch input{width:100%;min-height:46px;border:1px solid #cbdde5;border-radius:14px;padding:12px 14px 12px 42px;color:var(--navy);
  background:white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b8394' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") no-repeat 14px center/18px}
.libnone p{margin:0}
