/* ==========================================================
   ASTRO-HERZ CHECKLISTEN-GENERATOR
   ========================================================== */

:root {
    --bg: #040914;
    --panel: #0c192b;
    --panel-2: #10233c;
    --edge: #29496d;
    --text: #edf6ff;
    --muted: #aec1d5;
    --gold: #f1b83d;
    --blue: #79bfff;
    --green: #63d797;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 50% -15%, #173d6c 0, #08172b 34%, var(--bg) 72%);
    color: var(--text);
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

a:link, a:visited {color: var(--muted);}

button,
input,
select {
    font: inherit;
}

.app-shell {
    width: min(1200px, calc(100% - 28px));
    margin: 0 auto;
    padding: 22px 0 50px;
}

.site-header {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-bottom: 22px;
}

.logo {
    width: min(420px, 43vw);
    height: auto;
}

.eyebrow {
    margin: 0;
    color: var(--gold);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

h1 {
    margin: .15rem 0 .45rem;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.05;
}

h2 {
    margin-top: 0;
}

.site-header p:last-child,
.intro p,
.custom-section p {
    color: var(--muted);
}

.toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--edge);
    border-radius: 12px;
    background: rgba(7, 17, 31, .96);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}

button,
.file-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 13px;
    border: 1px solid #45698e;
    border-radius: 8px;
    background: #15304f;
    color: #fff;
    cursor: pointer;
}

button:hover,
.file-button:hover {
    border-color: var(--gold);
}

button.primary {
    border-color: #9b7424;
    background: #6e5016;
    color: #fff4d5;
}

.file-button input {
    display: none;
}

.status-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    min-height: 28px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: .9rem;
}

#saveStatus {
    color: var(--green);
}


.list-name-label {
    display: block;
    margin-bottom: 6px;
    color: var(--gold);
    font-weight: 800;
}

.list-name-input {
    width: min(680px, 100%);
    min-height: 46px;
    padding: 9px 12px;
    border: 1px solid #45698e;
    border-radius: 8px;
    background: #071523;
    color: #fff;
    font-size: 1.05rem;
}

.list-name-input:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.list-name-help {
    margin: 6px 0 20px;
    font-size: .9rem;
}

.intro,
.custom-section {
    padding: 18px;
    margin: 14px 0;
    border: 1px solid var(--edge);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(16, 35, 60, .96), rgba(7, 17, 31, .97));
}

.categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.category {
    padding: 18px;
    border: 1px solid var(--edge);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(16, 35, 60, .96), rgba(7, 17, 31, .97));
}

.category h2 {
    margin: 0 0 12px;
    font-size: 1.2rem;
    color: #fff;
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 4px;
    border-bottom: 1px solid rgba(80, 115, 150, .18);
    cursor: pointer;
}

.check-item:last-child {
    border-bottom: 0;
}

.check-item input {
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    margin-top: 2px;
    accent-color: var(--gold);
}

.check-item span {
    flex: 1;
}

.delete-custom {
    min-height: auto;
    padding: 1px 7px;
    border-color: #734b4b;
    background: transparent;
    color: #e8b4b4;
    font-size: .82rem;
}

.custom-form {
    display: flex;
    align-items: end;
    gap: 10px;
}

.custom-form label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: .9rem;
}

.custom-form .grow {
    flex: 1;
}

.custom-form input,
.custom-form select {
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #45698e;
    border-radius: 8px;
    background: #071523;
    color: #fff;
}

.print-area {
    display: none;
}

footer {
    margin-top: 22px;
    color: var(--muted);
    text-align: center;
    font-size: .85rem;
}

@media (max-width: 800px) {
    .site-header {
        display: block;
    }

    .logo {
        width: min(500px, 100%);
        margin-bottom: 12px;
    }

    .categories {
        grid-template-columns: 1fr;
    }

    .custom-form {
        display: grid;
    }
}

/* ==========================================================
   DRUCKANSICHT
   Nur die individuell gewählte Checkliste wird ausgegeben.
   ========================================================== */

@media print {
    @page {
        size: A4;
        margin: 13mm 15mm;
    }

    body {
        background: #fff;
        color: #111;
        font: 10.5pt/1.3 Arial, sans-serif;
    }

    body * {
        visibility: hidden;
    }

    #printArea,
    #printArea * {
        visibility: visible;
    }

    #printArea {
        display: block;
        position: absolute;
        inset: 0;
        width: 100%;
        color: #111;
        background: #fff;
    }

    .print-head {
        display: flex;
        align-items: center;
        gap: 16px;
        padding-bottom: 9px;
        margin-bottom: 12px;
        border-bottom: 1px solid #999;
    }

    .print-head img {
        width: 210px;
        height: auto;
    }

    .print-head h2 {
        margin: 0;
        font-size: 17pt;
    }

    .print-head p {
        margin: 3px 0 0;
        color: #555;
    }

    .print-category {
        break-inside: avoid;
        margin: 0 0 12px;
    }

    .print-category h3 {
        margin: 0 0 5px;
        padding-bottom: 3px;
        border-bottom: 1px solid #bbb;
        font-size: 12pt;
    }

    .print-category ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .print-category li {
        margin: 2px 0;
    }

    .print-wish {
        margin-top: 16px;
        padding-top: 9px;
        border-top: 1px solid #999;
    }
}
