/* ---------------------------------------------------------------- v2.1: listen here + YouTube */
.listen-row { display: flex; gap: 8px; width: 100%; flex: 0 0 auto; align-items: stretch; margin-top: 6px; }
.codex-list > .listen-row { margin-top: 0; }
.listen-btn { flex: 1 1 auto; min-width: 0; min-height: 58px; padding: 2px 10px; gap: 10px; }
.listen-btn .bl { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.listen-btn .piece { min-width: 0; }
.listen-btn .pc, .listen-btn .pt { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listen-btn .pt { color: var(--ultra); }
.listen-btn.on { filter: brightness(1.06) drop-shadow(0 0 7px rgba(233,193,90,0.95)); }
.listen-btn.on .pc { color: var(--verm); }
.scroll > .listen-btn { margin-top: 6px; width: 100%; }
/* the gold seal with a quaver; while playing it rings with gold */
.listen-seal { position: relative; flex: 0 0 auto; width: 38px; height: 38px; margin: 0 !important; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1b0, #e0ad3a 45%, #a06c10 85%); border: 2px solid var(--ink);
  box-shadow: inset 0 0 0 2px rgba(255,244,200,0.7), 0 2px 0 rgba(42,26,14,0.4); }
.listen-seal::after { content: "♪"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 900; line-height: 1; color: var(--ink); text-shadow: 0 1px 0 rgba(255,244,200,0.8); }
.listen-btn.on .listen-seal { animation: sealRing 1.1s ease-in-out infinite; }
.listen-btn.on .listen-seal::after { content: "■"; font-size: 15px; color: var(--verm); }
@keyframes sealRing { 0%, 100% { box-shadow: inset 0 0 0 2px rgba(255,244,200,0.7), 0 0 0 0 rgba(233,193,90,0.9); } 50% { box-shadow: inset 0 0 0 2px rgba(255,244,200,0.7), 0 0 0 8px rgba(233,193,90,0); } }
.yt-mini { flex: 0 0 86px; min-width: 0; min-height: 58px; padding: 0 4px; flex-direction: column; gap: 0; }
.yt-mini > * { margin: 0; }
.yt-mini .yt-play { width: 32px; height: 32px; }
.yt-mini .yt-play::after { left: 11px; top: 7px; border-left-width: 12px; border-top-width: 7px; border-bottom-width: 7px; }
.yt-mini .yt-label { font-size: 14px; font-weight: 800; line-height: 1.1; color: var(--verm); white-space: nowrap; }
#app.phone .listen-btn, #app.phone .yt-mini { min-height: 62px; }
#app.phone .yt-mini .yt-label { font-size: 17px; }

/* phones: the codex list's rows are taller there, so the list scrolls between its head and the pager */
#app.phone .codex-list { overflow-y: auto; overflow-x: hidden; min-height: 0; flex: 1 1 0; gap: 5px; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; }
#app.phone .codex-list::-webkit-scrollbar { display: none; }
#app.phone .codex-list > .btn { flex: 0 0 auto; }

/* ---------------------------------------------------------------- v2.1: the award ceremony */
.cer-wrap { display: flex; gap: 10px; align-items: flex-start; flex: 0 0 auto; }
.medal-stage { position: relative; flex: 0 0 136px; height: 218px; }
.medal { position: absolute; left: 50%; top: 0; width: 120px; height: 184px; margin-left: -60px; transform-origin: 50% 0;
  animation: medalDrop 0.95s cubic-bezier(0.25, 1.3, 0.45, 1) both; }
.medal.landed { animation: none; }
.medal .ribbon { position: absolute; top: 0; width: 36px; height: 92px; border: 2px solid var(--ink); transform-origin: 50% 100%;
  background: linear-gradient(90deg, var(--verm) 0 34%, #f6e7c0 34% 66%, var(--ultra) 66%); box-shadow: inset 0 -10px 12px rgba(42,26,14,0.25); }
.medal .rl { left: 28px; transform: skewX(14deg); }
.medal .rr { right: 28px; transform: skewX(-14deg); }
.medal .disc { position: absolute; left: 8px; top: 76px; width: 104px; height: 104px; border-radius: 50%; border: 3px solid var(--ink); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 34% 28%, #fffbe0 0%, #f6d978 22%, #d9a531 52%, #a06c10 78%, #6b4506 100%);
  box-shadow: inset 0 0 0 5px rgba(255,236,170,0.55), inset 0 0 0 10px rgba(107,69,6,0.45), 0 4px 0 rgba(42,26,14,0.45); }
.medal .dn { position: relative; font-size: 54px; font-weight: 900; line-height: 1; color: rgba(92,58,4,0.92); text-shadow: 0 2px 0 rgba(255,244,200,0.85), 0 -1px 0 rgba(60,30,0,0.5); }
.medal .shine { position: absolute; top: -20%; left: -60%; width: 38%; height: 140%; transform: skewX(-20deg);
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.8), rgba(255,255,255,0)); animation: medalShine 2.6s ease-in-out 1.1s infinite; }
.medal.m2 .disc { background: radial-gradient(circle at 34% 28%, #ffffff 0%, #e6e9ee 25%, #b5bcc6 55%, #7d8591 80%, #4d535c 100%);
  box-shadow: inset 0 0 0 5px rgba(255,255,255,0.5), inset 0 0 0 10px rgba(70,76,86,0.45), 0 4px 0 rgba(42,26,14,0.45); }
.medal.m2 .dn { color: rgba(56,62,72,0.92); }
.medal.m3 .disc { background: radial-gradient(circle at 34% 28%, #ffe9d0 0%, #e8a96a 25%, #c07a3a 55%, #8a4f1e 80%, #5a300e 100%);
  box-shadow: inset 0 0 0 5px rgba(255,226,196,0.5), inset 0 0 0 10px rgba(90,48,14,0.45), 0 4px 0 rgba(42,26,14,0.45); }
.medal.m3 .dn { color: rgba(78,38,8,0.92); }
.medal .glow { position: absolute; left: -26px; top: 46px; width: 172px; height: 172px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(255,230,140,0.9) 0%, rgba(255,214,110,0.4) 40%, rgba(255,214,110,0) 70%); animation: medalGlow 1.8s ease-in-out 0.9s infinite; }
.medal.landed .glow { animation-delay: 0s; }
.medal.m2 .glow { background: radial-gradient(circle, rgba(240,246,255,0.95) 0%, rgba(200,214,235,0.4) 40%, rgba(200,214,235,0) 70%); }
.medal.m3 .glow { background: radial-gradient(circle, rgba(255,214,170,0.9) 0%, rgba(240,170,110,0.4) 40%, rgba(240,170,110,0) 70%); }
@keyframes medalDrop { 0% { transform: translateY(-320px) rotate(-10deg); opacity: 0; } 12% { opacity: 1; } 62% { transform: translateY(12px) rotate(4deg); } 80% { transform: translateY(-5px) rotate(-2deg); } 100% { transform: none; opacity: 1; } }
@keyframes medalGlow { 0%, 100% { opacity: 0.45; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes medalShine { 0% { left: -60%; } 45%, 100% { left: 130%; } }
.medal-name { position: absolute; left: -6px; right: -6px; bottom: 0; text-align: center; font-size: 21px; font-weight: 900; line-height: 1.1; white-space: nowrap;
  color: var(--verm); text-shadow: 1px 1px 0 var(--gold2), 2px 2px 0 var(--ink); animation: medalName 0.4s 0.9s both; }
@keyframes medalName { from { opacity: 0; transform: translateY(10px) scale(0.8); } to { opacity: 1; transform: none; } }
.cer-list { flex: 1 1 auto; min-width: 0; gap: 5px; font-size: 18px; margin-top: 4px; }
.cer-list > div { align-items: center; min-height: 31px; padding: 2px 8px; border-radius: 3px; background: rgba(255,250,235,0.4);
  opacity: 0; transform: translateX(26px); transition: opacity 0.3s, transform 0.35s cubic-bezier(0.3, 1.5, 0.5, 1); }
.cer-list > div.shown { opacity: 1; transform: none; }
.cer-list .rk { display: flex; align-items: center; gap: 7px; min-width: 0; }
.cer-list .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cer-list .dot { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 25px; height: 25px; border-radius: 50%;
  font-style: normal; font-size: 14px; font-weight: 900; border: 1.5px solid var(--ink); background: rgba(255,250,235,0.75); }
.cer-list .d1 { background: radial-gradient(circle at 35% 30%, #fff1b0, #d9a531 60%, #8a5f12); }
.cer-list .d2 { background: radial-gradient(circle at 35% 30%, #ffffff, #b5bcc6 60%, #6d7480); }
.cer-list .d3 { background: radial-gradient(circle at 35% 30%, #ffe2c4, #c07a3a 60%, #6e3c14); }
.cer-list .sv { font-weight: 900; font-variant-numeric: tabular-nums; }
.cer-list > div.me { background: rgba(233,193,90,0.6); box-shadow: 0 0 0 2px var(--gold); font-weight: 900; }
.cer-list > div.me.shown { animation: meHit 0.8s ease-out; }
@keyframes meHit { 0% { box-shadow: 0 0 0 2px var(--gold), 0 0 0 0 rgba(233,193,90,0.95); } 100% { box-shadow: 0 0 0 2px var(--gold), 0 0 0 16px rgba(233,193,90,0); } }
.cer-verdict { flex: 0 0 auto; min-height: 44px; font-size: 32px; font-weight: 900; line-height: 44px; text-align: center; white-space: nowrap;
  color: var(--verm); text-shadow: 2px 2px 0 var(--gold2), 3px 3px 0 var(--ink); }
.cer-verdict.wait { font-size: 18px; color: var(--ink2); text-shadow: none; font-style: italic; animation: pulse 1.6s ease-in-out infinite; }
.cer-verdict.in { animation: slam 0.45s cubic-bezier(0.3, 1.8, 0.5, 1) both; }
#app.phone .cer-list { font-size: 20px; }
#app.phone .cer-list .dot { width: 28px; height: 28px; font-size: 17px; }
#app.phone .cer-verdict.wait { font-size: 20px; }
