.home-hero {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #ffffff;
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
}

.home-hero h1 {
  margin: 0 0 6px 0;
  font-size: 24px;
  font-weight: 900;
}

.home-hero p {
  margin: 0 0 12px 0;
  font-size: 13px;
  line-height: 1.45;
  opacity: 0.95;
}

.hero-note {
  margin: 10px 0 0 0;
  font-size: 11px;
  opacity: 0.95;
}

.deck-header {
  margin: 14px 0 8px 0;
}

.deck-title {
  font-size: 15px;
  font-weight: 900;
  color: #111827;
  margin-bottom: 4px;
}

.deck-subtitle {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.35;
}

.deck {
  position: relative;
  width: 100%;
  height: 360px;
  border-radius: 18px;
  overflow: visible;
  touch-action: pan-y;
}

.swipe-card {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 14px 32px rgba(0,0,0,0.08);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateX(0) translateY(0) rotate(0);
  transition: transform 180ms ease, opacity 180ms ease;
  will-change: transform;
}

.swipe-card.under,
.swipe-card.under2 {
  display: none;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.badge {
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #6b7280;
  font-weight: 900;
}

.pill {
  font-size: 12px;
  font-weight: 900;
  padding: 8px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  border: 1px solid #e5e7eb;
  white-space: nowrap;
}

.card-name {
  font-size: 22px;
  font-weight: 950;
  margin: 0;
  color: #111827;
  line-height: 1.1;
}

.card-tagline {
  margin: 0;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.4;
}

.story-box {
  margin-top: 6px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 12px;
  color: #111827;
  font-size: 14px;
  line-height: 1.55;
  flex: 1;
  overflow: hidden;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.card-actions a {
  flex: 1;
  text-decoration: none;
  text-align: center;
  padding: 12px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  border: 1px solid #e5e7eb;
  background: #111827;
  color: #ffffff;
}

.card-actions a.primary {
  background: #2563eb;
  border-color: #2563eb;
}

.preview {
  margin-top: 12px;
}

.preview-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}

.preview-chip {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 86px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 10px;
  cursor: pointer;
  user-select: none;
}

.preview-chip .p-id {
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #6b7280;
  font-weight: 900;
}

.preview-chip .p-name {
  font-size: 12px;
  font-weight: 900;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-chip.active {
  border: 2px solid #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
  background: #ffffff;
}

.preview-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #d1d5db;
}

.dot.active {
  background: #2563eb;
}

.status {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  color: #6b7280;
  font-weight: 800;
}

.home-links {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.home-links a {
  color: #2563eb;
  font-weight: 900;
  text-decoration: none;
}

.error {
  margin-top: 14px;
  color: #b91c1c;
  font-size: 13px;
  text-align: center;
  display: none;
}
