/* Ziegel gleich gross wie auf der Startseite (gleiche Formel wie in home.css) */
body {
  --fw: min(calc((100vw - 20px) / 2.2), 900px);
  --u: calc(var(--fw) / 1912);
  --brick-w: calc(var(--u) * 35);
  --brick-h: calc(var(--u) * 16.4);
  --cap: calc(var(--u) * 18);
}
@media (max-width: 760px) {
  body { --fw: calc(100vw - 36px); }
}

.hero .sub { margin-top: 18px; }

.plate {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
  padding: 9px 18px;
  font-family: var(--px);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--brown);
  background: var(--panel);
  border: 3px solid #35313f;
  box-shadow: 0 4px 0 var(--shadow);
}

/* Hinweis oben: nur fuer Mitglieder */
.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  padding: 12px 16px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--cream);
  background: #221a12;
  border: 2px solid var(--edge);
}
.notice .tag { flex: none; }
.notice a { color: var(--gold); font-weight: 700; }
@media (max-width: 560px) {
  .notice { flex-direction: column; align-items: flex-start; gap: 8px; }
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}

.event {
  display: flex;
  flex-direction: column;
  transition: transform 90ms steps(3), box-shadow 90ms steps(3);
}
.event:hover {
  transform: translateY(-4px);
  box-shadow: 0 11px 0 var(--shadow), inset 0 0 0 3px #3a3350;
}
.event.locked { border-color: #35313f; }
.event.done   { opacity: .85; }

.event .top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.thumb {
  flex: none;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--well);
  border: 3px solid var(--slot);
  box-shadow: inset 0 3px 0 #060810;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}
.thumb span {
  font-family: var(--px);
  font-size: 40px;
  color: var(--yellow);
  text-shadow: 2px 2px 0 var(--ink);
}
.locked .thumb span { color: var(--line); text-shadow: none; }

.tag i {
  display: block;
  width: 7px;
  height: 7px;
  background: #ff6a5a;
  animation: blink 1.2s steps(2) infinite;
}

.date {
  margin-bottom: 12px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--brown);
}

.event .desc { flex: 1; }

/* Ganze Karte funktioniert als Link (nur wenn es einen Link gibt) */
.event a.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.event:has(a.btn) { cursor: pointer; }
.event a.btn:active { transform: none; }
.event:has(a.btn):hover a.btn { color: var(--btn-ink); background: var(--yellow); }

/* Steinbloecke links und rechts mit Video */
.ev-stage {
  --rim: 3px solid var(--edge);
  --side: calc((100vw - 1120px) / 2);
  position: relative;
  z-index: 2;
  height: 0;
  pointer-events: none;
}
.ev-block {
  position: absolute;
  bottom: -3px;
  background-color: var(--stone);
  background-image: var(--capstones), var(--bricks);
  background-size: calc(var(--brick-w) * 6) var(--cap), calc(var(--brick-w) * 6) calc(var(--brick-h) * 6);
  background-repeat: repeat-x, repeat;
  background-position: left top, left bottom;
  border-top: var(--rim);
}
.ev-block.l { left: 0;  width: calc(var(--side) - 12px); height: 130px; border-right: var(--rim); }
.ev-block.r { right: 0; width: calc(var(--side) - 30px); height: 200px; border-left: var(--rim); }
.ev-stage + footer { position: relative; z-index: 1; }

/* Video steht rechts auf dem Block, direkt bei den Event-Karten */
.ev-stage .fighter {
  position: absolute;
  right: -40px;
  bottom: 100%;
  width: 520px;
  aspect-ratio: 688 / 418;
}
/* Karten liegen ueber dem Video, falls sich etwas ueberschneidet */
main.wrap { position: relative; z-index: 3; }
.ev-stage .fighter canvas {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: auto;
}
.ev-stage .fighter.empty canvas { visibility: hidden; }

/* Lustiger Knopf auf dem rechten Block */
.dont {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 46px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 20px 10px;
  font-family: var(--px);
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 2px;
  text-align: center;
  text-decoration: none;
  color: #fff3e0;
  text-shadow: 2px 2px 0 #4a0d0d;
  background: linear-gradient(180deg, #e0463a 0 50%, #c4302a 50% 100%);
  border: 3px solid var(--edge2);
  box-shadow: 0 6px 0 #6e1712, 0 10px 0 var(--shadow), inset 0 0 0 2px #ff7a6a;
  pointer-events: auto;
  cursor: pointer;
  transform-origin: 50% 100%;
  animation: tempt 2.6s steps(2) infinite;
}
.dont-sign {
  font-family: system-ui, sans-serif;
  font-size: 20px;
  line-height: 1;
  color: var(--yellow);
  text-shadow: 2px 2px 0 #4a0d0d;
}
.dont:hover  { animation: shake .35s steps(4) infinite; background: linear-gradient(180deg, #f0574a 0 50%, #d4382f 50% 100%); }
.dont:active { transform: translateY(6px); box-shadow: 0 0 0 #6e1712, 0 4px 0 var(--shadow), inset 0 0 0 2px #ff7a6a; animation: none; }
.dont:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
@keyframes tempt {
  0%, 80%, 100% { transform: rotate(0deg); }
  85% { transform: rotate(-3deg); }
  90% { transform: rotate(3deg); }
}
@keyframes shake {
  0%   { transform: translate(0, 0) rotate(0deg); }
  25%  { transform: translate(-2px, 0) rotate(-2deg); }
  50%  { transform: translate(2px, -1px) rotate(2deg); }
  75%  { transform: translate(-1px, 1px) rotate(-1deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  .dont, .dont:hover { animation: none; }
}

/* Schmalere Bildschirme: Bloecke unter den Events statt daneben */
@media (max-width: 1499px) {
  .ev-stage { height: 330px; }
  .ev-block.l { width: 52%; height: 70px; }
  .ev-block.r { width: 22%; height: 120px; }
  .ev-stage .fighter { right: 0; width: min(100%, 420px); }
  .dont { left: 12px; padding: 10px 14px 8px; font-size: 14px; }
}

/* Auf dem Handy keine Steinbloecke und kein Video */
@media (max-width: 760px) {
  .ev-stage { display: none; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
}
