/* Flohmarkt Bauspielplatz – Farben und Schriften angelehnt an bauspielplatz-merheim.de */

@font-face { font-family: 'Quicksand'; font-weight: 500; font-display: swap; src: url('/fonts/quicksand-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Quicksand'; font-weight: 700; font-display: swap; src: url('/fonts/quicksand-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Raleway'; font-weight: 400; font-display: swap; src: url('/fonts/raleway-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Raleway'; font-weight: 400; font-style: italic; font-display: swap; src: url('/fonts/raleway-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Raleway'; font-weight: 600; font-display: swap; src: url('/fonts/raleway-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Raleway'; font-weight: 700; font-display: swap; src: url('/fonts/raleway-latin-700-normal.woff2') format('woff2'); }

:root {
  --red: #ee1133;
  --red-dark: #d5001a;
  --red-deep: #bb0000;
  --blue: #1153ee;
  --yellow: #eedc11;
  --green: #2a9d55;
  --green-dark: #1f7d43;
  --text: #202020;
  --muted: #6b6b6b;
  --bg: #f6f4ee;
  --card: #ffffff;
  --line: rgba(0, 0, 0, 0.1);
  --soft: #faf8f2;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 24px rgba(0, 0, 0, 0.06);
  --head: 'Quicksand', 'Trebuchet MS', sans-serif;
  --body: 'Raleway', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--text); background: var(--bg); line-height: 1.55; font-size: 16px; min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 0.8em; }
a { color: var(--red-dark); }
a:hover { color: var(--red-deep); }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
main.container { flex: 1; padding-top: 24px; padding-bottom: 48px; outline: none; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.85em; }
.center { text-align: center; }
.right { text-align: right; }
.spacer { flex: 1; }
.req { color: var(--red); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-bottom: 0.3em; }
.eyebrow a { color: inherit; text-decoration: none; }
.lead { font-size: 1.1rem; }

/* ---------- Kopf und Fuß ---------- */

.site-header { background: #fff; box-shadow: 0 1px 0 var(--line); position: relative; z-index: 5; }
.header-inner { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); font-family: var(--head); font-weight: 700; font-size: 1.25rem; }
.brand img { height: 48px; width: auto; }
.brand:hover { color: var(--red); }
.site-nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--text); font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.site-nav a:hover { background: var(--soft); color: var(--red); }
.stripe { display: grid; grid-template-columns: repeat(4, 1fr); height: 5px; }
.stripe span:nth-child(1) { background: var(--red); }
.stripe span:nth-child(2) { background: var(--yellow); }
.stripe span:nth-child(3) { background: var(--green); }
.stripe span:nth-child(4) { background: var(--blue); }

.site-footer { background: #202020; color: #ddd; padding: 24px 0; font-size: 0.9rem; }
.site-footer p { margin: 0.2em 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: #fff; text-decoration: none; opacity: 0.85; }
.site-footer a:hover { opacity: 1; text-decoration: underline; color: #fff; }

/* ---------- Karten, Knöpfe, Formulare ---------- */

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(16px, 3vw, 28px); margin-bottom: 20px; }
.card.narrow { max-width: 720px; margin-left: auto; margin-right: auto; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h1, .card-head h2 { margin: 0; }
.hero { text-align: center; padding: 16px 0 24px; max-width: 720px; margin: 0 auto; }
.hero p { font-size: 1.1rem; color: #444; }
.big-icon { font-size: 3rem; line-height: 1; margin-bottom: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; font-family: var(--head);
  padding: 9px 18px; border-radius: 999px; border: 2px solid #d8d2c4; background: #fff; color: var(--text); cursor: pointer;
  text-decoration: none; line-height: 1.2; transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { border-color: var(--text); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--soft); border-color: var(--line); }
.btn.danger { background: var(--red-deep); border-color: var(--red-deep); color: #fff; }
.btn.danger.ghost { background: transparent; border-color: transparent; color: var(--red-deep); }
.btn.danger.ghost:hover { background: #fdecec; }
.btn.small { padding: 5px 12px; font-size: 0.88rem; }
.btn.big { padding: 13px 28px; font-size: 1.1rem; }
.btn.icon { width: 34px; height: 34px; padding: 0; font-size: 1.2rem; font-family: system-ui, sans-serif; }

label { display: block; font-weight: 600; font-size: 0.93rem; }
label .muted { font-weight: 400; }
input, select, textarea {
  display: block; width: 100%; margin-top: 4px; font: inherit; font-weight: 400; padding: 10px 12px; border: 1.5px solid #d8d2c4;
  border-radius: 10px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(17, 83, 238, 0.15); }
input[type='checkbox'] { width: 20px; height: 20px; display: inline-block; margin: 0; accent-color: var(--red); flex-shrink: 0; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 12px 0; cursor: pointer; }
label.check span { flex: 1; }
textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.grid2 .span2 { grid-column: span 2; }
.grid2.compact { gap: 10px; }
.grid2.compact input, .grid2.compact select { padding: 7px 9px; }
.stack > * + * { margin-top: 14px; }
.actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-form input, .inline-form select { width: auto; flex: 1 1 180px; margin: 0; }
.inline-form label.check { margin: 0; white-space: nowrap; align-items: center; }
fieldset { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; margin: 0 0 12px; }
legend { font-weight: 700; font-family: var(--head); padding: 0 6px; }
.form-error { background: #fdecec; color: var(--red-deep); border-radius: 10px; padding: 10px 14px; font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice { background: #eef3ff; border-left: 4px solid var(--blue); padding: 10px 14px; border-radius: 8px; }
.notice.warn { background: #fff8d6; border-left-color: #d9b600; }
.note { color: #6b5600; }

.badge { display: inline-block; font-size: 0.78rem; font-weight: 700; font-family: var(--head); padding: 3px 10px; border-radius: 999px; background: #eee; color: #444; vertical-align: middle; }
.badge.small { font-size: 0.7rem; padding: 1px 7px; }
.reg-open { background: #dcf3e4; color: var(--green-dark); }
.reg-not_yet { background: #fff4b8; color: #6b5600; }
.reg-closed, .reg-past, .reg-archived { background: #eee; color: #555; }
.reg-draft { background: #fff; color: #666; border: 1.5px dashed #aaa; }

/* ---------- Übersicht ---------- */

.market-list { display: grid; gap: 16px; max-width: 820px; margin: 0 auto; }
.market-card { display: flex; gap: 20px; align-items: center; text-decoration: none; color: var(--text); transition: transform 0.15s, box-shadow 0.15s; }
.market-card:hover { transform: translateY(-2px); color: var(--text); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); }
.market-card h2 { margin-bottom: 0.2em; }
.market-card p { margin: 0.2em 0; }
.date-badge { flex-shrink: 0; width: 96px; text-align: center; background: var(--red); color: #fff; border-radius: 14px; padding: 10px 6px; font-family: var(--head); line-height: 1.15; }
.date-badge span { display: block; font-size: 0.85rem; opacity: 0.9; }
.date-badge strong { display: block; font-size: 1rem; }
.date-badge.large { width: 120px; padding: 14px 8px; }
.date-badge.large strong { font-size: 1.15rem; }

.market-head { display: flex; gap: 20px; align-items: center; margin-bottom: 16px; }
.market-head h1 { margin-bottom: 0.15em; }
.market-head p { margin: 0.15em 0; }
.facts { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.facts li { background: var(--soft); border-radius: 12px; padding: 10px 14px; font-size: 0.95rem; }
.facts strong { color: var(--red-dark); }
.description { border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- Plan ---------- */

.plan-card .hint { margin-bottom: 10px; }
.free-text { color: var(--green-dark); }
.plan-wrap { position: relative; }
.plan-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.zoom { display: inline-flex; gap: 4px; align-items: center; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.88rem; }
.legend li { display: flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 22px; height: 15px; border-radius: 4px; }
.swatch.free { background: var(--green); }
.swatch.selected { background: var(--blue); box-shadow: 0 0 0 2px var(--yellow); }
.swatch.taken { background: #f4c7c3; border: 1px solid #e3958d; }
.swatch.paid { background: #e05a50; }
.swatch.blocked { background: repeating-linear-gradient(45deg, #d6d3cc 0 3px, #ebe8e2 3px 6px); }

.plan-scroll { overflow: auto; border-radius: 12px; border: 2px solid #d8d2c4; background: #fbfaf5; max-height: 75vh; -webkit-overflow-scrolling: touch; }
.plan {
  --cell: 12px;
  position: relative; touch-action: manipulation;
  background-color: #fbfaf5;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.035) 1px, transparent 1px), linear-gradient(to bottom, rgba(0, 0, 0, 0.035) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
}
.plan.editing { background-image: linear-gradient(to right, rgba(0, 0, 0, 0.08) 1px, transparent 1px), linear-gradient(to bottom, rgba(0, 0, 0, 0.08) 1px, transparent 1px); touch-action: none; user-select: none; }
.plan.tiny { background-image: none; }

.stand, .marker, .ghost-box {
  position: absolute;
  left: calc(var(--x) * var(--cell)); top: calc(var(--y) * var(--cell));
  width: calc(var(--w) * var(--cell)); height: calc(var(--h) * var(--cell));
}
.stand {
  display: flex; align-items: center; justify-content: center; padding: 0; margin: 0; border: 0;
  font-family: var(--head); font-weight: 700; color: #fff; line-height: 1;
  font-size: max(8px, min(calc(var(--h) * var(--cell) * 0.55), calc(var(--w) * var(--cell) * 0.34), 18px));
  background-clip: content-box; border: 1px solid transparent; border-radius: 6px;
}
.stand span { pointer-events: none; }
.stand.free { background-color: var(--green); }
button.stand.free { cursor: pointer; }
button.stand.free:hover { background-color: var(--green-dark); transform: scale(1.08); z-index: 3; }
.stand.selected { background-color: var(--blue); box-shadow: 0 0 0 3px var(--yellow); z-index: 2; }
button.stand.selected { cursor: pointer; }
.stand.taken { background-color: #f4c7c3; color: #8b1c14; }
.stand.taken.paid { background-color: #e05a50; color: #fff; }
.stand.blocked { background: repeating-linear-gradient(45deg, #d6d3cc 0 3px, #ebe8e2 3px 6px); color: #777; background-clip: content-box; }
.plan.tiny .stand { border-radius: 3px; }

.marker { display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: auto; text-align: center; overflow: hidden; }
.marker-icon { font-size: max(10px, min(calc(var(--h) * var(--cell) * 0.7), calc(var(--w) * var(--cell) * 0.7))); line-height: 1; }
.marker-label { font-size: max(8px, min(calc(var(--cell) * 0.9), 13px)); font-weight: 700; color: #555; line-height: 1.1; white-space: nowrap; }
.marker-icon + .marker-label { position: absolute; bottom: -1.2em; white-space: nowrap; overflow: visible; }
.marker:has(.marker-icon + .marker-label) { overflow: visible; }
.marker-area { background: rgba(238, 220, 17, 0.14); border: 2px dashed rgba(170, 150, 0, 0.5); border-radius: 10px; }
.marker-path { background: #e9e2d2; border-radius: 4px; }
.marker-text .marker-label { font-size: max(10px, min(calc(var(--h) * var(--cell) * 0.6), 20px)); color: var(--text); }
.marker-area .marker-label, .marker-path .marker-label { white-space: normal; }

.pick-by-number { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.pick-by-number label { font-weight: 600; }
.pick-by-number input { width: 110px; margin: 0; padding: 7px 10px; }
.selection-bar {
  position: sticky; bottom: 10px; z-index: 6; margin-top: 12px; display: flex; gap: 12px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; background: #202020; color: #fff; border-radius: 14px; padding: 10px 12px 10px 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* ---------- Anmeldeformular ---------- */

.chosen { margin-bottom: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--blue); color: #fff; font-weight: 700; font-family: var(--head); border-radius: 999px; padding: 5px 6px 5px 14px; }
.chip-x { border: 0; background: rgba(255, 255, 255, 0.2); color: #fff; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 1rem; line-height: 1; }
.chip-x:hover { background: rgba(255, 255, 255, 0.35); }
.summary { margin: 16px 0 4px; }
.price { display: flex; gap: 12px; flex-wrap: wrap; }
.price > div { background: var(--soft); border-radius: 12px; padding: 10px 16px; flex: 1 1 200px; }
.price span { display: block; font-size: 0.85rem; }
.price strong { font-size: 1.3rem; font-family: var(--head); }
.success { text-align: center; }
.success .details { text-align: left; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 16px 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
.manage-link { background: #fff8d6; border-radius: 14px; padding: 14px 16px; text-align: left; margin: 16px 0; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { margin: 0; font-size: 0.85rem; }
.link-list { list-style: none; padding: 0; margin: 0 0 12px; }
.link-list li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }

/* ---------- Toasts & Dialoge ---------- */

#toasts { pointer-events: none; position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 460px); }
.toast { background: #202020; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); font-weight: 600; transition: opacity 0.5s, transform 0.5s; }
.toast-error { background: var(--red-deep); }
.toast.out { opacity: 0; transform: translateY(8px); }
.dialog { border: 0; border-radius: var(--radius); padding: 24px; max-width: min(92vw, 460px); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); }
.dialog.wide { max-width: min(94vw, 640px); width: 100%; }
.dialog::backdrop { background: rgba(20, 20, 20, 0.45); }
.dialog .actions { margin-top: 16px; }

/* ---------- Verwaltung ---------- */

.admin-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.admin-nav a { text-decoration: none; color: var(--text); font-weight: 700; font-family: var(--head); padding: 8px 14px; border-radius: 999px; }
.admin-nav a.active, .admin-nav a:hover { background: #202020; color: #fff; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.admin-head h1 { margin-bottom: 0.2em; }
.admin-head p { margin: 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stats > div { background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); border-top: 4px solid var(--red); }
.stats > div:nth-child(2) { border-top-color: var(--yellow); }
.stats > div:nth-child(3) { border-top-color: var(--green); }
.stats > div:nth-child(4) { border-top-color: var(--blue); }
.stats > div:nth-child(5) { border-top-color: #202020; }
.stats strong { display: block; font-family: var(--head); font-size: 1.5rem; }
.stats span { color: var(--muted); font-size: 0.88rem; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 2px solid var(--line); }
.tabs a { text-decoration: none; color: var(--muted); font-weight: 700; font-family: var(--head); padding: 10px 14px; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--red); border-bottom-color: var(--red); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.table th { text-align: left; font-family: var(--head); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); border-bottom: 2px solid var(--line); padding: 8px; white-space: nowrap; }
.table td { border-bottom: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
.table tr.cancelled td { opacity: 0.55; text-decoration: line-through; }
.table tr.cancelled td:last-child, .table tr.cancelled td:nth-last-child(2) { text-decoration: none; }
.table tr.flash td { background: #fff4b8; transition: background 0.3s; }
.danger-zone { border: 2px solid #f3c4c4; }
.tips { padding-left: 18px; font-size: 0.9rem; }
.tips li { margin-bottom: 4px; }

/* Editor */
.editor-bar { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.toolbox { display: flex; flex-wrap: wrap; gap: 4px; background: #fff; border-radius: 12px; padding: 4px; box-shadow: var(--shadow); }
.tool { font-family: system-ui, sans-serif; width: 38px; height: 38px; border: 0; border-radius: 9px; background: transparent; font-size: 1.15rem; cursor: pointer; display: grid; place-items: center; font-weight: 700; }
.tool:hover { background: var(--soft); }
.tool.active { background: #202020; color: #fff; }
.editor-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ed-status { font-size: 0.85rem; color: var(--green-dark); font-weight: 600; }
.ed-status.warn { color: #9a7b00; }
.editor-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.editor-scroll { max-height: 78vh; background: #fbfaf5; }
.editor-side { background: #fff; border-radius: 14px; padding: 16px; box-shadow: var(--shadow); position: sticky; top: 12px; font-size: 0.93rem; }
.editor-side label { margin-bottom: 8px; }
.plan[data-tool='stand'], .plan[data-tool='area'], .plan[data-tool='path'], .plan[data-tool='text'] { cursor: crosshair; }
.plan[data-tool='erase'] { cursor: not-allowed; }
.plan[data-tool='erase'] .stand:hover, .plan[data-tool='erase'] .marker:hover { opacity: 0.4; }
.plan.editing .stand, .plan.editing .marker { cursor: inherit; }
.plan[data-tool='select'] .stand, .plan[data-tool='select'] .marker { cursor: grab; }
.plan.editing .sel { outline: 2px solid var(--blue); outline-offset: 1px; box-shadow: 0 0 0 4px rgba(17, 83, 238, 0.25); z-index: 4; }
.ghosts { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.ghost-box { background: rgba(42, 157, 85, 0.45); border: 2px dashed var(--green-dark); border-radius: 6px; }
.ghost-box.area { background: rgba(238, 220, 17, 0.2); border-color: #b39d00; }
.ghost-box.band { background: rgba(17, 83, 238, 0.08); border-color: var(--blue); border-radius: 2px; }

/* Druck */
.print-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.print-tools label.check { margin: 0; }
.print-sheet { background: #fff; padding: 24px; border-radius: var(--radius); }
.print-plan { margin: 12px 0 20px; }
.print-plan .plan-tools { display: none; }
.print-table td, .print-table th { padding: 5px 6px; }

/* ---------- Schmale Bildschirme ---------- */

@media (max-width: 900px) {
  .editor-body { grid-template-columns: 1fr; }
  .editor-side { position: static; }
}

@media (max-width: 640px) {
  .grid2 { grid-template-columns: 1fr; }
  .grid2 .span2 { grid-column: auto; }
  .grid2.compact { grid-template-columns: 1fr 1fr; }
  .brand img { height: 38px; }
  .brand span { font-size: 1.05rem; }
  .market-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .market-card { flex-direction: column; align-items: flex-start; }
  .date-badge.large { width: auto; display: flex; gap: 8px; padding: 8px 14px; }
  .date-badge.large span, .date-badge.large strong { display: inline; }
  .details { grid-template-columns: 1fr; gap: 0; }
  .details dd { margin-bottom: 8px; }
  .selection-bar { bottom: 6px; }
  .selection-bar .btn { width: 100%; }
  .copy-row { flex-direction: column; }
  .table.bookings thead { display: none; }
  .table.bookings tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .table.bookings td { display: inline-block; border: 0; padding: 2px 10px 2px 0; }
}

@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff; font-size: 11pt; }
  .site-header, .site-footer, .no-print, .admin-nav, #toasts { display: none !important; }
  main.container { padding: 0; max-width: none; }
  .print-sheet { padding: 0; box-shadow: none; }
  .plan-scroll { max-height: none; overflow: visible; border-color: #999; }
  .stand.taken { background: #ddd !important; color: #000 !important; }
  .stand.free { background: #fff !important; color: #000 !important; border: 1px solid #000; background-clip: border-box; }
  .print-table { page-break-before: always; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Freigabe & Gebührenrechner ---------- */

.swatch.pending { background: #f7df3a; border: 1px solid #c9b000; }
.stand.pending { background-color: #f7df3a; color: #5a4a00; }
.status-pending { background: #fff1a8; color: #6b5600; text-decoration: none; }
.status-confirmed { background: #dcf3e4; color: var(--green-dark); }
.status-rejected, .status-cancelled { background: #f1e3e3; color: #8b1c14; }
a.status-pending:hover { background: #f7df3a; color: #4a3c00; }
.pending-text { color: #8a6d00; }
.table tr.row-pending td { background: #fffbe3; }
.nowrap { white-space: nowrap; }

.calculator { background: var(--soft); border-radius: 14px; padding: 14px 16px; margin: 0 0 12px; border: 2px dashed #e7dfc8; }
.calculator h3 { margin-bottom: 8px; }
.calc-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.calc-row label { flex: 0 1 170px; }
.calc-out { flex: 1 1 200px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 46px; }
.calc-out strong { font-family: var(--head); font-size: 1.6rem; color: var(--red-dark); line-height: 1.1; }
.calc-out span { font-size: 0.9rem; color: var(--muted); }
.calc-rule { margin: 8px 0 0; }
.calculator.compact { margin: 0; }

/* ---------- E-Mail-Bestätigung ---------- */

.swatch.hold { background: repeating-linear-gradient(45deg, #f7df3a 0 3px, #fff7c2 3px 6px); border: 1px dashed #c9b000; }
.stand.hold { background: repeating-linear-gradient(45deg, #f2e08a 0 4px, #fbf2c6 4px 8px); color: #5a4a00; background-clip: content-box; }
.status-unverified { background: #f3f0e6; color: #6b5600; border: 1.5px dashed #c9b000; }
.status-expired { background: #eee; color: #666; }
.notice.ok { background: #e6f6ec; border-left-color: var(--green); }
.verify-box { background: #fff8d6; border-radius: 14px; padding: 14px 16px; text-align: left; margin: 16px 0; }
.verify-box p:last-child { margin-bottom: 0; }
details.resend { text-align: left; margin-top: 12px; }
details.resend summary { cursor: pointer; font-weight: 600; color: var(--red-dark); margin-bottom: 10px; }
