/* ==========================================================================
   MousyTools — Official Studio Pro Toolkit CSS (v7.0)
   100% Identical Visual Fidelity to Image Studio, AVIF Converter & Upscale IA.
   Dark OLED (#000000) · Glassmorphism 2.0 · Violet/Lavender Neon (#55378e, #bda0e2)
   ========================================================================== */

:root {
  /* ── Superficies (Night OLED Puro) ── */
  --bg-base: #000000;
  --bg-surface: #0a0a0a;
  --bg-surface-elevated: #0f0e16;
  --bg-subtle: #161424;
  --bg-hover: #1c1830;

  /* ── Bordes y Líneas Especulares ── */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 255, 255, 0.18);
  --border-brand: rgba(143, 108, 199, 0.4);
  --border-focus: #8f6cc7;
  --border-specular: rgba(255, 255, 255, 0.18);

  /* ── Escala Púrpura de Marca Oficial (Mousy Dev) ── */
  --brand-100: #ede4f8;
  --brand-200: #d7c6ee;
  --brand-300: #bda0e2;
  --lavender: #bda0e2;
  --brand-400: #8f6cc7;
  --brand-500: #55378e;
  --brand: #55378e;
  --brand-light: #8f6cc7;
  --brand-lighter: #bda0e2;
  --brand-600: #472d75;
  --brand-700: #38215c;
  --brand-800: #271744;
  --primary: #55378e;
  --primary-hover: #8f6cc7;
  --primary-glow: rgba(85, 55, 142, 0.5);

  /* ── Acentos y Señalización ── */
  --emerald: #34d399;
  --amber: #fbbf24;
  --rose: #f43f5e;
  --cyan: #06b6d4;
  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
  --danger: #ef4444;
  --warning: #f59e0b;

  /* ── Tipografía y Texto ── */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #94a3b8;
  --dim: #94a3b8;
  --text: #f8fafc;
  --muted: #94a3b8;

  --font-ui: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sans: var(--font-ui);
  --font-display: 'Unbounded', 'Space Grotesk', system-ui, sans-serif;
  --display: var(--font-display);
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --mono: var(--font-mono);

  /* ── Curvas, Sombras y Geometría ── */
  /* Escala tomada de tools/imagen-studio/style.css (6 / 8 / 12 / full) para que
     las 16 herramientas compartan la misma geometría. Antes esta escala era
     6 / 10 / 14 / 18 y las tarjetas quedaban visiblemente más redondeadas que
     en el resto del sitio. */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius: 12px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  --ease-mousy: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --header-height: 56px;
  --footer-height: 28px;

  /* ── Glassmorphism 2.0 System Tokens (Mousy Dev Core) ── */
  --glass-bg: rgba(13, 17, 26, 0.65);
  --glass-bg-elevated: rgba(18, 24, 38, 0.72);
  --glass-bg-subtle: rgba(255, 255, 255, 0.035);
  --glass-bg-sunken: rgba(5, 7, 11, 0.6);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-border-specular: rgba(255, 255, 255, 0.18);
  --glass-border-hover: rgba(85, 55, 142, 0.45);
  --glass-blur: blur(20px) saturate(180%);
  --glass-blur-heavy: blur(28px) saturate(190%);
  --glass-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.75), inset 0 1px 0 0 rgba(255, 255, 255, 0.14);
  --glass-shadow-hover: 0 26px 55px -12px rgba(0, 0, 0, 0.85), 0 0 32px -5px rgba(85, 55, 142, 0.22), inset 0 1px 0 0 rgba(255, 255, 255, 0.28);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: #000000;
}

body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  background-color: #000000;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar oficial Mousy Dev */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #000000;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8f6cc7, #472d75);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #bda0e2;
}
::selection {
  background: rgba(85, 55, 142, 0.65);
  color: #ffffff;
}

/* ==========================================================================
   APP CONTAINER (Atmósfera Idéntica a Image Studio & AVIF Converter)
   ========================================================================== */
/* El workspace hace scroll de página, no de viewport. Image Studio sí puede
   usar un app shell de altura fija porque su hero ES la zona de arrastre y el
   contenido de abajo son tres panelesPensados para caber en pantalla. Estas
   herramientas tienen un hero grande seguido de una columna larga de tarjetas:
   con height:100vh + overflow:hidden el workbench se quedaba en un resto de
   pocos píxeles con scroll interno, y las tarjetas quedaban cortadas. */
.studio-app {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  position: relative;
  background:
    radial-gradient(620px 620px at 8% -10%, rgba(85, 55, 142, 0.18), transparent 60%),
    radial-gradient(560px 560px at 95% 20%, rgba(85, 55, 142, 0.14), transparent 60%),
    radial-gradient(420px 420px at 40% 110%, rgba(85, 55, 142, 0.15), transparent 60%),
    #000000;
}

.studio-app::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.03;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   STUDIO HEADER (100% Edge-to-Edge Idéntico a Image Studio & AVIF Pro)
   ========================================================================== */
.studio-header {
  height: var(--header-height);
  background: rgba(11, 14, 21, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.02);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 1.25rem !important;
  z-index: 50;
  user-select: none;
  width: 100% !important;
  flex-shrink: 0;
}

.studio-header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.app-brand {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.metaimage-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  max-width: 160px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(189, 160, 226, 0.25));
  transition: filter 0.25s ease, transform 0.25s ease;
}

.metaimage-brand-link:hover .brand-logo-img {
  filter: drop-shadow(0 0 22px rgba(189, 160, 226, 0.6));
  transform: scale(1.02);
}

.brand-studio-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(85, 55, 142, 0.25);
  border: 1px solid rgba(189, 160, 226, 0.45);
  color: #bda0e2;
  text-transform: uppercase;
}

/* Selector de Idioma Oficial */
.lang-switch-wrap {
  margin-left: 6px;
}

.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  padding: 3px 9px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s var(--ease-mousy);
}

.lang-switch-btn:hover {
  border-color: rgba(143, 108, 199, 0.5);
  background: rgba(85, 55, 142, 0.15);
  color: #ffffff;
}

.lang-opt.active {
  color: #bda0e2;
  font-weight: 700;
}

.lang-divider {
  opacity: 0.35;
  font-size: 0.65rem;
}

/* Workspace Pill */
.workspace-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.active-file-text {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  flex-shrink: 0;
}

/* Header Center: Metric Chips */
.header-center {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.metric-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: var(--radius-md);
}

.metric-label {
  color: var(--text-muted);
}

.metric-val {
  font-weight: 600;
  font-family: var(--font-mono);
}

.text-emerald {
  color: #34d399 !important;
}

.text-cyan {
  color: #38bdf8 !important;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ==========================================================================
   WORKBENCH & HERO STRIP (scroll de documento, estética de Image Studio)
   ========================================================================== */
.studio-main {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2.5rem;
  flex: 1;
}

/* Padding compacto. Con el h1 de Image Studio (hasta 3.8rem) y 1.75rem de
   padding arriba y abajo, el hero se comía casi la mitad del viewport. */
.studio-hero-strip {
  text-align: center;
  padding: 1.25rem 1rem 1rem;
  max-width: 860px;
  margin: 0 auto;
}

/* Eyebrow: texto mono suelto, sin píldora. En Image Studio es texto pelado y
   la píldora lo convertía en otro elemento de color, lo que rompía la
   jerarquía: competía con el h1 en lugar de encabezarlo. */
.hero-eyebrow, .mt-kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #bda0e2;
  margin-bottom: 0.6rem;
  display: inline-block;
}

/* Mismo tratamiento que en Image Studio (Unbounded 900, tracking cerrado, luz
   en la línea de acento) pero con el techo en 3rem en vez de 3.8rem: aquí el h1
   va sobre el contenido, no dentro de una zona de arrastre, y con 3.8rem
   desplazaba la herramienta entera fuera de pantalla. */
.drop-hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 0.35rem 0 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hero-line-white {
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.85);
}

.hero-line-accent {
  color: #bda0e2 !important;
  text-shadow: 0 0 25px rgba(189, 160, 226, 0.35) !important;
  filter: drop-shadow(0 0 30px rgba(189, 160, 226, 0.45)) !important;
}

.drop-hero-sub, .mt-hero-sub {
  font-family: var(--font-ui);
  color: #aeb9c9;
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem);
  line-height: 1.6;
  max-width: 56ch;
  margin: 0 auto;
  text-wrap: pretty;
}

/* Grid del Workbench: dos columnas en el flujo normal del documento, sin
   scroll propio. */
.studio-workbench-grid, .mt-grid.side, .mt-grid.two {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 22px;
  width: 100%;
  margin-top: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .studio-workbench-grid, .mt-grid.side, .mt-grid.two {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* ==========================================================================
   STUDIO CARDS (Glassmorphism 2.0 Idéntico a Image Studio)
   ========================================================================== */
.studio-card, .mt-card {
  background: rgba(13, 17, 26, 0.72) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  box-shadow:
    0 20px 45px -15px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  padding: 22px !important;
  margin-bottom: 20px !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease !important;
}

.studio-card:hover, .mt-card:hover {
  border-color: rgba(143, 108, 199, 0.45) !important;
  box-shadow:
    0 26px 55px -12px rgba(0, 0, 0, 0.85),
    0 0 32px -5px rgba(85, 55, 142, 0.22),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.25) !important;
}

.mt-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.mt-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.015em;
  margin: 0;
}

/* Barra Terminal macOS */
.tool-card__terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  margin: -22px -22px 18px -22px;
  background: rgba(6, 8, 14, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px 13px 0 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span, .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red, .dot--red { background: #ff5f56; }
.dot-yellow, .dot--yellow { background: #ffbd2e; }
.dot-green, .dot--green { background: #27c93f; }

.terminal-slug {
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.terminal-status, .terminal-status-pill {
  color: #34d399;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ==========================================================================
   TABS & SEGMENTED CONTROLS (Pills Idénticos a Image Studio Mode Switch)
   ========================================================================== */
.mt-tabs, .sidebar-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(6, 8, 14, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 4px;
  border-radius: 11px;
  margin-bottom: 20px;
}

.mt-tab {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.mt-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.mt-tab.active {
  background: linear-gradient(180deg, #55378e 0%, #38215c 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(143, 108, 199, 0.5) !important;
  border-top: 1px solid rgba(189, 160, 226, 0.75) !important;
  box-shadow: 0 4px 14px rgba(85, 55, 142, 0.45) !important;
}

.mt-pane {
  display: none;
}

.mt-pane.active {
  display: block;
}

/* ==========================================================================
   BUTTONS (Botón Neón con Light Sweep Oficial + Botones Ghost & Secondary)
   ========================================================================== */
.btn-neon, .mt-btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.75rem 1.6rem;
  border-radius: 12px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.92rem;
  color: #ffffff !important;
  background: linear-gradient(180deg, #55378e 0%, #38215c 100%) !important;
  border: 1px solid rgba(143, 108, 199, 0.5) !important;
  border-top: 1px solid rgba(189, 160, 226, 0.8) !important;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.6),
    0 8px 25px -6px rgba(139, 92, 246, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer;
  overflow: hidden;
  user-select: none;
  text-decoration: none;
}

.btn-neon::after, .mt-btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.22),
    transparent
  );
  transform: skewX(-25deg);
  transition: left 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.btn-neon:hover, .mt-btn-primary:hover {
  background: linear-gradient(180deg, #8f6cc7 0%, #472d75 100%) !important;
  border-color: #bda0e2 !important;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.6),
    0 12px 32px -4px rgba(139, 92, 246, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  transform: translateY(-2px);
  color: #ffffff !important;
}

.btn-neon:hover::after, .mt-btn-primary:hover::after {
  left: 160%;
}

.btn-neon:active, .mt-btn-primary:active {
  transform: scale(0.97) translateY(0) !important;
}

.btn-ghost, .btn-secondary, .mt-btn:not(.mt-btn-primary):not(.btn-neon) {
  background: rgba(255, 255, 255, 0.04) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  padding: 8px 15px !important;
  font-size: 0.85rem !important;
  font-family: var(--font-ui) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
  user-select: none !important;
}

.btn-ghost:hover, .btn-secondary:hover, .mt-btn:not(.mt-btn-primary):not(.btn-neon):hover {
  border-color: #bda0e2 !important;
  background: rgba(85, 55, 142, 0.18) !important;
  color: #ffffff !important;
}

.btn-sm, .mt-btn-sm {
  padding: 5px 11px !important;
  font-size: 0.78rem !important;
  border-radius: 8px !important;
}

.btn-ghost:active, .btn-secondary:active, .mt-btn:active {
  transform: scale(0.97);
}

.mt-btn-row, .mt-out-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

/* ==========================================================================
   INPUTS & FORMS (Dark Glassmorphism Idéntico a Image Studio)
   ========================================================================== */
.mt-field {
  margin-bottom: 16px;
}

.mt-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
  font-family: var(--font-ui);
}

.mt-counter {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.mt-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mt-input, .mt-textarea, .mt-select,
input[type="text"], input[type="number"], input[type="url"], input[type="email"], select, textarea {
  background: rgba(5, 7, 11, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  color: #f8fafc !important;
  font-family: var(--font-mono) !important;
  font-size: 0.88rem !important;
  padding: 10px 14px !important;
  transition: all 0.2s ease !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
  width: 100%;
}

.mt-input:focus, .mt-textarea:focus, .mt-select:focus,
input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: #8f6cc7 !important;
  box-shadow: 0 0 0 3px rgba(143, 108, 199, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
  background: rgba(8, 10, 16, 0.95) !important;
}

/* ── Color Pickers ── */
input[type="color"].mt-input,
input[type="color"].mt-input-color,
.mt-input[type="color"],
input[type="color"] {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background: #0d111a !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 10px !important;
  padding: 4px !important;
  cursor: pointer !important;
  height: 42px !important;
  width: 52px !important;
  min-width: 52px !important;
  flex: 0 0 52px !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

input[type="color"]:hover {
  border-color: #8f6cc7 !important;
  box-shadow: 0 0 12px rgba(143, 108, 199, 0.35) !important;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0 !important;
  border-radius: 6px !important;
}

input[type="color"]::-webkit-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 6px !important;
}

input[type="color"]::-moz-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 6px !important;
}

.mt-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.45;
}

.mt-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.mt-badge.ok, .mt-badge.success {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.35);
  color: #34d399;
}

.mt-badge.info {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.35);
  color: #38bdf8;
}

.mt-badge.warn {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.mt-badge.err, .mt-badge.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

/* Código & Monospace Blocks */
.mt-pre, pre.mt-pre, .mt-mono {
  background: #05060a !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  padding: 14px !important;
  color: #e2e8f0 !important;
  font-family: var(--font-mono) !important;
  font-size: 0.84rem !important;
  line-height: 1.6 !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6) !important;
  overflow-x: auto;
}

.mt-hr {
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 16px 0;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   COMPONENTES COMPLEMENTARIOS
   Estas clases se usaban en el markup y en los app.js de las 9 herramientas
   de developer, pero no estaban definidas en ningún archivo de estilos.
   Sin ellas, todos los paneles de error/aviso se renderizaban como texto
   pelado y los avisos (toast) eran invisibles.
   ========================================================================== */

/* Alias de severidad: el JS de las herramientas usaba "bad", el CSS solo
   definía "err"/"error". Sin este alias, "Invalid signature" (JWT) y
   "Blocked" (robots-ia) se renderizaban igual que su placeholder neutro. */
.mt-badge.bad, .mt-badge.danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.mt-counter.bad {
  color: #f87171;
}

.mt-counter.warn {
  color: #fbbf24;
}

.mt-counter.ok {
  color: #34d399;
}

/* Panel de nota / aviso / error. Es el contenedor de los bloques de
   validación de contraste, meta tags, robots.txt, llms.txt, cron y JWT. */
.mt-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
  margin-bottom: 8px;
}

.mt-note:last-child {
  margin-bottom: 0;
}

.mt-note.ok, .mt-note.success {
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.3);
  color: #6ee7b7;
}

.mt-note.info {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.3);
  color: #7dd3fc;
}

.mt-note.warn, .mt-note.warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

.mt-note.bad, .mt-note.err, .mt-note.error {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* Texto secundario. Antes heredaba el tamaño del body (1rem) y rompía el
   ritmo de las tarjetas de cron, JWT, cURL y MCP. */
.mt-small {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.mt-small strong {
  color: var(--text-secondary);
  font-weight: 600;
}

/* Fila de checkbox. Necesita reset porque el regla global de toolkit para
   `input` la convertía en un campo de texto a ancho completo. */
.mt-check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.4;
}

.mt-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  background: rgba(5, 7, 11, 0.8);
  cursor: pointer;
  position: relative;
  transition: all 0.18s ease;
}

.mt-check input[type="checkbox"]:hover {
  border-color: #8f6cc7;
}

.mt-check input[type="checkbox"]:checked {
  background: var(--brand);
  border-color: var(--brand-lighter);
}

.mt-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #ffffff;
  clip-path: polygon(19% 48%, 12% 56%, 40% 82%, 88% 30%, 80% 23%, 39% 67%);
}

.mt-check input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--brand-lighter);
  outline-offset: 2px;
}

/* Toast. Lo crea toolkit.js al vuelo con role="status" aria-live="polite",
   pero nunca se definía: los errores de og-image, llms.txt y MCP no llegaban
   nunca al usuario. */
.mt-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  z-index: 9999;
  max-width: min(92vw, 460px);
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 3px solid var(--brand-lighter);
  border-radius: var(--radius-sm);
  background: rgba(10, 10, 14, 0.97);
  backdrop-filter: blur(14px);
  color: #f8fafc;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.85);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s var(--ease-mousy), visibility 0.22s;
}

.mt-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.mt-toast.bad, .mt-toast.err, .mt-toast.error {
  border-left-color: #f87171;
  color: #fca5a5;
}

.mt-toast.warn {
  border-left-color: #fbbf24;
  color: #fcd34d;
}

/* Punto de estado "live" del terminal slug. Estaba definido solo en el CSS
   de la landing, así que las 9 herramientas lo mostraban invisible. */
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald, #34d399);
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.8);
  animation: mt-pulse-dot 2s ease-in-out infinite;
}

@keyframes mt-pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Bloques de código generado (robots.txt, llms.txt, meta tags, cron, JWT).
   Sin esto, el artefacto descargable se desplazaba en horizontal en vez de
   ajustarse al ancho de la tarjeta. */
.mt-pre.wrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mt-pre.wrap code {
  white-space: inherit;
}

/* Contenedor de una salida generada: envuelve el <pre> y su fila de acciones.
   .mt-out-actions ya estaba definido más arriba. */
.mt-out {
  display: block;
}

.mt-out > .mt-pre {
  margin-bottom: 10px;
}

/* Imagen dentro de una previsualización (og:image en los mocks de Google,
   X, LinkedIn, WhatsApp y Discord). */
.mt-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Superficie de previsualización genérica: el marco que envuelve cada mock.
   Vivía duplicado — aquí y en el <style> de meta-tags, y además reimplementado
   a mano con estilos inline en el checker de contraste. */
.mt-prev {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.mt-prev + .mt-prev {
  margin-top: 14px;
}

/* Nota técnica encima de una previsualización. */
.mt-prev-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  margin: 0 0 8px;
}

/* Lista apilada de avisos dentro de un panel. */
.mt-warn-list {
  display: grid;
  gap: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
  .mt-toast { transition: opacity 0.22s ease, visibility 0.22s; transform: translate(-50%, 0); }
}

/* ==========================================================================
   GUÍA TÉCNICA & FAQ FORENSE (Idéntico a Image Studio & Favicon Pro)
   ========================================================================== */
/* Bloque de guía, al final del workspace. Tarjeta de vidrio con el borde y el
   separador de luz que usa Image Studio, sobre el padding que corresponde a
   un bloque en el flujo del documento. */
.mt-guide {
  position: relative;
  max-width: 1100px;
  margin: 2.5rem auto 0;
  padding: 2.25rem 1.75rem 2.5rem;
  background: rgba(10, 12, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

.mt-guide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(85, 55, 142, 0.2) 20%,
    rgba(85, 55, 142, 0.9) 50%,
    rgba(6, 182, 212, 0.7) 75%,
    transparent 100%
  );
  box-shadow: 0 0 20px rgba(85, 55, 142, 0.65);
}

@media (max-width: 1024px) {
  .mt-guide {
    padding: 1.75rem 1.25rem 2rem;
  }
}

.mt-guide h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
  margin: 24px 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.mt-guide h2:first-child {
  margin-top: 0;
}

.mt-guide h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #bda0e2;
  margin: 22px 0 8px;
}

.mt-guide p, .mt-guide li {
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 12px;
}

.mt-guide code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 5px;
  color: #bda0e2;
  font-size: 0.85em;
  font-family: var(--font-mono);
}

.faq-forensic-section {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.forensic-details {
  background: rgba(13, 17, 26, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.forensic-details[open] {
  border-color: rgba(143, 108, 199, 0.45);
}

.forensic-summary {
  padding: 14px 18px;
  font-family: var(--font-ui);
  font-weight: 600;
  color: #f1f5f9;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.forensic-summary::-webkit-details-marker {
  display: none;
}

.sum-icon {
  font-size: 0.9rem;
  color: #bda0e2;
  transition: transform 0.2s ease;
}

.forensic-details[open] .sum-icon {
  transform: rotate(180deg);
}

.forensic-answer {
  padding: 0 18px 16px;
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.6;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 4px;
  padding-top: 12px;
}

/* ── Links dentro de la guía técnica & Related Tools (Color de Marca) ── */
.mt-guide a {
  color: #bda0e2 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  border-bottom: 1px solid rgba(189, 160, 226, 0.35) !important;
  transition: all 0.2s ease !important;
}

.mt-guide a:hover {
  color: #ffffff !important;
  border-bottom-color: #8f6cc7 !important;
  text-shadow: 0 0 12px rgba(189, 160, 226, 0.5) !important;
}

/* ==========================================================================
   ENGINEERING & AUTHOR PROFILE (E-E-A-T)
   ========================================================================== */
.engineering-card {
  background: linear-gradient(
    135deg,
    rgba(19, 25, 38, 0.75) 0%,
    rgba(10, 13, 20, 0.82) 100%
  );
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(85, 55, 142, 0.32);
  border-radius: 24px;
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin: 40px auto 0;
  max-width: 1100px;
  box-shadow:
    0 25px 65px -15px rgba(0, 0, 0, 0.85),
    0 0 35px rgba(85, 55, 142, 0.08),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.18);
}

.eng-profile {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
}

.eng-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.eng-avatar-wrap img {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #000;
  display: block;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.eng-verified {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: linear-gradient(135deg, #8f6cc7 0%, #55378e 100%);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #090c12;
  box-shadow: 0 0 10px rgba(85, 55, 142, 0.5);
}

.eng-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.eng-author {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.eng-author a {
  color: #bda0e2 !important;
  text-decoration: none !important;
  border-bottom: none !important;
}

.eng-author a:hover {
  color: #ffffff !important;
  text-shadow: 0 0 12px rgba(189, 160, 226, 0.5) !important;
}

.eng-statement {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.55;
  margin: 0;
}

.eng-cta-wrap {
  flex-shrink: 0;
}

.eng-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, #55378e 0%, #38215c 100%);
  border: 1px solid rgba(143, 108, 199, 0.5);
  border-top-color: rgba(189, 160, 226, 0.8);
  color: #ffffff !important;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none !important;
  border-bottom: none !important;
  cursor: pointer;
  box-shadow: 0 8px 24px -4px rgba(139, 92, 246, 0.5);
  transition: all 0.25s ease;
}

.eng-cta-btn:hover {
  background: linear-gradient(180deg, #8f6cc7 0%, #472d75 100%);
  border-color: #bda0e2;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -4px rgba(139, 92, 246, 0.75);
}

/* ==========================================================================
   STUDIO GLOBAL FOOTER — barra compacta, como en Image Studio
   ========================================================================== */
/* Mismo aspecto de barra que en Image Studio (fondo con blur, borde superior,
   tipografía de 0.68rem, enlaces a la izquierda y copyright a la derecha),
   pero en el flujo del documento en vez de fijada al viewport: con scroll de
   página una barra de 28px fijatapia el ancho de la ventana y tapaba el
   contenido al hacer scroll. */
.studio-global-footer {
  background: rgba(11, 14, 21, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 -4px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 10px 1.25rem;
  font-size: 0.68rem;
  color: var(--text-muted);
  user-select: none;
  width: 100%;
  flex-wrap: wrap;
  margin-top: 0;
}

.studio-global-footer .footer-nav-links {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 0;
  min-width: 0;
}

.studio-global-footer .footer-nav-links a {
  color: #94a3b8;
  font-size: 0.68rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.studio-global-footer .footer-nav-links a:hover {
  color: #bda0e2;
}

.studio-global-footer .footer-nav-links .sep {
  color: rgba(255, 255, 255, 0.15);
}

.studio-global-footer .footer-copy {
  font-size: 0.68rem;
  color: #64748b;
  margin: 0;
  flex-shrink: 0;
}

/* ==========================================================================
   STUDIO FOOTER BAR
   ========================================================================== */
.studio-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 8, 12, 0.95);
  padding: 16px 1.5rem;
  margin-top: 40px;
  width: 100%;
}

.studio-footer-in {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #64748b;
}

.footer-privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  color: #34d399;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.72rem;
}

@media (max-width: 768px) {
  .studio-header {
    padding: 0 1rem !important;
  }
  .header-center {
    display: none;
  }
  .engineering-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
    gap: 1.25rem;
  }
  .eng-profile {
    flex-direction: column;
    gap: 1rem;
  }
  .studio-footer-in {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}
