/* Gezeichneter Comic-Look für die öffentlichen Seiten (nicht Editor/Mail): Punktraster, Marker-Striche, gekritzelte
   Häkchen und Pfeile. Kartenränder/Schatten stehen in components.css, der Wackel-Filter in js/ink.js. */

/* Comic-Punktraster (Ben-Day) ganz leicht im Hintergrund */
body {
  background-image: radial-gradient(rgba(240, 240, 245, 0.07) 1.1px, transparent 1.5px);
  background-size: 16px 16px;
}

/* Marker-Strich unter Seiten- und Abschnittstiteln */
.page-head h1, .section-head h2 {
  padding-bottom: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 16'%3E%3Cpath d='M3 10 C 40 4 75 14 110 8 S 170 4 197 9' fill='none' stroke='%23f5d246' stroke-width='4.5' stroke-linecap='round'/%3E%3Cpath d='M34 14 C 75 11 120 14 162 12' fill='none' stroke='%23f5d246' stroke-width='2.4' stroke-linecap='round' opacity='.65'/%3E%3C/svg%3E")
    no-repeat 2px 100% / min(210px, 70%) 16px;
}

/* Gekritzeltes Sternchen hinter den Titeln, abwechselnd gedreht */
.page-head h1::after, .section-head h2::after {
  content: ''; display: inline-block; width: 0.55em; height: 0.55em; margin-left: 0.25em; vertical-align: 0.85em; transform: rotate(-12deg);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5 L13.4 9.6 L21 8.2 L14.6 12.6 L19.6 20 L12.4 15.2 L6.2 21.4 L8.6 13.6 L2.6 9.8 L10.2 9.4 Z' fill='none' stroke='%23f5d246' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M22 3 l-2 2.2 M2.5 18.5 l2.4 -1' stroke='%23f5d246' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat center / contain;
}
.block:nth-of-type(even) .section-head h2::after { transform: rotate(14deg) scale(0.85); }

/* Navigation: gekritzelte Welle statt glattem Balken (nur Desktop; mobil bleibt der Seitenbalken) */
@media (min-width: 901px) {
  .nav-link::after {
    height: 8px; bottom: 0; transform: scaleX(0); transform-origin: left;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5 Q 10 1 18 5 T 34 5 T 50 5 T 58 4' fill='none' stroke='%23f5d246' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E")
      no-repeat center / 100% 100%;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .nav-link:hover::after { transform: scaleX(0.55); }
  .nav-link[aria-current='page']::after, .nav-group.is-current .nav-group-toggle::after { transform: scaleX(1); }
  .nav-menu { border: 0; box-shadow: 6px 6px 0 #000; }
  .nav-menu::after {
    content: ''; position: absolute; inset: 0; border: 2px solid var(--line-2); border-radius: inherit; filter: url(#ink-wobble); pointer-events: none; z-index: 2;
  }
}

/* Häkchen in Listen: von Hand gezogen */
.checks li::before {
  top: 0.25em; width: 20px; height: 16px; border: 0; transform: rotate(-4deg);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 16'%3E%3Cpath d='M2 9 L7 14 C 10 8 14 4 19 1.5' fill='none' stroke='%23f5d246' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat center / contain;
}

/* „Alle Clips →“ usw.: gekritzelter Pfeil, der beim Überfahren nach rechts zuckt */
.section-head .more { display: inline-flex; align-items: center; gap: 8px; }
.section-head .more::after {
  content: ''; width: 26px; height: 14px; transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 14'%3E%3Cpath d='M2 8 C 8 6 15 7.5 22 7 M15.5 2 C 18.5 4 21 6 23 7 C 20.5 8.5 18 10.5 16 12.5' fill='none' stroke='%23f5d246' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat center / contain;
}
.section-head .more:hover::after { transform: translateX(5px) rotate(-4deg); }

/* Knöpfe: Tusche-Kante unten, beim Drücken eingedrückt (die schräge Form bleibt, sie gehört zur Marke) */
.btn { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.38); }
.btn:active { box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.38); }

/* Eingabefelder wie gezeichnete Kästen */
.input, .search, select.search, textarea.input { border-width: 2px; border-radius: 6px; box-shadow: 3px 3px 0 #000; }
.tabs select.search { box-shadow: none; }

/* Gekritzelter Parallax-Hintergrund (js/doodles.js) */
.doodle-sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.doodle-layer {
  position: absolute; left: 0; top: 0; width: 100%; height: calc(100% + 1440px); /* + eine Kachel (TILE_HEIGHT in doodles.js) */
  background-repeat: repeat-y; background-position: 0 0; will-change: transform;
}


/* Header als Comic-Panel: deckend mit Punktraster, gezeichnete Unterkante in Rot/Gelb/Blau, harter Schatten */
.site-header {
  background: radial-gradient(rgba(240, 240, 245, 0.06) 1.1px, transparent 1.5px) 0 0 / 16px 16px, var(--panel);
  backdrop-filter: none; border-bottom: 0; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.55);
}
.site-header::after {
  bottom: -3px; height: 4px; opacity: 1; border-radius: 2px; filter: url(#ink-wobble);
  background: linear-gradient(90deg, var(--red) 0 calc(50% - 8px), var(--bolt) calc(50% - 8px) calc(50% + 8px), var(--blue) calc(50% + 8px));
}
.brand img { filter: drop-shadow(2px 2px 0 #000); }
.brand:hover img { transform: rotate(-10deg) scale(1.08); }

/* Footer als Arena-Bühne: gekritzelte Oberkante, auf der zwei Figuren sitzen (js/footer-crew.js), großes Wortlogo,
   Links als Sticker in einer Reihe, Rechtliches klein darunter. */
.site-footer { margin-top: 90px; background: radial-gradient(rgba(240, 240, 245, 0.05) 1.1px, transparent 1.5px) 0 0 / 16px 16px, var(--bg-2); }
.site-footer::before {
  top: -6px; height: 12px; border: 0; filter: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 12' preserveAspectRatio='none'%3E%3Cpath d='M0 6 C 40 3 70 9 110 6 S 180 2 230 7 S 320 9 360 5 S 390 6 400 6' fill='none' stroke='%23323b55' stroke-width='3.5' stroke-linecap='round'/%3E%3Cpath d='M20 9 C 80 7 140 10 200 8 S 330 7 390 9' fill='none' stroke='%23323b55' stroke-width='1.6' stroke-linecap='round' opacity='.7'/%3E%3C/svg%3E")
    repeat-x 0 0 / 400px 12px;
}
.footer-ground { position: absolute; left: 0; right: 0; top: 0; height: 0; z-index: 1; pointer-events: none; }
.footer-spot { position: absolute; translate: -50% 0; }
.footer-spot .fighter-svg { display: block; overflow: visible; filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.6)); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; padding-top: 64px; padding-bottom: 24px; text-align: center; }
.footer-brand { display: grid; justify-items: center; gap: 8px; }
.footer-brand img, .footer-brand strong { display: none; }
.footer-brand::before {
  content: ''; display: block; width: min(420px, 78vw); aspect-ratio: 1060 / 270;
  background: url('/img/bonknetic-wordmark.svg') center / contain no-repeat; filter: drop-shadow(4px 4px 0 #000);
}
.footer-brand span { color: var(--muted); font-size: 0.92rem; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; max-width: 760px; }
.footer-nav h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.footer-nav a {
  padding: 7px 13px; border-radius: 4px; background: var(--panel-2); color: var(--bone); font-weight: 700; font-size: 0.9rem;
  box-shadow: 0 0 0 2px #06080c, 3px 3px 0 2px #06080c; transition: background 0.15s, color 0.15s;
}
.footer-nav a:nth-of-type(odd) { rotate: -1.5deg; }
.footer-nav a:nth-of-type(even) { rotate: 1.2deg; }
.footer-nav a:hover { background: var(--bolt); color: #15120a; }
.footer-nav + .footer-nav { gap: 4px 18px; margin-top: -4px; }
.footer-nav + .footer-nav a { padding: 2px 0; background: none; box-shadow: none; rotate: none; color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.footer-nav + .footer-nav a:hover { background: none; color: var(--bolt); }
.footer-bottom { background: none; padding-top: 4px; text-align: center; }
@media (max-width: 720px) {
  .site-footer { margin-top: 80px; }
  .footer-inner { padding-top: 70px; }
}

/* Hero der Startseite: Comic-Strahlen (rot gegen blau) und Punktraster statt weicher Leuchten, abgerissene Unterkante */
.hero {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), 93% calc(100% - 14px), 86% calc(100% - 30px), 78% calc(100% - 10px),
    69% calc(100% - 24px), 60% calc(100% - 6px), 51% calc(100% - 22px), 42% calc(100% - 8px), 33% calc(100% - 28px),
    24% calc(100% - 12px), 15% calc(100% - 26px), 7% calc(100% - 6px), 0 calc(100% - 20px));
}
.hero::before {
  background:
    repeating-conic-gradient(from 0deg at 50% 42%, rgba(240, 240, 245, 0.014) 0 5deg, transparent 5deg 18deg),
    linear-gradient(90deg, rgba(235, 70, 70, 0.16), transparent 32% 68%, rgba(70, 150, 255, 0.16));
  mask-image: radial-gradient(90% 80% at 50% 42%, #000 25%, transparent 85%);
}
.hero::after {
  background: radial-gradient(rgba(240, 240, 245, 0.06) 1.2px, transparent 1.7px) 0 0 / 16px 16px;
  mask-image: radial-gradient(75% 65% at 50% 42%, transparent 45%, #000 100%);
}
.hero-logo { filter: drop-shadow(5px 5px 0 #000); }
.hero-tagline {
  display: table; margin-inline: auto; padding: 8px 18px 6px 22px; color: #15120a; rotate: -2deg;
  background: color-mix(in srgb, var(--bolt) 90%, transparent);
  clip-path: polygon(0 10%, 3% 0, 7% 12%, 12% 2%, 100% 0, 98% 50%, 100% 100%, 94% 90%, 89% 100%, 0 100%, 2% 50%);
}
.hero-fighter .fighter-svg { overflow: visible; filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.65)); animation: none; }
.hero-fighter::after { bottom: 34px; width: 120px; height: 12px; background: rgba(0, 0, 0, 0.55); }

/* Bausteine in Karten (Clips/Maps/Tracks, Detailseiten): Sticker-Knöpfe, Sticker-Chips, gezeichneter Abspieler */
.media-actions .btn, .clip-actions .btn {
  clip-path: none; border-radius: 5px; background: var(--panel-3);
  box-shadow: 0 0 0 2px #06080c, 3px 3px 0 2px #06080c; transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.media-actions .btn:nth-child(odd), .clip-actions .btn:nth-child(odd) { rotate: -1.5deg; }
.media-actions .btn:nth-child(even), .clip-actions .btn:nth-child(even) { rotate: 1.2deg; }
.media-actions .btn:hover, .clip-actions .btn:hover { transform: none; background: var(--bolt); color: #15120a; }
.media-actions .btn:active, .clip-actions .btn:active { box-shadow: 0 0 0 2px #06080c, 1px 1px 0 2px #06080c; }
.media-actions .like.liked, .clip-actions .like.liked, .clip-actions .like-big.liked { background: var(--red); color: #fff; }
.media-actions .like.liked:hover, .clip-actions .like.liked:hover, .clip-actions .like-big.liked:hover { background: #ff5f5f; color: #fff; }
.clip-actions .btn-primary { background: var(--bolt); }
.track-facts span, .track-chips .chip, .media-thumb .chip {
  border: 0; border-radius: 4px; box-shadow: 0 0 0 2px #06080c, 2px 2px 0 2px #06080c;
}
.track-facts span { background: var(--panel-3); color: var(--bone); }
.track-facts span:nth-child(odd), .track-chips .chip { rotate: -1.5deg; }
.track-facts span:nth-child(even) { rotate: 1.5deg; }
.media-thumb .chip { rotate: -2deg; }
.track-head { border-bottom: 2px solid var(--line-2); }
.map-music { border: 2px solid var(--line-2); border-radius: 6px; box-shadow: 3px 3px 0 #000; background: var(--panel); }
.play-btn { box-shadow: 0 0 0 2.5px #06080c, 3px 3px 0 2.5px #06080c; }
.play-btn:hover { transform: none; background: #ffe168; box-shadow: 0 0 0 2.5px #06080c, 4px 4px 0 2.5px #06080c; }
.play-btn:active { box-shadow: 0 0 0 2.5px #06080c, 1px 1px 0 2.5px #06080c; }
.wave rect { rx: 1.5px; }

/* Hover auch für Karten ohne Link (Power-ups, „Was dich erwartet“, Modi & Wetter) – wie .card-hover über top/left */
.power, .bento-card, .list-card { top: 0; left: 0; transition: top 0.2s ease-out, left 0.2s ease-out, box-shadow 0.2s ease-out; }
.power:hover, .bento-card:hover, .list-card:hover { top: -3px; left: -3px; box-shadow: 7px 7px 0 #000; }
.power:hover::after, .bento-card:hover::after, .list-card:hover::after { border-color: color-mix(in srgb, var(--bone) 55%, var(--line-2)); }
.power img { transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.power:hover img { transform: translateY(-6px) rotate(-8deg) scale(1.08); }

/* Karten mit Abspieler (Map mit Musik, Track): mehr Luft */
.media-card .media-body { padding: 16px 18px 18px; gap: 12px; }
.map-music { gap: 12px; padding: 12px 14px 14px; margin: 2px 0 4px; }
.map-music .play-btn { width: 40px; height: 40px; }
.media-foot { padding-top: 8px; gap: 12px; }
.media-actions { gap: 12px; }
.bento-card:hover { transform: none; }

/* Kommentare als Comic-Panels */
.comment { position: relative; border: 0; background: var(--panel-2); border-radius: 8px; box-shadow: 4px 4px 0 #000; }
.comment::after {
  content: ''; position: absolute; inset: 0; border: 2px solid var(--line-2); border-radius: inherit; filter: url(#ink-wobble); pointer-events: none;
}
.comment > .avatar, .comment > a > .avatar { box-shadow: 0 0 0 2px #06080c, 2px 2px 0 2px #06080c; }
.comment.reply { background: var(--panel-3); box-shadow: 3px 3px 0 #000; border-left: 0; }
.comment.reply::before {
  content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 2px; background: var(--bolt);
  filter: url(#ink-wobble);
}
.reply-list { gap: 12px; padding-left: 18px; }
.comment:target::after { border-color: var(--bolt); }
.comment-like {
  border: 0; border-radius: 4px; padding: 4px 9px; background: var(--panel-3); color: var(--bone);
  box-shadow: 0 0 0 2px #06080c, 2px 2px 0 2px #06080c; rotate: -2deg;
}
button.comment-like:hover { background: var(--red); color: #fff; }
.comment-like.liked { background: var(--red); color: #fff; }
.comment-actions { gap: 16px; margin-top: 10px; }

/* Kopf-Knöpfe (Glocke, Profil, Sprache) als Sticker; Dropdowns als Comic-Panels */
.bell, .user-button, .lang-button {
  border: 0; background: var(--panel-2); box-shadow: 0 0 0 2px #06080c, 3px 3px 0 2px #06080c, inset 0 0 0 1.5px var(--line-2);
  transition: background 0.15s, box-shadow 0.15s;
}
.bell:hover, .bell[aria-expanded='true'], .user-button:hover, .user-button[aria-expanded='true'],
.lang-button:hover, .lang-button[aria-expanded='true'], .lang-button:focus-visible {
  background: var(--panel-3); box-shadow: 0 0 0 2px #06080c, 3px 3px 0 2px #06080c, inset 0 0 0 1.5px var(--bolt);
}
.bell:active, .user-button:active, .lang-button:active { box-shadow: 0 0 0 2px #06080c, 1px 1px 0 2px #06080c, inset 0 0 0 1.5px var(--bolt); }
.bell-count { box-shadow: 0 0 0 2px #06080c; rotate: 8deg; }
.user-button .avatar { box-shadow: 0 0 0 2px #06080c; }
.user-menu, .notice-panel, .lang-list { border: 0; box-shadow: 6px 6px 0 #000; }
.user-menu::after, .notice-panel::after, .lang-list::after {
  content: ''; position: absolute; inset: 0; border: 2px solid var(--line-2); border-radius: inherit; filter: url(#ink-wobble); pointer-events: none; z-index: 2;
}
.menu-card { border: 0; box-shadow: 0 0 0 2px #06080c, 3px 3px 0 2px #06080c; }
.menu-card::before { height: 4px; opacity: 1; filter: url(#ink-wobble); }
.avatar-menu { box-shadow: 0 0 0 2px #06080c, 3px 3px 0 2px #06080c; }
.user-menu .menu-profile { box-shadow: 0 0 0 2px #06080c; }
.user-menu .menu-tile { box-shadow: 0 0 0 2px #06080c, 2px 2px 0 2px #06080c; }
.user-menu .menu-tile:nth-child(1) { rotate: -1.2deg; }
.user-menu .menu-tile:nth-child(3) { rotate: 1.2deg; }
.menu-ico { box-shadow: 0 0 0 1.5px #06080c; }
.menu-group-title, .notice-day { color: var(--bolt); }
.notice-head strong { rotate: -1deg; }
.notice-tab::after {
  height: 7px; bottom: 3px; border-radius: 0; transform-origin: left;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5 Q 10 1 18 5 T 34 5 T 50 5 T 58 4' fill='none' stroke='%23f5d246' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat center / 100% 100%;
}
.notice-tab-count { box-shadow: 0 0 0 2px #06080c; rotate: -6deg; }
.notice-who .avatar { box-shadow: 0 0 0 2px #06080c; }
.notice-quote { border: 0; box-shadow: 0 0 0 2px #06080c, 2px 2px 0 2px #06080c; }
.notice-empty-icon { box-shadow: 0 0 0 2px #06080c, 3px 3px 0 2px #06080c; rotate: -6deg; }
.notice-foot { border-top: 2px solid var(--line-2); }

/* Benutzermenü: mehr Luft, seit Kacheln und Symbole Tusche-Ränder und Schatten haben */
.user-menu { width: 330px; padding: 12px; gap: 10px; }
.menu-card { padding: 16px 14px 14px; gap: 12px; }
.menu-group { gap: 8px; padding-top: 10px; }
.menu-group-title { padding: 2px 4px 4px; }
.user-menu .menu-row { padding: 7px 10px 7px 6px; }
.menu-tiles { gap: 12px; padding: 4px 4px 6px; }
.user-menu .menu-tile { padding: 14px 4px 12px; }
.menu-tools { gap: 6px 10px; }
.menu-foot { padding-top: 10px; }
.notice-tab { padding-bottom: 14px; }

/* Toasts: Benachrichtigungs-Popup (unten links) und Status-Meldungen (unten mittig) als Comic-Panels */
.notice-popup {
  border: 0; border-radius: 8px; padding: 14px 16px 16px 14px; gap: 14px; overflow: hidden;
  box-shadow: 6px 6px 0 #000; transform: translateY(30px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
}
.notice-popup.show { transform: none; }
.notice-popup::after {
  content: ''; position: absolute; inset: 0; border: 2.5px solid color-mix(in srgb, var(--bone) 55%, var(--line-2)); border-radius: inherit;
  filter: url(#ink-wobble); pointer-events: none;
}
.notice-popup:hover { color: var(--bone); background: var(--panel-3); }
.notice-popup .notice-who .avatar { width: 38px; height: 38px; }
.notice-popup-timer {
  position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--bolt); transform-origin: left;
  animation: notice-timer linear forwards;
}
.notice-popup:hover .notice-popup-timer { animation-play-state: paused; }
@keyframes notice-timer { to { transform: scaleX(0); } }
.toast {
  border-radius: 6px; padding: 12px 20px; background: var(--bolt); color: #15120a; box-shadow: 0 0 0 2.5px #06080c, 5px 5px 0 2.5px #06080c;
  transform: translate(-50%, 24px) scale(0.95); transition: opacity 0.2s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast.show { transform: translate(-50%, 0); }
.toast.err { background: var(--red); color: #fff; }
