/* ===== Regex-Generator: Beispiele „Wann leuchtet was?“ (js/regex-beispiele.js), alles unter .rxb ===== */
/* .rxb ist der Abschnitt auf der Seite und auch der Beispiel-Block in der Tour-Blase (die hängt am body, nicht in .rx) */
.rxb { --rxb-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, Menlo, monospace; }
.rxb [hidden] { display: none !important; }
.rxb-intro { margin: 0 0 14px; max-width: 820px; color: #b9ad9f; }
.rxb-laden { margin: 0; color: var(--muted); font-size: 14px; font-style: italic; }
.rxb-feld + .rxb-laden { margin-top: 14px; }
.rxb-wahl { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.rxb-wunsch { margin: 0 0 10px; max-width: 820px; font-size: 14.5px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.rxb-suchzeile { display: flex; flex-direction: column; gap: 5px; margin: 0 0 16px; min-width: 0; }
.rxb-klein { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.rxb-suche {
  padding: 9px 12px; overflow-wrap: anywhere; font: 14px/1.7 var(--rxb-mono); color: #f1e2cf;
  background: #0a0908; border: 1px solid var(--line); border-radius: 4px;
}

/* Gegenstände: am Handy untereinander (lange deutsche Wörter brauchen die Breite), sonst zwei je Zeile, breit vier */
.rxb-dinge { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; align-items: start; }
@media (max-width: 520px) {
  .rxb-dinge { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .rxb-ding { gap: 7px; }
}
@media (min-width: 900px) {
  .rxb-feld .rxb-dinge { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 16px; }
}
.rxb-ding { margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 9px; }

/* Kleiner Tooltip in den Farben der großen (css/style.css: .tt) */
.rxb-tt {
  --name: #c8c8c8; --h1: #161616; --h2: #353535; --hb: #6b6b6b; --sep: #8a8a8a;
  font-family: var(--font-item); font-size: 13px; line-height: 1.32; text-align: center; color: #8888ff;
  background: rgba(0, 0, 0, .92); border: 1px solid var(--hb); border-radius: 2px;
  overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto;
  transition: opacity .2s;
}
.rxb-tt--rare { --name: #ffff77; --h1: #1f1d0a; --h2: #3f3a13; --hb: #8f8636; --sep: #b8ab48; }
.rxb-tt--magic { --name: #8888ff; --h1: #0f1033; --h2: #23256a; --hb: #4d4fa8; --sep: #6c6ee0; }
.rxb-tt-kopf {
  padding: 5px 8px 4px; color: var(--name); font-size: 14.5px; line-height: 1.2; text-shadow: 0 1px 2px #000;
  background: linear-gradient(180deg, var(--h1) 0%, var(--h2) 48%, var(--h2) 52%, var(--h1) 100%);
  border-bottom: 1px solid var(--hb); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 14px rgba(0, 0, 0, .5);
}
.rxb-tt-feld { padding: 6px 8px 0; color: #a59d93; }
.rxb-tt-feld:last-child { padding-bottom: 7px; }
.rxb-tt-mods { padding: 0 8px 7px; }
.rxb-tt-mods > div + div, .rxb-tt-feld > div + div { margin-top: 1px; }
.rxb-tt-sep { height: 9px; margin: 3px auto; width: 88%; background: linear-gradient(90deg, transparent, var(--sep) 30%, var(--sep) 70%, transparent) center/100% 1px no-repeat; opacity: .8; }
/* Die Stelle, die ein Teil des Suchtexts trifft, in der Farbe dieses Teils (css/regex.css: .rx-teil--…) */
.rxb-tt mark.rx-teil { padding: 0 1px; background: rgba(var(--f), .2); box-shadow: 0 0 0 1px rgba(var(--f), .55); border-radius: 2px; text-shadow: none; }

/* Wie im Spiel: Treffer bekommen einen hellen Rahmen, der Rest wird dunkel */
.rxb-ding--an .rxb-tt { border-color: #f4e6a4; box-shadow: 0 0 0 1px #f4e6a4, 0 0 16px 2px rgba(255, 232, 140, .45), inset 0 0 12px rgba(255, 232, 140, .1); }
.rxb-ding--aus .rxb-tt { opacity: .5; filter: saturate(.55); }
.rxb-ding figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.4; color: #b9ad9f; overflow-wrap: anywhere; }
.rxb-urteil { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.rxb-urteil svg { flex: none; }
.rxb-ding--an .rxb-urteil { color: #f4e6a4; }
.rxb-ding--an figcaption { color: var(--text); }

/* ===== Geführte Tour (js/regex-tour.js), gleiche Machart wie .cr-tour-… und .pl-tour-… ===== */
.rxt-knopf {
  min-height: 40px; padding: 7px 16px 7px 10px; gap: 8px; font-size: 14.5px; color: #f1e2cf; border-color: rgba(201, 164, 92, .7); white-space: nowrap;
  background: linear-gradient(180deg, rgba(201, 164, 92, .14), rgba(201, 164, 92, .04));
}
.rxt-knopf:hover { border-color: var(--gold); background: linear-gradient(180deg, rgba(201, 164, 92, .22), rgba(201, 164, 92, .08)); }
.rxt-frage {
  display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold); color: #1a130b; font-family: var(--font-title); font-size: 13px; font-weight: 700; line-height: 1;
}
.rxt-angebot {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 4px 0 10px; padding: 7px 12px; width: fit-content; max-width: 100%;
  font-size: 13.5px; color: var(--muted); border-left: 2px solid rgba(201, 164, 92, .5); background: rgba(201, 164, 92, .05); border-radius: 0 var(--radius) var(--radius) 0;
}
.rxt-link { background: none; border: 0; padding: 4px 0; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.rxt-link:hover { color: #f6c48a; }
.rxt-link--leise { color: var(--muted); font-weight: 500; text-decoration: none; }
.rxt-link--leise:hover { color: var(--text); text-decoration: underline; }
.rxt-knopf:focus-visible, .rxt-angebot button:focus-visible, .rxt-box button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* Roter Rahmen um das Ziel. Der riesige Schatten dunkelt den Rest ab, Klicks gehen durch. */
.rxt-ring {
  --rxt-rot: #c2463a;
  position: fixed; z-index: 150; pointer-events: none; box-sizing: border-box;
  border: 2px solid var(--rxt-rot); border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(20, 6, 4, .7), 0 0 16px 2px rgba(194, 70, 58, .45), inset 0 0 12px rgba(194, 70, 58, .12), 0 0 0 200vmax rgba(6, 5, 4, .58);
}
.rxt-ring::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; box-shadow: 0 0 22px 5px rgba(194, 70, 58, .55); opacity: 0; animation: rxt-glimmen 2.6s ease-in-out infinite; }
.rxt-ring[hidden] { display: none; }
.rxt-ring--offen-o { border-top-color: transparent; border-top-left-radius: 0; border-top-right-radius: 0; }
.rxt-ring--offen-u { border-bottom-color: transparent; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
/* Schritt ohne Ziel (Beispiele in der Blase): kein Rahmen, nur die Seite abdunkeln */
.rxt-ring--ganz { left: 50%; top: 50%; width: 0; height: 0; border: 0; box-shadow: 0 0 0 200vmax rgba(6, 5, 4, .66); }
.rxt-ring--ganz::after { display: none; }
@keyframes rxt-glimmen { 50% { opacity: 1; } }

/* Sprechblase */
.rxt-box {
  position: fixed; z-index: 151; left: 12px; top: 12px; width: min(360px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; box-sizing: border-box;
  padding: 14px 16px; background: linear-gradient(180deg, #211b15, #171411); color: var(--text);
  border: 1px solid #6b5231; border-radius: 8px; box-shadow: 0 14px 40px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(233, 163, 90, .12);
}
.rxt-box--breit { width: min(470px, calc(100vw - 24px)); }
.rxt-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px -6px 2px 0; }
.rxt-zahl { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; color: var(--gold); }
.rxt-zu { flex: none; width: 34px; height: 34px; display: grid; place-items: center; background: none; border: 0; border-radius: var(--radius); color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.rxt-zu:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.rxt-box h3 { font-family: var(--font-title); font-size: 18px; font-weight: 700; color: #f1e2cf; margin: 0 0 8px; line-height: 1.25; }
.rxt-text p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.5; }
.rxt-text p:last-child { margin-bottom: 0; }
.rxt-beispiel { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.rxt-beispiel .rxb-wunsch { font-size: 13.5px; margin-bottom: 8px; color: #b9ad9f; }
.rxt-beispiel .rxb-suchzeile { margin-bottom: 14px; }
.rxt-beispiel .rxb-suche { padding: 7px 10px; font-size: 13px; }
/* Punkte links, Knöpfe rechts; bei langen Wörtern rutschen die Knöpfe geschlossen in eine zweite Zeile */
.rxt-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 8px; margin-top: 14px; }
.rxt-punkte { display: flex; gap: 5px; }
.rxt-knoepfe { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.rxt-punkte i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.rxt-punkte i.war { background: #7a6338; }
.rxt-punkte i.an { background: var(--accent-2); }
.rxt-fuss .rxt-link { margin-right: 4px; }
.rxt-fuss .btn:disabled { opacity: .4; cursor: not-allowed; }
.rxt-pfeil { position: absolute; width: 12px; height: 12px; background: #211b15; border: 1px solid #6b5231; transform: rotate(45deg); display: none; }
.rxt-box[data-seite=unten] .rxt-pfeil { display: block; top: -7px; margin-left: -6px; border-right: 0; border-bottom: 0; }
.rxt-box[data-seite=oben] .rxt-pfeil { display: block; bottom: -7px; margin-left: -6px; border-left: 0; border-top: 0; background: #171411; }
.rxt-box[data-seite=rechts] .rxt-pfeil { display: block; left: -7px; margin-top: -6px; border-right: 0; border-top: 0; }
.rxt-box[data-seite=links] .rxt-pfeil { display: block; right: -7px; margin-top: -6px; border-left: 0; border-bottom: 0; }
/* Mit Pfeil darf die Blase nichts abschneiden (der Pfeil ragt über den Rand) */
.rxt-box[data-seite]:not([data-seite=""]) { overflow: visible; }

/* Handy: Leiste am unteren Rand, volle Breite, große Tippflächen */
.rxt-box--leiste {
  left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; max-height: 52vh; overflow-y: auto;
  border-radius: 12px 12px 0 0; border-width: 1px 0 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .65);
}
.rxt-box--leiste.rxt-box--breit { max-height: 78vh; }
.rxt-box--leiste .rxt-pfeil { display: none !important; }
.rxt-box--leiste h3 { font-size: 17px; margin-bottom: 6px; }
.rxt-box--leiste .rxt-text p { font-size: 14px; line-height: 1.45; margin-bottom: 6px; }
/* Ist der Inhalt höher als die Leiste (Schritte mit Gegenständen), bleiben die Knöpfe unten stehen und der Rest scrollt */
.rxt-box--leiste .rxt-fuss {
  position: sticky; bottom: calc(-12px - env(safe-area-inset-bottom, 0px)); z-index: 1;
  margin: 10px -16px calc(-12px - env(safe-area-inset-bottom, 0px)); padding: 9px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #171411; box-shadow: 0 -8px 10px -6px rgba(0, 0, 0, .6);
}
.rxt-box--leiste .rxt-fuss .btn { padding: 9px 14px; font-size: 14px; }
.rxt-box--leiste .rxt-zu { width: 40px; height: 40px; }
.rxt-box--leiste .rxt-beispiel { margin-top: 8px; padding-top: 10px; }
.rxt-box--leiste .rxb-tt { font-size: 12.5px; }
.rxt-box--leiste .rxb-ding figcaption { font-size: 12.5px; }
/* Platz unter der Seite, damit auch der letzte Abschnitt über die Leiste rutschen kann */
.rxt-aktiv body { padding-bottom: var(--rxt-platz, 0px); }

@media (max-width: 640px) {
  .rxb-wahl .rx-chip { white-space: normal; text-align: left; }
  .rxb-suche { font-size: 13px; padding: 8px 10px; }
  .rxb-tt { font-size: 12.5px; }
  .rxb-tt-kopf { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .rxt-ring::after { animation: none; opacity: .5; }
  .rxb-tt { transition: none; }
}
