:root {
  --gallery-ink: #111318;
  --gallery-muted: #6b7280;
  --gallery-line: rgba(17, 19, 24, 0.10);
  --gallery-surface: #ffffff;
  --gallery-soft: #f6f7f9;
  --gallery-green: #22c55e;
  --gallery-shadow: 0 24px 70px rgba(17, 19, 24, 0.10);
  --gallery-radius: 28px;
}

.studio-gallery {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--gallery-line);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.95), transparent 34rem),
    linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  box-shadow: var(--gallery-shadow);
}

.studio-gallery::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      120deg,
      rgba(255,255,255,.75) 0%,
      rgba(255,255,255,0) 42%
    );
  content: "";
}

.studio-gallery-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.studio-gallery-head h2 {
  margin: 4px 0 0;
  color: var(--gallery-ink);
  font-size: clamp(1.45rem, 2.2vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.studio-gallery-position {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--gallery-line);
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: var(--gallery-muted);
  font-size: .82rem;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.studio-gallery-viewport {
  position: relative;
  z-index: 1;
  outline: none;
}

.studio-gallery-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.studio-gallery-video-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  background: #050608;
  box-shadow:
    0 18px 44px rgba(0,0,0,.20),
    0 0 0 1px rgba(255,255,255,.06) inset;
}

.studio-gallery-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050608;
}

.studio-gallery-video::-webkit-media-controls {
  opacity: 0;
  transition: opacity .2s ease;
}

.studio-gallery-video-wrap:hover .studio-gallery-video::-webkit-media-controls,
.studio-gallery-video:focus::-webkit-media-controls {
  opacity: 1;
}

.studio-gallery-nav,
.studio-gallery-like {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(7, 9, 12, .38);
  color: #fff;
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition:
    transform .18s ease,
    background .18s ease,
    opacity .18s ease;
}

.studio-gallery-nav {
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
}

.studio-gallery-nav-prev {
  left: 14px;
}

.studio-gallery-nav-next {
  right: 14px;
}

.studio-gallery-nav:hover,
.studio-gallery-like:hover {
  background: rgba(7, 9, 12, .68);
}

.studio-gallery-nav:hover {
  transform: translateY(-50%) scale(1.05);
}

.studio-gallery-like {
  top: 14px;
  right: 14px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.65rem;
}

.studio-gallery-like[aria-pressed="true"] {
  background: rgba(255,255,255,.94);
  color: #ef4444;
  border-color: rgba(255,255,255,.94);
  transform: scale(1.06);
}

.studio-gallery-copy {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 4px 4px 4px 0;
}

.studio-gallery-host-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.studio-gallery-host {
  color: var(--gallery-ink);
  font-size: clamp(1.25rem, 1.7vw, 1.7rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.04em;
}

.studio-gallery-accent {
  margin-top: 6px;
  color: var(--gallery-muted);
  font-size: .9rem;
  font-weight: 700;
}

.studio-gallery-question {
  max-width: 760px;
  color: var(--gallery-ink);
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  font-weight: 780;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.studio-gallery-practice-btn {
  position: relative;
  z-index: 10;
  flex: 0 0 auto;
  min-height: 42px;
  padding-inline: 16px;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(34, 197, 94, .18);
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
}

.studio-gallery-transcript {
  max-width: 760px;
  border-top: 1px solid var(--gallery-line);
  padding-top: 12px;
}

.studio-gallery-transcript summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  color: var(--gallery-ink);
  cursor: pointer;
  font-size: .92rem;
  font-weight: 800;
}

.studio-gallery-transcript summary::-webkit-details-marker {
  display: none;
}

.studio-gallery-transcript summary::after {
  color: var(--gallery-muted);
  content: "↓";
  transition: transform .2s ease;
}

.studio-gallery-transcript[open] summary::after {
  transform: rotate(180deg);
}

.studio-gallery-transcript-text {
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid var(--gallery-line);
  border-radius: 18px;
  background: rgba(255,255,255,.74);
  color: #30343b;
  font-size: 1rem;
  line-height: 1.62;
  box-shadow: 0 12px 30px rgba(17, 19, 24, .05);
  backdrop-filter: blur(12px);
}

.studio-gallery-hint {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 0 4px;
  color: var(--gallery-muted);
  font-size: .78rem;
  font-weight: 700;
}

/* ---------------------------------------------------------
   Browse / swipe animation hooks
   --------------------------------------------------------- */

.studio-gallery-card.is-entering-next {
  animation: galleryEnterNext .34s cubic-bezier(.22,.75,.25,1);
}

.studio-gallery-card.is-entering-prev {
  animation: galleryEnterPrev .34s cubic-bezier(.22,.75,.25,1);
}

.studio-gallery-card.is-leaving-next {
  animation: galleryLeaveNext .24s ease forwards;
}

.studio-gallery-card.is-leaving-prev {
  animation: galleryLeavePrev .24s ease forwards;
}

@keyframes galleryEnterNext {
  from {
    opacity: 0;
    transform: translateX(34px) scale(.985);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes galleryEnterPrev {
  from {
    opacity: 0;
    transform: translateX(-34px) scale(.985);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes galleryLeaveNext {
  to {
    opacity: 0;
    transform: translateX(-26px) scale(.99);
  }
}

@keyframes galleryLeavePrev {
  to {
    opacity: 0;
    transform: translateX(26px) scale(.99);
  }
}

/* ---------------------------------------------------------
   Paused / invitation state
   --------------------------------------------------------- */

.studio-gallery-card.is-paused .studio-gallery-practice-btn {
  animation: none;
}

@keyframes galleryPracticeInvite {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 10px 28px rgba(34, 197, 94, .18);
  }

  50% {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(34, 197, 94, .28);
  }
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 980px) {
  .studio-gallery-card {
    grid-template-columns: minmax(250px, 360px) minmax(0, 1fr);
    gap: 22px;
  }

  .studio-gallery-question {
    font-size: clamp(1.35rem, 3vw, 2.25rem);
  }
}

@media (max-width: 760px) {
  .studio-gallery {
    padding: 16px;
    border-radius: 22px;
  }

  .studio-gallery-head {
    align-items: flex-start;
  }

  .studio-gallery-card {
    grid-template-columns: 1fr;
  }

  .studio-gallery-video-wrap {
    width: min(100%, 390px);
    margin: 0 auto;
  }

  .studio-gallery-copy {
    padding: 0;
  }

  .studio-gallery-host-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .studio-gallery-practice-btn {
    width: 100%;
  }

  .studio-gallery-question {
    font-size: clamp(1.45rem, 6vw, 2.1rem);
  }

  .studio-gallery-hint {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .studio-gallery-head h2 {
    font-size: 1.4rem;
  }

  .studio-gallery-position {
    min-width: 60px;
    min-height: 30px;
    font-size: .75rem;
  }

  .studio-gallery-nav {
    width: 42px;
    height: 42px;
  }

  .studio-gallery-like {
    width: 44px;
    height: 44px;
  }

  .studio-gallery-transcript-text {
    padding: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .studio-gallery-card,
  .studio-gallery-practice-btn,
  .studio-gallery-nav,
  .studio-gallery-like {
    animation: none !important;
    transition: none !important;
  }
}


/* ---------------------------------------------------------
   Compact Studio alignment
   --------------------------------------------------------- */

@media (min-width: 761px) {
  .studio-gallery-video-wrap {
    width: 220px;
    height: 390px;
    aspect-ratio: auto;
  }

  .studio-gallery-card {
    min-height: 390px;
  }

  .studio-gallery-question {
    max-width: 680px;
  }

  .studio-gallery-transcript-text {
    max-height: 150px;
    overflow: auto;
  }
}
.studio-gallery-nav,
.studio-gallery-like {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 52px;
  height: 52px;
  border-radius: 50%;

  padding: 0;
  line-height: 1;
}
.studio-gallery-nav {
  font-size: 34px;
  font-weight: 500;
}

.studio-gallery-nav-prev {
  padding-left: 1px;      /* optical centering */
}

.studio-gallery-nav-next {
  padding-right: 1px;
}
.studio-gallery-like {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  padding-top: 1px;
}
.studio-gallery-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}
.studio-gallery-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

#studioGalleryPlayBtn[aria-pressed="true"] {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

@media (max-width: 640px) {
  .studio-gallery-actions {
    width: 100%;
    justify-content: stretch;
  }

  .studio-gallery-actions .studio-action-btn {
    flex: 1 1 100%;
    width: 100%;
  }
}