/* The YouTube card (youtube-demo.js): the recorded clip as large as the card allows, what it shows and a sound button
   laid over its top-left corner (clear of the app's own bar and caption label), and a cross-fade between the clips. */
.yd{position:relative;flex:1;min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;container-type:size;font:13px/1.35 -apple-system,BlinkMacSystemFont,"SF Pro Text",Inter,"Helvetica Neue",sans-serif}
.yd-player{position:relative;margin:0;width:min(100cqw,calc(100cqh*1280/738));aspect-ratio:1280/738;border-radius:12px;overflow:hidden;background:#0f0f10;border:1px solid #ffffff2e;box-shadow:0 18px 45px #0d1f1a40}
.yd-video{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:cover;opacity:0;transition:opacity .7s ease}
.yd-video.is-on{opacity:1}
.yd-top{position:absolute;left:12px;top:12px;z-index:2;display:flex;align-items:center;gap:8px;max-width:calc(100% - 24px)}
.yd-badge{display:flex;align-items:center;padding:6px 12px;border-radius:12px;background:#111d;color:#fff;backdrop-filter:blur(8px)}
.yd-badge b{display:block;font-size:13px;font-weight:650;white-space:nowrap}
.yd-sound{display:flex;align-items:center;gap:6px;padding:7px 12px;border-radius:999px;border:1px solid #ffffff4d;background:#111d;color:#fff;font:600 12.5px/1.2 inherit;cursor:pointer;backdrop-filter:blur(8px);white-space:nowrap}
.yd-sound svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.yd-sound svg path:first-child{fill:currentColor}
.yd-sound:not(.is-on) .w{opacity:.35}
.yd-sound:hover{background:#000e}.yd-sound:focus-visible{outline:2px solid #6f95ff;outline-offset:2px}
.yd[data-yt-round="after"] .yd-sound:not(.is-on){background:#fff;color:#2b3fae;border-color:#fff;animation:yd-nudge 1.6s ease-in-out 1s 3}
@keyframes yd-nudge{50%{box-shadow:0 0 0 6px #ffffff40}}
/* the moment the dubbing starts */
.yd-flash{position:absolute;left:50%;top:50%;z-index:3;transform:translate(-50%,-50%) scale(.96);padding:12px 22px;border-radius:999px;background:linear-gradient(90deg,#3f63e8,#7b5cf0);color:#fff;font-size:20px;font-weight:650;white-space:nowrap;box-shadow:0 14px 40px #1b2a8a66;opacity:0;pointer-events:none}
.yd-flash.go{animation:yd-flash 2.2s ease .25s both}
@keyframes yd-flash{0%{opacity:0;transform:translate(-50%,-50%) scale(.94)}18%,72%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.02)}}
@media (max-width:760px){.yd-top{left:7px;top:7px;gap:5px}.yd-badge{padding:4px 8px;border-radius:9px}.yd-badge b{font-size:11px}.yd-sound{padding:4px 8px;font-size:11px}.yd-sound svg{width:12px;height:12px}.yd-flash{font-size:14px;padding:8px 14px}}
/* the video as large as the card allows: this card's heading and foot kept tight, the room given to the player */
.scene-card.tone-youtube .scene-heading{min-height:0;padding-bottom:12px}
.scene-card.tone-youtube .scene-foot{height:38px}
/* …and on a wide screen the card itself taller than the others, so the clip can use the card's whole width */
@media (min-width:901px){#card-youtube{--scene-height:max(720px,min(900px,calc(100svh - 64px)))}}
@media (min-width:1600px){#card-youtube{--scene-height:max(790px,min(960px,calc(100svh - 64px)))}}
