.stage-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.legend {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.swatch.a {
  background: var(--accent);
}

.swatch.b {
  background: var(--accent-2);
}

.wall {
  position: relative;
  flex: 1;
  min-height: 320px;
  background: linear-gradient(160deg, #fef7ec 0%, #f5e8d6 60%, #f3ddc3 100%);
  border-radius: 30px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), var(--shadow);
  animation: glow 1.2s ease both;
}

.tv {
  position: absolute;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(10, 10, 10, 0.95), #232323);
  border: 6px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(21, 21, 21, 0.25);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 10px;
  color: #f5f0e7;
  transition: width 0.25s ease, height 0.25s ease;
}

.tv::after {
  content: "";
  position: absolute;
  inset: 16%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tv-a {
  background: linear-gradient(160deg, #2a1f1b, #151515);
  outline: 2px solid rgba(232, 93, 61, 0.6);
}

.tv-b {
  background: linear-gradient(160deg, #0f2c3d, #182129);
  outline: 2px solid rgba(37, 109, 133, 0.6);
}

.tv-label {
  font-size: 0.85rem;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  position: relative;
  z-index: 2;
}

.distance-line {
  position: absolute;
  bottom: 24px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(232, 93, 61, 0.4) 20%,
    rgba(37, 109, 133, 0.5) 80%,
    transparent 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.distance-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 0 6px rgba(242, 183, 5, 0.25);
}

.distance-text {
  font-size: 0.85rem;
  color: var(--muted);
}

#size-a-range {
  accent-color: var(--accent);
}

#size-b-range {
  accent-color: var(--accent-2);
}

.compare-tv {
  position: absolute;
  left: var(--compare-x, 50%);
  top: var(--compare-y, 50%);
  transform: translate(var(--compare-shift-x, -50%), var(--compare-shift-y, -50%));
  border-radius: 0;
  border: 1px solid rgba(21, 21, 21, 0.2);
  background: rgba(255, 255, 255, 0.35);
  box-shadow: none;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0;
}

.compare-tv.tv-a {
  border-color: rgba(232, 93, 61, 0.6);
  background: rgba(232, 93, 61, 0.08);
}

.compare-tv.tv-b {
  border-color: rgba(37, 109, 133, 0.6);
  background: rgba(37, 109, 133, 0.08);
}

.compare-label {
  background: #151515;
  color: #fff4e6;
  border-radius: 999px;
  padding: 4px 8px;
  margin: 0 6px 6px 0;
  font-size: 0.72rem;
}

.ratio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.ratio-field {
  margin-bottom: 12px;
}

.ratio-row select {
  flex: 1 1 auto;
  min-width: 90px;
}

.ratio-custom {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.ratio-custom input {
  width: 64px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  font-size: 0.95rem;
  background: #fffdfa;
}

.ratio-custom.show {
  display: inline-flex;
}

@media (max-width: 980px) {
  .stage-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .wall {
    min-height: 260px;
  }
}
