/* Cocktail party effect lesson. All rules scoped under .cpe-* */
.cpe-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* the party */
.cpe-party { position: relative; width: 100%; max-width: 380px; height: 330px; border-radius: 18px; background: radial-gradient(ellipse at 50% 30%, rgba(169,155,255,.16), transparent 70%), linear-gradient(#141A30, #0E1222); overflow: hidden; }
.cpe-bub { position: absolute; width: 96px; height: 40px; padding: 6px 10px; box-sizing: border-box; border-radius: 18px; background: rgba(234,227,215,.08); border: 1.5px solid rgba(234,227,215,.22); animation: cpeTalk .9s ease-in-out 4 alternate; transition: filter .5s, opacity .5s, background .4s, border-color .4s; }
@keyframes cpeTalk { to { translate: 0 -3px; } }
.cpe-bub svg { display: block; width: 100%; height: 100%; }
.cpe-bub path { fill: none; stroke-width: 3; stroke-linecap: round; }
.cpe-far { width: 84px; height: 34px; opacity: .8; }
.cpe-guest { position: absolute; bottom: 0; display: flex; flex-direction: column; align-items: center; padding: 0; border: 0; background: none; }
.cpe-guest img { display: block; height: 170px; width: auto; filter: brightness(.8); }
.cpe-guest > .cpe-bub { position: relative; margin-bottom: 4px; }
.cpe-a { left: -6px; bottom: 6px; }
.cpe-b { right: -6px; bottom: 6px; }
.cpe-a img, .cpe-b img { height: 150px; }
.cpe-friend { left: 50%; translate: -50% 0; bottom: 0; cursor: pointer; z-index: 2; }
.cpe-friend:disabled { cursor: default; }
.cpe-friend img { height: 190px; filter: drop-shadow(0 0 16px rgba(252,192,80,.35)); }
.cpe-tag { position: absolute; bottom: 8px; padding: 2px 10px; border-radius: 10px; background: rgba(10,14,26,.85); border: 1.5px solid var(--gold); font: 800 12.5px var(--sans); color: var(--gold); white-space: nowrap; }
.cpe-bub.cpe-clear { width: 220px; height: auto; padding: 8px 12px; background: rgba(234,227,215,.96); border-color: var(--gold); color: #0A0E1A; font: 700 14px/1.3 var(--sans); text-align: center; animation: none; }
.cpe-tuned .cpe-bub:not(.cpe-clear) { filter: blur(2.5px); opacity: .55; }
.cpe-tuned .cpe-a img, .cpe-tuned .cpe-b img { filter: brightness(.6) blur(1px); }
.cpe-bub.cpe-heard { filter: none; opacity: 1; width: 190px; height: auto; padding: 8px 12px; background: rgba(234,227,215,.96); border-color: var(--violet-bright); color: #0A0E1A; font: 700 13.5px/1.3 var(--sans); text-align: left; box-shadow: 0 0 20px rgba(169,155,255,.6); animation: cpePop .4s cubic-bezier(.2,.8,.2,1.4) both; z-index: 3; }
.cpe-bub.cpe-heard b { color: var(--violet); }
@keyframes cpePop { from { scale: .6; } }
.cpe-tuned .cpe-bub.cpe-heard { filter: none; opacity: 1; }
.cpe-top { align-self: flex-start; padding-top: 6px; }

/* two ears */
.cpe-ears { display: grid; grid-template-columns: 1fr 156px 1fr; align-items: center; gap: 8px; width: 100%; max-width: 380px; }
.cpe-head { display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 18px rgba(123,92,253,.35)); }
.cpe-side { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 150px; justify-content: center; text-align: center; }
.cpe-lab { font: 800 12px var(--sans); color: var(--dim); text-transform: uppercase; letter-spacing: .07em; }
.cpe-stream { min-height: 64px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; font: 700 15px/1.3 var(--sans); color: var(--text); }
.cpe-on .cpe-stream { color: var(--gold); }
.cpe-on .cpe-lab { color: var(--gold); }
.cpe-stream i { display: block; width: 26px; height: 8px; border-radius: 4px; background: var(--line-strong); }
.cpe-muted .cpe-stream { filter: blur(1px); }
.cpe-out { min-height: 34px; font: 600 12.5px/1.3 var(--sans); color: var(--dim); }
.cpe-on .cpe-out { color: var(--text); }
.cpe-n { font: 800 18px var(--sans); color: var(--text); font-variant-numeric: tabular-nums; }
.cpe-ear { min-height: 44px; min-width: 100px; padding: 6px 12px; border-radius: 22px; background: var(--raised); border: 2px solid var(--line-strong); color: var(--text); font: 800 14px var(--sans); cursor: pointer; }

/* typing */
.cpe-type { width: min(100%, 340px); display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.cpe-type input { width: 100%; box-sizing: border-box; height: 52px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text); font: 700 18px var(--sans); outline: none; }
.cpe-type input:focus { border-color: var(--violet-bright); }
.cpe-type input::placeholder { color: var(--faint); font: 600 16px var(--sans); }
.cpe-type .cpe-use { width: auto; min-width: 100px; height: 52px; margin: 0; padding: 0 16px; }
.cpe-type .cpe-use:disabled { opacity: .45; }
.cpe-skip { min-height: 44px; padding: 6px 14px; border: 0; background: none; color: var(--dim); font: 700 14px var(--sans); text-decoration: underline; cursor: pointer; }

@media (max-height: 700px) {
  .cpe-party { height: 270px; }
  .cpe-guest img { height: 140px; }
  .cpe-a img, .cpe-b img { height: 118px; }
  .cpe-friend img { height: 150px; }
  .cpe-far { width: 72px; height: 30px; }
  .cpe-side { min-height: 120px; }
  .cpe-ears { grid-template-columns: 1fr 124px 1fr; }
}
