.event-admin-intro { max-width:760px; color:#bfd0e6; line-height:1.6; }
.live-channel-topic-intro {
    color:#3388ff;
    font-weight:700;
    text-shadow:-1px -1px 0 #000, 0 -1px 0 #000, 1px -1px 0 #000,
                -1px 0 0 #000, 1px 0 0 #000,
                -1px 1px 0 #000, 0 1px 0 #000, 1px 1px 0 #000;
}
.channel-event-notices { padding:3px 6px; margin:0 0 2px; line-height:1.3; overflow-wrap:anywhere; }
.channel-event-notice-label { color:#0de507; }
.channel-event-info-command { padding:0 2px; border:0; background:none; color:#66b9ff; font:inherit; font-weight:bold; text-decoration:underline; text-shadow:0 1px 1px #000; cursor:pointer; }
.channel-event-info-command:focus-visible { outline:2px solid currentColor; outline-offset:2px; border-radius:2px; }
.event-admin-global { display:flex; justify-content:space-between; align-items:center; gap:18px; flex-wrap:wrap; padding:20px; margin:20px 0; border:1px solid #557763; border-radius:14px; background:linear-gradient(130deg,#1d3440,#1c2539); }
.event-admin-toggle { display:flex; align-items:center; gap:12px; cursor:pointer; }
.event-admin-toggle input[type="checkbox"] { width:21px; height:21px; margin:0; accent-color:#70b68e; }
.event-admin-toggle span { font-weight:600; }
.event-admin-status { min-height:24px; color:#e8ce88; margin:12px 0; }
.event-admin-status.is-error, .event-admin-error { color:#ffafac; }
.event-admin-plugins { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr)); gap:18px; align-items:start; }
.event-admin-card { padding:24px; border:1px solid #4d5b77; border-radius:15px; background:linear-gradient(140deg,#222e47,#172236); }
.event-admin-card-head { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.event-admin-card-head h2 { margin:0; color:#e8f2ff; }
.event-admin-card p { line-height:1.55; color:#c5d4e7; }
.event-admin-badge { border:1px solid #628471; color:#b9e1c5; border-radius:999px; padding:5px 10px; font-size:.8rem; }
.event-admin-note { font-size:.88rem; }
.event-admin-fields { display:grid; gap:16px; margin:22px 0; }
.event-admin-fields label:not(.event-admin-toggle) { display:grid; gap:7px; }
.event-admin-fields [hidden] { display:none !important; }
.event-admin-fields select, .event-admin-fields input[type="datetime-local"] { width:100%; min-width:0; box-sizing:border-box; margin:0; padding:10px; color:#e9f1fb; background:#111c2f; border:1px solid #536783; border-radius:7px; font:inherit; color-scheme:dark; }
#eventsAdminErrors { color:#ffafac; }
.event-admin-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.event-admin-actions .event-info-edit { background:#37547b; }
.event-info-dialog { width:min(720px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:24px; box-sizing:border-box; overflow:auto; color:#e9f1fb; background:#172236; border:1px solid #617899; border-radius:14px; }
.event-info-dialog::backdrop { background:rgba(4,8,18,.8); }
.event-info-dialog form { display:grid; gap:12px; }
.event-info-dialog h2 { margin:0 0 8px; }
.event-info-dialog input, .event-info-dialog textarea { width:100%; min-width:0; box-sizing:border-box; margin:0; padding:12px; color:#e9f1fb; background:#101a2b; border:1px solid #536783; border-radius:7px; font:inherit; }
.event-info-dialog textarea { min-height:180px; max-height:45dvh; resize:vertical; line-height:1.5; }
.event-info-dialog p { margin:0; color:#b9c9de; line-height:1.5; font-size:.88rem; }
#eventInfoStatus { min-height:20px; color:#ffd099; }
#popup-overlay:has(.event-info-popup) .popup-box { box-sizing:border-box; max-width:calc(100vw - 32px) !important; max-height:calc(100dvh - 32px); overflow:auto; padding:24px; }
#popup-overlay:has(.event-info-popup) #popup-title { overflow-wrap:anywhere; }
.event-info-popup-body { max-height:52dvh; overflow:auto; padding-right:8px; }
.event-info-popup-actions { display:flex; justify-content:flex-end; margin-top:18px; }
.event-info-popup-actions button { padding:10px 18px; color:#fff; background:#7545b5; border:1px solid #b88bf0; border-radius:7px; cursor:pointer; font:inherit; }
@media(max-width:760px) {
    body:has(#events-admin.active) { flex-direction:column; }
    body:has(#events-admin.active) .sidebar { width:100%; min-width:0; height:auto; max-height:180px; flex:0 0 auto; border-right:0; border-bottom:1px solid rgba(255,255,255,.12); }
    body:has(#events-admin.active) .sidebar-menu { flex:0 0 auto; flex-direction:row; overflow-x:auto; overflow-y:hidden; scrollbar-gutter:auto; }
    body:has(#events-admin.active) .nav-btn { flex:0 0 auto; white-space:nowrap; }
    body:has(#events-admin.active) .sidebar-footer .return-btn { width:auto; }
    body:has(#events-admin.active) .content { padding:16px; min-height:0; }
}

/* Der Hintergrund ist ein eigener Stapel unter Verlauf und Eingabe. */
#chat-main-area { isolation:isolate; }
#channel-event-background { position:absolute; inset:0; z-index:0; overflow:hidden; pointer-events:none; user-select:none; contain:strict; }
#channel-event-background[hidden] { display:none !important; }
#chat-main-area > #chat-log { position:relative; z-index:1; }
#chat-main-area.has-channel-event-background > #chat-log { background-image:none !important; background-color:transparent !important; }
#chat-main-area > #input-area { position:relative; z-index:2; }
.channel-event-flake { position:absolute; left:var(--flake-left); top:-20px; color:#f4faff; opacity:var(--flake-opacity); font-size:var(--flake-size); line-height:1; -webkit-text-stroke:.45px rgba(20,42,62,.85); paint-order:stroke fill; text-shadow:0 0 1px rgba(0,0,0,.95),0 1px 3px rgba(0,0,0,.85),0 0 4px rgba(215,238,255,.45); animation:channel-snowfall var(--flake-duration) linear var(--flake-delay) infinite; will-change:transform; }
/* Eine schmale Schneekante bleibt am unteren Rand des Verlaufs. */
.channel-event-snow-ground { position:absolute; left:0; right:0; bottom:0; height:18px; z-index:1; pointer-events:none; background:linear-gradient(180deg,#fff 0%,#f4f8fc 45%,#d5e3ef 100%); box-shadow:inset 0 -2px 4px rgba(76,112,143,.15); clip-path:polygon(0 40%,3% 30%,7% 34%,11% 50%,15% 44%,19% 27%,23% 24%,27% 36%,31% 48%,35% 40%,39% 22%,43% 27%,47% 43%,51% 47%,55% 30%,59% 20%,63% 26%,67% 43%,71% 46%,75% 33%,79% 25%,83% 34%,87% 48%,91% 40%,95% 28%,100% 35%,100% 100%,0 100%); }
@keyframes channel-snowfall { from { transform:translate3d(0,-20px,0) rotate(0deg); } to { transform:translate3d(var(--flake-drift),var(--snowfall-distance,1000px),0) rotate(135deg); } }
body.events-page-hidden .channel-event-flake { animation-play-state:paused; }
.chat-event-setting { margin:18px 0; padding-top:16px; border-top:1px solid #3b465f; }
.chat-event-setting label { display:flex; align-items:center; justify-content:space-between; gap:18px; cursor:pointer; }
.chat-event-setting input { width:20px; height:20px; accent-color:#70b68e; }
.chat-event-setting p { color:#afbdd2; margin:9px 0 0; font-size:.85rem; line-height:1.5; }
#sound-settings-modal > div { width:min(420px,calc(100vw - 48px)) !important; max-height:calc(100dvh - 48px); overflow-y:auto; box-sizing:border-box; }
#sound-settings-modal input[type="checkbox"] { flex-shrink:0; }
@media(max-width:600px) { .channel-event-flake:nth-child(n+17) { display:none; } .event-admin-card { padding:18px; } }
