/* Treatly Glass — live on a timed task (js/glass-live.js). */

/* ---------- the choice when a timer starts ---------- */
.g-live-offer {
  position: fixed;
  z-index: 96;
  display: flex;
  gap: 8px;
  padding: 7px;
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.8);
  transition:
    transform 0.32s cubic-bezier(0.2, 1.4, 0.4, 1),
    opacity 0.2s;
}
.g-live-offer.is-in {
  opacity: 1;
  transform: none;
}
.g-live-offer-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  transition: transform 0.18s;
}
.g-live-offer-btn:active {
  transform: scale(0.9);
}
.g-live-offer-btn.is-live {
  background: linear-gradient(145deg, rgba(255, 69, 58, 0.34), rgba(255, 69, 58, 0.14));
  box-shadow: inset 0 0 0 1px rgba(255, 110, 100, 0.45);
}

/* ---------- the room ---------- */
.g-live {
  position: fixed;
  inset: 0;
  z-index: 76;
  background: #000;
  overflow: hidden;
  opacity: 0;
  transform: scale(1.04);
  transition:
    opacity 0.38s,
    transform 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}
.g-live.is-in {
  opacity: 1;
  transform: none;
}
/* the choosers you open while live sit above the room */
body.g-live-on #sheet-vis {
  z-index: 78;
}
/* alerts drop in under the room's top bar, never over its buttons */
body.g-live-on .g-toasts {
  top: calc(var(--safe-t) + 62px);
}
/* the closed treat viewer's edge would show over the room */
body.g-live-on .g-viewer:not(.is-open) {
  visibility: hidden;
}
.g-live-cam {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.g-live-cam.is-mirror {
  transform: scaleX(-1);
}
.g-live.is-nocam .g-live-cam {
  background: radial-gradient(120% 80% at 50% 30%, rgba(185, 167, 245, 0.22), transparent 60%), #000;
}
.g-live.is-paused .g-live-cam {
  filter: saturate(0.4) brightness(0.55) blur(2px);
  transition: filter 0.4s;
}
.g-live-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 22%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent 42%);
}

.g-live-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(var(--safe-t) + 12px) 14px 0;
}
.g-live-gap {
  flex: 1;
}
.g-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px 0 10px;
  border-radius: 999px;
  background: #ff453a;
  font: 800 12px/1 var(--font-display);
  letter-spacing: 0.08em;
  box-shadow: 0 6px 18px rgba(255, 69, 58, 0.45);
}
.g-live-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: g-live-blink 1.6s ease-in-out infinite;
}
.g-live.is-private .g-live-pill {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}
.g-live.is-private .g-live-pill i {
  background: #ff453a;
}
@keyframes g-live-blink {
  50% {
    opacity: 0.25;
  }
}
.g-live-watch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px 0 4px;
  border-radius: 999px;
  font: 700 13px/1 var(--font);
}
.g-live-watch.is-empty {
  padding-left: 10px;
}
.g-live-faces {
  display: inline-flex;
}
.g-live-faces .g-live-face + .g-live-face {
  margin-left: -8px;
}
.g-live-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.g-live-face {
  --h: 200;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font: 800 12px/1 var(--font-display);
  color: #fff;
  background: linear-gradient(145deg, hsl(var(--h) 75% 62%), hsl(var(--h) 70% 42%));
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55);
}
.g-live-face.is-small {
  width: 22px;
  height: 22px;
  font-size: 10px;
}

/* ---------- what's happening: chips rising on the left ---------- */
.g-live-feed {
  position: absolute;
  left: 12px;
  bottom: calc(var(--safe-b) + 216px);
  width: min(74vw, 320px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  -webkit-mask: linear-gradient(0deg, #000 70%, transparent);
  mask: linear-gradient(0deg, #000 70%, transparent);
}
.g-live-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  max-width: 100%;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  background: rgba(20, 20, 26, 0.5);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  font: 500 13.5px/1.25 var(--font);
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  transition:
    transform 0.42s cubic-bezier(0.2, 1.3, 0.4, 1),
    opacity 0.3s;
}
.g-live-chip.is-in {
  opacity: 1;
  transform: none;
}
.g-live-chip.is-out {
  opacity: 0;
  transform: translateY(-8px);
}
.g-live-chip b {
  font-weight: 800;
}
.g-live-chip-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.g-live-chip-mark .g-live-face {
  box-shadow: none;
}
.g-live-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- hearts, rising on the right ---------- */
.g-live-hearts {
  position: absolute;
  right: 18px;
  bottom: calc(var(--safe-b) + 180px);
  width: 60px;
  height: 50vh;
  pointer-events: none;
}
.g-live-heart {
  --h: 350;
  position: absolute;
  bottom: 0;
  right: 14px;
  color: hsl(var(--h) 90% 68%);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
  animation: g-live-rise 2.5s cubic-bezier(0.3, 0.6, 0.4, 1) forwards;
}
.g-live-heart.is-mine {
  color: #ff453a;
}
@keyframes g-live-rise {
  0% {
    transform: translate(0, 0) scale(0.3);
    opacity: 0;
  }
  12% {
    transform: translate(0, -20px) scale(1.1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), -46vh) scale(0.8);
    opacity: 0;
  }
}

/* ---------- a treat lands, then drops into the jar ---------- */
.g-live-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.g-live-pop {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%) scale(0.2) rotate(-12deg);
  opacity: 0;
  transition:
    transform 0.55s cubic-bezier(0.2, 1.6, 0.4, 1),
    opacity 0.25s;
}
.g-live-pop.is-in {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(0);
}
.g-live-pop.is-going {
  opacity: 0.2;
  transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.15) rotate(20deg);
  transition:
    transform 0.6s cubic-bezier(0.5, 0, 0.8, 0.4),
    opacity 0.6s ease-in;
}
.g-live-pop-emoji {
  display: block;
  font-size: 88px;
  line-height: 1;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.5));
}
.g-live-pop-gif {
  display: block;
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}
.g-live-pop-note {
  --h: 200;
  display: block;
  max-width: 220px;
  padding: 14px 18px;
  border-radius: 22px;
  font: 700 26px/1.1 'Caveat', var(--font);
  color: hsl(var(--h) 90% 85%);
  background: rgba(20, 20, 26, 0.55);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px hsla(var(--h), 90%, 80%, 0.35);
}
.g-live-pop-from {
  position: absolute;
  right: -8px;
  bottom: -8px;
}

/* ---------- the bottom: title, the big countdown, controls ---------- */
.g-live-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 16px calc(var(--safe-b) + 22px);
  text-align: center;
}
.g-live-title {
  font: 700 15px/1.2 var(--font);
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.g-live-time {
  font: 800 clamp(56px, 17vw, 88px) / 1 var(--font-display);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin: 2px 0 14px;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
}
.g-live.is-final .g-live-time {
  color: #ff453a;
  animation: g-live-beat 1s ease-in-out infinite;
}
@keyframes g-live-beat {
  15% {
    transform: scale(1.06);
  }
  30% {
    transform: none;
  }
}
.g-live-ctrl {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
}
.g-live-play {
  position: relative;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  transition: transform 0.18s;
}
.g-live-play:active {
  transform: scale(0.92);
}
.g-live-play > svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}
.g-live-play circle,
.g-live-end-build circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 5;
}
.g-live-play circle:first-child {
  fill: rgba(255, 255, 255, 0.12);
}
.g-live-arc {
  stroke: #fff !important;
  stroke-linecap: round;
  stroke-dasharray: 100;
  transition: stroke-dashoffset 0.3s linear;
}
.g-live-play span {
  position: relative;
  display: grid;
}
.g-live-jar {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  font: 800 15px/1 var(--font-display);
}
.g-live-jar.is-bump {
  animation: g-live-bump 0.45s cubic-bezier(0.3, 1.8, 0.5, 1);
}
@keyframes g-live-bump {
  40% {
    transform: scale(1.22);
    box-shadow: 0 0 0 6px rgba(237, 207, 142, 0.25);
  }
}

/* ---------- the end: the timelapse, keep it or let it go ---------- */
.g-live.is-ending > :not(.g-live-end):not(.g-live-cam) {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.g-live.is-ending .g-live-cam {
  filter: blur(26px) brightness(0.4);
  transition: filter 0.5s;
}
.g-live-end {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(86vw, 340px);
  padding: 14px 14px 16px;
  border-radius: var(--r-card);
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -46%) scale(0.94);
  transition:
    opacity 0.35s,
    transform 0.5s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.g-live-end.is-in {
  opacity: 1;
  transform: translate(-50%, -50%);
}
.g-live-end-media {
  position: relative;
  aspect-ratio: 9 / 13;
  max-height: 52vh;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
}
.g-live-end-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.g-live-end-build {
  width: 64px;
  height: 64px;
}
.g-live-end-build svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.g-live-end-build .g-live-arc {
  stroke-dashoffset: 100;
}
.g-live-end-title {
  margin: 14px 4px 8px;
  font: 800 19px/1.2 var(--font-display);
}
.g-live-end-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  color: var(--ink-2);
  font: 700 14px/1 var(--font);
}
.g-live-end-stats span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.g-live-end-acts {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}
.g-live-end-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  transition: transform 0.18s;
}
.g-live-end-btn:active {
  transform: scale(0.9);
}
.g-live-end-btn.is-keep {
  color: #000;
  background: var(--spectral);
  box-shadow: 0 10px 28px rgba(185, 167, 245, 0.35);
}

@media (min-width: 760px) {
  .g-live-feed {
    left: 28px;
    bottom: 200px;
  }
  .g-live-top {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .g-live-pill i,
  .g-live.is-final .g-live-time {
    animation: none;
  }
}

/* a task with its proof kept: the icon turns green and opens it */
.gcard-proof.is-kept {
  color: var(--sage);
}

/* ---------- Treatly Pro (a Settings page; js/glass-pro.js) ---------- */
.g-live-offer-btn.is-locked {
  position: relative;
  opacity: 0.72;
}
.g-live-lock {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #000;
  background: var(--spectral);
}
/* free lives left (before live needs Pro): the number in the same spectral dot */
.g-live-offer-btn.is-live {
  position: relative;
}
.g-live-free {
  position: absolute;
  right: 3px;
  bottom: 3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #000;
  background: var(--spectral);
  font: 800 11px/1 'Figtree', system-ui, sans-serif;
}
.g-pro-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 0 20px;
  text-align: center;
}
.g-pro-mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 20px;
  overflow: hidden;
}
.g-pro-lede {
  margin: 0;
  font: 700 17px/1.3 var(--font);
  color: var(--ink-2);
}
.g-pro-perk {
  cursor: default;
}
.g-pro-perk small {
  white-space: normal;
}
.g-pro-cta {
  display: block;
  width: 100%;
  height: 52px;
  margin-top: 18px;
  border-radius: 999px;
  font: 800 16px/1 var(--font-display);
  transition:
    transform 0.18s,
    opacity 0.2s;
}
.g-pro-cta span {
  background: var(--spectral);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.g-pro-cta:active {
  transform: scale(0.98);
}
.g-pro-cta.is-busy {
  opacity: 0.5;
  pointer-events: none;
}
.g-pro-fine {
  text-align: center;
}

/* ---------- watching a friend (GLive.watch) ---------- */
.g-live-host {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px 0 4px;
  border-radius: 999px;
  font: 700 13px/1 var(--font);
  max-width: 40vw;
}
.g-live-host b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.g-live-play.is-heart {
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ff453a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.g-live-play.is-heart:active {
  transform: scale(0.88);
}
/* the heart is the icon itself, not a progress ring */
.g-live-play.is-heart > svg {
  position: static;
  transform: none;
}
.g-live.is-viewer .g-live-time:empty {
  min-height: 1em;
}
.g-live-give {
  display: flex;
  justify-content: center;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 12px;
  padding: 6px;
  border-radius: 999px;
  overflow-x: auto;
}
.g-live-give[hidden] {
  display: none;
}
.g-live-give-btn {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  transition: transform 0.15s;
}
.g-live-give-btn:active {
  transform: scale(1.3);
}

/* a friend's task while they're live on it */
.gcard-live {
  gap: 5px;
  color: #fff;
  background: #ff453a !important;
  font: 800 11px/1 var(--font-display);
  letter-spacing: 0.06em;
}
.gcard-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: g-live-blink 1.6s ease-in-out infinite;
}

/* ---------- friends live now: top of Friends, and a dot on its tab ---------- */
.g-livenow {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 6px 2px 16px;
  scrollbar-width: none;
}
.g-livenow[hidden] {
  display: none;
}
.g-livenow-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 78px;
  flex: none;
  text-align: center;
}
.g-livenow-ring {
  position: relative;
  padding: 5px;
  border-radius: 50%;
  isolation: isolate;
}
/* only the colour turns; the face and the tag stay put */
.g-livenow-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #ff453a, #ff9f0a, #ff2d55, #ff453a);
  animation: g-livenow-spin 3s linear infinite;
}
.g-livenow-ring .g-avatar {
  display: grid;
  box-shadow: 0 0 0 2.5px var(--bg);
}
@keyframes g-livenow-spin {
  to {
    transform: rotate(360deg);
  }
}
.g-livenow-tag {
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  padding: 2px 6px;
  border-radius: 6px;
  border: 2px solid var(--bg);
  background: #ff453a;
  font: 800 9px/1.2 var(--font-display);
  letter-spacing: 0.06em;
}
.g-livenow-name {
  margin-top: 4px;
  font: 700 12.5px/1.2 var(--font);
}
.g-livenow-task {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-3);
  font: 500 11px/1.2 var(--font);
}
button[data-tab='friends'].has-live {
  position: relative;
}
button[data-tab='friends'].has-live::after {
  content: '';
  position: absolute;
  top: 9px;
  right: calc(50% - 16px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff453a;
  box-shadow: 0 0 0 2px var(--bg);
}
@media (prefers-reduced-motion: reduce) {
  .g-livenow-ring::before {
    animation: none;
  }
}

/* connecting / reconnecting: the LIVE dot pulses amber until the room is there */
.g-live.is-connecting .g-live-pill {
  background: #ff9f0a;
  box-shadow: 0 6px 18px rgba(255, 159, 10, 0.4);
}
.g-live.is-offline .g-live-pill {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}
.g-live-retry {
  display: none;
}
.g-live.is-offline .g-live-retry {
  display: grid;
}

/* watching a live: the full treat window opens over it */
body.g-live-on #sheet-give { z-index: 80; }
.g-live-give-btn.is-more { width: auto; padding: 0 14px; gap: 6px; display: inline-flex; align-items: center; font-size: 14px; font-weight: 700; color: #fff; }
.g-live-give-btn.is-more span { white-space: nowrap; }
.g-live.is-viewer .g-live-give { flex-wrap: wrap; border-radius: 26px; max-width: min(360px, 92vw); }

/* your own task: Go live, a round red button just left of the circle */
.gcard .gcard-meta .gcard-live {
  pointer-events: auto;
  cursor: pointer;
}
.gcard-golive {
  position: absolute;
  z-index: 5;
  right: 74px;
  top: 50%;
  margin-top: -24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #ff5a4f, #e5352b);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 4px 14px rgba(255, 59, 48, 0.45);
  transition: transform 0.12s;
}
.gcard-golive[hidden] {
  display: none;
}
.gcard-golive svg circle {
  fill: #fff;
}
.gcard-golive:active {
  transform: scale(0.88);
}
.gcard.has-golive .gcard-title {
  padding-right: 124px;
}
.gcard.is-done .gcard-golive {
  display: none;
}

/* ---------- live together: the others live in the room, as tiles ---------- */
.g-live-tiles {
  position: absolute;
  right: 12px;
  top: calc(var(--safe-t) + 70px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 3;
}
.g-live-tile {
  position: relative;
  width: 92px;
  height: 124px;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #1b1b20;
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.28),
    0 8px 20px rgba(0, 0, 0, 0.45);
  color: #fff;
  padding: 0;
}
.g-live-tile video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.g-live-tile:not(.has-video) video {
  display: none;
}
.g-live-tile .g-live-tile-face {
  width: 46px;
  height: 46px;
  font-size: 18px;
  margin-bottom: 22px;
}
.g-live-tile.has-video .g-live-tile-face {
  display: none;
}
.g-live-tile-time {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  font: 800 11px/1 var(--font-display);
  font-variant-numeric: tabular-nums;
}
.g-live-tile-time:empty {
  display: none;
}
.g-live-tile-lab {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 7px 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
}
.g-live-tile-lab b {
  font: 800 12px/1.1 var(--font-display);
}
.g-live-tile-lab small {
  font-size: 10.5px;
  font-weight: 600;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.g-live.is-viewer .g-live-tile {
  cursor: pointer;
}
.g-live.is-viewer .g-live-tile:active {
  transform: scale(0.95);
}

/* watching: Join in, and what you'll go live with */
.g-live-joinin {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 15px 0 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #ff5a4f, #e5352b);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 6px 16px rgba(255, 59, 48, 0.4);
  font: 800 14px/1 var(--font-display);
}
.g-live-joinin[hidden] {
  display: none;
}
.g-live-joinin svg circle {
  fill: #fff;
}
.g-live-pick {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(340px, 92vw);
  margin: 0 auto 12px;
  padding: 14px;
  border-radius: 24px;
}
.g-live-pick[hidden] {
  display: none;
}
.g-live-pick-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 4px 6px;
}
.g-live-pick-head b {
  font: 800 16px/1.2 var(--font-display);
}
.g-live-pick-head small {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}
.g-live-pick-task {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  text-align: left;
  color: #fff;
  font: 700 15px/1.2 var(--font-body, inherit);
  background: rgba(255, 255, 255, 0.08);
}
.g-live-pick-task svg {
  color: #ff453a;
  flex: none;
}
.g-live-pick-task span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.g-live-pick-task:active {
  background: rgba(255, 255, 255, 0.16);
}

/* ---------- watching: the second or two while their phone joins ----------
 * Their face, big and breathing on black glass, with "Joining Maya…". The
 * video sits underneath at opacity 0 and fades up on its first real frame,
 * so it's never a black flash or a frozen box. */
.g-live.is-viewer .g-live-cam {
  opacity: 1;
  transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.g-live.is-viewer.is-waiting .g-live-cam {
  opacity: 0;
}
.g-live-wait {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  pointer-events: none;
  background: radial-gradient(70% 50% at 50% 42%, rgba(255, 255, 255, 0.07), transparent 70%), #000;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.g-live.is-waiting .g-live-wait {
  opacity: 1;
}
.g-live-face.is-big {
  width: 112px;
  height: 112px;
  font-size: 40px;
  box-shadow:
    0 0 0 3px #000,
    0 0 0 5px rgba(255, 255, 255, 0.9),
    0 0 40px rgba(255, 255, 255, 0.25);
  animation: gLiveBreathe 1.8s ease-in-out infinite;
}
.g-live-wait-name {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.01em;
}
@keyframes gLiveBreathe {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 3px #000,
      0 0 0 5px rgba(255, 255, 255, 0.9),
      0 0 30px rgba(255, 255, 255, 0.18);
  }
  50% {
    transform: scale(1.04);
    box-shadow:
      0 0 0 3px #000,
      0 0 0 5px rgba(255, 255, 255, 1),
      0 0 54px rgba(255, 255, 255, 0.32);
  }
}
@media (prefers-reduced-motion: reduce) {
  .g-live-face.is-big {
    animation: none;
  }
}
.gcard.is-open .gcard-golive {
  top: 18px;
  margin-top: 0;
}

/* sharing a screen: shown whole (letterboxed), never cropped or mirrored */
.g-live.is-screen .g-live-cam {
  object-fit: contain;
  transform: none;
  background: #050507;
}
.g-live-btn[data-act='screen'].is-on {
  color: #000;
  background: #fff !important;
}

/* the end card asks: did you finish it? (ending a live isn't finishing the task) */
.g-live-end-acts { flex-direction: column; align-items: stretch; gap: 12px; }
.g-live-end-keep {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px 7px 8px;
  border-radius: 999px;
  font: 700 13px/1 var(--font);
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.07);
}
.g-live-end-keep .gi { width: 18px; height: 18px; padding: 2px; border-radius: 50%; color: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4); }
.g-live-end-keep.is-on { color: #fff; }
.g-live-end-keep.is-on .gi { color: #000; background: #2fd27a; box-shadow: none; }
.g-live-end-q { margin: 2px 0 0; text-align: center; font: 600 16px/1.35 var(--font); color: rgba(255, 255, 255, 0.8); }
.g-live-end-q b { color: #fff; font-weight: 800; }
.g-live-end-row { display: flex; gap: 10px; }
.g-live-end-ans {
  flex: 1;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 999px;
  font: 800 16px/1 var(--font);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transition: transform 0.18s;
}
.g-live-end-ans:active { transform: scale(0.95); }
.g-live-end-ans.is-yes { color: #000; background: #2fd27a; box-shadow: 0 10px 28px rgba(47, 210, 122, 0.35); }

/* before a live on a laptop: camera or screen? */
.g-live-src {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.2s;
}
.g-live-src.is-in { opacity: 1; }
.g-live-src-card { width: min(440px, 100%); padding: 22px; border-radius: 30px; text-align: center; color: #fff; }
.g-live-src-card h3 { margin: 0 0 16px; font: 800 22px/1.2 var(--font); }
.g-live-src-row { display: flex; gap: 12px; }
.g-live-src-opt {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 10px 18px;
  border-radius: 22px;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2, 1.6, 0.4, 1), background 0.2s;
}
.g-live-src-opt:hover { background: rgba(255, 255, 255, 0.12); }
.g-live-src-opt:active { transform: scale(0.95); }
.g-live-src-opt i { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #ff3b47; margin-bottom: 4px; }
.g-live-src-opt[data-k='screen'] i { background: #3d7bff; }
.g-live-src-opt b { font: 800 17px/1.1 var(--font); }
.g-live-src-opt small { font-size: 13px; color: rgba(255, 255, 255, 0.65); }
.g-live-src-x { margin-top: 14px; padding: 8px 14px; font: 700 14px/1 var(--font); color: rgba(255, 255, 255, 0.6); background: none; cursor: pointer; }

/* Go live: a small camera on the tick's shoulder. One control, two
   targets: the circle ticks it off, the badge goes live. */
.gcard .gcard-golive {
  right: 43px;
  top: 50%;
  bottom: auto;
  margin-top: -33px;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #1c1c20;
  box-shadow:
    0 0 0 2.5px rgba(10, 10, 12, 0.85),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.55);
  z-index: 6;
}
/* a bigger target than it looks */
.gcard .gcard-golive::before {
  content: '';
  position: absolute;
  inset: -9px;
  border-radius: 50%;
}
.gcard .gcard-golive svg circle {
  fill: currentColor;
}
.gcard .gcard-golive:active {
  transform: scale(0.88);
}
.gcard.has-golive .gcard-title {
  padding-right: 76px !important;
}
