/* ==========================================================================
   BCC Sprint Board — Design-Tokens & Komponenten
   Flächig, clean, viel Weißraum. Grün = Primär, Koralle = sparsames Highlight.
   ========================================================================== */

:root {
  --bcc-green: #71B783;  --bcc-green-d: #3E8E5A;
  --bcc-coral: #D07B68;  --bcc-coral-d: #C25E48;
  --bcc-slate: #5A6470;  --bcc-ink: #1A1A1A;
  --bcc-bg: #FFFFFF;      --bcc-surface: #F7F8FA;  --bcc-line: #D8DCE1;

  --team-green: #71B783; --team-blue: #5B8DEF; --team-purple: #8B6FC9;
  --team-slate: #5A6470; --team-coral: #D07B68;

  --radius-card: 14px;
  --radius-chip: 999px;
  --shadow-card: 0 1px 2px rgba(26,26,26,.06), 0 4px 12px rgba(26,26,26,.05);
  --shadow-pop: 0 8px 28px rgba(26,26,26,.14);
  --speed: 180ms;

  --font-sans: "Effra", "Inter", "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
  --bcc-bg: #111111; --bcc-surface: #1B1D1F; --bcc-ink: #FFFFFF; --bcc-line: #2A2E33;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bcc-bg);
  color: var(--bcc-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 700; line-height: 1.2; }
h1 { text-transform: uppercase; letter-spacing: .02em; }
a { color: var(--bcc-green-d); }

.skip-link { position: absolute; top: .5rem; left: .5rem; z-index: 1100; background: var(--bcc-ink); color: #fff; padding: .5rem .75rem; border-radius: 8px; }

/* ---------- Header ---------- */
.bcc-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--bcc-bg);
  border-bottom: 1px solid var(--bcc-line);
}
.bcc-header__inner {
  display: flex; align-items: center; gap: 1rem;
  max-width: 1400px; margin: 0 auto; padding: .65rem 1rem;
}
.bcc-brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--bcc-ink); }
.bcc-brand__text { font-size: 1.05rem; letter-spacing: .01em; }
.bcc-brand__text strong { color: var(--bcc-green-d); }
.bcc-nav { display: flex; gap: .25rem; margin-left: .5rem; }
.bcc-nav__link {
  text-decoration: none; color: var(--bcc-ink); padding: .35rem .7rem; border-radius: var(--radius-chip);
  font-weight: 600; font-size: .95rem;
}
.bcc-nav__link:hover { background: var(--bcc-surface); }
.bcc-header__actions { margin-left: auto; display: flex; align-items: center; gap: .4rem; }

.bcc-iconbtn {
  border: 1px solid var(--bcc-line); background: var(--bcc-bg); color: var(--bcc-ink);
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem;
  transition: background var(--speed), border-color var(--speed);
}
.bcc-iconbtn:hover { background: var(--bcc-surface); }

/* ---------- Buttons ---------- */
.btn-bcc {
  background: var(--bcc-green-d); color: #fff; border: none; border-radius: 10px;
  padding: .5rem 1rem; font-weight: 600;
  transition: background var(--speed), transform var(--speed);
}
.btn-bcc:hover { background: var(--bcc-green); color: #fff; }
.btn-bcc:active { transform: translateY(1px); }
.btn-bcc-outline {
  background: transparent; color: var(--bcc-green-d); border: 1px solid var(--bcc-green-d);
  border-radius: 10px; padding: .5rem 1rem; font-weight: 600;
}
.btn-bcc-outline:hover { background: var(--bcc-green-d); color: #fff; }

/* ---------- Main / Layout ---------- */
.bcc-main { max-width: 1400px; margin: 0 auto; padding: 1.25rem 1rem 4rem; }
.bcc-board-wrap { padding: 0; }

/* ---------- Empty / Scaffold-State ---------- */
.bcc-empty { text-align: center; padding: 4rem 1rem; }
.bcc-empty__lead { color: var(--bcc-slate); font-size: 1.1rem; max-width: 38rem; margin: .5rem auto 1.5rem; }
.bcc-dot-ring {
  width: 84px; height: 84px; margin: 0 auto 1.5rem; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 58%, var(--bcc-green) 59%, var(--bcc-green) 70%, transparent 71%);
  position: relative;
}
.bcc-dot-ring::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 12%, var(--bcc-coral) 0 7px, transparent 8px);
}

/* ---------- Focus-States (A11y) ---------- */
:focus-visible { outline: 3px solid var(--bcc-green); outline-offset: 2px; border-radius: 6px; }

/* ---------- Konfetti-Canvas ---------- */
.confetti-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1200;
}

/* ---------- Board-Toolbar: Tabs + Filter ---------- */
.board-toolbar {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.tabs { display: inline-flex; gap: .25rem; background: var(--bcc-surface); padding: .25rem; border-radius: var(--radius-chip); }
.tab {
  text-decoration: none; color: var(--bcc-slate); font-weight: 600; font-size: .92rem;
  padding: .4rem .9rem; border-radius: var(--radius-chip); transition: background var(--speed), color var(--speed);
}
.tab:hover { color: var(--bcc-ink); }
.tab--active { background: var(--bcc-bg); color: var(--bcc-green-d); box-shadow: var(--shadow-card); }
.board-filters { display: inline-flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.board-filters select {
  border: 1px solid var(--bcc-line); background: var(--bcc-bg); color: var(--bcc-ink);
  border-radius: 10px; padding: .4rem 2rem .4rem .7rem; font: inherit; font-size: .9rem; cursor: pointer;
}
.board-filters__reset { font-size: .85rem; color: var(--bcc-slate); }
.board-print { white-space: nowrap; text-decoration: none; }

/* Reveal-Schalter (nur Leitung): Getting Real für alle freigeben */
.reveal-switch { display: inline-flex; align-items: center; gap: .5rem; margin: 0; }
.reveal-switch__label { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; user-select: none; }
.reveal-switch__input { position: absolute; opacity: 0; width: 0; height: 0; }
.reveal-switch__track {
  position: relative; flex: none; width: 2.6rem; height: 1.4rem; border-radius: 999px;
  background: var(--bcc-line); transition: background var(--speed);
}
.reveal-switch__track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 1.1rem; height: 1.1rem;
  border-radius: 50%; background: var(--bcc-bg); box-shadow: var(--shadow-card);
  transition: transform var(--speed);
}
.reveal-switch__input:checked + .reveal-switch__track { background: var(--bcc-coral-d); }
.reveal-switch__input:checked + .reveal-switch__track::after { transform: translateX(1.2rem); }
.reveal-switch__input:focus-visible + .reveal-switch__track { outline: 3px solid var(--bcc-green); outline-offset: 2px; }
.reveal-switch__text { font-weight: 600; font-size: .9rem; color: var(--bcc-slate); white-space: nowrap; }
.reveal-switch__input:checked ~ .reveal-switch__text { color: var(--bcc-coral-d); }

/* Druck-Dialog */
.print-modal { background: var(--bcc-bg); color: var(--bcc-ink); border: none; border-radius: var(--radius-card); }
.print-modal .modal-header, .print-modal .modal-footer { border-color: var(--bcc-line); }
.print-group { border: none; margin: 0 0 1.25rem; padding: 0; }
.print-group legend { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bcc-slate); font-weight: 700; margin-bottom: .5rem; float: none; }
.print-opt {
  display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; margin-bottom: .4rem;
  border: 1px solid var(--bcc-line); border-radius: 10px; cursor: pointer; transition: border-color var(--speed), background var(--speed);
}
.print-opt:hover { border-color: var(--bcc-green); }
.print-opt:has(input:checked) { border-color: var(--bcc-green-d); background: var(--bcc-surface); }
.print-opt input { accent-color: var(--bcc-green-d); width: 1.05rem; height: 1.05rem; flex: none; }
.print-opt small { color: var(--bcc-slate); font-weight: 400; }

/* ---------- Board: Spalten ---------- */
.board {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr);
  gap: 1rem; align-items: start; overflow-x: auto; padding-bottom: 1rem;
}
.board-col { background: var(--bcc-surface); border-radius: var(--radius-card); padding: .75rem; min-height: 120px; }
.board-col__head { display: flex; align-items: center; gap: .5rem; padding: .25rem .35rem .75rem; }
.board-col__title { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin: 0; color: var(--bcc-slate); }
.board-col__count {
  margin-left: auto; background: var(--bcc-bg); border: 1px solid var(--bcc-line);
  border-radius: var(--radius-chip); font-size: .78rem; font-weight: 700; padding: .05rem .5rem; color: var(--bcc-slate);
}
.board-col__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bcc-line); }
.board-col__dot--pool { background: var(--bcc-slate); }
.board-col__dot--todo { background: var(--team-blue); }
.board-col__dot--in_progress { background: var(--bcc-green); }
.board-col__dot--review { background: var(--team-purple); }
.board-col__dot--done { background: var(--bcc-green-d); }
.board-col__body { display: flex; flex-direction: column; gap: .65rem; min-height: 40px; }
.board-col__empty { color: var(--bcc-slate); font-size: .85rem; text-align: center; padding: 1rem .5rem; opacity: .7; }

/* ---------- Story-Karte ---------- */
.card-story {
  background: var(--bcc-bg); border: 1px solid var(--bcc-line); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: .85rem .9rem; transition: transform var(--speed), box-shadow var(--speed);
}
.card-story:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.card-story__link { text-decoration: none; color: inherit; display: block; }
.card-story__type {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--bcc-slate);
}
.card-story__type.type-fun { color: var(--bcc-coral-d); }
.card-story__title { font-size: 1.02rem; margin: .15rem 0 .2rem; line-height: 1.25; }
.card-story__summary { font-size: .88rem; color: var(--bcc-slate); margin: 0; line-height: 1.45; }
.card-story__foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .8rem; }

/* ---------- Chip (Focus · Size) ---------- */
.chip {
  display: inline-flex; align-items: baseline; gap: .3rem; color: #fff; border-radius: var(--radius-chip);
  padding: .25rem .6rem; font-size: .76rem; font-weight: 600; line-height: 1;
}
.chip--green { background: var(--bcc-green-d); }
.chip--coral { background: var(--bcc-coral-d); }
.chip--slate { background: var(--bcc-slate); }
.chip__size { font-weight: 800; font-size: .82rem; }

/* ---------- Avatare ---------- */
.avatar {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  background: var(--avatar-color, var(--bcc-slate)); color: #fff; border-radius: 50%;
  font-weight: 700; line-height: 1; flex: none; border: 2px solid var(--bcc-bg);
}
.avatar--sm { width: 28px; height: 28px; font-size: .68rem; }
.avatar--md { width: 38px; height: 38px; font-size: .85rem; }
.avatar--lg { width: 52px; height: 52px; font-size: 1.05rem; }
.avatar--more { background: var(--bcc-slate); }
.avatar--sparring { box-shadow: 0 0 0 2px var(--bcc-coral); }
.avatar__badge {
  position: absolute; top: -4px; right: -4px; background: var(--bcc-coral); color: #fff;
  border-radius: 50%; width: 15px; height: 15px; font-size: .6rem; display: flex; align-items: center; justify-content: center;
}
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar + .avatar { margin-left: -10px; }

/* ---------- Karten-Aktionen (Commit) ---------- */
.card-story__actions { display: flex; align-items: center; gap: .5rem; margin-top: .7rem; }
.card-story__role { font-size: .75rem; color: var(--bcc-green-d); font-weight: 700; }
.card-story__actions form { margin: 0; margin-left: auto; }
.btn-commit {
  border: 1px solid var(--bcc-green-d); background: var(--bcc-green-d); color: #fff;
  border-radius: 9px; padding: .35rem .8rem; font-size: .82rem; font-weight: 700; cursor: pointer;
  transition: background var(--speed), transform var(--speed);
}
.btn-commit:hover { background: var(--bcc-green); }
.btn-commit:active { transform: translateY(1px); }
.btn-commit--off { background: transparent; color: var(--bcc-slate); border-color: var(--bcc-line); }
.btn-commit--off:hover { background: var(--bcc-surface); color: var(--bcc-coral-d); border-color: var(--bcc-coral); }
.btn-commit--ghost { background: transparent; color: var(--bcc-green-d); margin-left: auto; }

/* ---------- Identität: Header ---------- */
.identity-current { display: inline-flex; align-items: center; gap: .5rem; }
.identity-current__name { font-weight: 600; font-size: .92rem; }
.identity-current__switch {
  border: none; background: none; color: var(--bcc-slate); font-size: .8rem; cursor: pointer; text-decoration: underline;
}
.identity-current__switch:hover { color: var(--bcc-ink); }

/* ---------- Identität: Modal ---------- */
.identity-modal { border: none; border-radius: var(--radius-card); background: var(--bcc-bg); color: var(--bcc-ink); }
.identity-modal .modal-header, .identity-modal .modal-footer { border-color: var(--bcc-line); }
.identity-search {
  width: 100%; border: 1px solid var(--bcc-line); border-radius: 10px; padding: .6rem .9rem;
  font: inherit; margin-bottom: 1rem; background: var(--bcc-surface); color: var(--bcc-ink);
}
.identity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.identity-option {
  display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center;
  border: 1px solid var(--bcc-line); border-radius: var(--radius-card); background: var(--bcc-bg);
  padding: .85rem .5rem; cursor: pointer; transition: border-color var(--speed), box-shadow var(--speed), transform var(--speed);
}
.identity-option:hover { border-color: var(--bcc-green); box-shadow: var(--shadow-card); transform: translateY(-2px); }
.identity-option__name { font-weight: 700; font-size: .9rem; }
.identity-option__meta { font-size: .74rem; color: var(--bcc-slate); }
.identity-empty { text-align: center; color: var(--bcc-slate); padding: 1.5rem; }

/* ---------- Story-Detail ---------- */
.story-page { max-width: 760px; margin: 0 auto; }
.story-page__back a { color: var(--bcc-slate); text-decoration: none; font-size: .9rem; }
.story-page__back a:hover { color: var(--bcc-ink); }
.story-detail__type { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--bcc-slate); margin: 0 0 .25rem; }
.story-detail__type.type-fun { color: var(--bcc-coral-d); }
.story-detail__title { font-size: 2rem; margin: 0 0 .4rem; }
.story-detail__title.accent-green { color: var(--bcc-green-d); }
.story-detail__title.accent-coral { color: var(--bcc-coral-d); }
.story-detail__summary { font-size: 1.12rem; color: var(--bcc-slate); margin: 0 0 1rem; }
.story-detail__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 1.5rem; }
.meta-pill { border: 1px solid var(--bcc-line); border-radius: var(--radius-chip); padding: .25rem .7rem; font-size: .82rem; color: var(--bcc-slate); }

.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.5rem; }
.tag-chip {
  background: var(--bcc-surface); color: var(--bcc-slate); border: 1px solid var(--bcc-line);
  border-radius: var(--radius-chip); padding: .2rem .65rem; font-size: .78rem; font-weight: 600;
}

.story-block { padding: 1.25rem 0; border-top: 1px solid var(--bcc-line); }
.story-block__h { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bcc-slate); margin: 0 0 .75rem; }
.muted { color: var(--bcc-slate); }

.committer-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.committer-list__item { display: flex; align-items: center; gap: .5rem; }
.committer-list__team { margin-left: auto; font-size: .8rem; color: var(--bcc-slate); }
.lead-badge { background: var(--bcc-green-d); color: #fff; border-radius: var(--radius-chip); font-size: .68rem; font-weight: 700; padding: .1rem .5rem; }
.story-detail__actions { margin-top: 1rem; }

.story-desc { white-space: normal; line-height: 1.65; }
.inline-edit { margin-top: .85rem; }
.inline-edit summary { cursor: pointer; color: var(--bcc-green-d); font-size: .88rem; font-weight: 600; }
.inline-edit__area, .inline-edit__input {
  display: block; width: 100%; margin: .6rem 0; border: 1px solid var(--bcc-line); border-radius: 10px;
  padding: .6rem .8rem; font: inherit; background: var(--bcc-surface); color: var(--bcc-ink);
}

.qr-box { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; margin-top: 1rem; }
.qr-box__img { background: #fff; border: 1px solid var(--bcc-line); border-radius: 12px; padding: 8px; }
.qr-box__links { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.qr-box__links code { font-size: .8rem; word-break: break-all; }

/* Story-Modal (Detail im Overlay) */
.story-modal .modal-content { background: var(--bcc-bg); color: var(--bcc-ink); border: none; border-radius: var(--radius-card); }
#storyModalBody .story-block:first-of-type { border-top: none; }

/* ---------- Leaderboard ---------- */
.leaderboard { max-width: 960px; margin: 0 auto; }
.leaderboard__head h1 { margin-bottom: .15rem; }
.lb-overall { display: flex; align-items: center; gap: 1.25rem; margin: 1.5rem 0; }
.lb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.lb-card { background: var(--bcc-surface); border-radius: var(--radius-card); padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.lb-card__h { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bcc-slate); margin: 0 0 .9rem; }

/* Fortschritts-Ring (CD-Motiv) */
.progress-ring {
  --pct: 0; --size: 96px; width: var(--size); height: var(--size); border-radius: 50%;
  background: conic-gradient(var(--bcc-green) calc(var(--pct) * 1%), var(--bcc-line) 0);
  display: grid; place-items: center; flex: none; position: relative;
}
.progress-ring::after { content: ""; position: absolute; width: calc(var(--size) - 22px); height: calc(var(--size) - 22px); border-radius: 50%; background: var(--bcc-bg); }
.progress-ring__label { position: relative; z-index: 1; font-weight: 800; font-size: .9rem; }

.team-list, .person-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.team-list__item, .person-list__item { display: flex; align-items: center; gap: .6rem; }
.team-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.team-list__name, .person-list__name { font-weight: 600; }
.team-list__points, .person-list__points { margin-left: auto; font-weight: 800; }
.team-list__points small, .person-list__points small { color: var(--bcc-slate); font-weight: 600; }
.team-ring { width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(var(--bcc-green-d) calc(var(--pct) * 1%), var(--bcc-line) 0); flex: none; }
.person-list__rank { width: 1.5rem; text-align: center; font-weight: 800; color: var(--bcc-slate); }
.person-list__badges { display: inline-flex; gap: .15rem; margin-left: .25rem; }
.badge-chip { font-size: 1rem; }

.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.feed__item { display: flex; align-items: center; gap: .55rem; font-size: .92rem; }
.feed__text { flex: 1; }
.feed__time { color: var(--bcc-slate); font-size: .74rem; white-space: nowrap; }

/* ---------- Drag & Drop / Live-Refresh ---------- */
.card-story { cursor: grab; }
.card-story:active { cursor: grabbing; }
.card-story--ghost { opacity: .4; }
.card-story__move { margin: 0 0 .15rem; }
.card-story__move select {
  border: 1px solid var(--bcc-line); background: var(--bcc-bg); color: var(--bcc-slate);
  border-radius: 8px; padding: .2rem .5rem; font-size: .76rem; cursor: pointer; max-width: 100%;
}
@keyframes pulse-anim {
  0% { box-shadow: 0 0 0 0 rgba(113,183,131,.55); }
  100% { box-shadow: 0 0 0 14px rgba(113,183,131,0); }
}
.pulse { animation: pulse-anim 600ms ease-out; }
.board--updated { animation: board-flash 700ms ease-out; }
@keyframes board-flash { 0% { background: rgba(113,183,131,.10); } 100% { background: transparent; } }

/* ==========================================================================
   Responsive — mobile-first Anpassungen
   ========================================================================== */

/* Bilder/SVG nie über ihre Spalte hinaus. */
img, svg { max-width: 100%; }

/* Tablet & schmaler Desktop: Board-Spalten stapeln, Leaderboard einspaltig. */
@media (max-width: 860px) {
  .board { grid-auto-flow: row; grid-auto-columns: auto; }
  .lb-grid { grid-template-columns: 1fr; }
}

/* Phone. */
@media (max-width: 600px) {
  body { font-size: 15px; }
  .bcc-main { padding: 1rem .75rem 3rem; }

  /* Header kompakt: Marke + Nav + Aktionen bleiben in einer Zeile. */
  .bcc-header__inner { gap: .4rem; padding: .55rem .75rem; flex-wrap: wrap; }
  .bcc-brand__logo { width: 26px; height: 26px; }
  .bcc-brand__text { font-size: .92rem; }
  .bcc-nav { margin-left: 0; }
  .bcc-nav__link { padding: .3rem .55rem; font-size: .88rem; }
  .bcc-iconbtn { width: 36px; height: 36px; }
  .identity-current__name { display: none; }      /* nur Avatar + „wechseln" */
  .identity-current { gap: .35rem; }

  /* Toolbar gestapelt; Tabs als horizontale Scroll-Leiste. */
  .board-toolbar { flex-direction: column; align-items: stretch; gap: .6rem; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tab { white-space: nowrap; }
  .board-filters { width: 100%; }
  .board-filters__field { flex: 1 1 0; min-width: 0; }
  .board-filters select { width: 100%; }
  .board-print { width: 100%; text-align: center; }

  .board { gap: .75rem; }
  .board-col { padding: .65rem; }

  /* Detailseite: Titel etwas kleiner, QR zentriert. */
  .story-page__back { margin-top: .25rem; }
  .story-detail__title { font-size: 1.55rem; }
  .story-detail__summary { font-size: 1rem; }
  .qr-box { justify-content: center; }
  .qr-box__links { align-items: center; text-align: center; }

  /* Leaderboard: Ring über Text, Feed-Zeit umbrechen. */
  .lb-overall { flex-direction: column; text-align: center; gap: .75rem; }
  .feed__item { flex-wrap: wrap; }
  .feed__time { width: 100%; margin-left: 2.1rem; }

  /* Modale dürfen nie horizontal überlaufen. */
  .modal-dialog { margin: .5rem auto; max-width: calc(100vw - 1rem); width: auto; }
  .identity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .identity-option { padding: .65rem .4rem; }
  .identity-option__name { font-size: .85rem; }
}

/* Sehr schmal: Marke aufs Logo reduzieren, damit die Zeile passt. */
@media (max-width: 360px) {
  .bcc-brand__text { display: none; }
}

/* ---------- Easter-Egg: Matrix-Rain (Konami) ---------- */
.matrix-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2000;
  background: rgba(0,0,0,.92); pointer-events: none; opacity: 0; transition: opacity 300ms;
}
.matrix-canvas.is-active { opacity: 1; }

/* ---------- A11y: Motion-Reduktion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .matrix-canvas { display: none; }
}

/* ---------- Utility ---------- */
.visually-hidden, .visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
