/* ============================================================
   TAUSCH-DEX! – Comic-Look
   Bangers für Headlines, Comic Neue für Text.
   Papier-Creme + Halbton-Raster, dicke Outlines, Offset-Schatten.
   ============================================================ */
:root {
  --paper: #f6ecd2;
  --white: #fffdf6;
  --ink: #16161a;
  --red: #e3350d;
  --red-dark: #b32a0a;
  --yellow: #ffcb05;
  --yellow-soft: #ffe27a;
  --blue: #2a75bb;
  --blue-dark: #1b4e80;
  --green: #3aa83e;
  --green-dark: #1f7a23;
  --gray: #9a958a;
  --radius: 12px;
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scrollbar-gutter: stable; }

body {
  margin: 0;
  font-family: "Comic Neue", "Segoe UI", sans-serif;
  font-size: 16px;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(22, 22, 26, 0.09) 1.2px, transparent 1.3px);
  background-size: 16px 16px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--yellow); color: var(--ink); }

:focus-visible {
  outline: 3px dashed var(--blue);
  outline-offset: 2px;
}

a { color: var(--blue-dark); font-weight: 700; }

/* ---------- Bausteine ---------- */
.panel {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 7px 7px 0 var(--ink);
}

.btn {
  font-family: "Bangers", cursive;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--blue);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 8px 18px 6px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  text-shadow: 1.5px 1.5px 0 rgba(0, 0, 0, 0.35);
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-red { background: var(--red); }
.btn-blue { background: var(--blue); }
.btn-yellow { background: var(--yellow); color: var(--ink); text-shadow: none; }
.btn-ghost {
  background: var(--white);
  color: var(--ink);
  text-shadow: none;
  font-size: 1rem;
  padding: 5px 12px 3px;
}
.btn-small {
  font-size: 1rem;
  padding: 5px 12px 3px;
  box-shadow: 3px 3px 0 var(--ink);
}
.btn-green { background: var(--green); }

/* ============================================================
   LOGIN-COVER
   ============================================================ */
.cover {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 24px 16px 48px;
}
.cover-rays {
  position: absolute;
  inset: -50%;
  background: repeating-conic-gradient(from 0deg at 50% 42%, var(--yellow) 0deg 8deg, var(--yellow-soft) 8deg 16deg);
  opacity: 0.55;
  animation: spin 90s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(22, 22, 26, 0.10) 1.4px, transparent 1.5px);
  background-size: 14px 14px;
  pointer-events: none;
}
.cover-inner {
  position: relative;
  z-index: 2;
  width: min(460px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* Gestaffelter Auftritt des Covers */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
}
@keyframes fadeIn {
  from { opacity: 0; }
}
.cover-top {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  animation: riseIn 0.4s 0.05s var(--ease-out-quint) both;
}
.issue-tag {
  font-family: "Bangers", cursive;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  background: var(--ink);
  color: var(--yellow);
  padding: 4px 12px 2px;
  border-radius: 6px;
  transform: rotate(-2deg);
}
.issue-tag-red { background: var(--red); color: #fff; transform: rotate(2deg); }

.cover-title {
  font-family: "Bangers", cursive;
  font-size: clamp(3.4rem, 11vw, 5.2rem);
  line-height: 0.95;
  margin: 0;
  color: var(--red);
  letter-spacing: 0.03em;
  text-align: center;
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 4px 4px 0 var(--blue), 7px 7px 0 var(--ink);
  transform: rotate(-2deg);
  animation: titleIn 0.55s 0.12s var(--ease-out-quint) both;
}
@keyframes titleIn {
  from { opacity: 0; transform: rotate(-7deg) scale(0.82); }
}
.cover-sub {
  animation: riseIn 0.4s 0.24s var(--ease-out-quint) both;
  font-weight: 700;
  font-style: italic;
  font-size: 1.15rem;
  margin: 14px 0 4px;
  background: var(--white);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 4px 18px;
  box-shadow: 3px 3px 0 var(--ink);
}

.badge-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 10px 0 -34px;
  align-self: flex-end;
  z-index: 3;
  filter: drop-shadow(4px 4px 0 rgba(22, 22, 26, 0.9));
  transform: rotate(8deg);
  animation:
    badgeIn 0.5s 0.32s var(--ease-out-expo) both,
    badgePulse 2.4s 1.1s ease-in-out infinite;
}
@keyframes badgeIn {
  from { opacity: 0; transform: rotate(-28deg) scale(0.2); }
}
@keyframes badgePulse {
  0%, 100% { transform: rotate(8deg) scale(1); }
  50% { transform: rotate(8deg) scale(1.05); }
}
.starburst { width: 100%; height: 100%; }
.badge-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "Bangers", cursive;
  color: #fff;
  pointer-events: none;
}
.badge-text b { font-size: 2.1rem; line-height: 1; font-weight: 400; }
.badge-text span { font-size: 0.95rem; letter-spacing: 0.08em; }

.auth-panel {
  width: 100%;
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: riseIn 0.45s 0.3s var(--ease-out-quint) both;
}
.auth-title {
  font-family: "Bangers", cursive;
  font-size: 1.7rem;
  letter-spacing: 0.04em;
  margin: 0;
  color: var(--blue-dark);
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field span { font-weight: 700; font-size: 0.95rem; }
.field input {
  font: inherit;
  font-weight: 700;
  padding: 9px 12px;
  border: 3px solid var(--ink);
  border-radius: 9px;
  background: #fff;
  box-shadow: inset 2px 2px 0 rgba(22, 22, 26, 0.08);
}
.field input:focus { outline: 3px solid var(--yellow); outline-offset: 0; }

.bubble-error {
  position: relative;
  margin: 0;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: 3px 3px 0 var(--ink);
  animation: shake 0.3s ease;
}
@keyframes shake {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.auth-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.auth-buttons .btn { flex: 1; white-space: nowrap; }

.cover-note {
  position: relative;
  z-index: 2;
  margin-top: 22px;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.75;
  text-align: center;
  animation: fadeIn 0.4s 0.55s both;
}

.pokeball {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 5px solid var(--ink);
  background:
    linear-gradient(to bottom, var(--red) 0 44%, var(--ink) 44% 56%, #fff 56% 100%);
  z-index: 1;
  transform: rotate(var(--rot, 0deg));
  animation: pokeFloat 6s ease-in-out infinite alternate;
}
@keyframes pokeFloat {
  to { transform: rotate(var(--rot, 0deg)) translateY(-14px); }
}
.pokeball::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 5px solid var(--ink);
  border-radius: 50%;
}
.pokeball-1 { bottom: -38px; left: -30px; --rot: -18deg; }
.pokeball-2 { top: -30px; right: -34px; --rot: 14deg; width: 100px; height: 100px; animation-duration: 7.5s; }

/* ============================================================
   HEADER + TOOLBAR
   ============================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 18px;
  background-color: var(--yellow);
  background-image: radial-gradient(rgba(22, 22, 26, 0.12) 1.2px, transparent 1.3px);
  background-size: 12px 12px;
  border-bottom: 4px solid var(--ink);
  animation: slideDown 0.4s var(--ease-out-quint) both;
}
@keyframes slideDown {
  from { transform: translateY(-110%); }
}
.brand {
  font-family: "Bangers", cursive;
  font-size: 1.9rem;
  color: var(--red);
  -webkit-text-stroke: 1.2px var(--ink);
  text-shadow: 2.5px 2.5px 0 var(--blue), 4px 4px 0 var(--ink);
  transform: rotate(-1.5deg);
  user-select: none;
}
.brand:hover { animation: wiggle 0.45s ease-in-out; }
@keyframes wiggle {
  25% { transform: rotate(0.5deg); }
  50% { transform: rotate(-3.5deg); }
  75% { transform: rotate(-0.5deg); }
}
.stat-chips { display: flex; gap: 8px; margin-right: auto; }
.chip {
  font-family: "Comic Neue", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 3px 12px;
  background: var(--white);
  cursor: pointer;
  box-shadow: 2.5px 2.5px 0 var(--ink);
  transition: transform 0.08s ease;
}
.chip:hover { transform: translateY(-1px); }
.chip:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.chip.pop { animation: chipPop 0.32s var(--ease-out-quart); }
@keyframes chipPop {
  35% { transform: scale(1.16) rotate(-2deg); }
}
.chip-want { background: #e2f8e1; color: var(--green-dark); }
.chip-rest { background: #ffe3da; color: var(--red-dark); }

.user-box { display: flex; align-items: center; gap: 10px; }
/* Freunde + Abmelden: identische Maße */
.user-box .btn-ghost {
  min-width: 122px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 12px 0;
}
.trainer { font-weight: 700; }
.save-state { font-size: 0.85rem; font-weight: 700; opacity: 0.7; min-width: 90px; text-align: right; }

.toolbar {
  position: sticky;
  top: 62px;
  z-index: 29;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 18px;
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 4px 0 rgba(22, 22, 26, 0.12);
  animation: riseIn 0.35s 0.12s var(--ease-out-quart) both;
}
#search {
  font: inherit;
  font-weight: 700;
  width: 220px;
  padding: 7px 12px;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
}
.gen-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.gen-chips button,
.status-seg button {
  font-family: "Comic Neue", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2.5px solid var(--ink);
  background: var(--white);
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}
.gen-chips button.active,
.status-seg button.active {
  background: var(--blue);
  color: #fff;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.25);
  transform: translate(1px, 1px);
}
.gen-chips button:active,
.status-seg button:active,
#bulkAction:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--ink);
}
.status-seg { display: flex; gap: 5px; }
#bulkAction {
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  padding: 5px 8px;
  background: var(--white);
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
}
/* Export + Import: gleiches Paar, Export als gelbe Primäraktion */
.list-actions { display: flex; gap: 10px; margin-left: auto; }
.btn-export,
.btn-import {
  font-size: 1.2rem;
  padding: 7px 20px 5px;
  min-width: 130px;
}

/* ============================================================
   GRID + KARTEN
   ============================================================ */
main { padding: 18px; max-width: 1500px; margin: 0 auto; animation: fadeIn 0.45s 0.15s both; }
.result-info { font-weight: 700; opacity: 0.7; margin: 0 0 12px 4px; }

/* Einmalige Einzugs-Staffelung nach Login (Filterwechsel triggert sie nicht erneut) */
.grid.boot .card {
  animation: cardIn 0.4s var(--ease-out-quint) both;
  animation-delay: calc(var(--i, 0) * 26ms);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.94) rotate(var(--tilt, 0deg)); }
}

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

.card {
  position: relative;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease, border-color 0.15s ease;
  content-visibility: auto;
  contain-intrinsic-size: 190px 210px;
}
.card:nth-child(4n+1) { --tilt: -0.5deg; }
.card:nth-child(4n+3) { --tilt: 0.5deg; }

/* Sticker-Album-Slot: vorgedruckter Platz hinter jedem Artwork */
.card::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 18px;
  right: 18px;
  aspect-ratio: 1;
  border: 2.5px dashed rgba(22, 22, 26, 0.16);
  border-radius: 50%;
}
.card.want::before {
  border-style: solid;
  border-color: rgba(31, 122, 35, 0.28);
  background: radial-gradient(circle, rgba(58, 168, 62, 0.12), transparent 72%);
}
.card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 7px 9px 0 var(--ink);
  z-index: 2;
}
.card:active {
  transform: rotate(0deg) translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}

.card .num {
  position: absolute;
  top: 6px;
  left: 6px;
  font-family: "Bangers", cursive;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  background: var(--yellow);
  border: 2.5px solid var(--ink);
  border-radius: 7px;
  padding: 2px 8px 0;
  transform: rotate(-4deg);
  box-shadow: 2px 2px 0 var(--ink);
  z-index: 3;
}

.card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(2px 3px 0 rgba(22, 22, 26, 0.18));
  transition: filter 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}
.card:hover img { transform: scale(1.06) rotate(1deg); }

.card .name {
  font-size: 1.02rem;
  font-weight: 700;
  text-align: center;
  margin: 0;
  line-height: 1.15;
  min-height: 2.3em;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Standard = BRAUCH NICHT: leicht ausgegraut */
.card:not(.want) img { filter: grayscale(0.8) opacity(0.65); }
.card:not(.want) .name { opacity: 0.6; }
.card:not(.want):hover img { filter: grayscale(0.3) opacity(0.9); }

/* Markiert = WILL ICH: leuchtet auf */
.card.want { border-color: var(--green-dark); background: #edfbe9; box-shadow: 5px 5px 0 var(--green-dark); }

/* Stempel */
.stamp {
  position: absolute;
  top: 42%;
  left: 50%;
  font-family: "Bangers", cursive;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  letter-spacing: 0.05em;
  white-space: nowrap;
  padding: 3px 12px 1px;
  border: 3px solid currentColor;
  border-radius: 9px;
  background: rgba(255, 253, 246, 0.88);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-14deg) scale(0.7);
  transition: opacity 0.14s ease, transform 0.14s var(--ease-out-quart);
  z-index: 2;
}
.card.want .stamp-want {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(-14deg) scale(1);
}
.stamp-want { color: var(--green-dark); }

/* SLAM: nur beim aktiven Markieren (JS setzt kurz .slam), nicht beim Seitenaufbau */
.card.slam .stamp-want { animation: stampSlam 0.3s var(--ease-out-quint); }
@keyframes stampSlam {
  0%  { opacity: 0; transform: translate(-50%, -50%) rotate(-9deg) scale(2); }
  55% { opacity: 1; transform: translate(-50%, -50%) rotate(-15deg) scale(0.93); }
  78% { transform: translate(-50%, -50%) rotate(-13.5deg) scale(1.04); }
}
.stamp-want::after {
  content: "";
  position: absolute;
  inset: -16px -24px;
  border: 4px solid var(--yellow);
  border-radius: 50%;
  opacity: 0;
}
.card.slam .stamp-want::after { animation: stampRing 0.45s ease-out; }
@keyframes stampRing {
  0%   { opacity: 0.95; transform: scale(0.4); }
  100% { opacity: 0; transform: scale(1.5); }
}
.card.slam img { animation: imgPunch 0.3s var(--ease-out-quart); }
@keyframes imgPunch {
  40% { transform: scale(0.9) rotate(-2deg); }
  75% { transform: scale(1.05); }
}

.empty-msg {
  font-family: "Bangers", cursive;
  font-size: 1.8rem;
  text-align: center;
  color: var(--blue-dark);
  margin: 60px 0;
  transform: rotate(-2deg);
  animation:
    emptyIn 0.35s var(--ease-out-quint) both,
    emptyFloat 2.8s 0.4s ease-in-out infinite alternate;
}
@keyframes emptyIn {
  from { opacity: 0; transform: rotate(-2deg) translateY(12px) scale(0.9); }
}
@keyframes emptyFloat {
  to { transform: rotate(-1deg) translateY(-6px); }
}

.app-footer {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.75;
  padding: 26px 16px 34px;
}

/* ============================================================
   EXPORT-MODAL
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(22, 18, 12, 0.6);
  background-image: radial-gradient(rgba(0, 0, 0, 0.25) 1.5px, transparent 1.6px);
  background-size: 10px 10px;
  animation: fadeIn 0.2s ease-out;
}
.modal {
  width: min(560px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 22px 24px;
  position: relative;
  animation: modalIn 0.25s var(--ease-out-quint) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.88) rotate(-1.5deg); }
}
.overlay.closing { animation: fadeOut 0.16s ease-in both; }
.overlay.closing .modal { animation: modalOut 0.16s ease-in both; }
@keyframes fadeOut {
  to { opacity: 0; }
}
@keyframes modalOut {
  to { opacity: 0; transform: scale(0.92); }
}
.modal-title {
  font-family: "Bangers", cursive;
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: var(--red);
  -webkit-text-stroke: 1px var(--ink);
  text-shadow: 2.5px 2.5px 0 var(--yellow), 4px 4px 0 var(--ink);
  margin: 0 24px 14px 0;
  transform: rotate(-1deg);
}
.modal-sub {
  font-weight: 700;
  margin: -8px 0 14px;
  opacity: 0.7;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: "Bangers", cursive;
  font-size: 1.2rem;
  width: 38px;
  height: 38px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  box-shadow: 2.5px 2.5px 0 var(--ink);
}
.modal-close:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }

.seg {
  border: 3px solid var(--ink);
  border-radius: 10px;
  margin: 0 0 14px;
  padding: 10px 12px 12px;
  display: flex;
  gap: 10px;
}
.seg legend {
  font-family: "Bangers", cursive;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  padding: 0 8px;
  background: var(--yellow);
  border: 2.5px solid var(--ink);
  border-radius: 7px;
  transform: rotate(-1deg);
}
.seg label { flex: 1; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block;
  text-align: center;
  font-weight: 700;
  line-height: 1.2;
  border: 2.5px solid var(--ink);
  border-radius: 9px;
  padding: 8px 6px;
  background: var(--white);
  box-shadow: 2.5px 2.5px 0 var(--ink);
  transition: background 0.1s ease, transform 0.1s ease;
}
.seg span small { font-weight: 700; opacity: 0.65; font-size: 0.78rem; }
.seg input:checked + span {
  background: var(--blue);
  color: #fff;
  transform: translate(1.5px, 1.5px);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.25);
}
.seg input:checked + span small { opacity: 0.85; }
.seg input:focus-visible + span { outline: 3px dashed var(--blue); outline-offset: 2px; }

#expOut,
#impText {
  width: 100%;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.95rem;
  font-weight: 700;
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fffbe9;
  box-shadow: inset 2.5px 2.5px 0 rgba(22, 22, 26, 0.1);
  resize: vertical;
}
#impText { margin-bottom: 14px; }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: 4px 4px 0 var(--ink);
}

/* ---------- Freunde ---------- */
.friend-form { display: flex; gap: 10px; margin-bottom: 12px; }
.friend-form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-weight: 700;
  padding: 8px 12px;
  border: 3px solid var(--ink);
  border-radius: 9px;
  background: #fff;
}
.friend-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 42vh;
  overflow: auto;
  padding: 2px;
  margin-bottom: 4px;
}
.friend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--white);
  box-shadow: 3px 3px 0 var(--ink);
}
.friend-info {
  flex: 1;
  min-width: 110px;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.friend-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-info small { font-weight: 700; opacity: 0.65; }
.friend-remove {
  border: 2.5px solid var(--ink);
  background: var(--white);
  border-radius: 7px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 2px 2px 0 var(--ink);
}
.friend-remove:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.friend-empty { font-weight: 700; opacity: 0.7; text-align: center; margin: 14px 0; }
.exp-meta { font-weight: 700; font-size: 0.9rem; opacity: 0.75; margin: 6px 0 14px; }
.exp-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.exp-actions .btn { flex: 1; white-space: nowrap; }
.exp-hint {
  margin: 16px 0 0;
  font-size: 0.88rem;
  font-weight: 700;
  background: var(--yellow-soft);
  border: 2.5px dashed var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  font-family: "Bangers", cursive;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  background: var(--ink);
  color: var(--yellow);
  border: 3px solid var(--yellow);
  border-radius: 12px;
  padding: 9px 22px 7px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
  animation: toastIn 0.3s var(--ease-out-quint) both;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px) scale(0.85); }
}
.toast.out { animation: toastOut 0.2s ease-in both; }
@keyframes toastOut {
  to { opacity: 0; transform: translateX(-50%) translateY(14px) scale(0.9); }
}
.toast.error { background: var(--red); color: #fff; border-color: var(--ink); }

/* ✨ Shiny-Modus (Konami-Code: ↑↑↓↓←→←→BA) */
body.shiny .card img { filter: hue-rotate(150deg) saturate(1.5) drop-shadow(2px 3px 0 rgba(22, 22, 26, 0.18)); }
body.shiny .card:not(.want) img { filter: hue-rotate(150deg) saturate(1.1) grayscale(0.55) opacity(0.7); }

/* ---------- Konfetti (beim Kopieren) ---------- */
.confetti { position: fixed; z-index: 70; pointer-events: none; }
.confetti i {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 2px solid var(--ink);
  animation: confettiFly 0.65s var(--ease-out-expo) both;
}
@keyframes confettiFly {
  from { opacity: 1; transform: translate(0, 0) rotate(0deg); }
  to { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.5); }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .app-header { gap: 8px; padding: 8px 12px; }
  .brand { font-size: 1.5rem; }
  .save-state { display: none; }
  .toolbar { top: 0; position: static; padding: 8px 12px; }
  #search { width: 100%; }
  .list-actions { margin-left: 0; width: 100%; }
  .btn-export, .btn-import { flex: 1; min-width: 0; padding-left: 10px; padding-right: 10px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
  main { padding: 12px; }
  .seg { flex-direction: column; }
  .badge-wrap { width: 120px; height: 120px; margin-bottom: -26px; }
  .badge-text b { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
