/* ════════════════════════════════════════════════════════════
   Bear Swipe. The module sits on dark wood in both themes, so text uses
   fixed cream tones rather than theme colors.
   ════════════════════════════════════════════════════════════ */
#bear-swipe-home { color: #f6ecdc; }
.bs-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.bs-title { font-size: 1.15rem; font-weight: 800; color: #fff3e0; letter-spacing: .01em; }
.bs-sub { font-size: .8rem; line-height: 1.45; color: #e3d1b6; margin-top: 2px; max-width: 36ch; }
.bs-sub b { color: #fff3e0; }
.bs-header-btns { display: flex; gap: 6px; flex: 0 0 auto; }
.bs-icon-btn {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font: inherit; font-weight: 800;
  color: #fff3e0; background: rgba(255, 236, 205, .12); border: 1px solid rgba(255, 226, 188, .3);
}
.bs-progress-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.bs-progress { flex: 1; height: 6px; border-radius: 99px; background: rgba(255, 236, 205, .14); overflow: hidden; }
.bs-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #e7c48a, #a8d5a2); transition: width .35s ease; }
.bs-count { font-size: .72rem; font-weight: 700; color: #d8c4a7; min-width: 34px; text-align: right; }

/* Stage and cards */
.bs-stage { position: relative; height: min(64vh, 420px); margin-bottom: 12px; }
.bs-stage.hidden { display: none; }
.bs-loading { display: grid; place-items: center; height: 100%; color: #e3d1b6; font-size: .9rem; text-align: center; padding: 0 20px; }
.bs-card {
  position: absolute; inset: 0; border-radius: 18px; overflow: hidden; background: #2a1c12;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .45); touch-action: pan-y; user-select: none; -webkit-user-select: none;
  transition: transform .28s cubic-bezier(.2, .9, .3, 1.2); will-change: transform; --no: 0; --yes: 0;
}
.bs-card.is-dragging { transition: none; cursor: grabbing; }
.bs-next { transform: scale(.94) translateY(12px); filter: brightness(.7); pointer-events: none; }
.bs-photo { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.bs-info {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 16px 34px;
  background: linear-gradient(transparent, rgba(12, 7, 4, .88));
}
.bs-cuisine {
  display: inline-block; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #2a1a0e; background: #e7c48a; padding: 3px 8px; border-radius: 99px;
}
.bs-dish { font-size: 1.6rem; font-weight: 800; color: #fff; line-height: 1.15; margin-top: 6px; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.bs-credit {
  position: absolute; left: 16px; right: 16px; bottom: 10px; font-size: .62rem; color: rgba(255, 243, 224, .7);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none;
}
.bs-hint {
  position: absolute; top: 22px; padding: 6px 14px; border-radius: 10px; font-size: 1.5rem; font-weight: 900;
  letter-spacing: .06em; border: 4px solid; pointer-events: none; opacity: 0;
}
.bs-hint-no { right: 18px; color: #ff8a7a; border-color: #ff8a7a; transform: rotate(12deg); opacity: var(--no); }
.bs-hint-yes { left: 18px; color: #b6f0a8; border-color: #b6f0a8; transform: rotate(-12deg); opacity: var(--yes); }

/* Buttons */
.bs-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bs-actions.hidden { display: none; }
.bs-btn {
  font: inherit; font-size: 1rem; font-weight: 800; cursor: pointer; min-height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .12s ease;
}
.bs-btn:active { transform: scale(.95); }
.bs-btn span { font-size: 1.2rem; }
.bs-btn-no { color: #ffd6cf; background: rgba(207, 109, 99, .2); border: 2px solid rgba(255, 138, 122, .6); }
.bs-btn-yes { color: #10220e; background: linear-gradient(135deg, #b6f0a8, #e7c48a); border: 2px solid transparent; }

/* ── No: claw slash, then the card tears in two ── */
.bs-claw { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.bs-claw svg { width: 100%; height: 100%; overflow: visible; }
/* Each gouge is revealed along its path by an animated mask stroke. */
.bs-claw-reveal {
  fill: none; stroke: #fff; stroke-width: 12; stroke-linecap: round;
  stroke-dasharray: 130; stroke-dashoffset: 130;
  animation: bs-rake .15s cubic-bezier(.7, 0, .9, .5) forwards;
}
#bs-claw-m1 .bs-claw-reveal { animation-delay: .05s; }
#bs-claw-m2 .bs-claw-reveal { animation-delay: .1s; }
.bs-gouge { fill: #1a0a05; }
.bs-gouge-edge { fill: none; stroke: rgba(255, 214, 170, .9); stroke-width: .45; vector-effect: non-scaling-stroke; }
.bs-claw svg { filter: drop-shadow(0 0 4px rgba(200, 60, 30, .55)) drop-shadow(1px 2px 2px rgba(0, 0, 0, .6)); }
@keyframes bs-rake { to { stroke-dashoffset: 0; } }
.bs-half { transition: transform .9s cubic-bezier(.4, 0, .9, .6), opacity .9s ease-in; pointer-events: none; }
.bs-half .bs-hint { display: none; }
/* The halves are copies of the card; keep their claw marks fully drawn
   instead of letting the copied animation rake in again from nothing. */
.bs-half .bs-claw-reveal { animation: none; stroke-dashoffset: 0; }
.bs-half-a { clip-path: polygon(0 0, 46% 0, 52% 18%, 44% 34%, 58% 52%, 50% 70%, 64% 86%, 58% 100%, 0 100%); }
.bs-half-b { clip-path: polygon(46% 0, 100% 0, 100% 100%, 58% 100%, 64% 86%, 50% 70%, 58% 52%, 44% 34%, 52% 18%); }
.bs-half-a.go { transform: translate(-70px, 140px) rotate(-14deg); opacity: 0; }
.bs-half-b.go { transform: translate(70px, 160px) rotate(12deg); opacity: 0; }

/* ── Yes: a bite out of the corner, NOM, crumbs ── */
.bs-card.bs-bite-1 {
  -webkit-mask: radial-gradient(circle 42px at calc(100% - 6px) 6px, transparent 98%, #000 100%);
          mask: radial-gradient(circle 42px at calc(100% - 6px) 6px, transparent 98%, #000 100%);
}
.bs-card.bs-bite-2 {
  -webkit-mask:
    radial-gradient(circle 34px at calc(100% - 66px) 4px, transparent 98%, #000 100%),
    radial-gradient(circle 46px at calc(100% - 4px) 4px, transparent 98%, #000 100%),
    radial-gradient(circle 34px at calc(100% - 4px) 64px, transparent 98%, #000 100%);
  -webkit-mask-composite: source-in;
          mask:
    radial-gradient(circle 34px at calc(100% - 66px) 4px, transparent 98%, #000 100%),
    radial-gradient(circle 46px at calc(100% - 4px) 4px, transparent 98%, #000 100%),
    radial-gradient(circle 34px at calc(100% - 4px) 64px, transparent 98%, #000 100%);
          mask-composite: intersect;
}
.bs-nom {
  position: absolute; top: 34%; left: 50%; z-index: 6; pointer-events: none;
  font-size: 3.2rem; font-weight: 900; color: #fff3e0; letter-spacing: .04em;
  -webkit-text-stroke: 3px #3a2210; paint-order: stroke fill;
  text-shadow: 0 6px 0 #c8862a, 0 10px 18px rgba(0, 0, 0, .45);
  animation: bs-nom .5s cubic-bezier(.3, 1.6, .5, 1) forwards;
}
@keyframes bs-nom {
  0% { transform: translate(-50%, -50%) scale(.2) rotate(-25deg); opacity: 0; }
  60% { transform: translate(-50%, -50%) scale(1.25) rotate(-8deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1) rotate(-10deg); opacity: 1; }
}
.bs-crumb {
  position: absolute; top: 18px; right: 22px; width: 8px; height: 6px; border-radius: 2px; z-index: 6;
  background: #d9a35b; pointer-events: none; animation: bs-crumb .6s ease-out forwards;
}
.bs-crumb:nth-child(odd) { background: #f3d7a4; width: 6px; height: 6px; border-radius: 50%; }
@keyframes bs-crumb {
  to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; }
}
.bs-card.bs-fly-right { transition: transform .38s ease-in, opacity .38s ease-in; transform: translateX(130%) rotate(16deg) !important; opacity: 0; }

/* ── Result ── */
.bs-result { padding: 6px 2px 4px; text-align: center; }
.bs-result.hidden { display: none; }
.bs-result-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #e7c48a; }
.bs-result-title { font-size: 2rem; font-weight: 900; color: #fff3e0; line-height: 1.1; margin: 4px 0 6px; }
.bs-result-sub { font-size: .86rem; color: #e3d1b6; margin: 0 0 12px; }
.bs-result-sub strong { color: #fff3e0; }
.bs-collage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.bs-collage img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.bs-bars { display: grid; gap: 6px; margin: 0 auto 14px; max-width: 340px; text-align: left; }
.bs-bar { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; color: #fff3e0; }
.bs-bar i { display: block; height: 8px; border-radius: 99px; background: linear-gradient(90deg, #e7c48a, #a8d5a2); }
.bs-result-actions { display: grid; gap: 8px; }
.bs-result-actions .btn-ghost { color: #e3d1b6; }

@media (prefers-reduced-motion: reduce) {
  .bs-card, .bs-half, .bs-card.bs-fly-right { transition: opacity .2s ease !important; }
  .bs-half-a.go, .bs-half-b.go { transform: none; }
  .bs-claw path { animation-duration: .01s; }
  .bs-nom, .bs-crumb { animation-duration: .01s; }
}
