/* Stardust-CI (wie Startseite, Theme t4): Navy + Urkunden-Türkis, Bodoni Moda + Inter Tight */
@font-face { font-family: 'Inter Tight Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/ci-fonts/inter-tight-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Tight Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/ci-fonts/inter-tight-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bodoni Moda Variable'; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url(/ci-fonts/bodoni-moda-latin-opsz-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bodoni Moda Variable'; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url(/ci-fonts/bodoni-moda-latin-ext-opsz-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #141831;                       /* --night */
  --panel: rgba(28, 33, 63, 0.86);     /* --navy */
  --line: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: #b4bdd6;                    /* --muted-dark */
  --gold: #6cc9d6;                     /* Akzent: Urkunden-Türkis */
  --accent-2: #bfeaff;
  --btn: linear-gradient(135deg, #06548a 0%, #0f6fae 45%, #2bb5e8 100%);
  --serif: 'Bodoni Moda Variable', 'Bodoni Moda', Didot, serif;
  --sans: 'Inter Tight Variable', 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 15px/1.5 var(--sans); overflow: hidden; }
canvas#sky { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; }

.loading { position: fixed; inset: 0; display: grid; place-items: center; color: var(--muted); letter-spacing: .04em; }

.topbar { position: fixed; top: 0; left: 0; right: 0; display: flex; gap: 16px; align-items: center;
  padding: 14px 16px; background: linear-gradient(var(--bg), transparent); pointer-events: none; }
.topbar > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; white-space: nowrap; color: #fff; text-decoration: none; }
.brand img { height: 34px; width: auto; display: block; }
.brand span { font-family: var(--serif); font-size: 15px; color: var(--muted); margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--line); }
.search { display: flex; gap: 8px; flex: 1; max-width: 520px; margin-left: auto; }
.search input, .admin input, .admin textarea { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; backdrop-filter: blur(8px); border-radius: 6px; }
.search input:focus, .admin input:focus, .admin textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
button { padding: 10px 18px; border-radius: 6px; border: 0; background: var(--btn); color: #fff;
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
button.secondary, label.button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
button:disabled { opacity: .5; cursor: default; }

.card { position: fixed; left: 16px; bottom: 96px; width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 140px); overflow: auto; padding: 22px 22px 16px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(12px); }
.card .eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); }
.card h1 { margin: 4px 0 2px; font-family: var(--serif); font-size: 30px; line-height: 1.1; font-weight: 560; }
.card .owner { color: var(--muted); }
.card blockquote { white-space: pre-line; margin: 14px 0; padding: 0 0 0 12px; border-left: 2px solid var(--gold); font-style: italic; }
.card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 14px 0 0; font-size: 14px; }
.card dt { color: var(--muted); }
.card dd { margin: 0; font-variant-numeric: tabular-nums; }
.card .more { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.card .more button { background: transparent; color: var(--text); border: 1px solid var(--line); text-align: left; font-weight: 500; }
.close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; padding: 0; border-radius: 50%;
  background: transparent !important; color: var(--muted); font-size: 22px; line-height: 1; }

.toast { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); padding: 10px 16px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); max-width: calc(100vw - 32px); }

.credits { position: fixed; bottom: 0; left: 0; right: 0; padding: 8px 16px; font-size: 11px; color: var(--muted);
  text-align: center; background: linear-gradient(transparent, var(--bg)); }
.credits a { color: var(--muted); }

/* Name über dem gefundenen Stern (Stern steht in der Bildmitte) */
.star-label { font-family: var(--serif); font-size: 17px; position: fixed; left: 50%; top: 50%; transform: translate(-50%, calc(-100% - 28px));
  padding: 4px 12px; border-radius: 999px; background: rgba(4, 7, 15, 0.6); border: 1px solid rgba(108, 201, 214, 0.55);
  color: var(--gold); font-weight: 600; letter-spacing: .03em; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .6s; }
.star-label.visible { opacity: 1; }

/* Symbolleiste unten */
.toolbar { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); display: flex; gap: 4px;
  padding: 6px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px);
  max-width: calc(100vw - 32px); overflow-x: auto; scrollbar-width: none; }
.toolbar button { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; flex: none;
  background: transparent; color: var(--muted); border-radius: 6px; }
.toolbar button:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.toolbar button[aria-pressed="true"] { color: var(--gold); background: rgba(108, 201, 214, 0.16); }
.toolbar button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

/* Admin */
.admin { position: fixed; top: 64px; right: 16px; bottom: 16px; width: min(440px, calc(100vw - 32px));
  overflow: auto; padding: 20px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line);
  backdrop-filter: blur(12px); }
.admin h2 { margin: 0 0 4px; font-size: 18px; }
.admin h3 { margin: 24px 0 8px; font-size: 15px; }
.admin p.hint { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.admin label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.admin input, .admin textarea { width: 100%; }
.admin textarea { min-height: 70px; resize: vertical; }
.admin .row { display: flex; gap: 8px; }
.admin .picked { padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--line); font-size: 14px; }
.admin .picked.ok { border-color: #5fd38d; }
.admin .picked.bad { border-color: #ff7a7a; }
.admin .actions { display: flex; gap: 8px; margin-top: 14px; }
.admin table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin td { padding: 6px 4px; border-top: 1px solid var(--line); vertical-align: top; }
.admin td.nr { white-space: nowrap; font-variant-numeric: tabular-nums; }
.admin td a { color: var(--gold); }
.admin details { margin-top: 10px; }
.admin summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.admin label.button { display: inline-block; padding: 10px 16px; border-radius: 10px; font-weight: 600; cursor: pointer; color: var(--text); }
.admin code { font-size: 12px; }
.admin .del { padding: 2px 8px; font-size: 12px; background: transparent; color: #ff9a9a; border: 1px solid var(--line); }

@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; }
  .search { max-width: none; margin: 0; flex-basis: 100%; }
  .search button { padding: 10px 12px; }
  .card { left: 16px; bottom: 136px; max-height: 45vh; }
  .toolbar { bottom: 52px; }
  .admin { top: auto; height: 55vh; }
}
