/* Interner Bereich – im Design von bruendl.io */
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/InterTight.woff") format("woff"); }
@font-face { font-family: "Overpass"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/Overpass.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("/fonts/JetBrainsMono.woff") format("woff"); }

:root {
  --bg: #f7f4ee; --card: #efeae0; --ink: #1f2533; --muted: #5f6371; --line: #e2dccf; --accent: #d9582a;
  --ok: #3d7a52; --warn: #c2410c;
  --sans: "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #14161d; --card: #1c1f28; --ink: #eeebe4; --muted: #aeb2be; --line: #2c303c; --accent: #ff8f5e; --ok: #7fc495; --warn: #ffab7d; }
}
:root[data-theme="dark"] { --bg: #14161d; --card: #1c1f28; --ink: #eeebe4; --muted: #aeb2be; --line: #2c303c; --accent: #ff8f5e; --ok: #7fc495; --warn: #ffab7d; }
:root[data-fontsize="1"] { font-size: 115%; }
:root[data-fontsize="2"] { font-size: 130%; }
:root.a11y-contrast { --muted: #3d4150; --line: #8a8f9f; }
:root.a11y-motion * { transition: none !important; animation: none !important; }

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .85em; padding: .1em .35em; border-radius: 5px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.view:focus, main[tabindex="-1"]:focus { outline: none; }  /* Inhaltsbereich bekommt den Fokus nur für Screenreader */

/* Marke */
.brand { display: inline-flex; align-items: center; gap: .65rem; font-family: "Overpass", var(--sans); font-weight: 800; text-decoration: none; letter-spacing: -.01em; }
.brand svg { width: 28px; height: 28px; }
.brand em { font-style: normal; font-family: var(--mono); font-size: .7rem; color: var(--akzent-text, #b0441b); margin-left: .35rem; letter-spacing: .04em; text-transform: uppercase; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .6rem; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: .6rem 1rem; cursor: pointer; font-weight: 500; transition: border-color .2s, background .2s, color .2s; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); padding: .7rem 1rem .7rem 1.3rem; }
.btn.primary .arrow { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--accent); color: #fff; }
.btn.ghost { color: var(--muted); }
.btn.small { padding: .4rem .8rem; font-size: .85rem; }
.btn.danger { color: var(--warn); }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

/* Login */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1.25rem; }
.auth-card { width: min(420px, 100%); }
.auth-card .brand { margin-bottom: 2.5rem; }
.auth h1 { font-size: 2rem; font-weight: 600; letter-spacing: -.03em; margin-bottom: .4rem; }
.auth .sub { color: var(--muted); margin-bottom: 1.6rem; }
.auth form { display: grid; gap: 1rem; }
.auth .btn.primary { justify-self: start; margin-top: .4rem; }
.auth-link { margin-top: 1.4rem; font-size: .95rem; }
.auth-link a { color: var(--muted); text-decoration: none; }
.auth-link a:hover, .auth-link a:focus-visible { color: var(--ink); }
.hint { font-size: .85rem; color: var(--muted); }
.msg { padding: .7rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-size: .95rem; }
.msg.err { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.msg.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }

/* Formularfelder */
label { display: grid; gap: .35rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .03em; color: var(--muted); }
input, select, textarea { width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .65rem .8rem; }
textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
label.check { display: flex; align-items: center; gap: .55rem; font-family: var(--sans); font-size: .95rem; color: var(--ink); }
label.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* App-Gerüst */
.app { max-width: 76rem; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem) 4rem; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 0; }
.top-actions { display: flex; align-items: center; gap: .6rem; }
.tabs { display: flex; gap: .3rem; overflow-x: auto; padding: .3rem; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 2rem; scrollbar-width: none; background: var(--bg); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 0; background: transparent; padding: .5rem 1rem; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs .tab-link { flex: none; padding: .5rem 1rem; border-radius: 999px; color: var(--muted); font-weight: 500; white-space: nowrap; text-decoration: none; }
.tabs .tab-link:hover { color: var(--ink); }
.tabs button.active { background: var(--ink); color: var(--bg); }

.view-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.view-head h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.view-head p { color: var(--muted); margin-top: .3rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1.2rem; }
.toolbar input[type=search] { max-width: 260px; padding: .5rem .8rem; border-radius: 999px; }
.toolbar select { width: auto; padding: .45rem .8rem; border-radius: 999px; font-size: .9rem; }
.chip { font-family: var(--mono); font-size: .7rem; padding: .2rem .55rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.chip.hoch { color: #fff; background: var(--akzent-text, #b0441b); border-color: var(--akzent-text, #b0441b); }
:root[data-theme="dark"] .chip.hoch { color: #14161d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.hoch { color: #14161d; } }
.chip.mittel { color: var(--ink); border-color: var(--ink); }
.chip.niedrig { color: var(--muted); }
.chip.late { color: var(--warn); border-color: var(--warn); }
.chip.today { color: var(--accent); border-color: var(--accent); }
.chip.tag { background: color-mix(in srgb, var(--ink) 6%, transparent); border-color: transparent; color: color-mix(in srgb, var(--ink) 78%, var(--bg)); }
.chip.filter { cursor: pointer; background: transparent; }
.chip.filter.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Listen und Karten */
.list { display: grid; gap: .6rem; }
.item { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: start; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.item.done .item-title { text-decoration: line-through; color: var(--muted); }
.item-title { font-weight: 600; letter-spacing: -.01em; }
.item-meta { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.item-text { color: var(--muted); font-size: .95rem; margin-top: .35rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.item-actions { display: flex; gap: .3rem; }
.item .mini { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: .3rem .45rem; border-radius: 8px; font-size: .85rem; }
.item .mini:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.tick { width: 22px; height: 22px; margin-top: .1rem; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; cursor: pointer; display: grid; place-items: center; }
.tick:hover { border-color: var(--accent); }
.tick.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tick svg { width: 12px; height: 12px; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.group-title { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--akzent-text, #b0441b); margin: 1.6rem 0 .6rem; }

/* Schnelleingabe */
.quick { display: flex; gap: .5rem; margin-bottom: 1rem; }
.quick input { border-radius: 999px; }
.quick .btn { flex: none; }

/* Übersicht */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 2rem; }
.stat { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 16px; background: var(--card); cursor: pointer; text-align: left; }
.stat:hover { border-color: var(--accent); }
.stat .n { font-size: 2rem; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.stat .l { font-family: var(--mono); font-size: .7rem; color: var(--muted); margin-top: .5rem; text-transform: uppercase; letter-spacing: .05em; }
.dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.panel { min-width: 0; }
.item > div { min-width: 0; }
.dash .item { grid-template-columns: auto 1fr; }
.dash .item-actions { grid-column: 2; margin-left: -.45rem; }
.panel h2 { font-size: 1rem; font-weight: 600; margin-bottom: .8rem; display: flex; justify-content: space-between; align-items: center; }
.panel h2 a { font-family: var(--mono); font-size: .7rem; font-weight: 400; color: var(--muted); text-decoration: none; cursor: pointer; }

/* Zeitstrahl Meilensteine */
.timeline { position: relative; padding-left: 1.6rem; }
.timeline::before { content: ""; position: absolute; left: .45rem; top: .4rem; bottom: .4rem; border-left: 1.5px dashed var(--line); }
.timeline .item { position: relative; }
.timeline .item::before { content: ""; position: absolute; left: -1.45rem; top: 1.25rem; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline .item.done::before { background: var(--accent); }

/* Notizen & Sammlung als Raster */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.card { display: flex; flex-direction: column; gap: .5rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 16px; background: var(--card); min-height: 9rem; }
.card.pinned { border-color: var(--accent); }
.card-head { display: flex; justify-content: space-between; gap: .5rem; align-items: start; }
.card-title { font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.card-body { color: var(--muted); font-size: .95rem; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.card .link { font-family: var(--mono); font-size: .75rem; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.card .link:hover { color: var(--accent); }
.star { border: 0; background: transparent; cursor: pointer; font-size: 1.1rem; line-height: 1; color: var(--line); }
.star.on { color: var(--accent); }
.card .mini { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .85rem; padding: .2rem .35rem; border-radius: 6px; }
.card .mini:hover { color: var(--accent); }

/* Dialog */
.dlg { margin: auto; width: min(560px, calc(100vw - 2rem)); border: 1px solid var(--line); border-radius: 20px; background: var(--bg); color: var(--ink); padding: 0; box-shadow: 0 30px 80px -20px rgba(0,0,0,.35); }
.dlg::backdrop { background: rgba(10, 20, 15, .45); backdrop-filter: blur(3px); }
.dlg form { display: grid; gap: .9rem; padding: 1.5rem; max-height: calc(100vh - 3rem); overflow: auto; }
.dlg h2 { font-size: 1.3rem; font-weight: 600; letter-spacing: -.02em; }
.dlg .row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.dlg .actions { display: flex; justify-content: space-between; gap: .5rem; margin-top: .4rem; }
.dlg .actions .right, .dlg .actions .links { display: flex; gap: .5rem; flex-wrap: wrap; }

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%) translateY(150%); opacity: 0; visibility: hidden; background: var(--ink); color: var(--bg); padding: .65rem 1.1rem; border-radius: 999px; font-size: .9rem; transition: transform .3s; z-index: 50; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }

@media (max-width: 640px) {
  .item { grid-template-columns: auto 1fr; }
  .item-actions { grid-column: 2; }
  .dlg .row { grid-template-columns: 1fr; }
  .top .logout .btn { padding: .4rem .7rem; }
  .brand span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* nur optisch weg – Screenreader lesen den Namen weiter */
}
.timeline .item.done .item-title { text-decoration: none; color: var(--ink); }

/* ---------- Sammlung: Die drei ??? ---------- */
:root { --ddf-red: #E91B24; --ddf-blue: #02ABEB; --ddf-black: #0b0b0c; }
.ddf { display: inline-flex; align-items: center; gap: .02em; background: var(--ddf-black); border-radius: .28em; padding: .05em .22em .02em; margin-right: .4em; font-weight: 800; letter-spacing: -.02em; line-height: 1; vertical-align: .05em; font-size: .85em; }
.ddf .q1 { color: #fefefe; }
.ddf .q2 { color: var(--ddf-red); }
.ddf .q3 { color: var(--ddf-blue); }
.ddf-title { display: flex; align-items: center; }
.cat-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.cat-btn { display: inline-flex; align-items: center; gap: .55rem; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: .5rem .9rem; cursor: pointer; font-weight: 500; }
.cat-btn .n { font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.cat-btn:hover { border-color: var(--ink); }
.cat-btn.on { background: var(--ddf-black); color: #fefefe; border-color: var(--ddf-black); }
.cat-btn.on .n { color: var(--ddf-blue); }
.cat-btn.cat-kassetten.on .n { color: var(--ddf-red); }
.coll-meta { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .45rem; }
.chip.cat-kassetten { border-color: var(--ddf-red); color: var(--ddf-red); }
.chip.cat-cds { border-color: var(--ddf-blue); color: var(--ddf-blue); }
.chip.cat-buecher { border-color: var(--ink); color: var(--ink); }
.chip.cat-streaming { border-color: var(--ink); border-style: dashed; color: var(--ink); }
.chip.cat-sammlerstuecke { background: var(--ddf-black); border-color: var(--ddf-black); color: #fefefe; }
.chip.nr { font-weight: 600; color: var(--ink); }
.chip.status-vorhanden { color: var(--ddf-blue); border-color: var(--ddf-blue); }
.chip.status-gesucht { color: #fff; background: var(--ddf-red); border-color: var(--ddf-red); }
.chip.status-bestellt { color: var(--ink); border-style: dashed; border-color: var(--ink); }
.chip.status-doppelt { color: var(--muted); }
.card.coll { border-top: 3px solid var(--line); }
.card.coll.st-gesucht { border-top-color: var(--ddf-red); }
.card.coll.st-vorhanden { border-top-color: var(--ddf-blue); }
.chip.status-unveroeffentlicht { color: var(--muted); border-style: dashed; text-decoration: line-through; }
.card.coll.st-unveroeffentlicht { border-top-style: dashed; border-top-color: var(--muted); opacity: .75; }
.card.coll .star.on { color: var(--ddf-red); }

.series { font-family: var(--mono); font-size: .7rem; color: var(--muted); margin-top: -.15rem; }
.features { display: flex; flex-wrap: wrap; gap: .3rem; }
.chip.feat { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.chip.filter.missing.on { background: var(--ddf-red); border-color: var(--ddf-red); color: #fff; }
.progress-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.prog { text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: .6rem .75rem; cursor: pointer; }
.prog:hover, .prog.on { border-color: var(--ddf-blue); }
.prog.on { box-shadow: 0 0 0 2px color-mix(in srgb, var(--ddf-blue) 30%, transparent); }
.prog-top { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; margin-bottom: .4rem; }
.prog-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prog-n { font-family: var(--mono); font-size: .72rem; color: var(--muted); flex: none; }
.prog-bar { height: 5px; border-radius: 99px; background: color-mix(in srgb, var(--ddf-red) 25%, transparent); overflow: hidden; }
.prog-bar span { display: block; height: 100%; background: var(--ddf-blue); border-radius: 99px; }
.chip.edition { color: var(--ink); border-color: var(--ink); }
.chip.us { color: var(--ddf-blue); border-color: color-mix(in srgb, var(--ddf-blue) 50%, transparent); }

/* ---------- Coverbilder ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.card-head .head-main { flex: 1; min-width: 0; }
.cover-thumb { flex: none; width: 64px; height: 64px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); cursor: zoom-in; display: grid; place-items: center; }
.cover-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-thumb:hover { border-color: var(--ink); }
/* Sammlung: größere Cover, mehr Luft zwischen den Kacheln */
.grid.coll-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.4rem; }
.card.coll .card-head { gap: .9rem; }
/* Cover behalten ihr Format: Kassetten/Bücher hochkant, CDs quadratisch – nichts wird beschnitten oder gestaucht */
.card.coll .cover-thumb { width: auto; height: auto; display: block; line-height: 0; border-radius: 8px; background: transparent; }
.card.coll .cover-thumb img { width: auto; height: auto; max-width: 120px; max-height: 136px; object-fit: contain; }
.card.coll .cover-thumb.leer { display: grid; place-items: center; line-height: 1.25; border: 1.5px dashed var(--line); background: var(--bg); color: var(--muted); cursor: copy; padding: .4rem; text-align: center; font-size: .72rem; }
.card.coll .cover-thumb.leer.cover-hoch { width: 96px; height: 128px; }
.card.coll .cover-thumb.leer.cover-quadrat { width: 120px; height: 120px; }
.card.coll .cover-thumb.leer:hover, .card.coll.drop .cover-thumb.leer { border-color: var(--ddf-blue); color: var(--ink); }
/* Ersatz-Cover: Fallakte auf Papier mit Stempel – eigener Entwurf */
.card.coll .cover-thumb.ersatz { --e-farbe: #3a4256; position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: .3rem;
  padding: .5rem .5rem .45rem .8rem; border: 1px solid #d8cfbd; border-radius: 6px; background: #f3ecdc; color: #2a2a2a; text-align: left; overflow: hidden; cursor: copy;
  background-image: repeating-linear-gradient(0deg, transparent 0 13px, rgba(80, 60, 30, .07) 13px 14px); box-shadow: inset 4px 0 0 var(--e-farbe); }
.card.coll .cover-thumb.ersatz.cat-kassetten { --e-farbe: #b3262c; }
.card.coll .cover-thumb.ersatz.cat-cds { --e-farbe: #1f6f9a; }
.card.coll .cover-thumb.ersatz.cat-buecher { --e-farbe: #4a3b2a; }
.card.coll .cover-thumb.ersatz.cat-streaming { --e-farbe: #5b3f8c; }
.ersatz .e-akte { font-family: var(--mono); font-size: .5rem; letter-spacing: .08em; text-transform: uppercase; color: #6b6150; }
.ersatz .e-stempel { display: inline-flex; flex-direction: column; align-items: center; padding: .1rem .35rem .05rem; border: 2px solid var(--e-farbe); border-radius: 4px; color: var(--e-farbe);
  transform: rotate(-6deg); line-height: 1; margin: .1rem 0 .15rem; opacity: .9; }
.ersatz .e-stempel small { font-family: var(--mono); font-size: .45rem; letter-spacing: .1em; text-transform: uppercase; }
.ersatz .e-stempel b { font-family: "Overpass", var(--sans); font-weight: 900; font-size: 1.15rem; letter-spacing: -.02em; }
.ersatz .e-titel { font-weight: 650; font-size: .66rem; line-height: 1.2; letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: normal; hyphens: manual; }
.ersatz .e-lupe { position: absolute; right: .45rem; bottom: .5rem; width: 16px; height: 16px; border: 2px solid var(--e-farbe); border-radius: 50%; opacity: .55; }
.ersatz .e-lupe::after { content: ""; position: absolute; width: 2px; height: 8px; background: var(--e-farbe); right: -4px; bottom: -7px; transform: rotate(-45deg); border-radius: 1px; }
.ersatz .e-hinweis { margin-top: auto; font-family: var(--mono); font-size: .52rem; color: #6b6150; }
.card.coll .cover-thumb.ersatz:hover .e-hinweis, .card.coll.drop .cover-thumb.ersatz .e-hinweis, .card.coll .cover-thumb.ersatz:focus-visible .e-hinweis { color: var(--e-farbe); font-weight: 700; }
.card.coll.drop .cover-thumb.ersatz { outline: 2px dashed var(--ddf-blue); outline-offset: 2px; }
@media (max-width: 520px) {
  .grid.coll-grid { grid-template-columns: 1fr; gap: 1.1rem; }
  .card.coll .cover-thumb img { max-width: 104px; max-height: 120px; }
  .card.coll .cover-thumb.leer.cover-hoch { width: 84px; height: 112px; }
  .card.coll .cover-thumb.leer.cover-quadrat { width: 104px; height: 104px; }
  .card.coll .cover-thumb.ersatz { gap: .2rem; padding: .4rem .4rem .35rem .7rem; }
  .ersatz .e-stempel b { font-size: 1rem; }
  .ersatz .e-titel { font-size: .62rem; }
  .ersatz .e-hinweis { display: none; }
}
.cover-thumb:focus-visible { outline: 2px solid var(--accent, #d9582a); outline-offset: 2px; }
.card.coll.drop, .cover-prev.drop { outline: 2px dashed var(--ddf-blue); outline-offset: 3px; }

.cover-field { display: flex; gap: 1rem; align-items: center; margin-bottom: .9rem; }
.cover-prev { flex: none; width: 104px; height: 128px; border: 1px dashed var(--line); border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--bg); }
.cover-prev img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.cover-prev span { font-family: var(--mono); font-size: .7rem; color: var(--muted); text-align: center; padding: .3rem; }
.cover-tools { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.cover-label { font-weight: 600; }
.cover-tools .hint { margin: 0; font-size: .8rem; }
.cover-btns { display: flex; gap: .5rem; flex-wrap: wrap; }
.dlg.dlg-cover { width: min(860px, calc(100vw - 2rem)); }
.cover-big { display: grid; place-items: center; margin: .5rem 0 0; max-height: 72vh; overflow: auto; border-radius: 10px; overscroll-behavior: contain; }
.cover-zoom { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; line-height: 0; border-radius: 10px; }
.cover-zoom:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cover-big img { max-width: 100%; max-height: 70vh; border-radius: 10px; border: 1px solid var(--line); display: block; }
.cover-big.mit-leiste { max-height: 60vh; }
.cover-big.mit-leiste img { max-height: 58vh; }
.cover-big.gross { place-items: start; }
.cover-big.gross .cover-zoom { cursor: zoom-out; }
.cover-big.gross img { max-width: none; max-height: none; }
.cover-zoom-hint { margin: 0 0 .4rem; font-size: .8rem; color: var(--muted); }
/* Weitere Bilder (Dreifachband) */
.bilder-feld { display: grid; gap: .3rem; margin: -.3rem 0 .9rem; }
.bilder-feld .hint { margin: 0; font-size: .8rem; }
.bilder-reihe { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .2rem; }
.bild-klein { position: relative; width: 72px; height: 96px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); display: grid; place-items: center; overflow: hidden; padding: 0; }
.bild-klein img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.bild-dazu { border-style: dashed; color: var(--muted); font-size: .75rem; cursor: copy; }
.bild-dazu:hover, .bild-dazu.drop { border-color: var(--ddf-blue); color: var(--ink); }
.bild-weg { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(20, 20, 20, .75); color: #fff; font-size: .9rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.bild-weg:hover, .bild-weg:focus-visible { background: var(--ddf-red); }
.bild-haupt { position: absolute; left: 3px; bottom: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(20, 20, 20, .6); color: #fff; font-size: .8rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.bild-haupt[aria-pressed="true"] { background: var(--ddf-red); }
.bild-klein.haupt { border: 2px solid var(--ddf-red); }
.bilder-vorschau { display: flex; justify-content: center; min-height: 0; }
.bilder-vorschau [hidden] { display: none; }
.card.coll .cover-thumb { position: relative; }
.bilder-zahl { position: absolute; right: 4px; bottom: 4px; padding: .1rem .35rem; border-radius: 999px; background: rgba(15, 15, 15, .78); color: #fff; font-family: var(--mono); font-size: .65rem; line-height: 1.3; }
.bilder-leiste { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin: .2rem 0 .3rem; }
.bild-wahl { padding: 2px; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; line-height: 0; }
.bild-wahl img { max-width: 56px; max-height: 72px; width: auto; height: auto; border-radius: 5px; display: block; }
.bild-wahl.on { border-color: var(--ink); }
.bild-wahl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 520px) { .cover-field { align-items: flex-start; } .cover-prev { width: 88px; height: 108px; } }
.cover-url { display: flex; gap: .4rem; margin-top: .2rem; }
.cover-url input { flex: 1; min-width: 0; font-size: .85rem; padding: .45rem .6rem; }
.cover-url-label { display: block; margin-bottom: .5rem; }
.batch-status { min-height: 1.3em; }
.batch-errors ul { margin: .3rem 0 0; padding-left: 1.1rem; max-height: 9rem; overflow: auto; font-size: .8rem; color: var(--ddf-red); }
.card.coll.loading { opacity: .55; pointer-events: none; }
.chip.year { font-family: var(--mono); color: var(--muted); }
.orig-title { font-size: .8rem; font-style: italic; color: var(--muted); margin-top: .1rem; }
.card.coll .card-title { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; word-break: normal; }

  /* Externe Links: typisches Symbol dahinter */
  a.ext::after { content: ""; display: inline-block; width: .72em; height: .72em; margin-left: .28em; vertical-align: -.02em;
    background-color: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6'/%3E%3Cpath d='M20 4l-9 9'/%3E%3Cpath d='M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") no-repeat center / contain; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6'/%3E%3Cpath d='M20 4l-9 9'/%3E%3Cpath d='M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") no-repeat center / contain; }

/* Werkzeuge an-/ausschalten */
.schalter { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; transition: background .2s, border-color .2s; }
.schalter .knopf { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.schalter.an { background: var(--accent); border-color: var(--accent); }
.schalter.an .knopf { transform: translateX(18px); background: #fff; }
.schalter.gross { width: 62px; height: 36px; }
.schalter.gross .knopf { width: 28px; height: 28px; }
.schalter.gross.an .knopf { transform: translateX(26px); }
.wz-haupt { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; padding: 1.2rem 1.4rem; border: 1px solid var(--line); border-radius: 16px; background: var(--card); margin-bottom: 1.6rem; }
.wz-haupt.an { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.wz-haupt h2 { font-size: 1.1rem; margin-bottom: .3rem; }
.wz-haupt p { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.wz-kats { display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: 1rem; transition: opacity .2s; }
.wz-kats.gedimmt { opacity: .5; }
.wz-kat-box { border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1rem .4rem; }
.wz-kat-kopf { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.wz-kat-kopf h3 { font-size: 1rem; flex: 1; }
.wz-kat-kopf .btn.small { padding: .3rem .7rem; font-size: .78rem; }
.wz-zeilen { list-style: none; margin: 0; padding: 0; }
.wz-zeilen li { display: flex; align-items: center; gap: .7rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.wz-zeilen li > div { flex: 1; min-width: 0; display: grid; }
.wz-zeilen li span.muted { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c64-spiel { margin-bottom: 1.2rem; }
a.btn { text-decoration: none; color: inherit; }
.wz-haupt a.btn { flex: none; white-space: nowrap; }
a.btn.primary { color: var(--bg); }
.c64-spiel .wz-zeilen li span.muted { white-space: normal; }
.wz-zeilen li.aus b { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.wz-link { text-decoration: none; padding: .2rem .4rem; }
.klein-hinweis { font-size: .8rem; margin-top: 1.4rem; }
.wz-zeilen .muted, .wz-kat-kopf .muted, .klein-hinweis, .wz-link { color: var(--muted); }

/* Sicherheit: Anmeldeprotokoll */
.sec-list { list-style: none; margin: .2rem 0 .8rem; padding: 0; font-size: .9rem; }
.sec-list li { padding: .35rem 0; border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent); }
.sec-list li:last-child { border-bottom: 0; }

:root { --akzent-text: #b0441b; }
:root[data-theme="dark"] { --akzent-text: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --akzent-text: var(--accent); } }

/* ---------- Dokumente ---------- */
.ablage { border: 1.5px dashed var(--line); border-radius: 16px; padding: 1.3rem 1.2rem; margin-bottom: 1.2rem; text-align: center; transition: border-color .2s, background .2s; }
.ablage.drueber { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ablage .hint { margin-top: .3rem; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--akzent-text, #b0441b); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.upload-status { display: grid; gap: .45rem; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--card); margin-bottom: 1.2rem; font-size: .95rem; overflow-wrap: anywhere; }
.upload-status progress { width: 100%; height: 6px; accent-color: var(--accent); }
.item.datei { align-items: center; }
.datei-typ, .datei-bild { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.datei-typ { display: grid; place-items: center; font-family: var(--mono); font-size: .7rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); background: var(--bg); }
.datei-typ.pdf { color: var(--akzent-text, #b0441b); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.datei-bild { object-fit: cover; border: 1px solid var(--line); background: var(--bg); }
.item.datei a.item-title { display: block; text-decoration: none; overflow-wrap: anywhere; }
.item.datei a.item-title:hover { color: var(--akzent-text, #b0441b); }
.item .mini[href] { text-decoration: none; display: inline-block; }

/* ===== Sammlung als Hängeregister (v7.0): Ordnerreiter, Registerkarten, Karteikarten, Stempel – eigene Entwürfe ===== */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.pikto { width: 1.05em; height: 1.05em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.kat-kassetten, .cat-btn.cat-kassetten { --kat: #b3262c; }
.kat-cds, .cat-btn.cat-cds { --kat: #1f6f9a; }
.kat-buecher, .cat-btn.cat-buecher { --kat: #5a4632; }
.kat-streaming, .cat-btn.cat-streaming { --kat: #5b3f8c; }
.kat-sammlerstuecke, .cat-btn.cat-sammlerstuecke { --kat: #2a2a2a; }
.cat-btn { --kat: var(--ink); }

/* A – Kategorien als Ordnerreiter über dem Fach */
.cat-bar { gap: 4px; margin: 0; padding: 0 .6rem; align-items: flex-end; flex-wrap: wrap; }
.cat-btn { border-radius: 10px 10px 0 0; border: 1px solid var(--line); border-bottom: 0; background: color-mix(in srgb, var(--card) 55%, var(--line)); color: var(--muted);
  box-shadow: inset 0 3px 0 var(--kat); padding: .5rem .85rem .45rem; font-size: .9rem; gap: .45rem; }
.cat-btn .pikto { color: var(--kat); }
.cat-btn:hover { border-color: var(--line); color: var(--ink); background: color-mix(in srgb, var(--card) 80%, var(--line)); }
.cat-btn.on { background: var(--card); color: var(--ink); border-color: var(--line); padding: .65rem .95rem .6rem; position: relative; top: 1px; z-index: 1; }
.cat-btn.on .n, .cat-btn.cat-kassetten.on .n { color: var(--muted); }
.fach { background: var(--card); border: 1px solid var(--line); border-radius: 0 16px 16px 16px; padding: 1.1rem 1.1rem 1.3rem; margin-bottom: 1rem; }
.fach .prog { background: var(--bg); }

/* B + C – Registerkarte mit Nummernreiter, linierte Karteikarte (bleibt auch im dunklen Modus Papier) */
.akte { --card: #fbf7ee; --bg: #f3ecdc; --ink: #2a2a2a; --muted: #6b6150; --line: #d8cfbd; --accent: #b0441b; display: flex; flex-direction: column; color: var(--ink); min-width: 0; }
.akte-reiter { align-self: flex-start; margin-left: 14px; padding: .22rem .75rem .26rem; background: var(--kat, #2a2a2a); color: #fff; border-radius: 8px 8px 0 0; font-family: var(--mono); font-size: .72rem; letter-spacing: .02em; line-height: 1.3; }
.akte .card.coll.coll { flex: 1; border: 1px solid var(--line); border-top: 3px solid var(--kat, var(--line)); border-radius: 0 14px 14px 14px; background-color: var(--card);
  background-image: repeating-linear-gradient(180deg, transparent 0 21px, rgba(31, 111, 154, .1) 21px 22px); background-position: 0 6px; gap: .55rem; }
.akte .card.coll.st-unveroeffentlicht { border-style: dashed; }
.akte-kopf { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .72rem; color: var(--muted); letter-spacing: .03em; }
.akte-art { display: inline-flex; align-items: center; gap: .4rem; }
.akte-art .pikto { color: var(--kat); width: 15px; height: 15px; }
.akte .coll-meta { margin-bottom: .3rem; }
.akte .card-title { color: var(--ink); }

/* Status als Stempelabdruck: ungleichmäßige Tinte, leicht schräg */
.stempel { --s: #1f5f8a; display: inline-block; font-family: var(--mono); font-weight: 700; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; line-height: 1.2;
  padding: .2rem .55rem; border: 2px solid var(--s); color: var(--s); border-radius: 5px; transform: rotate(var(--dreh, -6deg)); filter: var(--tinte); mix-blend-mode: multiply; margin: .2rem .25rem .2rem .1rem; }
.stempel.st-vorhanden, .stempel.st-doppelt { box-shadow: inset 0 0 0 2px var(--card), inset 0 0 0 3px var(--s); padding: .3rem .65rem; }
.stempel.st-gesucht { --s: #b3262c; background: var(--s); color: var(--card); }
.stempel.st-bestellt { --s: #2a2a2a; border-style: dashed; }
.stempel.st-unveroeffentlicht { --s: #7a705c; }
@media (prefers-reduced-transparency: reduce) { .stempel { filter: none; } }

@media (max-width: 520px) {
  .cat-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 .3rem; }
  .cat-bar::-webkit-scrollbar { display: none; }
  .cat-btn { flex: none; }
  .fach { padding: .8rem .7rem 1rem; border-radius: 0 12px 12px 12px; }
}
:root[data-theme="dark"] .cat-btn.cat-kassetten { --kat: #ef5a5f; }
:root[data-theme="dark"] .cat-btn.cat-cds { --kat: #55b0e0; }
:root[data-theme="dark"] .cat-btn.cat-buecher { --kat: #c49a6c; }
:root[data-theme="dark"] .cat-btn.cat-streaming { --kat: #b39ae8; }
:root[data-theme="dark"] .cat-btn.cat-sammlerstuecke { --kat: #eeebe4; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cat-btn.cat-kassetten { --kat: #ef5a5f; }
  :root:not([data-theme="light"]) .cat-btn.cat-cds { --kat: #55b0e0; }
  :root:not([data-theme="light"]) .cat-btn.cat-buecher { --kat: #c49a6c; }
  :root:not([data-theme="light"]) .cat-btn.cat-streaming { --kat: #b39ae8; }
  :root:not([data-theme="light"]) .cat-btn.cat-sammlerstuecke { --kat: #eeebe4; }
}

/* Sammlung: die Ordnerreiter bleiben beim Scrollen oben stehen (die Bereichsleiste nicht mehr) */
.cat-bar { position: sticky; top: 0; z-index: 6; background: var(--bg); padding-top: .6rem; }
.cat-bar.klebt { box-shadow: 0 1px 0 var(--line), 0 10px 14px -12px rgba(0, 0, 0, .35); }
.cat-wache { height: 1px; margin-bottom: -1px; }

/* Sammlung: Reihen ausblenden */
.prog-wrap { position: relative; display: flex; }
.prog-wrap .prog { flex: 1; min-width: 0; padding-right: 2.4rem; }
.prog-aus { position: absolute; top: .35rem; right: .35rem; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.prog-aus:hover, .prog-aus:focus-visible { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
.prog-aus .pikto { width: 17px; height: 17px; }
.prog-wrap .prog .prog-top { padding-right: .2rem; }
.prog-wrap.aus .prog { opacity: .55; border-style: dashed; }
.prog-wrap.aus .prog-name { text-decoration: line-through; }
.prog-wrap.aus .prog-aus { color: var(--ink); }
.aus-hinweis { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: -.4rem 0 1rem; font-size: .85rem; color: var(--muted); }
.link-btn { border: 0; background: none; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }

/* ===== Zentrale: Übersicht als begehbare Szene (Bilder geschützt über szene.php) ===== */
.zentrale { position: relative; aspect-ratio: 1672 / 941; border-radius: 18px; overflow: hidden; background: #0b0908; margin: 0 0 1.6rem; box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .6); isolation: isolate; }
.zentrale img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.z-flaeche { position: absolute; inset: 0; width: 100%; height: 100%; }
.z-punkt { cursor: pointer; outline: none; }
.z-punkt polygon { fill: transparent; stroke: transparent; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: fill .18s, stroke .18s; }
.z-punkt:hover polygon, .z-punkt:focus-visible polygon { fill: rgba(255, 214, 140, .13); stroke: rgba(255, 224, 160, .9); }
.z-punkt:focus-visible polygon { stroke-dasharray: 6 4; }
.z-zeile { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 2.2rem 1rem .75rem; text-align: center; color: #f3ecdc; font-family: var(--mono); font-size: clamp(.72rem, 1.4vw, .95rem); letter-spacing: .02em;
  background: linear-gradient(transparent, rgba(0, 0, 0, .78)); pointer-events: none; text-shadow: 0 1px 2px #000; }
.z-zahl { position: absolute; transform: translate(-50%, -50%); min-width: 1.5em; padding: .12rem .45rem; border-radius: 999px; background: #c0272d; color: #fff; font-family: var(--mono); font-size: clamp(.62rem, 1.1vw, .78rem); text-align: center; pointer-events: none; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.z-tafel { position: absolute; left: 2.7%; top: 12.2%; width: 7.6%; height: 9%; display: grid; place-content: center; text-align: center; transform: skewY(16.5deg); color: #e9e3cf; opacity: .88; pointer-events: none; font-family: var(--mono); line-height: 1.1; text-shadow: 0 0 4px rgba(255, 255, 255, .25); }
.z-tafel span { font-size: clamp(.4rem, .8vw, .68rem); letter-spacing: .03em; }
.z-tafel b { font-size: clamp(.8rem, 2vw, 1.6rem); font-weight: 700; }
.z-weiter { position: absolute; bottom: .7rem; z-index: 2; border: 1px solid rgba(243, 236, 220, .35); background: rgba(10, 8, 6, .55); color: #f3ecdc; border-radius: 999px; padding: .35rem .8rem; font-family: var(--mono); font-size: .78rem; cursor: pointer; backdrop-filter: blur(4px); }
.z-weiter:hover, .z-weiter:focus-visible { background: rgba(10, 8, 6, .8); border-color: #f3ecdc; }
.z-weiter.rechts { right: .8rem; } .z-weiter.links { left: .8rem; }
@media (max-width: 640px) {
  .zentrale { border-radius: 12px; margin-left: calc(-1 * clamp(1rem, 4vw, 2.5rem) + .25rem); margin-right: calc(-1 * clamp(1rem, 4vw, 2.5rem) + .25rem); }
  .z-zeile { padding: 1.4rem .6rem .45rem; }
  .z-weiter, .z-weiter.rechts, .z-weiter.links { bottom: auto; top: .5rem; left: .5rem; right: auto; padding: .25rem .6rem; font-size: .7rem; }
  .z-zahl { font-size: .58rem; padding: .05rem .35rem; }
}
@media (prefers-reduced-motion: reduce) { .z-punkt polygon { transition: none; } }

/* ===================================================================================
   Wohnwagen-Look für den ganzen internen Bereich (v7.4)
   Holzwände, Regal mit handbeschrifteten Aktenordnern als Menü, Inhalte als aufgeschlagene Akte.
   Nur für angemeldete Ansicht (body.mode-app); Anmeldeseite bleibt wie sie ist.
   =================================================================================== */
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/Caveat-600.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/Caveat-700.woff2") format("woff2"); }
:root { --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --holz: #6a4b31; --holz-fuge: rgba(0, 0, 0, .28); --wand-text: #f6efdf; --lampe: rgba(255, 210, 140, .26); --brett: #7b5534; --brett-kante: #4a301c; }
:root[data-theme="dark"] { --holz: #2b1f15; --holz-fuge: rgba(0, 0, 0, .45); --lampe: rgba(255, 196, 110, .22); --brett: #4c3320; --brett-kante: #24170d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --holz: #2b1f15; --holz-fuge: rgba(0, 0, 0, .45); --lampe: rgba(255, 196, 110, .22); --brett: #4c3320; --brett-kante: #24170d; } }

/* Wände: senkrechte Holzpaneele mit Maserung, Lampenschein von oben */
body.mode-app { background-color: var(--holz);
  background-image:
    radial-gradient(ellipse 70% 45% at 50% -8%, var(--lampe), transparent 70%),
    repeating-linear-gradient(90deg, var(--holz-fuge) 0 2px, transparent 2px 92px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.32 0.004' numOctaves='3' seed='6' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .7 -.12'/%3E%3C/filter%3E%3Crect width='360' height='360' filter='url(%23m)'/%3E%3C/svg%3E");
  background-attachment: scroll; color: var(--wand-text); }
body.mode-app .app { padding-bottom: 5rem; }

/* Kopfzeile auf dem Holz */
body.mode-app .top { --bg: #2b1f15; --line: rgba(246, 239, 223, .32); --muted: rgba(246, 239, 223, .78); --ink: #f6efdf; color: var(--wand-text); }
body.mode-app .top .icon-btn { color: var(--wand-text); background: rgba(0, 0, 0, .18); }
body.mode-app .top .icon-btn:hover { color: #ffd98a; border-color: #ffd98a; }
body.mode-app .top .btn.ghost { color: var(--wand-text); background: rgba(0, 0, 0, .18); }
body.mode-app .brand em { color: #ffcf8a; }

/* Regal: Aktenordner mit handbeschriftetem Rückenschild */
.tabs.regal { border: 0; border-radius: 0; background: transparent; gap: 6px; padding: 1.2rem .8rem 0; margin: 0 0 2.6rem; align-items: flex-end; position: relative;
  border-bottom: 14px solid var(--brett); box-shadow: 0 6px 0 -2px var(--brett-kante), 0 18px 22px -14px rgba(0, 0, 0, .7); overflow-x: auto; overflow-y: hidden; }
.tabs.regal button { --ordner: #5a4632; flex: none; width: 58px; height: 154px; padding: .55rem 0 .75rem; border-radius: 5px 5px 2px 2px; color: #f6efdf;
  background: linear-gradient(90deg, rgba(0, 0, 0, .28), rgba(255, 255, 255, .08) 22%, rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .22)), var(--ordner);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25), 0 -1px 0 rgba(255, 255, 255, .06);
  transition: transform .18s ease, filter .18s; filter: brightness(.88) saturate(.9); }
.tabs.regal button:nth-child(3n) { height: 146px; } .tabs.regal button:nth-child(4n+1) { height: 150px; }
.tabs.regal button:hover { transform: translateY(-5px); filter: none; color: #fff; }
.tabs.regal button.active { transform: translateY(-14px); filter: none; background: linear-gradient(90deg, rgba(0, 0, 0, .25), rgba(255, 255, 255, .14) 22%, rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .2)), var(--ordner);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25), 0 10px 18px -6px rgba(0, 0, 0, .55); }
.tabs.regal button:focus-visible { outline: 2px dashed #ffd98a; outline-offset: 3px; }
.tabs.regal .o-nr { font-family: var(--hand); font-weight: 700; font-size: 1.2rem; line-height: 1; opacity: .92; }
.tabs.regal .o-schild { writing-mode: vertical-rl; transform: rotate(180deg); width: 38px; height: 98px; display: flex; align-items: center; justify-content: center;
  background: #fbf7ee; color: #22355a; border-radius: 2px; font-family: var(--hand); font-weight: 700; font-size: 1.28rem; line-height: 1; white-space: nowrap; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), 0 1px 1px rgba(0, 0, 0, .25); }
.tabs.regal button:nth-child(odd) .o-schild { transform: rotate(178.5deg); } .tabs.regal button:nth-child(3n) .o-schild { transform: rotate(181deg); }
.tabs.regal .o-loch { width: 15px; height: 15px; border-radius: 50%; background: #1d140c; box-shadow: 0 0 0 2.5px #8a7258, inset 0 2px 3px rgba(0, 0, 0, .8); }
.tabs.regal button[data-view="milestones"] .o-schild, .tabs.regal button[data-view="activities"] .o-schild { font-size: 1.12rem; }
.tabs.regal button[data-view="dashboard"] { --ordner: #9e2328; }
.tabs.regal button[data-view="tasks"] { --ordner: #2e4a3c; }
.tabs.regal button[data-view="milestones"] { --ordner: #24384f; }
.tabs.regal button[data-view="activities"] { --ordner: #7a6232; }
.tabs.regal button[data-view="todos"] { --ordner: #5a4632; }
.tabs.regal button[data-view="notes"] { --ordner: #8a6a24; }
.tabs.regal button[data-view="dateien"] { --ordner: #4a4f52; }
.tabs.regal button[data-view="collection"] { --ordner: #1f5f8a; }
.tabs.regal button[data-view="werkzeuge"] { --ordner: #6e1d21; }
.tabs.regal button[data-view="c64"] { --ordner: #262626; }

/* Die aufgeschlagene Akte: Papier, auch im dunklen Modus (dann ist es Nacht in der Zentrale) */
body.mode-app #view, body.mode-app .dlg { --bg: #f6f0e2; --card: #efe7d4; --ink: #2a2620; --muted: #665c4b; --line: #d8cdb5; --accent: #b0441b; --ok: #3d7a52; --warn: #b4401a; color-scheme: light; color: var(--ink); }
:root.a11y-contrast body.mode-app #view, :root.a11y-contrast body.mode-app .dlg { --muted: #3d3a33; --line: #8a8270; }
body.mode-app #view { --rand: clamp(1.1rem, 3vw, 2.2rem); position: relative; background-color: var(--bg); border-radius: 4px 18px 18px 18px; padding: var(--rand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .18 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23p)'/%3E%3C/svg%3E");
  box-shadow: 6px 7px 0 -1px #e6dcc4, 12px 14px 0 -2px #d6c9ab, 0 34px 60px -26px rgba(0, 0, 0, .85); }
body.mode-app #view::before { content: attr(data-akte); position: absolute; left: 0; top: -1.9rem; height: 1.95rem; padding: .45rem 1.1rem 0; background: var(--bg); border-radius: 10px 10px 0 0;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; color: var(--muted); white-space: nowrap; max-width: 80%; overflow: hidden; text-overflow: ellipsis; }
body.mode-app #view::after { content: ""; position: absolute; right: 1.4rem; top: -12px; width: 18px; height: 54px; border: 3px solid #9aa3aa; border-radius: 10px; pointer-events: none; opacity: .9; }
body.mode-app #view:not([data-akte])::before { display: none; }
.view-head h1 { letter-spacing: -.025em; }

/* Gruppenüberschriften wie mit Filzstift */
body.mode-app #view .group-title { font-family: var(--hand); font-weight: 700; font-size: 1.45rem; letter-spacing: 0; text-transform: none; color: #24427a; margin: 1.6rem 0 .5rem; }

/* Aufgaben, To-dos, Aktivitäten, Dokumente: Karteikarten mit Linien und rotem Rand */
body.mode-app #view .item { background-color: #fbf8ef; border-color: #ddd2bb; border-radius: 6px; box-shadow: 0 1px 0 rgba(60, 40, 10, .08), 0 4px 10px -8px rgba(60, 40, 10, .4);
  background-image: linear-gradient(90deg, transparent 2.85rem, rgba(179, 38, 44, .28) 2.85rem, rgba(179, 38, 44, .28) calc(2.85rem + 1px), transparent calc(2.85rem + 1px)),
    repeating-linear-gradient(180deg, transparent 0 1.55rem, rgba(31, 79, 138, .09) 1.55rem calc(1.55rem + 1px)); background-position: 0 0, 0 .4rem; }
body.mode-app #view .item.done { background-color: #f1ead9; }
body.mode-app #view .item.done .item-title { color: #5d5444; }
/* Karten ohne Abhak-Kreis (Aktivitäten, Dokumente): Inhalt beginnt rechts vom roten Rand */
body.mode-app #view .item:not(:has(> .tick)) { padding-left: 3.5rem; }
body.mode-app #view .panel h2 { font-family: var(--hand); font-weight: 700; font-size: 1.55rem; letter-spacing: 0; color: #24427a; }
body.mode-app #view .panel h2 a { font-family: var(--mono); color: var(--muted); }
body.mode-app #view .tick { background: #fff; border-color: #b9ac90; }
body.mode-app #view .tick.on { background: #2f6b46; border-color: #2f6b46; }
body.mode-app #view .stat { background: #fbf8ef; border-radius: 8px; border-color: #ddd2bb;
  background-image: repeating-linear-gradient(180deg, transparent 0 1.55rem, rgba(31, 79, 138, .08) 1.55rem calc(1.55rem + 1px)); }

/* Notizen: Zettel an der Wand, mit Pinnnadel, leicht schief */
body.mode-app #view .grid:not(.coll-grid) > .card { position: relative; background: #f7e7a1; border: 0; border-radius: 2px; box-shadow: 0 10px 18px -12px rgba(60, 40, 10, .6), 0 1px 0 rgba(60, 40, 10, .12); transform: rotate(-.8deg); }
body.mode-app #view .grid:not(.coll-grid) > .card:nth-child(3n+2) { transform: rotate(.9deg); background: #f3dc86; }
body.mode-app #view .grid:not(.coll-grid) > .card:nth-child(3n) { transform: rotate(-.3deg); background: #eef2f5; }
body.mode-app #view .grid:not(.coll-grid) > .card::before { content: ""; position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff6b6b, #b3262c 60%, #7a1418); box-shadow: 0 3px 4px rgba(0, 0, 0, .35); }
body.mode-app #view .grid:not(.coll-grid) > .card .card-title { font-family: var(--hand); font-weight: 700; font-size: 1.45rem; line-height: 1.1; letter-spacing: 0; color: #22355a; }
body.mode-app #view .grid:not(.coll-grid) > .card .card-body { color: #3d372c; }
body.mode-app #view .grid:not(.coll-grid) > .card.pinned::before { width: 18px; height: 18px; margin-left: -9px; top: -9px; }

/* Meilensteine: Korkwand mit rotem Faden */
body.mode-app #view .timeline { padding: 1.4rem 1rem 1.4rem 2.6rem; border-radius: 10px; border: 8px solid #6e4a2c;
  background-color: #a87a48; background-image: radial-gradient(rgba(70, 40, 10, .35) 1px, transparent 1.6px), radial-gradient(rgba(255, 235, 200, .22) 1px, transparent 1.6px); background-size: 7px 7px, 11px 11px; background-position: 0 0, 3px 4px;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .35); }
body.mode-app #view .timeline::before { left: 1.25rem; top: 1.6rem; bottom: 1.6rem; border-left: 2px solid #b3262c; }
body.mode-app #view .timeline .item { background-image: none; background-color: #fbf8ef; border-radius: 3px; transform: rotate(-.4deg); }
body.mode-app #view .timeline .item:nth-child(even) { transform: rotate(.5deg); }
body.mode-app #view .timeline .item::before { left: -1.82rem; top: 1.15rem; width: 14px; height: 14px; border: 0; background: radial-gradient(circle at 35% 35%, #ff6b6b, #b3262c 60%, #7a1418); box-shadow: 0 2px 3px rgba(0, 0, 0, .4); }
body.mode-app #view .timeline .item.done::before { background: radial-gradient(circle at 35% 35%, #8fd3a5, #2f6b46 60%, #1d4a2f); }

/* Dokumente: Asservate mit gelbem Etikett */
body.mode-app #view .item.datei .datei-typ { background: #f2d65c; color: #3d3100; border: 0; border-radius: 3px; transform: rotate(-4deg); box-shadow: 0 2px 4px rgba(0, 0, 0, .2); }
body.mode-app #view .item.datei .datei-typ.pdf { background: #f2d65c; color: #7a1e22; }

/* Dialoge: ebenfalls Papier */
body.mode-app .dlg { background-color: var(--bg); border-radius: 6px 16px 16px 16px; border: 1px solid #cfc2a4; }
body.mode-app .dlg h2 { font-family: var(--hand); font-weight: 700; font-size: 1.9rem; letter-spacing: 0; color: #22355a; }

/* Handy: kleinere Ordner, Regal wischbar */
@media (max-width: 640px) {
  .tabs.regal { padding: 1rem .4rem 0; gap: 4px; border-bottom-width: 11px; margin-bottom: 2.3rem; }
  .tabs.regal button { width: 46px; height: 124px; padding: .4rem 0 .55rem; }
  .tabs.regal button:nth-child(3n) { height: 118px; } .tabs.regal button:nth-child(4n+1) { height: 121px; }
  .tabs.regal .o-schild { width: 31px; height: 78px; font-size: 1.05rem; }
  .tabs.regal .o-nr { font-size: 1rem; }
  .tabs.regal button[data-view="milestones"] .o-schild, .tabs.regal button[data-view="activities"] .o-schild { font-size: .92rem; }
  .tabs.regal .o-loch { width: 12px; height: 12px; }
  .tabs.regal button.active { transform: translateY(-10px); }
  body.mode-app #view { border-radius: 4px 12px 12px 12px; box-shadow: 4px 5px 0 -1px #e6dcc4, 0 24px 40px -22px rgba(0, 0, 0, .85); }
  body.mode-app #view::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tabs.regal button { transition: none; } }

/* Sammlung: angeheftete Reiterleiste geht über die ganze Aktenbreite und deckt alles darüber ab,
   damit oberhalb und seitlich keine durchscrollenden Karteikarten zu sehen sind (v7.5) */
body.mode-app #view .cat-bar { margin-left: calc(-1 * var(--rand)); margin-right: calc(-1 * var(--rand)); padding-left: calc(var(--rand) + .6rem); padding-right: calc(var(--rand) + .6rem); }
/* Schatten-Kopien der Leiste nach oben (::before ginge nicht, weil die Leiste am Handy seitlich scrollt und damit abschneidet) */
body.mode-app #view .cat-bar.klebt { box-shadow: 0 1px 0 var(--line), 0 10px 14px -12px rgba(0, 0, 0, .35), 0 -45px 0 var(--bg), 0 -90px 0 var(--bg), 0 -135px 0 var(--bg), 0 -180px 0 var(--bg), 0 -225px 0 var(--bg), 0 -270px 0 var(--bg); }
@media (max-width: 640px) { body.mode-app #view .cat-bar { padding-left: calc(var(--rand) + .3rem); padding-right: calc(var(--rand) + .3rem); } }

/* Erstauflage: goldener Stern, damit man sofort sieht „die ist schon die richtige“ (v7.7) */
.chip.edition.erst { display: inline-flex; align-items: center; gap: .25rem; color: #5e4300; background: #f6e3a1; border-color: #b08a1e; font-weight: 600; }
.chip.edition.erst .erst-stern { color: #a87700; font-size: .85rem; line-height: 1; }

.akte-reiter .reiter-stern { color: #ffd45e; margin-left: .35rem; font-size: .8rem; line-height: 1; }
/* Sammlung: Bearbeiten als Stift-Symbol unten rechts (v7.7) */
.card.coll .mini.stift { margin-left: auto; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.card.coll .mini.stift .pikto { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card.coll .mini.stift:hover, .card.coll .mini.stift:focus-visible { color: var(--akzent-text, #b0441b); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* Filter „Keine Erstauflage“ in Gold, passend zum Erstauflage-Kärtchen (v7.8) */
.chip.filter.nicht-erst.on { background: #f6e3a1; border-color: #b08a1e; color: #5e4300; }

/* Flaggen vor Titel und Originaltitel (v8.0): gewellte Flaggenbilder mit Faltenschatten, wehen leicht */
.flagge { position: relative; display: inline-block; width: 1.3em; height: 1.3em; margin: -.2em .22em -.2em 0; vertical-align: -.1em; flex: none; transform-origin: 0 50%; }
.orig-title .flagge { width: 1.2em; height: 1.2em; }
.flagge img { display: block; width: 100%; height: 100%; }
.flagge::after { content: ""; position: absolute; inset: 0; pointer-events: none; -webkit-mask: var(--maske) center / 100% 100% no-repeat; mask: var(--maske) center / 100% 100% no-repeat;
  background: linear-gradient(105deg, rgba(255, 255, 255, .25) 0%, rgba(0, 0, 0, 0) 18%, rgba(0, 0, 0, .22) 34%, rgba(255, 255, 255, .28) 52%, rgba(0, 0, 0, .18) 70%, rgba(255, 255, 255, .2) 86%, rgba(0, 0, 0, .25) 100%); background-size: 130% 100%; }
.flagge.weht { animation: fahne-weht 2.8s ease-in-out infinite; }
.flagge.weht::after { animation: fahne-falten 2.8s ease-in-out infinite; }
.akte:nth-child(3n+1) .flagge.weht, .akte:nth-child(3n+1) .flagge.weht::after { animation-delay: -1s; }
.akte:nth-child(3n+2) .flagge.weht, .akte:nth-child(3n+2) .flagge.weht::after { animation-delay: -1.9s; }
.orig-title .flagge.weht, .orig-title .flagge.weht::after { animation-delay: -.5s; }
@keyframes fahne-weht { 0%, 100% { transform: skewY(0) scaleX(1); } 50% { transform: skewY(1.6deg) scaleX(.97); } }
@keyframes fahne-falten { 0%, 100% { background-position: 0 0; } 50% { background-position: 12px 0; } }
@media (prefers-reduced-motion: reduce) { .flagge.weht, .flagge.weht::after { animation: none; } }

/* Autor/in der Buchvorlage unter den Titeln (v8.3) */
.card.coll .autor { margin-top: .3rem; font-size: .86rem; color: var(--muted); }

/* Sammlung: Notizen wie mit Kugelschreiber an den Rand geschrieben (v8.4) */
.card.coll .card-body { font-family: var(--hand); font-weight: 600; font-size: 1.32rem; line-height: 1.15; color: #23407a; letter-spacing: .01em; white-space: pre-line; transform: rotate(-.6deg); transform-origin: 0 0; margin: .35rem 0 .2rem; }
.akte:nth-child(even) .card.coll .card-body { transform: rotate(.4deg); }

/* Autorennamen anklickbar: zeigt alle Einträge dieser Person (v8.5) */
.card.coll .autor-link { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .18em; }
.card.coll .autor-link:hover, .card.coll .autor-link:focus-visible { color: var(--accent); text-decoration-color: currentColor; }
.chip.filter.autor-filter.on { background: #e5ecf7; border-color: #23407a; color: #23407a; }

/* Zentrale: Zahlen und Tafelschrift als Teil der SVG-Fläche (v8.7) */
.z-schmuck { pointer-events: none; }
.z-zahl-grund { fill: #c0272d; stroke: rgba(255, 255, 255, .85); stroke-width: 2; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.z-zahl-text { fill: #fff; font-family: var(--mono); font-size: 19px; font-weight: 700; }
.z-tafel-text text { fill: #e9e3cf; opacity: .9; font-family: var(--mono); letter-spacing: .03em; }

/* Nach-oben-Knopf (v9.0): Messingknopf unten rechts, erscheint nach etwas Scrollen */
.nach-oben { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 40; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: #3a2a12; background: radial-gradient(circle at 35% 30%, #f3d98f, #c89a3c 55%, #8a6420); border: 1px solid #6b4c18; box-shadow: 0 6px 14px -4px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .5);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .2s, transform .2s, visibility .2s; }
.nach-oben.sichtbar { opacity: 1; visibility: visible; transform: none; }
.nach-oben svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.nach-oben:hover { filter: brightness(1.08); } .nach-oben:focus-visible { outline: 2px dashed #ffd98a; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .nach-oben { transition: none; } }
@media print { .nach-oben { display: none; } }

/* Folge würfeln (v9.2) */
.wuerfel-btn { display: inline-flex; align-items: center; gap: .4rem; }
.wuerfel-ico { width: 1.15em; height: 1.15em; flex: none; }
.wuerfel-ico .w-koerper { fill: #fbf8ef; stroke: currentColor; stroke-width: 1.6; }
.wuerfel-ico .w-auge { fill: #b3262c; }
.wuerfel-arten { display: flex; flex-wrap: wrap; gap: .5rem; margin: .2rem 0 .9rem; }
.wuerfel-art { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.wuerfel-art input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wuerfel-art span { padding: .5rem 1rem; border-radius: 8px 8px 3px 3px; border: 1px solid var(--line); border-top: 4px solid var(--kat, #8a7a5c); background: #fbf8ef; font-weight: 600; }
.wuerfel-art.cat-kassetten { --kat: #b3262c; } .wuerfel-art.cat-cds { --kat: #1f6fa8; } .wuerfel-art.cat-buecher { --kat: #a8772a; }
.wuerfel-art input:checked + span { background: var(--kat, #2a2620); color: #fff; border-color: var(--kat, #2a2620); }
.wuerfel-art input:focus-visible + span { outline: 2px dashed #23407a; outline-offset: 2px; }
.wuerfel-optionen { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-bottom: .8rem; }
.wuerfel-tisch { display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem; border-radius: 12px; background: #2e5a3c; background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.4px); background-size: 6px 6px; box-shadow: inset 0 0 0 4px #6e4a2c, inset 0 4px 14px rgba(0, 0, 0, .4); }
.wuerfel-tisch .hint { color: #e8f1e6; margin: 0; }
.wuerfel-gross { width: 76px; height: 76px; padding: 0; border: 0; background: none; cursor: pointer; color: #3a3226; flex: none; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .45)); }
.wuerfel-gross .wuerfel-ico { width: 100%; height: 100%; }
.wuerfel-gross:focus-visible { outline: 2px dashed #ffd98a; outline-offset: 4px; border-radius: 14px; }
.wuerfel-gross:disabled { opacity: .4; cursor: not-allowed; }
.wuerfel-gross.rollt { animation: wuerfel-rollt .35s linear infinite; }
@keyframes wuerfel-rollt { 0% { transform: rotate(0) translateY(0); } 25% { transform: rotate(90deg) translateY(-8px); } 50% { transform: rotate(180deg) translateY(0); } 75% { transform: rotate(270deg) translateY(-5px); } 100% { transform: rotate(360deg) translateY(0); } }
.wuerfel-ergebnis { min-height: 9.5rem; margin-top: 1rem; display: grid; align-items: center; }
.wuerfel-leer, .w-flackern { margin: 0; text-align: center; color: var(--muted); }
.w-flackern { font-family: var(--hand); font-weight: 700; font-size: 1.6rem; color: #23407a; }
.wuerfel-karte { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; padding: 1rem; border-radius: 10px; background: #fbf8ef; border: 1px solid #ddd2bb; border-top: 5px solid var(--kat, #8a7a5c); box-shadow: 0 10px 20px -14px rgba(60, 40, 10, .6); animation: w-landet .35s ease-out; }
.wuerfel-karte.kat-kassetten { --kat: #b3262c; } .wuerfel-karte.kat-cds { --kat: #1f6fa8; } .wuerfel-karte.kat-buecher { --kat: #a8772a; }
@keyframes w-landet { from { transform: translateY(8px) rotate(-1deg); opacity: 0; } to { transform: none; opacity: 1; } }
.w-cover { width: 92px; border-radius: 4px; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .5); object-fit: contain; background: #e9e1cc; }
.w-cover.cover-hoch { height: 132px; } .w-cover.cover-quadrat { height: 92px; }
.w-ersatz { height: 120px; display: grid; place-items: center; border: 2px dashed var(--kat, #8a7a5c); color: var(--kat, #8a7a5c); font-size: 2.4rem; }
.w-ersatz.cat-kassetten { --kat: #b3262c; } .w-ersatz.cat-cds { --kat: #1f6fa8; } .w-ersatz.cat-buecher { --kat: #a8772a; }
.w-text p { margin: 0; }
.w-meta { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.w-titel { font-size: 1.25rem; font-weight: 700; line-height: 1.2; margin: .25rem 0 !important; }
.w-reihe, .w-autor { font-size: .88rem; color: var(--muted); }
.w-knoepfe { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
@media (prefers-reduced-motion: reduce) { .wuerfel-gross.rollt, .wuerfel-karte { animation: none; } }
@media (max-width: 480px) { .wuerfel-karte { grid-template-columns: 1fr; } .w-cover { width: 80px; } }
