/* ============================================================================
   ruhmeshalle.css — Was du noch holen kannst
   ----------------------------------------------------------------------------
   Die Halle ist ein ORT, kein Raster (Tim, 15.08.2026: die Untergrund-
   Inszenierung als Vorbild). Deshalb grosse Zahlen, ruhige Flaechen und
   Karten, die man einzeln liest — nicht 299 Kacheln nebeneinander.

   Farben ausschliesslich ueber Tokens. Die einzigen harten Werte sind die
   vier Tier-Farben: Bronze, Silber, Gold und Platin BEDEUTEN etwas ueber die
   Daten und gehoeren damit zu den Datenfarben (CLAUDE.md §9). Sie stehen so
   auch in achievement-database.js.
   ========================================================================== */

.rh-halle {
  display: flex;
  flex-direction: column;
  gap: var(--tc-space-6, 24px);
}

/* --------------------------------------------------------------- Gesamtstand */

.rh-stand {
  padding: var(--tc-space-5, 20px);
  border: 1px solid var(--tc-border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: var(--tc-radius-lg, 12px);
  background: var(--tc-bg-surface-1, #242424);
  text-align: center;
}

.rh-stand__zahl {
  font-family: var(--tc-font-display, Cinzel, serif);
  font-size: clamp(2.4rem, 9vw, 3.6rem);
  line-height: 1;
  color: var(--tc-highlight, #d4c4a0);
  text-shadow: 0 0 28px var(--tc-highlight-glow, rgba(212, 196, 160, 0.25));
}

.rh-stand__zahl span {
  display: block;
  margin-top: 4px;
  font-family: var(--tc-font-body, inherit);
  font-size: 0.9rem;
  color: var(--tc-text-muted, #9e9e9e);
  text-shadow: none;
}

.rh-stand__balken,
.rh-fortschritt {
  height: 8px;
  border-radius: 999px;
  background: var(--tc-bg-surface-3, #3a3a3a);
  overflow: hidden;
}

.rh-stand__balken { margin: var(--tc-space-4, 16px) 0 var(--tc-space-3, 12px); }

.rh-stand__balken > span,
.rh-fortschritt > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tc-accent, #a1917a), var(--tc-highlight, #d4c4a0));
  /* Der Balken waechst beim Oeffnen — die einzige Bewegung auf der Seite,
     und sie zeigt genau das, worum es hier geht. */
  animation: rh-wachsen 900ms var(--tc-ease-out, ease-out) both;
}

@keyframes rh-wachsen { from { transform: scaleX(0); transform-origin: left; } }

.rh-stand__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--tc-text-muted, #9e9e9e);
}

.rh-stand__tiers {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--tc-space-4, 16px);
  margin-top: var(--tc-space-4, 16px);
  padding-top: var(--tc-space-4, 16px);
  border-top: 1px solid var(--tc-border-subtle, rgba(255, 255, 255, 0.1));
}

.rh-tier { display: flex; flex-direction: column; align-items: center; min-width: 62px; }
.rh-tier__icon  { font-size: 1.2rem; }
.rh-tier__zahl  { font-family: var(--tc-font-display, Cinzel, serif); font-size: 1.05rem; color: var(--tc-text-strong, #e0e0e0); }
.rh-tier__label { font-size: 0.7rem; color: var(--tc-text-muted, #9e9e9e); }

/* ------------------------------------------------------------------- Saison */

.rh-saison {
  padding: var(--tc-space-5, 20px);
  border: 1px solid var(--tc-accent, #a1917a);
  border-radius: var(--tc-radius-lg, 12px);
  background: var(--tc-bg-surface-1, #242424);
}

/* Die letzten vierzehn Tage waermer — dieselbe Regel wie beim Saisonband im
   Dashboard-Kopf, damit dasselbe Signal ueberall gleich aussieht. */
.rh-saison--knapp {
  border-color: var(--tc-warning, #fbbf24);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.07), transparent 60%),
              var(--tc-bg-surface-1, #242424);
}

.rh-saison__kopf {
  display: flex;
  align-items: center;
  gap: var(--tc-space-3, 12px);
  margin-bottom: var(--tc-space-4, 16px);
}

.rh-saison__icon { font-size: 2rem; line-height: 1; }
.rh-saison__kopf h2 { margin: 0; font-size: 1.15rem; color: var(--tc-text-strong, #e0e0e0); }
.rh-saison__kopf p  { margin: 2px 0 0; font-size: 0.85rem; color: var(--tc-text-muted, #9e9e9e); }

/* -------------------------------------------------------------------- Bloecke */

.rh-block__titel {
  display: flex;
  align-items: baseline;
  gap: var(--tc-space-2, 8px);
  margin: 0 0 var(--tc-space-3, 12px);
  font-size: 1.1rem;
  color: var(--tc-text-strong, #e0e0e0);
}

.rh-block__stand {
  margin-left: auto;
  font-family: var(--tc-font-display, Cinzel, serif);
  font-size: 0.9rem;
  color: var(--tc-text-muted, #9e9e9e);
}

.rh-block__text {
  margin: 0 0 var(--tc-space-3, 12px);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--tc-text-muted, #9e9e9e);
}

.rh-liste {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--tc-space-3, 12px);
}

@media (min-width: 720px) {
  .rh-liste { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}

/* ------------------------------------------------------------------ Erfolge */

.rh-ach {
  display: flex;
  gap: var(--tc-space-3, 12px);
  padding: var(--tc-space-3, 12px);
  border: 1px solid var(--tc-border-subtle, rgba(255, 255, 255, 0.1));
  border-left-width: 3px;
  border-radius: var(--tc-radius-md, 8px);
  background: var(--tc-bg-surface-2, #2d2d2d);
}

/* Datenfarben: Die vier Stufen bedeuten etwas, sie sind keine Stimmung. */
.rh-ach--bronze   { border-left-color: #CD7F32; }
.rh-ach--silver   { border-left-color: #C0C0C0; }
.rh-ach--gold     { border-left-color: #FFD700; }
.rh-ach--platinum { border-left-color: #B9F2FF; }

.rh-ach__bild {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: var(--tc-radius-sm, 6px);
  overflow: hidden;
  background: var(--tc-bg-surface-3, #3a3a3a);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Noch nicht geholt: gedaempft. Das Bild ist ein Versprechen, kein Besitz. */
  filter: grayscale(1);
  opacity: 0.72;
}

.rh-ach__bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rh-ach__emoji { font-size: 1.6rem; }

.rh-ach__text { min-width: 0; flex: 1; }

.rh-ach__name {
  margin: 0 0 2px;
  font-size: 0.98rem;
  color: var(--tc-text-strong, #e0e0e0);
}

.rh-ach__tier {
  display: block;
  font-family: var(--tc-font-body, inherit);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--tc-text-muted, #9e9e9e);
}

.rh-ach__was {
  margin: 0 0 var(--tc-space-2, 8px);
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--tc-text-default, #b0b0b0);
}

.rh-ach__fehlt {
  margin: 6px 0 var(--tc-space-2, 8px);
  font-size: 0.78rem;
  color: var(--tc-text-muted, #9e9e9e);
}

.rh-ach__fehlt strong { color: var(--tc-highlight, #d4c4a0); }
.rh-ach__fehlt--manuell { font-style: italic; }

.rh-ach__weg {
  display: inline-block;
  /* 36px Hit-Target (Heuristik 5) — es ist der einzige Knopf je Karte. */
  min-height: 36px;
  line-height: 36px;
  font-size: 0.8rem;
  color: var(--tc-highlight, #d4c4a0);
  text-decoration: none;
}

.rh-ach__weg:hover, .rh-ach__weg:focus-visible { text-decoration: underline; }

.rh-ach__vergeben,
.rh-ach__frei {
  margin: 6px 0 0;
  font-size: 0.78rem;
}

.rh-ach__vergeben { color: var(--tc-text-muted, #9e9e9e); }
.rh-ach__frei     { color: var(--tc-success, #4ade80); }

/* Nicht verfolgt (#1153): leiser, nicht unsichtbar. Der Balken verliert
   seine Farbe, die Stufenkante tritt zurueck; lesbar bleibt alles. */
.rh-ach--ruht { border-left-color: var(--tc-border-subtle, rgba(255, 255, 255, 0.1)); }
.rh-ach--ruht .rh-fortschritt > span { background: var(--tc-text-muted, #9e9e9e); }

.rh-ach__ruht {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--tc-text-muted, #9e9e9e);
}

/* Ein <button> bringt alles selbst mit (§9). */
.rh-ach__zurueck {
  appearance: none;
  -webkit-appearance: none;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--tc-font-body, inherit);
  font-size: inherit;
  color: var(--tc-highlight, #d4c4a0);
  cursor: pointer;
}

.rh-ach__zurueck:hover,
.rh-ach__zurueck:focus-visible { text-decoration: underline; }

/* Weg und Anheften in einer Zeile (#1153). Der Weg links, die Nadel rechts. */
.rh-ach__aktionen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: var(--tc-space-3, 12px);
}

.rh-ach__pin { font-size: 0.8rem; }
.rh-ach__pin.is-dran { color: var(--tc-text-muted, #9e9e9e); }

.rh-leer {
  padding: var(--tc-space-5, 20px);
  font-size: 0.88rem;
  color: var(--tc-text-muted, #9e9e9e);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  /* Nicht `animation: none` — dabei fiele der Endzustand weg und der Balken
     bliebe auf Breite 0 stehen (CLAUDE.md §9). */
  .rh-stand__balken > span,
  .rh-fortschritt > span {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    animation-delay: -1ms;
  }
}
