:root {
    --bg: #eef3f2;
    --panel: #ffffff;
    --text: #18202a;
    --muted: #63727d;
    --line: #d7e0e0;
    --accent: #0f766e;
    --accent-dark: #0b5f5a;
    --ink: #112d35;
    --warm: #f59e0b;
    --danger: #b42318;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, .14), transparent 34rem),
        linear-gradient(180deg, #f8fbfb 0, var(--bg) 18rem, #f6f8f8 100%);
    color: var(--text);
}
a { color: var(--accent-dark); }
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 10px; align-items: center; font-weight: 800; text-decoration: none; color: var(--ink); }
.brand-logo { width: 44px; height: 44px; flex: 0 0 auto; }
.brand-copy { display: grid; gap: 1px; }
.brand-copy span { font-size: 20px; }
.brand small { color: var(--muted); font-size: 12px; font-weight: 600; }
nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
nav a { text-decoration: none; font-weight: 700; }
nav a:hover { color: var(--accent); }
.language-picker {
    position: relative;
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
}
.language-picker summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
    box-shadow: 0 6px 16px rgba(17, 45, 53, .06);
}
.language-picker summary::-webkit-details-marker { display: none; }
.language-picker summary::after {
    content: none;
}
.language-globe {
    display: inline-flex;
    align-items: center;
    font-size: 17px;
    line-height: 1;
}
.language-current {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
}
.language-options {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 30;
    display: grid;
    min-width: 136px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 32px rgba(17, 45, 53, .14);
}
.language-options a {
    display: flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 6px;
    color: var(--ink);
    font-size: 13px;
    white-space: nowrap;
}
.language-options a:hover {
    background: #edf7f6;
    color: var(--accent-dark);
}
.container { max-width: 90%; margin: 32px auto; padding: 0 20px; }
.site-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 20px 28px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}
.site-footer span { display: inline-flex; align-items: center; gap: 6px; }
.site-footer span:not(:last-child)::after {
    content: "·";
    color: var(--line);
    margin-left: 2px;
}
.site-footer a { color: var(--muted); font-weight: 700; text-decoration: none; }
.site-footer a:hover { color: var(--accent-dark); }
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(17, 45, 53, .08);
}
.narrow { max-width: 80%; margin: 0 auto; }
.wide { max-width: 100%; }
h1 { margin: 0 0 10px; font-size: 28px; }
.muted { color: var(--muted); }
.form { display: grid; gap: 16px; margin-top: 24px; }
.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
label { display: grid; gap: 8px; font-weight: 700; }
input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 11px 12px;
    font: inherit;
    background: #fff;
}
input:focus, textarea:focus, select:focus {
    outline: 3px solid rgba(15, 118, 110, .16);
    border-color: var(--accent);
}
input[type="color"] { min-height: 44px; padding: 4px; }
textarea { resize: vertical; }
.settings-section {
    display: grid;
    gap: 16px;
    margin: 8px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdfd;
}
.settings-section h2 {
    margin: 0;
    font-size: 20px;
    color: var(--ink);
}
.legal-text {
    line-height: 1.65;
    overflow-wrap: anywhere;
}
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.check input { width: auto; }
button, .button {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 14px;
    background: #fff;
    color: var(--text);
    font: inherit;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.primary:hover { background: var(--accent-dark); }
button:hover, .button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(17, 45, 53, .10); }
.danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.danger-form { margin-top: 18px; }
.inline { display: inline; }
.alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 6px;
    background: #ecfdf3;
    color: #05603a;
}
.alert.error { background: #fef3f2; color: var(--danger); }
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-top: 22px;
}
.stats a, .stats div {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
}
.stats strong { font-size: 30px; }
.stats span { color: var(--muted); }
.heading-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.gallery-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
    padding: 28px 0 22px;
}
.gallery-hero h1 {
    max-width: 760px;
    font-size: 42px;
    line-height: 1.08;
    color: var(--ink);
}
.eyebrow {
    margin: 0 0 8px;
    color: var(--accent-dark);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 12px;
}
.gallery-panel { padding-top: 20px; }
.table-wrap { overflow-x: auto; margin-top: 20px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 14px; }
.admin-table {
    table-layout: fixed;
    min-width: 920px;
}
.admin-table th:nth-child(1), .admin-table td:nth-child(1) { width: 42px; }
.admin-table th:nth-child(2), .admin-table td:nth-child(2) { width: 96px; }
.admin-table th:nth-child(3), .admin-table td:nth-child(3) { width: 150px; }
.admin-table th:nth-child(4), .admin-table td:nth-child(4) { width: 300px; }
.admin-table th:nth-child(5), .admin-table td:nth-child(5) { width: 70px; }
.admin-table th:nth-child(6), .admin-table td:nth-child(6) { width: 130px; }
.admin-table th:nth-child(7), .admin-table td:nth-child(7) { width: 250px; }
.url-cell a, .wrap-cell {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.qr { width: 58px; height: 58px; object-fit: contain; }
.badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
}
.badge.green {
    background: #ecfdf3;
    color: #05603a;
}
.empty { text-align: center; color: var(--muted); }
.empty.large {
    padding: 42px 16px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    margin-top: 20px;
}
code { background: #eef2f6; padding: 2px 5px; border-radius: 4px; }
.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.filters input {
    max-width: 360px;
    min-width: min(360px, 100%);
}
.filter {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 12px;
    text-decoration: none;
    color: var(--text);
    background: #fff;
}
.filter.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 24px;
}
.qr-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    display: grid;
    gap: 14px;
    min-width: 0;
    background: linear-gradient(180deg, #fff 0%, #fbfdfd 100%);
    box-shadow: 0 14px 30px rgba(17, 45, 53, .07);
}
.qr-card h2 {
    margin: 0;
    font-size: 18px;
    color: var(--ink);
}
.qr-card-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: start;
}
.qr-card img {
    width: 100%;
    max-width: 180px;
    aspect-ratio: 1;
    object-fit: contain;
    justify-self: center;
}
.qr-frame {
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid #e5ebeb;
    border-radius: 8px;
    padding: 12px;
}
.qr-card code {
    overflow-wrap: anywhere;
    background: #edf7f6;
    color: var(--accent-dark);
}
.pagination {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 24px;
}
.pagination a {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 12px;
    text-decoration: none;
}
.pagination a.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.result-box {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}
.qr-large {
    width: 260px;
    max-width: 100%;
    justify-self: center;
}
.qr-xlarge {
    width: 360px;
    max-width: 100%;
}
.center { text-align: center; }
.center-actions { justify-content: center; }
.edit-actions { margin-top: 18px; }
.compact-form {
    grid-template-columns: 1fr auto;
    align-items: end;
}
.word-list {
    display: grid;
    gap: 8px;
    margin-top: 22px;
}
.word-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
}
.impressum-list {
    display: grid;
    gap: 12px;
    margin: 22px 0;
}
.impressum-list div {
    display: grid;
    gap: 3px;
}
.impressum-list dt {
    color: var(--muted);
    font-weight: 700;
}
.impressum-list dd { margin: 0; }

@media (max-width: 640px) {
    .topbar { align-items: flex-start; flex-direction: column; padding: 14px 18px; }
    .container { margin: 18px auto; padding: 0 12px; }
    .panel { padding: 18px; }
    .gallery-hero { display: grid; padding-top: 12px; }
    .gallery-hero h1 { font-size: 30px; }
    .filters input { max-width: 100%; }
    .compact-form { grid-template-columns: 1fr; }
}
