/* Cypher News: Screens. Heute (Lesen/Karten), Profil, Verlauf, Zustände, Rechtliches. */

/* Kategorie-Farbe als eine Variable pro Element */
.cat-konzerte { --cat: var(--c-konzerte); }
.cat-giveaways { --cat: var(--c-giveaways); }
.cat-drops, .cat-mode { --cat: var(--c-drops); }
.cat-tech { --cat: var(--c-tech); }
.cat-trends { --cat: var(--c-trends); }
.cat-sonstiges { --cat: var(--c-news); }

.kicker, .lede-date { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.hint { color: var(--dim); font-size: 14px; line-height: 1.55; }
.hint b { color: var(--ink-2); font-weight: 600; }
.hint.warn { border-left: 2px solid var(--c-trends); padding-left: 12px; }
.hint.status { color: var(--ink-2); }
.page-title { font-family: var(--serif); font-weight: 600; font-size: 34px; letter-spacing: -.02em; line-height: 1.05; margin-bottom: 18px; }

.tab-page { animation: pageIn .42s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }

.restore { display: flex; gap: 10px; flex-wrap: wrap; animation: pageIn .35s var(--ease) both; }
.restore .field-error { flex: 1 1 100%; }
.restore input { flex: 1 1 200px; font-family: var(--mono); font-size: 20px; letter-spacing: .06em; }

/* ── Heute: Steuerleiste ── */
.dropbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.dropbar.compact { flex-direction: row; align-items: center; gap: 14px; margin-bottom: 22px; }
.dropbar.compact .btn-drop { width: auto; min-height: 46px; padding: 0 18px; font-size: 15px; background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); flex: none; }
@media (hover: hover) { .dropbar.compact .btn-drop:hover { background: var(--surface); } }
.dropbar.compact .hint { font-size: 13px; line-height: 1.4; }
.dropbar .hint:empty { display: none; }

.notice { border-left: 2px solid var(--accent); background: var(--surface); padding: 14px 16px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); margin-bottom: 20px; border-radius: 0 var(--r-s) var(--r-s) 0; }
.notice b { color: var(--ink); font-weight: 600; }
.notice.error { border-left-color: var(--danger); animation: pageIn .3s var(--ease) both; }

/* ── Ladezustand: Terminal als Wiedererkennungsmerkmal ── */
.terminal-wrapper { display: none; margin-bottom: 26px; }
.terminal-wrapper.visible { display: block; animation: pageIn .4s var(--ease) both; }
.terminal { --ok: #b6d65a; --dim: #a3988b; background: #0d0b09; border: 1px solid var(--line-strong); border-radius: var(--r-m); padding: 18px 20px 20px; font-family: var(--mono); font-size: 21px; line-height: 1.3; color: var(--ok); display: flex; flex-direction: column; gap: 4px; min-height: 148px; overflow: hidden; position: relative; }
.terminal .line { opacity: 0; transform: translateY(4px); animation: lineIn .4s var(--ease) forwards; overflow-wrap: anywhere; }
.terminal .line:last-child::after { content: ''; display: inline-block; width: .5em; height: .85em; margin-left: 4px; background: currentColor; vertical-align: -.08em; animation: cursor 1s steps(1) infinite; }
@keyframes lineIn { to { opacity: 1; transform: none; } }
.terminal::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: linear-gradient(90deg, transparent, var(--ok), transparent); transform: translateX(-100%); animation: sweep 2.2s var(--ease) infinite; }
@keyframes sweep { to { transform: translateX(100%); } }
.terminal-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 13px; color: var(--dim); }
#elapsed { font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* ── Leerer Heute-Zustand ── */
.today-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 8px 0 10px; }
.today-empty .big-no { font-family: var(--serif); font-weight: 300; font-size: 120px; line-height: .8; color: transparent; -webkit-text-stroke: 1.5px var(--line-strong); letter-spacing: -.04em; }
.today-empty h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: -.02em; line-height: 1.1; }
.today-empty p { color: var(--ink-2); font-family: var(--serif); font-size: 18px; line-height: 1.55; max-width: 46ch; }
.today-empty .btn-small { margin-top: 6px; }

/* ── Titelblatt der Ausgabe ── */
.lede { padding-bottom: 22px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.lede h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 10vw, 46px); letter-spacing: -.025em; line-height: 1.02; margin: 8px 0 14px; text-wrap: balance; overflow-wrap: anywhere; }
.count { font-size: 14px; color: var(--ink-2); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.count strong { font-family: var(--serif); font-weight: 560; font-size: 44px; line-height: .9; letter-spacing: -.03em; color: var(--accent-text); font-variant-numeric: lining-nums; }
.lede-text { font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.5; color: var(--ink); margin-top: 16px; max-width: 56ch; text-wrap: pretty; }
.lede-text:empty, .intro-model:empty { display: none; }
.intro-model { font-size: 12.5px; color: var(--dim); margin-top: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.partial { font-size: 13px; color: var(--ink-2); margin-top: 8px; padding-left: 14px; position: relative; overflow-wrap: anywhere; }
.partial::before { content: ''; position: absolute; left: 0; top: .5em; width: 6px; height: 6px; border-radius: 50%; background: var(--c-trends); }

/* ── Werkzeugleiste ── */
.toolbar { position: sticky; top: 0; z-index: 6; background: var(--bg); padding: 8px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.toolbar .seg { flex: 0 1 240px; width: 100%; }
.stepper { display: flex; gap: 6px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--control); transition: transform .14s var(--ease), color .18s, opacity .18s; }
.stepper button:active { transform: scale(.92); }
.stepper button[aria-disabled="true"] { opacity: .35; cursor: default; }
@media (hover: hover) { .stepper button:not([aria-disabled="true"]):hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-2); } }

.story-progress { display: flex; gap: 4px; margin-bottom: 12px; height: 3px; }
.story-progress .prog-seg { flex: 1; border-radius: 2px; background: var(--line-strong); transition: background .3s var(--ease), transform .3s var(--ease); transform-origin: left; }
.story-progress .prog-seg.active { background: var(--accent); }
.cat-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }

/* ── Chips ── */
.chips, .source-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); background: transparent; box-shadow: inset 0 0 0 1px var(--control); transition: background-color .2s, box-shadow .2s, color .2s, transform .14s var(--ease); }
.chip::before { content: ''; width: 0; height: 8px; margin-right: 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(40deg) translateY(-2px); opacity: 0; transition: width .22s var(--ease), margin .22s var(--ease), opacity .22s; flex: none; }
.chip.active, .chip[aria-pressed="true"] { color: var(--ink); background: color-mix(in oklab, var(--accent) 16%, transparent); box-shadow: inset 0 0 0 1px var(--accent); }
.chip.active::before, .chip[aria-pressed="true"]::before { width: 5px; margin-right: 9px; opacity: 1; }
.chip:active { transform: scale(.95); }
@media (hover: hover) { .chip:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-2); } .chip.active:hover { box-shadow: inset 0 0 0 1px var(--accent); } }
.cat-filters .chip { min-height: 44px; padding: 0 14px; font-size: 13.5px; }
.cat-filters .chip.active { background: transparent; box-shadow: inset 0 0 0 1px var(--cat, var(--ink-2)); }
.cat-filters .chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cat); margin-right: 8px; opacity: .45; transition: opacity .2s; }
.cat-filters .chip.active .dot { opacity: 1; }

.source-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px 0 12px; border-radius: 999px; font-size: 14px; color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--control); max-width: 100%; }
.source-chip .val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.plat { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); background: var(--surface-2); border-radius: 4px; padding: 3px 5px; line-height: 1; flex: none; }
.source-chip .remove { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--dim); transition: color .18s, background-color .18s; flex: none; }
.source-chip .remove .ico { width: 16px; height: 16px; }
@media (hover: hover) { .source-chip .remove:hover { color: var(--danger); background: var(--surface-2); } }

/* ── Kategorie-Auszeichnung (Text mit Punkt, keine Pille) ── */
.cat-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cat); line-height: 1; }
.cat-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ── Lesen: Artikelliste ── */
.feed { display: flex; flex-direction: column; }
.feed-card { position: relative; padding: 26px 0 24px; border-top: 1px solid var(--line); animation: itemIn .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
.feed-card:first-child { border-top: 0; padding-top: 14px; }
@keyframes itemIn { from { opacity: 0; transform: translateY(14px); } }
.art-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.art-no { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--dim); font-variant-numeric: lining-nums; min-width: 1.6em; line-height: 1; }
.art-when { margin-left: auto; font-size: 12.5px; color: var(--dim); white-space: nowrap; padding-left: 8px; }
.art-title { font-family: var(--serif); font-weight: 580; font-size: clamp(23px, 6.4vw, 28px); line-height: 1.16; letter-spacing: -.015em; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
.fsum { font-family: var(--serif); font-size: 18px; line-height: 1.58; color: var(--ink-2); margin-top: 10px; max-width: 62ch; text-wrap: pretty; overflow-wrap: break-word; hyphens: auto; }
.art-img { margin-top: 14px; border-radius: var(--r-s); overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface-2); }
.art-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-top: 14px; }
.src { flex: 1 1 130px; font-size: 13px; color: var(--dim); min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; line-height: 1.35; overflow-wrap: anywhere; }
.acts { display: flex; align-items: center; gap: 2px; margin-right: -10px; flex: none; }
.act { position: relative; min-width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--ink-2); text-decoration: none; transition: color .18s, background-color .18s, transform .14s var(--ease); }
.act .ico { width: 21px; height: 21px; }
.act:active { transform: scale(.88); }
.act.open { width: auto; border-radius: 999px; padding: 0 14px 0 16px; gap: 4px; display: inline-flex; font-size: 14px; font-weight: 600; color: var(--accent-text); }
.act.open .ico { width: 18px; height: 18px; }
@media (hover: hover) { .act:hover { color: var(--ink); background: var(--surface-2); } .act.open:hover { color: var(--accent-text); } }
.act[data-act="save"].saved, .act[data-act="unsave"], .act[aria-pressed="true"] { color: var(--accent-text); }
.act[data-act="save"].saved .ico, .act[data-act="unsave"] .ico { fill: currentColor; }
.act[data-act="up"].on .ico, .act[data-act="down"].on .ico { fill: currentColor; }
.act.pop .ico { animation: pop .38s var(--ease); }
@keyframes pop { 40% { transform: scale(1.3) rotate(-6deg); } }

.empty { padding: 36px 4px 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.empty p { font-family: var(--serif); font-size: 21px; line-height: 1.4; color: var(--ink-2); max-width: 30ch; text-wrap: balance; }
.empty p small { display: block; font-family: var(--sans); font-size: 14px; color: var(--dim); margin-top: 8px; line-height: 1.5; }
.empty::before { content: ''; width: 36px; height: 3px; background: var(--accent); }

/* ── Verlauf ── */
.hist { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 16px; width: 100%; text-align: left; padding: 18px 4px 18px 0; }
.hist:first-child { padding-top: 18px; }
.hist .day { font-family: var(--serif); font-size: 44px; font-weight: 400; line-height: .9; letter-spacing: -.03em; text-align: center; font-variant-numeric: lining-nums; }
.hist .day small { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-top: 6px; font-weight: 600; }
.hist .t { display: block; font-family: var(--serif); font-weight: 560; font-size: 21px; line-height: 1.2; overflow-wrap: break-word; }
.hist .src { margin-top: 4px; }
.hist .ico { color: var(--dim); transition: transform .25s var(--ease), color .18s; }
@media (hover: hover) { .hist:hover .ico { transform: translateX(4px); color: var(--ink); } .hist:hover .t { color: var(--accent-text); } }

/* ── Karten ── */
/* Kartenhöhe: Mindesthöhe wie bisher, aber nie fest - Text wird nicht abgeschnitten (Zoom, Textabstand, 400 %) */
.stories-container { --card-h: clamp(440px, calc(100dvh - var(--nav-h) - 210px), 640px); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; border-radius: var(--r-l); border: 1px solid var(--line-strong); scrollbar-width: none; scroll-behavior: smooth; background: var(--surface); }
.stories-container::-webkit-scrollbar { display: none; }
.stories-container.hidden { display: none; }
.stories-inner { display: flex; }
.story-card { flex: 0 0 100%; width: 100%; min-height: var(--card-h); scroll-snap-align: center; scroll-snap-stop: always; position: relative; display: flex; flex-direction: column; min-width: 0; }
.story-visual { flex: none; height: calc(var(--card-h) * .27); position: relative; overflow: hidden; background: color-mix(in oklab, var(--cat) 16%, var(--surface)); border-bottom: 1px solid color-mix(in oklab, var(--cat) 35%, var(--line)); }
.story-visual::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 14px, color-mix(in oklab, var(--cat) 14%, transparent) 14px 15px); }
.story-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-visual .story-no { position: absolute; left: 14px; bottom: -.14em; font-family: var(--serif); font-weight: 300; font-size: clamp(96px, 28vw, 150px); line-height: 1; letter-spacing: -.05em; color: color-mix(in oklab, var(--cat) 72%, transparent); font-variant-numeric: lining-nums; }
.story-visual.has-img .story-no { font-size: 20px; font-weight: 600; left: 14px; top: 12px; bottom: auto; color: #fff; background: rgba(0, 0, 0, .5); border-radius: 6px; padding: 5px 9px 3px; letter-spacing: 0; line-height: 1; }
.story-visual .story-of { position: absolute; right: 14px; top: 12px; font-size: 12px; font-weight: 600; letter-spacing: .12em; color: color-mix(in oklab, var(--cat) 80%, var(--ink)); }
.story-visual.has-img .story-of { color: #fff; background: rgba(0, 0, 0, .5); border-radius: 6px; padding: 5px 8px; }
.story-body { flex: 1; padding: 18px 20px 14px; display: flex; flex-direction: column; gap: 10px; }
.story-body .head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.story-body h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(23px, 6.6vw, 30px); line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
.story-body .summary { font-family: var(--serif); font-size: 17px; line-height: 1.5; color: var(--ink-2); overflow-wrap: break-word; hyphens: auto; }
.story-body .art-foot { margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line); }
.story-body .acts { margin-right: -10px; }

/* ── Profil ── */
.onboarding { display: flex; flex-direction: column; }
.sec { padding: 26px 0 28px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.sec:first-child { border-top: 0; padding-top: 4px; }
.sec-title { font-family: var(--serif); font-weight: 600; font-size: 24px; letter-spacing: -.015em; line-height: 1.1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.sec-title .no { font-style: italic; font-weight: 400; font-size: 17px; color: var(--dim); }
.sec-title small { font-family: var(--sans); font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.onboarding textarea#notes { min-height: 190px; font-family: var(--serif); font-size: 18px; line-height: 28px; padding: 14px 16px; background-color: var(--surface); background-image: repeating-linear-gradient(transparent 0 27px, var(--line) 27px 28px); background-attachment: local; background-origin: content-box; background-clip: padding-box; background-position: 0 0; }
.source-row { display: grid; grid-template-columns: minmax(96px, 120px) 1fr auto; gap: 8px; align-items: stretch; }
@media (max-width: 420px) { .source-row { grid-template-columns: 1fr auto; } .source-row select { grid-column: 1 / -1; } }
.more { display: flex; flex-direction: column; gap: 12px; }
.more summary { cursor: pointer; color: var(--accent-text); font-size: 15px; min-height: 44px; display: flex; align-items: center; gap: 10px; list-style: none; font-weight: 500; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .25s var(--ease); }
.more[open] summary::before { transform: rotate(45deg); }
.quality-row { display: flex; align-items: center; gap: 14px; }
.quality-label { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); flex: 0 0 76px; }
.quality-row select, .quality-row .seg { flex: 1; min-width: 0; }
.onboarding .btn-drop { margin-top: 6px; }

/* ── Rechtstexte ── */
.legal { max-width: 640px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 24px) var(--pad) 72px; display: flex; flex-direction: column; gap: 16px; position: relative; z-index: 1; }
.legal h1 { font-family: var(--serif); font-weight: 600; font-size: 44px; letter-spacing: -.025em; line-height: 1.05; margin-top: 8px; }
.legal p { font-family: var(--serif); font-size: 18px; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }
.legal p b { color: var(--ink); font-weight: 650; }
.legal code { font-family: var(--mono); font-size: 1.15em; color: var(--accent-text); }
.legal .pre { white-space: pre-line; }

.seg.three { --n: 3; }
#introTitle:focus { outline: none; }

/* ── Kino-Schicht der App (nur wenn motion.js Bewegung aktiviert hat: body.cin) ── */
.cin .tab-page, .cin #feedContainer .feed-card { animation: none; }
.cin .act.pop .ico { animation: none; }
.rv-cover { position: absolute; inset: 0; z-index: 3; background: var(--bg); border-top: 2px solid var(--accent); pointer-events: none; will-change: transform; }
.story-card .rv-cover { background: var(--surface); }
.spark { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: var(--accent); pointer-events: none; }

/* ── Ruhige Ladezustände: Platzhalterzeilen mit langsamem Schimmer (nur transform) ── */
.skel { display: flex; flex-direction: column; gap: 12px; padding: 12px 0; }
.skel i { display: block; position: relative; overflow: hidden; border-radius: 6px; background: var(--surface-2); height: 16px; }
.skel i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--ink) 9%, transparent), transparent); transform: translateX(-100%); animation: shimmer 1.6s var(--ease) infinite; }
.skel .s-l { width: 28%; height: 11px; margin-top: 22px; } .skel .s-t { height: 28px; width: 82%; } .skel .s-p { width: 100%; } .skel .s-short { width: 64%; }
@keyframes shimmer { to { transform: translateX(100%); } }
