/* =============================================================
   Decorative desk props — pen, tape, paperclip.
   Positioned absolutely around the centered photo so they feel like
   they were tossed on the desk next to the evidence photo.
   ============================================================= */
.clue-prop {
  position: absolute;
  pointer-events: none;
  z-index: 2;
}

/* Füller — steht jetzt FAST SENKRECHT in der rechten Randspalte
   (Feder oben) und ist VERTIKAL ZENTRIERT (top:50% + translateY),
   damit er nie unten aus der Akte herausragt. Die Rotation dreht um
   die Elementmitte, deshalb bleibt das visuelle Zentrum exakt auf
   halber Hoehe. Zusaetzlich liegt das Foto per z-index UEBER den
   Requisiten (siehe .clue-photo-wrap) als zweites Sicherheitsnetz. */
.clue-prop-pen {
  top: 50%;
  right: 0.5%;
  width: 270px;
  height: auto;
  transform: translateY(-50%) rotate(80deg);
}

/* (Klebefilmrolle entfernt — Requisit wird nicht mehr verwendet) */

/* Verstreute Briefmarken — Häufchen unten links, optional eine
   einzelne rechts. Feste Slot-Positionen, damit die Komposition
   immer aufgeräumt wirkt; Motiv und leichter Dreh-Jitter (--jit)
   werden pro Seitenaufruf zufällig in script.js vergeben. */
.clue-prop-stamps { inset: 0; }
.clue-stamp {
  position: absolute;
  height: auto;
  filter: drop-shadow(1px 2px 3px rgba(40, 30, 15, 0.28));
}
.clue-stamp-s1 {
  bottom: 11%; left: 6.5%;
  width: 88px;
  transform: rotate(calc(-8deg + var(--jit, 0deg)));
}
.clue-stamp-s2 {
  bottom: 6%; left: 14.5%;
  width: 74px;
  transform: rotate(calc(6deg + var(--jit, 0deg)));
  z-index: 1;
}
.clue-stamp-s3 {
  bottom: 22%; left: 11%;
  width: 64px;
  transform: rotate(calc(15deg + var(--jit, 0deg)));
}
.clue-stamp-s4 {
  top: 36%; right: 5.5%;
  width: 72px;
  transform: rotate(calc(-11deg + var(--jit, 0deg)));
}

/* Büroklammern-Häufchen links oben — über den Briefmarken, die unten
   links liegen. So teilen sich linke Spalte (Klammern + Marken) und
   rechte Spalte (Füller) die Deko sauber auf. */
.clue-prop-paperclip-pile {
  top: 28px;
  left: 7%;
  width: 92px;
  height: auto;
  transform: rotate(-8deg);
}

@media (max-width: 800px) {
  .clue-prop-pen { top: 50%; right: 0.5%; width: 190px; }
  .clue-prop-paperclip-pile { top: 16px; left: 5%; width: 64px; }
  /* Briefmarken auf dem Handy komplett entfernen — auf der grünen Matte
     ist dafür kein Platz. Desktop/Tablet zeigen sie weiterhin. */
  #clue-stamps { display: none; }
  .clue-stamp { display: none; }
}

.clue-photo-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  line-height: 0;
}
.clue-photo {
  display: inline-block;
  vertical-align: top;
  max-width: 100%;
  border: 8px solid #f4ecd6;
  box-sizing: border-box;
  position: relative;
  box-shadow: var(--shadow-med);
  cursor: zoom-in;
  overflow: hidden;
}
.clue-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.12), transparent 40%),
    radial-gradient(circle at 30% 20%, transparent 40%, rgba(26, 22, 19, 0.15) 100%);
  pointer-events: none;
  z-index: 1;
}
.clue-photo img {
  display: block;
  /* Let the image drive its own aspect ratio — no forced frame, no
     letterbox tint. max-width + max-height together form a 4:3
     "envelope": a 4:3 landscape hits both limits, a square stops at
     height, a portrait stops at height. All shapes end up with
     similar visual weight without ever being cropped.
     max-width:100% keeps the image inside the polaroid's border
     frame even when its natural size would exceed the cap. */
  width: auto;
  height: auto;
  max-width: min(440px, 100%);
  max-height: 330px;
}
/* Placeholder when no hint image is available (hunt not active, or no
   upload yet). Sits inside .clue-photo where the <img> would be. */
/* Variante: gesperrtes Beweisfoto — der Statustext liegt auf dem
   schwarzen Zensur-Balken des Bildes (Balken sitzt bei ~48 % Höhe) */
.clue-photo-placeholder.censored {
  position: relative;
  padding: 0;
  overflow: hidden;
  background: #1a1613;
  /* Seitenverhältnis des Fotos fixieren, damit der Zensur-Balken
     unabhängig von der Containerhöhe immer an derselben Stelle liegt
     (Balken-Mitte im Bild: ~49 % der Höhe) */
  aspect-ratio: 4 / 3;
  min-height: 0;
}
.clue-photo-placeholder.censored img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.clue-photo-placeholder.censored span {
  position: absolute;
  left: 0; right: 0;
  top: 49%;
  transform: translateY(-50%);
  text-align: center;
  font-family: 'Special Elite', monospace;
  /* Klein genug, dass auch zwei Zeilen sicher im Balken bleiben */
  font-size: clamp(0.62rem, 1.9vw, 0.8rem);
  line-height: 1.35;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(239, 231, 212, 0.85);
  padding: 0 1rem;
}

.clue-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 340px;
  max-width: 100%;
  min-height: 220px;
  padding: 2.5rem 1.5rem;
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0 12px,
      rgba(180, 160, 100, 0.06) 12px 13px
    ),
    var(--paper-deep, #e6decb);
  border: 1px dashed var(--line-strong, #a8997e);
  font-family: var(--font-type, 'Cutive Mono', monospace);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-faint, #746c5f);
  text-align: center;
  line-height: 1.5;
}
.photo-caption {
  position: static;
  font-family: var(--font-type);
  font-size: 0.8rem;
  /* Hell auf dem Leder der Unterlage (siehe .clue-document) */
  color: rgba(239, 231, 212, 0.85);
  font-style: italic;
  line-height: normal;
  margin-top: 14px;
  flex-shrink: 0;
}

.clue-text { padding-top: 1rem; }
.clue-quote {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-style: italic;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 1.5rem;
  position: relative;
  padding-left: 1.25rem;
  border-left: 2px solid var(--stamp-red);
}
.clue-notes {
  font-family: var(--font-type);
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.7;
  overflow: hidden;
}
.clue-notes-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  display: block;
}
.typewriter-text::after {
  content: "▊";
  color: var(--stamp-red);
  animation: blink 1s steps(1) infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

/* --- Hints timeline (12 treasures, clickable) --- */
.hints-timeline {
  max-width: 1060px;
  margin: 0 auto;
  padding: 1.25rem 0.5rem 0;
}
.hints-timeline-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.hints-track {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
  padding: 6px 0 2px;
}
.chronik-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 10px 4px 8px;
  min-height: 58px;
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  border-radius: 2px;
  font-family: inherit;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.chronik-card::before {
  /* thin red top-rule like an index card */
  content: "";
  position: absolute;
  top: 10px;
  left: 6px;
  right: 6px;
  height: 1px;
  background: var(--stamp-red);
  opacity: 0.3;
}
.chronik-card-num {
  font-family: 'Kalam', 'Patrick Hand', cursive;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-top: 8px;
}
.chronik-card-label {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.chronik-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(26, 22, 19, 0.18);
  border-color: var(--line-strong);
}
.chronik-card.solved {
  background: var(--paper-deep);
}
/* Fund-Markierung: kraeftiges rotes X ueber der Akte. Die Nummer bleibt
   normal sichtbar, das X als klare Gefunden-Kennzeichnung darueber. */
.chronik-card.solved::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 62'%3E%3Cline x1='16' y1='15' x2='48' y2='47' stroke='%23b82727' stroke-width='4.5' stroke-linecap='round'/%3E%3Cline x1='48' y1='15' x2='16' y2='47' stroke='%23b82727' stroke-width='4.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.chronik-card.current {
  background: #fdece7;
  border: 1.5px solid var(--stamp-red);
  box-shadow: 0 6px 16px rgba(184, 39, 39, 0.32);
  transform: scale(1.15) translateY(-3px);
  z-index: 2;
  animation: chronik-card-pulse 1.8s ease-in-out infinite;
}
@keyframes chronik-card-pulse {
  0%, 100% {
    box-shadow: 0 6px 16px rgba(184, 39, 39, 0.32);
    border-color: var(--stamp-red);
  }
  50% {
    box-shadow: 0 6px 22px rgba(184, 39, 39, 0.55), 0 0 0 3px rgba(184, 39, 39, 0.15);
    border-color: #d83535;
  }
}

/* --- Dossier holder --- */
.dossier-section {
  max-width: 1400px;
  margin: 7rem auto 0;
  padding: 0 2rem;
}
.file-cabinet {
  position: relative;
  padding: 3rem 2rem 3rem;
  /* Dunkle Nussbaum-Tischplatte mit Detektiv-Patina (Tintenspritzer,
     feine Kratzer) — nahtlos kachelbare Fototextur, ersetzt den alten
     CSS-Gradient-"Schrank", der als solcher nicht lesbar war. Die
     Akten liegen jetzt auf dem Schreibtisch. Oben drüber ein dezenter
     Vertikal-Schleier, der die dunkleren Enden des alten Gradients
     erhält (Tiefenwirkung an den Kanten). Grundfarbe als Fallback. */
  background-color: #46301a;
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.28) 0%, transparent 7%, transparent 93%, rgba(0, 0, 0, 0.28) 100%),
    url("/assets/tischplatte.webp");
  background-size: 100% 100%, 400px 400px;
  background-repeat: no-repeat, repeat;
  border-radius: 4px;
  box-shadow:
    inset 0 4px 12px rgba(0,0,0,0.4),
    inset 0 -3px 8px rgba(0,0,0,0.3),
    0 12px 36px rgba(26, 22, 19, 0.3);
  max-width: 1340px;
  /* 2.4rem Kopffreiheit für die Karteireiter-Tabs (ragen 37px über
     die Oberkante, vorher nur 18px) — ohne den Zuschlag würden sie
     an den Sektions-Untertitel stoßen. */
  margin: 2.4rem auto 0;
}
.file-cabinet::before,
.file-cabinet::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}
.file-cabinet::before { top: 14px; }
.file-cabinet::after { bottom: 14px; }
.file-cabinet-label {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  padding: 3px 14px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  text-transform: uppercase;
  z-index: 3;
}

.files-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px 20px;
  row-gap: 34px;
}
/* Big-Number-Overlay nur auf Mobile relevant — auf Desktop gibt es
   das Karussell nicht, also komplett aus. */
.files-bignum { display: none; }
/* Swipe-Hint nur auf Mobile — auf Desktop nie. */
.files-swipe-hint { display: none; }
.files-swipe-hint.is-hidden { display: none !important; }

