@layer stars {
  /* Game container */
  .swipe-game {
    padding: 1.5rem 1.5rem 1.75rem;
    user-select: none;
  }

  .swipe-game__header {
    text-align: center;
    margin-bottom: 1.25rem;
    padding-right: 2rem;
  }

  .swipe-game__title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--color-accent-gold);
    margin-bottom: 0.25rem;
  }

  .swipe-game__subtitle {
    font-size: 0.8rem;
    color: var(--color-text-muted);
  }

  /* Progress bar */
  .swipe-game__progress-bar {
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    margin-bottom: 1.25rem;
    overflow: hidden;
  }

  .swipe-game__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent-gold-dim), var(--color-accent-gold));
    border-radius: 2px;
    transition: width 300ms var(--ease-out);
  }

  /* Card deck area */
  .swipe-game__deck {
    position: relative;
    height: 180px;
    margin-bottom: 1.25rem;
    overflow: hidden;
  }

  .swipe-game__deck--result {
    height: auto;
    overflow: visible;
  }

  /* Individual swipe card */
  .game-card {
    position: absolute;
    inset: 0;
    background: var(--color-bg-card-alt);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    text-align: center;
    cursor: grab;
    touch-action: none; /* prevent page scroll while swiping */
    will-change: transform;
    transition: box-shadow var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
  }

  .game-card:active {
    cursor: grabbing;
  }

  .game-card__emoji {
    font-size: 2rem;
    margin-bottom: 0.625rem;
    pointer-events: none;
  }

  .game-card__statement {
    font-size: 1rem;
    color: var(--color-text-primary);
    line-height: 1.5;
    pointer-events: none;
  }

  /* Swipe indicators on card */
  .game-card__indicator {
    position: absolute;
    top: 0.875rem;
    font-size: 1.5rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity 80ms ease;
    pointer-events: none;
  }

  .game-card__indicator--true {
    left: 0.875rem;
    color: #4ade80;
  }

  .game-card__indicator--false {
    right: 0.875rem;
    color: #f87171;
  }

  /* Hint row */
  .swipe-game__hints {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    padding: 0 0.25rem;
  }

  .swipe-game__hint--true {
    color: #4ade80;
  }

  .swipe-game__hint--false {
    color: #f87171;
  }

  /* Score */
  .swipe-game__score {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
  }

  .swipe-game__score strong {
    color: var(--color-accent-gold);
  }

  /* Result screen */
  .swipe-game__result {
    text-align: center;
    padding: 1rem 0 0.5rem;
    animation: resultFadeIn 400ms var(--ease-out) both;
  }

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

  .swipe-game__result-emoji {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 0.75rem;
  }

  .swipe-game__result-score {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-accent-gold);
    margin-bottom: 0.5rem;
  }

  .swipe-game__result-msg {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }

  .swipe-game__restart-btn {
    padding: 0.625rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--color-accent-gold);
    border: 1px solid rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.08);
    transition: background var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
  }

  .swipe-game__restart-btn:hover {
    background: rgba(251, 191, 36, 0.16);
  }

  /* Stack effect for next cards */
  .game-card--behind {
    transform: scale(0.95) translateY(6px);
    pointer-events: none;
    z-index: 0;
  }

  .game-card--active {
    z-index: 2;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  }
}
