/* StickerSónico — estilos */
:root {
  --bg: #06100c;
  --bg-soft: #0a1712;
  --panel: #0d1d16;
  --panel-2: #11251c;
  --panel-3: #162d22;
  --line: rgba(149, 255, 194, 0.12);
  --line-strong: rgba(149, 255, 194, 0.24);
  --text: #eafff2;
  --muted: #93b3a4;
  --muted-2: #6f8f80;
  --green: #25d366;
  --green-deep: #12a94f;
  --lime: #8bf7b2;
  --mint: #c8ffe0;
  --danger: #ff6b6b;
  --amber: #ffc861;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --radius: 22px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --font: "Segoe UI", "Inter", "SF Pro Display", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 520px at 82% -8%, rgba(37, 211, 102, 0.16), transparent 65%),
    radial-gradient(700px 500px at 8% 8%, rgba(79, 224, 178, 0.08), transparent 60%),
    linear-gradient(180deg, #07120d 0%, #06100c 55%, #050c09 100%);
}

.page-glow {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.5;
}

.glow-one {
  width: 460px;
  height: 460px;
  right: -140px;
  top: 220px;
  background: rgba(37, 211, 102, 0.18);
}

.glow-two {
  width: 380px;
  height: 380px;
  left: -160px;
  top: 760px;
  background: rgba(255, 196, 97, 0.08);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img,
video,
canvas {
  display: block;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.hide-small {
  display: inline-flex;
}

/* ---------- Barra superior ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(6, 16, 12, 0.72);
  border-bottom: 1px solid rgba(149, 255, 194, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #04130b;
  background: linear-gradient(140deg, var(--mint), var(--green) 55%, #0fa54e);
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.32);
}

.brand-mark svg {
  width: 26px;
  height: 26px;
}

.brand-mark.small {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  box-shadow: none;
}

.brand-mark.small svg {
  width: 18px;
  height: 18px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 19px;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.brand-text strong span {
  color: var(--lime);
}

.brand-text small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 3px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(13, 29, 22, 0.9);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.status-chip:hover {
  border-color: var(--line-strong);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 200, 97, 0.12);
  animation: pulse 2s ease-in-out infinite;
}

.status-chip[data-state="connected"] {
  color: var(--mint);
  border-color: rgba(37, 211, 102, 0.35);
  background: rgba(18, 169, 79, 0.12);
}

.status-chip[data-state="connected"] .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.16);
  animation: none;
}

.status-chip[data-state="disconnected"] .status-dot,
.status-chip[data-state="error"] .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.14);
  animation: none;
}

/* ---------- Botones ---------- */

.btn {
  --btn-bg: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 13px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--text);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s;
  white-space: nowrap;
  user-select: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.99);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-sm {
  min-height: 38px;
  padding: 0 15px;
  font-size: 13px;
  border-radius: 10px;
}

.btn-xs {
  min-height: 30px;
  padding: 0 11px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  color: #03150b;
  background: linear-gradient(135deg, var(--mint), var(--green) 58%, #16b857);
  box-shadow: 0 14px 34px rgba(37, 211, 102, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-primary:hover {
  box-shadow: 0 18px 40px rgba(37, 211, 102, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-secondary {
  background: rgba(37, 211, 102, 0.1);
  border-color: rgba(37, 211, 102, 0.3);
  color: var(--mint);
}

.btn-secondary:hover {
  background: rgba(37, 211, 102, 0.18);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
}

.btn-whatsapp {
  color: #fff;
  background: linear-gradient(135deg, #1fbe5c, #0c8f45);
  box-shadow: 0 14px 30px rgba(12, 143, 69, 0.32);
}

.btn-whatsapp:hover {
  box-shadow: 0 18px 36px rgba(12, 143, 69, 0.42);
}

.btn-danger {
  background: rgba(255, 107, 107, 0.12);
  border-color: rgba(255, 107, 107, 0.35);
  color: #ffb3b3;
}

.btn-mic {
  background: rgba(255, 200, 97, 0.1);
  border-color: rgba(255, 200, 97, 0.3);
  color: var(--amber);
}

.btn-label {
  display: inline-block;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: currentColor;
  animation: spin 0.7s linear infinite;
}

.btn-whatsapp .btn-spinner {
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.icon-btn:hover {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.08);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--lime);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(139, 247, 178, 0.35);
  text-underline-offset: 4px;
}

.link-button:hover {
  text-decoration-color: var(--lime);
}

/* ---------- Estructura ---------- */

.page {
  width: min(1240px, calc(100% - 2 * clamp(18px, 4vw, 48px)));
  margin: 0 auto;
  padding-bottom: 70px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lime);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.14);
  animation: pulse 2.4s ease-in-out infinite;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: clamp(46px, 7vw, 86px) 0 clamp(34px, 5vw, 60px);
}

.hero-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(46px, 6.6vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 850;
}

.gradient-text {
  background: linear-gradient(100deg, var(--mint) 0%, var(--green) 45%, #b8f36d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 30px rgba(37, 211, 102, 0.22));
}

.hero-copy p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(15.5px, 1.6vw, 18px);
  line-height: 1.65;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-pills span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(13, 29, 22, 0.6);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.demo-phone {
  position: relative;
  width: min(310px, 100%);
  border-radius: 34px;
  padding: 12px;
  background: linear-gradient(160deg, #1a3328, #0a1712 60%);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: rotate(1.5deg);
}

.demo-phone::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 28px;
  border: 1px solid rgba(149, 255, 194, 0.07);
  pointer-events: none;
}

.demo-top {
  display: flex;
  gap: 5px;
  padding: 4px 10px 10px;
}

.demo-top span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(149, 255, 194, 0.22);
}

.demo-top span:first-child {
  background: var(--green);
}

.demo-chat {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 340px;
  padding: 14px 12px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(37, 211, 102, 0.07), transparent 45%),
    #08130e;
  border: 1px solid rgba(149, 255, 194, 0.06);
}

.demo-bubble {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #dcf8e9;
}

.demo-bubble.incoming {
  align-self: flex-start;
  background: #12271d;
  border-bottom-left-radius: 4px;
}

.demo-bubble.outgoing {
  align-self: flex-end;
  background: #0f5c34;
  border-bottom-right-radius: 4px;
}

.demo-sticker {
  position: relative;
  align-self: center;
  display: grid;
  place-items: center;
  width: 148px;
  height: 148px;
  margin: 4px 0;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 40%, rgba(139, 247, 178, 0.24), transparent 62%),
    linear-gradient(150deg, #173828, #0a1c13);
  border: 1px solid rgba(139, 247, 178, 0.2);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.4);
  animation: floaty 5s ease-in-out infinite;
}

.demo-face {
  font-size: 56px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

.demo-wave {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 26px;
}

.demo-wave i {
  width: 4px;
  height: var(--h, 40%);
  border-radius: 3px;
  background: linear-gradient(180deg, var(--lime), var(--green));
  opacity: 0.9;
  animation: wave 1.3s ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * 1ms);
}

.demo-wave i:nth-child(2n) {
  animation-delay: 0.2s;
}
.demo-wave i:nth-child(3n) {
  animation-delay: 0.4s;
}
.demo-wave i:nth-child(4n) {
  animation-delay: 0.6s;
}

.demo-sound {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(4, 18, 11, 0.72);
  border: 1px solid rgba(139, 247, 178, 0.35);
  font-size: 12px;
}

.demo-input {
  margin-top: 10px;
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(149, 255, 194, 0.08);
  color: var(--muted-2);
  font-size: 12px;
}

.float-badge {
  position: absolute;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(13, 32, 24, 0.92);
  border: 1px solid var(--line-strong);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
  color: var(--mint);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  animation: floaty 6s ease-in-out infinite;
}

.badge-a {
  top: 40px;
  left: 0;
  transform: rotate(-3deg);
}

.badge-b {
  bottom: 58px;
  right: 0;
  color: var(--amber);
  animation-delay: 1.2s;
  transform: rotate(2deg);
}

/* ---------- Tarjeta de conexión ---------- */

.connect-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin: 12px 0 clamp(34px, 5vw, 54px);
  padding: clamp(20px, 3vw, 30px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(600px 220px at 0% 0%, rgba(37, 211, 102, 0.09), transparent 70%),
    rgba(13, 29, 22, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.connect-card[data-state="connected"] {
  border-color: rgba(37, 211, 102, 0.3);
  background:
    radial-gradient(600px 220px at 0% 0%, rgba(37, 211, 102, 0.14), transparent 70%),
    rgba(13, 29, 22, 0.8);
}

.connect-main {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.connect-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  flex: none;
  border-radius: 18px;
  font-size: 26px;
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.24);
}

.connect-copy {
  min-width: 0;
}

.connect-kicker {
  display: block;
  color: var(--lime);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.connect-copy h2 {
  margin: 5px 0 7px;
  font-size: clamp(21px, 2.4vw, 26px);
  letter-spacing: -0.02em;
}

.connect-copy > p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.connected-details {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.connected-number {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.24);
  color: var(--mint);
  font-size: 13px;
  font-weight: 700;
}

.pairing-box {
  margin-top: 14px;
}

.pair-form {
  display: flex;
  gap: 9px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.pair-form input {
  flex: 1 1 240px;
  max-width: 340px;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(4, 12, 8, 0.6);
  color: var(--text);
  outline: none;
  font-size: 14px;
}

.pair-form input:focus {
  border-color: rgba(37, 211, 102, 0.5);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.12);
}

.pair-code-result {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px dashed rgba(139, 247, 178, 0.35);
  background: rgba(37, 211, 102, 0.06);
  font-size: 13px;
  color: var(--muted);
}

.pair-code-result strong {
  color: var(--mint);
  font-size: 22px;
  letter-spacing: 0.16em;
  font-family: "Consolas", monospace;
}

.pair-code-result small {
  flex-basis: 100%;
  color: var(--muted-2);
  font-size: 12px;
}

.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.qr-frame {
  position: relative;
  width: 190px;
  height: 190px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

.qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.qr-frame img:not([src]) {
  visibility: hidden;
}

.spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(7, 17, 13, 0.12);
  border-top-color: #0c8f45;
  animation: spin 0.8s linear infinite;
}

.qr-wrap small {
  color: var(--muted-2);
  font-size: 11px;
  text-align: center;
}

.connect-card[data-state="connected"] .qr-wrap {
  display: none;
}

/* ---------- Estudio ---------- */

.studio {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr 1.05fr;
  gap: clamp(14px, 1.8vw, 22px);
  align-items: start;
}

.panel {
  position: relative;
  padding: clamp(18px, 2.3vw, 26px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(19, 39, 30, 0.92), rgba(10, 22, 16, 0.92));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.panel-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.step-badge {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 10px;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.28);
  color: var(--lime);
  font-size: 14px;
  font-weight: 800;
}

.panel-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.015em;
}

.panel-head p {
  margin: 2px 0 0;
  color: var(--muted-2);
  font-size: 12.5px;
}

/* ---------- Zonas de carga ---------- */

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  border: 1.5px dashed rgba(149, 255, 194, 0.22);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(420px 240px at 50% 0%, rgba(37, 211, 102, 0.06), transparent 70%),
    rgba(5, 14, 10, 0.45);
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden;
  outline: none;
}

.visual-drop {
  width: 100%;
  min-height: 0;
  aspect-ratio: 1 / 1;
  cursor: pointer;
}

.visual-drop.has-visual {
  cursor: grab;
  background-color: #08130e;
  background-image:
    linear-gradient(45deg, rgba(149, 255, 194, 0.045) 25%, transparent 25%, transparent 75%, rgba(149, 255, 194, 0.045) 75%),
    linear-gradient(45deg, rgba(149, 255, 194, 0.045) 25%, transparent 25%, transparent 75%, rgba(149, 255, 194, 0.045) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  touch-action: none;
}

.visual-drop.has-visual.panning {
  cursor: grabbing;
}

.visual-drop.has-visual:focus-visible {
  outline: 2px solid rgba(37, 211, 102, 0.6);
  outline-offset: 3px;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.dragover {
  border-color: rgba(37, 211, 102, 0.6);
  background:
    radial-gradient(420px 240px at 50% 0%, rgba(37, 211, 102, 0.11), transparent 70%),
    rgba(5, 14, 10, 0.6);
}

.visual-drop.has-visual:hover {
  border-color: rgba(37, 211, 102, 0.32);
}

.visual-drop.has-visual.dragover {
  border-style: solid;
}

.dropzone.dragover {
  border-style: solid;
  box-shadow: inset 0 0 0 2px rgba(37, 211, 102, 0.3);
}

.drop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 34px 20px;
  text-align: center;
}

.drop-empty.compact {
  padding: 26px 18px;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 4px;
  border-radius: 18px;
  background: rgba(37, 211, 102, 0.08);
  border: 1px solid rgba(37, 211, 102, 0.18);
  font-size: 26px;
}

.drop-empty strong {
  font-size: 15px;
}

.drop-empty small {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.5;
  max-width: 300px;
}

.drop-empty .btn,
.drop-actions {
  margin-top: 10px;
}

.drop-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.visual-preview {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.editor-source {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  visibility: hidden;
  pointer-events: none;
}

#editorCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.editor-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.editor-grid i {
  position: absolute;
  background: rgba(234, 255, 242, 0.18);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.editor-grid i:nth-child(1) {
  left: 33.333%;
  top: 0;
  bottom: 0;
  width: 1px;
}

.editor-grid i:nth-child(2) {
  left: 66.666%;
  top: 0;
  bottom: 0;
  width: 1px;
}

.editor-grid i:nth-child(3) {
  top: 33.333%;
  left: 0;
  right: 0;
  height: 1px;
}

.editor-grid i:nth-child(4) {
  top: 66.666%;
  left: 0;
  right: 0;
  height: 1px;
}

.editor-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(4, 18, 11, 0.72);
  border: 1px solid rgba(139, 247, 178, 0.22);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  pointer-events: none;
  backdrop-filter: blur(6px);
}

.editor-hint {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  max-width: calc(100% - 20px);
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(4, 18, 11, 0.78);
  border: 1px solid rgba(149, 255, 194, 0.14);
  color: var(--mint);
  font-size: 10.5px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  backdrop-filter: blur(6px);
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(5, 14, 10, 0.4);
}

.file-info-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.file-info-text span {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-info-text small {
  color: var(--muted-2);
  font-size: 11.5px;
}

.file-info-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

/* ---------- Importar desde TikTok ---------- */

.tiktok-import {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(149, 255, 194, 0.12);
  background: rgba(5, 14, 10, 0.28);
}

.tiktok-import-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.tiktok-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tiktok-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(4, 12, 8, 0.5);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tiktok-row input:focus {
  border-color: rgba(37, 211, 102, 0.5);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.tiktok-row input::placeholder {
  color: var(--muted-2);
}

.tiktok-row .btn {
  flex: none;
  white-space: nowrap;
}

.tiktok-status {
  margin-top: 8px;
}

.tiktok-status[data-state="loading"] {
  color: var(--mint);
}

.tiktok-status[data-state="error"] {
  color: #ffb4b4;
}

.tiktok-status[data-state="ok"] {
  color: var(--lime);
}

/* ---------- Editor de encuadre ---------- */

.editor-controls {
  margin-top: 14px;
}

.zoom-row {
  align-items: center;
  margin-top: 0;
}

.zoom-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 180px;
  max-width: 320px;
}

.zoom-control input[type="range"] {
  flex: 1;
  min-width: 90px;
}

.zoom-control b {
  min-width: 38px;
  color: var(--lime);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.zoom-step {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(4, 12, 8, 0.4);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.zoom-step:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(37, 211, 102, 0.08);
}

.zoom-step:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

input[type="range"]:disabled {
  opacity: 0.4;
}

.editor-note {
  margin-top: 10px;
}

.fit-row {
  margin-top: 12px;
}

/* ---------- Campos ---------- */

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.field-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(4, 12, 8, 0.5);
  gap: 2px;
}

.seg-btn {
  padding: 7px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-2);
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.18s, color 0.18s;
}

.seg-btn:hover {
  color: var(--text);
}

.seg-btn.active {
  background: rgba(37, 211, 102, 0.16);
  color: var(--mint);
  box-shadow: inset 0 0 0 1px rgba(37, 211, 102, 0.22);
}

.check-row {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(5, 14, 10, 0.35);
  cursor: pointer;
}

.check-row input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--green);
  flex: none;
}

.check-row span {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.check-row strong {
  font-size: 13px;
}

.check-row small {
  color: var(--muted-2);
  font-size: 11.5px;
}

/* ---------- Audio ---------- */

.audio-drop {
  min-height: 120px;
}

.audio-editor {
  padding: 14px;
}

.audio-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.play-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(140deg, var(--mint), var(--green));
  color: #04130b;
  font-size: 13px;
  padding-left: 2px;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.25);
  transition: transform 0.15s;
}

.play-btn:hover {
  transform: scale(1.06);
}

.play-btn.playing {
  padding-left: 0;
}

.audio-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.audio-title strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-title small {
  color: var(--muted-2);
  font-size: 11.5px;
}

.wave-wrap {
  position: relative;
  height: 84px;
  margin: 14px 0 10px;
  border-radius: 10px;
  background: rgba(4, 12, 8, 0.5);
  border: 1px solid rgba(149, 255, 194, 0.08);
  overflow: hidden;
  cursor: pointer;
}

.wave-wrap canvas {
  width: 100%;
  height: 100%;
}

.trim-controls {
  display: grid;
  gap: 12px;
}

.trim-controls label {
  display: grid;
  gap: 5px;
}

.trim-controls label span {
  display: flex;
  justify-content: space-between;
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 600;
}

.trim-controls label b {
  color: var(--lime);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  width: 100%;
  height: 5px;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37, 211, 102, 0.55), rgba(149, 255, 194, 0.15));
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--mint);
  border: 3px solid #0c8f45;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  cursor: grab;
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--mint);
  border: 3px solid #0c8f45;
  cursor: grab;
}

.trim-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.2);
  color: var(--mint);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.notice {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  padding: 10px 13px;
  border-radius: 10px;
  background: rgba(255, 200, 97, 0.07);
  border: 1px solid rgba(255, 200, 97, 0.2);
  color: #ffd895;
  font-size: 12px;
}

.video-audio-panel {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(37, 211, 102, 0.2);
  background: rgba(37, 211, 102, 0.045);
}

.video-audio-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.va-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.26);
  font-size: 17px;
}

.va-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.va-copy strong {
  font-size: 13px;
}

.va-copy small {
  color: var(--muted-2);
  font-size: 11.5px;
}

.video-audio-head .btn {
  flex: none;
}

.video-audio-panel .trim-controls {
  margin-top: 14px;
}

.source-switch {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(5, 14, 10, 0.35);
}

.source-switch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.source-segmented {
  display: flex;
  width: 100%;
}

.source-segmented .seg-btn {
  flex: 1;
}

.duration-chips {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.duration-chip {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(4, 12, 8, 0.4);
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 700;
  transition: border-color 0.16s, color 0.16s, background 0.16s;
}

.duration-chip:hover,
.duration-chip:focus-visible {
  border-color: rgba(37, 211, 102, 0.42);
  background: rgba(37, 211, 102, 0.09);
  color: var(--mint);
}



.record-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 11px;
  background: rgba(255, 107, 107, 0.07);
  border: 1px solid rgba(255, 107, 107, 0.28);
  color: #ffc2c2;
  font-size: 13px;
}

.record-status .rec-dot {
  background: var(--danger);
  animation: pulse 1s ease-in-out infinite;
}

.record-status #recordTimer {
  font-family: "Consolas", monospace;
  font-size: 15px;
  color: #fff;
}

.record-status .btn {
  margin-left: auto;
}

.rec-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: #ffb4a4;
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.16);
}

.hint {
  margin: 14px 0 0;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.55;
}

/* ---------- Panel de envío ---------- */

.panel-send {
  display: flex;
  flex-direction: column;
}

.preview-box {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background:
    radial-gradient(360px 240px at 50% 0%, rgba(37, 211, 102, 0.07), transparent 70%),
    rgba(4, 12, 8, 0.45);
  padding: 16px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.preview-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  color: var(--muted-2);
}

.preview-placeholder {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin-bottom: 6px;
  border-radius: 22px;
  background: rgba(37, 211, 102, 0.06);
  border: 1px dashed rgba(37, 211, 102, 0.28);
  font-size: 32px;
}

.preview-empty strong {
  color: var(--muted);
  font-size: 14px;
}

.preview-empty small {
  font-size: 11.5px;
}

.preview-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.preview-ready {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--mint);
  font-size: 11.5px;
  font-weight: 700;
}

.preview-ready i {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.12);
}

.preview-ready.is-stale {
  color: #ffd895;
}

.preview-ready.is-stale i {
  background: #ffc861;
  box-shadow: 0 0 0 4px rgba(255, 200, 97, 0.12);
}

.preview-ready.is-offline {
  color: var(--muted);
}

.preview-ready.is-offline i {
  background: var(--muted-2);
  box-shadow: 0 0 0 4px rgba(147, 179, 164, 0.12);
}

.preview-stage {
  position: relative;
  width: min(190px, 100%);
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: #08130e;
  border: 1px solid rgba(149, 255, 194, 0.14);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.preview-stage:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

.preview-stage-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(3, 12, 7, 0);
  color: #fff;
  font-size: 24px;
  opacity: 0;
  transition: opacity 0.18s, background 0.18s;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

.preview-stage:hover .preview-stage-play,
.preview-stage:focus-visible .preview-stage-play,
.preview-stage.playing .preview-stage-play {
  opacity: 1;
  background: rgba(3, 12, 7, 0.24);
}

.preview-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-sound {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: rgba(4, 18, 11, 0.72);
  border: 1px solid rgba(139, 247, 178, 0.35);
  font-size: 11px;
}

.preview-player {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.preview-player .play-btn {
  width: 32px;
  height: 32px;
  font-size: 11px;
}

.mini-progress {
  position: relative;
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(149, 255, 194, 0.12);
  overflow: hidden;
}

.mini-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--lime));
  transition: width 0.1s linear;
}

#previewTime {
  color: var(--muted-2);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.stale-note {
  width: 100%;
  padding: 8px 11px;
  border-radius: 9px;
  background: rgba(255, 200, 97, 0.08);
  border: 1px solid rgba(255, 200, 97, 0.24);
  color: #ffd895;
  font-size: 11.5px;
  text-align: center;
}

.emoji-field {
  margin-top: 16px;
}

.emoji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.emoji-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(4, 12, 8, 0.4);
  font-size: 18px;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}

.emoji-btn:hover {
  transform: translateY(-2px);
  background: rgba(37, 211, 102, 0.08);
}

.emoji-btn.active {
  border-color: rgba(37, 211, 102, 0.55);
  background: rgba(37, 211, 102, 0.14);
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.12);
}

.input-field {
  display: block;
  margin-top: 14px;
}

.input-field > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.input-field input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(4, 12, 8, 0.5);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field input:focus {
  border-color: rgba(37, 211, 102, 0.5);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.input-field input::placeholder {
  color: var(--muted-2);
}

.target-row {
  margin-top: 16px;
}

.send-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 18px;
}

.create-summary {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(37, 211, 102, 0.18);
  background: rgba(37, 211, 102, 0.06);
  color: var(--mint);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.45;
}

.sent-success {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 12px;
  background: rgba(37, 211, 102, 0.09);
  border: 1px solid rgba(37, 211, 102, 0.28);
}

.sent-check {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  color: #03150b;
  font-size: 14px;
  font-weight: 900;
}

.sent-success div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sent-success strong {
  font-size: 14px;
  color: var(--mint);
}

.sent-success small {
  color: var(--muted);
  font-size: 11.5px;
}

.sent-success a {
  margin-top: 4px;
  color: var(--lime);
  font-size: 12px;
  font-weight: 700;
}

.sent-success a:hover {
  text-decoration: underline;
}

.disclaimer-mini {
  margin: 12px 0 0;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.5;
}

/* ---------- Historial ---------- */

.history-section {
  margin-top: clamp(42px, 6vw, 70px);
  padding-top: clamp(26px, 4vw, 40px);
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 5px 0 4px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--muted-2);
  font-size: 13px;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.history-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(13, 29, 22, 0.7);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.history-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.history-thumb {
  position: relative;
  aspect-ratio: 1;
  background: #08130e;
  overflow: hidden;
}

.history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-sound {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(4, 18, 11, 0.72);
  border: 1px solid rgba(139, 247, 178, 0.32);
  font-size: 11px;
}

.history-play {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(149, 255, 194, 0.24);
  background: rgba(4, 18, 11, 0.78);
  color: var(--mint);
  font-size: 10.5px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.history-play:hover {
  background: rgba(12, 143, 69, 0.55);
}

.history-body {
  padding: 11px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.history-body strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-body small {
  color: var(--muted-2);
  font-size: 11px;
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.history-actions .btn {
  flex: 1;
}

.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 42px 20px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line);
  color: var(--muted-2);
  text-align: center;
  font-size: 13px;
}

.history-empty span {
  font-size: 30px;
}

.history-empty p {
  margin: 0;
}

/* ---------- Pie ---------- */

.footer {
  width: min(1240px, calc(100% - 2 * clamp(18px, 4vw, 48px)));
  margin: 0 auto;
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.65;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.footer p {
  margin: 0 0 8px;
  max-width: 860px;
}

.footer-warning {
  color: #b69b6b;
}

/* ---------- Avisos ---------- */

.toast-root {
  position: fixed;
  z-index: 90;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: min(380px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  background: rgba(13, 32, 24, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  backdrop-filter: blur(14px);
  animation: toastIn 0.28s ease both;
  pointer-events: auto;
}

.toast::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.16);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: var(--lime);
  font-size: 11px;
  font-weight: 900;
}

.toast[data-type="error"] {
  border-color: rgba(255, 107, 107, 0.4);
}

.toast[data-type="error"]::before {
  content: "!";
  background: rgba(255, 107, 107, 0.14);
  border-color: rgba(255, 107, 107, 0.4);
  color: #ff9d9d;
}

.toast[data-type="info"]::before {
  content: "i";
  background: rgba(255, 200, 97, 0.14);
  border-color: rgba(255, 200, 97, 0.35);
  color: var(--amber);
}

.toast.leaving {
  animation: toastOut 0.24s ease both;
}

/* ---------- Animaciones ---------- */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

@keyframes wave {
  0%,
  100% {
    transform: scaleY(0.7);
  }
  50% {
    transform: scaleY(1.15);
  }
}

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

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Adaptación ---------- */

@media (max-width: 1080px) {
  .studio {
    grid-template-columns: 1fr 1fr;
  }

  .panel-send {
    grid-column: 1 / -1;
  }

  .panel-send .preview-content {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .panel-send .preview-head {
    flex: 0 0 100%;
  }

  .panel-send .preview-stage {
    width: 150px;
    flex: none;
  }

  .panel-send .preview-player {
    width: auto;
    flex: 1 1 180px;
  }

  .panel-send .preview-meta,
  .panel-send .stale-note {
    width: 100%;
  }

  .panel-send .preview-box {
    min-height: 0;
  }

  .history-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-copy p {
    max-width: 640px;
  }

  .hero-art {
    display: none;
  }

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

  .qr-wrap {
    justify-self: start;
  }

  .qr-frame {
    width: 168px;
    height: 168px;
  }
}

@media (max-width: 720px) {
  .studio {
    grid-template-columns: 1fr;
  }

  .panel-send .preview-content {
    flex-direction: column;
    align-items: center;
  }

  .panel-send .preview-head,
  .panel-send .preview-player {
    flex: none;
    width: 100%;
  }

  .panel-send .preview-stage {
    width: min(190px, 100%);
  }

  .topbar {
    padding: 11px 16px;
  }

  .hide-small {
    display: none;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .connect-main {
    flex-direction: column;
    gap: 12px;
  }

  .connect-icon {
    width: 50px;
    height: 50px;
    font-size: 22px;
  }

  .visual-drop {
    min-height: 270px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .history-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
}

@media (max-width: 420px) {
  .status-chip {
    padding: 8px 11px;
    font-size: 12px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .segmented {
    width: 100%;
  }

  .seg-btn {
    flex: 1;
    text-align: center;
  }
}

/* ---------- Auth ---------- */
.auth-screen {
  min-height: calc(100vh - 80px);
  display: grid;
  place-items: center;
  padding: 32px 16px 60px;
}
.auth-card {
  width: min(100%, 460px);
  background: linear-gradient(180deg, rgba(18, 45, 31, 0.88), rgba(10, 26, 18, 0.94));
  border: 1px solid rgba(140, 255, 170, 0.12);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.auth-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; }
.auth-brand h1 { margin: 0; font-size: 2rem; line-height: 1; }
.auth-brand h1 span, .brand-text strong span { color: #7CFF9B; }
.auth-brand p { margin: 6px 0 0; color: var(--muted); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.auth-tab {
  border: 1px solid rgba(140,255,170,.14); background: rgba(255,255,255,.03); color: var(--text);
  padding: 11px 14px; border-radius: 12px; cursor: pointer; font-weight: 700;
}
.auth-tab.active { background: rgba(124,255,155,.14); border-color: rgba(124,255,155,.28); color: #dfffea; }
.auth-form { display: grid; gap: 10px; }
.auth-form .btn { margin-top: 8px; }
.text-input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(140,255,170,.14);
  background: rgba(4, 14, 10, 0.45); color: var(--text); font: inherit;
}
.text-input:focus { outline: 2px solid rgba(124,255,155,.35); border-color: rgba(124,255,155,.35); }
.text-input[readonly] { opacity: .75; }
.form-error {
  margin: 4px 0 0; padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 90, 90, .12); color: #ffb8b8; font-size: .92rem;
}
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-badge {
  padding: 8px 12px; border-radius: 999px; background: rgba(124,255,155,.1);
  border: 1px solid rgba(124,255,155,.16); color: #dfffea; font-size: .85rem; font-weight: 700;
}

/* ---------- Auth modal ---------- */
.auth-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; }
.auth-modal-backdrop { position: absolute; inset: 0; background: rgba(2, 8, 5, .66); backdrop-filter: blur(6px); }
.auth-modal-card { position: relative; width: min(100%, 460px); max-height: calc(100vh - 40px); overflow: auto; }
.auth-close { position: absolute; top: 14px; right: 14px; }
.hero-actions { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Scrollbar ---------- */
:root {
  --scroll-thumb: rgba(124, 255, 155, 0.28);
  --scroll-thumb-hover: rgba(124, 255, 155, 0.45);
  --scroll-track: rgba(255, 255, 255, 0.04);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--scroll-track); border-radius: 999px; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--scroll-thumb-hover), var(--scroll-thumb));
  border-radius: 999px;
  border: 2px solid rgba(7, 17, 13, 0.9);
}
*::-webkit-scrollbar-thumb:hover { background: rgba(124, 255, 155, 0.55); }
*::-webkit-scrollbar-corner { background: transparent; }
