/* qlikeit · Stempelaktion · Modul-Design im Qlikeit-Stil */

:root {
  --red:        #e11d2e;     /* Qlikeit Brand-Red */
  --red-dark:   #c41827;
  --red-soft:   #fef2f3;
  --green:      #16a34a;
  --green-soft: #dcfce7;
  --black:      #111827;
  --text:       #111827;
  --muted:      #6b7280;
  --line:       #e5e7eb;
  --bg:         #f3f4f6;
  --card:       #ffffff;
  --slot:       #f3f4f6;
  --shadow:     0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
  --radius-lg:  16px;
  --radius-md:  12px;
  --radius-sm:  8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

.container {
  max-width: 460px;
  margin: 0 auto;
  padding: 16px 14px calc(env(safe-area-inset-bottom, 0) + 24px);
  min-height: 100dvh;
}

/* ====================== ACTION CARD ====================== */

.action-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px 14px 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Header: Badge oben links, Counter-Pille oben rechts */
.action-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.action-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: white;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.action-card__badge svg {
  width: 14px;
  height: 14px;
}

.action-card__counter {
  background: var(--slot);
  color: var(--text);
  font-weight: 800;
  font-size: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

/* Lead-Block: Merchant + Subtitle */
.action-card__lead { padding: 2px 2px 0; }

.action-card__merchant {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
}

.action-card__subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.action-card__subtitle strong { color: var(--text); font-weight: 700; }

/* Stempel-Raster — kompakt, weniger Platz */
.stamps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.stamp {
  position: relative;
  aspect-ratio: 1.4 / 1;
  border-radius: 10px;
  background: var(--slot);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #cbd5e1;
  transition: transform 0.25s ease;
  min-width: 0;
  box-sizing: border-box;
}

.stamp--next {
  background: white;
  box-shadow: inset 0 0 0 2px var(--red);
  color: var(--red);
}

.stamp--filled {
  background: var(--red);
  color: white;
}

.stamp__star {
  width: 44%;
  height: 60%;
}

.stamp--latest { animation: latest-glow 2.4s ease-in-out infinite; }

@keyframes latest-glow {
  0%, 100% { box-shadow: 0 1px 3px rgba(225, 29, 46, 0.2); }
  50%      { box-shadow: 0 2px 6px rgba(225, 29, 46, 0.4); }
}

.stamp--pop { animation: pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes pop {
  0%   { transform: scale(0.5) rotate(-12deg); opacity: 0; }
  60%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}

/* Roadmap (Belohnungsreise) — kompakt im Card-Footer */
.roadmap {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 14px 12px 12px;
}

.roadmap__title {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

/* Track: relative-Container, Schiene absolut hinter den Dots */
.roadmap__track {
  position: relative;
}

.roadmap__rail {
  position: absolute;
  top: 21px;                       /* zentriert durch 46px Dots */
  left: calc(100% / 8);            /* Mitte des ersten Dots */
  right: calc(100% / 8);           /* Mitte des letzten Dots */
  height: 4px;
  background: #e5e7eb;
  border-radius: 999px;
  z-index: 1;
}

.roadmap__rail-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.roadmap__tiers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
  z-index: 2;                      /* Dots vor der Schiene */
}

.tier {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.tier__dot {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  z-index: 2;
  position: relative;
  transition: all 0.3s ease;
}

/* Aktuelles Ziel: vor Start neutral */
.tier--current .tier__dot {
  border-color: var(--line);
  border-width: 2px;
}

.tier--current .tier__name { color: var(--text); }

/* Aktuelles Ziel: grün pulsierend, sobald gestartet wurde */
.tier--current.tier--current-pulse .tier__dot {
  border-color: var(--green);
  border-width: 3px;
  animation: pulse-green 2.4s ease-in-out infinite;
}

.tier--current.tier--current-pulse .tier__name {
  color: var(--green);
}

/* Eingelöste Stufen: grüner Ring, immer statisch */
.tier--redeemed .tier__dot {
  border-color: var(--green);
  border-width: 3px;
  animation: none;
}

.tier--redeemed .tier__dot::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 26px;
  color: var(--green);
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45); }
  60%      { box-shadow: 0 0 0 10px rgba(22, 163, 74, 0); }
}

.tier__name {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  /* erlaubt 2 Zeilen Wrap (z.B. „Cappu + Kuchen") und hält die Höhe konstant,
     damit alle Counts vertikal aligned sind */
  min-height: calc(2 * 1.25em);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  padding: 0 2px;
  word-break: break-word;
}

.tier__count {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 600;
}

.tier--current .tier__name { color: var(--red); }
.tier--redeemed .tier__name,
.tier--redeemed .tier__count { color: var(--green); }

/* Locked Tier — Mystery 🎁, weiß innen, neutraler grauer Ring */
.tier--locked .tier__dot {
  background: white;
  border: 2px solid #e5e7eb;
  font-size: 22px;
}

.tier--locked .tier__name,
.tier--locked .tier__count {
  color: #9ca3af;
  font-weight: 600;
}

/* Start vor erstem Stempel: weiß mit rotem Ring + ROT pulsierend (CTA) */
.tier--start .tier__dot {
  background: white;
  border: 2.5px solid var(--red);
  font-size: 22px;
  animation: start-pulse-red 1.8s ease-in-out infinite;
}

.tier--start .tier__name {
  color: var(--red);
  font-weight: 700;
}

@keyframes start-pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 46, 0.5); }
  60%      { box-shadow: 0 0 0 10px rgba(225, 29, 46, 0); }
}

/* Start nach erstem Stempel: grün, statisch — Pulse wandert auf nächstes Ziel */
.tier--start.tier--start-passed .tier__dot {
  background: white;
  border: 3px solid var(--green);
  animation: none;
  box-shadow: none;
}

.tier--start.tier--start-passed .tier__name {
  color: var(--green);
}

/* Reward Hero (bei vollendeter Stufe) */
.reward-hero {
  background: linear-gradient(160deg, #d1fae5 0%, #6ee7b7 60%, #10b981 100%);
  border-radius: var(--radius-md);
  padding: 20px 16px 22px;
  text-align: center;
  border: 1px solid #059669;
  animation: reward-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes reward-in {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.reward-hero__cup {
  font-size: 64px;
  line-height: 1;
  display: block;
  margin-bottom: 6px;
  animation: cup-bob 2.4s ease-in-out infinite;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.18));
}

@keyframes cup-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-3px) rotate(2deg); }
}

.reward-hero__eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #047857;
  text-transform: uppercase;
}

.reward-hero__title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  color: #064e3b;
  letter-spacing: -0.01em;
}

.reward-hero__sub {
  margin: 0 0 16px;
  font-size: 13px;
  color: #065f46;
  line-height: 1.45;
}

/* Primary CTA: groß, rot, NFC-Icon */
.action-card__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--red);
  color: white;
  border: none;
  padding: 16px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(225, 29, 46, 0.32);
  transition: transform 0.1s ease, background 0.2s ease;
}

.action-card__cta:active { transform: scale(0.985); background: var(--red-dark); }

.action-card__cta:disabled {
  background: #d8a4ad;
  cursor: progress;
  box-shadow: none;
}

.action-card__cta svg {
  width: 20px;
  height: 20px;
}

.action-card__cta--green {
  background: #064e3b;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.32);
}

.action-card__cta--green:active { background: #022c22; }

/* Help-Link */
.action-card__help {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
  align-self: center;
}

/* ====================== OVERLAYS ====================== */

.overlay[hidden] { display: none !important; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
  animation: fade 0.18s ease;
}

@media (min-width: 540px) {
  .overlay { align-items: center; }
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.overlay__sheet {
  position: relative;
  background: white;
  width: 100%;
  max-width: 460px;
  border-radius: 24px 24px 0 0;
  padding: 28px 22px calc(env(safe-area-inset-bottom, 0) + 56px);
  text-align: center;
  animation: slide 0.22s ease;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 540px) { .overlay__sheet { border-radius: 24px; } }

.overlay__sheet--tall { text-align: left; }

@keyframes slide {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.overlay__title {
  margin: 14px 0 8px;
  font-size: 22px;
  font-weight: 800;
}

.overlay__text {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.overlay__text--encourage {
  margin-top: -8px !important;
  font-weight: 700;
  color: var(--red-dark);
  font-size: 14px;
}

.overlay__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  border-radius: 50%;
  z-index: 2;
  -webkit-tap-highlight-color: rgba(0,0,0,0.08);
}

.overlay__close:active { background: var(--slot); }

/* Scan-Stage */
.overlay__sheet--scan { padding-top: 22px; }

.scan-stage {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 4px auto 16px;
}

.scan-phone {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 178px;
  border-radius: 26px;
  background: #0f172a;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.32), inset 0 0 0 2px #1f2937;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-phone__inner {
  width: 86px;
  height: 152px;
  border-radius: 18px;
  background: linear-gradient(180deg, #1e293b 0%, #0b1220 100%);
}

.scan-waves {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 76px;
  z-index: 2;
  pointer-events: none;
}

.scan-waves span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--red);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.4);
  opacity: 0;
  animation: nfc-wave 1.8s ease-out infinite;
}

.scan-waves span:nth-child(2) { animation-delay: 0.55s; }
.scan-waves span:nth-child(3) { animation-delay: 1.10s; }

@keyframes nfc-wave {
  0%   { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
  20%  { opacity: 0.85; }
  100% { transform: translate(-50%, -50%) scale(3.4); opacity: 0; }
}

.scan-card {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) rotate(-6deg);
  width: 140px;
  height: 88px;
  border-radius: 14px;
  background: linear-gradient(135deg, #d31435 0%, var(--red) 50%, #8c0a20 100%);
  box-shadow: 0 14px 28px rgba(225, 29, 46, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 12px 14px;
  z-index: 3;
  animation: card-tap 2.2s ease-in-out infinite;
}

.scan-card__brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: white;
}

.scan-card__nfc {
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.92);
  transform: rotate(-90deg);
}

@keyframes card-tap {
  0%   { transform: translateX(-50%) translateY(0)    rotate(-6deg); }
  50%  { transform: translateX(-50%) translateY(16px) rotate(-2deg); }
  100% { transform: translateX(-50%) translateY(0)    rotate(-6deg); }
}

.scan-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 10px;
  padding: 6px 12px;
  background: var(--red-soft);
  color: var(--red-dark);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.scan-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 1.2s ease-in-out infinite;
  flex: none;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* Success — groß & psychologisch belohnend */
.overlay--success .overlay__sheet {
  position: relative;
  color: #14532d;
  overflow: hidden;
  padding: 28px 22px calc(env(safe-area-inset-bottom, 0) + 32px);
}

.overlay--success .overlay__title {
  font-size: 32px;
  font-weight: 800;
  margin: 14px 0 6px;
  color: #14532d;
  letter-spacing: -0.02em;
}

.overlay--success .overlay__text {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #15803d;
}

.overlay--success .overlay__text--encourage {
  margin-top: 10px !important;
  font-size: 15px;
  color: var(--text);
  font-weight: 600;
}

.success-mark {
  width: 92px;
  height: 92px;
  margin: 4px auto 6px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.3);
  animation: success-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes success-pop {
  0%   { transform: scale(0.4) rotate(-90deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(8deg);  opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

.success-mark svg { width: 50px; height: 50px; }

/* Fly-Stamp: fliegt aus dem Erfolgsmodal in den Stempelplatz */
.fly-stamp {
  position: fixed;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(225, 29, 46, 0.55),
              0 0 24px rgba(225, 29, 46, 0.4);
  z-index: 1000;
  pointer-events: none;
  transform: translate(0, 0) scale(1);
  transition: transform 0.8s cubic-bezier(0.34, 1.0, 0.5, 1.0);
  will-change: transform;
}

.fly-stamp svg {
  width: 60%;
  height: 60%;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Slot beim Ankommen: Pop + sanftes Glühen */
.stamp--just-landed {
  animation: just-landed 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes just-landed {
  0%   { transform: scale(0.6); opacity: 0.4; }
  60%  { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(1); }
}

/* Konfetti */
.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti__piece {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  opacity: 0;
  animation: confetti-fall 1.5s cubic-bezier(0.2, 0.6, 0.4, 1) forwards;
}

@keyframes confetti-fall {
  0%   { transform: translate(0, -10px) rotate(0); opacity: 1; }
  100% { transform: translate(var(--x), 360px) rotate(var(--rot)); opacity: 0; }
}

/* Error */
.error-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #fee2e2;
  color: #b91c1c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
}

/* Help */
.help-list {
  margin: 8px 0 16px;
  padding-left: 22px;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.55;
}

.help-list li { margin-bottom: 6px; }

/* Ghost Button (in Sheets) */
.ghost {
  background: var(--slot);
  color: var(--text);
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
}

.ghost:active { background: var(--line); }

/* ====================== TOPBAR + BURGER ====================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px calc(12px + env(safe-area-inset-top, 0));
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar__burger,
.topbar__back {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: var(--slot);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  padding: 11px 9px;
}

.topbar__burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.topbar__back svg {
  width: 22px;
  height: 22px;
}

.topbar__title {
  flex: 1;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__spacer {
  width: 40px;
  height: 40px;
}

/* ====================== DRAWER ====================== */
.drawer[hidden] { display: none; }

.drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  animation: fade 0.18s ease;
}

.drawer__panel {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: min(86vw, 380px);
  background: white;
  box-shadow: 6px 0 24px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0) + 14px) 16px calc(env(safe-area-inset-bottom, 0) + 16px);
  animation: drawer-in 0.22s ease;
  overflow-y: auto;
}

@keyframes drawer-in {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.drawer__head-eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}

.drawer__close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--slot);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.card-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-list__empty {
  color: var(--muted);
  font-size: 14px;
  padding: 12px;
  text-align: center;
  background: var(--slot);
  border-radius: 12px;
}

.card-list__item {
  display: flex;
  align-items: stretch;
  gap: 4px;
  background: var(--slot);
  border-radius: 12px;
  overflow: hidden;
}

.card-list__item--active {
  background: var(--red-soft);
  outline: 2px solid var(--red);
}

.card-list__main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  min-height: 52px;
}

.card-list__emoji { font-size: 22px; flex: none; }
.card-list__name { flex: 1; }
.card-list__badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--red);
  color: white;
  padding: 3px 8px;
  border-radius: 999px;
}

.card-list__more {
  width: 44px;
  background: transparent;
  border: none;
  font-size: 22px;
  color: var(--muted);
  cursor: pointer;
}

.drawer__action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--red);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  margin-bottom: 14px;
}

.drawer__action svg { width: 18px; height: 18px; }

.drawer__sep {
  height: 1px;
  background: var(--line);
  margin: 8px 0 12px;
}

.drawer__link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.drawer__link svg { width: 18px; height: 18px; flex: none; }
.drawer__link:active { background: var(--slot); }

/* Card-Aktions-Overlay */
.overlay__sheet--actions { padding-top: 22px; }

.action-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--slot);
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.action-row__icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
  flex: none;
}

.action-row--danger {
  background: #fef2f2;
  color: #b91c1c;
}

.action-row:active { transform: scale(0.99); }

/* ====================== LOGIN ====================== */
.login {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, #fafafa 0%, #f3f4f6 100%);
}

.login__card {
  background: white;
  border-radius: 24px;
  padding: 32px 24px 28px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
}

.login__logo {
  font-size: 56px;
  margin-bottom: 6px;
}

.login__title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.login__sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.login form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login input[type="password"] {
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 16px;
  background: var(--slot);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.login input[type="password"]:focus {
  border-color: var(--red);
  background: white;
}

.login__btn {
  background: var(--red);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(225, 29, 46, 0.25);
}

.login__btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.login__error {
  margin: 4px 0 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
}

/* ====================== EDITOR ====================== */
.editor {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 80px;
}

.ed-section {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ed-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ed-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.ed-label-sm {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 4px;
  display: block;
}

.ed-help {
  font-size: 12px;
  color: var(--muted);
  margin: -4px 0 4px;
  line-height: 1.45;
}

.ed-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
}

.ed-hint span { font-family: ui-monospace, "SF Mono", Menlo, monospace; }

.ed-pill {
  font-size: 11px;
  font-weight: 700;
  background: var(--slot);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 999px;
}

.ed-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  background: var(--slot);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
}

.ed-input:focus {
  border-color: var(--red);
  background: white;
}

.ed-input-emoji {
  text-align: center;
  font-size: 24px;
}

.ed-input:disabled {
  opacity: 0.6;
  background: var(--slot);
}

.tier-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tier-row {
  background: var(--slot);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tier-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tier-row__num {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--red);
}

.tier-row__del {
  width: 32px;
  height: 32px;
  border: none;
  background: white;
  border-radius: 50%;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
}

.tier-row__del:active { background: #fee2e2; color: #b91c1c; }

.tier-row__grid {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
}

.ed-btn-ghost {
  background: transparent;
  border: 1.5px dashed var(--line);
  color: var(--text);
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ed-btn-ghost svg { width: 16px; height: 16px; }

.ed-btn-ghost:active { background: var(--slot); }

.ed-error {
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
}

.ed-bottom {
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, var(--bg) 60%, transparent);
  padding: 14px 0;
  margin: 0 -14px -14px;
  padding-left: 14px;
  padding-right: 14px;
}

.ed-btn-primary {
  width: 100%;
  background: var(--red);
  color: white;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(225, 29, 46, 0.32);
}

.ed-btn-primary:disabled { opacity: 0.6; cursor: progress; }

/* Editor: NFC-URLs Section */
.ed-section--urls {
  background: #f0fdf4;
  border-color: #86efac;
}

.ed-pill--ok {
  background: #16a34a;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.url-item {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.url-item + .url-item { margin-top: 8px; }

.url-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.url-item__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.url-item__copy {
  background: var(--text);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex: none;
}

.url-item__copy.copied {
  background: #16a34a;
}

.url-item__val {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  color: #475569;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 6px;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}

.ed-btn-ghost--green {
  border-color: #16a34a;
  color: #16a34a;
  font-weight: 700;
  margin-top: 4px;
}

.ed-btn-ghost--green:active { background: #f0fdf4; }

.ed-btn-primary--ok {
  background: #16a34a !important;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.32) !important;
}
