/* prompt.fock.rocks — Gestaltung nach dem Apple-Vorbild:
   heller Raum, ein einziges Blau, keine Schatten auf Flaechen.
   Farb- und Masswerte sind die des Vorbilds, nicht frei gewaehlt. */

:root {
  /* Grauwerte */
  --onyx:      #000000;
  --carbon:    #1d1d1f;   /* Fliesstext, dominante Tinte */
  --smoke:     #333333;
  --graphite:  #474747;
  --ash:       #707070;   /* gedaempfter Text */
  --mist:      #858585;   /* NUR Icons und Rahmen — fuer Text zu hell (3,5:1) */
  --hairline:  #d2d2d7;
  --pebble:    #e2e2e5;
  --frost:     #f5f5f7;   /* Seitengrund */
  --ice:       #f4f8fb;   /* erhoehte Flaeche */
  --white:     #ffffff;

  /* Das einzige Blau, und es hat genau zwei Aufgaben */
  --blue-fill: #0071e3;   /* gefuellte Schaltflaechen, ausgewaehlter Zustand */
  --blue-line: #0066cc;   /* Rahmen, Links */

  /* Abstaende */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 40px; --s8: 48px; --s9: 56px;
  --gap-section: 64px;

  --r-pill: 980px;
  --r-card: 8px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
          Inter, system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1440px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--frost);
  color: var(--carbon);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.016em;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s6); }

a { color: var(--blue-line); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--blue-line);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Kopfleiste ---------- */

.nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--carbon);
  border-bottom: 1px solid var(--smoke);
}
.nav-inner {
  max-width: var(--wrap); margin: 0 auto;
  display: flex; align-items: center; gap: var(--s5);
  padding: var(--s2) var(--s6);
}
.nav-mark {
  color: var(--white); font-size: 14px; font-weight: 600;
  letter-spacing: -0.01em; white-space: nowrap; flex: none;
}
.nav-mark:hover { text-decoration: none; }
.nav-dot { color: var(--blue-fill); }
.nav-links {
  display: flex; gap: var(--s4); overflow-x: auto; flex: 1;
  scrollbar-width: none; -ms-overflow-style: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: #d6d6d8; font-size: 12px; white-space: nowrap;
  padding: var(--s2) 0; line-height: 1.33; letter-spacing: -0.02em;
}
.nav-links a:hover { color: var(--white); text-decoration: none; }
.nav-out { color: #a1a1a6; font-size: 12px; white-space: nowrap; flex: none; }
.nav-out:hover { color: var(--white); text-decoration: none; }

/* ---------- Auftakt ---------- */

.hero {
  background: var(--frost);
  padding: var(--gap-section) 0 var(--s8);
  text-align: center;
}
.hero h1 {
  margin: 0 auto var(--s5);
  max-width: 24ch;
  font-size: 56px; font-weight: 600; line-height: 1.07;
  letter-spacing: 0.011em;
}
.hero-sub {
  margin: 0 auto var(--s7); max-width: 62ch;
  font-size: 21px; font-weight: 300; line-height: 1.24;
  letter-spacing: -0.005em; color: var(--carbon);
}
.hero-actions { display: flex; gap: var(--s4); justify-content: center; flex-wrap: wrap; }
.hero-meta { margin: var(--s7) 0 0; font-size: 14px; color: var(--ash); letter-spacing: -0.016em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 11px var(--s5);
  border-radius: var(--r-pill); font-size: 17px; font-weight: 400;
  letter-spacing: -0.016em; cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.btn:hover { text-decoration: none; }
.btn-fill { background: var(--blue-fill); color: var(--white); border: none; }
.btn-fill:hover { background: #0077ed; }
.btn-line { background: transparent; color: var(--blue-line); border: 1px solid var(--blue-line); }
.btn-line:hover { background: rgba(0, 102, 204, .06); }

/* ---------- Lesart ---------- */

.lesart { background: var(--white); padding: var(--gap-section) 0; border-top: 1px solid var(--hairline); }
.sec-h {
  margin: 0 0 var(--s7);
  font-size: 40px; font-weight: 600; line-height: 1.14; letter-spacing: 0.011em;
}
.lesart-grid {
  display: grid; gap: var(--s7);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.note h3 {
  margin: 0 0 var(--s3);
  font-size: 21px; font-weight: 600; line-height: 1.24; letter-spacing: -0.005em;
}
.note p { margin: 0; color: var(--ash); font-size: 17px; }
.note code {
  font-family: var(--mono); font-size: .85em;
  background: var(--frost); padding: 1px 5px; border-radius: 4px; color: var(--smoke);
}

/* ---------- Werkzeugleiste ---------- */

.toolbar {
  position: sticky; top: 37px; z-index: 30;
  background: rgba(245, 245, 247, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.toolbar-inner {
  display: flex; align-items: center; gap: var(--s3);
  padding-top: var(--s3); padding-bottom: var(--s3);
}
.search-wrap { position: relative; flex: 1 1 260px; max-width: 460px; }
.search-icon {
  position: absolute; left: var(--s3); top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--mist); pointer-events: none;
}
#q {
  width: 100%; min-height: 44px;
  padding: 10px var(--s4) 10px 36px;
  font: inherit; font-size: 17px; letter-spacing: -0.016em;
  color: var(--carbon); background: var(--white);
  border: 1px solid var(--hairline); border-radius: var(--r-card);
  -webkit-appearance: none; appearance: none;
}
#q::placeholder { color: var(--ash); }
#q:focus { border-color: var(--blue-line); outline: none; box-shadow: 0 0 0 3px rgba(0,102,204,.15); }

.sel-wrap { flex: none; }
#model-filter {
  min-height: 44px; padding: 10px var(--s7) 10px var(--s4);
  font: inherit; font-size: 14px; letter-spacing: -0.016em;
  color: var(--carbon); background: var(--white);
  border: 1px solid var(--hairline); border-radius: var(--r-card);
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23707070' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right var(--s3) center; background-size: 12px 8px;
}
.count { margin: 0 0 0 auto; font-size: 12px; color: var(--ash); white-space: nowrap; letter-spacing: -0.02em; }

/* ---------- Kategorien ---------- */

.cat { padding: var(--gap-section) 0 var(--s8); border-top: 1px solid var(--hairline); }
.cat:nth-child(odd)  { background: var(--white); }
.cat:nth-child(even) { background: var(--frost); }
.cat-head { display: flex; align-items: baseline; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s7); }
.cat-head h2 {
  margin: 0; font-size: 40px; font-weight: 600; line-height: 1.14; letter-spacing: 0.011em;
  scroll-margin-top: 96px;
}
.cat-n { font-size: 14px; color: var(--ash); letter-spacing: -0.016em; }

.grid { display: grid; gap: var(--s6); grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }

/* ---------- Beispielbild ---------- */

/* Die Bilder haben unterschiedliche Seitenverhaeltnisse — das gehoert zur
   Aussage, ein Hochformat-Prompt liefert eben ein Hochformat. Deshalb
   `contain` auf ruhigem Grund statt Beschnitt auf ein Einheitsmass. */
.shot {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s2);
}
.shot--paar { grid-template-columns: 1fr 1fr; }
.shot__link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  background: var(--ice);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  overflow: hidden;
}
.shot__link:hover { text-decoration: none; }
.shot__link img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.shot__marke {
  position: absolute; left: var(--s2); top: var(--s2);
  background: rgba(29, 29, 31, .82); color: var(--white);
  font-size: 11px; letter-spacing: -0.01em;
  padding: 2px 8px; border-radius: var(--r-pill);
}
.shot__quelle {
  position: absolute; right: var(--s2); bottom: var(--s2);
  background: rgba(29, 29, 31, .62); color: var(--white);
  font-size: 10px; letter-spacing: 0.02em; text-transform: uppercase;
  padding: 2px 7px; border-radius: var(--r-pill);
}
.shot__note {
  grid-column: 1 / -1;
  margin: 0; font-size: 12px; line-height: 1.4;
  color: var(--ash); letter-spacing: -0.02em;
}

/* ---------- Prompt-Kachel ---------- */

.card {
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--s6);
  display: flex; flex-direction: column; gap: var(--s4);
}
.cat:nth-child(odd) .card { background: var(--frost); border-color: var(--pebble); }

.card h3 {
  margin: 0; font-size: 24px; font-weight: 600; line-height: 1.18; letter-spacing: -0.01em;
}
.models { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip {
  font-size: 12px; line-height: 1.33; letter-spacing: -0.02em;
  color: var(--smoke); background: var(--pebble);
  padding: 3px 10px; border-radius: var(--r-pill);
}

.promptbox { display: flex; flex-direction: column; }
.promptbox pre {
  margin: 0; padding: var(--s4);
  background: var(--ice);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  font-family: var(--mono); font-size: 13px; line-height: 1.55;
  letter-spacing: 0; color: var(--smoke);
  white-space: pre-wrap; overflow-wrap: anywhere;
  max-height: 16em; overflow: hidden;
}
/* Der eingeklappte Text laeuft aus, statt hart abzuschneiden. Als Maske,
   nicht als aufgelegter Verlauf — sonst muss die Hoehe der Schaltflaechen
   in die Positionsrechnung, und genau daran ueberlappte es. */
.promptbox.is-clamped pre {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 42px), transparent);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 42px), transparent);
}
.promptbox.is-open pre {
  max-height: none;
  -webkit-mask-image: none; mask-image: none;
}
.pb-actions {
  display: flex; gap: var(--s2); align-items: center;
  margin-top: var(--s3);
}
.copy {
  min-height: 32px; padding: 5px var(--s4);
  border-radius: var(--r-pill); border: none;
  background: var(--blue-fill); color: var(--white);
  font: inherit; font-size: 13px; letter-spacing: -0.01em; cursor: pointer;
}
.copy:hover { background: #0077ed; }
.copy.is-done { background: var(--carbon); }
.more {
  min-height: 32px; padding: 5px var(--s4);
  border-radius: var(--r-pill); border: 1px solid var(--blue-line);
  background: transparent; color: var(--blue-line);
  font: inherit; font-size: 13px; letter-spacing: -0.01em; cursor: pointer;
}
.more:hover { background: rgba(0, 102, 204, .06); }
.pb-len { margin: 0 0 0 auto; font-size: 12px; color: var(--ash); letter-spacing: -0.02em; }

.why { margin: 0; color: var(--ash); font-size: 17px; }

.tips { border-top: 1px solid var(--hairline); padding-top: var(--s3); }
.cat:nth-child(odd) .tips { border-color: var(--pebble); }
.tips summary {
  cursor: pointer; font-size: 14px; font-weight: 600; letter-spacing: -0.016em;
  color: var(--blue-line); list-style: none; min-height: 24px;
}
.tips summary::-webkit-details-marker { display: none; }
.tips summary::before { content: "＋ "; font-weight: 400; }
.tips[open] summary::before { content: "－ "; }
.tips ul { margin: var(--s3) 0 0; padding-left: var(--s5); }
.tips li { font-size: 14px; line-height: 1.5; color: var(--ash); margin-bottom: var(--s2); }

.card-foot {
  margin-top: auto; padding-top: var(--s3);
  display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap;
  border-top: 1px solid var(--hairline);
}
.cat:nth-child(odd) .card-foot { border-color: var(--pebble); }
.tag { font-size: 12px; color: var(--ash); letter-spacing: -0.02em; }
.tag::before { content: "#"; }
.src { margin-left: auto; max-width: 100%; font-size: 12px; letter-spacing: -0.02em;
       overflow-wrap: anywhere; }
.src.is-plain { color: var(--ash); }

/* ---------- Leerzustand, Hinweis ---------- */

.empty { text-align: center; padding: var(--s9) var(--s6); color: var(--ash); font-size: 21px; font-weight: 300; }
.linkbtn {
  background: none; border: none; padding: 0; font: inherit;
  color: var(--blue-line); cursor: pointer; text-decoration: underline;
}

.toast {
  position: fixed; left: 50%; bottom: var(--s6); transform: translateX(-50%);
  background: var(--carbon); color: var(--white);
  font-size: 14px; letter-spacing: -0.016em;
  padding: 10px var(--s5); border-radius: var(--r-pill); z-index: 60;
}

/* ---------- Fuss ---------- */

.foot { background: var(--frost); border-top: 1px solid var(--hairline); padding: var(--gap-section) 0 var(--s7); }
.foot-cols { display: grid; gap: var(--s7); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.foot h4 { margin: 0 0 var(--s3); font-size: 12px; font-weight: 600; letter-spacing: -0.02em; }
.foot ul { margin: 0; padding: 0; list-style: none; }
.foot li { margin-bottom: var(--s2); }
.foot a, .foot-note { font-size: 12px; line-height: 1.5; letter-spacing: -0.02em; }
.foot a { color: var(--ash); }
.foot a:hover { color: var(--carbon); }
.foot-note { margin: 0; color: var(--ash); max-width: 40ch; }
.foot-bar {
  margin: var(--s7) 0 0; padding-top: var(--s5);
  border-top: 1px solid var(--hairline);
  font-size: 12px; color: var(--ash); letter-spacing: -0.02em;
}

/* ---------- Schmale Schirme ---------- */

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 740px) {
  .wrap { padding: 0 var(--s5); }
  .hero { padding: var(--s8) 0 var(--s7); }
  .hero h1 { font-size: 34px; letter-spacing: -0.01em; }
  .hero-sub { font-size: 19px; }
  .sec-h, .cat-head h2 { font-size: 28px; letter-spacing: 0.007em; }
  .card h3 { font-size: 21px; }
  .cat { padding: var(--s8) 0 var(--s7); }
  .lesart { padding: var(--s8) 0; }
  .toolbar-inner { flex-wrap: wrap; }
  .search-wrap { flex: 1 1 100%; max-width: none; }
  .count { margin-left: 0; }
  .nav-links { display: none; }
}
