.jpl-stage {
  padding: clamp(0.8rem, 2.5vw, 1.75rem) 0 clamp(2rem, 5vw, 4rem);
}

.jpl-layout {
  width: min(100%, 78rem);
}

.jpl-panel {
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid rgba(105, 199, 255, 0.35);
  border-radius: 22px;
  background: rgba(5, 13, 31, 0.97);
  box-shadow: 0 18px 50px rgba(5, 11, 27, 0.43);
  color: #eef8ff;
}

.jpl-header {
  max-width: 58rem;
  margin: 0 auto;
  text-align: center;
}

.jpl-header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
}

.jpl-header > p:last-child {
  margin: 0.55rem 0 0;
  color: #b9ccde;
}

.jpl-kicker,
.jpl-detail-kicker {
  margin: 0 0 0.15rem;
  color: #67d8ff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.jpl-controls {
  display: flex;
  gap: 0.75rem;
  width: min(100%, 66rem);
  margin: 1.15rem auto 0;
  padding: 0.85rem;
  border: 1px solid rgba(113, 190, 247, 0.28);
  border-radius: 14px;
  align-items: end;
  justify-content: center;
  flex-wrap: wrap;
  background: rgba(16, 34, 65, 0.92);
}

.jpl-control {
  display: flex;
  min-width: min(100%, 12rem);
  flex: 1 1 12rem;
  flex-direction: column;
}

.jpl-control.is-wide {
  flex-basis: 18rem;
}

.jpl-control label {
  margin-bottom: 0.3rem;
  color: #dceeff;
  font-size: 0.8rem;
  font-weight: 700;
}

.jpl-control input,
.jpl-control select {
  width: 100%;
  min-height: 44px;
  padding: 0.48rem 0.6rem;
  border: 1px solid #78abd0;
  border-radius: 8px;
  background: #fff;
  color: #172737;
  font: inherit;
}

.jpl-control input[type="range"] {
  padding: 0;
  accent-color: #25b9ef;
}

.jpl-control output,
.jpl-control small {
  margin-top: 0.23rem;
  color: #9db4c9;
  font-size: 0.7rem;
}

.jpl-button {
  display: inline-flex;
  min-height: 44px;
  padding: 0.62rem 1rem;
  border: 1px solid #4fc6f1;
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  background: #087eae;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.jpl-button:hover {
  border-color: #a4e8ff;
  background: #0b91c5;
}

.jpl-button.is-playing {
  border-color: #ffdb76;
  background: #9f6811;
}

.jpl-status {
  min-height: 1.5rem;
  margin: 0.8rem auto;
  color: #d5e8f7;
  font-weight: 700;
  text-align: center;
}

.jpl-status.is-error {
  color: #ff9d90;
}

.jpl-summary {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 auto 0.8rem;
}

.jpl-summary > div {
  min-width: 10rem;
  padding: 0.52rem 0.8rem;
  border: 1px solid rgba(112, 190, 247, 0.3);
  border-radius: 10px;
  background: rgba(18, 39, 72, 0.9);
  text-align: center;
}

.jpl-summary span,
.jpl-summary strong {
  display: block;
}

.jpl-summary span {
  color: #9fb8cf;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.jpl-summary strong {
  margin-top: 0.08rem;
  color: #fff;
  font-size: 1rem;
}

.jpl-visual-wrap {
  position: relative;
  width: min(100%, 68rem);
  margin: 0 auto;
  overflow: hidden;
  border: 2px solid #378db8;
  border-radius: 17px;
  background: #020611;
  box-shadow: 0 0 0 2px rgba(68, 185, 238, 0.12),
    0 12px 32px rgba(0, 0, 0, 0.42);
}

.jpl-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 11 / 6.5;
  background: #020611;
  touch-action: none;
}

.jpl-canvas.is-rotatable {
  cursor: grab;
}

.jpl-canvas.is-rotatable:active {
  cursor: grabbing;
}

.jpl-legend {
  position: absolute;
  right: 0.7rem;
  bottom: 0.65rem;
  max-width: calc(100% - 1.4rem);
  padding: 0.42rem 0.58rem;
  border: 1px solid rgba(134, 207, 241, 0.3);
  border-radius: 8px;
  background: rgba(3, 10, 25, 0.84);
  color: #d9ebf7;
  font-size: 0.67rem;
}

.jpl-help,
.jpl-caveat,
.jpl-credit {
  max-width: 68rem;
  margin: 0.7rem auto 0;
  color: #9fb5ca;
  font-size: 0.78rem;
  text-align: center;
}

.jpl-caveat {
  padding: 0.7rem 0.85rem;
  border-left: 3px solid #4db8e5;
  background: rgba(18, 38, 68, 0.7);
  text-align: left;
}

.jpl-caveat.is-warning {
  border-left-color: #ffca5c;
  background: rgba(84, 58, 15, 0.45);
  color: #f3dfb1;
}

.jpl-credit a {
  color: #75dcff;
  font-weight: 700;
}

.jpl-data-section {
  width: min(100%, 68rem);
  margin: 1rem auto 0;
  padding: 1rem;
  border: 1px solid rgba(111, 194, 252, 0.35);
  border-radius: 14px;
  background: rgba(17, 36, 66, 0.92);
}

.jpl-data-section h2 {
  margin: 0;
  font-size: 1.35rem;
}

.jpl-table-wrap {
  margin-top: 0.75rem;
  overflow-x: auto;
  border: 1px solid rgba(116, 180, 224, 0.24);
  border-radius: 10px;
}

.jpl-table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
  color: #eff9ff;
  font-size: 0.78rem;
}

.jpl-table th,
.jpl-table td {
  padding: 0.58rem 0.65rem;
  border-bottom: 1px solid rgba(116, 180, 224, 0.18);
  text-align: left;
  vertical-align: top;
}

.jpl-table th {
  position: sticky;
  top: 0;
  background: #102a4d;
  color: #aee7ff;
  font-size: 0.67rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.jpl-table tbody tr:nth-child(even) {
  background: rgba(18, 47, 82, 0.45);
}

.jpl-table tbody tr:hover {
  background: rgba(39, 103, 146, 0.38);
}

.jpl-table button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #78ddff;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.jpl-empty {
  padding: 1rem;
  color: #b8cad9;
  text-align: center;
}

.jpl-back-link {
  display: inline-block;
  margin-bottom: 0.7rem;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 14px rgba(33, 37, 41, 0.14);
  color: #0056b3;
  font-weight: 700;
}

.jpl-back-link:hover {
  color: #003f84;
  text-decoration: none;
}

.jpl-back-link:focus-visible,
.jpl-button:focus-visible,
.jpl-control input:focus-visible,
.jpl-control select:focus-visible,
.jpl-canvas:focus-visible,
.jpl-table button:focus-visible {
  outline: 3px solid #8bdcff;
  outline-offset: 3px;
}

@media (max-width: 767.98px) {
  .jpl-panel {
    border-radius: 16px;
  }

  .jpl-controls {
    justify-content: stretch;
  }

  .jpl-control {
    flex-basis: 100%;
  }

  .jpl-button {
    width: 100%;
  }

  .jpl-summary > div {
    min-width: calc(50% - 0.4rem);
    flex: 1 1 calc(50% - 0.4rem);
  }

  .jpl-canvas {
    min-height: 25rem;
    aspect-ratio: auto;
  }

  .jpl-legend {
    position: static;
    max-width: none;
    border-width: 1px 0 0;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jpl-canvas {
    scroll-behavior: auto;
  }
}
