/* =====================================================================
   RiseSpeak Lumina · HX-1.0.0 — lite layer
   ---------------------------------------------------------------------
   Paint-cost reductions that keep the design intact, plus the styles for
   the lesson podcast player and the version stamp.

   Everything here is additive; lumina.css stays authoritative for the
   design language.
   ===================================================================== */

:root{
  --hx-radius:22px;
  --hx-gold:#e8b86d;
  --hx-gold-soft:#f7e3bd;
  --hx-ink:#0b0d16;
  --hx-muted:#9a9fb4;
  --hx-ease:cubic-bezier(.22,1,.36,1);
}

/* Off-screen sections cost nothing to paint until they scroll close. */
.unit-page > section,
.home-section,
.courses-grid,
.games-grid,
.map-grid,
.quiz-list{
  content-visibility:auto;
  contain-intrinsic-size:auto 520px;
}
img,video{max-width:100%}
img[loading="lazy"]{content-visibility:auto}

/* A paused tab should not burn the battery. */
.hx-hidden-tab *{animation-play-state:paused!important}

/* Calm mode: honour reduced motion without removing information. */
.hx-calm *,
.hx-calm *::before,
.hx-calm *::after{
  animation-duration:.001ms!important;
  animation-iteration-count:1!important;
  transition-duration:.12s!important;
}
.hx-calm .glass,
.hx-calm .glass-2{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:#141827e6!important}

/* Lite mode: slow network or a small device. Keep the layout, drop the
   expensive blur and shadow work. */
.hx-lite .glass,
.hx-lite .glass-2,
.hx-lite .glass-gold,
.hx-lite .tilt{
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  background:linear-gradient(160deg,#161a2b,#10131f)!important;
  box-shadow:0 8px 24px rgba(0,0,0,.35)!important;
  transform:none!important;
}
.hx-lite .hero-logo,
.hx-lite .map-canvas,
.hx-lite canvas{filter:none!important}
.hx-lite .aurora,
.hx-lite .glow,
.hx-lite .spark-layer{display:none!important}

/* ---------------- version stamp ---------------- */
.hx-version{
  display:inline-flex;align-items:center;gap:6px;
  margin-inline-start:10px;padding:4px 10px;border-radius:999px;
  font:600 10px/1 ui-monospace,'SF Mono',Menlo,monospace;letter-spacing:1px;
  color:#ecd9b2;background:rgba(232,184,109,.10);
  border:1px solid rgba(232,184,109,.28);
  vertical-align:middle;
}
.hx-version::before{content:'';width:5px;height:5px;border-radius:50%;background:#8fe0b2;box-shadow:0 0 8px #8fe0b2}

/* =====================================================================
   Lesson podcast player
   ===================================================================== */
.podcast-card{
  margin:28px 0;
  padding:22px;
  border-radius:var(--hx-radius);
  background:linear-gradient(155deg,rgba(255,255,255,.10),rgba(255,255,255,.02) 45%,rgba(232,184,109,.06));
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 24px 60px -30px rgba(0,0,0,.8),inset 0 1px 0 rgba(255,255,255,.16);
  backdrop-filter:blur(26px) saturate(160%);
  -webkit-backdrop-filter:blur(26px) saturate(160%);
}
.podcast-card__head{display:flex;align-items:flex-start;gap:14px;margin-bottom:16px}
.podcast-card__mark{
  width:46px;height:46px;border-radius:14px;flex:none;display:grid;place-items:center;
  background:linear-gradient(150deg,rgba(232,184,109,.26),rgba(232,184,109,.05));
  border:1px solid rgba(232,184,109,.36);color:#f7e3bd;
}
.podcast-card h3{margin:0 0 4px;font-size:17px;color:#f6f2e9;letter-spacing:-.01em}
.podcast-card p{margin:0;font-size:12.5px;color:var(--hx-muted);line-height:1.6}
.podcast-card__tag{
  margin-inline-start:auto;padding:4px 10px;border-radius:999px;font-size:10px;letter-spacing:1px;
  text-transform:uppercase;color:#f7e3bd;background:rgba(232,184,109,.14);border:1px solid rgba(232,184,109,.3);
}

.podcast-list{display:flex;flex-direction:column;gap:10px}
.podcast-ep{
  display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;
  padding:14px;border-radius:16px;
  background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);
  transition:border-color .25s,background .25s;
}
.podcast-ep:hover{border-color:rgba(232,184,109,.35);background:rgba(255,255,255,.08)}
.podcast-ep.is-playing{border-color:rgba(232,184,109,.6);background:rgba(232,184,109,.10)}
.podcast-play{
  width:44px;height:44px;border-radius:50%;display:grid;place-items:center;flex:none;
  color:#17130a;background:linear-gradient(140deg,#f9e5b7,#e8b86d);
  border:1px solid rgba(255,246,222,.6);
  box-shadow:0 8px 20px -10px rgba(216,164,79,.9),inset 0 1px 0 rgba(255,255,255,.8);
  cursor:pointer;transition:transform .25s var(--hx-ease);
}
.podcast-play:hover{transform:scale(1.06)}
.podcast-play:active{transform:scale(.96)}
.podcast-ep h4{margin:0 0 3px;font-size:14px;color:#f3efe6;font-weight:600}
.podcast-ep small{font-size:11.5px;color:var(--hx-muted)}
.podcast-ep__meta{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:4px}
.podcast-badge{font-size:10px;letter-spacing:.8px;text-transform:uppercase;color:#c8f0d9;background:rgba(111,214,165,.14);border:1px solid rgba(111,214,165,.3);padding:2px 8px;border-radius:999px}

.podcast-bar{
  display:none;position:sticky;bottom:0;z-index:40;
  margin-top:14px;padding:14px 16px;border-radius:18px;
  background:linear-gradient(150deg,rgba(255,255,255,.14),rgba(255,255,255,.04)),rgba(12,16,26,.86);
  border:1px solid rgba(255,255,255,.16);
  backdrop-filter:blur(30px) saturate(170%);-webkit-backdrop-filter:blur(30px) saturate(170%);
  box-shadow:0 -10px 40px -20px #000,inset 0 1px 0 rgba(255,255,255,.2);
}
.podcast-bar[data-open="true"]{display:block}
.podcast-bar__top{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.podcast-bar__title{flex:1;min-width:0;font-size:13px;color:#f4f0e7;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.podcast-bar__time{font:500 11.5px/1 ui-monospace,Menlo,monospace;color:#c9c4b8}
.podcast-seek{
  position:relative;height:6px;border-radius:6px;background:rgba(255,255,255,.14);cursor:pointer;overflow:hidden;
}
.podcast-seek i{position:absolute;inset:0 auto 0 0;width:0;background:linear-gradient(90deg,#f4d79c,#e8b86d);border-radius:6px}
.podcast-controls{display:flex;align-items:center;gap:8px;margin-top:10px;flex-wrap:wrap}
.podcast-controls button{
  display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border-radius:999px;
  font-size:11.5px;color:#efe9dc;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.16);
  cursor:pointer;transition:background .2s,border-color .2s;
}
.podcast-controls button:hover{background:rgba(255,255,255,.16);border-color:rgba(232,184,109,.4)}
.podcast-controls button[aria-pressed="true"]{background:rgba(232,184,109,.2);border-color:rgba(232,184,109,.55);color:#ffe9bf}
.podcast-controls .speed{margin-inline-start:auto}
.podcast-transcript{
  margin-top:12px;max-height:240px;overflow:auto;padding:14px;border-radius:14px;
  background:rgba(0,0,0,.28);border:1px solid rgba(255,255,255,.1);
  font-size:12.5px;line-height:1.8;color:#cfcabc;white-space:pre-wrap;
}
.podcast-empty{padding:18px;border-radius:14px;border:1px dashed rgba(255,255,255,.16);font-size:12.5px;color:var(--hx-muted)}

@media(max-width:600px){
  .podcast-card{padding:18px;border-radius:18px}
  .podcast-ep{grid-template-columns:auto 1fr}
  .podcast-ep .podcast-ep__actions{grid-column:1/-1}
}
