/* Galassia delle news — galassia.php (IT/EN), motore in /js/galaxy.js */
.galaxy-page { padding-top: var(--header-height); }
.galaxy-stage {
  position: relative;
  height: calc(100dvh - var(--header-height));
  min-height: 460px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(0, 212, 255, 0.06), transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(139, 92, 246, 0.07), transparent 70%),
    radial-gradient(ellipse 35% 30% at 85% 15%, rgba(244, 63, 94, 0.04), transparent 70%),
    #05050b;
  isolation: isolate;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  touch-action: none;
}
.galaxy-canvas {
  position: absolute;
  inset: 0;
  cursor: grab;
  opacity: 0;
  transition: opacity 1s ease, filter 0.5s ease;
}
/* Livelli: stelle di fondo (parallasse) · nebulose · stelle · effetti */
.galaxy-deep, .galaxy-nebula, .galaxy-fx { position: absolute; left: 0; top: 0; pointer-events: none; }
.galaxy-deep { opacity: 0; transition: opacity 2s ease 0.3s; will-change: transform; }
.galaxy-stage.is-ready .galaxy-deep { opacity: 0.9; }
.galaxy-nebula { width: 512px; height: 512px; transform-origin: 0 0; will-change: transform, opacity; }
.galaxy-fx { z-index: 1; }
/* Vignettatura: profondità ai bordi */
.galaxy-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 75% 70% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.55));
  pointer-events: none;
  z-index: 1;
}
/* Lampo: istantanea salvata / salto nell'iperspazio */
.galaxy-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(210, 245, 255, 0.9), rgba(0, 212, 255, 0.25) 40%, transparent 75%);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
  transition: opacity 0.45s ease;
}
.galaxy-stage.is-warping::after { opacity: 1; transition-delay: 0.2s; }
.galaxy-stage.is-flash::after { opacity: 0.35; transition-duration: 0.08s; }
.galaxy-stage.is-warping .galaxy-canvas { filter: brightness(1.8) blur(1px); }
.galaxy-stage.is-warping .galaxy-controls, .galaxy-stage.is-warping .galaxy-card, .galaxy-stage.is-warping .galaxy-intro { opacity: 0; transition: opacity 0.3s ease; }
.galaxy-stage.is-ready .galaxy-canvas { opacity: 1; }
.galaxy-canvas.is-dragging { cursor: grabbing; }

.galaxy-labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; transition: opacity 0.8s ease; }
.galaxy-stage.is-intro .galaxy-labels { opacity: 0; }
.galaxy-label {
  position: absolute;
  left: 0; top: 0;
  font-family: var(--font-display);
  font-size: calc(0.8rem * var(--s, 1));
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(232, 232, 240, 0.78);
  text-decoration: none;
  text-shadow: 0 0 6px rgba(6, 6, 12, 0.95), 0 0 14px rgba(6, 6, 12, 0.8);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.25s ease, color 0.2s ease, letter-spacing 0.3s ease;
  pointer-events: none;
}
.galaxy-label.is-on { opacity: 1; pointer-events: auto; }
.galaxy-label.is-hl { color: var(--brand); letter-spacing: 0.09em; text-shadow: 0 0 10px rgba(0, 212, 255, 0.6), 0 0 6px rgba(6, 6, 12, 0.95); }
@media (hover: hover) { .galaxy-label.is-on:hover { color: var(--brand); letter-spacing: 0.09em; text-shadow: 0 0 10px rgba(0, 212, 255, 0.6), 0 0 6px rgba(6, 6, 12, 0.95); } }
.galaxy-label.is-followed::before { content: '★ '; color: #facc15; }

.galaxy-intro {
  position: absolute;
  z-index: 2;
  transition: opacity 0.4s ease;
  top: clamp(0.75rem, 2.5vh, 1.5rem);
  left: clamp(0.75rem, 2.5vw, 1.75rem);
  max-width: 24rem;
  pointer-events: none;
}
.galaxy-intro h1 {
  font-family: var(--font-display);
  background: linear-gradient(100deg, #f4f4fb 0%, #f4f4fb 38%, #7fe8ff 48%, #c4b5fd 54%, #f4f4fb 64%, #f4f4fb 100%);
  background-size: 250% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.15;
  margin-bottom: 0.4rem;
}
.galaxy-intro p { font-size: 0.9rem; line-height: 1.5; color: var(--white-dim); text-shadow: 0 0 8px var(--black); }
.galaxy-intro .galaxy-hint { font-size: 0.75rem; opacity: 0.75; margin-top: 0.35rem; }
.galaxy-hint kbd {
  display: inline-block;
  min-width: 1.2em;
  padding: 0 0.3em;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-bottom-width: 2px;
  border-radius: 4px;
  font: inherit;
  font-size: 0.7rem;
  line-height: 1.35;
  text-align: center;
}

.galaxy-tip {
  position: absolute;
  left: 0; top: 0;
  max-width: 290px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(12, 13, 23, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md), 0 0 24px rgba(0, 212, 255, 0.08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 0.85rem;
  line-height: 1.35;
  pointer-events: none;
  z-index: 3;
}
.galaxy-tip strong { font-weight: 600; color: var(--white); }
.galaxy-tip-cat { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c); font-weight: 600; }
.galaxy-tip-meta { font-size: 0.74rem; color: var(--white-dim); }

.galaxy-controls {
  position: absolute;
  left: 50%;
  bottom: clamp(0.75rem, 2.5vh, 1.25rem);
  transform: translateX(-50%);
  width: min(760px, calc(100% - 1.5rem));
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-lg);
  background: rgba(12, 13, 23, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  z-index: 3;
  transition: opacity 0.3s ease;
}
.galaxy-row { display: flex; align-items: center; gap: 0.5rem; }
.galaxy-search { flex: 1; position: relative; }
.galaxy-count {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
  pointer-events: none;
}
.galaxy-count.is-zero { color: #f87171; }
.galaxy-search input::-webkit-search-cancel-button { margin-right: 2.2rem; }
.galaxy-search input {
  width: 100%;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font: inherit;
  font-size: 0.9rem;
}
.galaxy-search input:focus { outline: none; border-color: var(--brand); }
.galaxy-btn {
  flex: none;
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.3s ease, transform 0.2s ease;
}
.galaxy-btn:active { transform: scale(0.92); }
.galaxy-tour[aria-pressed="true"] { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 14px rgba(0, 212, 255, 0.45); }
.galaxy-btn:focus-visible { border-color: var(--brand); color: var(--brand); }
@media (hover: hover) { .galaxy-btn:hover { border-color: var(--brand); color: var(--brand); } }
.galaxy-play[aria-pressed="true"] { border-color: var(--brand); color: var(--brand); }
/* Linea del tempo: istogramma delle pubblicazioni sotto il cursore */
.galaxy-track { position: relative; flex: 1; height: 1.9rem; }
.galaxy-hist { position: absolute; left: 7px; right: 7px; top: 0; bottom: 0; width: calc(100% - 14px); height: 100%; pointer-events: none; }
.galaxy-range {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.galaxy-range:focus { outline: none; }
.galaxy-range::-webkit-slider-runnable-track { height: 100%; background: linear-gradient(transparent calc(100% - 1px), rgba(255, 255, 255, 0.14) 0); }
.galaxy-range::-moz-range-track { height: 100%; background: linear-gradient(transparent calc(100% - 1px), rgba(255, 255, 255, 0.14) 0); }
.galaxy-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 3px; height: 100%;
  border-radius: 2px;
  background: var(--brand);
  box-shadow: 0 0 10px var(--brand), 0 0 3px #fff;
}
.galaxy-range::-moz-range-thumb { width: 3px; height: 100%; border: 0; border-radius: 2px; background: var(--brand); box-shadow: 0 0 10px var(--brand); }
.galaxy-range:focus-visible::-webkit-slider-thumb { width: 5px; }
.galaxy-date { flex: none; min-width: 7.5rem; text-align: right; font-size: 0.8rem; color: var(--white-dim); font-variant-numeric: tabular-nums; }
.galaxy-cats { display: flex; gap: 0.35rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 0.1rem; }
.galaxy-cats::-webkit-scrollbar { display: none; }
.galaxy-cat {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--white-dim);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}
.galaxy-cat::before { content: ''; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px var(--c); }
.galaxy-cat[aria-pressed="false"] { opacity: 0.4; }
.galaxy-cat[aria-pressed="false"]::before { box-shadow: none; }
@media (hover: hover) { .galaxy-cat:hover { color: var(--white); } }

.galaxy-noscript, .galaxy-stage.is-error::after {
  position: absolute; inset: 40% 1rem auto; text-align: center; color: var(--white-dim);
}
.galaxy-stage.is-error::after { content: "⚠"; font-size: 2rem; opacity: 1; background: none; }

.galaxy-list { padding-top: clamp(2rem, 5vh, 3rem); padding-bottom: clamp(2rem, 5vh, 3rem); }
.galaxy-list h2 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 0.5rem; }
.galaxy-list > p { color: var(--white-dim); max-width: 46rem; margin-bottom: 1.25rem; font-size: 0.95rem; }
.galaxy-list ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.galaxy-list li a {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  text-decoration: none;
  font-size: 0.88rem;
}
@media (hover: hover) { .galaxy-list li a:hover { border-color: var(--brand); color: var(--brand); } }
.galaxy-list li span { font-size: 0.75rem; color: var(--white-dim); margin-left: 0.15rem; }

@media (max-width: 600px) {
  .galaxy-intro { max-width: calc(100% - 1.5rem); }
  .galaxy-intro p:not(.galaxy-hint) { display: none; }
  .galaxy-date { min-width: 5.5rem; font-size: 0.72rem; }
  .galaxy-tip { max-width: 230px; }
}
.galaxy-ring {
  position: absolute;
  left: 0; top: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--brand);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
  pointer-events: none;
  z-index: 2;
}
@media (prefers-reduced-motion: no-preference) {
  .galaxy-ring { animation: galaxy-ring 1.8s ease-in-out infinite; }
  @keyframes galaxy-ring { 50% { width: 30px; height: 30px; opacity: 0.6; } }
}
.galaxy-hint--touch { display: none; }
@media (pointer: coarse) {
  .galaxy-hint--mouse { display: none; }
  .galaxy-hint--touch { display: block; }
}
@media (max-width: 600px) {
  /* sopra il pulsante del chatbot */
  .galaxy-controls { bottom: 5rem; }
}
html[data-theme="light"] .galaxy-intro p { text-shadow: none; }
html[data-theme="light"] .galaxy-label { color: rgba(20, 22, 40, 0.85); text-shadow: 0 0 6px #fff, 0 0 12px #fff; }
html[data-theme="light"] .galaxy-cat::before { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }

/* Scheda della notizia selezionata: costellazione dei vicini */
.galaxy-card {
  position: absolute;
  top: clamp(0.75rem, 2.5vh, 1.25rem);
  right: clamp(0.75rem, 2vw, 1.25rem);
  width: min(340px, calc(100% - 1.5rem));
  max-height: calc(100% - 13rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 1.05rem 1.1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(20, 22, 40, 0.92), rgba(9, 10, 20, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 212, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  z-index: 3;
  scrollbar-width: thin;
}
.galaxy-card-x {
  position: absolute;
  top: 0.45rem; right: 0.5rem;
  width: 1.9rem; height: 1.9rem;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--white-dim);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
@media (hover: hover) { .galaxy-card-x:hover { color: var(--white); background: rgba(255, 255, 255, 0.06); } }
.galaxy-card .galaxy-tip-cat { padding-right: 2rem; }
.galaxy-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--white);
  text-decoration: none;
}
@media (hover: hover) { .galaxy-card-title:hover { color: var(--brand); } }
.galaxy-card .galaxy-tip-meta { margin: 0; }
.galaxy-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.galaxy-chip {
  padding: 0.12rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white-dim);
  font-size: 0.72rem;
  text-decoration: none;
}
@media (hover: hover) { .galaxy-chip:hover { color: var(--brand); border-color: var(--brand); } }
.galaxy-card-open {
  align-self: flex-start;
  margin-top: 0.2rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #00d4ff, #7c83ff);
  color: #05050b;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.35);
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}
@media (hover: hover) { .galaxy-card-open:hover { box-shadow: 0 0 28px rgba(0, 212, 255, 0.6); transform: translateY(-1px); } }
.galaxy-card-open span { display: inline-block; transition: transform 0.2s ease; }
@media (hover: hover) { .galaxy-card-open:hover span { transform: translateX(3px); } }
.galaxy-card-h {
  margin-top: 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white-dim);
}
.galaxy-near { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.galaxy-near button {
  width: 100%;
  display: grid;
  grid-template-columns: 0.5rem 1fr;
  column-gap: 0.55rem;
  padding: 0.4rem 0.45rem;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}
.galaxy-near button::before {
  content: '';
  grid-row: span 2;
  width: 0.45rem; height: 0.45rem;
  margin-top: 0.3rem;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
}
.galaxy-near button:focus-visible { background: rgba(255, 255, 255, 0.05); }
@media (hover: hover) { .galaxy-near button:hover { background: rgba(255, 255, 255, 0.05); } }
.galaxy-near small { color: var(--white-dim); font-size: 0.7rem; }

/* Didascalia del viaggio guidato */
.galaxy-caption {
  position: absolute;
  left: 50%;
  bottom: calc(clamp(0.75rem, 2.5vh, 1.25rem) + 9.5rem);
  transform: translateX(-50%);
  width: min(560px, calc(100% - 2rem));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  text-align: center;
  pointer-events: none;
  z-index: 3;
}
.galaxy-caption a { pointer-events: auto; text-decoration: none; }
.galaxy-caption-k { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--brand); }
.galaxy-caption-t {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--white);
  text-shadow: 0 0 24px rgba(0, 212, 255, 0.45), 0 0 8px rgba(6, 6, 12, 0.9);
}
.galaxy-caption-n { font-size: 0.85rem; color: var(--white-dim); text-shadow: 0 0 8px var(--black); }
.galaxy-caption-l {
  max-width: 100%;
  margin-top: 0.35rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(12, 13, 23, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (hover: hover) { .galaxy-caption-l:hover { color: var(--brand); } }

@media (prefers-reduced-motion: no-preference) {
  .galaxy-stage.is-ready .galaxy-intro h1 { animation: galaxy-shimmer 3.2s ease 0.6s both; }
  @keyframes galaxy-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
  .galaxy-stage.is-ready .galaxy-controls { animation: galaxy-rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.9s both; }
  @keyframes galaxy-rise { from { opacity: 0; transform: translate(-50%, 16px); } }
  .galaxy-card:not([hidden]) { animation: galaxy-card-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
  @keyframes galaxy-card-in { from { opacity: 0; transform: translateX(14px) scale(0.98); } }
  .galaxy-caption.is-in > * { animation: galaxy-cap-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .galaxy-caption.is-in > :nth-child(2) { animation-delay: 0.08s; }
  .galaxy-caption.is-in > :nth-child(3) { animation-delay: 0.16s; }
  .galaxy-caption.is-in > :nth-child(4) { animation-delay: 0.3s; }
  @keyframes galaxy-cap-in { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } }
  @media (hover: hover) { .galaxy-tour[aria-pressed="false"]:not(:hover) { animation: galaxy-glint 5s ease-in-out 3s infinite; } }
  @keyframes galaxy-glint { 0%, 88%, 100% { box-shadow: none; } 94% { box-shadow: 0 0 14px rgba(0, 212, 255, 0.55); color: var(--brand); } }
}
.galaxy-stage.is-touring .galaxy-intro { opacity: 0; }
@media (max-width: 600px) {
  .galaxy-card {
    top: 0.6rem; left: 0.6rem; right: 0.6rem;
    width: auto;
    max-height: 42%;
  }
  .galaxy-stage.has-card .galaxy-intro { opacity: 0; }
  @media (prefers-reduced-motion: no-preference) {
    .galaxy-card:not([hidden]) { animation-name: galaxy-card-up; }
    @keyframes galaxy-card-up { from { opacity: 0; transform: translateY(-10px); } }
  }
  .galaxy-caption { bottom: calc(5rem + 10rem); }
  .galaxy-shot { display: none; }
}
@media (pointer: coarse) { .galaxy-intro .galaxy-hint kbd { display: none; } }

/* Tema chiaro */
html[data-theme="light"] .galaxy-stage { background: radial-gradient(ellipse 60% 50% at 50% 45%, rgba(0, 137, 173, 0.07), transparent 70%), radial-gradient(ellipse 40% 40% at 20% 80%, rgba(139, 92, 246, 0.07), transparent 70%), #f7f8fc; }
html[data-theme="light"] .galaxy-stage .galaxy-deep { display: none; }
html[data-theme="light"] .galaxy-stage::before { background: radial-gradient(ellipse 75% 70% at 50% 45%, transparent 60%, rgba(40, 50, 90, 0.08)); }
html[data-theme="light"] .galaxy-stage .galaxy-intro h1 { background-image: linear-gradient(100deg, #14162a 0%, #14162a 38%, #0089ad 48%, #6d28d9 54%, #14162a 64%, #14162a 100%); color: transparent; }
html[data-theme="light"] .galaxy-stage .galaxy-card { background: rgba(255, 255, 255, 0.94); border-color: rgba(20, 22, 40, 0.1); box-shadow: 0 18px 50px rgba(20, 22, 40, 0.18); }
html[data-theme="light"] .galaxy-stage .galaxy-controls { box-shadow: 0 10px 40px rgba(20, 22, 40, 0.15); }
@media (hover: hover) { html[data-theme="light"] .galaxy-stage .galaxy-near button:hover { background: rgba(20, 22, 40, 0.05); } }
html[data-theme="light"] .galaxy-stage .galaxy-caption-t { text-shadow: 0 0 18px #fff, 0 0 6px #fff; }
html[data-theme="light"] .galaxy-stage .galaxy-caption-l { background: rgba(255, 255, 255, 0.9); border-color: rgba(20, 22, 40, 0.1); }
html[data-theme="light"] .galaxy-stage .galaxy-label.is-hl { text-shadow: 0 0 6px #fff, 0 0 12px #fff; }
html[data-theme="light"] .galaxy-stage .galaxy-hint kbd { border-color: rgba(20, 22, 40, 0.3); }
html[data-theme="light"] .galaxy-stage .galaxy-range::-webkit-slider-runnable-track { background: linear-gradient(transparent calc(100% - 1px), rgba(20, 22, 40, 0.18) 0); }
html[data-theme="light"] .galaxy-stage::after { background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.95), rgba(0, 137, 173, 0.15) 40%, transparent 75%); }
.galaxy-stage [hidden] { display: none !important; }
html[data-theme="light"] .galaxy-stage .galaxy-label { color: rgba(20, 22, 40, 0.85); text-shadow: 0 0 6px #fff, 0 0 12px #fff; }
html[data-theme="light"] .galaxy-stage .galaxy-label.is-hl { color: #0089ad; }
@media (hover: hover) { html[data-theme="light"] .galaxy-stage .galaxy-label.is-on:hover { color: #0089ad; } }
html[data-theme="light"] .galaxy-stage .galaxy-card-open { color: #05050b; }
html[data-theme="light"] .galaxy-stage .galaxy-card-title { color: #14162a; }
@media (hover: hover) { html[data-theme="light"] .galaxy-stage .galaxy-card-title:hover { color: #0089ad; } }
html[data-theme="light"] .galaxy-stage .galaxy-chip { color: #3b3f5c; border-color: rgba(20, 22, 40, 0.15); }
/* Nomi delle categorie al primo livello */
.galaxy-label--cat {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--c);
  text-shadow: 0 0 14px color-mix(in srgb, var(--c) 55%, transparent), 0 0 4px rgba(6, 6, 12, 0.95), 0 0 10px rgba(6, 6, 12, 0.8);
  transition: opacity 0.4s ease, letter-spacing 0.3s ease, filter 0.3s ease;
}
.galaxy-label--cat.is-on { opacity: 0.92; }
.galaxy-label--cat.is-hl { color: var(--c); letter-spacing: 0.3em; opacity: 1; filter: brightness(1.25); text-shadow: 0 0 18px var(--c), 0 0 4px rgba(6, 6, 12, 0.95); }
@media (hover: hover) { .galaxy-label--cat.is-on:hover { color: var(--c); letter-spacing: 0.3em; opacity: 1; filter: brightness(1.25); text-shadow: 0 0 18px var(--c), 0 0 4px rgba(6, 6, 12, 0.95); } }
@media (max-width: 600px) { .galaxy-label--cat { font-size: 0.66rem; letter-spacing: 0.16em; } }
html[data-theme="light"] .galaxy-stage .galaxy-label--cat { color: #14162a; text-shadow: 0 0 6px #fff, 0 0 12px #fff; }
html[data-theme="light"] .galaxy-stage .galaxy-label--cat::before { content: ''; display: inline-block; width: 0.5em; height: 0.5em; margin-right: 0.45em; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); vertical-align: 0.1em; }
html[data-theme="light"] .galaxy-stage .galaxy-label--cat.is-hl { color: #0089ad; filter: none; }
@media (hover: hover) { html[data-theme="light"] .galaxy-stage .galaxy-label--cat.is-on:hover { color: #0089ad; filter: none; } }
/* Tunnel del tempo 3D */
.galaxy-3d { font-family: var(--font-display); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; }
.galaxy-3d[aria-pressed="true"] { border-color: var(--brand); color: #05050b; background: var(--brand); box-shadow: 0 0 16px rgba(0, 212, 255, 0.55); }
.galaxy-stage.is-3d .galaxy-intro { opacity: 0.35; }
@media (hover: hover) { .galaxy-stage.is-3d .galaxy-intro:hover { opacity: 1; } }
/* Filtri categoria: su schermi ampi vanno a capo (tutti visibili), su mobile scorrono con sfumatura a destra */
@media (min-width: 601px) {
  .galaxy-cats { flex-wrap: wrap; justify-content: center; overflow: visible; row-gap: 0.3rem; }
  .galaxy-cat { padding: 0.2rem 0.55rem; font-size: 0.72rem; }
}
@media (max-width: 600px) {
  .galaxy-cats {
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
    padding-right: 1.5rem;
  }
}

/* Lazo: zona selezionata con riepilogo */
.galaxy-lasso[aria-pressed="true"] { border-color: var(--brand); color: #05050b; background: var(--brand); box-shadow: 0 0 16px rgba(0, 212, 255, 0.55); }
.galaxy-stage.is-lasso .galaxy-canvas { cursor: crosshair; }
.galaxy-area-n { font-size: 1.35rem; }
.galaxy-area-bar { display: flex; gap: 2px; height: 8px; border-radius: 999px; overflow: hidden; }
.galaxy-area-bar span { background: var(--c); min-width: 3px; box-shadow: 0 0 10px var(--c); }
.galaxy-area-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; font-size: 0.74rem; color: var(--white-dim); }
.galaxy-area-legend li::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c); margin-right: 0.35rem; vertical-align: 1px; }
.galaxy-area-legend a { color: var(--white); text-decoration: none; }
@media (hover: hover) { .galaxy-area-legend a:hover { color: var(--brand); } }
.galaxy-chip small { opacity: 0.6; font-size: 0.85em; margin-left: 0.15rem; }
html[data-theme="light"] .galaxy-stage .galaxy-area-legend a { color: #14162a; }
html[data-theme="light"] .galaxy-stage .galaxy-area-bar span { box-shadow: none; }
