/* Non-interactive presentation layer on verified viewer and performer stages. */
.yo-live-mirror[hidden], .yo-live-gift[hidden], .yo-live-overlay-toggle[hidden] {
  display: none !important;
}

.yo-live-mirror {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  color: #fff;
}

.yo-live-overlay-toggle {
  position: absolute;
  z-index: 2;
  inset: .55rem .55rem auto auto;
  min-height: 2.75rem;
  max-inline-size: calc(100% - 1.1rem);
  margin: 0;
  padding: .38rem .72rem;
  border: 1px solid #c4e5ffad;
  border-radius: 999px;
  background: #0d1b32ee;
  color: #fff;
  box-shadow: 0 .2rem .6rem #02091466;
  font-size: clamp(.67rem, 1.5vw, .78rem);
  font-weight: 750;
  line-height: 1.08;
}

.yo-live-overlay-toggle::before {
  display: inline-block;
  inline-size: .5em;
  block-size: .5em;
  margin-inline-end: .4em;
  border-radius: 50%;
  background: #a5b8cf;
  vertical-align: .12em;
  content: "";
}

.yo-live-overlay-toggle[aria-pressed="true"]::before { background: #90e5fb; }
.yo-live-overlay-toggle:focus-visible { outline: 3px solid #90e5fb; outline-offset: 2px; }

.yo-live-comment-rail {
  position: absolute;
  inset: auto auto clamp(2.3rem, 7%, 3rem) clamp(.55rem, 3%, 1.4rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(.19rem, .9vw, .34rem);
  inline-size: min(69%, 29rem);
  max-block-size: 39%;
  overflow: hidden;
}

.yo-live-comment {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  align-self: flex-start;
  gap: .42rem;
  max-inline-size: 100%;
  min-block-size: clamp(1.34rem, 3vw, 2rem);
  padding: .16rem .6rem .16rem .2rem;
  border: 1px solid #d3ecff50;
  border-radius: 999px;
  background: #09152be8;
  box-shadow: 0 .25rem .8rem #02091444;
  animation: yo-live-comment-enter .25s ease-out both;
}

.yo-live-comment-avatar {
  display: grid;
  flex: 0 0 auto;
  inline-size: clamp(.99rem, 2.3vw, 1.46rem);
  block-size: clamp(.99rem, 2.3vw, 1.46rem);
  place-items: center;
  border-radius: 50%;
  background: #d6f1ff;
  color: #142847;
  font-size: .65rem;
  font-weight: 850;
}

.yo-live-comment-avatar[data-color="1"] { background: #ffcee9; }
.yo-live-comment-avatar[data-color="2"] { background: #ffe8ab; }
.yo-live-comment-avatar[data-color="3"] { background: #c8f6d3; }
.yo-live-comment-text, .yo-live-comment-name, .yo-live-comment-body { min-inline-size: 0; }
.yo-live-comment-text {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  color: #fff;
  font-size: clamp(.67rem, 1.45vw, .88rem);
  line-height: 1.2;
}
.yo-live-comment-name, .yo-live-comment-body {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yo-live-comment-name { max-inline-size: 35%; font-weight: 850; color: #c5e9ff; }

.yo-live-gift {
  --yo-gift-accent: #ffda86;
  --yo-gift-ink: #fff0c8;
  position: absolute;
  inset: 29% clamp(.55rem, 3%, 1.4rem) auto auto;
  max-inline-size: 82%;
}
.yo-live-gift[data-tier="large"] { --yo-gift-accent: #ffb6ed; --yo-gift-ink: #ffdef4; }
.yo-live-gift-badge {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-inline-size: 0;
  padding: .44rem .8rem .44rem .48rem;
  border: 1px solid var(--yo-gift-accent);
  border-radius: 1.15rem;
  background: linear-gradient(120deg, #321d43 0%, #161f39 68%, #101e34 100%);
  box-shadow: 0 0 1.25rem #f5b6ed50, 0 .35rem 1rem #02091488;
  animation: yo-live-gift-enter .42s cubic-bezier(.15,.74,.24,1) both;
}
.yo-live-gift-copy { display: grid; min-inline-size: 0; gap: .08rem; line-height: 1.1; }
.yo-live-gift-tag {
  font-size: .58rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--yo-gift-ink);
}
.yo-live-gift-amount { font-size: clamp(.75rem, 1.8vw, 1.02rem); color: #fff; }
.yo-live-gift-icon {
  display: grid;
  flex: 0 0 auto;
  position: relative;
  place-items: center;
  inline-size: clamp(1.7rem, 4.5vw, 2.8rem);
  aspect-ratio: 1;
  border-radius: .68rem;
  background: radial-gradient(circle at 34% 27%, #fff6db 0%, var(--yo-gift-accent) 55%, #ea81aa 100%);
  box-shadow: inset 0 0 .35rem #fff5, 0 0 .6rem #ffebcb51;
}
.yo-live-gift-box {
  position: relative;
  display: block;
  inline-size: 54%;
  block-size: 46%;
  margin-block-start: 16%;
  border-radius: .17rem;
  background: linear-gradient(90deg, #50284d 0 42%, #ffdcbb 42% 58%, #50284d 58%);
  box-shadow: 0 .12rem .24rem #74275b7a;
}
.yo-live-gift-box::before {
  position: absolute;
  inset: -.14rem -.08rem auto;
  block-size: .28rem;
  border-radius: .15rem;
  background: #572446;
  content: "";
}
.yo-live-gift-box::after {
  position: absolute;
  inset: -.34rem 29% auto;
  block-size: .32rem;
  border: 2px solid #572446;
  border-radius: 80% 80% 30% 30%;
  content: "";
}
.yo-live-gift-spark {
  position: absolute;
  inset: .12rem .13rem auto auto;
  inline-size: .54rem;
  block-size: .54rem;
  background: #fff5d1;
  clip-path: polygon(50% 0, 59% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}

@keyframes yo-live-comment-enter {
  from { opacity: 0; transform: translateY(.5rem); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes yo-live-gift-enter {
  from { opacity: 0; transform: translateX(.85rem) scale(.94); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@media (max-width: 480px) {
  .yo-live-comment-rail { max-block-size: 34%; }
  .yo-live-comment-rail > :nth-last-child(n+3) { display: none; }
  .yo-live-gift-badge { gap: .37rem; border-radius: .8rem; padding: .28rem .48rem .28rem .3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .yo-live-comment, .yo-live-gift-badge { animation: none; }
}
.yo-live-comment-name { max-inline-size:12ch; flex:0 1 auto; }
.yo-live-comment-body { flex:0 2 auto; }

/* The room uses the same word-only treatment without changing chat or gift behavior. */
.yo-live-comment { padding:.12rem 0; min-block-size:0; border:0; background:none; border-radius:0; box-shadow:none; }
.yo-live-comment .yo-live-comment-avatar { display:none; }
.yo-live-comment-text {
  font-weight:650;
  text-shadow:-1px 0 2px #070817,1px 0 2px #070817,0 1px 2px #070817,0 2px 6px #070817;
}
.yo-live-comment-name { color:#ffe1f1; }

/* Original YouOn gift styles. One bounded visual per feed refresh; no sound or white flashes. */
.yo-live-gift {
  --yo-gift-accent:#ffc478; --yo-gift-ink:#fff0d4; --yo-gift-alt:#fe8086;
  --yo-gift-radius:2.45rem; --yo-gift-duration:860ms;
  isolation:isolate;
  inline-size:max-content; max-inline-size:min(80%,26rem);
  inset:32% clamp(.62rem,4%,1.65rem) auto auto;
}
.yo-live-gift[data-tier="standard"] {
  --yo-gift-accent:#ffa2c9; --yo-gift-ink:#ffe5f2; --yo-gift-alt:#ea70b9;
  --yo-gift-radius:3rem;
}
.yo-live-gift[data-tier="large"] {
  --yo-gift-accent:#86cef8; --yo-gift-ink:#e0f8ff; --yo-gift-alt:#b796fa;
  --yo-gift-radius:3.9rem; --yo-gift-duration:1120ms;
}
.yo-live-gift[data-tier="grand"] {
  --yo-gift-accent:#c9a6fe; --yo-gift-ink:#f6eaff; --yo-gift-alt:#66dbcf;
  --yo-gift-radius:4.9rem; --yo-gift-duration:1400ms;
}
.yo-live-gift-badge {
  position:relative; z-index:1; min-block-size:2.65rem;
  border-radius:.95rem; padding:.32rem .82rem .32rem .42rem;
  border-color:color-mix(in srgb,var(--yo-gift-accent) 65%,transparent);
  background:radial-gradient(ellipse at 0 25%,color-mix(in srgb,var(--yo-gift-alt) 28%,#141021),transparent 80%),#161128ee;
  box-shadow:0 0 1.2rem color-mix(in srgb,var(--yo-gift-alt) 40%,transparent),0 .5rem 1rem #0a051c75;
}
.yo-live-gift-icon {
  inline-size:clamp(1.75rem,5.5vw,3.15rem); border-radius:50%;
  background:radial-gradient(circle,color-mix(in srgb,var(--yo-gift-accent) 40%,#221540),#231241 70%);
  box-shadow:inset 0 0 .6rem color-mix(in srgb,var(--yo-gift-alt) 40%,transparent);
}
.yo-gift-gem { position:absolute; inline-size:65%; aspect-ratio:1; background:linear-gradient(145deg,#ffffee 12%,var(--yo-gift-accent) 40%,var(--yo-gift-alt) 84%);
  clip-path:polygon(50% 0,61% 38%,100% 50%,61% 61%,50% 100%,38% 61%,0 50%,38% 38%);
  animation:yo-gem-entry var(--yo-gift-duration) cubic-bezier(.17,.75,.3,1) both; }
[data-tier="standard"] .yo-gift-gem { clip-path:polygon(50% 16%,73% 2%,95% 14%,100% 42%,85% 66%,50% 96%,15% 66%,0 42%,5% 14%,27% 2%); }
[data-tier="large"] .yo-gift-gem { clip-path:polygon(0 31%,22% 6%,78% 6%,100% 31%,50% 97%); }
[data-tier="grand"] .yo-gift-gem { clip-path:polygon(50% 0,70% 35%,97% 30%,77% 60%,83% 88%,50% 74%,17% 88%,23% 60%,3% 30%,30% 35%); }
.yo-gift-orbit { position:absolute; inset:10%; border:1px solid var(--yo-gift-accent); border-radius:50%; opacity:.34; transform:rotate(-30deg) scaleY(.68); }
.yo-gift-glint { position:absolute; inline-size:.35rem; aspect-ratio:1; border-radius:50%; background:#fff4e9; inset:15% 17% auto auto; }
.yo-gift-aura { position:absolute; z-index:0; inset:-60% -12%; border-radius:50%; pointer-events:none;
  background:radial-gradient(ellipse,color-mix(in srgb,var(--yo-gift-alt) 32%,transparent),transparent 68%);
  animation:yo-aura-wash var(--yo-gift-duration) ease-out both; }
.yo-gift-particles { position:absolute; z-index:2; inset:50% auto auto 1.7rem; pointer-events:none; }
.yo-gift-point { display:block; position:absolute; width:clamp(.18rem,1.3vw,.38rem); aspect-ratio:1; border-radius:.12rem;
  background:var(--yo-gift-accent); box-shadow:0 0 6px var(--yo-gift-alt); opacity:0;
  transform:rotate(var(--angle)) translateX(0); animation:yo-gift-trail var(--yo-gift-duration) ease-out both; }
.yo-gift-point:nth-child(1) { --angle:24deg; }
.yo-gift-point:nth-child(2) { --angle:-48deg; }
.yo-gift-point:nth-child(3) { --angle:156deg; }
.yo-gift-point:nth-child(4) { --angle:-122deg; }
.yo-gift-point:nth-child(5) { --angle:249deg; }
.yo-gift-point:nth-child(6) { --angle:70deg; }
.yo-gift-point:nth-child(7) { --angle:198deg; }
.yo-gift-point:nth-child(8) { --angle:-20deg; }
.yo-gift-point:nth-child(9) { --angle:106deg; }
.yo-gift-point:nth-child(10) { --angle:-74deg; }
@keyframes yo-gem-entry { from {transform:scale(.52) rotate(-20deg);opacity:.32;} 62% {transform:scale(1.12) rotate(5deg);opacity:1;} to {transform:none;opacity:1;} }
@keyframes yo-aura-wash { 0% {opacity:0;transform:scale(.6);} 35% {opacity:.75;} 100% {opacity:0;transform:scale(1.25);} }
@keyframes yo-gift-trail { 0% {opacity:0;} 22% {opacity:.82;} 100% {transform:rotate(var(--angle)) translateX(var(--yo-gift-radius)) rotate(125deg);opacity:0;} }
@media(max-width:480px) {
  .yo-live-gift { inset:27% .55rem auto auto; }
  .yo-live-gift[data-tier] { --yo-gift-radius:2.7rem; }
}
@media(prefers-reduced-motion:reduce) {
  .yo-gift-aura,.yo-gift-particles { display:none; }
  .yo-gift-gem,.yo-live-gift-badge { animation:none!important; }
}
