/* ============================================================
   Nachtpost — ein Himmel für zwei
   ============================================================ */

@font-face {
  font-family: 'Instrument Serif';
  src: url('/fonts/instrument-serif-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/fonts/instrument-serif-400-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('/fonts/karla-var.woff2') format('woff2-variations');
  font-weight: 200 800; font-style: normal; font-display: swap;
}

:root {
  --night-1: #17102a;
  --night-2: #0c0916;
  --card:    rgba(255, 255, 255, .045);
  --card-2:  rgba(255, 255, 255, .075);
  --line:    rgba(233, 224, 255, .13);
  --moon:    #ece4fa;
  --dusk:    #9c90bc;
  --glow:    #ffc978;
  --ember:   #ff8e72;
  --mint:    #86d8bc;

  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Karla', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;

  --radius: 18px;
  --gap: 1rem;
  --shell: 34rem;
}

* { box-sizing: border-box; }

/* Muss nach den Layout-Klassen greifen: display:grid schlaegt sonst [hidden]. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; background: #0a0713; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--moon);
  background:
    radial-gradient(120% 60% at 50% 108%, rgba(255, 201, 120, .13), transparent 62%),
    linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 62%, #0a0713 100%);
  background-attachment: fixed;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .4;
  transition: opacity .7s ease;
}
body[data-view='sky'] #sky { opacity: 1; }

/* Flex-Spalte, damit der Fußbereich auch auf kurzen Seiten unten sitzt
   und nicht mitten im Nichts hängt. */
.shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 1.5rem 1.15rem 7.5rem;
}
.shell > main { flex: 1; display: flex; flex-direction: column; }
.shell > main > .view:not([hidden]) { flex: 1; display: flex; flex-direction: column; }

/* ---------- Kopf ---------- */

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.wordmark {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: .01em;
  color: var(--moon);
}
.wordmark::first-letter { color: var(--glow); }

.whoami, .eyebrow, .quota, .meta {
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dusk);
  margin: 0;
}

/* ---------- Himmel ---------- */

.greeting {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 11vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 .5rem;
}
.greeting em { font-style: italic; color: var(--glow); }

.sky-line { margin: 0 0 2.5rem; color: var(--dusk); }

.digest { display: grid; gap: .6rem; }

.digest-row {
  display: flex;
  align-items: center;
  gap: .9rem;
  width: 100%;
  padding: 1.05rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.digest-row:hover { background: var(--card-2); border-color: rgba(255, 201, 120, .35); }
.digest-row:active { transform: scale(.99); }

.digest-row .num {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
  min-width: 1.6rem;
  color: var(--glow);
}
.digest-row .num.quiet { color: var(--dusk); }
.digest-row .say { flex: 1; }
.digest-row .say small { display: block; color: var(--dusk); font-size: .875rem; }
.digest-row .chev { color: var(--dusk); }

/* Der Himmel atmet: die Sternenzeile sitzt am unteren Rand. */

.sky-stars {
  margin: 2.5rem 0 0;
  padding-top: 1rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
  color: var(--dusk);
}
.sky-stars b { color: var(--moon); font-weight: 400; }
#view-sky .sky-stars { margin-top: auto; }

/* ---------- Lebenszeichen ---------- */

.signs {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: .5rem;
}
.signs:empty { display: none; }

.signs li {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  font-size: .875rem;
  color: var(--dusk);
}
.sign-text { flex: 1; min-width: 0; text-align: left; }

/* Ein Lebenszeichen ist ein Weg zum Eintrag, kein Text zum Lesen */
button.sign {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  width: 100%;
  padding: .35rem .5rem .35rem 0;
  font: inherit;
  font-size: .875rem;
  color: var(--dusk);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
button.sign:hover { color: var(--moon); background: rgba(255, 255, 255, .04); }
li.sign.still { padding: .35rem 0; }

/* Kurz aufleuchten, damit man findet, was man gesucht hat */
.card.leuchtet { animation: gefunden 2.4s ease both; }
@keyframes gefunden {
  0%   { box-shadow: 0 0 0 1px rgba(255, 201, 120, .7), 0 0 44px -8px rgba(255, 201, 120, .55); }
  70%  { box-shadow: 0 0 0 1px rgba(255, 201, 120, .5), 0 0 30px -10px rgba(255, 201, 120, .35); }
  100% { box-shadow: none; }
}
.signs .dot {
  align-self: flex-start;
  margin-top: .45rem;
  width: .35rem;
  height: .35rem;
  flex: none;
  border-radius: 50%;
  background: var(--glow);
  opacity: .8;
}
.signs time {
  margin-left: auto;
  flex: none;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .65;
}

/* ---------- Was gerade läuft ---------- */

.tunes { display: grid; gap: .55rem; margin-top: 1.5rem; }

.tune {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .7rem .85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, .2);
}

.tune .cover {
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  border-radius: 8px;
  object-fit: cover;
  background: var(--card-2);
}

.tune-text { display: grid; min-width: 0; flex: 1; }
.tune-text .who {
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dusk);
}
.tune-text .title,
.tune-text .artist {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tune-text .title { font-size: .95rem; font-weight: 600; }
.tune-text .artist { font-size: .85rem; color: var(--dusk); }

/* Drei Balken, die den Takt mitgehen */
.eq { display: flex; align-items: flex-end; gap: 3px; height: 1.1rem; flex: none; }
.eq i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--glow);
  transform-origin: bottom;
  animation: bounce 1s ease-in-out infinite;
}
.eq i:nth-child(2) { animation-delay: -.35s; }
.eq i:nth-child(3) { animation-delay: -.7s; }

@keyframes bounce {
  0%, 100% { transform: scaleY(.28); }
  50% { transform: scaleY(1); }
}

.tune-quiet, .connect {
  margin: 0;
  font-size: .875rem;
  color: var(--dusk);
}
.connect {
  display: inline-block;
  justify-self: start;
  padding: .5rem .95rem;
  font: inherit;
  font-size: .875rem;
  color: var(--dusk);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s ease;
}
.connect:hover { color: var(--glow); border-color: rgba(255, 201, 120, .5); }

.unlink {
  flex: none;
  font-family: var(--sans);
  font-size: .75rem;
  padding: .3rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--dusk);
  cursor: pointer;
}
.unlink:hover { color: var(--moon); }

/* ---------- Seitenköpfe ---------- */

.page-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 8vw, 2.6rem);
  line-height: 1.1;
  margin: 0 0 .4rem;
}
.page-sub { margin: 0 0 1.6rem; color: var(--dusk); font-size: .95rem; }
.quota { margin: 0 0 1rem; }
.quota b { color: var(--glow); font-weight: 600; }

/* ---------- Knöpfe ---------- */

.cta, .ghost {
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  padding: .85rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .25s ease, background .2s ease;
}
.cta {
  width: 100%;
  color: #241505;
  background: linear-gradient(170deg, #ffd899, var(--glow));
  box-shadow: 0 0 0 rgba(255, 201, 120, 0), 0 14px 34px -20px rgba(255, 201, 120, .9);
}
.cta:hover { box-shadow: 0 0 34px -6px rgba(255, 201, 120, .45), 0 14px 34px -20px rgba(255, 201, 120, .9); }
.cta:active { transform: scale(.985); }

.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--dusk);
}
.ghost:hover { color: var(--moon); border-color: rgba(233, 224, 255, .3); }

:where(button, a, input, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Formulare ---------- */

.compose {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.25rem;
  padding: 1.35rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.field { display: grid; gap: .5rem; }

.label {
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dusk);
}
.label em { font-style: normal; opacity: .6; text-transform: none; letter-spacing: .04em; }

input[type='text'], input[type='email'], input[type='password'], textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--moon);
  background: rgba(0, 0, 0, .22);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .8rem .9rem;
  resize: vertical;
}
input::placeholder, textarea::placeholder { color: rgba(156, 144, 188, .6); }
input[type='text']:focus, input[type='email']:focus, input[type='password']:focus, textarea:focus { border-color: rgba(255, 201, 120, .5); outline: none; }

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
fieldset legend {
  float: left;
  width: 100%;
  padding: 0 0 .6rem;
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dusk);
}
fieldset label { cursor: pointer; }
fieldset input { position: absolute; opacity: 0; pointer-events: none; }
fieldset span {
  display: inline-block;
  padding: .45rem .85rem;
  font-size: .875rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--dusk);
  transition: all .2s ease;
}
fieldset label:hover span { color: var(--moon); }
fieldset input:checked + span {
  color: var(--glow);
  border-color: rgba(255, 201, 120, .55);
  background: rgba(255, 201, 120, .1);
}
fieldset input:focus-visible + span { outline: 2px solid var(--glow); outline-offset: 2px; }

.compose-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}
.compose-actions .cta { width: auto; flex: 1; min-width: 11rem; }

/* ---------- Listen & Karten ---------- */

.list { display: grid; gap: .85rem; margin-top: 1.75rem; }

.section-head {
  margin: 1.25rem 0 -.15rem;
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dusk);
}
.section-head:first-child { margin-top: 0; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 1.15rem 1.2rem;
}

.card-head {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  margin-bottom: .6rem;
}

.chip {
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .25rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--dusk);
  white-space: nowrap;
}
.chip.settled { color: var(--mint); border-color: rgba(134, 216, 188, .4); }
.chip.time { border-color: transparent; padding-left: 0; }

.card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1.25;
  margin: 0 0 .35rem;
}
.card p { margin: 0 0 .75rem; white-space: pre-wrap; }
.card p:last-child { margin-bottom: 0; }

.wish {
  margin: .9rem 0 0;
  padding: .8rem .95rem;
  border-left: 2px solid rgba(255, 201, 120, .5);
  border-radius: 0 10px 10px 0;
  background: rgba(255, 201, 120, .06);
}
.wish .label { display: block; margin-bottom: .3rem; }

.was {
  margin-top: .9rem;
  padding: .75rem .95rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--dusk);
  font-size: .9rem;
}
.was .label { display: block; margin-bottom: .35rem; }
.was p { white-space: pre-wrap; margin: 0 0 .5rem; }

.thread { display: grid; gap: .5rem; margin-top: 1rem; }
.bubble {
  padding: .7rem .9rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, .22);
  font-size: .95rem;
  white-space: pre-wrap;
}
.bubble.mine { background: rgba(255, 201, 120, .1); }
.bubble .who {
  display: block;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dusk);
  margin-bottom: .25rem;
  white-space: normal;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1rem;
}
.card-actions button {
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 600;
  padding: .45rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--dusk);
  cursor: pointer;
  transition: all .18s ease;
}
.card-actions button:hover { color: var(--moon); border-color: rgba(233, 224, 255, .3); }
.card-actions button.on { color: var(--glow); border-color: rgba(255, 201, 120, .5); background: rgba(255, 201, 120, .1); }

.reply-form { display: grid; gap: .6rem; margin-top: .9rem; }
.reply-form textarea { font-size: .95rem; }
.reply-form button { justify-self: start; }

/* Ungelesene Laterne: zu, aber sie leuchtet */
.sealed {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 1px solid rgba(255, 201, 120, .3);
  background: linear-gradient(150deg, rgba(255, 201, 120, .12), rgba(255, 255, 255, .03));
  animation: breathe 4.5s ease-in-out infinite;
}
.sealed:hover { border-color: rgba(255, 201, 120, .6); }
.sealed .flame {
  width: 2.5rem;
  height: 3.2rem;
  flex: none;
  border-radius: 40% 40% 46% 46% / 55% 55% 45% 45%;
  background: linear-gradient(180deg, #fff0d0, var(--glow) 55%, #e88b4a);
  box-shadow: 0 0 26px rgba(255, 201, 120, .55);
}
.sealed .say { font-family: var(--serif); font-size: 1.25rem; line-height: 1.3; }
.sealed .say small { display: block; font-family: var(--sans); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dusk); margin-top: .3rem; }

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 201, 120, 0); }
  50% { box-shadow: 0 0 42px -12px rgba(255, 201, 120, .55); }
}

/* Funken */
/* Der Stapel: man sucht sich nichts aus, man zieht. */
#draw-slot { margin-bottom: 1rem; }
#draw-slot:empty { margin-bottom: 0; }
#draw-slot .empty { margin: 0; }

.draw {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  width: 100%;
  padding: 1.15rem 1.2rem;
  text-align: left;
  font: inherit;
  color: inherit;
  border: 1px solid rgba(255, 201, 120, .3);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(255, 201, 120, .12), rgba(255, 255, 255, .03));
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease;
  animation: breathe 4.5s ease-in-out infinite;
}
.draw:hover { border-color: rgba(255, 201, 120, .65); }
.draw:active { transform: scale(.99); }

.draw-say {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.25;
}
.draw-say small {
  display: block;
  margin-top: .3rem;
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dusk);
}

/* Drei versetzte Karten - der Stapel, aus dem gezogen wird */
.pile {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  flex: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--glow);
  filter: drop-shadow(0 0 14px rgba(255, 201, 120, .7));
  transition: transform .3s ease;
}
.draw:hover .pile { transform: rotate(35deg) scale(1.08); }

.hint {
  font-size: .8rem;
  line-height: 1.45;
  color: var(--dusk);
  opacity: .85;
}

.card.revealed { animation: kindle .8s ease both; }
@keyframes kindle {
  from { opacity: 0; transform: translateY(6px) scale(.97); box-shadow: 0 0 60px -10px rgba(255, 201, 120, .8); }
  to   { opacity: 1; transform: none; box-shadow: 0 0 0 rgba(255, 201, 120, 0); }
}

.kind {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--glow);
}
.kind.w-stoert { color: var(--ember); }
.kind.w-schwer { color: var(--glow); }

/* Zustellinfo und Zeit: Text, kein Knopf - deshalb ohne Rahmen und Pillenform */
.stamp {
  margin-left: auto;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dusk);
  white-space: nowrap;
}
.spark-text { font-family: var(--serif); font-size: 1.3rem; line-height: 1.4; }

.empty {
  padding: 2.25rem 1.25rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--dusk);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.45;
}

/* ---------- Tableiste ---------- */

.tabbar {
  position: fixed;
  z-index: 3;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  gap: .25rem;
  padding: .35rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(18, 13, 32, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -22px #000;
}
.tabbar button {
  position: relative;
  display: flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 600;
  padding: .6rem 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--dusk);
  cursor: pointer;
  transition: all .2s ease;
}
.tabbar button:hover { color: var(--moon); }
.tabbar button.on { color: #241505; background: linear-gradient(170deg, #ffd899, var(--glow)); }
.tab-icon { font-size: 1rem; line-height: 1; }

.pip {
  position: absolute;
  top: .35rem;
  right: .55rem;
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 8px var(--ember);
}
.tabbar button.on .pip { background: #241505; box-shadow: none; }

/* ---------- Rückfrage ---------- */

.veil {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(6, 4, 12, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade .25s ease;
}
.ask {
  max-width: 24rem;
  padding: 1.75rem 1.5rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(165deg, #1d1533, #120d21);
  box-shadow: 0 30px 60px -30px #000;
  animation: rise .3s cubic-bezier(.2, .8, .3, 1);
}
.ask h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 0 0 .6rem;
}
.ask p { margin: 0 0 1.4rem; color: var(--dusk); }
.ask-actions { display: flex; gap: .7rem; }
.ask-actions .cta { flex: 1; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Laternenflug & Toast ---------- */

#lantern-flight {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 12%;
  width: 2.6rem;
  height: 3.4rem;
  margin-left: -1.3rem;
  border-radius: 40% 40% 46% 46% / 55% 55% 45% 45%;
  background: linear-gradient(180deg, #fff3dc, var(--glow) 55%, #e07f3e);
  box-shadow: 0 0 60px rgba(255, 201, 120, .75);
  opacity: 0;
  pointer-events: none;
}
#lantern-flight.up { animation: liftoff 2.6s cubic-bezier(.35, .05, .5, 1) forwards; }
@keyframes liftoff {
  0%   { opacity: 0; transform: translateY(0) scale(.7); }
  12%  { opacity: 1; transform: translateY(-4vh) scale(1); }
  55%  { opacity: 1; transform: translateY(-45vh) scale(.66) translateX(2.5rem); }
  100% { opacity: 0; transform: translateY(-96vh) scale(.28) translateX(-1rem); }
}

.toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(5.5rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: min(24rem, calc(100vw - 2rem));
  margin: 0;
  padding: .8rem 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(18, 13, 32, .95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: .9rem;
  text-align: center;
  animation: rise .3s ease;
}

/* ---------- Zugesperrt ---------- */

.locked {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem;
  text-align: center;
}
.locked h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 9vw, 3rem);
  margin: 0 0 .5rem;
}
.locked p { color: var(--dusk); margin: 0; max-width: 22rem; }


/* ---------- Konto, Schwelle, Formularpaare ---------- */

button.whoami {
  font-family: var(--sans);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
button.whoami:hover { color: var(--moon); }

.pair {
  display: grid;
  gap: .75rem;
  padding-bottom: .25rem;
  border-bottom: 1px solid var(--line);
}

/* Ein Link will lesbar bleiben, auch wenn er lang ist */
.link-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .8rem;
  line-height: 1.5;
  word-break: break-all;
  color: var(--glow);
  background: rgba(0, 0, 0, .25);
  border-radius: 10px;
  padding: .7rem .85rem;
  margin: 0 0 .25rem;
}

#gate .greeting { margin-bottom: .75rem; }
#gate .digest { margin-top: 2rem; }


/* ---------- Rechtliches: Fließtext und Fußbereich ---------- */

.prosa h2 {
  margin: 2.2rem 0 .6rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.35rem;
  color: var(--moon);
}
.prosa p {
  margin: 0 0 .9rem;
  font-size: .95rem;
  line-height: 1.7;
  color: var(--dusk);
}
.prosa p strong { color: var(--moon); font-weight: 600; }
.prosa a { color: var(--glow); }
.prosa code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .85em;
  color: var(--glow);
  background: rgba(0, 0, 0, .25);
  border-radius: 5px;
  padding: .1em .4em;
}

.fuss {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: .8rem;
}
/* Etwas Luft nach oben, damit er nicht am Inhalt klebt */
.shell > .fuss { margin-top: 3rem; }
main .fuss { margin-top: 2.5rem; }
.fuss a {
  color: var(--dusk);
  text-decoration: none;
}
.fuss a:hover { color: var(--moon); }


/* In der App sitzt der Fußbereich unter der Sternenzeile */
.fuss button {
  font-family: var(--sans);
  font-size: .8rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--dusk);
  cursor: pointer;
}
.fuss button:hover { color: var(--moon); }


/* Honigtopf gegen Automaten: aus dem Bild geschoben statt display:none,
   sonst erkennen es die schlaueren Bots am Stil. */
.honig {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


/* Der Löschbereich steht bewusst allein und sieht nach Ernst aus */
.loeschkasten {
  margin-top: .5rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid rgba(255, 142, 114, .35);
  border-radius: var(--radius);
  background: rgba(255, 142, 114, .05);
}
.loeschkasten p { margin: 0 0 .9rem; font-size: .9rem; line-height: 1.6; color: var(--dusk); }
.loeschkasten .card-actions { margin: 0; }
.loeschkasten button { border-color: rgba(255, 142, 114, .5); color: var(--ember); }
.loeschkasten button:hover { color: var(--moon); border-color: var(--ember); }


/* Die zwei Wege auf der Heute-Seite */
.tun {
  display: grid;
  gap: .6rem;
  margin-top: .6rem;
}

.tun-karte {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  padding: .95rem 1rem;
  text-align: left;
  font: inherit;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.tun-karte:hover {
  border-color: rgba(255, 201, 120, .4);
  background: var(--card-2);
}
.tun-karte:active { transform: scale(.99); }

.tun-zeichen {
  flex: none;
  margin-top: .1rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--glow);
  filter: drop-shadow(0 0 10px rgba(255, 201, 120, .5));
}
.tun-text { font-size: .95rem; font-weight: 600; line-height: 1.3; }
.tun-text small {
  display: block;
  margin-top: .3rem;
  font-size: .85rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--dusk);
}

/* ---------- Desktop ---------- */

@media (min-width: 46rem) {
  .shell { padding-top: 3rem; }
  .top { margin-bottom: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
