:root {
    --ink: #17232b;
    --ink-soft: #55656e;
    --paper: #eef1ef;
    --surface: #ffffff;
    --line: #d3dad6;
    --teal: #0d6b66;
    --teal-dark: #0a4f4b;
    --lamp: #e3a516;
    --red: #a23c3f;
    --blue: #3a6a8c;
    --radius: 6px;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
    margin: 0; background: var(--paper); color: var(--ink);
    font-family: "Avenir Next", "Segoe UI Variable", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
}
h1, h2 { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; font-weight: 600; letter-spacing: 0; line-height: 1.2; }
h1 { font-size: 1.9rem; margin: 1.2rem 0 .8rem; }
h2 { font-size: 1.25rem; margin: 1.6rem 0 .6rem; }
a { color: var(--teal-dark); text-underline-offset: 2px; }
a:hover { color: var(--teal); }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 2px; }
code, pre { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .88em; }
code { background: #e1e7e4; padding: .05em .35em; border-radius: 3px; }

.top { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; background: var(--ink); color: #fff; padding: .7rem 1.5rem; }
.brand { font-family: "Iowan Old Style", Palatino, Georgia, serif; font-size: 1.3rem; color: #fff; text-decoration: none; margin-right: .5rem; }
.top nav { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
.top nav a, .top .out { color: #cfd9d6; text-decoration: none; padding: .35rem .75rem; border-radius: var(--radius); }
.top nav a:hover, .top .out:hover { background: #26363f; color: #fff; }
.top nav a.on { background: var(--lamp); color: var(--ink); font-weight: 600; }
main { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem 4rem; }

.flash { padding: .7rem 1rem; border-radius: var(--radius); margin: 1rem 0; border-left: 5px solid var(--teal); background: #dcebe8; }
.flash.err { border-color: var(--red); background: #f3dddd; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 1rem 0 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.facts div { padding: .9rem 1rem; border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; }
.facts strong { display: block; font-family: "Iowan Old Style", Palatino, Georgia, serif; font-size: 1.9rem; font-weight: 600; line-height: 1.1; }
.facts span { color: var(--ink-soft); font-size: .9rem; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1rem 0; }
.panel h2 { margin-top: .2rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.5rem; align-items: start; }

.muted { color: var(--ink-soft); }
.small { font-size: .85rem; }
.narrow { max-width: 620px; }
.nowrap { white-space: nowrap; }
.lead { font-size: 1.05rem; }
.crumb { margin: 1rem 0 0; font-size: .9rem; }
.empty { padding: 1.2rem; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

button, .btn {
    font: inherit; cursor: pointer; border: 1px solid var(--teal); background: var(--teal); color: #fff;
    padding: .45rem .95rem; border-radius: var(--radius); text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: var(--teal-dark); color: #fff; }
button:disabled { opacity: .5; cursor: default; }
button.ghost, .btn.ghost { background: transparent; color: var(--teal-dark); border-color: var(--line); }
button.ghost:hover, .btn.ghost:hover { background: #e3eae7; color: var(--teal-dark); }
button.small { padding: .2rem .55rem; font-size: .85rem; }

input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid #b9c4bf; border-radius: var(--radius); padding: .4rem .55rem; max-width: 100%; }
input[type=checkbox] { width: auto; }
textarea { width: 100%; }
input.short { width: 5rem; }
label { display: block; font-size: .9rem; color: var(--ink-soft); }
label input, label select, label textarea { display: block; margin-top: .2rem; color: var(--ink); }
label.check, label.inlinelabel { display: inline-flex; align-items: center; gap: .4rem; }
label.check input, label.inlinelabel input { margin-top: 0; display: inline-block; }
.stack > * + * { margin-top: .8rem; }
.stack input:not([type=checkbox]), .stack textarea { width: 100%; }
.row { display: flex; gap: .6rem; align-items: flex-end; }
.row.wrap { flex-wrap: wrap; align-items: center; }
.row input[name=url], .row input[name=term], .row input[name=city], .row input[type=email] { flex: 1; min-width: 12rem; }
form.inline { display: inline-flex; gap: .4rem; align-items: center; margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 1rem; }
.filters input[type=search] { min-width: 15rem; }
.tools { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; }
.danger { margin-top: 2.5rem; }

table.list { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table.list th { text-align: left; font-weight: 600; font-size: .85rem; color: var(--ink-soft); padding: .5rem .7rem; border-bottom: 2px solid var(--line); background: #f6f8f7; }
table.list td { padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover { background: #f7faf9; }
table.list input { width: 100%; }
table.list input.short { width: 4.5rem; }
table.list input[type=checkbox] { width: auto; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
table.wide { min-width: 820px; }

.chip { display: inline-block; font-size: .8rem; padding: .08rem .55rem; border-radius: 999px; background: #e1e7e4; color: var(--ink); white-space: nowrap; }
.v-passt, .c-konzert, .s-zusage { background: #cfe6e2; color: var(--teal-dark); }
.c-chance, .s-interessant { background: #f5e1a8; color: #5c4200; }
.v-ausschluss_genre, .s-absage, .s-ausgeschlossen { background: #ecd0d1; color: #7a2427; }
.v-wenig_daten, .s-angefragt { background: #d5e2ec; color: #234a68; }
.c-unklar { background: #e8e4d3; color: #5b5330; }
.c-kein_konzert, .s-ignorieren { background: #e1e5e3; color: var(--ink-soft); }

/* Pegelanzeige: fünf Segmente wie an einem Mischpult */
.meter { display: inline-flex; gap: 2px; align-items: flex-end; height: 18px; vertical-align: middle; }
.meter i { width: 5px; background: #d8dedb; border-radius: 1px; }
.meter i:nth-child(1) { height: 6px; } .meter i:nth-child(2) { height: 9px; } .meter i:nth-child(3) { height: 12px; }
.meter i:nth-child(4) { height: 15px; } .meter i:nth-child(5) { height: 18px; }
.meter i.lit { background: var(--teal); }
.meter i.lit.l4 { background: var(--lamp); }
.meter i.lit.l5 { background: var(--red); }

.m { display: inline-block; font-size: .78rem; background: #eef1ef; border: 1px solid var(--line); border-radius: 3px; padding: 0 .35rem; margin: .1rem .15rem .1rem 0; color: var(--ink-soft); }
.m b { font-weight: 600; color: var(--ink); }
.m-genre_excl { border-color: #dcb6b8; } .m-chance { border-color: #e3c670; } .m-nichtkonzert { border-style: dashed; }
tr.ev-kein_konzert td { opacity: .6; }

.tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 2px solid var(--line); margin-bottom: 1rem; }
.tabs a { padding: .45rem .8rem; text-decoration: none; color: var(--ink-soft); border-radius: var(--radius) var(--radius) 0 0; }
.tabs a:hover { background: #e3eae7; }
.tabs a.on { background: var(--surface); color: var(--ink); font-weight: 600; border: 1px solid var(--line); border-bottom: 2px solid var(--surface); margin-bottom: -2px; }

.log { background: var(--ink); color: #c8e6e1; padding: .8rem 1rem; border-radius: var(--radius); min-height: 6rem; max-height: 18rem; overflow: auto; white-space: pre-wrap; word-break: break-all; margin: .8rem 0; }
pre.code { background: #e1e7e4; padding: .8rem; border-radius: var(--radius); overflow-x: auto; word-break: break-all; white-space: pre-wrap; }
.pager { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }

@media (max-width: 640px) {
    main { padding: 0 1rem 3rem; }
    .top { padding: .6rem 1rem; }
    .row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.actpick { color: #cfd9d6; display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; }
.actpick select { margin: 0; padding: .25rem .5rem; }
details.act { padding: .6rem 1.25rem; }
details.act summary { cursor: pointer; padding: .3rem 0; }
details.act[open] summary { margin-bottom: .8rem; }
.actform { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.actform:last-child { border-bottom: 0; }
.actname { min-width: 9rem; }
.grow { flex: 1; min-width: 12rem; }
.a-zusage { background: #cfe6e2; color: var(--teal-dark); }
.a-angefragt, .a-nachgefasst { background: #d5e2ec; color: #234a68; }
.a-absage, .a-nicht_passend { background: #e1e5e3; color: var(--ink-soft); }

.genrebox { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .3rem 1rem; margin: .3rem 0; }
.genrebox label.check { color: var(--ink); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .9rem; margin: 0; }
legend { font-size: .9rem; color: var(--ink-soft); padding: 0 .3rem; }
.f-passt { background: #cfe6e2; color: var(--teal-dark); }
.f-fremd, .v-fremd { background: #ecd0d1; color: #7a2427; }
.f-unklar { background: #e8e4d3; color: #5b5330; }
input.short6 { width: 9rem; letter-spacing: .1em; }
code.secret { font-size: 1rem; letter-spacing: .08em; }
details summary { cursor: pointer; }

.weblink { display: inline-flex; align-items: center; gap: .3rem; color: var(--teal); text-decoration: none; vertical-align: -2px; padding: 2px; border-radius: 4px; }
.weblink:hover { color: var(--teal-dark); background: #e3eae7; }
h1 .weblink { font-family: "Avenir Next", "Segoe UI", Arial, sans-serif; font-size: .95rem; font-weight: 400; vertical-align: middle; margin-left: .4rem; }
h1 .weblink span { text-decoration: underline; text-underline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
