/* —— Automation Templates (studio-like, no tracks) —— */
body.is-templates {
  overflow: hidden;
  height: 100%;
}

.shell.is-templates {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.shell.is-templates .main {
  max-width: none;
  height: 100%;
  min-height: 0;
  padding-top: 16px;
  padding-bottom: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shell.is-templates .topbar {
  margin-bottom: 10px;
  flex: 0 0 auto;
}

.shell.is-templates .topbar .sub {
  display: none;
}

.shell.is-templates #view-templates.active {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: 0;
  overflow: hidden;
}

.tpl {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.tpl-panel {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}

.tpl-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

/* display:grid on .tpl-block would otherwise beat native [hidden] */
.tpl-block[hidden],
#tplEditor[hidden] {
  display: none !important;
}

.tpl-block h2 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.tpl-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tpl-block-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.tpl-list {
  display: grid;
  gap: 6px;
}

.tpl-item {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  box-sizing: border-box;
}

.tpl-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.tpl-item.is-active {
  border-color: rgba(91, 140, 255, 0.45);
  background: rgba(91, 140, 255, 0.12);
}

.tpl-item__main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.tpl-item__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 600;
}

.tpl-item__meta {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}

.tpl-item__actions {
  display: flex;
  gap: 6px;
}

.tpl-item-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1.2;
}

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

.tpl-item-btn--danger {
  color: #ff8f8f;
  border-color: rgba(255, 120, 120, 0.25);
}

.tpl-item-btn--danger:hover {
  background: rgba(255, 80, 80, 0.14);
}

.tpl-empty {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.tpl-field {
  display: grid;
  gap: 6px;
}

.tpl-field-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.tpl-field select.text-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239aa3b2' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.game-picker--tpl {
  flex: none;
  max-width: none;
  width: 100%;
  z-index: 12;
}

.game-picker--tpl .game-picker__trigger {
  min-height: 44px;
  background: var(--input-bg, rgba(255, 255, 255, 0.04));
}

.game-picker__icon--empty {
  display: inline-block;
  background: rgba(255, 255, 255, 0.06);
}

.tpl-tools {
  display: grid;
  gap: 8px;
}

.tpl-tools-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.tpl-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.tpl-tool {
  position: relative;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: not-allowed;
  opacity: 0.7;
}

.tpl-tool-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #5b8cff;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.tpl-tool-count[hidden] {
  display: none !important;
}

.tpl-tool.is-ready:not(:disabled) {
  cursor: pointer;
  opacity: 1;
  color: var(--text);
  border-style: solid;
  border-color: rgba(91, 140, 255, 0.35);
  background: rgba(91, 140, 255, 0.1);
}

.tpl-tool.is-ready:not(:disabled):hover {
  background: rgba(91, 140, 255, 0.18);
}

.tpl-text-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.tpl-text-form[hidden] {
  display: none;
}

.tpl-text-area {
  resize: vertical;
  min-height: 72px;
  line-height: 1.35;
}

.tpl-text-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.tpl-size {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.tpl-size-range {
  width: 100%;
  accent-color: #5b8cff;
}

.tpl-plate-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.8),
    1px 1px 0 rgba(0, 0, 0, 0.7);
}

.tpl-plate-btn.is-active {
  background: #fff;
  color: #111;
  text-shadow: none;
}

.tpl-check.tpl-full-blur {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.tpl-check.tpl-full-blur input {
  margin-top: 2px;
  accent-color: #5b8cff;
}

.tpl-check.tpl-full-blur .muted {
  color: var(--muted);
  font-weight: 400;
}

.phone-overlay--text-full-blur {
  z-index: 0;
  inset: 0;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  transform: none !important;
  max-width: none;
  padding: 0;
  border-radius: 0;
  color: transparent;
  font-size: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: none;
  backdrop-filter: blur(7px) saturate(1.05);
  -webkit-backdrop-filter: blur(7px) saturate(1.05);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.phone-overlay--text-full-blur.is-on {
  opacity: 1;
  visibility: visible;
}

.tpl-layers {
  display: grid;
  gap: 8px;
}

.tpl-layers[hidden] {
  display: none;
}

.tpl-layer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tpl-layer:hover {
  border-color: rgba(91, 140, 255, 0.35);
}

.tpl-layer.is-active {
  border-color: rgba(91, 140, 255, 0.55);
  background: rgba(91, 140, 255, 0.12);
}

.tpl-layer strong {
  display: block;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpl-layer small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
}

.tpl-slot-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.tpl-slot-pill {
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.tpl-slot-pill:hover:not(:disabled) {
  border-color: rgba(91, 140, 255, 0.35);
  color: var(--text);
}

.tpl-slot-pill.is-active {
  border-color: rgba(91, 140, 255, 0.55);
  background: rgba(91, 140, 255, 0.14);
  color: var(--text);
}

.tpl-slot-pill:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tpl-mid-settings {
  display: grid;
  gap: 10px;
}

.tpl-mid-settings[hidden],
#tplEndHint[hidden] {
  display: none !important;
}

.tpl-timing-block {
  margin-top: 4px;
}

.tpl-timing-block[hidden] {
  display: none !important;
}

.tpl-text-form .tpl-timing-block,
.tpl-blur-form .tpl-timing-block {
  margin-top: 4px;
}

.tpl-blur-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.tpl-blur-form[hidden] {
  display: none;
}

.tpl-streamer-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.tpl-streamer-form[hidden] {
  display: none;
}

.tpl-streamer-pick {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.tpl-streamer-pick[hidden] {
  display: none;
}

.tpl-streamer-random-badge {
  display: grid;
  place-items: center start;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 650;
}

.tpl-streamer-random-badge[hidden] {
  display: none;
}

.tpl-streamer-pick.is-open {
  border-color: rgba(91, 140, 255, 0.45);
}

.tpl-streamer-pick-meta {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.tpl-streamer-dropdown {
  display: grid;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(8, 10, 14, 0.55);
}

.tpl-streamer-dropdown[hidden] {
  display: none !important;
}

.tpl-streamer-list {
  display: grid;
  gap: 4px;
  max-height: 220px;
  overflow: auto;
}

.tpl-streamer-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
}

.tpl-streamer-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.tpl-streamer-item.is-active {
  border-color: rgba(91, 140, 255, 0.45);
  background: rgba(91, 140, 255, 0.12);
}

.tpl-streamer-item__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.tpl-streamer-item__dur {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.tpl-place-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.tpl-intro-settings {
  display: grid;
  gap: 8px;
}

.tpl-intro-settings[hidden],
#tplStreamerOverlayHint[hidden] {
  display: none !important;
}

.tpl-stage .phone-screen video.tpl-video--intro-blur {
  /* filter applied inline; class marks intro phase */
}

.tpl-shape-btn {
  padding: 9px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}

.tpl-shape-btn.is-active {
  border-color: rgba(91, 140, 255, 0.55);
  background: rgba(91, 140, 255, 0.14);
  color: var(--text);
}

.tpl-effect-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.tpl-effect-form[hidden] {
  display: none;
}

.tpl-effect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.tpl-effect-pill {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tpl-effect-pill strong {
  font-size: 0.8rem;
  font-weight: 700;
}

.tpl-effect-pill small {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.25;
}

.tpl-effect-pill:hover {
  border-color: rgba(91, 140, 255, 0.35);
}

.tpl-effect-pill.is-active {
  border-color: rgba(91, 140, 255, 0.55);
  background: rgba(91, 140, 255, 0.14);
}

.tpl-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.phone-overlay--blur {
  z-index: 1;
  max-width: none;
  width: 40%;
  height: 18%;
  padding: 0;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  color: transparent;
  text-shadow: none;
  font-size: 0;
  line-height: 0;
  white-space: normal;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(var(--tpl-blur, 14px));
  -webkit-backdrop-filter: blur(var(--tpl-blur, 14px));
}

.phone-overlays.is-locked {
  pointer-events: none;
}

.phone-overlay--streamer {
  z-index: 4;
  max-width: none;
}

.phone-overlay--streamer.shape-rect {
  aspect-ratio: auto !important;
}

.phone-overlay--streamer.shape-circle {
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  /* Clip via inner .streamer-clip so the resize handle stays visible outside the circle */
  border-radius: 0 !important;
  overflow: visible !important;
  background: transparent;
  box-shadow: none;
}

.phone-overlay--streamer.shape-circle .streamer-clip {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  background: #000;
}

.phone-overlay--streamer.shape-circle .streamer-clip video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

.phone-overlay--streamer.shape-circle .media-resize {
  right: -2px;
  bottom: -2px;
  z-index: 5;
}

.phone-overlay--streamer:not(.shape-circle) video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.phone-overlay--text {
  z-index: 3;
}

.phone-overlay--blur .blur-resize {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 0;
  padding: 0;
  cursor: nwse-resize;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 2;
  pointer-events: auto;
}

.phone-overlay--blur.is-selected .blur-resize {
  opacity: 1;
}

.phone-overlay--blur .blur-resize::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-right: 2px solid #111;
  border-bottom: 2px solid #111;
  border-radius: 1px;
}

.phone-overlay--blur-spotlight,
.phone-overlay--blur-bounce {
  z-index: 1;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  transform: none !important;
  padding: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.phone-overlay--blur-spotlight .spotlight-blur-fill,
.phone-overlay--blur-bounce .spotlight-blur-fill {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(var(--tpl-blur, 14px));
  -webkit-backdrop-filter: blur(var(--tpl-blur, 14px));
  -webkit-mask-image: radial-gradient(
    circle at var(--spot-x, 50%) var(--spot-y, 50%),
    transparent calc(var(--spot-r, 20) * 1%),
    black calc(var(--spot-r, 20) * 1% + 0.35%)
  );
  mask-image: radial-gradient(
    circle at var(--spot-x, 50%) var(--spot-y, 50%),
    transparent calc(var(--spot-r, 20) * 1%),
    black calc(var(--spot-r, 20) * 1% + 0.35%)
  );
  pointer-events: none;
}

.phone-overlay--blur-spotlight .spotlight-handle,
.phone-overlay--blur-bounce .spotlight-handle {
  position: absolute;
  left: var(--spot-x, 50%);
  top: var(--spot-y, 50%);
  width: calc(var(--spot-r, 20) * 2 * 1%);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border: 2px dashed rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  cursor: grab;
}

.phone-overlay--blur-spotlight.is-selected .spotlight-handle,
.phone-overlay--blur-bounce.is-selected .spotlight-handle {
  border-color: rgba(91, 140, 255, 0.95);
}

.phone-overlay--blur-bounce .spotlight-handle {
  cursor: default;
}

.phone-overlay--blur-spotlight .spotlight-resize,
.phone-overlay--blur-bounce .spotlight-resize {
  position: absolute;
  left: calc(var(--spot-x, 50%) + var(--spot-r, 20) * 1% - 8px);
  top: calc(var(--spot-y, 50%) - 8px);
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.phone-overlay--blur-spotlight:not(.is-on):not(.is-selected) .spotlight-blur-fill,
.phone-overlay--blur-bounce:not(.is-on):not(.is-selected) .spotlight-blur-fill {
  opacity: 0;
}

.phone-overlay--blur-spotlight.is-ghost .spotlight-blur-fill,
.phone-overlay--blur-bounce.is-ghost .spotlight-blur-fill {
  opacity: 0.35;
}

.tpl-mute-fab {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 6;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(12, 16, 24, 0.72);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tpl-mute-fab .ico-sound-on {
  display: none;
}

.tpl-mute-fab:not(.is-muted) .ico-sound-on {
  display: block;
}

.tpl-mute-fab:not(.is-muted) .ico-sound-off {
  display: none;
}

.tpl-mute-fab.is-muted .ico-sound-off {
  display: block;
}

.tpl-mute-fab.is-muted .ico-sound-on {
  display: none;
}

.tpl-mute-fab[hidden] {
  display: none;
}

.tpl-stage {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  container-type: size;
}

.tpl-stage-stack {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  justify-items: center;
  min-height: 0;
  padding: 0 8px 4px;
  box-sizing: border-box;
}

.tpl-stage .phone-slot {
  display: grid;
  place-items: center;
  align-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.tpl-stage .phone-frame {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: calc(100% - 4px);
  width: auto;
  aspect-ratio: 9 / 16;
  max-width: 100%;
  max-height: calc(100% - 4px);
  overflow: hidden;
  margin: 0;
}

@supports (width: 1cqh) {
  .tpl-stage .phone-frame {
    height: auto;
    width: min(100cqw, calc((100cqh - 64px) * 9 / 16));
    max-height: calc(100cqh - 64px);
  }
}

.tpl-stage .phone-screen {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: auto;
  align-self: stretch;
}

.tpl-stage .phone-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #0d1118;
  border-radius: inherit;
  transition: filter 0.15s ease;
}

.tpl-scrub {
  width: min(100%, 420px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(12, 16, 24, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tpl-scrub[hidden] {
  display: none !important;
}

.tpl-scrub-play {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.tpl-scrub-play .ico-pause {
  display: none;
}

.tpl-scrub-play.is-playing .ico-play {
  display: none;
}

.tpl-scrub-play.is-playing .ico-pause {
  display: block;
}

.tpl-scrub-range {
  width: 100%;
  accent-color: #5b8cff;
  cursor: pointer;
}

.tpl-scrub-time {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .tpl {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 42%) minmax(0, 1fr);
  }

  .tpl-panel {
    max-height: none;
    overflow-y: auto;
  }
}
