/* VenusClip · "Probalo": 3D desk + demo editor on the home page.
   Source: web/setup3d*.js. Uses the tokens from tokens.css. */

/* ---------------------------------------------------------------- section */
.s3d .mh-body p:last-child { margin-bottom: 0; }

.s3d-stage {
  grid-column: 1 / -1;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  min-height: 320px;
  max-height: 78svh;
  border: var(--bw) solid var(--line-2);
  border-radius: var(--r-2);
  background: var(--night);
  overflow: hidden;
  isolation: isolate;
}
@media (max-width: 759px) {
  .s3d-stage { aspect-ratio: 4 / 5; max-height: 72svh; }
}

/* The view lives in the stage, or on <body> while it is full screen. */
.s3d-view {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--night);
  font-family: var(--font);
  color: var(--ink);
}
.s3d-view.is-full {
  position: fixed;
  inset: 0;
  z-index: var(--z-dialog);
}
html.s3d-lock,
html.s3d-lock body { overflow: hidden; overscroll-behavior: none; }

.s3d-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease);
  touch-action: pan-y;
  cursor: grab;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.s3d-stage.is-ready .s3d-canvas,
.s3d-view.is-full .s3d-canvas { opacity: 1; }
.s3d-view.is-full .s3d-canvas { touch-action: none; }
.s3d-view.is-drag .s3d-canvas { cursor: grabbing; }
.s3d-view.is-editing .s3d-canvas { cursor: default; }

/* Hidden source clip: kept in the layout so browsers keep decoding it. */
.s3d-src {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: -1;
  pointer-events: none;
}

/* ---------------------------------------------------------------- inline HUD */
.s3d-hud {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3) var(--sp-4);
  padding: var(--sp-5);
  background: linear-gradient(to top, rgb(18 19 22 / .82), rgb(18 19 22 / 0));
  pointer-events: none;
}
.s3d-hud > * { pointer-events: auto; }
.s3d-hint {
  font-family: var(--label);
  font-size: var(--fs-label);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-2);
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease);
}
.s3d-stage.is-ready .s3d-hint { opacity: 1; }
.s3d-view.is-full .s3d-hud,
.s3d-failed .s3d-hint,
.s3d-nogl .s3d-hint { display: none; }

/* ---------------------------------------------------------------- loading */
.s3d-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  translate: -50% -50%;
  width: min(220px, 70%);
  margin: 0;
  padding-bottom: var(--sp-3);
  font-family: var(--label);
  font-size: var(--fs-label);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-2);
  overflow: hidden;
}
.s3d-loading::before,
.s3d-loading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
}
.s3d-loading::before { right: 0; background: var(--line-2); }
.s3d-loading::after {
  width: 30%;
  background: var(--accent);
  animation: s3d-load 1.2s var(--ease) infinite;
}
@keyframes s3d-load {
  from { transform: translateX(-100%); }
  to { transform: translateX(340%); }
}
.s3d-stage.is-ready .s3d-loading,
.s3d-view.is-full .s3d-loading { display: none; }
.s3d-failed .s3d-loading { color: var(--ink); }
.s3d-failed .s3d-loading::after { display: none; }

/* Until the scene draws, and wherever it can't (a phone without WebGL, a failed load): a render of this same desk, so
   the section never shows an empty box or someone else's video (the owner: «Mi celular no aparece lo 3D… Se pone otra
   cosa fea»). The editor still opens. */
.s3d-stage .s3d-view { background: var(--night) url("demo/setup3d-wide.jpg") center / cover no-repeat; }
@media (max-width: 759px) {
  .s3d-stage .s3d-view { background-image: url("demo/setup3d-tall.jpg"); }
}
.s3d-nogl .s3d-canvas { display: none; }
.s3d-failed .s3d-loading { display: none; }
.s3d-view.is-full.s3d-nogl,
.s3d-view.is-full { background-color: var(--night); }

/* ---------------------------------------------------------------- scene overlay */
.s3d-ui {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), visibility 0s linear 0s;
}
.s3d-view.is-editing .s3d-ui,
.s3d-view.is-diving .s3d-ui {
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
}

.s3d-top,
.s3d-bottom {
  position: absolute;
  left: 0;
  right: 0;
  display: none;
  align-items: center;
  gap: var(--sp-3);
  pointer-events: none;
}
.s3d-view.is-full .s3d-top,
.s3d-view.is-full .s3d-bottom { display: flex; }
.s3d-top {
  top: 0;
  padding: max(var(--sp-4), env(safe-area-inset-top)) max(var(--sp-4), env(safe-area-inset-right)) 0 max(var(--sp-4), env(safe-area-inset-left));
}
.s3d-bottom {
  bottom: 0;
  justify-content: center;
  padding: 0 var(--sp-4) max(var(--sp-5), calc(env(safe-area-inset-bottom) + var(--sp-3)));
}
.s3d-top > *,
.s3d-bottom > * { pointer-events: auto; }

.s3d-view .s3d-ui .s3d-back {
  height: 40px;
  padding: 0 16px 0 10px;
  gap: 6px;
  background: rgb(23 25 29 / .78) !important;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.s3d-back svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.s3d-tip {
  margin: 0;
  min-width: 0;
  padding: 7px 10px;
  border-radius: var(--r-1);
  background: rgb(23 25 29 / .78);
  font-family: var(--label);
  font-size: var(--fs-label);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-label);
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink-2);
  pointer-events: none !important;
}
.s3d-tip:empty { display: none; }
@media (max-width: 600px) {
  .s3d-top { flex-wrap: wrap; }
  .s3d-tip { flex-basis: 100%; order: 2; font-size: var(--fs-micro); }
}
.s3d-view .s3d-ui .s3d-edit { height: 44px; padding: 0 22px; }

/* Hotspots that ride on 3D objects (position set from JS). */
.s3d-pin {
  position: absolute;
  left: 0;
  top: 0;
  translate: -50% calc(-100% - 10px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 11px 0 10px;
  border: var(--bw) solid var(--line-3);
  border-radius: var(--r-1);
  background: rgb(23 25 29 / .84);
  color: var(--ink);
  font-family: var(--label);
  font-size: var(--fs-label);
  font-weight: var(--fw-semi);
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), border-color var(--dur-1) var(--ease), visibility 0s linear var(--dur-2);
  will-change: transform;
}
.s3d-view.pins-on .s3d-pin:not(.is-off) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity var(--dur-2) var(--ease), border-color var(--dur-1) var(--ease), visibility 0s;
}
.s3d-pin:hover { border-color: var(--ink); }
.s3d-pin::after {
  content: "";
  position: absolute;
  left: calc(50% + var(--stem, 0px));
  top: 100%;
  width: 1px;
  height: 10px;
  background: var(--line-3);
}
.s3d-pin i {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: var(--accent);
  border: 2px solid var(--accent);
  flex: none;
}
.s3d-pin i::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 1px;
  border: 1px solid var(--accent);
  animation: s3d-ping 1.8s var(--ease) infinite;
}
@keyframes s3d-ping {
  from { transform: scale(1); opacity: .9; }
  70%, to { transform: scale(2.6); opacity: 0; }
}
.s3d-pin[aria-pressed="false"] i { background: transparent; }
.s3d-pin[aria-pressed="false"] i::after { animation: none; opacity: 0; }

/* ---------------------------------------------------------------- editor */
.s3d-app {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 34vw, 460px);
  grid-template-rows: 52px minmax(0, 1fr) auto;
  grid-template-areas: "bar bar" "view tools" "tl tl";
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease);
  overflow: hidden;
}
.s3d-app.is-on { opacity: 1; }
/* Fit: drawn 1:1 over the monitor's screen, scaled from 1280×720. */
.s3d-app.is-fit {
  inset: auto;
  transform-origin: 0 0;
  grid-template-columns: 820px 460px;
  grid-template-rows: 52px 498px 170px;
}
.s3d-app.is-full {
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: var(--night);
}
.s3d-app.is-full > * { background-color: var(--paper); }
.s3d-app.is-full > .s3d-bar,
.s3d-app.is-full > .s3d-tl { background-color: var(--night); }
.s3d-main { display: contents; }
.s3d-app button { font: inherit; color: inherit; }
.s3d-app h3 { margin: 0; }
.s3d-app p { margin: 0; }

/* bar */
.s3d-bar {
  grid-area: bar;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 23px 0 22px;
  background: var(--night);
  border-bottom: var(--bw) solid var(--line);
}
.s3d-app .s3d-brand { font-size: 14px; flex: none; color: var(--ink); }
.s3d-crumb {
  display: flex;
  gap: 8px;
  min-width: 0;
  margin-left: 18px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.s3d-crumb > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.s3d-crumb-sep { color: var(--ink-3); opacity: .6; }
.s3d-sp { flex: 1 1 auto; min-width: 0; }
.s3d-tbtn {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--r-1);
  font-family: var(--label) !important;
  font-size: var(--fs-label);
  font-weight: var(--fw-semi);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2) !important;
  white-space: nowrap;
  transition: color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
.s3d-tbtn:not(:disabled):hover { color: var(--ink) !important; background: rgb(var(--ink-rgb) / .06); }
.s3d-app .pill-btn.s3d-export {
  height: 30px;
  min-width: 120px;
  padding: 0 16px;
  margin-right: 5px;
}
.s3d-x {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: var(--r-1);
  color: var(--ink-2) !important;
  transition: color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
.s3d-x:hover { color: var(--ink) !important; background: rgb(var(--ink-rgb) / .06); }
.s3d-x svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }

/* preview */
.s3d-view-area {
  grid-area: view;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 14px;
  background: var(--paper);
  overflow: hidden;
}
.s3d-frame {
  position: relative;
  flex: none;
  background: #000;
  outline: 1px solid rgb(255 255 255 / .12);
}
.s3d-prev { display: block; width: 100%; height: 100%; }
.s3d-bigplay {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 4px;
  background: var(--scrim) !important;
  color: var(--ink) !important;
  transition: transform var(--dur-1) var(--ease);
}
.s3d-bigplay:hover { transform: scale(1.06); }
.s3d-bigplay svg { width: 26px; height: 26px; fill: currentColor; margin-left: 3px; }

/* tools */
.s3d-tools {
  grid-area: tools;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-left: var(--bw) solid var(--line);
  background: var(--paper);
}
.s3d-tabs {
  display: flex;
  gap: 22px;
  flex: none;
  padding: 12px 24px 0;
  border-bottom: var(--bw) solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.s3d-tabs::-webkit-scrollbar { display: none; }
.s3d-tabs [role=tab] {
  position: relative;
  flex: none;
  height: 32px;
  padding: 0;
  font-family: var(--label) !important;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2) !important;
  transition: color var(--dur-1) var(--ease);
}
.s3d-tabs [role=tab]:hover,
.s3d-tabs [role=tab][aria-selected="true"] { color: var(--ink) !important; }
.s3d-tabs [role=tab]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--dur-2) var(--ease);
}
.s3d-tabs [role=tab][aria-selected="true"]::after { transform: scaleX(1); }
.s3d-panels {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 24px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-3) transparent;
}

.s3d-lbl {
  display: block;
  margin: 24px 0 10px !important;
  line-height: 14px;
  font-family: var(--label);
  font-size: var(--fs-label);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-2);
}
.s3d-panel > .s3d-lbl:first-child,
.s3d-card .s3d-lbl { margin-top: 0 !important; }

/* caption styles */
.s3d-styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.s3d-style {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  height: 64px;
  padding: 10px 14px 0 !important;
  border: 1px solid rgb(255 255 255 / .14) !important;
  border-radius: 3px;
  text-align: left;
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.s3d-style:hover { border-color: rgb(255 255 255 / .32) !important; }
.s3d-style[aria-pressed="true"] { border-color: var(--accent) !important; box-shadow: inset 0 0 0 1px var(--accent); }
.s3d-style > span:last-child {
  max-width: 100%;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.s3d-style-demo {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}
.s3d-style[aria-pressed="true"] .s3d-style-demo { color: var(--hl, var(--accent)); }
.s3d-sd-karaoke,
.s3d-style[aria-pressed="true"] .s3d-sd-karaoke {
  color: transparent;
  background: linear-gradient(90deg, var(--hl, var(--accent)) 50%, #fff 50%);
  -webkit-background-clip: text;
  background-clip: text;
}
.s3d-sd-box,
.s3d-style[aria-pressed="true"] .s3d-sd-box {
  padding: 1px 4px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--hl, var(--accent));
  color: #000;
}
.s3d-sd-beast { font-style: italic; text-transform: uppercase; letter-spacing: .02em; }
.s3d-sd-clean { font-family: var(--font); font-weight: 500; }
.s3d-style[aria-pressed="true"] .s3d-sd-neon,
.s3d-sd-neon { color: var(--hl, var(--accent)); text-shadow: 0 0 8px var(--hl, var(--accent)); }

/* color swatches */
.s3d-colors { display: flex; flex-wrap: wrap; gap: 6px; margin-left: -5px; }
.s3d-sw {
  position: relative;
  width: 38px;
  height: 38px;
  border: 2px solid transparent !important;
  border-radius: var(--r-2);
  transition: border-color var(--dur-1) var(--ease);
}
.s3d-sw::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 3px;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .18);
}
.s3d-sw:hover { border-color: var(--line-3) !important; }
.s3d-sw[aria-pressed="true"] { border-color: var(--accent) !important; }

/* segmented buttons */
.s3d-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
.s3d-seg-b {
  height: 36px;
  padding: 0 8px;
  border: 1px solid rgb(255 255 255 / .14) !important;
  border-radius: var(--r-1);
  font-size: 13px !important;
  font-weight: 600;
  color: var(--ink-2) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.s3d-seg-b:hover { color: var(--ink) !important; border-color: rgb(255 255 255 / .32) !important; }
.s3d-seg-b[aria-pressed="true"] { color: var(--ink) !important; border-color: var(--accent) !important; box-shadow: inset 0 0 0 1px var(--accent); }

/* switch */
.s3d-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
.s3d-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}
.s3d-sw-ui {
  position: relative;
  flex: none;
  width: 34px;
  height: 18px;
  border-radius: var(--r-1);
  background: var(--surface-3);
  transition: background-color var(--dur-2) var(--ease);
}
.s3d-sw-ui::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 1px;
  background: #fff;
  transition: transform var(--dur-2) var(--ease);
}
.s3d-switch input:checked + .s3d-sw-ui { background: var(--accent); }
.s3d-switch input:checked + .s3d-sw-ui::after { transform: translateX(16px); background: var(--accent-ink); }
.s3d-switch input:focus-visible + .s3d-sw-ui { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.s3d-note { font-size: 13px; line-height: 1.5; color: var(--ink-2); margin-bottom: 16px !important; }

/* text lines */
.s3d-lines { display: grid; gap: 8px; }
.s3d-line { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 8px; }
.s3d-line-t { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.s3d-input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-1);
  background: var(--surface);
  color: var(--ink);
  font: 500 14px var(--font);
  transition: border-color var(--dur-1) var(--ease);
}
.s3d-input:hover { border-color: var(--line-3); }
.s3d-app .s3d-input:focus-visible,
.s3d-app .s3d-input:focus { outline: none !important; border-color: var(--accent); }
.s3d-line.is-cur .s3d-input { border-color: rgb(var(--accent-rgb) / .6); }

/* framing options */
.s3d-opts { display: grid; gap: 8px; }
.s3d-opt {
  display: grid !important;
  gap: 2px;
  justify-items: start;
  padding: 12px 14px !important;
  border: 1px solid rgb(255 255 255 / .14) !important;
  border-radius: 3px;
  text-align: left;
  transition: border-color var(--dur-1) var(--ease);
}
.s3d-opt:hover { border-color: rgb(255 255 255 / .32) !important; }
.s3d-opt b { font-size: 14px; font-weight: 600; color: var(--ink); }
.s3d-opt span { font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.s3d-opt[aria-pressed="true"] { border-color: var(--accent) !important; box-shadow: inset 0 0 0 1px var(--accent); }

.s3d-range { display: flex; align-items: center; gap: 12px; }
.s3d-range input { flex: 1 1 auto; min-width: 0; accent-color: var(--accent); height: 24px; }
.s3d-range output { min-width: 4ch; font-family: var(--mono); font-size: 12px; color: var(--ink-2); text-align: right; }

/* filters */
.s3d-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.s3d-filter {
  display: grid !important;
  gap: 6px;
  justify-items: center;
  min-width: 0;
  padding: 0 !important;
  font-size: 12px !important;
  color: var(--ink-2) !important;
}
.s3d-filter canvas {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  height: auto;
  border-radius: 3px;
  background: var(--surface);
  outline: 1px solid rgb(255 255 255 / .14);
  outline-offset: 0;
  transition: outline-color var(--dur-1) var(--ease);
}
.s3d-filter:hover canvas { outline-color: rgb(255 255 255 / .32); }
.s3d-filter[aria-pressed="true"] { color: var(--ink) !important; }
.s3d-filter[aria-pressed="true"] canvas { outline: 2px solid var(--accent); }

/* ---------------------------------------------------------------- timeline */
.s3d-tl {
  grid-area: tl;
  min-width: 0;
  padding: 10px 0 14px;
  background: var(--night);
  border-top: var(--bw) solid var(--line);
}
.s3d-app.is-fit .s3d-tl { padding-bottom: 0; }
.s3d-tl-head {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 16px;
}
.s3d-play {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: var(--r-1);
  color: var(--ink) !important;
}
.s3d-play:hover { background: rgb(var(--ink-rgb) / .06); }
.s3d-play svg { width: 27px; height: 27px; }
.s3d-i-pause { fill: none; stroke: currentColor; stroke-width: 3.5; }
.s3d-i-play { fill: currentColor; display: none; }
.s3d-app.is-paused .s3d-i-pause { display: none; }
.s3d-app.is-paused .s3d-i-play { display: block; }
.s3d-tc { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.s3d-len {
  padding-right: 8px;
  font-family: var(--label);
  font-size: var(--fs-label);
  font-weight: var(--fw-semi);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.s3d-len b { font-family: var(--mono); font-weight: 600; color: var(--ink); letter-spacing: 0; text-transform: none; }
/* clip switch: «Podcast | Videojuego» */
.s3d-clips { display: flex; gap: 6px; margin-left: 12px; min-width: 0; }
.s3d-clips .s3d-seg-b { flex: none; height: 26px; padding: 0 10px; font-size: 12px !important; }

.s3d-tracks {
  position: relative;
  margin: 0 10px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: text;
}
.s3d-ruler { position: relative; height: 20px; }
.s3d-ruler .k {
  position: absolute;
  top: 8px;
  width: 1px;
  height: 5px;
  background: rgb(255 255 255 / .18);
}
.s3d-ruler .k-l {
  height: 9px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 10px;
  color: var(--ink-3);
  text-indent: 4px;
  white-space: nowrap;
}
.s3d-vtrack {
  position: relative;
  height: 52px;
  margin-top: 4px;
}
.s3d-strip {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  width: calc(100% - 28px);
  height: 100%;
  display: block;
  border-radius: 2px;
  background: var(--surface);
}
.s3d-dim {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgb(0 0 0 / .55);
  background-clip: content-box;
  pointer-events: none;
}
.s3d-dim-in { left: 0; padding-left: 14px; }
.s3d-dim-out { right: 0; padding-right: 14px; }
.s3d-trimbox {
  position: absolute;
  top: 0;
  height: 52px;
  border: 2px solid var(--accent);
  border-radius: 2px;
  pointer-events: none;
}
.s3d-h {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  border-radius: 2px;
  background: var(--accent);
  cursor: ew-resize;
  touch-action: none;
  z-index: 2;
}
.s3d-h-out { translate: -100% 0; }
.s3d-h::before { content: ""; position: absolute; inset: -6px -10px; }
.s3d-h::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 16px;
  translate: -50% -50%;
  border-radius: 1px;
  background: var(--accent-ink);
  opacity: .7;
}
.s3d-h:focus-visible { outline-offset: 1px !important; }
.s3d-ctrack { position: relative; height: 22px; margin-top: 8px; }
.s3d-wb {
  position: absolute;
  top: 0;
  height: 22px;
  padding: 0 !important;
  border-radius: 2px;
  background: rgb(var(--accent-rgb) / .22) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 600;
  line-height: 22px;
  text-align: left;
  overflow: hidden;
  transition: background-color var(--dur-1) var(--ease);
  container-type: inline-size;
}
/* padding lives on the text, so a short word's block can be as thin as the word */
.s3d-wb > span {
  display: block;
  padding: 0 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* too narrow for a letter and an ellipsis: keep the block, drop the text (it stays its label) */
@container (max-width: 30px) { .s3d-wb > span { color: transparent; } }
.s3d-wb:hover { background: rgb(var(--accent-rgb) / .38) !important; }
.s3d-wb.is-cur { background: rgb(var(--accent-rgb) / .5) !important; }
.s3d-ph {
  position: absolute;
  top: 4px;
  bottom: -6px;
  width: 2px;
  margin-left: -1px;
  background: #fff;
  pointer-events: none;
  z-index: 3;
}
.s3d-ph i {
  position: absolute;
  left: 50%;
  top: -6px;
  width: 12px;
  height: 12px;
  translate: -50% 0;
  border-radius: 1px;
  background: var(--accent);
}
.s3d-tl-hint {
  margin: 8px 24px 0 !important;
  font-family: var(--label);
  font-size: var(--fs-micro);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-3);
}
.s3d-app.is-fit .s3d-tl-hint { display: none; }
.s3d-app.is-scrub,
.s3d-app.is-scrub * { user-select: none; -webkit-user-select: none; }
.s3d-app.is-scrub .s3d-tracks { cursor: ew-resize; }

/* ---------------------------------------------------------------- export modal */
.s3d-modal {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: var(--sp-4);
  background: var(--scrim);
}
.s3d-card {
  width: min(420px, 100%);
  padding: 24px;
  border: var(--bw) solid var(--line-2);
  border-radius: var(--r-2);
  background: var(--paper);
}
.s3d-card h3 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: var(--fw-bold);
  line-height: 1.2;
}
.s3d-prog { height: 2px; background: var(--line-2); overflow: hidden; }
.s3d-prog i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.s3d-step { margin-top: 12px !important; font-size: 13px; color: var(--ink-2); }
.s3d-done-meta { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.s3d-done-p { margin-top: 12px !important; font-size: var(--fs-body); color: var(--ink-2); line-height: var(--lh-body); }
.s3d-done-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.s3d-fine { margin-top: 14px !important; font-size: 12px; color: var(--ink-3); }

/* ---------------------------------------------------------------- phone, portrait */
@media (max-width: 759px) and (orientation: portrait) {
  .s3d-app.is-full {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 48px minmax(0, 1fr) auto clamp(150px, 30svh, 250px);
    grid-template-areas: "bar" "view" "tl" "tools";
  }
  .s3d-app.is-full .s3d-bar { padding: 0 6px 0 14px; gap: 4px; }
  .s3d-app.is-full .s3d-crumb,
  .s3d-app.is-full .s3d-hide-s,
  .s3d-app.is-full .s3d-brand > span,
  .s3d-app.is-full .s3d-tl-hint,
  .s3d-app.is-full .s3d-len > span { display: none; }
  .s3d-app.is-full .pill-btn.s3d-export { min-width: 0; margin-right: 0; }
  .s3d-app.is-full .s3d-view-area { padding: 10px; }
  .s3d-app.is-full .s3d-tools { border-left: 0; border-top: var(--bw) solid var(--line); }
  .s3d-app.is-full .s3d-tabs { padding: 4px 16px 0; gap: 18px; }
  .s3d-app.is-full .s3d-panels { padding: 16px; }
  .s3d-app.is-full .s3d-tl { padding: 6px 0 8px; }
  .s3d-app.is-full .s3d-tl-head { height: 30px; padding: 0 8px; }
  .s3d-app.is-full .s3d-len { display: none; }
  .s3d-app.is-full .s3d-clips { margin-left: auto; }
  .s3d-app.is-full .s3d-clips .s3d-seg-b { padding: 0 8px; }
  .s3d-app.is-full .s3d-tracks { margin: 0 4px; }
  .s3d-app.is-full .s3d-ruler { height: 14px; }
  .s3d-app.is-full .s3d-ruler .k { top: 6px; height: 4px; }
  .s3d-app.is-full .s3d-ruler .k-l { height: 7px; font-size: 9px; line-height: 8px; }
  .s3d-app.is-full .s3d-vtrack,
  .s3d-app.is-full .s3d-trimbox { height: 40px; }
  .s3d-app.is-full .s3d-ctrack,
  .s3d-app.is-full .s3d-wb { height: 18px; line-height: 18px; }
  .s3d-app.is-full .s3d-ctrack { margin-top: 6px; }
  .s3d-app.is-full .s3d-wb { font-size: 10px !important; }
  .s3d-app.is-full .s3d-styles { gap: 8px; }
  .s3d-app.is-full .s3d-style { height: 58px; padding: 9px 10px 0 !important; }
  .s3d-app.is-full .s3d-seg { gap: 8px; }
  .s3d-app.is-full .s3d-filters { gap: 8px; }
  .s3d-app .s3d-input { font-size: 16px; }
  .s3d-card h3 { font-size: 20px; }
}

/* ---------------------------------------------------------------- phone, landscape */
@media (max-height: 520px) and (orientation: landscape) {
  .s3d-app.is-full {
    grid-template-columns: minmax(0, 1fr) clamp(280px, 40vw, 420px);
    grid-template-rows: 44px minmax(0, 1fr) auto;
  }
  .s3d-app.is-full .s3d-crumb,
  .s3d-app.is-full .s3d-tl-hint,
  .s3d-app.is-full .s3d-len > span { display: none; }
  .s3d-app.is-full .s3d-view-area { padding: 8px; }
  .s3d-app.is-full .s3d-tabs { padding: 4px 16px 0; gap: 18px; }
  .s3d-app.is-full .s3d-panels { padding: 14px 16px; }
  .s3d-app.is-full .s3d-tl { padding: 4px 0 6px; }
  .s3d-app.is-full .s3d-tl-head { height: 28px; padding: 0 8px; }
  .s3d-app.is-full .s3d-ruler { height: 14px; }
  .s3d-app.is-full .s3d-ruler .k { top: 6px; height: 4px; }
  .s3d-app.is-full .s3d-ruler .k-l { height: 7px; font-size: 9px; line-height: 8px; }
  .s3d-app.is-full .s3d-vtrack,
  .s3d-app.is-full .s3d-trimbox { height: 34px; }
  .s3d-app.is-full .s3d-ctrack,
  .s3d-app.is-full .s3d-wb { height: 16px; line-height: 16px; }
  .s3d-app.is-full .s3d-ctrack { margin-top: 4px; }
  .s3d-app.is-full .s3d-wb { font-size: 10px !important; }
  .s3d-app .s3d-input { font-size: 16px; }
  .s3d-top { padding-top: max(var(--sp-3), env(safe-area-inset-top)); }
  .s3d-bottom { padding-bottom: max(var(--sp-3), env(safe-area-inset-bottom)); }
}

/* While the try's editor is open, the Meta notice (meta-pixel.js) waits: on a phone it covered the tools and the timeline.
   Nothing reaches Meta before «Aceptar», and the notice is back as soon as the editor closes. */
html:has(.s3d-app:not([hidden])) .vm-note { display: none !important; }
