/* Puzzle Feed — Warm Literary design system
 *
 * Tokens: --bg #faf7f2, --card #ffffff, --border #d8d0c4,
 *         --text #33302b, --text-dim #8a8378, --text-light #b0a89c,
 *         --green #4a8c5c
 * Fonts:  Instrument Serif (display), DM Sans (body)
 */

/* ── Section ── */

.feed-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border, #d8d0c4);
}

.feed-section__title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--text, #33302b);
  margin: 0 0 16px 0;
  letter-spacing: -0.01em;
}

/* ── Feed List ── */

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Base Card ── */

.feed-card {
  background: var(--card, #ffffff);
  border: 1px solid var(--border, #d8d0c4);
  border-radius: 10px;
  padding: 14px 16px;
  transition: box-shadow 0.15s ease;
  cursor: pointer;
}

.feed-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ── Archive Card ── */

.feed-card--archive {
  border-left: 3px solid var(--border, #d8d0c4);
  padding-left: 14px;
}

/* Tinctionary wheel widget */
.feed-card__wheel-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 12px 0 8px;
  user-select: none;
}
.feed-wheel-svg {
  width: 180px;
  height: 180px;
  cursor: grab;
  touch-action: none;
}
.feed-wheel-svg:active { cursor: grabbing; }
.feed-wheel-group {
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feed-wheel-submit {
  margin-top: 10px;
  padding: 10px 22px;
  background: var(--green, #4a8c5c);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(74, 140, 92, 0.3);
  transition: opacity 0.25s ease, background 0.2s ease, box-shadow 0.25s ease;
}
.feed-wheel-submit:hover { background: #3d7349; }
.feed-wheel-submit--disabled,
.feed-wheel-submit--disabled:hover {
  opacity: 0.45;
  cursor: default;
  background: var(--green, #4a8c5c);
  box-shadow: 0 1px 3px rgba(74, 140, 92, 0.15);
}

/* Voltr cards: occasional electric shimmer (lightning streak across the card) */
.feed-card--voltr {
  position: relative;
  overflow: hidden;
}
.feed-card--voltr::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 217, 61, 0.0) 40%,
    rgba(255, 217, 61, 0.55) 50%,
    rgba(255, 255, 255, 0.7) 51%,
    rgba(255, 217, 61, 0.55) 52%,
    rgba(255, 217, 61, 0.0) 60%,
    transparent 65%
  );
  pointer-events: none;
  animation: voltrShimmer 9s ease-in-out infinite;
  animation-delay: 2s;
  z-index: 1;
}
.feed-card--voltr > * { position: relative; z-index: 2; }
@keyframes voltrShimmer {
  0%, 88% { left: -120%; opacity: 0; }
  89% { opacity: 1; }
  100% { left: 120%; opacity: 1; }
}

.feed-card__date {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 16px;
  color: var(--text-light, #b0a89c);
}

.feed-card__teaser {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 21px;
  font-weight: 400;
  color: var(--text, #33302b);
  margin: 0 0 10px 0;
  line-height: 1.35;
}

.feed-card__cta {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--green, #4a8c5c);
  text-decoration: none;
  display: inline-block;
  padding: 6px 0;
  transition: opacity 0.15s ease;
}

.feed-card__cta:hover {
  opacity: 0.75;
}

/* ── Digest Card (progress ring) ── */

.feed-card--digest {
  text-align: center;
  padding: 18px 16px;
  background: linear-gradient(135deg, var(--card, #ffffff), #f8f5ef);
}

.feed-card__digest-title {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-dim, #8a8378);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.feed-card__ring {
  display: block;
  margin: 0 auto 10px;
}

.feed-card__ring-text {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 18px;
  font-weight: 700;
  fill: var(--text, #33302b);
}

.feed-card__digest-sub {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 18px;
  color: var(--text-dim, #8a8378);
  margin: 0;
  line-height: 1.4;
}

/* ── Streak Card ── */

.feed-card--streak {
  text-align: center;
  padding: 20px 16px;
  background: linear-gradient(135deg, #faf6e8, #f5efe0);
  border-color: #e8d9a8;
}

.feed-card__streak-badge {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 8px;
}

.feed-card__streak-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--text, #33302b);
  margin-bottom: 6px;
}

.feed-card__streak-sub {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 17px;
  color: var(--text-dim, #8a8378);
  margin: 0;
}

/* ── Capsule Card (time capsule) ── */

.feed-card--capsule {
  background: linear-gradient(135deg, #f4f1eb, #eee9e0);
  border-style: dashed;
}

.feed-card__capsule-label {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dim, #8a8378);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.feed-card__capsule-body {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 20px;
  color: var(--text, #33302b);
  margin: 0 0 10px 0;
  line-height: 1.35;
}

/* ── Archive Card Footer ── */

.feed-card__footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.feed-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.feed-card__replay-badge {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--green, #4a8c5c);
  background: rgba(74, 140, 92, 0.1);
  padding: 2px 7px;
  border-radius: 8px;
  line-height: 1.3;
}

/* ── Game Icons ── */

.feed-game-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-weight: 700;
  overflow: hidden;
}

.feed-game-icon--hangeru {
  background: #5b6abf;
  font-family: 'DM Sans', -apple-system, sans-serif;
}

.feed-game-icon--mirage {
  background: #3d7d74;
  font-family: Georgia, serif;
  font-style: italic;
}

.feed-game-icon--tinctionary {
  background: #b07850;
}

.feed-game-icon--longest-thread {
  background: #9b7b8b;
}

.feed-game-icon--voltr {
  background: #1a1a1a;
}

/* ── Dot Preview (Longest Thread) ── */

.feed-card__dot-preview {
  width: 120px;
  height: 60px;
  display: block;
  margin-bottom: 6px;
  overflow: visible;
}

.feed-dot-glow {
  opacity: 0.35;
  animation: feedBreatheGlow 3s ease-in-out infinite;
}

@keyframes feedBreatheGlow {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.55; }
}

/* ── Email Opt-in Card ── */

.feed-card--email-optin {
  text-align: center;
  padding: 20px 16px;
  background: linear-gradient(135deg, var(--card, #ffffff), #f5f1ea);
}

.feed-card__optin-icons {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.feed-card__optin-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--text, #33302b);
  margin-bottom: 6px;
}

.feed-card__optin-body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 18px;
  color: var(--text-dim, #8a8378);
  margin: 0 0 14px 0;
  line-height: 1.4;
}

.feed-card__optin-btn {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  background: var(--green, #4a8c5c);
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.feed-card__optin-btn:hover {
  opacity: 0.85;
}

.feed-card--optin-done {
  opacity: 0.7;
}

/* ── Scroll Sentinel ── */

.feed-scroll-sentinel {
  height: 1px;
}

/* ── Skeleton Loading ── */

.feed-card--skeleton {
  pointer-events: none;
  padding: 16px;
}

.feed-skeleton__line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #ece7de 25%, #f5f1ea 50%, #ece7de 75%);
  background-size: 200% 100%;
  animation: feedSkeleton 1.5s ease infinite;
  margin-bottom: 10px;
}

.feed-skeleton__line:last-child {
  margin-bottom: 0;
}

.feed-skeleton__line--short {
  width: 40%;
}

.feed-skeleton__line--medium {
  width: 70%;
}

.feed-skeleton__line--long {
  width: 100%;
}

@keyframes feedSkeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Test Kitchen Card ── */

.feed-card--test-kitchen {
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.8);
  border-left: 4px solid #6b9fbe;
  position: relative;
  overflow: hidden;
}

.feed-card--test-kitchen::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255,255,255,0.2) 45%,
    rgba(255,255,255,0.4) 50%,
    rgba(255,255,255,0.2) 55%,
    transparent 60%
  );
  animation: tkRefraction 8s ease-in-out infinite;
  pointer-events: none;
  opacity: 0.3;
}

@keyframes tkRefraction {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.feed-card__tk-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #6b9fbe;
  margin-bottom: 6px;
}

.feed-card__tk-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--text, #33302b);
  margin-bottom: 4px;
}

.feed-card__tk-body {
  font-size: 13px;
  color: var(--text-dim, #8a8378);
  line-height: 1.4;
  margin-bottom: 8px;
}
