/* METEORO 3D STUDIO — usa los colores, tipografía y botones de la web (styles.css). */

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.studio-header .detail-nav a[aria-current="page"] { color: var(--led); text-decoration: underline; text-underline-offset: 6px; }

.studio-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 22px; padding: 18px clamp(16px, 2.2vw, 30px) 16px; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 80% 0%, #14284f, transparent 65%), #0a0f19; }
.studio-title .eyebrow { width: 100%; margin-bottom: 2px; }
.studio-title h1 { font-size: clamp(1.6rem, 2.6vw, 2.35rem); line-height: 1.05; font-weight: 800; letter-spacing: -.045em; }
.studio-title p:not(.eyebrow) { max-width: 70ch; color: #c4d1e7; font-size: .95rem; }

/* ---------- Distribución ---------- */
.studio-app {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 316px;
  grid-template-areas: "controls stage info";
  height: max(600px, calc(100dvh - var(--studio-top, 200px)));
  border-bottom: 1px solid var(--line);
  background: #07090e;
}
.studio-controls { grid-area: controls; border-right: 1px solid var(--line); }
.studio-stage { grid-area: stage; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; min-width: 0; min-height: 0; }
.studio-info { grid-area: info; border-left: 1px solid var(--line); }
.studio-panel { min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: #0b0f17; scrollbar-width: thin; scrollbar-color: #2d3a55 transparent; }

/* ---------- Visor ---------- */
.studio-viewport { position: relative; min-height: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 35%, #101a30, #06080d 70%); }
.studio-viewport canvas { display: block; width: 100%; height: 100%; outline: none; cursor: grab; }
.studio-viewport canvas:active { cursor: grabbing; }
.studio-viewport canvas:focus-visible { box-shadow: inset 0 0 0 2px #a8c3ff; }
.studio-overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; background: #080b11e0; color: #c9d4ea; text-align: center; }
.studio-overlay p { max-width: 46ch; }
.studio-overlay-title { color: #fff; font-weight: 700; font-size: 1.05rem; }
.studio-spinner { width: 34px; height: 34px; border: 3px solid #23314f; border-top-color: var(--led); border-radius: 50%; animation: studio-spin .9s linear infinite; }
@keyframes studio-spin { to { transform: rotate(360deg); } }
.studio-tooltip { position: absolute; z-index: 3; padding: 7px 10px; border: 1px solid #4a6bc7; border-radius: 5px; background: #0b1222f2; color: #eaf2ff; font-size: .8rem; line-height: 1.35; pointer-events: none; transform: translate(14px, 14px); white-space: nowrap; }
.studio-tooltip strong { color: var(--led); }
.studio-hint { position: absolute; left: 14px; bottom: 12px; max-width: calc(100% - 28px); padding: 5px 9px; border-radius: 4px; background: #080b11b3; color: #a9b6cc; font-size: .74rem; pointer-events: none; transition: opacity .4s; }
.studio-hint[data-faded] { opacity: 0; }
.studio-badge { position: absolute; top: 12px; right: 12px; padding: 4px 9px; border: 1px solid #2f3b55; border-radius: 99px; background: #080b11b3; color: #a9b6cc; font: 600 .66rem/1.4 ui-monospace, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }

/* ---------- Barra de herramientas ---------- */
.studio-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 14px; border-top: 1px solid var(--line); background: #0b0f17; }
.studio-tool-group { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.studio-tool-group button, .studio-tool-selects select {
  min-height: 36px;
  padding: 6px 11px;
  border: 1px solid #2c3546;
  border-radius: 4px;
  background: #0f1522;
  color: #c9d4ea;
  font-size: .8rem;
  font-weight: 600;
}
.studio-tool-group button:hover { border-color: #5f86ff; color: #fff; }
.studio-tool-group button[aria-pressed="true"] { border-color: #5f86ff; background: #17264d; color: #fff; }
.studio-tool-selects { gap: 10px; }
.studio-tool-selects label { display: inline-flex; align-items: center; gap: 6px; color: #8e9bb3; font-size: .74rem; font-weight: 600; }
#btn-png { border-color: #3a5bbd; }

/* ---------- Paneles ---------- */
.studio-section { border-bottom: 1px solid var(--line); }
.studio-section > summary { display: flex; align-items: center; gap: 10px; padding: 15px 18px; color: #fff; font-weight: 700; font-size: .93rem; cursor: pointer; list-style: none; }
.studio-section > summary::-webkit-details-marker { display: none; }
.studio-section > summary::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid #7f95c4; border-bottom: 2px solid #7f95c4; transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.studio-section:not([open]) > summary::after { transform: rotate(-45deg); }
.studio-step { color: #93afff; font: 600 .72rem/1 ui-monospace, Consolas, monospace; letter-spacing: .08em; }
.studio-fields { display: grid; gap: 12px; padding: 0 18px 18px; }
.studio-field { display: grid; gap: 5px; color: #b9c5da; font-size: .78rem; font-weight: 600; }
.studio-field input, .studio-field select, .studio-dialog textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #39445a;
  border-radius: 4px;
  background: #090e18;
  color: var(--text);
  font-size: .92rem;
  font-weight: 500;
}
.studio-field select option:disabled { color: #6f7a8e; }
.studio-field input:invalid { border-color: #c4733a; }
.studio-dims { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.studio-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.studio-presets button { min-height: 32px; padding: 4px 10px; border: 1px solid #2f3a52; border-radius: 99px; background: #0f1522; color: #c9d4ea; font-size: .78rem; font-weight: 600; }
.studio-presets button:hover { border-color: #5f86ff; color: #fff; }
.studio-presets button[aria-pressed="true"] { border-color: #5f86ff; background: #17264d; color: #fff; }
.studio-help { color: #8f9cb4; font-size: .78rem; line-height: 1.45; }

.studio-segment { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; padding: 0; margin: 0; border: 0; }
.studio-segment legend { margin-bottom: 5px; padding: 0; color: #b9c5da; font-size: .78rem; font-weight: 600; }
.studio-segment label { position: relative; }
.studio-segment input { position: absolute; opacity: 0; pointer-events: none; }
.studio-segment span { display: grid; place-items: center; min-height: 36px; padding: 4px 6px; border: 1px solid #2f3a52; margin-left: -1px; background: #0f1522; color: #c3cee3; font-size: .78rem; font-weight: 600; text-align: center; cursor: pointer; }
.studio-segment label:first-of-type span { margin-left: 0; border-radius: 4px 0 0 4px; }
.studio-segment label:last-of-type span { border-radius: 0 4px 4px 0; }
.studio-segment input:checked + span { position: relative; z-index: 1; border-color: #5f86ff; background: #1b2f63; color: #fff; }
.studio-segment input:focus-visible + span { outline: 2px solid #a8c3ff; outline-offset: 1px; z-index: 2; }
.studio-segment-4 span { font-size: .74rem; padding-inline: 3px; }

.studio-options { display: grid; gap: 6px; padding: 0; margin: 0; border: 0; }
.studio-options label { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 7px 10px; border: 1px solid #2a3348; border-radius: 4px; background: #0e131e; color: #d3dcec; font-size: .84rem; cursor: pointer; }
.studio-options label:hover { border-color: #4b6bc0; }
.studio-options input { accent-color: #3262f1; width: 16px; height: 16px; flex: 0 0 auto; }
.studio-options label:has(input:checked) { border-color: #5f86ff; background: #142247; color: #fff; }
.studio-options label:has(input:disabled) { opacity: .45; cursor: not-allowed; }

.studio-suboptions { display: grid; gap: 8px; padding: 12px; border: 1px solid #2a3348; border-left: 3px solid #5f86ff; border-radius: 4px; background: #0d1426; }
.studio-check { display: flex; align-items: center; gap: 9px; min-height: 36px; color: #d3dcec; font-size: .84rem; cursor: pointer; }
.studio-check input { width: 17px; height: 17px; accent-color: #3262f1; }
.studio-range output { float: right; color: var(--led); font-weight: 700; }
.studio-range input { padding: 0; min-height: 28px; border: 0; background: none; accent-color: #3262f1; }
.studio-file { display: grid; gap: 6px; }
.studio-file-button { justify-self: start; cursor: pointer; }
.studio-file-button:focus-within { outline: 2px solid #a8c3ff; outline-offset: 3px; }
.studio-file-name { color: var(--led); font-size: .8rem; word-break: break-all; }
.studio-video { display: flex; gap: 6px; }
.studio-notes { display: grid; gap: 6px; }
.studio-notes p, .studio-warning { padding: 8px 10px; border-left: 3px solid #d9a441; border-radius: 0 4px 4px 0; background: #2a2210; color: #f1dfb6; font-size: .78rem; line-height: 1.45; }
.studio-notes p.ok { border-left-color: #3fb27f; background: #0f2a1f; color: #c6efd9; }

/* ---------- Información técnica ---------- */
.studio-card { padding: 16px 18px 18px; border-bottom: 1px solid var(--line); }
.studio-card h2 { margin-bottom: 10px; color: #fff; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.studio-specs { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 12px; margin: 0; font-size: .84rem; }
.studio-specs dt { color: #8f9cb4; }
.studio-specs dd { margin: 0; color: #eef3fc; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.studio-specs dd.big { color: var(--led); font-size: 1.02rem; }
.studio-specs .studio-tag { margin-left: 6px; vertical-align: 1px; }
.studio-tag { display: inline-block; padding: 1px 6px; border-radius: 3px; font: 700 .58rem/1.5 ui-monospace, Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.studio-tag-confirmado { background: #0e2c3d; color: #a2e6ff; }
.studio-tag-referencia { background: #3a2e0e; color: #f3c969; }
.studio-tag-pendiente { background: #1e2433; color: #9aa6bd; }
.studio-legend { margin-top: 12px; color: #8f9cb4; font-size: .72rem; line-height: 1.9; }
.studio-cta { display: grid; gap: 8px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: #0e1730; }
.studio-cta .button { width: 100%; white-space: normal; text-align: center; }
.studio-disclaimer { padding: 14px 18px 22px; color: #7f8ba1; font-size: .74rem; line-height: 1.5; }

/* ---------- Diálogo y avisos ---------- */
.studio-dialog { width: min(560px, calc(100% - 32px)); padding: 0; border: 1px solid #405277; border-radius: 9px; background: #101623; color: var(--text); }
.studio-dialog::backdrop { background: #03050acc; }
.studio-dialog-inner { display: grid; gap: 12px; padding: 22px; }
.studio-dialog h2 { font-size: 1.25rem; }
.studio-dialog p { color: var(--muted); font-size: .9rem; }
.studio-dialog textarea { min-height: 220px; font: .82rem/1.5 ui-monospace, Consolas, monospace; resize: vertical; }
.studio-toast { position: fixed; z-index: 50; left: 50%; bottom: 22px; max-width: calc(100% - 32px); padding: 10px 16px; border: 1px solid #4a6bc7; border-radius: 6px; background: #0e1730f5; color: #fff; font-size: .88rem; transform: translateX(-50%); box-shadow: 0 10px 30px #0008; }
.studio-noscript { padding: 20px var(--gutter); background: #2a2210; color: #f1dfb6; }

/* ---------- Pantallas medianas: visor arriba, paneles abajo ---------- */
/* ---------- Editor de escena con varios equipos ---------- */
.studio-body [hidden] { display: none !important; }
.studio-quick { display: grid; gap: 6px; }
.studio-quick-btn { display: flex; align-items: center; min-height: 40px; padding: 8px 12px; border: 1px solid #2a3348; border-radius: 4px; background: #0e131e; color: #d3dcec; font-size: .83rem; font-weight: 600; text-align: left; cursor: pointer; }
.studio-quick-btn:hover, .studio-quick-btn:focus-visible { border-color: #5f86ff; background: #142247; color: #fff; }
.studio-add { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.studio-add .button { width: 100%; justify-content: center; }
.studio-empty { padding: 10px 12px; border: 1px dashed #2f3a52; border-radius: 4px; color: #9aa7bf; font-size: .8rem; line-height: 1.45; }
#editor { display: grid; gap: 14px; }
#editor-screen, #editor-totem { display: grid; gap: 14px; }
.studio-group { display: grid; gap: 10px; min-width: 0; padding: 0; margin: 0; border: 0; }
.studio-group > legend { margin-bottom: 8px; padding: 0; color: #93afff; font: 700 .68rem/1.3 ui-monospace, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.studio-dims-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.studio-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.studio-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 4px 11px; border: 1px solid #2f3a52; border-radius: 4px; background: #0f1522; color: #c9d4ea; font-size: .78rem; font-weight: 600; cursor: pointer; }
.studio-chip:hover:not(:disabled) { border-color: #5f86ff; color: #fff; }
.studio-chip:disabled { opacity: .45; cursor: not-allowed; }
.studio-chip:focus-visible, .studio-icon:focus-visible, .studio-file-chip:focus-within { outline: 2px solid #a8c3ff; outline-offset: 2px; }
.studio-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid #2f3a52; border-radius: 4px; background: #0f1522; color: #c9d4ea; font-size: .95rem; line-height: 1; cursor: pointer; }
.studio-icon:hover:not(:disabled) { border-color: #5f86ff; color: #fff; }
.studio-icon:disabled { opacity: .35; cursor: not-allowed; }
.studio-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.studio-card-head h2 { margin: 0; }
.studio-count { display: inline-block; min-width: 22px; margin-left: 6px; padding: 1px 6px; border-radius: 99px; background: #17264d; color: var(--led); font-size: .7rem; text-align: center; letter-spacing: 0; }
.studio-items { display: grid; gap: 5px; max-height: 300px; margin: 0 0 10px; padding: 0; overflow-y: auto; list-style: none; scrollbar-width: thin; scrollbar-color: #2d3a55 transparent; }
.studio-item { display: flex; align-items: stretch; gap: 4px; border: 1px solid #2a3348; border-radius: 4px; background: #0e131e; }
.studio-item.is-selected { border-color: #4b6bc0; background: #111b33; }
.studio-item.is-primary { border-color: #5f86ff; background: #142247; box-shadow: inset 3px 0 0 var(--led); }
.studio-item.is-hidden .studio-item-main { opacity: .45; }
.studio-item-main { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon name" "icon desc"; align-items: center; gap: 0 9px; flex: 1; min-width: 0; padding: 7px 4px 7px 10px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.studio-item-main:focus-visible { outline: 2px solid #a8c3ff; outline-offset: -2px; border-radius: 4px; }
.studio-item-icon { grid-area: icon; color: var(--led); font-size: 1.05rem; }
.studio-item-name { grid-area: name; color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .02em; }
.studio-item-desc { grid-area: desc; overflow: hidden; color: #9aa7bf; font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.studio-item-actions { display: flex; align-items: center; gap: 3px; padding-right: 5px; }
.studio-item-actions .studio-icon { width: 28px; height: 28px; font-size: .82rem; }
.studio-item-actions [data-action="delete"]:hover { border-color: #d9534f; color: #ffb3b0; }
.studio-item-empty { padding: 10px 12px; border: 1px dashed #2f3a52; border-radius: 4px; color: #9aa7bf; font-size: .8rem; }
.studio-arrange { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.studio-arrange .studio-chip { padding-inline: 4px; }
.studio-summary-actions { margin-top: 12px; }
.studio-subtitle { margin-top: 18px; }
.studio-fields-flat { padding: 0; }
.studio-file-chip { position: relative; }
.studio-segment-5 span { padding-inline: 2px; font-size: .72rem; }
.studio-empty-scene { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 24px; color: #c9d4ea; text-align: center; pointer-events: none; }
.studio-empty-scene p { max-width: 40ch; }

/* ---------- Barra simplificada y opciones avanzadas ---------- */
.studio-toolbar { justify-content: flex-start; }
.studio-gear { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; margin-left: auto; padding: 6px 12px; border: 1px solid #2f3a52; border-radius: 4px; background: #0f1522; color: #c9d4ea; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.studio-gear span[aria-hidden] { font-size: 1.05rem; line-height: 1; }
.studio-gear:hover, .studio-gear[aria-expanded="true"] { border-color: #5f86ff; background: #17264d; color: #fff; }
.studio-gear:focus-visible, .studio-help-btn:focus-visible { outline: 2px solid #a8c3ff; outline-offset: 2px; }
.studio-advanced { position: absolute; z-index: 4; right: 12px; bottom: 12px; display: grid; gap: 12px; width: min(340px, calc(100% - 24px)); padding: 14px; border: 1px solid #3b4d7a; border-radius: 8px; background: #0b1120f5; box-shadow: 0 18px 40px #000a; }
.studio-advanced-title { margin: 0; color: #93afff; font: 700 .68rem/1.3 ui-monospace, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.studio-advanced .studio-tool-selects { display: grid; gap: 8px; }
.studio-advanced .studio-tool-selects label { justify-content: space-between; }
.studio-advanced .studio-tool-selects select { width: 170px; }
.studio-help-btn { position: absolute; z-index: 3; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 14px 6px 8px; border: 1px solid #5f86ff; border-radius: 99px; background: #0d1830e6; color: #fff; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; box-shadow: 0 0 16px #3262f155; }
.studio-help-btn span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--blue, #3262f1); font-size: .85rem; }
.studio-help-btn:hover { background: #17264d; }
.studio-summary .studio-specs { margin-bottom: 16px; }
.studio-quote-btn { width: 100%; min-height: 54px; justify-content: center; font-size: 1rem; text-align: center; white-space: normal; box-shadow: 0 0 22px #3262f166; }
.studio-summary #quote-help { margin: 8px 0 12px; }
.studio-summary-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0; }
.studio-summary-actions .studio-chip { flex: 1 1 auto; min-height: 30px; padding-inline: 8px; font-size: .74rem; color: #a9b6cc; }

/* ---------- Tutorial guiado ---------- */
.tour { position: fixed; inset: 0; z-index: 1000; }
.tour-spot { position: fixed; border-radius: 10px; box-shadow: 0 0 0 200vmax #03060cc7, 0 0 0 2px #5f86ff, 0 0 28px #3262f1aa; pointer-events: none; transition: top .3s ease, left .3s ease, width .3s ease, height .3s ease; }
.tour-card { position: fixed; top: 50%; left: 50%; width: min(360px, calc(100vw - 24px)); padding: 20px 20px 16px; border: 1px solid #4a6bc7; border-radius: 12px; background: #0d1426; color: #e6edf9; box-shadow: 0 24px 60px #000c; transition: top .3s ease, left .3s ease; }
.tour-step { margin: 0 0 6px; color: var(--led, #a2e6ff); font: 700 .74rem/1.3 ui-monospace, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.tour-title { margin: 0 0 8px; color: #fff; font-size: 1.35rem; line-height: 1.2; }
.tour-text { margin: 0 0 14px; color: #d3dcec; font-size: 1.05rem; line-height: 1.5; }
.tour-dots { display: flex; gap: 6px; margin-bottom: 16px; }
.tour-dots span { width: 100%; height: 5px; border-radius: 9px; background: #26314a; transition: background .3s; }
.tour-dots span.is-on { background: #3262f1; }
.tour-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.tour-nav { display: flex; order: -1; gap: 8px; }
.tour-nav button { flex: 1; }
.tour-skip { align-self: center; min-height: 40px !important; }
.tour-actions button { min-height: 46px; padding: 8px 16px; border-radius: 6px; font: inherit; font-size: .98rem; font-weight: 700; cursor: pointer; }
.tour-next { border: 1px solid #5f86ff; background: #3262f1; color: #fff; }
.tour-next:hover { background: #4471ff; }
.tour-prev { border: 1px solid #3a4763; background: #121a2c; color: #dfe7f5; }
.tour-prev:hover { border-color: #5f86ff; }
.tour-skip { padding-inline: 4px !important; border: 0; background: none; color: #9fb0cc; text-decoration: underline; text-underline-offset: 3px; }
.tour-skip:hover { color: #fff; }
.tour-actions button:focus-visible { outline: 3px solid #a8c3ff; outline-offset: 2px; }
.tour-target { scroll-margin: 96px 0 280px; }
.tour [hidden] { display: none !important; }
@media (max-width: 699px) {
  .tour-card { top: auto !important; left: 12px !important; right: 12px; bottom: 12px; width: auto; }
  .tour-title { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-spot, .tour-card, .tour-dots span { transition: none; }
}

/* ---------- Recorrido: 1 elegí, 2 ajustá, 3 cotizá ---------- */
.studio-flow-label { display: flex; align-items: center; gap: 8px; margin: 0; color: #dfe7f5; font-size: .8rem; font-weight: 700; letter-spacing: .02em; }
.studio-flow-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #17264d; color: var(--led, #a2e6ff); font-size: .74rem; font-weight: 800; box-shadow: inset 0 0 0 1px #3d5fb8; }
.studio-presetbar { min-width: 0; padding: 8px 14px; border-bottom: 1px solid var(--line); background: #0b0f17; }
.studio-preset-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; border: 1px solid #3d5fb8; border-radius: 6px; background: #17264d; color: #e9f2ff; font-weight: 650; cursor: pointer; list-style: none; }
.studio-preset-toggle::-webkit-details-marker { display: none; }
.studio-presetbar[open] .studio-preset-toggle span { transform: rotate(180deg); }
.studio-presetbar-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; min-width: 0; margin-top: 8px; }
.studio-presets-main { display: grid; flex: 1 1 300px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.studio-presetbar-row > .studio-menu-wrap { margin-inline-start: auto; }
.studio-preset { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 58px; padding: 6px 10px; border: 1px solid #2f3a52; border-radius: 6px; background: #0f1522; color: #dfe7f5; font: inherit; font-size: .84rem; font-weight: 600; line-height: 1.15; text-align: center; cursor: pointer; }
.studio-preset:hover, .studio-more-btn:hover { border-color: #5f86ff; background: #142247; color: #fff; }
.studio-preset-icon { flex: none; width: 40px; height: 24px; color: var(--led, #a2e6ff); }
.studio-menu-wrap { position: relative; }
.studio-more-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 100%; min-height: 46px; padding: 6px 12px; border: 1px solid #2f3a52; border-radius: 6px; background: #0f1522; color: #c9d4ea; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.studio-more-btn[aria-expanded="true"] { border-color: #5f86ff; background: #17264d; color: #fff; }
.studio-menu { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; display: grid; gap: 4px; min-width: 240px; padding: 6px; border: 1px solid #3b4d7a; border-radius: 8px; background: #0b1120fa; box-shadow: 0 18px 40px #000b; }
.studio-menu button { min-height: 44px; padding: 8px 12px; border: 0; border-radius: 5px; background: none; color: #dfe7f5; font: inherit; font-size: .9rem; text-align: left; cursor: pointer; }
.studio-menu button:hover, .studio-menu button:focus-visible { background: #17264d; color: #fff; outline: none; }
.studio-preset:focus-visible, .studio-more-btn:focus-visible, .studio-dock button:focus-visible, .studio-wa-btn:focus-visible { outline: 2px solid #a8c3ff; outline-offset: 2px; }

.studio-dock { display: grid; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); background: #0b1120; }
.studio-dock.has-selection { background: linear-gradient(180deg, #0f1a33, #0b1120); box-shadow: inset 0 2px 0 #3262f1; }
.studio-dock-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.studio-dock-close { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -8px -6px -8px 0; border: 0; border-radius: 6px; background: none; color: #9fb0cc; font-size: 1rem; cursor: pointer; }
.studio-dock-close:hover { background: #17264d; color: #fff; }
.studio-dock-hint { margin: 0; color: #c9d4ea; font-size: .9rem; }
.studio-dock-dims { display: grid; grid-template-columns: repeat(2, minmax(0, 150px)); gap: 10px; }
.studio-dock-dims input { min-height: 46px; font-size: 1.05rem; scroll-margin-bottom: calc(var(--quotebar-h, 0px) + 16px); scroll-margin-top: 12px; }
.studio-dock-fixed { margin: 0; color: #dfe7f5; font-size: .9rem; }
.studio-dock-note { margin: -2px 0 0; color: #9fb0cc; font-size: .8rem; }
.studio-dock-note.is-adjusted { color: #ffd38a; }
.studio-dock-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.studio-dock-file { min-height: 46px; }
.studio-dock-file.is-primary { box-shadow: 0 0 18px #3262f188; }
.studio-dock-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 6px 14px; border: 1px solid #2f3a52; border-radius: 6px; background: #0f1522; color: #dfe7f5; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.studio-dock-btn:hover { border-color: #5f86ff; color: #fff; }
.studio-dock-delete { color: #ffb3b0; }
.studio-dock-delete:hover { border-color: #d9534f; color: #ffd0ce; }
.studio-dock-link { min-height: 44px; margin-left: auto; padding: 6px 4px; border: 0; background: none; color: #9fc0ff; font: inherit; font-size: .86rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Botón de WhatsApp: verde para que no se confunda con «Pedir cotización» del encabezado. */
.studio-wa-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 52px; padding: 10px 16px; border: 0; border-radius: 8px; background: #1fae57; color: #fff; font: inherit; font-size: 1rem; font-weight: 800; text-align: center; cursor: pointer; box-shadow: 0 0 0 1px #2fd37155, 0 8px 22px #1fae5740; }
.studio-wa-btn:hover { background: #22c260; }
.studio-wa-icon { flex: none; width: 22px; height: 22px; }
.studio-summary .studio-flow-label { margin-bottom: 10px; }
.studio-export { margin-top: 4px; }
.studio-export .studio-more-btn { min-height: 40px; font-size: .8rem; }
.studio-export .studio-menu { right: auto; left: 0; }
.studio-quotebar { display: none; }

.studio-more-settings { margin-top: 6px; border-top: 1px solid var(--line); }
.studio-more-settings > summary { display: flex; align-items: center; justify-content: space-between; min-height: 46px; color: #c9d4ea; font-size: .86rem; font-weight: 700; cursor: pointer; list-style: none; }
.studio-more-settings > summary::-webkit-details-marker { display: none; }
.studio-more-settings > summary::after { content: "▾"; color: #8fa2c4; }
.studio-more-settings[open] > summary::after { content: "▴"; }
.studio-more-body { display: grid; gap: 14px; padding-bottom: 6px; }
.studio-ficha > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.studio-ficha > summary::-webkit-details-marker { display: none; }
.studio-ficha > summary::after { content: "▾"; color: #8fa2c4; }
.studio-ficha[open] > summary::after { content: "▴"; }
.studio-ficha > summary h2 { margin: 0; }
.studio-ficha[open] > summary { margin-bottom: 10px; }

/* ---------- Modo presentación (pantalla completa) ---------- */
.studio-present-btn { position: absolute; z-index: 3; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid #5f86ff; border-radius: 99px; background: linear-gradient(135deg, #1b3fb8, #3262f1); color: #fff; font: inherit; font-size: .88rem; font-weight: 800; cursor: pointer; box-shadow: 0 0 20px #3262f177; }
.studio-present-btn:hover { background: linear-gradient(135deg, #2148c9, #4471ff); }
.studio-present-btn:focus-visible, .studio-present-ui button:focus-visible { outline: 2px solid #a8c3ff; outline-offset: 2px; }
.studio-present-btn svg { width: 20px; height: 20px; flex: none; }
.studio-hint { max-width: calc(100% - 340px); }
.studio-present-ui { position: absolute; z-index: 5; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.studio-present-ui button { min-height: 44px; padding: 8px 14px; border: 1px solid #ffffff38; border-radius: 99px; background: #0a0e18a6; color: #fff; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; opacity: .82; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: opacity .2s, background .2s; }
.studio-present-ui button:hover { opacity: 1; background: #0a0e18de; }
.studio-viewport.is-presenting { background: #000; }
.studio-viewport.is-presenting > :not(canvas):not(.studio-present-ui):not(.studio-present-tip) { display: none !important; }
.studio-present-tip { position: absolute; z-index: 5; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); margin: 0; padding: 8px 14px; border-radius: 99px; background: #0a0e18b8; color: #dfe7f5; font-size: .86rem; white-space: nowrap; transform: translateX(-50%); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: present-tip 4.5s ease forwards; pointer-events: none; }
@keyframes present-tip { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }
.studio-viewport:fullscreen { width: 100vw; height: 100vh; }
.studio-viewport.is-fallback { position: fixed !important; inset: 0; z-index: 9999; width: 100vw; height: 100vh; height: 100dvh; }
html.studio-presenting, html.studio-presenting body { overflow: hidden; }
html.studio-presenting .studio-quotebar { display: none !important; }

@media (max-width: 1180px) {
  .studio-app { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "stage stage" "controls info"; height: auto; }
  .studio-stage { grid-template-rows: auto clamp(360px, 58vh, 680px) auto auto; }
  .studio-panel { overflow: visible; }
  .studio-controls { border-right: 1px solid var(--line); }
  .studio-info { border-left: 0; }
}

/* ---------- Teléfonos: una columna, vista 3D primero, secciones plegables ---------- */
@media (max-width: 760px) {
  .studio-title { padding: 14px 16px 12px; }
  .studio-title p:not(.eyebrow) { font-size: .88rem; }
  .studio-app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "controls" "info"; }
  .studio-stage { grid-template-rows: auto clamp(230px, 46vh, 440px) auto auto; }
  .studio-controls { border-right: 0; }
  .studio-toolbar { gap: 8px; padding: 10px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .studio-tool-group { flex-wrap: nowrap; }
  .studio-tool-group button { white-space: nowrap; }
  .studio-hint { display: none; }
  .studio-badge { top: 8px; right: 8px; }
  .studio-help-btn { top: 8px; left: 8px; }
  .studio-present-btn { right: 8px; bottom: 8px; min-height: 44px; padding: 8px 14px; }
  .studio-gear-label, .studio-long { display: none; }
  .studio-items { max-height: none; }
  .studio-dims-3 { grid-template-columns: 1fr 1fr; }
  .studio-title p:not(.eyebrow) { display: none; }
  .studio-presetbar { padding: 8px 12px; }
  .studio-presetbar-row { flex-direction: column; gap: 6px; }
  .studio-presets-main { flex: auto; gap: 6px; }
  .studio-preset, .studio-more-btn { flex-direction: column; justify-content: center; gap: 4px; min-width: 0; min-height: 64px; padding: 6px 4px; font-size: .74rem; line-height: 1.2; text-align: center; white-space: normal; }
  .studio-more-btn { width: 100%; }
  .studio-presetbar-row .studio-more-btn { flex-direction: row; min-height: 44px; padding-inline: 10px; }
  .studio-preset-icon { width: 34px; height: 20px; }
  .studio-dock { padding: 12px; }
  .studio-dock-dims { grid-template-columns: 1fr 1fr; }
  .studio-dock-actions > * { flex: 1 1 auto; }
  .studio-dock-file { flex-basis: 100% !important; }
  .studio-summary .studio-flow-label, .studio-summary .studio-wa-btn, .studio-summary #quote-help { display: none; }
  .studio-body { padding-bottom: calc(var(--quotebar-h, 76px) + 8px); }
  :root.is-typing .studio-stage { grid-template-rows: auto clamp(100px, 26dvh, 170px) auto auto; }
  :root:has(.studio-body) { scroll-padding-bottom: calc(var(--keyboard, 0px) + var(--quotebar-h, 76px) + 8px); }
  .studio-quotebar { position: fixed; z-index: 40; left: 0; right: 0; bottom: var(--keyboard, 0px); display: flex; align-items: center; gap: 10px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid #2a3348; background: #070a10f2; backdrop-filter: blur(8px); }
  .studio-quotebar-sum { flex: none; max-width: 30%; margin: 0; color: #c9d4ea; font-size: .76rem; font-weight: 700; line-height: 1.25; }
  .studio-quotebar .studio-wa-btn { flex: 1; min-height: 50px; padding: 8px 10px; font-size: .9rem; line-height: 1.2; }
  .studio-toast { bottom: calc(var(--quotebar-h, 76px) + 12px); }
}

@media (prefers-reduced-motion: reduce) {
  .studio-spinner { animation-duration: 3s; }
  .studio-section > summary::after, .studio-hint { transition: none; }
}

/* El panel de edición cambia de alto al elegir un equipo: sin «scroll anchoring» la página no salta. */
:root:has(.studio-body), .studio-body { overflow-anchor: none; }

/* ======================================================================
   Rediseño: el visor manda. Dos columnas (visor | costado); arriba del visor,
   «Elegir montaje», «Agregar equipo» y «Cotizar por WhatsApp».
   ====================================================================== */
.studio-title { padding-block: 14px 12px; }
.studio-title h1 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.studio-app { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "stage info"; }
.studio-stage { grid-template-rows: auto minmax(0, 1fr) auto auto; }
.studio-info { display: flex; flex-direction: column; }

.studio-actions { position: relative; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #0b0f17; }
.studio-action { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 6px 14px; border: 1px solid #3d5fb8; border-radius: 8px; background: #121c33; color: #fff; font: inherit; font-size: .92rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.studio-action:hover, .studio-action[aria-expanded="true"] { border-color: #6f92ff; background: #1a2a52; }
.studio-action:focus-visible { outline: 2px solid #a8c3ff; outline-offset: 2px; }
.studio-action-icon { width: 20px; height: 20px; color: var(--led, #a2e6ff); }
.studio-action-plus { color: var(--led, #a2e6ff); font-size: 1.05rem; line-height: 1; }
.studio-action > span[aria-hidden="true"]:last-child { color: #8fa2c4; font-size: .8rem; }
.studio-actions-hint { margin: 0; color: #9fb0cc; font-size: .86rem; }
.studio-actions-quote { width: auto; min-height: 46px; margin-left: auto; padding-inline: 18px; font-size: .95rem; }

.studio-actions .studio-menu { left: 0; right: auto; min-width: 260px; }
.studio-preset-menu { width: min(470px, calc(100vw - 28px)); padding: 10px; gap: 8px; }
.studio-preset-menu .studio-presets-main { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.studio-preset-menu .studio-preset { min-height: 74px; white-space: normal; }
.studio-preset-menu .studio-preset-icon { width: 46px; height: 28px; }
.studio-preset-menu .studio-more-btn { width: 100%; justify-content: space-between; min-height: 44px; }
.studio-more-list { display: grid; gap: 2px; }
.studio-more-list button { min-height: 44px; padding: 8px 12px; border: 0; border-radius: 5px; background: none; color: #dfe7f5; font: inherit; font-size: .9rem; text-align: left; cursor: pointer; }
.studio-more-list button:hover, .studio-more-list button:focus-visible { background: #17264d; color: #fff; outline: none; }
.studio-menu button { display: flex; align-items: center; gap: 10px; }
.studio-menu-icon { flex: none; width: 34px; height: 22px; color: var(--led, #a2e6ff); }
.studio-menu-up { top: auto; bottom: calc(100% + 6px); right: 0; left: auto; }

.studio-dock-title { margin: 0; color: #fff; font-size: .86rem; font-weight: 800; letter-spacing: .04em; }

.studio-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.studio-toolbar-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.studio-tool-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border: 1px solid #2f3a52; border-radius: 4px; background: #0f1522; color: #c9d4ea; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.studio-tool-btn:hover, .studio-tool-btn[aria-expanded="true"] { border-color: #5f86ff; background: #17264d; color: #fff; }
.studio-tool-btn:focus-visible { outline: 2px solid #a8c3ff; outline-offset: 2px; }
.studio-tool-btn svg { width: 18px; height: 18px; }
.studio-toolbar .studio-gear { margin-left: 0; }
.studio-hint { max-width: calc(100% - 28px); }

.studio-editor { border-bottom: 1px solid var(--line); }
.studio-project > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.studio-project > summary::-webkit-details-marker { display: none; }
.studio-project > summary::after { content: "▾"; color: #8fa2c4; }
.studio-project[open] > summary::after { content: "▴"; }
.studio-project > summary h2 { margin: 0; }
.studio-project[open] > summary { margin-bottom: 12px; }
.studio-info .studio-disclaimer { margin-top: auto; }

@media (max-width: 1180px) {
  .studio-app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "info"; }
  .studio-stage { grid-template-rows: auto clamp(360px, 58vh, 680px) auto auto; }
  .studio-info { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .studio-title { padding: 10px 14px 8px; }
  .studio-actions { flex-wrap: nowrap; gap: 8px; padding: 8px 10px; }
  .studio-action { flex: 1 1 0; justify-content: center; min-width: 0; padding-inline: 8px; font-size: .86rem; }
  .studio-actions-hint, .studio-actions-quote { display: none; }
  .studio-actions .studio-menu-wrap { display: flex; flex: 1 1 0; min-width: 0; }
  .studio-actions .studio-menu-wrap > .studio-menu { top: calc(100% + 6px); }
  .studio-actions .studio-menu-wrap:last-of-type > .studio-menu { left: auto; right: 0; }
  .studio-preset-menu { width: calc(100vw - 20px); }
  .studio-preset-menu .studio-preset { min-height: 70px; padding: 6px 4px; font-size: .76rem; }
  .studio-preset-menu .studio-more-btn { flex-direction: row; }
  .studio-stage { grid-template-rows: auto clamp(240px, 50vh, 460px) auto auto; }
  :root.is-typing .studio-stage { grid-template-rows: auto clamp(100px, 26dvh, 170px) auto auto; }
  .studio-toolbar-end { gap: 6px; }
  .studio-tool-btn { min-height: 44px; padding-inline: 10px; }
  .studio-toolbar .studio-tool-group button { min-height: 44px; }
  .studio-dock-hint-mobile { display: block; }
}

/* Indicación única junto al visor (sin equipo elegido) */
.studio-hint { left: 50%; right: auto; bottom: 14px; max-width: calc(100% - 28px); padding: 7px 14px; border: 1px solid #ffffff1f; border-radius: 99px; background: #080b11c7; color: #dfe7f5; font-size: .84rem; white-space: nowrap; transform: translateX(-50%); }
.studio-hint[data-faded] { opacity: 1; }
@media (max-width: 760px) { .studio-hint { display: block; bottom: 10px; font-size: .8rem; } }

/* En pantallas anchas, la edición rápida flota sobre el visor: el visor no cambia de tamaño al elegir un equipo. */
@media (min-width: 1181px) {
  .studio-stage { position: relative; }
  .studio-dock { position: absolute; z-index: 5; left: 14px; bottom: calc(var(--toolbar-h, 57px) + 12px); width: min(460px, calc(100% - 28px)); border: 1px solid #3b4d7a; border-radius: 10px; background: #0b1120f2; box-shadow: 0 18px 40px #000a; }
  .studio-dock.has-selection { background: #0b1120f2; box-shadow: 0 18px 40px #000a, inset 0 2px 0 #3262f1; }
}
@media (max-width: 760px) { .studio-quotebar-sum { max-width: none; white-space: nowrap; font-size: .74rem; } }

/* Teclado abierto en el celular: la barra de WhatsApp se va y vuelve al cerrar el teclado. */
@media (max-width: 760px) {
  :root.field-focus .studio-quotebar, :root.keyboard-open .studio-quotebar { display: none !important; }
}
