/* Scriby – Sprechblasen auf kühlem Grau, ein kräftiges Violett und eine gekritzelte Linie unter dem Namen. */

@font-face {
  font-family: 'Atkinson'; src: url(/fonts/atkinson-latin.woff2) format('woff2-variations');
  font-weight: 200 800; font-style: normal; font-display: swap;
  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: 'Atkinson'; src: url(/fonts/atkinson-latin-ext.woff2) format('woff2-variations');
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Atkinson'; src: url(/fonts/atkinson-latin-italic.woff2) format('woff2-variations');
  font-weight: 200 800; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Zilla'; src: url(/fonts/zilla-700-latin.woff2) format('woff2');
  font-weight: 700; font-display: swap;
  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: 'Zilla'; src: url(/fonts/zilla-700-latin-ext.woff2) format('woff2');
  font-weight: 700; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #EEF1F6;
  --surface: #FFFFFF;
  --ink: #191B2E;
  --ink-soft: #565B76;
  --line: #D9DDE8;
  --violet: #5B3DF5;
  --violet-deep: #3F25C9;
  --violet-soft: #ECE8FF;
  --amber: #E89B00;
  --amber-soft: #FFF3D6;
  --red: #C8322A;
  --red-soft: #FDECEA;
  --slab: 'Zilla', Georgia, serif;
  --sans: 'Atkinson', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); font-size: 1.0625rem; line-height: 1.55; color: var(--ink); background: var(--bg); min-height: 100dvh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--violet-deep); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html[lang=de] [data-only=en], html[lang=en] [data-only=de] { display: none; }

/* ─── Kopf ─── */
.top { display: flex; align-items: center; gap: 16px; width: 100%; max-width: 1080px; margin: 0 auto; padding: 18px clamp(14px, 4vw, 32px) 0; }
.wordmark { position: relative; font-family: var(--slab); font-weight: 700; font-size: 2.1rem; line-height: 1; color: var(--ink); text-decoration: none; padding-bottom: 10px; letter-spacing: -.01em; }
.squiggle { position: absolute; left: 0; right: -6px; bottom: 0; width: calc(100% + 6px); height: 12px; color: var(--violet); }
.admin-chip { background: var(--amber); color: #fff; font-weight: 800; border-radius: 8px; padding: 3px 10px; text-decoration: none; font-size: .9375rem; }
.admin-note { font-size: .9375rem; font-weight: 700; color: #8A5A00; background: var(--amber-soft); border: 1px solid #F2D48C; border-radius: 10px; padding: 8px 12px; }
.search { flex: 1; display: flex; justify-content: flex-end; }
.search input { width: min(100%, 300px); min-height: 42px; padding: 0 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); outline: none; }
.search input:focus { border-color: var(--violet); }
.lang { color: var(--ink-soft); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; padding: 8px 2px; white-space: nowrap; }

.main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 26px clamp(14px, 4vw, 32px) 48px; outline: none; }

/* ─── Allgemeine Bausteine ─── */
h1 { font-family: var(--slab); font-weight: 700; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.05; letter-spacing: -.01em; overflow-wrap: anywhere; }
h2 { font-family: var(--slab); font-weight: 700; font-size: 1.5rem; line-height: 1.15; }
.lede { color: var(--ink-soft); margin-top: 8px; max-width: 60ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .9375rem; margin-bottom: 10px; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }
.crumbs span[aria-hidden] { opacity: .6; }
.head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 12px; font-weight: 700; text-decoration: none; transition: transform .08s; }
.btn-go { background: var(--violet); color: #fff; box-shadow: 0 3px 0 var(--violet-deep); }
.btn-go:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--violet-deep); }
.btn-line { background: var(--surface); color: var(--ink); border: 2px solid var(--line); }
.btn-quiet { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 4px; padding: 0 8px; }
.btn:disabled { opacity: .5; cursor: progress; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.empty-note { padding: 28px; text-align: center; color: var(--ink-soft); }
.pager { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; align-items: center; }
.pager a, .pager span { min-width: 42px; min-height: 42px; display: inline-grid; place-items: center; border-radius: 10px; padding: 0 10px; font-weight: 700; text-decoration: none; }
.pager a { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.pager span[aria-current] { background: var(--violet); color: #fff; }

/* ─── Startseite ─── */
.home { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 900px) { .home { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; } }
.home-intro { grid-column: 1 / -1; }
.cats { list-style: none; overflow: hidden; }
.cats li + li { border-top: 1px solid var(--line); }
.cat { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 18px; padding: 16px 20px; color: var(--ink); text-decoration: none; }
.cat:hover { background: #F7F8FC; }
.cat-name { font-weight: 800; font-size: 1.125rem; }
.cat-desc { grid-column: 1; color: var(--ink-soft); font-size: .9375rem; }
.cat-stats { grid-row: 1 / span 2; grid-column: 2; align-self: center; text-align: right; font-size: .875rem; color: var(--ink-soft); white-space: nowrap; }
.cat-stats strong { color: var(--ink); font-size: 1rem; }
.side h2 { font-size: 1.25rem; margin-bottom: 10px; }

/* ─── Thread-Listen ─── */
.threads { list-style: none; overflow: hidden; }
.threads li + li { border-top: 1px solid var(--line); }
.trow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 14px; align-items: center; padding: 14px 18px; color: var(--ink); text-decoration: none; }
.trow:hover { background: #F7F8FC; }
.trow .ttitle { font-weight: 700; overflow-wrap: anywhere; }
.trow .tmeta { grid-column: 2; font-size: .875rem; color: var(--ink-soft); }
.trow .replies { grid-row: 1 / span 2; grid-column: 3; min-width: 46px; text-align: center; font-weight: 800; font-size: .9375rem; color: var(--violet-deep); background: var(--violet-soft); border-radius: 12px 12px 12px 4px; padding: 6px 8px; }
.trow .avatar { grid-row: 1 / span 2; }
.flag { display: inline-block; font-size: .75rem; font-weight: 800; border-radius: 6px; padding: 1px 7px; margin-right: 6px; vertical-align: 2px; }
.flag.pin { background: var(--amber-soft); color: #8A5A00; }
.flag.lock { background: #E8EAF0; color: var(--ink-soft); }
.flag.cat { background: var(--violet-soft); color: var(--violet-deep); }

.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .9375rem; flex-shrink: 0; background: var(--av, #5B3DF5); }

/* ─── Beiträge als Sprechblasen ─── */
.thread-flags { margin-top: 10px; }
.posts { list-style: none; display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.post { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: start; }
.post .avatar { width: 44px; height: 44px; margin-top: 4px; }
.bubble { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 4px 18px 18px 18px; padding: 12px 16px 10px; min-width: 0; }
.post.op .bubble { background: #F6F4FF; border-color: #D5CCFF; }
.post.admin .bubble { background: var(--amber-soft); border-color: #F2D48C; }
.post.hidden .bubble { background: #F3F4F7; border-style: dashed; }
.post.flagged .bubble { box-shadow: inset 4px 0 0 var(--red); }
.post.target .bubble { outline: 3px solid var(--violet); outline-offset: 2px; }
.phead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
.pname { font-weight: 800; overflow-wrap: anywhere; }
.pid { font-size: .75rem; font-weight: 700; color: var(--ink-soft); background: #EEF0F5; border-radius: 6px; padding: 0 6px; letter-spacing: .04em; }
.badge { font-size: .75rem; font-weight: 800; border-radius: 6px; padding: 0 7px; }
.badge.op { background: var(--violet); color: #fff; }
.badge.adm { background: var(--amber); color: #fff; }
.ptime { font-size: .8125rem; color: var(--ink-soft); }
.pnum { margin-left: auto; font-size: .8125rem; color: var(--ink-soft); text-decoration: none; }
.pbody { overflow-wrap: anywhere; }
.pbody > * + * { margin-top: .6em; }
.pbody blockquote { border-left: 4px solid #CFC6FF; background: rgba(91, 61, 245, .05); padding: 6px 12px; border-radius: 0 8px 8px 0; color: #3B3E58; }
.pbody ul, .pbody ol { padding-left: 1.4em; }
.pbody code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; background: #EEF0F5; border-radius: 4px; padding: 0 4px; }
.pbody pre { background: #191B2E; color: #F1F2F8; border-radius: 10px; padding: 12px 14px; overflow-x: auto; }
.pbody pre code { background: none; color: inherit; padding: 0; }
.pbody a { overflow-wrap: anywhere; }
.hidden-note { color: var(--ink-soft); font-style: italic; }
.pfoot { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; }
.act { font-size: .875rem; font-weight: 700; color: var(--ink-soft); padding: 4px 0; }
.act:hover { color: var(--violet-deep); }
.act.danger:hover { color: var(--red); }

.admin-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; margin: 14px 0; background: var(--amber-soft); border: 1px solid #F2D48C; border-radius: 12px; font-size: .9375rem; }
.admin-bar strong { margin-right: 6px; }
.admin-bar button, .admin-bar select { min-height: 36px; padding: 0 12px; border-radius: 8px; background: #fff; border: 1px solid #E5C77A; font-weight: 700; font-size: .875rem; }
.admin-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #E5C77A; }
.admin-tools button { font-size: .8125rem; font-weight: 700; padding: 3px 10px; border-radius: 6px; background: var(--amber-soft); border: 1px solid #F2D48C; }

/* ─── Schreiben ─── */
.composer { margin-top: 26px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.composer h2 { font-size: 1.25rem; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 700; font-size: .9375rem; }
.field input, .field select, .field textarea {
  width: 100%; border: 2px solid var(--line); border-radius: 12px; background: #fff; padding: 10px 12px; outline: none;
}
.field input, .field select { min-height: 48px; }
.field textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--violet); }
.name-row { max-width: 320px; }
.hint { font-size: .875rem; color: var(--ink-soft); }
.count { font-size: .8125rem; color: var(--ink-soft); text-align: right; }
.count.over { color: var(--red); font-weight: 700; }
.form-error { color: var(--red); font-weight: 700; }
.form-error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.locked-note { margin-top: 24px; padding: 16px; text-align: center; color: var(--ink-soft); }

/* ─── Fuß, Hinweise, Fenster ─── */
.foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; padding: 20px 16px calc(28px + env(safe-area-inset-bottom, 0px)); }
.link { color: var(--ink-soft); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; padding: 6px 2px; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px); z-index: 30; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
dialog { border: 0; color: var(--ink); }
dialog::backdrop { background: rgba(25, 27, 46, .55); }
.doc { margin: auto; width: min(100% - 24px, 680px); max-height: min(100dvh - 24px, 900px); background: #fff; border-radius: 18px; padding: 0; }
.doc.small { width: min(100% - 24px, 460px); }
.doc article, .report-form { padding: 28px 24px 30px; }
.doc h2 { font-size: 1.9rem; margin-bottom: 14px; padding-right: 44px; }
.doc h3 { font-size: 1.0625rem; font-weight: 800; margin: 18px 0 6px; }
.doc p, .doc li { line-height: 1.6; max-width: 68ch; }
.doc ul { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.doc-close { position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 26px; line-height: 1; }
.report-form { display: flex; flex-direction: column; gap: 14px; }
.reasons { border: 0; display: flex; flex-direction: column; gap: 8px; }
.reasons label { display: flex; gap: 10px; align-items: center; font-weight: 600; cursor: pointer; }
.reasons input { width: 20px; height: 20px; accent-color: var(--violet); }
.noscript { padding: 40px; text-align: center; }

@media (max-width: 640px) {
  .top { flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; }
  .search input { width: 100%; }
  .lang { margin-left: auto; }
  .post { grid-template-columns: 34px minmax(0, 1fr); gap: 8px; }
  .post .avatar { width: 34px; height: 34px; font-size: .8125rem; }
  .trow { padding: 12px 14px; gap: 2px 10px; }
  .trow .avatar { width: 34px; height: 34px; }
  .cat { padding: 14px 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 1ms !important; } }
