* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #bfd8e0;
  color: #f5efe6;
  user-select: none;
}

#stage-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ==================== 3D-PROJECTED FLOATING SPEECH BUBBLE ==================== */
.speech-bubble {
  position: fixed;
  z-index: 12;
  pointer-events: none;
  transform: translate(-50%, -115%);
  max-width: min(76vw, 340px);
  padding: 8px 14px;
  border-radius: 18px;
  background: rgba(248, 243, 234, 0.92);
  backdrop-filter: blur(10px);
  color: #2c2620;
  box-shadow: 0 6px 20px rgba(36, 30, 22, 0.14);
  border: 2px solid rgba(235, 226, 210, 0.9);
  text-align: center;
  transition: opacity 0.2s ease;
}

.speech-bubble.child-bubble {
  border-color: #6b9bc4;
  box-shadow: 0 6px 22px rgba(75, 123, 181, 0.22);
}

.speech-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  border-width: 8px 8px 0 8px;
  border-style: solid;
  border-color: rgba(248, 243, 234, 0.92) transparent transparent transparent;
}

.speech-bubble.hidden {
  opacity: 0;
  visibility: hidden;
}

.bubble-speaker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #2563eb;
  margin-bottom: 2px;
}

.bubble-text {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

/* ==================== MINIMAL TRANSLUCENT TOP HUD ==================== */
.top-hud {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.top-hud > * {
  pointer-events: auto;
}

.glass-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.14);
}

.brand-pill {
  padding: 6px 14px;
  gap: 7px;
  font-size: 14px;
  color: #ffffff;
}

.role-pill {
  padding: 4px 10px;
}

.role-select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  color: #f5efe6;
  font-size: 13.5px;
  font-weight: 800;
  padding: 4px 18px 4px 4px;
  cursor: pointer;
  outline: none;
  background-image: linear-gradient(45deg, transparent 50%, #f5efe6 50%), linear-gradient(135deg, #f5efe6 50%, transparent 50%);
  background-position: calc(100% - 8px) 52%, calc(100% - 3px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.role-select option {
  background: #1e293b;
  color: #f5efe6;
}

.star-pill {
  padding: 6px 13px;
  gap: 5px;
  font-size: 14px;
  color: #fde047;
  border-color: rgba(253, 224, 71, 0.45);
}

.star-pill.pop {
  animation: starPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes starPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.26); background: rgba(250, 204, 21, 0.35); }
  100% { transform: scale(1); }
}

.hud-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.18s ease;
}

.hud-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.hud-btn.active {
  background: #7eb2cf;
  color: #1e293b;
  box-shadow: 0 2px 8px rgba(126, 178, 207, 0.35);
}

.speed-btn.slow {
  background: #e6c373;
  color: #2c2620;
}

/* ==================== CELEBRATION TOAST ==================== */
.celebrate-toast {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  max-width: 92vw;
  text-align: center;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  padding: 8px 22px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.4);
  animation: toastPop 0.28s ease;
}

.celebrate-toast.hidden {
  display: none;
}

@keyframes toastPop {
  from { opacity: 0; transform: translate(-50%, -10px) scale(0.92); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* ==================== IMMERSIVE BOTTOM CINEMA BAR ==================== */
.cinema-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  padding: 18px 16px max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(15, 23, 42, 0.58) 0%, rgba(15, 23, 42, 0.22) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.cinema-footer > * {
  pointer-events: auto;
}

/* Non-blocking Inline Puppy Practice Strip */
.practice-strip {
  width: min(94vw, 760px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(56, 189, 248, 0.7);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35);
  animation: slideUp 0.24s ease;
}

.practice-strip.hidden {
  display: none;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.strip-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.strip-badge {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.strip-toggle {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.strip-toggle.active {
  background: rgba(230, 195, 115, 0.92);
  color: #2c2620;
  border-color: rgba(254, 243, 199, 0.85);
}

.strip-cue-from {
  font-size: 12px;
  color: #cbd5e1;
}

.strip-cues {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cue-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(125, 211, 252, 0.45);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.18s ease, border-color 0.18s ease;
}

.cue-chip:hover {
  background: rgba(56, 189, 248, 0.34);
  border-color: rgba(186, 230, 253, 0.8);
}

.cue-chip:active {
  transform: scale(0.95);
}

.cue-chip.speaking {
  background: rgba(230, 195, 115, 0.92);
  border-color: #fef3c7;
  color: #2c2620;
  transform: scale(1.04);
}

.cue-chip.waiting {
  background: rgba(93, 168, 116, 0.88);
  border-color: #bbf7d0;
  color: #f8f5ef;
}

.cue-chip.cue-static {
  cursor: default;
}

.cue-chip.cue-static:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(125, 211, 252, 0.45);
}

.cue-chip.cue-static:active {
  transform: none;
}

.cue-chip .cue-icon {
  font-size: 17px;
}

.strip-actions {
  display: flex;
  gap: 8px;
}

.strip-btn {
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease;
}

.strip-btn:active {
  transform: scale(0.95);
}

.btn-chunk {
  background: rgba(196, 219, 236, 0.94);
  color: #1e3a5f;
}

.btn-chunk.playing {
  background: #e6c373;
  color: #2c2620;
}

.btn-chunk.hidden {
  display: none;
}

.btn-listen {
  background: rgba(254, 243, 199, 0.95);
  color: #92400e;
}

.btn-pronounce {
  background: rgba(224, 231, 255, 0.94);
  color: #3730a3;
}

.btn-pronounce.hidden {
  display: none;
}

.btn-pronounce.listening {
  background: linear-gradient(135deg, #d97757, #c25949);
  color: #fffaf5;
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.35);
}

.btn-done {
  background: linear-gradient(135deg, #5da874, #468a5c);
  color: #f8f5ef;
  box-shadow: 0 4px 12px rgba(70, 138, 92, 0.35);
}

.pronounce-feedback {
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.pronounce-feedback.hidden {
  display: none;
}

.pronounce-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #f1f5f9;
}

.pronounce-stars {
  font-size: 14px;
  font-weight: 800;
  color: #f4d37a;
  white-space: nowrap;
}

.pronounce-tip {
  color: #e2e8f0;
  font-weight: 600;
}

.pronounce-tip.is-warn {
  color: #fcd34d;
}

.pronounce-words {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pronounce-word {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 2px 9px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.pronounce-word:active {
  transform: scale(0.94);
}

.pronounce-word.is-good {
  background: rgba(93, 168, 116, 0.28);
  border-color: rgba(134, 239, 172, 0.55);
  color: #dcfce7;
}

.pronounce-word.is-close {
  background: rgba(230, 195, 115, 0.28);
  border-color: rgba(253, 224, 71, 0.55);
  color: #fef3c7;
}

.pronounce-word.is-miss {
  background: rgba(217, 119, 87, 0.3);
  border-color: rgba(253, 186, 116, 0.65);
  color: #ffedd5;
}

@keyframes gentlePulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(34, 197, 94, 0.45); }
  50% { box-shadow: 0 4px 22px rgba(74, 222, 128, 0.85); }
}

/* Cinema Subtitle */
.cinema-subtitle {
  text-align: center;
  max-width: min(92vw, 760px);
  pointer-events: none;
}

.sub-line-en {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(15, 23, 42, 0.85), 0 1px 2px rgba(15, 23, 42, 0.9);
  line-height: 1.3;
}

.sub-speaker {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  vertical-align: middle;
  margin-right: 6px;
}

.sub-speaker.is-child {
  background: #2563eb;
  border-color: #93c5fd;
}

.sub-speaker.is-group {
  background: #0ea5e9;
  border-color: #bae6fd;
}

.sub-line-zh {
  font-size: 13px;
  color: rgba(241, 245, 249, 0.9);
  text-shadow: 0 1px 6px rgba(15, 23, 42, 0.9);
  margin-top: 2px;
}

/* Compact Translucent Transport Bar */
.transport-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(94vw, 560px);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.icon-btn {
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.icon-btn.play-btn {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}

.icon-btn.drawer-btn {
  width: auto;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  gap: 4px;
}

.slim-progress {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  overflow: hidden;
}

.slim-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8, #fde047);
  transition: width 0.3s ease;
}

/* ==================== SCRIPT DRAWER ==================== */
.script-drawer {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(90vw, 360px);
  z-index: 40;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.script-drawer.hidden {
  display: none;
}

.drawer-header {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-header h2 {
  font-size: 15px;
  font-weight: 800;
}

.drawer-filters {
  display: flex;
  gap: 6px;
}

.mini-btn {
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.mini-btn.active {
  background: #38bdf8;
  color: #0f172a;
}

.drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.drawer-item {
  padding: 9px 11px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

.drawer-item.active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.18);
}

.drawer-item.child-solo {
  border-left: 4px solid #38bdf8;
}

.drawer-item.child-group {
  border-left: 4px solid #34d399;
}

.drawer-item-top {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 3px;
}

.drawer-item-en {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.drawer-item-zh {
  font-size: 11.5px;
  color: #cbd5e1;
  margin-top: 2px;
}

@media (max-width: 820px), (max-height: 500px) and (orientation: landscape) {
  /* Disable heavy GPU backdrop-filter blur over live WebGL on mobile for silky 60fps */
  .glass-pill,
  .practice-strip,
  .transport-bar,
  .speech-bubble,
  .script-drawer {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .glass-pill,
  .transport-bar {
    background: rgba(24, 28, 36, 0.72);
  }
  .practice-strip {
    background: rgba(24, 28, 36, 0.84);
  }
}

@media (max-width: 640px) {
  .brand-pill { display: none; }

  /* Crisp 2-row grid HUD on portrait phones: never wraps into 3 awkward rows */
  .top-hud {
    top: max(8px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
  }
  .role-pill {
    justify-self: start;
    padding: 2px 8px;
  }
  .star-pill {
    justify-self: end;
    padding: 4px 10px;
    font-size: 12.5px;
  }
  .mode-pills {
    justify-self: start;
  }
  .scene-pills {
    justify-self: end;
  }
  .glass-pill {
    padding: 3px;
    gap: 2px;
  }
  .role-select {
    font-size: 12px;
    padding: 3px 16px 3px 2px;
  }
  .hud-btn {
    padding: 4px 5.5px;
    font-size: 10.5px;
  }

  .celebrate-toast {
    top: calc(max(8px, env(safe-area-inset-top)) + 76px);
    font-size: 13.5px;
    padding: 6px 16px;
  }

  .speech-bubble {
    max-width: min(82vw, 280px);
    padding: 6px 11px;
    border-radius: 14px;
  }
  .bubble-speaker {
    font-size: 10.5px;
  }
  .bubble-text {
    font-size: 13px;
  }

  .cinema-footer {
    padding: 10px 10px max(10px, env(safe-area-inset-bottom));
    gap: 6px;
  }

  /* Compact stacked practice strip so cue chips flow horizontally instead of forming a tall column */
  .practice-strip {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 16px;
  }
  .strip-left {
    gap: 5px;
  }
  .strip-badge {
    font-size: 11px;
    padding: 3px 8px;
  }
  .strip-toggle {
    font-size: 10.5px;
    padding: 2px 7px;
  }
  .strip-cue-from {
    font-size: 11px;
    line-height: 1.25;
  }
  .strip-cues {
    width: 100%;
    gap: 5px;
  }
  .cue-chip {
    padding: 3px 8px;
    font-size: 12px;
    gap: 4px;
  }
  .cue-chip .cue-icon {
    font-size: 14px;
  }
  .strip-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }
  .strip-btn {
    padding: 7px 10px;
    font-size: 12px;
  }
  .btn-chunk,
  .btn-listen,
  .btn-pronounce {
    flex: 0 0 auto;
  }
  .btn-done {
    flex: 1 1 110px;
  }
  .pronounce-feedback {
    padding-top: 6px;
    gap: 5px;
  }
  .pronounce-summary {
    font-size: 12px;
  }
  .pronounce-word {
    padding: 2px 8px;
    font-size: 12px;
  }

  .cinema-subtitle {
    max-width: 96vw;
  }
  .sub-line-en {
    font-size: 15px;
    line-height: 1.28;
  }
  .sub-speaker {
    font-size: 11px;
    padding: 1px 7px;
    margin-right: 4px;
  }
  .sub-line-zh {
    font-size: 12px;
  }

  .transport-bar {
    width: 100%;
    gap: 6px;
    padding: 5px 8px;
  }
  .icon-btn {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }
  .icon-btn.play-btn {
    width: 38px;
    height: 38px;
  }
  .icon-btn.drawer-btn {
    padding: 0 10px;
    font-size: 12px;
  }

  .script-drawer {
    top: max(10px, env(safe-area-inset-top));
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    border-radius: 18px;
  }
}

/* Extra-narrow phones (<= 410px, e.g. 360px Android / iPhone SE / iPhone 12-16) */
@media (max-width: 410px) {
  .top-hud {
    left: max(6px, env(safe-area-inset-left));
    right: max(6px, env(safe-area-inset-right));
    gap: 4px;
  }
  .hud-btn {
    padding: 3.5px 4px;
    font-size: 10px;
  }
  .glass-pill {
    padding: 2px;
    gap: 1px;
  }
  .role-pill {
    padding: 2px 6px;
  }
  .star-pill {
    padding: 3px 8px;
    font-size: 11.5px;
  }
}

/* Compact mobile landscape layout (short viewport height) */
@media (max-height: 500px) and (orientation: landscape) {
  .top-hud {
    top: max(6px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    gap: 6px;
  }
  .glass-pill {
    padding: 3px;
    gap: 2px;
  }
  .role-pill {
    padding: 2px 8px;
  }
  .role-select {
    font-size: 12px;
    padding: 2px 16px 2px 2px;
  }
  .star-pill {
    padding: 4px 10px;
    font-size: 12.5px;
  }
  .hud-btn {
    padding: 4px 9px;
    font-size: 11.5px;
  }
  .celebrate-toast {
    top: 46px;
    font-size: 13.5px;
    padding: 5px 16px;
  }
  .speech-bubble {
    max-width: min(58vw, 290px);
    padding: 5px 10px;
    border-radius: 14px;
  }
  .bubble-speaker {
    font-size: 10px;
  }
  .bubble-text {
    font-size: 12.5px;
  }
  .cinema-footer {
    padding: 6px max(12px, env(safe-area-inset-left)) max(6px, env(safe-area-inset-bottom));
    gap: 4px;
  }
  .practice-strip {
    width: min(96vw, 760px);
    flex-wrap: wrap;
    padding: 5px 10px;
    gap: 6px 8px;
    border-radius: 14px;
  }
  .pronounce-feedback {
    padding-top: 5px;
    gap: 4px;
  }
  .pronounce-summary {
    font-size: 11.5px;
    gap: 6px;
  }
  .pronounce-word {
    padding: 1px 7px;
    font-size: 11.5px;
  }
  .strip-left {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    min-width: 0;
  }
  .strip-cue-from {
    display: none;
  }
  .strip-cues {
    flex-wrap: nowrap;
    gap: 4px;
  }
  .cue-chip {
    padding: 2px 7px;
    font-size: 11.5px;
    white-space: nowrap;
  }
  .cue-chip .cue-icon {
    font-size: 13px;
  }
  .strip-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
  }
  .strip-btn {
    padding: 5px 10px;
    font-size: 12px;
  }
  .sub-line-en {
    font-size: 14.5px;
    line-height: 1.2;
  }
  .sub-speaker {
    font-size: 10.5px;
    padding: 1px 7px;
  }
  .sub-line-zh {
    font-size: 11px;
    margin-top: 1px;
  }
  .transport-bar {
    padding: 4px 8px;
    gap: 6px;
  }
  .icon-btn {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
  .icon-btn.play-btn {
    width: 34px;
    height: 34px;
  }
  .icon-btn.drawer-btn {
    padding: 0 9px;
    font-size: 11.5px;
  }
}

/* ==================== LIVE WEBCAM FACE TRACKING PREVIEW ==================== */
.cam-btn.active {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
}

.cam-preview {
  position: fixed;
  top: 66px;
  right: 14px;
  width: 112px;
  height: 84px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.28);
  background: #0f172a;
  z-index: 25;
  pointer-events: none;
}

.cam-preview.hidden {
  display: none;
}

.cam-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.cam-status {
  position: absolute;
  left: 6px;
  bottom: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #86efac;
  font-size: 10px;
  font-weight: 700;
}
