/* Events – Übersicht, Detailseite und Bearbeiten-Fenster */
.dge { --accent: #3fb6ff; --accent-rgb: 63, 182, 255; --text: #eef1f7; --muted: #8d96ab; --line: rgba(255,255,255,.08); --card: #10151d; --ok: #34d399; --warn: #fbbf24; color: var(--text); }
.dge *, .dge *::before, .dge *::after { box-sizing: border-box; }
.dge a { text-decoration: none; }
.dge-toolbar { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.dge-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.dge-btn:hover { background: rgba(255,255,255,.12); }
.dge-btn--primary { background: linear-gradient(135deg, #3fb6ff, #1f7fd1); border-color: transparent; color: #fff; box-shadow: 0 8px 22px rgba(var(--accent-rgb), .25); }
.dge-btn--primary:hover { background: linear-gradient(135deg, #5cc2ff, #2a8ae0); }
.dge-btn--danger:hover { background: #fb7185; border-color: #fb7185; color: #fff; }
.dge-muted { color: var(--muted); margin: 0; }
.dge-kicker { display: inline-block; padding: 5px 12px; border-radius: 99px; background: rgba(var(--accent-rgb), .15); border: 1px solid rgba(var(--accent-rgb), .35); color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.dge-meta { margin: 6px 0 0; color: #c9d0de; font-size: 14px; }
.dge-meta--big { font-size: 16px; }
.dge-meta__sep { margin: 0 8px; color: var(--muted); }
.dge-going { margin: 10px 0 0; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.dge-going strong { color: var(--text); }
.dge-mine { margin-left: 6px; padding: 2px 9px; border-radius: 6px; background: rgba(52,211,153,.15); color: var(--ok); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.dge-mine--maybe { background: rgba(251,191,36,.15); color: var(--warn); }
.dge-section { margin: 34px 0 14px; font-size: 18px; font-weight: 800; color: var(--text); }

/* nächstes Event (groß) und Kopf der Detailseite */
.dge-next, .dge-hero {
	position: relative; display: flex; align-items: flex-end; min-height: 320px; padding: 30px; border-radius: 18px; overflow: hidden; color: var(--text);
	background:
		linear-gradient(0deg, rgba(10,13,20,.96) 8%, rgba(10,13,20,.55) 60%, rgba(10,13,20,.25)),
		var(--dge-image, radial-gradient(600px 300px at 80% 20%, rgba(63, 182, 255, .35), transparent 70%)) center / cover no-repeat,
		linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 30px 30px,
		linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 30px 30px,
		#10151d;
	border: 1px solid rgba(var(--accent-rgb), .25); box-shadow: 0 18px 44px rgba(0,0,0,.5);
}
.dge-next:hover { border-color: rgba(var(--accent-rgb), .6); }
.dge-next__title, .dge-hero__title { margin: 12px 0 0; font-size: clamp(26px, 4vw, 40px); font-weight: 800; line-height: 1.1; color: #fff; }

/* Countdown */
.dge-countdown { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.dge-countdown__label { color: var(--muted); font-size: 13px; font-weight: 700; margin-right: 4px; }
.dge-countdown__unit { display: inline-flex; flex-direction: column; align-items: center; min-width: 56px; padding: 7px 8px; border-radius: 10px; background: rgba(10,13,20,.7); border: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.dge-countdown__unit b { color: #fff; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.dge-countdown--live { display: inline-flex; gap: 8px; padding: 7px 14px; border-radius: 10px; background: rgba(52,211,153,.18); color: var(--ok); font-weight: 800; }
.dge-countdown--live::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); align-self: center; }
.dge-countdown--past { color: var(--muted); font-weight: 700; }

/* weitere Events */
.dge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.dge-card { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--line); color: var(--text); }
.dge-card:hover { border-color: rgba(var(--accent-rgb), .5); }
.dge-card__img { position: relative; height: 140px; background: radial-gradient(260px 140px at 70% 30%, rgba(63, 182, 255, .35), transparent 70%), #141925; background-size: cover; background-position: center; }
.dge-date { position: absolute; left: 14px; bottom: -22px; display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: 6px 8px; border-radius: 12px; background: #0a0d14; border: 1px solid rgba(var(--accent-rgb), .45); color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.dge-date b { color: #fff; font-size: 22px; line-height: 1.05; }
.dge-card__body { padding: 30px 16px 16px; }
.dge-card h3 { margin: 0; font-size: 17px; font-weight: 800; color: var(--text); }

/* vergangene */
.dge-past { list-style: none; margin: 0; padding: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.dge-past li + li { border-top: 1px solid var(--line); }
.dge-past a { display: flex; align-items: center; gap: 14px; padding: 12px 16px; color: var(--muted); }
.dge-past a:hover { background: rgba(255,255,255,.03); }
.dge-past time { font-variant-numeric: tabular-nums; font-size: 13px; }
.dge-past__title { flex: 1; color: var(--text); font-weight: 600; }
.dge-past__count { font-size: 13px; }
.dge-empty { padding: 40px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 16px; }

/* Detailseite */
.dge-hero { min-height: 340px; margin-bottom: 24px; }
.dge-back { position: absolute; top: 18px; left: 22px; color: #c9d0de !important; font-size: 13px; font-weight: 700; }
.dge-back:hover { color: #fff !important; }
.dge-manage { position: absolute; top: 14px; right: 16px; display: flex; gap: 8px; }
.dge-manage .dge-btn { background: rgba(10,13,20,.75); backdrop-filter: blur(6px); }
.dge-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.dge-text { padding: 22px 24px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: #c9d0de; line-height: 1.7; }
.dge-text p, .dge-text ul { margin: 0; }
.dge-text > * + * { margin-top: 12px !important; }
.dge-text ul { padding-left: 22px; list-style: disc; }
.dge-text li::marker { color: var(--accent); }
.dge-text a { color: var(--accent); }
.dge-text strong { color: var(--text); }
.dge-side { display: grid; gap: 16px; }
.dge-box { padding: 18px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.dge-box h2, .dge-box h3 { margin: 0 0 12px; font-size: 15px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 8px; }
.dge-box h3 { margin-top: 16px; font-size: 13px; color: var(--muted); }
.dge-count { padding: 1px 8px; border-radius: 99px; background: rgba(var(--accent-rgb), .15); color: var(--accent); font-size: 12px; }
.dge-rsvp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dge-rsvp__btn { padding: 12px 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: var(--text); font: inherit; font-weight: 800; cursor: pointer; }
.dge-rsvp__btn:hover { border-color: var(--ok); }
.dge-rsvp__btn[aria-pressed="true"] { background: rgba(52,211,153,.18); border-color: var(--ok); color: var(--ok); }
.dge-rsvp__btn--maybe:hover { border-color: var(--warn); }
.dge-rsvp__btn--maybe[aria-pressed="true"] { background: rgba(251,191,36,.16); border-color: var(--warn); color: var(--warn); }
.dge-link { margin-top: 10px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.dge-error { margin: 10px 0 0; color: #fb7185; font-size: 13px; font-weight: 600; }
.dge-error[hidden] { display: none; }
.dge-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dge-people a { display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: 14px; }
.dge-people a:hover { background: rgba(255,255,255,.05); }
.dge-people img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #10151d, 0 0 0 3px rgba(52,211,153,.6); }
.dge-people--maybe img { box-shadow: 0 0 0 2px #10151d, 0 0 0 3px rgba(251,191,36,.6); }

@media (max-width: 900px) {
	.dge-layout { grid-template-columns: 1fr; }
	.dge-next, .dge-hero { min-height: 280px; padding: 22px 18px; }
	.dge-hero { padding-top: 70px; }
	.dge-back { top: 18px; left: 18px; }
	.dge-manage { top: 12px; right: 12px; }
	.dge-countdown__unit { min-width: 48px; }
	.dge-countdown__unit b { font-size: 19px; }
	.dge-past a { flex-wrap: wrap; gap: 4px 12px; }
}

/* ---------- Bearbeiten-Fenster ---------- */
.dgee-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dgee-field input[type="datetime-local"] { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: #0a0d14; color: #eef1f7; font: inherit; color-scheme: dark; }
@media (max-width: 640px) { .dgee-row { grid-template-columns: 1fr; } }
/* Fenster */
.dgee-noScroll { overflow: hidden; }
.dgee-overlay {
	position: fixed; inset: 0; z-index: 500; display: flex; align-items: flex-start; justify-content: center;
	padding: 5vh 16px; overflow-y: auto; background: rgba(4,6,10,.72); backdrop-filter: blur(3px);
}
.dgee-modal {
	width: min(760px, 100%); display: flex; flex-direction: column; max-height: 90vh;
	background: #10151d; color: #eef1f7; border: 1px solid rgba(255,255,255,.1); border-radius: 18px;
	box-shadow: 0 30px 80px rgba(0,0,0,.7); font-size: 15px; line-height: 1.5;
}
.dgee-modal *, .dgee-modal *::before, .dgee-modal *::after { box-sizing: border-box; }
.dgee-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.dgee-head h2 { flex: 1; margin: 0; font-size: 19px; font-weight: 800; color: #eef1f7; }
.dgee-close { width: 34px; height: 34px; border-radius: 9px; border: 0; cursor: pointer; background: rgba(255,255,255,.06); color: #8d96ab; font-size: 16px; }
.dgee-close:hover { color: #fff; background: rgba(255,255,255,.12); }
.dgee-body { padding: 20px 22px; overflow-y: auto; display: grid; gap: 16px; }
.dgee-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 16px 22px; border-top: 1px solid rgba(255,255,255,.08); }
.dgee-spacer { flex: 1; }
.dgee-error { flex-basis: 100%; margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(251,113,133,.12); color: #fb7185; font-weight: 600; }
.dgee-error[hidden] { display: none; }

.dgee-field { display: grid; gap: 6px; min-width: 0; }
.dgee-field > label, .dgee-label { font-size: 13px; font-weight: 700; color: #b7c0d3; }
.dgee-field input[type="text"], .dgee-field input[type="url"], .dgee-field textarea {
	width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12);
	background: #0a0d14; color: #eef1f7; font: inherit; resize: vertical;
}
.dgee-field input:focus, .dgee-field textarea:focus { outline: none; border-color: #3fb6ff; box-shadow: 0 0 0 3px rgba(63,182,255,.2); }
.dgee-hint { color: #8d96ab; font-size: 12px; }
.dgee-field--check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(63,182,255,.08); cursor: pointer; font-weight: 700; }
.dgee-field--check input { width: 18px; height: 18px; accent-color: #3fb6ff; }

.dgee-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 10px; cursor: pointer;
	border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #eef1f7; font: 700 13px/1.2 inherit; font-family: inherit;
}
.dgee-btn:hover:not(:disabled) { background: rgba(255,255,255,.12); }
.dgee-btn:disabled { opacity: .5; cursor: not-allowed; }
.dgee-btn--primary { background: linear-gradient(135deg, #3fb6ff, #1f7fd1); border-color: transparent; color: #fff; }
.dgee-btn--primary:hover:not(:disabled) { background: linear-gradient(135deg, #5cc2ff, #2a8ae0); }
.dgee-btn--ghost { background: none; color: #8d96ab; }
.dgee-btn--small { padding: 7px 12px; font-size: 12px; }

/* Bildfeld */
.dgee-image { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 14px; align-items: start; }
.dgee-image__preview {
	position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; cursor: pointer;
	display: grid; place-items: center; padding: 8px; text-align: center; color: #8d96ab; font-size: 12px;
	border: 1px dashed rgba(255,255,255,.18);
	background: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 14px 14px, linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 14px 14px, #0a0d14;
}
.dgee-image__preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dgee-image__preview.is-drop { border-color: #3fb6ff; box-shadow: 0 0 0 3px rgba(63,182,255,.25); }
.dgee-image__preview.is-busy::after { content: ''; position: absolute; inset: 0; background: rgba(10,13,20,.6); }
.dgee-image__side { display: grid; gap: 8px; min-width: 0; }
.dgee-image__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dgee-image__actions [hidden] { display: none; }
.dgee-image__status { color: #3fb6ff; font-size: 12px; font-weight: 700; }

/* Listen (Karten, Fragen, Schritte) */
.dgee-list { display: grid; gap: 12px; }
.dgee-item { position: relative; margin: 0; padding: 14px 16px 16px; display: grid; gap: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.025); min-width: 0; }
.dgee-item legend { padding: 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #3fb6ff; max-width: calc(100% - 120px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dgee-item legend span { color: #8d96ab; text-transform: none; letter-spacing: 0; font-weight: 600; }
.dgee-item__tools { position: absolute; top: -12px; right: 12px; display: flex; gap: 4px; }
.dgee-item__tools button { width: 28px; height: 26px; border-radius: 7px; border: 1px solid rgba(255,255,255,.12); background: #141925; color: #b7c0d3; cursor: pointer; font-size: 13px; }
.dgee-item__tools button:hover:not(:disabled) { color: #fff; border-color: #3fb6ff; }
.dgee-item__tools button:disabled { opacity: .35; cursor: default; }
.dgee-item__tools .is-danger:hover { border-color: #fb7185 !important; color: #fb7185 !important; }
.dgee-add { justify-self: start; border-style: dashed; }

@media (max-width: 640px) {
	.dgee-overlay { padding: 0; }
	.dgee-modal { max-height: 100vh; height: 100%; border-radius: 0; }
	.dgee-image { grid-template-columns: 1fr; }
	.dgee-image__preview { max-width: 260px; }
	.dgl-editing .dgee-bar { top: 8px; right: 8px; }
	.dgee-toggle { right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: no-preference) {
	.dgee-editBtn, .dgee-btn, .dgee-toggle { transition: background .15s, color .15s, border-color .15s; }
}
