/* =====================================================================
   Refugium (index.html, js/landing.js): Entwurf der Design-Sitzung (refugium-test), an die Spieldaten angeschlossen.
   Waagerecht und ruhig: Statusleiste · Banner „Aschefeld“ · Wege · Elemente.
   Nur Farben aus den Variablen in css/style.css.
   ===================================================================== */

/* Platz für die Scrollleiste: global in css/style.css */
.rf-main { width: min(1180px, 96vw); margin: 22px auto 30px; display: flex; flex-direction: column; gap: 22px; }

/* ===== Statusleiste (Pergamentstreifen) ===== */
.rf-status {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px;
  padding: 14px 22px; border-radius: 8px; background: var(--paper);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--desk) 60%, transparent), inset 0 0 0 4px var(--parch), inset 0 0 0 5px var(--line-strong),
    0 8px 18px color-mix(in srgb, var(--desk) 60%, transparent);
}
/* Level im Wachssiegel */
.rf-seal {
  width: 74px; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 52% 48% 50% 50% / 49% 52% 48% 51%; color: var(--seal-text);
  background: var(--wax);
  box-shadow: inset 0 0 0 3px var(--wine-lo), inset 0 0 0 5px color-mix(in srgb, var(--gold-hi) 50%, transparent),
    0 3px 8px color-mix(in srgb, var(--wine-lo) 50%, transparent);
}
.rf-seal-num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; line-height: 1; font-variant-numeric: lining-nums; }
.rf-seal-word { font-family: var(--font-display); font-size: 0.55rem; letter-spacing: 0.22em; text-transform: uppercase; }
.rf-who { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rf-name-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.rf-name { font-family: var(--font-deco); font-size: 1.45rem; line-height: 1.1; text-transform: uppercase; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.rf-who .xp-bar { margin: 0; }
.rf-who .xp-fill { transition: width 1.2s var(--ease-out); }
.rf-xp-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; font-size: 0.9rem; font-style: italic; color: var(--ink-2); }
.rf-xp-line b { font-style: normal; color: var(--verdigris); }
/* Nächste Belohnung: Beschriftung + Reihe kleiner Marken (ein Knopf), darunter aufklappbares Blatt */
.rf-xp-line { align-items: center; }
.rf-next { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-style: normal; min-width: 0; max-width: 100%; }
.rf-next-label { color: var(--wine); }
.rf-next-label::before { content: "✦ "; }
.rf-next-tokens {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 2px 4px; margin: 0; min-width: 0; max-width: 100%;   /* schmal: Marken umbrechen statt überstehen */
  background: none; border: none; box-shadow: none; border-radius: 14px; cursor: pointer;
  font-family: var(--font); font-weight: 400; letter-spacing: 0; text-transform: none;
}
.rf-next-tokens[aria-expanded="true"] { background: color-mix(in srgb, var(--parch-3) 70%, transparent); }
@media (hover: hover) { .rf-next-tokens:hover { background: color-mix(in srgb, var(--parch-3) 70%, transparent); } }
.rf-next-tokens:active { transform: none; }
/* Marke: kleine Messingmünze mit Symbol; breit mit Zahl (Asche, Glyphen, +N) */
.rf-token {
  min-width: 26px; height: 26px; padding: 0 2px; display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  border-radius: 13px; font-size: 0.85rem; line-height: 1;
  background: var(--coin);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold-lo) 80%, var(--ink)), 0 1px 2px color-mix(in srgb, var(--ink) 35%, transparent);
}
.rf-token.wide { padding: 0 8px; }
.rf-token b { font-family: var(--font-display); font-size: 0.78rem; color: var(--gold-ink); }
.rf-token.glyph { background: radial-gradient(circle at 38% 30%, var(--verdigris-glint), var(--verdigris-hi) 55%, var(--verdigris-lo)); color: var(--verdigris-text); }
.rf-token.glyph b { color: var(--verdigris-text); }
.rf-token.more { background: var(--parch-3); box-shadow: inset 0 0 0 1px var(--line-strong); font-family: var(--font-display); font-size: 0.74rem; color: var(--ink-2); }
.rf-token-more-label { margin-left: 4px; font-style: italic; font-size: 0.82rem; color: var(--info); }
@media (hover: hover) { .rf-next-tokens:hover .rf-token-more-label { text-decoration: underline; } }
/* aufgeklapptes Blatt mit allen Belohnungen */
.rf-rewards {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: min(340px, 86vw);
  padding: 14px 16px; border-radius: 6px; background: var(--paper); color: var(--ink);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--desk) 50%, transparent), inset 0 0 0 3px var(--parch), inset 0 0 0 4px var(--line-strong),
    0 14px 30px color-mix(in srgb, var(--desk) 65%, transparent);
  animation: rise-in 0.18s ease-out; --rise: -4px; }
.rf-rewards[hidden] { display: none; }
.rf-rewards-head { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
.rf-rewards-group + .rf-rewards-group { margin-top: 10px; }
.rf-rewards-title { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--wine); }
.rf-rewards-title::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.rf-reward { display: flex; align-items: center; gap: 8px; padding: 2px 0; font-size: 0.95rem; font-style: normal; }
.rf-reward-icon { width: 1.5em; text-align: center; }
.rf-reward-for { margin-left: auto; font-style: italic; font-size: 0.85rem; color: var(--ink-2); }
/* Asche rechts, abgetrennt */
.rf-purse { display: flex; align-items: center; gap: 10px; padding-left: 20px; border-left: 1px solid var(--line-strong); }
.rf-purse .coins-icon { font-size: 2rem; filter: drop-shadow(0 3px 3px color-mix(in srgb, var(--ink) 35%, transparent)); }
.rf-ash { font-family: var(--font-display); font-size: 1.8rem; color: var(--gold-lo); font-variant-numeric: tabular-nums lining-nums; }

/* ===== Banner „Aschefeld“ (Baustein .rf-banner in style.css) ===== */
.rf-banner-text, .rf-banner-action { position: relative; z-index: 1; }
/* Bilanz: Zahlen in Messing, darunter kleine Beschriftung */
.rf-record { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 26px; }
.rf-rec { display: flex; flex-direction: column; font-size: 0.78rem; font-style: italic; color: var(--parch-3); }
.rf-rec b { font-family: var(--font-display); font-style: normal; font-size: 1.5rem; line-height: 1.1; color: var(--parch-hi); font-variant-numeric: tabular-nums lining-nums; }
.rf-rec-more { align-self: center; font-style: italic; font-size: 0.88rem; color: var(--gold-hi); text-decoration: none; }
@media (hover: hover) { .rf-rec-more:hover { text-decoration: underline; } }
.rf-banner-action { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 280px; text-align: center; }
/* Hauptknopf (Baustein .start-button), hier größer */
.rf-start { padding: 18px 34px; font-size: 1.12rem; animation: rf-breathe 3.2s ease-in-out infinite; }
@keyframes rf-breathe {
  0%, 100% { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--gold-hi) 20%, transparent)); }
  50% { filter: drop-shadow(0 0 16px color-mix(in srgb, var(--gold-hi) 50%, transparent)); }
}
.rf-tagline { margin: 0; font-style: italic; font-size: 0.9rem; color: var(--parch-3); }

/* ===== Zwischenüberschrift auf dem Tisch (Blattgold) ===== */
.rf-section-title {
  display: flex; align-items: center; gap: 14px; margin-bottom: 12px;
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-hi);
}
.rf-section-title::before, .rf-section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-lo), transparent); }

/* ===== Wege (aus Entwurf 1 übernommen) ===== */
.rf-way-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rf-way {
  container-type: inline-size;   /* Name passt sich der Kartenbreite an (QA G3) */
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 14px 16px; border-radius: 8px; text-decoration: none; color: var(--ink);
  background: var(--paper);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--desk) 60%, transparent), inset 0 0 0 3px var(--parch), inset 0 0 0 4px var(--line-strong), 0 6px 14px color-mix(in srgb, var(--desk) 60%, transparent);
  transition: transform 0.2s, box-shadow 0.2s;
}
@media (hover: hover) { a.rf-way:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--desk) 60%, transparent), inset 0 0 0 3px var(--parch), inset 0 0 0 4px var(--gold), 0 10px 20px color-mix(in srgb, var(--desk) 70%, transparent); } }
@media (hover: none) { a.rf-way:active { transform: scale(0.98); transition-duration: 0.08s; } }   /* Touch: kurz eindrücken (QA 72-H3) */
.rf-way-icon {
  grid-row: 1 / 3; width: 48px; aspect-ratio: 1; display: grid; place-items: center; font-size: 1.5rem; border-radius: 50%;
  background: var(--coin);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--gold-lo) 80%, var(--ink)), inset 0 -4px 8px color-mix(in srgb, var(--ink) 30%, transparent), 0 2px 5px color-mix(in srgb, var(--ink) 35%, transparent);
}
.rf-way-name { font-family: var(--font-display); font-size: clamp(0.82rem, calc((100cqi - 80px) / 9.4), 0.95rem); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; overflow-wrap: break-word; hyphens: auto; }
.rf-way-state { font-style: italic; font-size: 0.88rem; color: var(--ink-2); }
/* dort wartet etwas (z. B. freier Sockel): Grünspan-Punkt und Text */
.rf-way.notice .rf-way-state { color: var(--verdigris); font-weight: 700; }
/* grüner Punkt: pulsiert leicht (wird etwas größer, Schein wächst) */
.rf-way.notice::after {
  content: ""; position: absolute; top: 10px; right: 10px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--verdigris-hi); box-shadow: 0 0 0 2px var(--parch), 0 0 8px var(--verdigris-glow);
  animation: rf-notice 1.8s ease-in-out infinite;
}
@keyframes rf-notice {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 2px var(--parch), 0 0 6px var(--verdigris-glow); }
  50% { transform: scale(1.35); box-shadow: 0 0 0 2px var(--parch), 0 0 16px var(--verdigris-glow); }
}
/* gesperrter Ort: blasser, Symbol als Wachssiegel mit Schloss */
.rf-way.locked { background: linear-gradient(color-mix(in srgb, var(--parch-3) 60%, transparent), color-mix(in srgb, var(--parch-3) 60%, transparent)), var(--paper); }
.rf-way.locked .rf-way-name { color: var(--ink-3); }
.rf-way.locked .rf-way-state { color: var(--wine); }
.rf-way-icon.rf-way-seal {
  font-size: 1.15rem; border-radius: 52% 48% 50% 50% / 49% 52% 48% 51%;
  background: var(--wax);
  box-shadow: inset 0 0 0 2px var(--wine-lo), inset 0 0 0 4px color-mix(in srgb, var(--gold-hi) 45%, transparent), 0 2px 5px color-mix(in srgb, var(--wine-lo) 50%, transparent);
}
/* Münze dreht sich beim Überfahren einmal um sich selbst */
.rf-way-icon { perspective: 200px; }
.rf-coin { display: inline-block; }
@media (hover: hover) { a.rf-way:hover .rf-way-icon { animation: rf-coin 0.7s ease-in-out; } }
@keyframes rf-coin { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
/* Siegel bricht auf: Bruchstücke über der Seite, Kachel wird farbig */
.rf-way.unsealed { animation: rf-unseal 1s ease-out; }
.rf-way.unsealed .rf-way-icon { animation: rf-pop-in 0.7s var(--ease-spring); }
@keyframes rf-unseal {
  0% { filter: sepia(0.7) brightness(0.9); box-shadow: 0 0 0 1px color-mix(in srgb, var(--desk) 60%, transparent), inset 0 0 0 3px var(--parch), inset 0 0 0 4px var(--gold-hi), 0 0 30px var(--gold-hi); }
  100% { filter: none; }
}
@keyframes rf-pop-in { 0% { transform: scale(0.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* ===== Elemente ===== */
.rf-elements { margin: 0; }
.rf-elements-head { display: flex; align-items: baseline; gap: 14px; }
.rf-elements-head h2 { flex: 1; margin-bottom: 0; }
.rf-owned { font-style: italic; color: var(--ink-2); white-space: nowrap; }

/* Fußzeile */

/* ===== Schmal ===== */
/* vier schmale Karten (bis ~1250 px): Siegel etwas kleiner, damit der Name lesbar groß bleibt (QA G3b) */
@media (min-width: 901px) and (max-width: 1250px) {
  .rf-way { padding: 12px 12px; column-gap: 10px; }
  .rf-way-icon { width: 40px; font-size: 1.25rem; }
  .rf-way-name { letter-spacing: 0.03em; }
}
@media (max-width: 900px) {
  .rf-way-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rf-banner-action { max-width: none; }
}
@media (max-width: 620px) {
  .rf-status { grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 14px 16px; }
  .rf-purse { grid-column: 1 / -1; padding: 10px 0 0; border-left: none; border-top: 1px solid var(--line-strong); justify-content: center; }
  .rf-seal { width: 62px; }
  .rf-way-grid { grid-template-columns: minmax(0, 1fr); }
  .rf-elements .symbol-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .rf-elements .symbol-card { --card-fs: 11px; }
  .rf-elements-head { flex-wrap: wrap; }
}

/* ===== Animationen ===== */

/* Asche-Zuwachs: „+n“ steigt auf, Schale wackelt */
.rf-purse { position: relative; }
.rf-float {
  position: absolute; right: 4px; top: -4px; pointer-events: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--gold);
  text-shadow: 0 0 8px var(--gold-hi), 0 1px 0 var(--parch-hi);
  animation: rf-float 1.6s ease-out forwards;
}
@keyframes rf-float {
  0% { transform: translateY(8px) scale(0.7); opacity: 0; }
  15% { transform: translateY(0) scale(1.15); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translateY(-38px) scale(1); opacity: 0; }
}
.coins-icon { display: inline-block; }
.coins-icon.wiggle { animation: rf-wiggle 0.6s ease-in-out; }
@keyframes rf-wiggle { 20% { transform: rotate(-12deg) scale(1.1); } 45% { transform: rotate(10deg) scale(1.1); } 70% { transform: rotate(-5deg); } }

/* Level-Aufstieg: Balken leuchtet voll auf */
.xp-bar.full { animation: rf-bar-full 0.8s ease-out; }
@keyframes rf-bar-full {
  0% { box-shadow: inset 0 2px 4px color-mix(in srgb, var(--ink) 20%, transparent); }
  35% { box-shadow: 0 0 0 2px var(--verdigris-glow), 0 0 22px var(--verdigris-glow); }
  100% { box-shadow: inset 0 2px 4px color-mix(in srgb, var(--ink) 20%, transparent); }
}
/* Siegel: hebt sich, prägt sich neu (Aufsetzen bei ~55 %), Goldring breitet sich aus */
.rf-seal { position: relative; }
.rf-seal::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid var(--gold-hi); opacity: 0; pointer-events: none;
}
.rf-seal.stamp { animation: rf-stamp 1s var(--ease-out); }
.rf-seal.stamp::after { animation: shock-ring 0.8s ease-out 0.5s; --shock-from: 0.9; --shock-to: 1.8; }
@keyframes rf-stamp {
  0% { transform: none; }
  40% { transform: translateY(-10px) scale(1.22) rotate(-6deg); filter: drop-shadow(0 14px 10px color-mix(in srgb, var(--ink) 45%, transparent)); }
  55% { transform: scale(0.92); filter: brightness(1.35); }
  70% { transform: scale(1.06); }
  100% { transform: none; }
}
/* Marken fliegen auf (Kopien über der Seite), neue Marken erscheinen nacheinander */
.rf-token-fly { position: fixed; z-index: 1000; pointer-events: none; margin: 0; }
.rf-next-tokens.fresh .rf-token { animation: pop-in 0.45s var(--ease-spring) backwards; animation-delay: calc(var(--i, 0) * 80ms); --pop-rot: 0deg; }

/* Elemente: beim Laden gestaffelt von unten (nur Startzustand, danach greift das Überfahren der Karte wieder) */
.rf-enter .symbol-card { animation: rise-in 0.55s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 60ms + 120ms); --rise: 18px; }
/* neues Element: Karte dreht sich auf, schimmert, „Neu“-Siegel oben links */
.symbol-card.arrive { animation: rf-arrive 0.9s var(--ease-out); }
@keyframes rf-arrive {
  0% { opacity: 0; transform: perspective(600px) rotateY(90deg) scale(0.8); }
  60% { opacity: 1; transform: perspective(600px) rotateY(-8deg) scale(1.05); }
  100% { transform: none; }
}
/* Leuchten als Umriss, damit der Doppelrahmen der Karte (box-shadow im Baustein) bleibt */
.symbol-card.is-new { overflow: hidden; outline: 2px solid var(--gold-hi); outline-offset: 2px; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--gold-hi) 55%, transparent)); }
.symbol-card.is-new::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(110deg, transparent 44%, color-mix(in srgb, var(--parch-hi) 55%, transparent) 50%, transparent 56%);
  background-size: 250% 100%; background-position: 120% 0;
  animation: sheen 2.6s ease-in-out infinite;
}
.rf-new-seal { position: absolute; top: 0.4em; left: 0.4em; z-index: 2; --badge-fs: 0.8em; }   /* Aussehen: .badge.wax (style.css) */
.symbol-card.seen .rf-new-seal { animation: rf-seal-off 0.4s ease-in forwards; }
@keyframes rf-seal-off { to { transform: scale(0) rotate(-30deg); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .rf-start, .rf-way.notice::after, .symbol-card.is-new::after, .rf-enter .symbol-card { animation: none; }
}

/* schmal: „Neu“-Siegel kleiner, damit es die römische Nummer der Karte nicht berührt */
@media (max-width: 620px) {
  .rf-new-seal { top: 0.3em; left: 0.3em; --badge-fs: 0.66em; padding: 0.1em 0.45em; letter-spacing: 0.02em; }
}

/* ===== Nur im Spiel (nicht im Entwurf) ===== */
/* Namensformular in der Statusleiste (ohne Spielernamen oder beim Ändern) */
.rf-name-form { display: flex; flex-direction: column; gap: 6px; }
.rf-name-form .rf-name-row { align-items: center; }
.rf-name-form input { flex: 1; min-width: 0; }
/* Hinweis unter der Bilanz (Lädt …, noch kein Gefecht, kein Name, Fehler) */
.rf-note { margin: 10px 0 0; font-style: italic; font-size: 0.88rem; color: var(--parch-3); min-height: 1.2em; }
.rf-note:empty { display: none; }
.rf-note.error { color: var(--bad-hi); font-style: normal; font-weight: 700; }
.rf-data-error { margin: 0; }

/* Fokusfarbe (css/style.css): die Statusleiste ist Pergament */
.rf-status { --focus-ring: var(--wine); }
/* Weg-Münze: Zeichen eingeprägt (dunkles Gold mit heller Unterkante); gesperrter Weg: Schlüsselloch im Siegel */
.rf-way-icon .sign { width: 26px; height: 26px; color: var(--gold-ink); stroke-width: 1.8;
  filter: drop-shadow(0 1px 0 color-mix(in srgb, var(--gold-hi) 80%, transparent)); }
.rf-way-seal .seal-keyhole { width: 22px; height: 22px; }

/* ===== Tria-Prima-Vorrat in der Statusleiste unter der Asche (js/landing.js renderTria/gainTria; Design-Entwurf 02.12.2026) ===== */
/* Asche oben, Tria Prima als zweite, kleinere Zeile darunter (rechtsbündig unter der Zahl) */
.rf-purse.rt-has { flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; max-width: 290px; }
.rt-tria {
  flex-basis: 100%; display: flex; justify-content: flex-end; gap: 12px; padding-top: 6px;
  border-top: 1px dotted var(--line-strong); color: var(--ink-2); text-decoration: none;
}
@media (hover: hover) { .rt-tria:hover .rt-medal { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pc-lo) 60%, transparent), 0 0 0 2px var(--gold-hi); } }
@media (hover: hover) { .rt-tria:hover b { color: var(--wine); } }
.rt-p { position: relative; display: inline-flex; align-items: center; gap: 5px; }
.rt-medal {
  width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; color: var(--pc-lo);
  background: radial-gradient(circle at 38% 32%, var(--pc-hi), var(--pc) 62%, color-mix(in srgb, var(--pc) 70%, var(--pc-lo)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pc-lo) 60%, transparent), 0 1px 2px color-mix(in srgb, var(--shade) 35%, transparent);
  transition: box-shadow 0.2s;
}
.rt-p b { text-align: right; font-family: var(--font-display); font-size: 0.95rem; color: var(--ink-2); font-variant-numeric: tabular-nums lining-nums; transition: color 0.2s; }
/* Zuwachs: „+n“ in Prinzip-Farbe, Medaillon wackelt */
/* „+n“ erscheint unter dem Medaillon (darüber steht die Asche-Zahl, QA 71 H4), bleibt in der Statusleiste und verblasst */
.rt-float {
  position: absolute; left: 10px; top: calc(100% - 3px); translate: -50% 0; pointer-events: none; white-space: nowrap; line-height: 1;
  font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; color: var(--pc-lo);
  text-shadow: 0 0 6px var(--pc-hi), 0 1px 0 var(--parch-hi);
  animation: rt-float 1.6s ease-out forwards;
}
@keyframes rt-float {
  0% { transform: translateY(-6px) scale(0.7); opacity: 0; }
  15% { transform: translateY(0) scale(1.15); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translateY(1px) scale(1); opacity: 0; }
}
.rt-medal.rt-wiggle { animation: rf-wiggle 0.6s ease-in-out; }   /* wie die Asche-Schale (css/refugium.css) */
/* erstes Mal: die Zeile klappt auf */
.rt-tria.rt-appear { animation: rt-appear 0.6s var(--ease-spring); }
@keyframes rt-appear { from { opacity: 0; transform: translateY(-6px) scaleY(0.6); } }
/* erstes Mal (TODO Nutzer 03.12.2026, Entwurf der Design-Sitzung refugium-tria-test, eingebaut 03.12.2026): ein Pergament-Schleier
   über der ganzen Statusleiste, das Dreieck der Tria Prima zeichnet sich, die drei Medaillons werden an seinen Ecken eingeprägt
   (Schwefel oben, Salz links, Quecksilber rechts – wie im Grimoire), daneben „Tria Prima entdeckt“ und die Namen; dann fliegen die
   Medaillons in die Zeile unter der Asche (js/landing.js firstTria). */
@keyframes rt-stamp { 0% { transform: scale(2.2); opacity: 0; } 60% { transform: scale(0.9); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes rt-ring { 0% { transform: scale(0.8); opacity: 0.9; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes rt-num-in { from { opacity: 0; } }
.rf-status { position: relative; }

.tr-reveal {
  position: absolute; inset: 0; z-index: 5; border-radius: inherit; pointer-events: none;
  display: flex; align-items: center; justify-content: center; gap: 26px; padding: 10px 24px;
}
/* Schleier als eigene Ebene, damit die Medaillons beim Ausblenden sichtbar weiterfliegen */
.tr-reveal::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background:
    radial-gradient(ellipse 60% 120% at 50% 50%, color-mix(in srgb, var(--gold-hi) 30%, transparent), transparent 70%),
    var(--paper);
  box-shadow: inset 0 0 0 4px var(--parch), inset 0 0 0 5px var(--gold);
  animation: tr-veil-in 0.4s ease-out both;
}
@keyframes tr-veil-in { from { opacity: 0; } }

/* Dreieck mit den drei Medaillons an den Ecken (Anordnung wie im Grimoire) */
.tr-figure { position: relative; width: 92px; height: 84px; flex: none; }
.tr-tri { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tr-tri path, .tr-tri circle {
  fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round;
  stroke-dasharray: 100; stroke-dashoffset: 100;
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--gold-hi) 70%, transparent));
  animation: tr-draw 0.8s var(--ease-out) 0.15s forwards;
}
.tr-tri circle { stroke-width: 1.4; opacity: 0.7; animation-delay: 0.55s; }
@keyframes tr-draw { to { stroke-dashoffset: 0; } }

.tr-m { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; transition: transform 0.6s var(--ease-out), opacity 0.15s; }
.tr-m.p-sulfur { left: 50%; top: 10%; }
.tr-m.p-salt { left: 9%; top: 87%; }
.tr-m.p-mercury { left: 91%; top: 87%; }
.tr-m .rt-medal { width: 30px; height: 30px; font-size: 18px; animation: rt-stamp 0.55s var(--ease-pop) both; animation-delay: calc(0.55s + var(--i) * 0.3s); }
/* Ring in Prinzip-Farbe beim Einprägen */
.tr-m::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 2px var(--pc), 0 0 12px var(--pc-hi);
  animation: rt-ring 0.9s ease-out both; animation-delay: calc(0.75s + var(--i) * 0.3s);
}

/* Schriftzug: „Tria Prima entdeckt“ in Weinrot mit goldenem Schein, darunter die drei Namen in Prinzip-Farbe, je mit ihrem Medaillon */
.tr-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tr-title {
  font-family: var(--font-deco); font-size: clamp(1.25rem, 3vw, 1.7rem); line-height: 1.1; text-transform: uppercase;
  color: var(--wine); text-shadow: 0 0 10px color-mix(in srgb, var(--gold-hi) 70%, transparent), 0 1px 0 var(--parch-hi);
  animation: tr-rise 0.6s var(--ease-out) 0.35s both;
}
.tr-names { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-family: var(--font-display); font-size: 0.9rem; letter-spacing: 0.04em; }
.tr-names > span { color: var(--pc-lo); animation: tr-rise 0.45s var(--ease-out) both; animation-delay: calc(0.65s + var(--i) * 0.3s); }
.tr-names i { color: var(--ink-3, var(--ink-2)); font-style: normal; opacity: 0.6; }
@keyframes tr-rise { from { opacity: 0; transform: translateY(6px); } }

/* Abflug: Schleier, Dreieck und Schrift verblassen, die Medaillons fliegen weiter (js setzt transform) */
.tr-reveal.tr-out::before { opacity: 0; transition: opacity 0.5s ease-in 0.15s; animation: none; }
.tr-reveal.tr-out .tr-tri, .tr-reveal.tr-out .tr-text { opacity: 0; transition: opacity 0.3s ease-in; }
.tr-reveal.tr-out .tr-m::after { display: none; }

/* Zeile unter der Asche wartet, bis das große Medaillon gelandet ist; Landung mit kleinem Puls */
.rt-tria.tr-wait .rt-p:not(.tr-landed) .rt-medal,
.rt-tria.tr-wait .rt-p:not(.tr-landed) b { opacity: 0; }
.rt-p.tr-landed b { animation: rt-num-in 0.4s ease-out both; }
.rt-p.tr-land .rt-medal { animation: tr-land 0.45s var(--ease-pop); }
@keyframes tr-land { 0% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* Handy: Statusleiste ist höher und schmal → Dreieck über dem Schriftzug, alles mittig */
@media (max-width: 620px) {
  .tr-reveal { flex-direction: column; gap: 10px; text-align: center; }
  .tr-text { align-items: center; }
  .tr-names { justify-content: center; }
}

@media (max-width: 620px) {
  .rf-purse.rt-has { max-width: none; justify-content: center; }
  .rt-tria { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .rt-float, .rt-medal.rt-wiggle, .rt-tria.rt-appear { animation: none; } .tr-reveal { display: none; } }
/* bekommt eine Zahl eine Stelle dazu, wächst ihr Platz weich – das Medaillon gleitet statt zu springen (Nutzer) */
.rt-p b { display: inline-block; transition: min-width 0.5s var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .rt-p b { transition: none; } }
