/* ============================================================
   ESFERA TOOLS — identidade Esfera
   escuro quente + amarelo neon + glassmorphism
   ============================================================ */

:root {
  --bg: #0c0c0e;
  --bg-2: #131316;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);

  --text: #f7f6f2;
  --muted: #a8a69e;
  --dim: #686660;

  --yellow: #ffc800;
  --yellow-2: #ffde5c;
  --yellow-deep: #d99c00;
  --yellow-soft: rgba(255, 200, 0, 0.13);
  --red: #ff5a5a;

  --display: "Outfit", sans-serif;
  --body: "Outfit", sans-serif;
  --mono: "IBM Plex Mono", monospace;

  --radius: 18px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

body {
  background:
    radial-gradient(ellipse 90% 70% at 80% -10%, rgba(255, 200, 0, 0.06), transparent 60%),
    radial-gradient(ellipse 70% 60% at 10% 110%, rgba(255, 200, 0, 0.04), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--mono); }
.dim { color: var(--dim); }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input { font: inherit; color: inherit; }

::selection { background: var(--yellow); color: #1a1400; }

/* ---------- atmosphere ---------- */

.grain {
  position: fixed;
  inset: -50%;
  z-index: 50;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  animation: grain-shift 1.4s steps(4) infinite;
}

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1.5%); }
  50% { transform: translate(1.5%, -2%); }
  75% { transform: translate(-1%, -1%); }
  100% { transform: translate(0, 0); }
}

.haze {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
}

.haze-a {
  width: 55vmax; height: 55vmax;
  top: -22vmax; right: -18vmax;
  background: radial-gradient(circle, rgba(255, 200, 0, 0.10), transparent 65%);
}

.haze-b {
  width: 50vmax; height: 50vmax;
  bottom: -25vmax; left: -16vmax;
  background: radial-gradient(circle, rgba(255, 222, 92, 0.06), transparent 65%);
}

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 26px;
  background: linear-gradient(rgba(12, 12, 14, 0.9), rgba(12, 12, 14, 0.65) 70%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

.brand-icon {
  width: 26px;
  height: 26px;
  color: var(--yellow);
  filter: drop-shadow(0 0 10px rgba(255, 200, 0, 0.45));
  transition: transform 0.4s var(--ease-spring);
}

.brand:hover .brand-icon { transform: rotate(-12deg) scale(1.08); }

.brand-word {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.01em;
  color: var(--yellow);
  line-height: 1;
}

.brand-tools {
  font-size: 9.5px;
  letter-spacing: 0.24em;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  padding: 4px 9px;
  margin-left: 2px;
  background: var(--glass);
}

.topbar-meta {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--dim);
}

main { position: relative; z-index: 1; }

[hidden] { display: none !important; }

/* ============================================================
   HUB — uma tela, sem scroll
   ============================================================ */

.view-hub {
  height: calc(100dvh - 55px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hub-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(340px, 44%) 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(20px, 4vw, 64px);
  min-height: 0;
}

.hero { max-width: 520px; }

.hero-kicker {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--yellow);
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.hero-title span { display: block; }

.hero-title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--yellow), var(--yellow-2) 60%, var(--yellow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(255, 200, 0, 0.35));
}

.hero-sub {
  margin-top: 18px;
  max-width: 400px;
  color: var(--muted);
  font-size: 15.5px;
  font-weight: 300;
}

.hero-hint {
  margin-top: 24px;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--dim);
  animation: hint-bob 2.4s ease-in-out infinite;
}

@keyframes hint-bob {
  0%, 100% { transform: translateX(0); opacity: 0.7; }
  50% { transform: translateX(6px); opacity: 1; }
}

/* load reveal */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  animation: reveal-up 0.9s var(--ease-out) forwards;
  animation-delay: calc(var(--d, 0) * 100ms);
}

@keyframes reveal-up {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- blob field ---------- */

.blob-field {
  position: relative;
  height: 100%;
  min-height: 0;
}

.blob {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  padding: 22px;
  color: var(--text);
  outline-offset: 6px;
  will-change: transform;
  opacity: 0;
  animation:
    blob-in 0.9s var(--ease-out) forwards,
    blob-float var(--float-dur, 7s) ease-in-out infinite alternate;
  animation-delay: calc(var(--d, 0) * 100ms), var(--float-delay, 0s);
}

@keyframes blob-in {
  from { opacity: 0; scale: 0.82; }
  to { opacity: 1; scale: 1; }
}

@keyframes blob-float {
  from { translate: 0 -8px; }
  to   { translate: 0 12px; }
}

.blob-skin {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--blob-bg);
  border: 1px solid var(--blob-line, var(--line));
  border-radius: 42% 58% 55% 45% / 48% 44% 56% 52%;
  animation: blob-morph var(--morph-dur, 11s) ease-in-out infinite alternate;
  transition: transform 0.5s var(--ease-spring), box-shadow 0.5s ease;
  box-shadow: var(--blob-glow, none);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@keyframes blob-morph {
  0%   { border-radius: 42% 58% 55% 45% / 48% 44% 56% 52%; }
  33%  { border-radius: 58% 42% 44% 56% / 42% 58% 46% 54%; }
  66%  { border-radius: 46% 54% 60% 40% / 56% 46% 54% 44%; }
  100% { border-radius: 54% 46% 42% 58% / 46% 56% 44% 56%; }
}

.blob:hover .blob-skin,
.blob:focus-visible .blob-skin { transform: scale(1.07); }
.blob:active .blob-skin { transform: scale(0.97); }

/* main (ready) blob — gradiente neon em movimento, clean */
.blob.is-ready {
  --blob-bg:
    linear-gradient(135deg, #fff0b8, #ffd84d 20%, var(--yellow) 42%, #ff9d00 62%, #ffdf66 82%, var(--yellow-deep));
  --blob-line: rgba(255, 232, 140, 0.55);
  --blob-glow: 0 0 70px rgba(255, 200, 0, 0.32), 0 0 170px rgba(255, 200, 0, 0.13);
  color: #221700;
}

.blob.is-ready .blob-skin {
  background-size: 260% 260%;
  animation:
    blob-morph var(--morph-dur, 11s) ease-in-out infinite alternate,
    grad-drift 8s ease-in-out infinite alternate;
}

@keyframes grad-drift {
  from { background-position: 10% 20%; }
  to   { background-position: 90% 80%; }
}

.blob.is-ready .blob-skin::after {
  /* brilho de orbe: highlight no topo + calor na base */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.5), transparent 44%),
    radial-gradient(circle at 72% 88%, rgba(255, 130, 0, 0.28), transparent 52%);
}

.blob.is-ready:hover .blob-skin {
  box-shadow: 0 0 95px rgba(255, 200, 0, 0.5), 0 0 240px rgba(255, 200, 0, 0.2);
}

/* coming soon — vidro fosco */
.blob.is-soon {
  --blob-bg:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.035) 55%, rgba(255, 255, 255, 0.015));
  color: var(--muted);
  cursor: default;
}

.blob.is-soon:hover .blob-skin { transform: scale(1.03); }

.blob-tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  opacity: 0.75;
}

.blob-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(14px, 1.4vw, 19px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 190px;
}

.blob-desc {
  font-size: 12px;
  font-weight: 300;
  opacity: 0.8;
  max-width: 180px;
  line-height: 1.3;
}

/* teaser (em breve) */
.blob-q {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 4.5vh, 44px);
  line-height: 1;
  color: rgba(255, 255, 255, 0.22);
  transition: color 0.4s ease, text-shadow 0.4s ease;
}

.blob.is-soon:hover .blob-q {
  color: rgba(255, 200, 0, 0.55);
  text-shadow: 0 0 24px rgba(255, 200, 0, 0.35);
}

.blob-soon {
  font-size: 8.5px;
  letter-spacing: 0.26em;
  color: var(--dim);
}

.blob-cta {
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  padding: 6px 13px;
  border-radius: 99px;
  border: 1px solid currentColor;
  transition: background 0.3s ease, color 0.3s ease;
}

.blob.is-ready:hover .blob-cta { background: #221700; color: var(--yellow); border-color: transparent; }

/* blob placements — dentro da coluna direita */
.blob.b1 { width: clamp(210px, 34vh, 320px); height: clamp(210px, 34vh, 320px); left: 2%; top: 12%; --float-dur: 7.5s; --morph-dur: 12s; }
.blob.b2 { width: clamp(130px, 20vh, 185px); height: clamp(130px, 20vh, 185px); right: 14%; top: 4%; --float-dur: 6s; --float-delay: -2s; --morph-dur: 9s; }
.blob.b3 { width: clamp(140px, 22vh, 200px); height: clamp(140px, 22vh, 200px); left: 46%; top: 56%; --float-dur: 8.5s; --float-delay: -4s; --morph-dur: 14s; }
.blob.b4 { width: clamp(125px, 19vh, 175px); height: clamp(125px, 19vh, 175px); right: 2%; top: 44%; --float-dur: 7s; --float-delay: -1s; --morph-dur: 10s; }

/* ---------- marquee ---------- */

.marquee {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  overflow: hidden;
  padding: 11px 0;
  background: rgba(255, 255, 255, 0.012);
}

.marquee-track {
  display: flex;
  white-space: nowrap;
  width: max-content;
  font-size: 10.5px;
  letter-spacing: 0.3em;
  color: var(--dim);
  animation: marquee-roll 28s linear infinite;
}

@keyframes marquee-roll {
  to { transform: translateX(-50%); }
}

/* ============================================================
   TOOL VIEW — estimador em uma tela
   ============================================================ */

.view-tool {
  padding: 10px clamp(16px, 2.5vw, 36px) 40px;
  max-width: 1560px;
  margin: 0 auto;
  animation: tool-in 0.7s var(--ease-out);
}

@keyframes tool-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.tool-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.back-btn {
  flex-shrink: 0;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  padding: 10px 15px;
  border-radius: 99px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: var(--glass);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.back-btn:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  box-shadow: 0 0 18px rgba(255, 200, 0, 0.2);
}

.tool-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(20px, 2.4vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.tool-kicker {
  font-size: 10px;
  letter-spacing: 0.2em;
  font-weight: 500;
  color: var(--yellow);
  vertical-align: 6px;
  margin-left: 8px;
}

.tool-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 300;
}

/* ---------- glass panels ---------- */

.panel {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 44px rgba(0, 0, 0, 0.35);
}

/* ---------- layout: controls | stage | specs ---------- */

.tool-grid {
  display: grid;
  grid-template-columns: minmax(270px, 300px) minmax(0, 1fr) minmax(280px, 320px);
  gap: 14px;
  height: clamp(480px, calc(100dvh - 215px), 880px);
}

.tool-grid > * { min-height: 0; }

/* ---------- controls ---------- */

.controls {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  overflow-x: hidden;
}

.controls::-webkit-scrollbar,
.specs::-webkit-scrollbar { width: 4px; }
.controls::-webkit-scrollbar-thumb,
.specs::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }

.control-label {
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 10px;
}

.module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.module-card {
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.25s ease;
}

.module-card:hover { border-color: var(--line-strong); background: var(--glass-2); }

.module-card.active {
  border-color: var(--yellow);
  background: var(--yellow-soft);
  box-shadow: 0 0 22px rgba(255, 200, 0, 0.12) inset, 0 0 16px rgba(255, 200, 0, 0.1);
}

.module-pitch {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
}

.module-card.active .module-pitch { color: var(--yellow); }

.module-env {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  padding: 2px 6px;
  border-radius: 99px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  margin-left: 5px;
  vertical-align: 2px;
}

.module-meta {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--dim);
  line-height: 1.45;
}

/* steppers */

.steppers { display: flex; align-items: flex-start; gap: 10px; }
.stepper { flex: 1; }

.stepper-name {
  display: block;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--dim);
  margin-bottom: 6px;
}

.stepper-row {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.step-btn {
  width: 36px;
  font-size: 18px;
  color: var(--muted);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.step-btn:hover { background: var(--yellow); color: #221700; }

.step-input {
  width: 100%;
  min-width: 0;
  text-align: center;
  background: transparent;
  border: none;
  outline: none;
  font-size: 19px;
  font-weight: 600;
  padding: 9px 0;
  -moz-appearance: textfield;
  appearance: textfield;
}

.step-input::-webkit-outer-spin-button,
.step-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.step-unit {
  align-self: center;
  font-size: 11px;
  color: var(--dim);
  padding-right: 5px;
  margin-left: -3px;
  user-select: none;
}

.stepper-meters {
  display: block;
  margin-top: 6px;
  text-align: center;
  font-size: 10.5px;
  color: var(--yellow);
}

.stepper-x {
  align-self: center;
  color: var(--dim);
  font-size: 15px;
  padding-top: 14px;
}

/* chips */

.chips { display: flex; flex-wrap: wrap; gap: 7px; }

.chip {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  padding: 7px 12px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--glass);
  transition: all 0.25s ease;
}

.chip:hover { border-color: var(--yellow); color: var(--yellow); box-shadow: 0 0 14px rgba(255, 200, 0, 0.15); }

.chip .star { color: var(--yellow); }

/* action buttons */

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

.btn-solid,
.btn-ghost {
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 13px 16px;
  border-radius: 12px;
  transition: all 0.25s ease;
  text-align: center;
}

.btn-solid {
  background: linear-gradient(120deg, var(--yellow-2), var(--yellow) 55%, var(--yellow-deep));
  color: #221700;
  font-weight: 600;
  box-shadow: 0 0 26px rgba(255, 200, 0, 0.3);
}

.btn-solid:hover {
  box-shadow: 0 0 46px rgba(255, 200, 0, 0.5);
  transform: translateY(-1px);
}

.btn-solid:active { transform: translateY(0) scale(0.98); }

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: var(--glass);
}

.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); }

/* ---------- stage ---------- */

.stage {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 50% 110%, rgba(255, 200, 0, 0.07), transparent),
    linear-gradient(rgba(255, 255, 255, 0.025), rgba(0, 0, 0, 0.3));
}

.ratio-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 8px 13px;
  border-radius: 99px;
  border: 1px solid;
  backdrop-filter: blur(8px);
  background: rgba(12, 12, 14, 0.4);
  transition: all 0.3s ease;
}

.ratio-badge.good { color: var(--yellow); border-color: rgba(255, 200, 0, 0.55); box-shadow: 0 0 22px rgba(255, 200, 0, 0.25); }
.ratio-badge.near { color: var(--text); border-color: var(--line-strong); }
.ratio-badge.far  { color: var(--red); border-color: rgba(255, 90, 90, 0.45); }

.stage-scene { position: absolute; inset: 0; }

.stage-floor {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 18%, var(--line-strong) 82%, transparent);
}

.led-wall {
  position: absolute;
  transition: width 0.5s var(--ease-out), height 0.5s var(--ease-out), left 0.5s var(--ease-out), top 0.5s var(--ease-out);
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.25);
  overflow: hidden;
  box-shadow: 0 0 50px rgba(255, 200, 0, 0.1), 0 24px 60px rgba(0, 0, 0, 0.6);
}

.led-wall.is-169 {
  border-color: rgba(255, 222, 92, 0.85);
  box-shadow: 0 0 65px rgba(255, 200, 0, 0.35), 0 24px 60px rgba(0, 0, 0, 0.6);
}

/* "conteúdo" rodando na parede — dourado suave, deriva lenta */
.led-content {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, #1c1404, #57400c 28%, #b8901f 52%, #dcb84a 62%, #57400c 82%, #1c1404);
  background-size: 300% 300%;
  animation: led-show 26s ease-in-out infinite alternate;
  opacity: 0.92;
}

@keyframes led-show {
  from { background-position: 0% 40%; }
  to   { background-position: 100% 60%; }
}

.led-seams {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0 1px, transparent 1px);
}

.led-pixels {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.32) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.32) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

.led-res {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.85);
  font-size: clamp(10px, 1.3vw, 16px);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* toggle do overlay 16:9 */
.overlay-toggle {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 8px 13px;
  border-radius: 99px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: rgba(12, 12, 14, 0.4);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.ot-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
  transition: all 0.3s ease;
}

.overlay-toggle.active {
  border-color: rgba(255, 200, 0, 0.55);
  color: var(--yellow);
  box-shadow: 0 0 18px rgba(255, 200, 0, 0.15);
}

.overlay-toggle.active .ot-dot {
  background: var(--yellow);
  box-shadow: 0 0 10px rgba(255, 200, 0, 0.8);
}

.overlay-toggle:hover { border-color: var(--yellow); color: var(--yellow); }

/* 16:9 ghost */
.ghost-169 {
  position: absolute;
  border: 1.5px dashed rgba(255, 255, 255, 0.55);
  pointer-events: none;
  transition: all 0.5s var(--ease-out);
}

.ghost-169::after {
  content: "REF 16:9";
  position: absolute;
  top: -19px;
  right: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.55);
}

.ghost-169.hidden-ghost { opacity: 0; }
.ghost-169.tight::after { display: none; }

/* faixa da diferença entre o LED previsto e o 16:9 */
.diff-band {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: all 0.5s var(--ease-out);
  animation: band-in 0.5s var(--ease-out);
}

@keyframes band-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* sobra: parte do painel que passa do 16:9 */
.diff-band.over {
  background: repeating-linear-gradient(45deg, rgba(255, 200, 0, 0.32) 0 8px, rgba(255, 200, 0, 0.08) 8px 16px);
  border-bottom: 1.5px dashed rgba(255, 222, 92, 0.9);
  box-shadow: inset 0 0 24px rgba(255, 200, 0, 0.18);
}

/* falta: o que o painel precisaria crescer para fechar 16:9 */
.diff-band.under {
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.14) 0 8px, transparent 8px 16px);
  border: 1.5px dashed rgba(255, 255, 255, 0.45);
  border-bottom: none;
}

.diff-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(12, 12, 14, 0.78);
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

.diff-band.over .diff-label { color: var(--yellow-2); border: 1px solid rgba(255, 200, 0, 0.4); }
.diff-band.under .diff-label { color: rgba(255, 255, 255, 0.85); border: 1px solid var(--line-strong); }

/* faixa fina demais: label sai pra fora pra não esmagar */
.diff-band.slim .diff-label { transform: translateY(-26px); }

/* dimension labels */
.dim-label {
  position: absolute;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
  transition: all 0.5s var(--ease-out);
}

.dim-label .bar { color: var(--dim); }
.dim-label.dim-w { transform: translateX(-50%); }
.dim-label.dim-h { transform: translate(-50%, -50%) rotate(-90deg); }

/* human silhouette */
.human {
  position: absolute;
  transition: all 0.5s var(--ease-out);
  opacity: 0.9;
}

.human svg { display: block; width: 100%; height: 100%; fill: #34322c; stroke: rgba(255, 255, 255, 0.25); stroke-width: 0.6; }

.human-label {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--dim);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* ---------- specs (coluna compacta) ---------- */

.specs-panel {
  padding: 18px 16px 12px;
  display: flex;
  flex-direction: column;
}

.specs-title { flex-shrink: 0; }

.specs {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.spec-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}

.spec-row:last-child { border-bottom: none; }
.spec-row:hover { background: rgba(255, 255, 255, 0.025); }

.spec-row.highlight-good { background: var(--yellow-soft); border-radius: 10px; border-bottom-color: transparent; box-shadow: 0 0 18px rgba(255, 200, 0, 0.08) inset; }
.spec-row.highlight-near { background: rgba(255, 255, 255, 0.04); border-radius: 10px; }
.spec-row.highlight-far  { background: rgba(255, 90, 90, 0.07); border-radius: 10px; }

.spec-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--dim);
  flex-shrink: 0;
}

.spec-data { text-align: right; min-width: 0; }

.spec-value,
.spec-sub { display: block; }

.spec-value {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.25;
}

.spec-row.highlight-good .spec-value { color: var(--yellow); }
.spec-row.highlight-far .spec-value { color: var(--red); }

.spec-value small { font-size: 10.5px; color: var(--muted); font-weight: 400; }

.spec-sub {
  font-size: 10.5px;
  font-weight: 300;
  color: var(--dim);
  line-height: 1.35;
}

/* ---------- disclaimer ---------- */

.disclaimer {
  margin-top: 12px;
  font-size: 9.5px;
  line-height: 1.6;
  color: var(--dim);
  letter-spacing: 0.02em;
}

/* ---------- compare ---------- */

.compare {
  margin-top: 36px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.compare-head { margin-bottom: 18px; }

.compare-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.compare-count { font-size: 12px; color: var(--yellow); margin-left: 8px; }

.compare-sub { color: var(--muted); font-size: 13.5px; font-weight: 300; margin-top: 4px; }

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

.compare-card {
  position: relative;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  animation: card-pop 0.5s var(--ease-spring);
}

@keyframes card-pop {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.compare-card.best {
  border-color: rgba(255, 200, 0, 0.6);
  background: rgba(255, 200, 0, 0.06);
  box-shadow: 0 0 36px rgba(255, 200, 0, 0.14);
}

.best-tag {
  position: absolute;
  top: -10px;
  left: 14px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  background: linear-gradient(120deg, var(--yellow-2), var(--yellow));
  color: #221700;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 99px;
  box-shadow: 0 0 14px rgba(255, 200, 0, 0.4);
}

.compare-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 25px; height: 25px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--dim);
  font-size: 12px;
  line-height: 1;
  transition: all 0.2s ease;
}

.compare-remove:hover { border-color: var(--red); color: var(--red); }

.compare-preview {
  position: relative;
  height: 100px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.compare-wall {
  background: linear-gradient(115deg, rgba(255, 222, 92, 0.65), rgba(217, 156, 0, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.4);
  margin-bottom: 8px;
}

.compare-ghost {
  position: absolute;
  bottom: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.35);
}

.compare-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 1px;
}

.compare-pitch {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.compare-rows { display: flex; flex-direction: column; gap: 5px; }

.compare-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
}

.compare-row .k { color: var(--dim); letter-spacing: 0.06em; }
.compare-row .v { color: var(--text); }

.dev-badge {
  display: inline-block;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 9.5px;
}

.dev-badge.good { background: rgba(255, 200, 0, 0.16); color: var(--yellow); }
.dev-badge.near { background: rgba(255, 255, 255, 0.09); color: var(--text); }
.dev-badge.far { background: rgba(255, 90, 90, 0.13); color: var(--red); }

.compare-clear { margin-top: 16px; font-size: 10px; }

/* ============================================================
   ESTIMADOR DE SALA
   ============================================================ */

/* mini campos */
.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }

.mini-field > span {
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

.mini-field input {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 8px 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  min-width: 0;
  transition: border-color 0.25s ease;
}

.mini-field input:focus { border-color: var(--yellow); box-shadow: 0 0 14px rgba(255, 200, 0, 0.15); }

.control-hint {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 300;
  color: var(--dim);
  line-height: 1.4;
}

.chip.chip-on {
  border-color: var(--yellow);
  color: var(--yellow);
  background: var(--yellow-soft);
}

/* segmented control PLANTA | CORTE */
.seg {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  overflow: hidden;
  background: rgba(12, 12, 14, 0.5);
  backdrop-filter: blur(8px);
}

.seg button {
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 8px 14px;
  color: var(--muted);
  transition: all 0.25s ease;
}

.seg button.active {
  background: var(--yellow);
  color: #221700;
  font-weight: 600;
}

/* seletor de fileira */
.row-sel {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: rgba(12, 12, 14, 0.6);
  backdrop-filter: blur(8px);
  padding: 3px;
}

.row-sel button {
  width: 28px; height: 28px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 13px;
  transition: all 0.2s ease;
}

.row-sel button:hover { background: var(--yellow); color: #221700; }

.row-sel span {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--yellow);
  padding: 0 8px;
}

/* POV primeira pessoa */
.pov-card {
  position: absolute;
  right: 12px;
  top: 56px;
  z-index: 5;
  width: min(340px, 46%);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(12, 12, 14, 0.72);
  backdrop-filter: blur(10px);
  animation: card-pop 0.4s var(--ease-spring);
}

.pov-title {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 8px;
  white-space: nowrap;
}

.pov-card svg { display: block; width: 100%; height: auto; border-radius: 4px; }

/* lista de painéis de LED */
.led-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.led-item:last-child { border-bottom: none; }

.led-item-name {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--yellow);
  flex-shrink: 0;
  width: 38px;
}

.led-item input {
  width: 100%;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  padding: 6px 2px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
}

.led-item input:focus { border-color: var(--yellow); }

.led-x { font-size: 9px; color: var(--dim); flex-shrink: 0; }

.led-remove {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--dim);
  font-size: 11px;
  line-height: 1;
  transition: all 0.2s ease;
}

.led-remove:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.led-remove:disabled { opacity: 0.3; cursor: default; }

.led-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  margin-top: 10px;
}

.led-actions .btn-ghost { padding: 10px 12px; font-size: 10px; }

/* slider de altura do público */
.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-label { font-size: 8.5px; letter-spacing: 0.14em; color: var(--dim); flex-shrink: 0; }
.slider-value { font-size: 11px; color: var(--yellow); flex-shrink: 0; min-width: 52px; text-align: right; }

input[type="range"] {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  height: 3px;
  border-radius: 99px;
  background: var(--line-strong);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 10px rgba(255, 200, 0, 0.5);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px;
  border: none;
  border-radius: 50%;
  background: var(--yellow);
  cursor: pointer;
}

/* ---------- transition blob ---------- */

.transition-blob {
  position: fixed;
  z-index: 100;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  pointer-events: none;
  display: none;
  background: radial-gradient(circle at 35% 30%, #fff3c4, var(--yellow) 45%, #4a3100 90%);
}

.transition-blob.active { display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1180px) {
  .tool-grid {
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
    height: auto;
  }
  .specs-panel { grid-column: 1 / -1; }
  .specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
  .stage { min-height: 380px; }
}

@media (max-width: 880px) {
  .view-hub { height: auto; min-height: calc(100dvh - 55px); overflow: visible; }
  .hub-layout {
    grid-template-columns: 1fr;
    align-items: start;
    padding-top: 18px;
    gap: 0;
  }
  .blob-field { min-height: 560px; }

  .blob.b1 { left: 4%; top: 2%; width: 230px; height: 230px; }
  .blob.b2 { left: auto; right: 6%; top: 26%; }
  .blob.b3 { right: auto; left: 8%; top: 46%; }
  .blob.b4 { right: 8%; top: 66%; }
}

@media (max-width: 720px) {
  .topbar { padding: 12px 16px; }
  .topbar-meta { display: none; }

  .tool-grid { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr; }
  .tool-head { flex-wrap: wrap; gap: 12px; }

  .steppers { flex-direction: row; }
  .stepper-x { display: none; }

  .stage { min-height: 300px; }
}

/* ---------- reduced motion ---------- */

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