/* GnomeYoga player: one screen, one big ring, zero clutter. */
:root {
  --ink: #2b1f17; --ink-soft: #635244; --ink-muted: #948273;
  --brand-red: #b83a28; --brand-red-hover: #9c2e1f;
  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body.player-page {
  margin: 0; color: var(--ink); font: 16px/1.45 var(--font-sans);
  -webkit-font-smoothing: antialiased; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 22px; border-radius: 999px; border: 0;
  background: var(--brand-red); color: #fff; font: 700 15px var(--font-sans);
  text-decoration: none; cursor: pointer; box-shadow: 0 8px 20px rgba(184, 58, 40, 0.28);
  transition: transform 0.15s ease, background 0.15s ease;
}
.button:hover { background: var(--brand-red-hover); transform: translateY(-1px); }
.button.secondary { background: rgba(255, 255, 255, 0.9); color: var(--brand-red); box-shadow: inset 0 0 0 1.5px var(--brand-red); }
.button-xl { min-height: 56px; padding: 12px 34px; font-size: 17px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

.pl {
  position: relative; height: 100dvh; min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-rows: auto 1fr auto;
  background: radial-gradient(110% 70% at 50% 18%, #fffdf8 0%, var(--c1) 55%, var(--c2) 100%);
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
  user-select: none;
}

/* ---------- Top bar ---------- */
.pl-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.pl-icon {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.7); color: var(--ink); font-size: 16px; text-decoration: none;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.pl-icon:hover { background: #fff; }
.pl-icon[aria-pressed="false"] { opacity: 0.45; }
.pl-segments { flex: 1; display: flex; gap: 3px; min-width: 0; }
.pl-seg { height: 5px; border-radius: 99px; background: rgba(43, 31, 23, 0.12); overflow: hidden; }
.pl-seg i { display: block; height: 100%; width: 0; background: var(--c3); border-radius: inherit; }

/* ---------- Stage ---------- */
.pl-stage {
  min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 20px; touch-action: pan-y; cursor: pointer;
}
.pl-section { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c3); }
.pl-figure { position: relative; display: grid; place-items: center; min-height: 0; flex: 0 1 auto; }
.pl-halo {
  position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 68%);
  animation: breathe 10s ease-in-out infinite;
}
.pl-img {
  position: relative; display: block; width: auto; height: min(44dvh, 460px); max-width: 82vw; object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(43, 31, 23, 0.16));
  transition: opacity 0.28s ease, transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.pl-img.is-out { opacity: 0; transform: translateY(8px) scale(0.97); }
.pl.is-running .pl-img { animation: sway 6s ease-in-out infinite; }
.pl-name { margin: 10px 0 0; font: 800 clamp(26px, 7vw, 44px)/1.05 var(--font-serif); letter-spacing: -0.02em; color: var(--ink); }
.pl-sa { margin: 2px 0 0; font: italic 400 15px var(--font-serif); color: var(--ink-muted); }
.pl-cue { margin: 10px 0 0; max-width: 36ch; min-height: 2.9em; font-size: 15.5px; color: var(--ink-soft); }

/* ---------- Dock ---------- */
.pl-dock { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; justify-items: center; padding: 6px 20px 14px; row-gap: 6px; }
.pl-ctrl {
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.72); color: var(--ink);
  transition: transform 0.15s ease, background 0.15s ease;
}
.pl-ctrl:hover { background: #fff; }
.pl-ctrl:active { transform: scale(0.92); }
.pl-ring {
  position: relative; width: 118px; height: 118px; border: 0; padding: 0; border-radius: 50%;
  background: #fff; cursor: pointer; box-shadow: 0 12px 30px rgba(43, 31, 23, 0.14);
  display: grid; place-items: center; transition: transform 0.15s ease;
}
.pl-ring:active { transform: scale(0.96); }
.pl-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.pl-ring__track { fill: none; stroke: rgba(43, 31, 23, 0.08); stroke-width: 8; }
.pl-ring__bar { fill: none; stroke: var(--c3); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.pl-ring__num { position: relative; font: 800 36px/1 var(--font-sans); font-variant-numeric: tabular-nums; color: var(--ink); margin-top: -8px; }
.pl-ring__side { position: absolute; bottom: 26px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c3); }
.pl-ring__state {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, 0.82); color: var(--brand-red); font-size: 34px; padding-left: 6px;
  opacity: 0; transition: opacity 0.2s ease; pointer-events: none;
}
.pl:not(.is-running) .pl-ring__state { opacity: 1; }
.pl-upnext { grid-column: 1 / -1; margin: 4px 0 0; min-height: 1.4em; font-size: 13px; font-weight: 700; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.pl-upnext img { width: 26px; height: 28px; object-fit: contain; }

/* ---------- Toast ---------- */
.pl-toast {
  position: absolute; left: 50%; top: 70px; transform: translateX(-50%); z-index: 20;
  background: var(--ink); color: #fff; font-weight: 800; font-size: 15px;
  padding: 10px 20px; border-radius: 999px; box-shadow: 0 12px 28px rgba(43, 31, 23, 0.25);
  animation: pop 0.4s cubic-bezier(0.34, 1.6, 0.64, 1);
}

/* ---------- Overlays ---------- */
.pl-overlay {
  position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px;
  background: color-mix(in srgb, var(--c1) 55%, rgba(255, 255, 255, 0.55));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.pl-card {
  position: relative; width: min(420px, 100%); text-align: center;
  background: rgba(255, 255, 255, 0.9); border-radius: 32px; padding: 22px 22px 26px;
  box-shadow: 0 24px 60px rgba(43, 31, 23, 0.16); animation: rise 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
  overflow: hidden;
}
.pl-intro-art {
  height: 200px; border-radius: 24px; margin-bottom: 14px; padding: 12px 10px 0;
  background: radial-gradient(110% 90% at 30% 10%, #fff 0%, var(--c1) 50%, var(--c2) 100%);
}
.pl-kicker { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c3); }
.pl-card__title { margin: 4px 0 4px; font: 800 30px/1.05 var(--font-serif); letter-spacing: -0.02em; }
.pl-card__meta { margin: 0 0 18px; color: var(--ink-soft); }
.pl-tips { margin: 14px 0 0; font-size: 12.5px; color: var(--ink-muted); }
@media (hover: none) { .pl-tips-keys { display: none; } }

.pl-overlay--count { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; }
.pl-overlay--count span {
  font: 800 140px/1 var(--font-serif); color: var(--c3);
  text-shadow: 0 10px 40px rgba(255, 255, 255, 0.9); animation: count 0.9s ease-out;
}

.pl-card--done { padding-top: 30px; }
.pl-done-gnome { width: 130px; height: 130px; object-fit: contain; animation: bob 3s ease-in-out infinite; }
.pl-done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pl-done-links { margin: 16px 0 0; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.pl-confetti { position: absolute; inset: 0; pointer-events: none; }
.pl-confetti span {
  position: absolute; top: -30px; left: calc(var(--i) * 6.6%); font-size: 20px;
  animation: fall 2.8s cubic-bezier(0.3, 0.6, 0.4, 1) calc(var(--i) * 0.09s) both;
}

/* ---------- Motion ---------- */
@keyframes breathe { 0%, 100% { transform: scale(0.86); opacity: 0.7; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes sway { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pop { from { transform: translateX(-50%) scale(0.6); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes count { from { transform: scale(1.5); opacity: 0; } 30% { opacity: 1; } to { transform: scale(0.9); opacity: 0.15; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(2deg); } }
@keyframes fall { from { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: 1; } to { transform: translateY(560px) rotate(260deg); opacity: 0; } }

/* Gnome art (shared with flows.css, minimal copy) */
.fan { position: relative; width: 100%; height: 100%; }
.fan__img { object-fit: contain; object-position: center bottom; filter: drop-shadow(0 10px 14px rgba(43, 31, 23, 0.16)); }
.fan--row { display: grid; grid-template-columns: 1fr 1.4fr 1fr; align-items: end; gap: 6px; }
.fan--row .fan__img { width: 100%; height: 100%; min-width: 0; }
.fan--row .fan__img--0, .fan--row .fan__img--2 { height: 76%; }

/* Intro: clear way out */
.pl-card__close { position: absolute; top: 10px; right: 10px; z-index: 3; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--ink); font-size: 18px; box-shadow: 0 2px 8px rgba(43, 31, 23, 0.15); }
.pl-card__close:hover { background: #fff; color: var(--brand-red); }
.pl-back { display: inline-block; margin-top: 12px; font-weight: 700; font-size: 14px; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.pl-back:hover { color: var(--brand-red); }

@media (min-width: 900px) {
  .pl-img { height: min(52dvh, 520px); }
  .pl-dock { max-width: 560px; width: 100%; margin: 0 auto; }
}
@media (max-height: 640px) {
  .pl-img { height: 36dvh; }
  .pl-cue { min-height: 0; font-size: 14px; }
  .pl-ring { width: 96px; height: 96px; }
  .pl-ring__num { font-size: 30px; }
  .pl-ring__side { bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .pl-halo, .pl.is-running .pl-img, .pl-done-gnome, .pl-confetti span, .pl-overlay--count span, .pl-card, .pl-toast { animation: none !important; }
  .pl-img { transition: opacity 0.2s ease; }
}
.pl-card--done > :not(.pl-confetti) { position: relative; z-index: 1; }
.pl-confetti { z-index: 0; opacity: 0.8; }
.button:focus-visible, .pl-ring:focus-visible, .pl-ctrl:focus-visible, .pl-icon:focus-visible { outline: 3px solid color-mix(in srgb, var(--c3) 60%, #fff); outline-offset: 3px; }
.button:focus:not(:focus-visible) { outline: none; }
.fan--row { grid-template-rows: 100%; }
.pl-back { display: block; width: fit-content; margin: 12px auto 0; }
