/* TEMA V04. Paleta y jerarquía visual; no contiene lógica astronómica.
 * Las secciones conservan su etiqueta: el color siempre acompaña al texto.
 * Sin fuentes remotas ni animaciones continuas para ahorrar recursos. */
:root {
  --page: #080d1c;
  --panel: #141e36;
  --line: #34415f;
  --text: #f2f5ff;
  --muted: #b0bdd4;
  --gold: #ffd093;
  --blue: #a1cbff;
  --green: #a0e5cc;
  --violet: #c4b5ff;
  --coral: #ffb0a3;
  --panel-blue: #152b4d;
  --panel-violet: #282044;
  --panel-green: #143a38;
  --panel-amber: #3c2c23;
}
body {
  background:
    radial-gradient(ellipse 90% 480px at 5% 0, #24356555, transparent 80%),
    radial-gradient(ellipse 70% 900px at 100% 30%, #38245824, transparent 85%),
    var(--page);
}
.app {
  max-width: 1780px;
}
.header {
  padding-bottom: 23px;
  border-bottom: 1px solid #849cd628;
}
h1 {
  font-weight: 560;
}
.eyebrow {
  color: #b9c8e6;
}
.brand-dot {
  width: 10px;
  height: 10px;
  background: var(--violet);
  box-shadow: 0 0 17px #a993ff77;
}
h1 > span {
  color: var(--violet);
}
.status {
  border: 1px solid #75bcaa42;
  border-radius: 30px;
  background: #1b483844;
  padding: 8px 12px;
}
.status[data-mode='paused'],
.status[data-mode='simulated'] {
  border-color: #efb76f44;
  background: #5c3e193d;
}
.experience-tabs {
  gap: 8px;
  margin-bottom: 15px;
}
.experience-tabs button {
  background: #151f35;
  border: 1px solid #344362;
  color: #b9c9e4;
  border-radius: 12px;
  min-height: 43px;
}
.experience-tabs button.selected {
  color: #ece8ff;
  border-color: #a692e1;
  background: linear-gradient(120deg, #3c3567, #273b61);
  box-shadow: 0 4px 20px #070b1966;
}
.experience-tabs button[data-experience='local'].selected {
  color: #d8fff2;
  border-color: #78c1b0;
  background: linear-gradient(120deg, #214945, #203652);
}
.experience-tabs button:hover {
  border-color: #abbcde;
  color: #fff;
}
.scene-shell {
  border-color: #465276;
  box-shadow: 0 10px 34px #02051055;
}
.view-tabs {
  background: #121b31ed;
  border-color: #7589b244;
}
.view-tabs button {
  color: #c0cce2;
  min-height: 35px;
}
.view-tabs button.selected {
  background: #47416e;
  color: #faf7ff;
  box-shadow: inset 0 0 0 1px #c3b3ff44;
}
.view-tabs button[data-view='earth'].selected {
  background: #244e6e;
}
.view-tabs button[data-view='terrain'].selected {
  background: #624335;
}
.body-label {
  border: 1px solid #9aaed93d;
  background: #121a2ee0;
}
.scene-footer {
  color: #b9c8e1;
  background: #0e172ce0;
  border-color: #7287b339;
}
.scene-footer > span:first-child {
  color: #d7e3f7;
}
.inspector {
  min-width: 0;
  padding: 14px;
  gap: 0;
  border-radius: 18px;
  background: linear-gradient(160deg, #1b2442, #152238 56%, #23203a);
  border: 1px solid #3c496b;
  box-shadow: 0 8px 25px #0409183d;
}
.inspector-top {
  padding: 15px 14px 18px;
  border: 1px solid #71658a;
  border-radius: 13px;
  background: linear-gradient(125deg, #403156, #283957);
  margin-bottom: 10px;
}
.inspector-top > .eyebrow {
  color: #ddcdff;
}
.date-display {
  margin-top: 13px;
  color: #dfddf9;
}
.clock-display {
  color: #fff1d8;
  font-size: 31px;
}
#time-zone {
  color: #c3cde5;
  overflow-wrap: anywhere;
}
.reading {
  margin: 0 0 8px;
  padding: 13px 14px;
  border: 1px solid #405477;
  border-radius: 11px;
  background: #1b3452;
}
.reading:nth-of-type(3) {
  background: #3a302f;
  border-color: #71604e;
}
.reading:nth-of-type(4) {
  background: #302949;
  border-color: #645583;
}
.reading > span {
  color: #c2d4ef;
  line-height: 1.5;
}
.reading:nth-of-type(3) > span {
  color: #e6cfb2;
}
.reading:nth-of-type(4) > span {
  color: #d5c8f1;
}
.reading strong {
  color: #d8ebff;
  font-size: 17px;
}
.reading:nth-of-type(3) strong {
  color: #ffe1b3;
}
.reading:nth-of-type(4) strong {
  color: #e4d9ff;
}
.scale-control {
  padding: 13px 2px 0;
}
.scale-control select {
  line-height: 1.4;
  font-size: 11px;
}
.check {
  min-height: 30px;
  line-height: 1.5;
  margin-bottom: 10px;
}
.check input {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  accent-color: #b4a1fa;
}
.check span {
  min-width: 0;
}
.button {
  background: #243554;
  border-color: #50617e;
  min-height: 40px;
}
.button:hover {
  background: #334c70;
  border-color: #8fa8cf;
}
.button.primary {
  color: #261d12;
  background: #ffd093;
  border-color: #ffe2b8;
  box-shadow: 0 3px 13px #d99a3826;
}
.button.subtle {
  color: #c8d5ed;
  background: #16203977;
  border-color: #53617c;
}
.button.subtle:hover {
  background: #2e3c58;
}
select,
input[type='datetime-local'] {
  background: #111d33;
  border-color: #536785;
  min-height: 41px;
  max-width: 100%;
}
select option {
  background: #16223a;
}
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 5px;
  border-radius: 4px;
}
.location-panel,
.calendar-panel,
.body-info {
  border-radius: 17px;
  box-shadow: 0 6px 24px #03081744;
  padding: 20px;
}
.location-panel {
  background: linear-gradient(110deg, #163c39, #14283b 78%);
  border-color: #397a73;
}
.location-panel > summary {
  color: #c4f3e3;
  font-weight: 600;
  line-height: 1.6;
}
#location-name {
  color: #e4fff6;
}
.location-panel > summary::marker {
  color: #91d9c4;
}
.solar-location {
  background: #102d325c;
  border-color: #497b7b;
  margin-bottom: 0;
}
.location-heading .eyebrow {
  color: #c4eedf;
}
.location-details summary {
  color: #b5dddc;
}
.location-help {
  color: #b0c8d3;
}
.solar-location input,
.solar-location select {
  background: #112c38;
  border-color: #5b7b8f;
}
.location-form button {
  background: #265e5a;
  border-color: #73aaa0;
  color: #e7fff7;
}
.calendar-panel {
  background: linear-gradient(115deg, #262345, #17253e 68%);
  border-color: #625987;
}
.calendar-panel > summary {
  color: #dfd4ff;
  font-weight: 600;
  line-height: 1.6;
}
.calendar-panel > summary::marker {
  color: #c3afff;
}
.calendar-panel > div {
  margin-top: 22px;
}
.body-info {
  background: linear-gradient(115deg, #1e3150, #24243e);
  border-color: #4a6082;
}
.info-heading [data-info='sun'] {
  border-color: #8c6b3f;
  color: var(--gold);
}
.info-heading [data-info='earth'] {
  border-color: #547c9f;
  color: var(--blue);
}
.info-heading [data-info='moon'] {
  border-color: #8673ab;
  color: var(--violet);
}
.info-heading [data-info='sun'][aria-pressed='true'] {
  background: #604827;
}
.info-heading [data-info='earth'][aria-pressed='true'] {
  background: #235271;
}
.info-heading [data-info='moon'][aria-pressed='true'] {
  background: #4a3969;
}
.info-content {
  border-color: #7187b144;
}
.info-content p {
  color: #c5d3e9;
}
.info-measurements {
  background: #183f515f;
  border: 1px solid #527a91;
}
.appearance-controls,
.sky-controls,
.lunar-controls,
.performance-controls {
  --section-color: #bcb2f1;
  grid-column: 1 / -1;
  margin-top: 13px;
  padding: 13px 12px;
  min-width: 0;
  border: 1px solid #716289;
  border-radius: 12px;
  background: #332c4c;
}
.appearance-controls {
  background: #243e58;
  border-color: #527493;
  --section-color: #badfff;
}
.sky-controls {
  background: #32294f;
  border-color: #78679e;
}
.lunar-controls {
  background: #443139;
  border-color: #936976;
  --section-color: #ffd1be;
}
.performance-controls {
  background: #214442;
  border-color: #578782;
  --section-color: #b5ecd9;
}
.appearance-controls summary,
.sky-controls summary,
.lunar-controls summary,
.performance-controls summary {
  color: var(--section-color);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  line-height: 1.5;
}
.appearance-controls summary::marker,
.sky-controls summary::marker,
.lunar-controls summary::marker,
.performance-controls summary::marker {
  color: var(--section-color);
}
:is(.sky-controls, .lunar-controls, .performance-controls) label:not(.check) {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: #d0dcef;
  margin: 13px 0;
}
:is(.sky-controls, .lunar-controls, .performance-controls) select {
  width: 100%;
}
:is(.sky-controls, .lunar-controls, .performance-controls) p {
  color: #c0cbdf;
  font-size: 11px;
  line-height: 1.65;
}
:is(.sky-controls, .lunar-controls, .performance-controls) .check {
  margin-top: 13px;
  color: #e2e6f5;
}
.appearance-slider {
  color: #c4d7ee;
}
.appearance-controls .muted {
  color: #c0d2e7;
}
.terrain-controls {
  background: #45382d;
  border: 1px solid #857057;
  padding: 13px 12px 5px;
  border-radius: 12px;
  margin-bottom: 14px;
}
.terrain-controls label {
  color: #f0dabd;
}
.terrain-controls p {
  color: #d2c6b8;
}
#eclipse-reading {
  border-left: 2px solid var(--coral);
  padding-left: 10px;
  color: #ffd1b3;
}
#eclipse-reading:empty {
  display: none;
}
#guide-legend {
  color: #c0cce3;
}
.timeline {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid #856246;
  background: linear-gradient(115deg, #46322c, #25263e 62%, #1b2d44);
  gap: 18px;
}
.timeline :is(.speed-field, .date-field) {
  color: #e4d3c0;
}
.timeline .time-buttons {
  padding-top: 20px;
}
.timeline-hint {
  color: #c5ccdf;
}
.event-transport {
  border-color: #91704d;
  background: linear-gradient(110deg, #403028, #242d45);
}
.event-transport output {
  color: #d0d8e8;
}
#sky-clock {
  color: #c7daf4;
}
.sky-panorama-panel {
  border-color: #536888;
  background: #152744;
}
.sky-panorama-meta {
  background: #24455b80;
  color: #c0d5ed;
}
.sky-panorama-footer,
.sky-note,
.sky-small,
.sky-moon-caption {
  color: #b0c2da;
}
.sky-moon-panel {
  background: linear-gradient(145deg, #3b3157, #1d3047 65%);
  border-color: #74668e;
}
.sky-visibility {
  color: #c4cfe2;
}
.sky-event {
  background: #24334d;
  border-color: #4d6185;
}
.sky-event:nth-child(even) {
  background: #383048;
  border-color: #746084;
}
.sky-event > span:nth-child(2),
.sky-event small {
  color: #c5d1e7;
}
.sky-event-icon {
  color: #fbd094;
}
.sky-actions button {
  background: #25435d;
  border-color: #597d9e;
}
.sky-actions button[aria-pressed='true'] {
  background: #265754;
  border-color: #77baab;
  color: #d7fff0;
}
.footnote {
  color: #a0b0cd;
}
dialog {
  background: linear-gradient(140deg, #252b46, #14243b);
  border-color: #7a719f;
}
dialog p {
  color: #c8d5e9;
}
@media (min-width: 1450px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 292px;
    gap: 22px;
  }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 244px;
    gap: 16px;
  }
  .inspector {
    padding: 11px;
  }
  .clock-display {
    font-size: 27px;
  }
}
@media (max-width: 760px) {
  .header {
    padding-bottom: 18px;
    margin-bottom: 19px;
  }
  .status {
    padding: 6px 8px;
  }
  .inspector {
    padding: 12px;
    gap: 9px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inspector-top {
    margin: 0;
    grid-row: span 2;
    padding: 14px 10px;
  }
  .reading {
    margin: 0;
    padding: 11px;
  }
  .reading strong {
    font-size: 15px;
  }
  .scale-control {
    padding-top: 10px;
  }
  .inspector > .check,
  .inspector > #guide-legend,
  .inspector > #eclipse-reading {
    grid-column: 1 / -1;
    margin-top: 4px;
    margin-bottom: 3px;
  }
  .inspector > .button {
    grid-column: 1 / -1;
    margin-top: 5px;
  }
  .appearance-controls,
  .sky-controls,
  .lunar-controls,
  .performance-controls {
    margin-top: 3px;
  }
  .appearance-controls .check {
    margin-top: 12px;
  }
  .timeline {
    padding: 15px;
    gap: 14px;
    align-items: flex-end;
  }
  .timeline .time-buttons {
    padding-top: 0;
  }
  .timeline .speed-field {
    min-width: 0;
  }
  .timeline .speed-field select {
    min-width: 0;
    width: 100%;
  }
  .timeline .date-field input {
    min-width: 0;
  }
  .location-panel,
  .calendar-panel,
  .body-info {
    padding: 16px;
  }
  .scene-shell {
    box-shadow: none;
  }
}
@media (max-width: 400px) {
  .app {
    padding: 17px 10px;
  }
  .header {
    gap: 8px;
  }
  h1 {
    font-size: 23px;
  }
  .header-right {
    gap: 7px;
  }
  .status {
    font-size: 9px;
    padding: 5px 7px;
  }
  .experience-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .experience-tabs button {
    font-size: 11px;
    padding: 9px 8px;
  }
  .inspector {
    padding: 10px;
    gap: 8px;
  }
  .clock-display {
    font-size: 25px;
  }
  .date-display {
    font-size: 13px;
  }
  .reading {
    padding: 10px;
  }
  .reading > span {
    font-size: 11px;
  }
  .view-tabs {
    left: 9px;
    right: 9px;
    padding: 4px;
    gap: 3px;
  }
  .view-tabs button {
    padding: 8px 7px;
    min-height: 33px;
  }
  .timeline .time-buttons {
    width: 100%;
  }
  .timeline .time-buttons .button {
    flex: 1;
  }
  .timeline .speed-field {
    width: 100%;
    flex: auto;
  }
  .location-panel,
  .calendar-panel,
  .body-info {
    padding: 14px;
  }
  .info-heading nav .button {
    padding: 9px 11px;
  }
  .info-heading nav .button:last-child {
    white-space: normal;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
/* Nombres opcionales sobre la Luna: ubicaciones, no objetos añadidos al terreno. */
.lunar-site-label {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  pointer-events: auto;
  max-width: 215px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #a88cdc;
  border-radius: 9px;
  background: #201c3af2;
  color: #f2eaff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
  text-shadow: 0 1px 2px #000b;
  box-shadow:
    0 0 0 1px #080b14a6,
    0 2px 9px #000b;
}
.lunar-site-label::before {
  content: '';
  display: inline-block;
  vertical-align: 1px;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
}
.lunar-site-label[data-kind='landings'] {
  color: #ffe5bf;
  background: #35271bf2;
  border-color: #d2aa6b;
}
.lunar-site-label[data-kind='landings']::before {
  border-radius: 1px;
  transform: rotate(45deg);
}
.lunar-site-label:hover {
  background: #423261;
  border-color: #e2ccff;
  color: #fff;
}
.lunar-site-label[data-kind='landings']:hover {
  background: #694825;
  border-color: #ffe5ae;
}
.lunar-site-label:focus-visible {
  outline: 2px solid #f4f5ff;
  outline-offset: 3px;
}
/* Un nombre desplazado conserva su ancla geográfica mediante esta línea. */
.lunar-site-label {
  width: max-content;
}
.lunar-site-connector {
  position: absolute;
  left: 0;
  top: 0;
  height: 1px;
  z-index: 1;
  pointer-events: none;
  transform-origin: 0 50%;
  background: #c5a3ffc9;
  box-shadow: 0 1px 1px #080d19aa;
}
.lunar-site-connector[data-kind='landings'] {
  background: #ffc477cf;
}
@container (max-width: 580px) {
  .lunar-site-label {
    max-width: 180px;
    font-size: 14px;
  }
}
