/* ===================================================================
 * CounterParadies – Stylesheet
 * Farben konsistent mit Theme-System: CSS-Variablen --bg-from/--bg-to
 * --text-color, --accent-color werden pro Counter überschrieben.
 * =================================================================== */

:root {
    --color-ink: #0f172a;
    --color-ink-soft: #334155;
    --color-muted: #64748b;
    --color-bg: #ffffff;
    --color-surface: #f8fafc;
    --color-border: #e2e8f0;
    --color-primary: #4338ca;
    --color-primary-dark: #312e81;
    --color-accent: #ec4899;
    --color-success: #059669;
    --color-warn: #b45309;
    --color-danger: #dc2626;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;

    --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 1px rgba(15,23,42,.04);
    --shadow-md: 0 10px 25px -10px rgba(15,23,42,.15), 0 4px 10px -4px rgba(15,23,42,.08);
    --shadow-lg: 0 30px 60px -20px rgba(15,23,42,.25), 0 12px 30px -10px rgba(15,23,42,.15);

    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;

    --container: 1160px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    color: var(--color-ink);
    background: var(--color-bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color .15s ease;
}
a:hover { color: var(--color-primary-dark); }

img { max-width: 100%; display: block; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ------------ Header ------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.85);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--color-border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 68px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--color-ink);
}
.brand:hover { color: var(--color-ink); }
.brand-mark { font-size: 1.6rem; }
.brand-accent { color: var(--color-primary); }
.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 500;
}
.main-nav a:not(.btn) {
    color: var(--color-ink-soft);
}
.main-nav a:not(.btn):hover { color: var(--color-ink); }

/* ------------ Buttons ------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: inherit;
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
    text-decoration: none;
}
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-primary {
    background: var(--color-primary);
    color: #fff;
}
.btn-primary:hover {
    background: #fff;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-ghost {
    background: transparent;
    color: var(--color-ink);
    border-color: var(--color-border);
}
.btn-ghost:hover {
    background: var(--color-ink);
    color: #fff;
    border-color: var(--color-ink);
}
.btn-danger {
    background: transparent;
    color: var(--color-danger);
    border-color: #fecaca;
}
.btn-danger:hover {
    background: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
}

/* ------------ Flash & Alerts ------------ */
.flash {
    padding: 12px 24px;
    text-align: center;
    font-weight: 500;
}
.flash-success { background: #d1fae5; color: #065f46; }
.flash-error   { background: #fee2e2; color: #991b1b; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: .95rem;
}
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-info    { background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }

.text-warn { color: var(--color-warn); }

/* ------------ Hero (Landing) ------------ */
.hero {
    position: relative;
    overflow: hidden;
    padding: 80px 0 100px;
    background: radial-gradient(1200px 600px at 10% -10%, rgba(67,56,202,.12), transparent 60%),
                radial-gradient(1000px 500px at 110% 20%, rgba(236,72,153,.1), transparent 60%),
                #ffffff;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 64px;
    align-items: center;
}
.eyebrow {
    display: inline-block;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 16px;
}
.hero-title {
    font-family: var(--font-sans);
    font-size: clamp(2.1rem, 4.2vw, 3.5rem);
    font-weight: 800;
    line-height: 1.08;
    margin: 0 0 20px;
    letter-spacing: -.02em;
}
.serif-accent {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--color-primary);
    font-weight: 600;
}
.hero-lead {
    font-size: 1.15rem;
    color: var(--color-ink-soft);
    margin: 0 0 28px;
    max-width: 52ch;
}
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.hero-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--color-ink-soft);
    font-size: .95rem;
}
.hero-bullets li::before {
    content: '✓';
    color: var(--color-primary);
    font-weight: 700;
    margin-right: 6px;
}

/* ------------ Mini Counter (used in hero, theme grid, dashboard) ------------ */
.mini-counter {
    --bg-from: #0f172a;
    --bg-to: #4338ca;
    --text-color: #ffffff;
    --accent-color: #f472b6;
    display: block;
    border-radius: var(--radius-lg);
    padding: 28px 24px 24px;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--bg-from), var(--bg-to));
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    min-height: 220px;
    text-decoration: none;
}
.mini-counter::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(500px 200px at 90% 110%, rgba(255,255,255,.12), transparent 70%);
    pointer-events: none;
}
.mini-counter-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-weight: 700;
    font-size: 1.02rem;
}
.mini-emoji { font-size: 1.6rem; }
.mini-counter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.mini-counter-grid .cell {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius-md);
    padding: 14px 8px 10px;
    text-align: center;
    backdrop-filter: blur(2px);
}
.mini-counter-grid .num {
    display: block;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.55rem;
    line-height: 1.1;
    letter-spacing: -.02em;
    color: var(--accent-color);
    font-variant-numeric: tabular-nums;
}
.mini-counter-grid .unit {
    display: block;
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .8;
    margin-top: 4px;
}

/* ------------ Sections ------------ */
.section {
    padding: 80px 0;
}
.section-muted {
    background: var(--color-surface);
}
.section-head {
    text-align: center;
    margin-bottom: 44px;
}
.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0 0 10px;
}
.section-lead {
    color: var(--color-ink-soft);
    font-size: 1.1rem;
    max-width: 60ch;
    margin: 0 auto;
}

/* ------------ Feature Grid ------------ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.feature-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px 26px 24px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}
.feature-emoji {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}
.feature-card h3 {
    font-size: 1.2rem;
    margin: 0 0 8px;
    font-weight: 700;
}
.feature-card p {
    margin: 0;
    color: var(--color-ink-soft);
    font-size: .96rem;
}

/* ------------ Live-Slider (Marquee, Landing) ------------ */
.live-slider-section {
    padding-bottom: 80px;
}
.live-slider {
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(
        to right,
        transparent 0,
        #000 64px,
        #000 calc(100% - 64px),
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0,
        #000 64px,
        #000 calc(100% - 64px),
        transparent 100%
    );
}
.live-track {
    display: flex;
    gap: 18px;
    padding: 10px 32px;
    width: max-content;
    animation: live-marquee var(--marquee-duration, 60s) linear infinite;
    will-change: transform;
}
@keyframes live-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.live-slider:hover .live-track,
.live-slider:focus-within .live-track {
    animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
    .live-track { animation: none; }
    .live-slider { overflow-x: auto; }
}

.live-slide {
    flex: 0 0 340px;
    max-width: 85vw;
    min-height: 240px;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}
.live-slide:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px -20px rgba(15,23,42,.35);
}
.live-slide-foot {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: .8rem;
    opacity: .85;
    color: var(--text-color, #fff);
    letter-spacing: .02em;
}
@media (min-width: 860px) {
    .live-slide { flex-basis: clamp(300px, 30vw, 360px); }
}

/* ------------ Theme Grid (Landing-Beispiele) ------------ */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}
.theme-card {
    transition: transform .2s ease, box-shadow .2s ease;
}
.theme-card:hover {
    transform: translateY(-4px);
}
.theme-card-foot {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .85rem;
    color: var(--text-color);
    opacity: .9;
}
.theme-card-cta {
    font-weight: 600;
}

/* ------------ Steps ------------ */
.steps-layout { max-width: 900px; margin: 0 auto; }
.steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.steps li {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 24px 22px;
    border: 1px solid var(--color-border);
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    margin-bottom: 12px;
}
.steps h3 { margin: 0 0 6px; font-size: 1.15rem; }
.steps p  { margin: 0; color: var(--color-ink-soft); font-size: .95rem; }

/* ------------ CTA Banner ------------ */
.section-cta {
    background: linear-gradient(135deg, #0f172a, #4338ca);
    color: #fff;
    text-align: center;
}
.section-cta h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin: 0 0 12px;
}
.section-cta p {
    color: rgba(255,255,255,.8);
    max-width: 60ch;
    margin: 0 auto 24px;
}
.section-cta .btn-primary {
    background: #fff;
    color: var(--color-primary);
}
.section-cta .btn-primary:hover {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

/* ------------ Page container (Create / Dashboard / Counter-Edit) ------------ */
.page-container {
    padding: 56px 24px 80px;
}
.page-head { margin-bottom: 32px; text-align: center; }
.page-head h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin: 0 0 8px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.page-lead { color: var(--color-ink-soft); margin: 0; }

/* ------------ Counter-Form ------------ */
.counter-form {
    max-width: 780px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.form-section {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px 24px 24px;
    background: #fff;
    margin: 0;
}
.form-section legend {
    font-weight: 700;
    padding: 0 8px;
    color: var(--color-primary);
}
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row:last-child { margin-bottom: 0; }
.form-row-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}
.form-row-split > div { display: flex; flex-direction: column; gap: 6px; }
.form-row label,
.form-row-split label {
    font-weight: 600;
    font-size: .93rem;
    color: var(--color-ink);
}
.req { color: var(--color-accent); }

input[type="text"], input[type="email"], input[type="password"],
input[type="datetime-local"], input[type="color"], select, textarea {
    font-family: inherit;
    font-size: 1rem;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--color-ink);
    transition: border-color .15s ease, box-shadow .15s ease;
    width: 100%;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(67,56,202,.15);
}
input[type="color"] {
    padding: 4px;
    height: 42px;
    width: 100%;
    cursor: pointer;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: .95rem;
    color: var(--color-ink-soft);
}
.checkbox input { width: 18px; height: 18px; }

/* ---- Emoji-Picker ---- */
.emoji-picker-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.emoji-input {
    flex: 1;
    text-align: center;
    font-size: 1.4rem !important;
    letter-spacing: .05em;
}
.emoji-group {
    margin-top: 16px;
}
.emoji-group-title {
    margin: 14px 0 6px;
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--color-muted);
    font-weight: 600;
}
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    gap: 6px;
}
.emoji-btn {
    appearance: none;
    border: 1px solid var(--color-border);
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 8px 0;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: background .1s ease, border-color .1s ease, transform .1s ease;
}
.emoji-btn:hover {
    background: var(--color-surface);
    border-color: var(--color-primary);
    transform: translateY(-1px);
}
.emoji-btn.is-selected {
    border-color: var(--color-primary);
    background: #e0e7ff;
    box-shadow: 0 0 0 2px rgba(67,56,202,.15);
}

.theme-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.theme-option {
    position: relative;
    cursor: pointer;
    border-radius: var(--radius-md);
    overflow: hidden;
}
.theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.theme-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 12px 14px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--bg-from), var(--bg-to));
    color: var(--text-color);
    text-align: center;
    font-weight: 600;
    font-size: .9rem;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.theme-option input:checked + .theme-preview {
    border-color: var(--color-ink);
    box-shadow: 0 0 0 3px rgba(15,23,42,.2);
    transform: translateY(-2px);
}
.theme-emoji { font-size: 1.8rem; }

.advanced { margin-top: 16px; }
.advanced summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--color-primary);
    padding: 6px 0;
}
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.color-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: .9rem;
    color: var(--color-ink-soft);
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.form-hint {
    width: 100%;
    text-align: center;
    color: var(--color-muted);
    font-size: .9rem;
    margin: 8px 0 0;
}

/* ------------ Counter-Seite (öffentlich) ------------ */
.page-counter .site-header {
    background: rgba(255,255,255,.9);
}
.counter-hero {
    min-height: calc(100vh - 68px);
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--bg-from, #0f172a), var(--bg-to, #4338ca));
    color: var(--text-color, #fff);
    padding: 60px 24px 80px;
    position: relative;
    overflow: hidden;
}
.counter-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(900px 400px at 20% 0%, rgba(255,255,255,.1), transparent 60%),
                radial-gradient(700px 400px at 100% 100%, rgba(0,0,0,.2), transparent 60%);
    pointer-events: none;
}
.counter-stage {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 1100px;
    width: 100%;
}
.counter-head { margin-bottom: 40px; }
.counter-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}
.counter-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: -.01em;
    text-shadow: 0 2px 20px rgba(0,0,0,.2);
}
.counter-subtitle {
    font-size: 1.15rem;
    opacity: .9;
    margin: 0;
}
.counter-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;   /* bei Umbruch ist auch die letzte Reihe mittig */
    gap: 14px;
    max-width: 1100px;
    margin: 0 auto;
}
.counter-cell {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: var(--radius-lg);
    padding: 20px 10px 16px;
    backdrop-filter: blur(3px);
    overflow: hidden;
    flex: 1 1 130px;
    min-width: 110px;
    max-width: 200px;
    text-align: center;
}
.counter-num {
    display: block;
    font-weight: 800;
    font-size: clamp(1.9rem, 3.8vw, 3.2rem);
    line-height: 1.05;
    letter-spacing: -.04em;
    color: var(--accent-color, #f472b6);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 12px rgba(0,0,0,.2);
    white-space: nowrap;
}
.counter-unit {
    display: block;
    font-size: .82rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    opacity: .85;
    margin-top: 8px;
}
.counter-target {
    margin-top: 32px;
    font-size: 1rem;
    opacity: .9;
}
.counter-target strong {
    font-weight: 700;
    margin-left: 4px;
}
.counter-tz {
    opacity: .7;
    margin-left: 6px;
    font-size: .9em;
}

/* ---- Totals-Liste (unter dem Counter) ---- */
.counter-totals {
    margin-top: 56px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.counter-totals-title {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.4rem;
    margin: 0 0 18px;
    text-align: center;
    opacity: .9;
    letter-spacing: .02em;
}
.totals-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;   /* auch eine angerissene letzte Zeile bleibt mittig */
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.totals-list li {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius-md);
    padding: 16px 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    backdrop-filter: blur(3px);
    overflow: hidden;
    flex: 1 1 150px;
    min-width: 140px;
    max-width: 220px;
}
.totals-num {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 1.35rem;
    line-height: 1.1;
    letter-spacing: -.01em;
    color: var(--accent-color, #f472b6);
    text-shadow: 0 1px 6px rgba(0,0,0,.15);
    white-space: nowrap;
}
.totals-unit {
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .8;
    white-space: nowrap;
}

.counter-actions {
    padding: 60px 0 80px;
    background: var(--color-bg);
}

.share-row {
    display: flex;
    justify-content: center;
    padding: 32px 28px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}
.share-link {
    width: 100%;
    max-width: 520px;
    text-align: center;
}
.share-link label {
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
    font-size: 1rem;
}
.share-link-row {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.share-link-row input {
    flex: 1;
    font-size: .95rem;
    text-align: center;
}

.owner-actions {
    display: flex;
    gap: 12px;
    margin: 24px 0;
    justify-content: center;
}
.claim-cta, .idea-cta {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    text-align: center;
    margin: 24px 0;
}
.claim-cta h3, .idea-cta h3 {
    margin: 0 0 8px;
    font-size: 1.4rem;
}
.claim-cta p, .idea-cta p {
    color: var(--color-ink-soft);
    max-width: 56ch;
    margin: 0 auto 16px;
}

.counter-stage.is-finished .counter-num {
    color: #ffffff;
    opacity: .7;
}

/* ------------ Adsense-Platzhalter ------------ */
.adslot-placeholder {
    border: 2px dashed var(--color-border);
    background: repeating-linear-gradient(
        45deg,
        rgba(15,23,42,.02),
        rgba(15,23,42,.02) 10px,
        rgba(15,23,42,.04) 10px,
        rgba(15,23,42,.04) 20px
    );
    color: var(--color-muted);
    text-align: center;
    padding: 20px;
    border-radius: var(--radius-md);
    font-size: .85rem;
    margin: 16px 0;
}

/* ------------ Auth-Card ------------ */
.auth-container {
    padding: 80px 24px;
    display: grid;
    place-items: center;
}
.auth-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow-md);
}
.auth-card h1 {
    font-family: var(--font-serif);
    font-weight: 700;
    margin: 0 0 8px;
    font-size: 1.9rem;
}
.auth-lead {
    color: var(--color-ink-soft);
    margin: 0 0 22px;
}
.stacked-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.stacked-form label {
    font-weight: 600;
    font-size: .93rem;
    margin-top: 10px;
}
.stacked-form small {
    color: var(--color-muted);
    font-weight: 400;
    font-size: .85rem;
}
.stacked-form .btn {
    margin-top: 18px;
}
.auth-alt {
    margin-top: 22px;
    text-align: center;
    font-size: .95rem;
    color: var(--color-ink-soft);
}

.inline-form {
    display: inline;
    margin: 0;
}

/* ---- Retention-Funnel (digest-prefs, unsubscribe) ---- */
.funnel-card {
    max-width: 520px;
    text-align: center;
}
.funnel-step {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    color: var(--color-muted);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.funnel-card h1 {
    margin: 0 0 12px;
    font-family: var(--font-serif);
    font-weight: 700;
}
.funnel-card .muted {
    margin: 14px 0 0;
    color: var(--color-muted);
    font-size: .88rem;
    font-style: italic;
}
.funnel-actions {
    margin: 26px 0 8px;
    display: flex;
    flex-direction: column;
}
.funnel-actions .btn {
    width: 100%;
}
.funnel-decline {
    margin: 18px 0 0;
    font-size: .92rem;
}
.funnel-decline a {
    color: var(--color-muted);
    text-decoration: underline;
}
.funnel-decline a:hover {
    color: var(--color-ink);
}

/* ---- Konto löschen (Danger-Zone) ---- */
.danger-zone {
    margin-top: 32px;
    border: 1px solid #fecaca !important;
    background: #fef2f2 !important;
}
.danger-zone h2 {
    margin: 0 0 8px;
    color: #b91c1c;
    font-size: 1.2rem;
    font-weight: 700;
}
.danger-zone .muted {
    color: #7f1d1d;
    font-size: .9rem;
    line-height: 1.55;
    margin: 0 0 18px;
}
.danger-zone .btn-danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}
.danger-zone .btn-danger:hover {
    background: #fff;
    color: #dc2626;
    border-color: #dc2626;
}

/* ------------ Dashboard ------------ */
.dashboard-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.counter-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}
.counter-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.counter-item-preview {
    min-height: 180px;
}
.counter-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.counter-item-meta strong { display: block; font-size: 1rem; }
.counter-item-meta small { display: block; color: var(--color-muted); font-size: .82rem; }
.counter-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}
.empty-state {
    text-align: center;
    padding: 60px 30px;
    background: var(--color-surface);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
}
.empty-state h2 { margin: 0 0 8px; }
.empty-state p { color: var(--color-ink-soft); margin: 0 0 20px; }
.dashboard-ad { margin-top: 40px; }

/* ------------ Subscribers ------------ */
.subscribers-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 32px;
    align-items: start;
    margin-top: 20px;
}
.subscribers-add {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px 22px;
    position: sticky;
    top: 88px;
}
.subscribers-add h2 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}
.subscribers-add .muted {
    color: var(--color-ink-soft);
    font-size: .9rem;
    margin: 0 0 16px;
}
.subscribers-list-wrap h2 {
    margin: 0 0 16px;
    font-size: 1.15rem;
}
.subscribers-list-wrap .muted {
    color: var(--color-ink-soft);
}
.subscriber-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.subscriber-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    gap: 16px;
}
.subscriber-item.is-pending {
    border-color: #fed7aa;
    background: #fffbeb;
}
.subscriber-item.is-verified {
    border-color: #a7f3d0;
    background: #f0fdf4;
}
.subscriber-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.subscriber-main strong { font-size: 1rem; }
.subscriber-main small { color: var(--color-muted); font-size: .82rem; }
.subscriber-status {
    font-size: .82rem;
    color: var(--color-ink-soft);
    margin-top: 4px;
}
.subscriber-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}
@media (max-width: 860px) {
    .subscribers-layout { grid-template-columns: 1fr; }
    .subscribers-add { position: static; }
    .subscriber-item { flex-direction: column; align-items: stretch; }
    .subscriber-actions { justify-content: flex-start; }
}

/* ===========================================================
 * Floating Social Share
 *   Desktop (>1023px):  rechts fixiert, nur Icons, Hover klappt Labels aus
 *   Tablet  (641-1023): untere Leiste, einzeilig, nur Icons
 *   Mobile  (<=640):    untere Leiste, Toggle-Button → Grid mit Labels
 * =========================================================== */
.share-float {
    position: fixed;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.share-float-toggle { display: none; }

.share-float-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-end;   /* Knöpfe bleiben rechts verankert */
    gap: 10px;
}

.share-float-btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    height: 44px;
    padding: 0 11px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: .88rem;
    text-decoration: none;
    background: var(--brand-color);
    color: var(--ink-color, #fff);
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .18);
    transition: box-shadow .2s ease, transform .15s ease;
    white-space: nowrap;
}
.share-float-btn:hover,
.share-float-btn:focus-visible {
    outline: none;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .3);
    transform: scale(1.05);
}

/* Label ist im geschlossenen Zustand eingeklappt → nur das Icon bleibt sichtbar */
.share-float-label {
    display: inline-block;
    max-width: 0;
    overflow: hidden;
    margin: 0;
    opacity: 0;
    transition:
        max-width .28s cubic-bezier(.4, 0, .2, 1),
        opacity .2s ease .05s,
        margin .2s ease;
}
.share-float:hover .share-float-label,
.share-float:focus-within .share-float-label {
    max-width: 160px;
    opacity: 1;
    margin-right: 10px;
}

.share-float-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.share-float-icon svg {
    width: 22px;
    height: 22px;
}

/* ---- Tablet (untere Leiste, einzeilig) ---- */
@media (max-width: 1023px) {
    .share-float {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        flex-direction: column;
        gap: 0;
        background: rgba(255, 255, 255, .97);
        backdrop-filter: blur(10px);
        border-top: 1px solid var(--color-border);
        box-shadow: 0 -8px 24px rgba(15, 23, 42, .08);
    }
    .share-float-inner {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        gap: 6px;
        padding: 10px 12px calc(env(safe-area-inset-bottom, 0) + 10px);
        flex-wrap: nowrap;
    }
    .share-float-btn {
        transform: none;
        border-radius: 12px;
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
        flex-shrink: 0;
    }
    .share-float-label {
        display: none;
    }
}

/* ---- Mobile (Toggle + ausklappbares Grid) ---- */
@media (max-width: 640px) {
    .share-float-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        height: 44px;
        border: none;
        background: #0f172a;
        color: #fff;
        font-family: inherit;
        font-weight: 700;
        font-size: .95rem;
        letter-spacing: .06em;
        text-transform: uppercase;
        cursor: pointer;
    }
    .share-float-chevron {
        font-size: 1.2rem;
        line-height: 1;
        display: inline-block;
        transition: transform .25s ease;
    }
    .share-float.is-expanded .share-float-chevron {
        transform: rotate(180deg);
    }
    .share-float-inner {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease, padding .3s ease;
    }
    .share-float.is-expanded .share-float-inner {
        max-height: 360px;
        padding: 12px 10px calc(env(safe-area-inset-bottom, 0) + 12px);
    }
    .share-float-btn {
        flex: 1 1 calc(33.333% - 10px);
        max-width: calc(33.333% - 10px);
        min-width: 0;
        height: 64px;
        flex-direction: column;
        justify-content: center;
        padding: 4px;
        gap: 4px;
        border-radius: 14px;
    }
    .share-float-btn .share-float-label {
        display: block;
        opacity: 1;
        font-size: .72rem;
        font-weight: 600;
        letter-spacing: .02em;
    }
    /* Counter-Seite bekommt Extra-Padding unten, damit der Bottom-Bar-Inhalt
       nicht hinter der Leiste verschwindet */
    body.page-counter .counter-actions,
    body.page-counter .site-footer {
        padding-bottom: 60px;
    }
}

/* ---- Toast für "Link kopiert" ---- */
.share-toast {
    position: fixed;
    bottom: 88px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #0f172a;
    color: #fff;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 130;
    max-width: min(90vw, 400px);
    text-align: center;
}
.share-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
@media (min-width: 1024px) {
    .share-toast { bottom: 40px; }
}

/* ------------ Cookie-Consent-Banner ------------ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200; /* über share-float (90) und share-toast (130) */
    background: #ffffff;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -10px 30px rgba(15, 23, 42, .12);
    padding: 18px 20px calc(env(safe-area-inset-bottom, 0) + 18px);
    animation: cookie-banner-in .25s ease-out;
}
@keyframes cookie-banner-in {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
.cookie-banner[hidden] { display: none; }

.cookie-banner-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}
.cookie-banner-text {
    flex: 1 1 380px;
}
.cookie-banner-text strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 4px;
    color: var(--color-ink);
}
.cookie-banner-text p {
    margin: 0;
    color: var(--color-ink-soft);
    font-size: .92rem;
    line-height: 1.5;
}
.cookie-banner-text a {
    font-weight: 600;
}
.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.cookie-banner-actions .btn {
    min-width: 140px;
    justify-content: center;
}

@media (max-width: 640px) {
    .cookie-banner-actions { width: 100%; }
    .cookie-banner-actions .btn { flex: 1 1 120px; min-width: 0; }
    /* Share-Float nach oben schieben, damit der Banner nicht drüber liegt */
    body.has-cookie-banner .share-float { bottom: 120px; }
}

/* Cookie-Link im Footer */
.cookie-revoke-link {
    background: none;
    border: none;
    color: inherit;
    padding: 4px 0;
    cursor: pointer;
    font: inherit;
    text-align: left;
    display: block;
}
.cookie-revoke-link:hover { color: #fff; }

/* ------------ Footer ------------ */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 60px 0 20px;
    margin-top: 40px;
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.3fr 2fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .brand-text { color: #fff; }
.footer-claim { color: #94a3b8; margin-top: 12px; font-size: .95rem; }
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}
.footer-cols h4 {
    color: #fff;
    font-size: .95rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 0 0 12px;
}
.footer-cols a {
    display: block;
    color: #94a3b8;
    font-size: .95rem;
    padding: 4px 0;
}
.footer-cols a:hover { color: #fff; }
.footer-bottom {
    padding-top: 20px;
    color: #64748b;
    font-size: .85rem;
    text-align: center;
}

/* ------------ Responsive ------------ */
@media (max-width: 860px) {
    .hero-inner { grid-template-columns: 1fr; gap: 36px; }
    .steps { grid-template-columns: 1fr; }
    .form-row-split { grid-template-columns: 1fr; }
    .share-row { padding: 24px 18px; }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .main-nav { gap: 12px; font-size: .9rem; }
    .main-nav a:not(.btn) { display: none; }
    .main-nav a.btn { padding: 8px 14px; font-size: .85rem; }
    .mini-counter-grid { grid-template-columns: repeat(2, 1fr); }
    .counter-cell { flex-basis: calc(50% - 7px); min-width: 0; }
    .footer-cols { grid-template-columns: 1fr; gap: 10px; }
    .hero { padding: 56px 0 64px; }
    .section { padding: 56px 0; }
}

/* ------------ Content-Seiten (FAQ, Anleitung, Ideen, Ratgeber, Artikel) ------------ */
.page-text { background: #fafaf9; }
.text-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 56px 24px 80px;
    line-height: 1.7;
    color: #1f2937;
    font-size: 1.05rem;
}
.text-page-head { margin-bottom: 36px; }
.text-page-head h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.4rem;
    line-height: 1.15;
    margin: 0 0 18px;
    color: #0f172a;
}
.text-page .lead {
    font-size: 1.2rem;
    line-height: 1.55;
    color: #475569;
    margin: 0 0 0;
}
.text-page h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.7rem;
    margin: 48px 0 16px;
    color: #0f172a;
    line-height: 1.2;
}
.text-page h3 {
    font-size: 1.18rem;
    font-weight: 700;
    margin: 28px 0 10px;
    color: #1f2937;
}
.text-page p { margin: 0 0 16px; }
.text-page ul, .text-page ol { margin: 0 0 20px; padding-left: 1.5em; }
.text-page li { margin: 0 0 8px; }
.text-page a {
    color: #4338ca;
    text-decoration: underline;
    text-decoration-color: rgba(67, 56, 202, 0.35);
    text-underline-offset: 3px;
}
.text-page a:hover { text-decoration-color: #4338ca; }
.text-page code {
    background: #eef2ff;
    color: #3730a3;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .92em;
}
.text-page strong { color: #0f172a; }
.text-page em { color: #475569; }
.text-page-cta {
    margin-top: 56px;
    padding: 32px 28px;
    background: linear-gradient(135deg, #eef2ff 0%, #fdf4ff 100%);
    border-radius: 14px;
    text-align: center;
}
.text-page-cta h2 {
    margin: 0 0 8px;
    font-size: 1.5rem;
}
.text-page-cta p { margin: 0 0 18px; color: #475569; }

/* Ratgeber-Übersicht */
.article-list {
    display: grid;
    gap: 22px;
    margin: 32px 0;
}
.article-card {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 20px;
    padding: 24px 26px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    transition: box-shadow .2s, transform .2s;
}
.article-card:hover {
    box-shadow: 0 10px 25px -10px rgba(15, 23, 42, .15);
    transform: translateY(-2px);
}
.article-emoji {
    font-size: 2.4rem;
    line-height: 1;
    align-self: start;
}
.article-body h2 {
    margin: 0 0 8px;
    font-size: 1.3rem;
    font-family: 'Playfair Display', Georgia, serif;
}
.article-body h2 a { color: #0f172a; text-decoration: none; }
.article-body h2 a:hover { color: #4338ca; }
.article-body p { margin: 0 0 12px; color: #475569; font-size: .98rem; }
.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .9rem;
    color: #64748b;
}
.article-cta { font-weight: 600; color: #4338ca; text-decoration: none; }
.article-cta:hover { text-decoration: underline; }

/* Einzel-Artikel */
.article-kicker {
    font-size: .9rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0 0 10px;
}
.article-kicker a { color: #4338ca; text-decoration: none; }
.article-nav {
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: .95rem;
}
.article-nav a { color: #4338ca; text-decoration: none; font-weight: 500; }
.article-nav a:hover { text-decoration: underline; }

/* Counter-Seite: Narrativer Block unter dem Counter */
.counter-context {
    max-width: 720px;
    margin: 48px auto 0;
    padding: 36px 28px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
    line-height: 1.65;
    color: #334155;
}
.counter-context h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    margin: 0 0 14px;
    color: #0f172a;
}
.counter-context h3 {
    font-size: 1.1rem;
    margin: 24px 0 8px;
    color: #1f2937;
}
.counter-context p { margin: 0 0 14px; }
.counter-context ul { margin: 0 0 14px; padding-left: 1.4em; }
.counter-context a { color: #4338ca; }

@media (max-width: 560px) {
    .text-page { padding: 40px 18px 60px; }
    .text-page-head h1 { font-size: 1.85rem; }
    .text-page .lead { font-size: 1.05rem; }
    .text-page h2 { font-size: 1.35rem; margin: 36px 0 12px; }
    .article-card { grid-template-columns: 1fr; gap: 12px; padding: 20px; }
    .article-emoji { font-size: 2rem; }
    .counter-context { padding: 28px 20px; }
}
