/* Sternzeichen-Anhaenger. Eine Handyspalte: oben das Weltraumfoto mit dem
   echten Sternbild, darunter der Tag als Karten. Bewusst nur dunkel -
   Nachthimmel. Schriften selbst gehostet (fonts.css). */
:root {
  --nacht: #07081a;
  --nacht-2: #0e1030;
  --tinte: #f4efe4;
  --blass: #aaa6bf;
  --hauch: rgba(244, 239, 228, .10);
  --gold: #e9c77b;
  --gold-weich: rgba(233, 199, 123, .18);
  --glas: rgba(20, 22, 54, .62);
  --f-anzeige: "Italiana", "Forum", Georgia, serif;
  --f-text: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-daten: "DM Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --f-glyphe: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "Noto Sans Symbols", sans-serif;
  color-scheme: dark;
}
/* Italiana kennt nur die Grundzeichen; fuer ğ, ș, ł und Kyrillisch "Forum". */
.schrift-forum { --f-anzeige: "Forum", Georgia, serif; }
.schrift-ar { --f-anzeige: "Noto Naskh Arabic", "Geeza Pro", "Times New Roman", serif; --f-text: system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; --f-daten: var(--f-text); }
/* Arabische Buchstaben haengen zusammen - Sperrung und Grossbuchstaben reissen sie auseinander. */
.schrift-ar .oben, .schrift-ar .augenbraue, .schrift-ar .kachel .k, .schrift-ar .ident .meta { letter-spacing: 0; text-transform: none; font-size: 13px; }

* { box-sizing: border-box; }
/* Jede eigene display-Regel schlaegt sonst das hidden-Attribut: Die Story-
   Vorschau lag unsichtbar ueber der ganzen Seite und fing jeden Tipp ab
   (dieselbe Falle wie bei weddingtap). */
[hidden] { display: none !important; }
html { background: var(--nacht); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: radial-gradient(120% 60% at 50% 0%, var(--nacht-2), var(--nacht) 70%) var(--nacht);
  color: var(--tinte);
  font: 16px/1.6 var(--f-text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.app { max-width: 480px; margin: 0 auto; position: relative; overflow: hidden; }

/* ---------- Buehne ---------- */
.buehne {
  position: relative; isolation: isolate;
  padding: calc(14px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 30px max(16px, env(safe-area-inset-left, 0px));
}
.buehne .bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
  transform: scale(1.08); animation: treiben 40s ease-in-out infinite alternate;
}
.buehne::after { content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(rgba(7,8,26,.55), rgba(7,8,26,.15) 30%, rgba(7,8,26,.35) 60%, var(--nacht) 100%); }
#funkeln { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
@keyframes treiben { from { transform: scale(1.08) translate(0, 0); } to { transform: scale(1.16) translate(-2%, 1.5%); } }

.oben { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font: 500 11px/1.2 var(--f-daten); letter-spacing: .12em; text-transform: uppercase; color: var(--blass); }
.oben .marke { border: 1px solid var(--hauch); border-radius: 99px; padding: 6px 10px; background: rgba(7,8,26,.4); white-space: nowrap; }
.oben span:last-child { text-align: end; }

.himmel { margin: 18px auto 0; width: 100%; max-width: 360px; aspect-ratio: 32 / 26; }
.himmel svg { width: 100%; height: 100%; overflow: visible; }
.himmel .linie { fill: none; stroke: var(--gold); stroke-width: .9; stroke-linecap: round; stroke-opacity: .75;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: zeichnen 1.1s cubic-bezier(.6,.1,.3,1) forwards; }
.himmel .stern { fill: #fffaf0; transform-box: fill-box; transform-origin: center; opacity: 0; animation: aufleuchten .7s ease-out forwards; }
.himmel .hof { fill: var(--gold); opacity: 0; transform-box: fill-box; transform-origin: center; animation: atmen 3.2s ease-in-out infinite; }
.himmel .beschriftung { font: 400 8.5px var(--f-daten); fill: var(--blass); letter-spacing: .04em; opacity: 0; animation: einblenden .8s ease forwards; direction: ltr; unicode-bidi: plaintext; }
@keyframes zeichnen { to { stroke-dashoffset: 0; } }
@keyframes aufleuchten { 0% { opacity: 0; transform: scale(.2); } 60% { opacity: 1; transform: scale(1.5); } 100% { opacity: 1; transform: scale(1); } }
@keyframes atmen { 0%, 100% { opacity: .10; transform: scale(1); } 50% { opacity: .32; transform: scale(1.35); } }
@keyframes einblenden { to { opacity: 1; } }

.ident { text-align: center; margin-top: 6px; }
.glyphe { font: 30px/1 var(--f-glyphe); color: var(--gold); }
.ident h1 { font: 400 clamp(52px, 16vw, 84px)/1.05 var(--f-anzeige); letter-spacing: .02em; margin: 6px 0 8px; text-wrap: balance;
  text-shadow: 0 2px 30px rgba(7,8,26,.8); overflow-wrap: anywhere; }
.schrift-ar .ident h1 { letter-spacing: 0; font-size: clamp(46px, 14vw, 72px); }
.ident .meta { font: 400 12px/1.5 var(--f-daten); letter-spacing: .08em; text-transform: uppercase; color: var(--blass); }
.ident .meta b { color: var(--tinte); font-weight: 500; }

/* Bildnachweis: sichtbar am Bild und verlinkt - so verlangt es die Lizenz. */
.nachweis { display: block; margin-top: 18px; text-align: center; font-size: 10.5px; line-height: 1.4; color: rgba(244,239,228,.55);
  text-decoration: none; overflow-wrap: anywhere; }
.nachweis:hover, .nachweis:focus-visible { color: var(--tinte); text-decoration: underline; }

/* ---------- Inhalt ---------- */
.inhalt { display: grid; gap: 14px; margin-top: -6px; position: relative;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); }
.karte { background: var(--glas); border: 1px solid var(--hauch); border-radius: 22px; padding: 22px 20px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.augenbraue { font: 500 11px/1.3 var(--f-daten); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.mondzeile { margin: 10px 0 0; font-size: 14px; color: var(--blass); }
.lesung { font-size: 18px; line-height: 1.65; margin: 14px 0 0; }
.lesung::first-letter { font: 400 3.1em/0.8 var(--f-anzeige); float: inline-start; margin-block-start: 6px; margin-inline-end: 8px; color: var(--gold); }
.schrift-ar .lesung::first-letter { font: inherit; float: none; margin: 0; color: inherit; }

.bewertung { display: grid; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hauch); }
.bewertung .zeile { display: grid; grid-template-columns: 1fr auto; align-items: center; font-size: 14px; color: var(--blass); }
.punkte { display: flex; gap: 5px; }
.punkte i { width: 9px; height: 9px; border-radius: 50%; background: var(--hauch); }
.punkte i.an { background: var(--gold); box-shadow: 0 0 8px rgba(233,199,123,.55); }

.kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kachel { background: var(--glas); border: 1px solid var(--hauch); border-radius: 18px; padding: 16px; min-width: 0;
  display: grid; grid-template-rows: auto 1fr auto; gap: 10px; min-height: 150px; }
.kachel .k { font: 500 10.5px/1.25 var(--f-daten); letter-spacing: .12em; text-transform: uppercase; color: var(--blass); }
.kachel .v { font: 400 44px/1 var(--f-anzeige); align-self: center; }
.kachel .v.wort { font-size: clamp(24px, 7.5vw, 32px); line-height: 1.1; overflow-wrap: anywhere; hyphens: auto; }
.kachel .s { font-size: 13px; color: var(--blass); line-height: 1.35; }
.kachel .s b { color: var(--tinte); font-weight: 600; }
.mond { width: 52px; height: 52px; align-self: center; }
.mond-schatten { fill: rgba(244,239,228,.10); }
.mond-licht { fill: var(--tinte); }
.farbtupfer { width: 52px; height: 52px; border-radius: 50%; align-self: center; background: var(--tupfer);
  box-shadow: 0 0 0 4px rgba(255,255,255,.06), 0 0 26px color-mix(in srgb, var(--tupfer) 55%, transparent); }

.aktionen { display: grid; gap: 10px; }
button { font: inherit; color: inherit; cursor: pointer; }
.knopf { border: 0; border-radius: 16px; padding: 16px 18px; font-weight: 600; font-size: 16px; line-height: 1.3;
  display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; text-decoration: none; }
.knopf.haupt { background: linear-gradient(135deg, #f1d69a, var(--gold) 55%, #c99a4c); color: #1a1430; box-shadow: 0 8px 30px rgba(233,199,123,.25); }
.knopf.haupt:disabled { opacity: .7; }
.knopf.still { background: transparent; border: 1px solid var(--hauch); color: var(--tinte); font-weight: 500; }
.knopf:focus-visible, .wahl a:focus-visible, .sprachwahl summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.hinweis-home summary { list-style: none; cursor: pointer; }
.hinweis-home summary::-webkit-details-marker { display: none; }
.hinweis-home p { font-size: 14px; color: var(--blass); background: rgba(255,255,255,.04); border-radius: 14px; padding: 14px 16px; margin: 10px 0 0; }
.hinweis-home b { color: var(--tinte); }

.wahl h2 { font: 400 26px/1.2 var(--f-anzeige); margin: 4px 0; }
.wahl p { margin: 0 0 14px; font-size: 14px; color: var(--blass); }
.wahl .raster { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wahl a { background: rgba(255,255,255,.04); border: 1px solid var(--hauch); border-radius: 14px; padding: 10px 2px 8px;
  display: grid; justify-items: center; gap: 2px; min-width: 0; text-decoration: none; transition: background .2s, border-color .2s; }
.wahl a span { font: 22px/1.2 var(--f-glyphe); color: var(--gold); }
.wahl a small { font-size: clamp(9.5px, 2.85vw, 11.5px); line-height: 1.2; letter-spacing: -.01em; color: var(--blass); text-align: center; max-width: 100%; white-space: nowrap; }
.wahl a[aria-current="true"] { background: var(--gold-weich); border-color: rgba(233,199,123,.55); }
.wahl a[aria-current="true"] small { color: var(--tinte); }

/* ---------- Story-Vorschau ---------- */
.vorschau { position: fixed; inset: 0; z-index: 50; background: rgba(4,5,16,.88); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: calc(20px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.vorschau-box { display: grid; gap: 14px; justify-items: center; max-width: 340px; width: 100%; }
.vorschau img { width: 100%; max-height: 64dvh; object-fit: contain; border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.vorschau p { margin: 0; text-align: center; color: var(--blass); font-size: 14px; }
.vorschau .knopf { width: 100%; }

/* ---------- Fuss ---------- */
.fuss { max-width: 480px; margin: 0 auto; display: grid; gap: 12px; justify-items: center; text-align: center;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(30px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  font-size: 12px; color: var(--blass); }
.fuss .recht a { color: var(--blass); }
.unterhaltung { margin: 0; }
.sprachwahl summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--hauch); border-radius: 99px; padding: 8px 14px; font-size: 13px; color: var(--tinte); }
.sprachwahl summary::-webkit-details-marker { display: none; }
.sprachen { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.sprachen a { text-decoration: none; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.04); color: var(--tinte); font-size: 13px; }
.sprachen a[aria-current="true"] { background: var(--gold-weich); }

/* ---------- Einfache Seiten (Start, Rechtliches, Fehler) ---------- */
.schlicht { max-width: 560px; margin: 0 auto; padding: calc(40px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 24px max(20px, env(safe-area-inset-left, 0px)); }
.schlicht h1 { font: 400 clamp(40px, 11vw, 60px)/1.1 var(--f-anzeige); margin: 10px 0 14px; text-wrap: balance; }
.schlicht h2 { font: 600 17px/1.3 var(--f-text); margin: 24px 0 6px; }
.schlicht p { margin: 0 0 12px; color: var(--blass); }
.schlicht p b, .schlicht p strong { color: var(--tinte); }
.schlicht .glyphen { font: 26px/1.6 var(--f-glyphe); color: var(--gold); letter-spacing: .3em; word-break: break-all; }

@media (prefers-reduced-motion: reduce) {
  .buehne .bg { animation: none; }
  .himmel .linie { animation: none; stroke-dashoffset: 0; }
  .himmel .stern, .himmel .beschriftung { animation: none; opacity: 1; }
  .himmel .hof { animation: none; opacity: .18; }
}
