/* No-RAM dispatch test */
/* =============================================================================
   CARD DESIGN SYSTEM - 6 Distinct Card Types

   Each card type has a unique visual identity:
   1. Quest Card    - LEFT accent bar, checklist, progress
   2. Service Card  - TOP stripe, provider badge, status
   3. House Quest   - DOUBLE border, gradient bg, probability
   4. Pack Card     - PORTRAIT, rounded, rarity glow
   5. Shop Card     - SHARP corners, product image, price tag
   6. Feed Card     - FULL WIDTH, avatar header, engagement
   ============================================================================= */

/* =============================================================================
   SHARED CARD BASE
   ============================================================================= */
.card-base {
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    overflow: hidden;
    transition: transform var(--duration-normal) var(--ease-default),
                box-shadow var(--duration-normal) var(--ease-default),
                border-color var(--duration-normal) var(--ease-default);
}

.card-base:hover {
    border-color: var(--border-strong);
}

/* =============================================================================
   1. QUEST CARD
   Left accent bar in house color, checklist, progress bar, XP badge
   ============================================================================= */
/* Quest Card V2 — Shop/shared exterior card
   Hero-image card: avatar + reward pills top, title, details, full-width hero image.
   No progress bar, no checklist, no button. Entire card is clickable. */
/* =============================================================================
   QUEST CARD V2 — DS Component (ds-quest-card)
   Layout: content (avatar, title, details, description, rewards) on TOP
           hero image on BOTTOM flush to card edges (full-width, no padding)
   ============================================================================= */
.quest-card-v2 {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 300px;
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-card);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--duration-normal) var(--ease-default),
                box-shadow var(--duration-normal) var(--ease-default);
}

.quest-card-v2:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Hero image — BOTTOM of card, full-width flush to edges */
.quest-card-v2__hero-image {
    padding: 0;
    margin-top: auto;
}

.quest-card-v2__hero-img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    border-radius: 0;
    background: var(--surface-tertiary);
}

/* Creator row: avatar + name in body area */
.quest-card-v2__creator {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.quest-card-v2__avatar {
    width: var(--size-8);
    height: var(--size-8);
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--surface-primary);
    box-shadow: var(--shadow-sm);
}

.quest-card-v2__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Creator name — inline text (no longer a floating pill) */
.quest-card-v2__creator-name {
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    line-height: var(--leading-snug);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Card body: title, date, description, rewards */
.quest-card-v2__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--space-4);
    gap: var(--space-2);
}

/* Title */
.quest-card-v2__title {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    line-height: var(--leading-snug);
    margin: 0;
}

/* Details row */
.quest-card-v2__details {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    align-items: center;
}

.quest-card-v2__start-date,
.quest-card-v2__meta {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--status-success);
    line-height: var(--leading-normal);
}

.quest-card-v2__details-sep {
    color: var(--status-success);
    font-size: var(--text-xs);
}

/* Description */
.quest-card-v2__description {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-normal);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Reward pills — bottom of card, white bg + colored text */
.quest-card-v2__rewards {
    display: flex;
    gap: var(--space-2);
    flex-shrink: 0;
    margin-top: auto;
    padding-top: var(--space-2);
}

.quest-card-v2__reward-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    font-family: var(--font-body);
    line-height: 1;
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
}

.quest-card-v2__reward-pill--xp {
    color: var(--color-yellow-500);
}

.quest-card-v2__reward-pill--coiny {
    color: var(--color-teal-600);
}

.quest-card-v2__reward-pill svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Compact variant — smaller for grid/scroll rows */
.quest-card-v2--compact {
    width: 260px;
}

.quest-card-v2--compact .quest-card-v2__body {
    padding: var(--space-3) var(--space-4);
    gap: var(--space-2);
}

.quest-card-v2--compact .quest-card-v2__avatar {
    width: var(--size-6);
    height: var(--size-6);
}

.quest-card-v2--compact .quest-card-v2__title {
    font-size: var(--text-base);
}

.quest-card-v2--compact .quest-card-v2__hero-img {
    aspect-ratio: 16 / 9;
}

/* House color variants — tints the avatar ring */
.quest-card-v2--courage  { --quest-house-color: var(--color-red-600); }
.quest-card-v2--integrity { --quest-house-color: var(--color-purple-600); }
.quest-card-v2--focus    { --quest-house-color: var(--color-green-600); }
.quest-card-v2--wisdom   { --quest-house-color: var(--color-purple-600); }
.quest-card-v2--signal   { --quest-house-color: var(--color-green-500); }
.quest-card-v2--wave-maker { --quest-house-color: var(--color-blue-500); }
.quest-card-v2--fun      { --quest-house-color: var(--color-orange-500); }

.quest-card-v2[class*="--courage"] .quest-card-v2__avatar,
.quest-card-v2[class*="--integrity"] .quest-card-v2__avatar,
.quest-card-v2[class*="--focus"] .quest-card-v2__avatar,
.quest-card-v2[class*="--wisdom"] .quest-card-v2__avatar,
.quest-card-v2[class*="--signal"] .quest-card-v2__avatar,
.quest-card-v2[class*="--wave-maker"] .quest-card-v2__avatar,
.quest-card-v2[class*="--fun"] .quest-card-v2__avatar {
    border-color: var(--quest-house-color);
}

/* =============================================================================
   1b. QUEST CHANNEL CARD
   Horizontal ticket-shaped card for pinning to channel/page headers.
   White bg, black outline, hero image left, details right.
   ============================================================================= */
.quest-channel-card {
    display: flex;
    width: 460px;
    max-width: 100%;
    height: 150px;
    background: var(--surface-primary);
    border: 1px solid var(--color-black, #000);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--duration-normal) var(--ease-default),
                box-shadow var(--duration-normal) var(--ease-default);
}

.quest-channel-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.quest-channel-card__image {
    width: 40%;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--surface-tertiary);
}

.quest-channel-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.quest-channel-card__body {
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-4);
    gap: var(--space-1);
}

.quest-channel-card__title {
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    line-height: var(--leading-snug);
    margin: 0;
}

.quest-channel-card__date {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.quest-channel-card__rewards {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-1);
}

.quest-channel-card__reward-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    font-family: var(--font-body);
    line-height: 1;
}

.quest-channel-card__reward-pill--xp {
    background: var(--color-yellow-100);
    color: var(--color-yellow-500);
}

.quest-channel-card__reward-pill--coiny {
    background: var(--color-teal-100);
    color: var(--color-teal-600);
}

.quest-channel-card__reward-pill svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.quest-channel-card__desc {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: var(--leading-normal);
    margin-top: var(--space-1);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Notch accents — ticket feel */
.quest-channel-card__notch {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background: var(--surface-secondary);
}

/* =============================================================================
   1c. QUEST TICKET EMBED
   Compact horizontal card for embedding inside feed posts.
   White bg, black outline, quest image left, title + reward right.
   ============================================================================= */
.quest-ticket-embed {
    display: flex;
    width: 320px;
    max-width: 100%;
    height: 100px;
    background: var(--surface-primary);
    border: 1px solid var(--color-black, #000);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--duration-normal) var(--ease-default),
                box-shadow var(--duration-normal) var(--ease-default);
}

.quest-ticket-embed:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.quest-ticket-embed__image {
    width: 35%;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--surface-tertiary);
}

.quest-ticket-embed__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.quest-ticket-embed__body {
    width: 65%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-3);
    gap: var(--space-1);
}

.quest-ticket-embed__title {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    line-height: var(--leading-snug);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.quest-ticket-embed__rewards {
    display: flex;
    gap: var(--space-1);
}

.quest-ticket-embed__reward-pill {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px var(--space-1);
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: var(--font-semibold);
    font-family: var(--font-body);
    line-height: 1;
}

.quest-ticket-embed__reward-pill--xp {
    background: var(--color-yellow-100);
    color: var(--color-yellow-500);
}

.quest-ticket-embed__reward-pill--coiny {
    background: var(--color-teal-100);
    color: var(--color-teal-600);
}

.quest-ticket-embed__reward-pill svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

.quest-ticket-embed__meta {
    font-family: var(--font-body);
    font-size: 10px;
    color: var(--text-muted);
}

/* =============================================================================
   2. SERVICE CARD
   Top stripe in house color, provider badge, type badge, price
   ============================================================================= */
.service-card-v2 {
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--duration-normal) var(--ease-default),
                box-shadow var(--duration-normal) var(--ease-default);
}

.service-card-v2:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Top stripe */
.service-card-v2__stripe {
    height: 4px;
    background: var(--service-house-color, var(--accent-secondary));
}

.service-card-v2__body {
    padding: var(--space-4);
}

.service-card-v2__header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.service-card-v2__icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    flex-shrink: 0;
}

.service-card-v2__title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

.service-card-v2__description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-3);
}

.service-card-v2__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.service-card-v2__provider {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.service-card-v2__type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px var(--space-2);
    background: var(--surface-tertiary);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
}

.service-card-v2__status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
}

.service-card-v2__status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.service-card-v2__status-dot--active {
    background: var(--status-success);
}

.service-card-v2__status-dot--expired {
    background: var(--text-muted);
}

.service-card-v2__status-dot--expiring {
    background: var(--status-warning);
}

/* Footer with price + CTA */
.service-card-v2__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--border-default);
    background: var(--surface-secondary);
}

.service-card-v2__price {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--accent-primary);
}

.service-card-v2__action {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--duration-fast);
    text-decoration: none;
}

.service-card-v2__action:hover {
    background: var(--accent-primary);
    color: var(--color-black);
}

/* House color variants */
.service-card-v2--signal { --service-house-color: var(--color-green-500, #22c55e); }
.service-card-v2--courage { --service-house-color: var(--color-red-600, #dc2626); }
.service-card-v2--integrity { --service-house-color: var(--color-purple-600, #9333ea); }
.service-card-v2--focus { --service-house-color: var(--color-green-600, #16a34a); }
.service-card-v2--wisdom { --service-house-color: var(--color-purple-600, #9333ea); }

/* =============================================================================
   3. HOUSE QUEST CARD
   Double border, gradient bg, probability impact, community goal
   ============================================================================= */
.house-quest-card {
    background: var(--surface-secondary);
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    transition: transform var(--duration-normal) var(--ease-default),
                box-shadow var(--duration-normal) var(--ease-default);
}

.house-quest-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* Outer glow for double border effect */
.house-quest-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--hq-house-color, var(--accent-primary));
    opacity: 0.3;
    pointer-events: none;
}

.house-quest-card__gradient {
    padding: var(--space-4) var(--space-4) 0;
    background: linear-gradient(135deg,
        var(--hq-gradient-start, rgba(0, 243, 255, 0.1)),
        var(--hq-gradient-end, rgba(139, 92, 246, 0.05)));
}

.house-quest-card__house {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.house-quest-card__house-icon {
    font-size: var(--text-lg);
}

.house-quest-card__goal {
    margin-bottom: var(--space-3);
}

.house-quest-card__goal-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: var(--space-1);
}

.house-quest-card__goal-text {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--text-primary);
    line-height: var(--leading-normal);
}

/* Probability impact callout */
.house-quest-card__impact {
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    margin-bottom: var(--space-3);
}

.house-quest-card__impact-title {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: var(--space-1);
}

.house-quest-card__impact-value {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.house-quest-card__impact-arrow {
    color: var(--status-success);
    font-weight: var(--font-bold);
}

.house-quest-card__impact-delta {
    font-size: var(--text-xs);
    color: var(--status-success);
    font-weight: var(--font-medium);
}

/* Quest section */
.house-quest-card__quest {
    padding: var(--space-4);
}

.house-quest-card__quest-title {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.house-quest-card__progress-bar {
    height: 6px;
    background: var(--surface-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-1);
}

.house-quest-card__progress-fill {
    height: 100%;
    background: var(--hq-house-color, var(--accent-primary));
    border-radius: var(--radius-full);
}

.house-quest-card__progress-text {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-bottom: var(--space-3);
}

.house-quest-card__action {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-4);
    background: var(--hq-house-color, var(--accent-primary));
    color: var(--color-black);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all var(--duration-fast);
    width: 100%;
    justify-content: center;
}

.house-quest-card__action:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* =============================================================================
   4. PACK CARD
   Portrait orientation, rounded corners, rarity glow, "OWNED" indicator
   ============================================================================= */
.pack-card {
    background: var(--surface-primary);
    border: none;
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform var(--duration-normal) var(--ease-default),
                box-shadow var(--duration-normal) var(--ease-default);
    position: relative;
    /* Portrait aspect hint */
    min-height: 200px;
}

.pack-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Rarity variants */
.pack-card--common {
    border: none;
}

.pack-card--limited {
    border: 2px solid var(--color-blue-500);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}

.pack-card--limited:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
}

.pack-card--unique {
    border: 2px solid var(--color-yellow-400);
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.2);
}

.pack-card--unique:hover {
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Shimmer animation for unique items */
.pack-card--unique::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    background: linear-gradient(
        135deg,
        transparent 30%,
        rgba(250, 204, 21, 0.08) 50%,
        transparent 70%
    );
    background-size: 200% 200%;
    animation: pack-shimmer 3s ease-in-out 3;
    pointer-events: none;
}

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

/* Rarity badge */
.pack-card__rarity {
    padding: var(--space-2) var(--space-3);
    width: 100%;
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.pack-card--common .pack-card__rarity {
    background: var(--surface-tertiary);
    color: var(--text-muted);
}

.pack-card--limited .pack-card__rarity {
    background: rgba(59, 130, 246, 0.15);
    color: var(--color-blue-500);
}

.pack-card--unique .pack-card__rarity {
    background: rgba(250, 204, 21, 0.15);
    color: var(--color-yellow-400);
}

/* Image area */
.pack-card__image {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: var(--space-3) 0;
}

.pack-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.pack-card__image [data-lucide],
.pack-card__image svg {
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
}

/* Item info */
.pack-card__name {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    padding: 0 var(--space-3);
    margin-bottom: var(--space-1);
}

.pack-card__description {
    font-size: var(--text-xs);
    color: var(--text-muted);
    padding: 0 var(--space-3);
    line-height: var(--leading-normal);
    margin-bottom: var(--space-2);
}

/* Owned indicator */
.pack-card__owned {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    width: 100%;
    border-top: 1px solid var(--border-default);
    margin-top: auto;
}

.pack-card__owned-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--status-success);
}

.pack-card__owned-text {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--text-muted);
}

.pack-card__date {
    font-size: 10px;
    color: var(--text-muted);
    padding-bottom: var(--space-2);
}

/* =============================================================================
   5. SHOP CARD
   Sharp corners, product image, price tag, BUY NOW button
   ============================================================================= */
.shop-card-v2 {
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--duration-normal) var(--ease-default),
                box-shadow var(--duration-normal) var(--ease-default);
}

.shop-card-v2:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-primary);
}

/* Product image */
.shop-card-v2__image {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: var(--surface-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-card-v2__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-card-v2__image-placeholder {
    font-size: 3rem;
    color: var(--text-muted);
}

/* Gradient fallback */
.shop-card-v2__image--gradient {
    background: linear-gradient(135deg, var(--surface-tertiary), var(--surface-secondary));
}

.shop-card-v2__body {
    padding: var(--space-3);
}

.shop-card-v2__name {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    overflow-wrap: break-word;
    word-break: break-word;
}

.shop-card-v2__description {
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: var(--leading-normal);
    margin-bottom: var(--space-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
    word-break: break-word;
}

.shop-card-v2__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.shop-card-v2__category {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px var(--space-2);
    background: var(--surface-tertiary);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.shop-card-v2__duration {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* Price + buy section */
.shop-card-v2__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
    border-top: 1px solid var(--border-default);
}

.shop-card-v2__price {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--accent-primary);
}

.shop-card-v2__price-icon {
    font-size: var(--text-base);
}

.shop-card-v2__buy-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-4);
    background: var(--accent-primary);
    color: var(--color-dark-900);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    cursor: pointer;
    transition: all var(--duration-fast);
}

.shop-card-v2__buy-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 243, 255, 0.3);
}

.shop-card-v2__buy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.shop-card-v2__buy-btn--owned {
    background: var(--surface-tertiary);
    color: var(--text-muted);
    cursor: default;
}

.shop-card-v2__buy-btn--owned:hover {
    filter: none;
    transform: none;
    box-shadow: none;
}

/* =============================================================================
   6. FEED CARD — Unified post card (feed, chat channels, discussion drawer)
   ============================================================================= */
.feed-card {
    position: relative;
    background: var(--feed-card-bg, var(--surface-primary, var(--bg-card)));
    border: var(--feed-card-border, 1px solid var(--border-default, var(--border-color)));
    border-radius: var(--feed-card-radius, var(--radius-md, 24px));
    padding: var(--feed-card-padding, var(--space-2) var(--space-3));
    box-shadow: var(--feed-card-shadow, 0 4px 20px -2px rgba(0, 0, 0, 0.05));
    font-family: var(--font-body, 'Inter', sans-serif);
}

/* Floating cards inside house activity feeds (dark context) */
.house-overview-feed .feed-card {
    border-radius: 24px;
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Floating cards inside discussion drawer (light context — must match feed/Paper Layer cards) */
.discussion-drawer-content .feed-card {
    background: var(--feed-card-bg, var(--surface-primary));
    border-radius: var(--feed-card-radius, 24px);
    border: var(--feed-card-border, 1px solid var(--border-default));
    box-shadow: var(--feed-card-shadow, 0 4px 20px -2px rgba(0, 0, 0, 0.05));
    padding: var(--feed-card-padding, 16px 24px 24px);
}

/* DS Card Header — avatar + meta + menu */
.feed-card__header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

/* DS Avatar: user avatar primary (48px), house badge secondary (20px) */
.feed-card__avatar-wrap {
    position: relative;
    width: var(--feed-card-avatar-size);
    height: var(--feed-card-avatar-size);
    flex-shrink: 0;
}

.feed-card__avatar-wrap a {
    display: block;
}

.feed-card__avatar {
    width: var(--feed-card-avatar-size);
    height: var(--feed-card-avatar-size);
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-subtle);
}

.feed-card__house-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: var(--feed-card-avatar-badge-size);
    height: var(--feed-card-avatar-badge-size);
    border-radius: 50%;
    border: 2px solid var(--border-subtle);
    object-fit: cover;
}

/* DS Meta */
.feed-card__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.feed-card__author-line {
    font-weight: var(--feed-card-author-weight);
    font-size: var(--feed-card-author-size);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.feed-card__author-link {
    color: inherit;
    text-decoration: none;
}

.feed-card__author-link:hover {
    color: var(--accent-primary);
}

.feed-card__channel-line {
    font-size: var(--feed-card-channel-size);
    color: var(--text-muted);
    font-weight: var(--font-medium);
}

.feed-card__channel-link {
    color: inherit;
    text-decoration: none;
}

.feed-card__channel-link:hover {
    color: var(--accent-primary);
}

/* Legacy classes kept for house pages / discussion drawers */
.feed-card__identity {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.feed-card__icon-stack {
    position: relative;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.feed-card__house-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md, 8px);
    object-fit: cover;
}

.feed-card__avatar-badge-link {
    position: absolute;
    bottom: -3px;
    right: -3px;
    display: block;
    border-radius: var(--radius-full, 50%);
    z-index: 1;
}

.feed-card__avatar-badge-link:hover {
    opacity: 0.85;
}

.feed-card__avatar-badge {
    width: var(--feed-card-avatar-badge-size, 32px);
    height: var(--feed-card-avatar-badge-size, 32px);
    border-radius: var(--radius-full, 50%);
    object-fit: cover;
    border: 2px solid var(--border-subtle);
    background: var(--surface-primary);
}

/* Title link wrapping house name + channel */
.feed-card__title-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    color: inherit;
}

.feed-card__title-link:hover .feed-card__house-name {
    color: var(--accent-primary);
}

.feed-card__title-link:hover .feed-card__channel-name {
    filter: brightness(1.2);
}

/* Content link */
.feed-card__content-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.feed-card__content-link:hover .feed-card__content {
    color: var(--text-primary);
}

/* Line 1: House Name | r/thread (feed) or just r/thread (chat/discussion) */
.feed-card__title-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.feed-card__house-name {
    font-size: var(--feed-card-author-size, var(--text-base));
    color: var(--text-primary);
    font-weight: var(--feed-card-author-weight, var(--font-bold));
}

.feed-card__separator {
    color: var(--text-muted);
    font-size: var(--text-xs, 12px);
}

.feed-card__channel-name {
    display: inline;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-black);
    background: var(--highlight-yellow);
    padding: 0 var(--space-1);
    vertical-align: baseline;
}

/* Line 2: Username (Value) · Time */
.feed-card__byline {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
}

.feed-card__author-name {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: var(--font-medium);
}

.feed-card__author-name:hover {
    color: var(--accent-primary, var(--accent));
    text-decoration: underline;
}

.feed-card__value-tag {
    font-size: var(--text-xs, 10px);
    color: var(--text-muted);
    font-weight: var(--font-medium, 500);
    letter-spacing: .02em;
}

.feed-card__dot {
    color: var(--text-muted);
}

.feed-card__time {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* Three-dot menu — pushed right via auto margin */
.feed-card__menu-wrap {
    position: relative;
    flex-shrink: 0;
    margin-left: auto;
}

.feed-card__menu-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    transition: all var(--duration-fast);
}

.feed-card__menu-btn:hover {
    color: var(--text-primary);
    background: var(--interactive-hover);
}

.feed-card__menu-btn i {
    width: var(--size-5);
    height: var(--size-5);
}

.feed-card__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--space-1);
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-1);
    min-width: 180px;
    z-index: var(--z-dropdown);
    box-shadow: var(--shadow-xl);
}

.feed-card__dropdown.open {
    display: block;
}

.feed-card__dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast);
    white-space: nowrap;
}

.feed-card__dropdown-item:hover {
    background: var(--interactive-hover);
    color: var(--text-primary);
}

.feed-card__dropdown-item i {
    width: var(--size-4);
    height: var(--size-4);
    flex-shrink: 0;
}

.feed-card__dropdown-item--report {
    color: var(--status-error);
}
.feed-card__dropdown-item--report:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--status-error);
}

/* Pinned badge */
.feed-card__pinned-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--accent-primary);
    background: var(--accent-primary-subtle);
    border: 1px solid var(--accent-primary-subtle);
    border-radius: var(--radius-full);
    padding: 2px var(--space-2);
    margin-bottom: var(--space-2);
}

/* App embed card */
.feed-card__app-embed {
    display: flex;
    align-items: center;
    gap: var(--space-3, 10px);
    padding: var(--space-3, 10px) var(--space-3, 12px);
    background: var(--surface-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md, 24px);
    margin-bottom: var(--space-3);
    cursor: pointer;
    transition: background 0.15s;
}
.feed-card__app-embed:hover {
    background: var(--surface-tertiary);
}
.feed-card__app-embed-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md, 24px);
    object-fit: cover;
    flex-shrink: 0;
}
.feed-card__app-embed-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.feed-card__app-embed-name {
    font-size: var(--feed-card-channel-size);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}
.feed-card__app-embed-desc {
    font-size: var(--text-xs);
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Floating admin menu for drop posts */
.feed-card__drop-admin-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

/* Drop post — remove feed-card padding so card fills edge-to-edge */
.feed-card:has(.feed-card__drop-embed) {
    padding: 0;
    overflow: hidden;
}
.feed-card:has(.feed-card__drop-embed) .feed-card__actions {
    padding: 0 16px 12px;
}

/* Drop embed card — premium featured layout */
.feed-card__drop-embed {
    cursor: pointer;
}
.feed-card__drop-embed-hero {
    position: relative;
    height: 180px;
    overflow: hidden;
}
.feed-card__drop-embed-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.feed-card__drop-embed-hero-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(17,19,24,0.95) 100%);
}
.feed-card__drop-embed-badge {
    position: absolute;
    bottom: 12px;
    right: 14px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    backdrop-filter: blur(8px);
    z-index: 2;
}
.feed-card__drop-embed-badge--free {
    background: var(--accent-primary-subtle);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary-subtle);
}
.feed-card__drop-embed-badge--usd {
    background: var(--accent-tertiary-subtle);
    color: var(--color-purple-300, #c4b5fd);
    border: 1px solid var(--accent-tertiary-subtle);
}
.feed-card__drop-embed-badge--coiny {
    background: var(--status-success-subtle);
    color: var(--color-green-400, #4ade80);
    border: 1px solid var(--status-success-subtle);
}
.feed-card__drop-embed-body {
    padding: 14px 16px;
}
.feed-card__drop-embed-info {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}
.feed-card__drop-embed-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}
.feed-card__drop-embed-icon-fallback {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0,243,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent-primary);
}
.feed-card__drop-embed-text-wrap {
    flex: 1;
    min-width: 0;
}
.feed-card__drop-embed-name {
    font-size: 15px;
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: 2px;
}
.feed-card__drop-embed-desc {
    font-size: var(--feed-card-channel-size);
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.feed-card__drop-embed-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}
.feed-card__drop-embed-content {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}
.feed-card__drop-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    font-size: var(--feed-card-channel-size);
    font-weight: var(--font-bold);
    border-radius: 20px;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.feed-card__drop-cta:hover { opacity: 0.85; }
.feed-card__drop-cta--free {
    background: var(--accent-primary);
    color: var(--color-black);
}
.feed-card__drop-cta--usd {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: var(--text-inverse);
}
.feed-card__drop-cta--coiny {
    background: rgba(34,197,94,0.12);
    color: #4ade80;
    border: 1px solid rgba(34,197,94,0.2);
}

/* Post image — "long first": respect intrinsic aspect, cap height */
.feed-card__image {
    margin-bottom: var(--space-3);
    border-radius: var(--radius-md, 24px);
    overflow: hidden;
}

.feed-card__image-img {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: var(--feed-card-tall-max, 600px);
}

/* Landscape images use shorter cap */
.feed-card__image-img.--landscape {
    max-height: var(--feed-card-image-height, 400px);
}

/* Link preview card */
.feed-card__link-preview {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md, 24px);
    overflow: hidden;
    margin-bottom: var(--space-3);
    transition: border-color var(--duration-fast);
}

.feed-card__link-preview:hover {
    border-color: var(--border-strong);
}

.feed-card__link-img {
    width: 100%;
    aspect-ratio: 2 / 1;
    display: block;
    object-fit: cover;
    max-height: 300px;
}

.feed-card__link-info {
    padding: var(--space-3) var(--space-4);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feed-card__link-title {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feed-card__link-domain {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* Post content */
.feed-card__content {
    color: var(--text-primary);
    font-size: var(--feed-card-body-size);
    line-height: var(--feed-card-body-leading);
    margin-bottom: var(--space-6);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: hidden;
    max-width: 100%;
}

/* Constrain all media elements inside feed card content */
.feed-card__content img,
.feed-card__content canvas,
.feed-card__content svg,
.feed-card__content video,
.feed-card__content iframe {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

.feed-card__content pre,
.feed-card__content table {
    max-width: 100%;
    overflow-x: auto;
}

.feed-card__content--clamped {
    display: -webkit-box;
    -webkit-line-clamp: var(--feed-card-clamp-lines, 3);
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
}

.feed-card__show-more {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--text-sm);
    cursor: pointer;
    padding: 0;
    margin-bottom: 4px;
}

.feed-card__show-more:hover {
    color: var(--text-secondary);
}

/* DS Full-bleed image card: hero image, gradient overlay, glass actions */
/* "Long first" — height adapts to content; portrait media stretches taller */
.feed-card--has-image {
    padding: 0;
    overflow: hidden;
    position: relative;
    min-height: var(--feed-card-image-min-height, 280px);
    max-height: var(--feed-card-tall-max, 600px);
    height: var(--feed-card-image-height, 400px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Portrait hero cards stretch to tall max */
.feed-card--has-image.--portrait {
    height: var(--feed-card-tall-max, 600px);
}
.feed-card--has-image .feed-card__image-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.feed-card--has-image .feed-card__image-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.feed-card--has-image .feed-card__image-gradient {
    position: absolute;
    inset: 0;
    background: var(--feed-card-image-gradient);
    z-index: 1;
    pointer-events: none;
}
.feed-card--has-image .feed-card__image-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: var(--space-6);
    box-sizing: border-box;
}
/* Header overlay on image — push to top, everything else falls to bottom */
.feed-card--has-image .feed-card__header {
    margin-bottom: auto;
}
.feed-card--has-image .feed-card__avatar {
    border: 2px solid var(--border-subtle);
}
.feed-card--has-image .feed-card__author-line,
.feed-card--has-image .feed-card__author-link {
    color: var(--text-inverse);
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.feed-card--has-image .feed-card__channel-line,
.feed-card--has-image .feed-card__channel-link,
.feed-card--has-image .feed-card__time {
    color: rgba(255,255,255,0.9);
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
.feed-card--has-image .feed-card__channel-name {
    text-shadow: none;
}
.feed-card--has-image .feed-card__value-tag {
    color: rgba(255,255,255,0.7);
}
.feed-card--has-image .feed-card__menu-btn {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.feed-card--has-image .feed-card__pinned-badge {
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
/* Content on image */
.feed-card--has-image .feed-card__content {
    color: var(--text-inverse);
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    margin-bottom: var(--space-2);
}
.feed-card--has-image .feed-card__content--short {
    font-size: var(--feed-card-image-title-size);
    font-weight: var(--feed-card-image-title-weight);
    font-family: var(--font-heading);
    letter-spacing: var(--feed-card-grand-tracking);
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
    line-height: 1.3;
}
.feed-card--has-image .feed-card__show-more {
    color: rgba(255,255,255,0.8);
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    margin-bottom: var(--space-4);
}
/* Glass action pills on image */
.feed-card--has-image .feed-card__actions {
    padding: 0;
}
.feed-card--has-image .feed-card__vote-cluster {
    background: var(--feed-card-glass-bg);
    backdrop-filter: blur(16px);
}
/* Split pill on image cards — active side goes green */
.feed-card--has-image .feed-card__action--upvote.active,
.feed-card--has-image .feed-card__action--downvote.active {
    background: var(--vote-active-bg);
    color: var(--vote-active-color);
    backdrop-filter: none;
    border-radius: var(--feed-card-action-radius);
    outline: 3px solid var(--vote-active-bg);
    position: relative;
    z-index: 1;
}
.feed-card--has-image .feed-card__action {
    color: var(--text-inverse);
}
.feed-card--has-image .feed-card__action--pill {
    background: var(--feed-card-glass-bg);
    border-color: var(--feed-card-glass-border);
    backdrop-filter: blur(16px);
    color: var(--text-inverse);
}
.feed-card--has-image .feed-card__action--share {
    background: var(--feed-card-glass-bg);
    border-color: var(--feed-card-glass-border);
    backdrop-filter: blur(16px);
    color: var(--text-inverse);
}
/* Image card hover: green bg + black text (brand standard) */
.feed-card--has-image .feed-card__action:hover {
    color: var(--color-black);
}
.feed-card--has-image .feed-card__action--pill:hover,
.feed-card--has-image .feed-card__action--share:hover {
    background: var(--accent-primary);
    color: var(--color-black);
    border-color: var(--accent-primary);
}
/* vote-divider hidden globally — no image override needed */
/* Legacy image classes (kept for non-hero image display) */
.feed-card__image {
    margin: 0 calc(-1 * var(--space-8, 32px));
    margin-bottom: var(--space-4);
    overflow: hidden;
}
.feed-card__image-img {
    width: 100%;
    max-height: var(--feed-card-image-height, 400px);
    object-fit: cover;
    display: block;
}

/* Short text content (no image, <100 chars) */
.feed-card__content--short {
    font-family: var(--font-heading);
    font-size: var(--feed-card-grand-size, var(--text-3xl, 30px));
    font-weight: var(--feed-card-grand-weight, var(--font-semibold));
    letter-spacing: var(--feed-card-grand-tracking, -0.02em);
    line-height: 1.35;
}

/* DS Action bar — pill-bordered clusters */
.feed-card__actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Vote cluster: pill-bordered group — ghost style */
.feed-card__vote-cluster {
    display: flex;
    align-items: center;
    background: var(--btn-ghost-bg);
    border: 1px solid var(--border-default);
    border-radius: var(--feed-card-action-radius);
    overflow: hidden;
    color: var(--btn-ghost-color);
    height: 36px;
    box-sizing: border-box;
    transition: background var(--duration-fast), color var(--duration-fast);
}
.feed-card__vote-cluster:hover {
    background: var(--btn-ghost-bg-hover);
    color: var(--btn-ghost-color-hover);
}

/* Divider between up/down — hidden (space reserved by button gap) */
.feed-card__vote-divider {
    display: none;
}

.feed-card__action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: var(--feed-card-action-padding);
    background: transparent;
    font-size: var(--feed-card-action-size);
    font-weight: var(--feed-card-action-weight);
    color: inherit;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: color var(--duration-fast), background var(--duration-fast);
}

.feed-card__action:hover {
    color: var(--btn-ghost-color-hover);
}

.feed-card__action i, .feed-card__action svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Standalone pill action (comment) — ghost style */
.feed-card__action--pill {
    background: var(--btn-ghost-bg);
    color: var(--btn-ghost-color);
    border: 1px solid var(--border-default);
    border-radius: var(--feed-card-action-radius);
    height: 36px;
    align-items: center;
    box-sizing: border-box;
    transition: background var(--duration-fast), color var(--duration-fast);
}
.feed-card__action--pill:hover {
    background: var(--btn-ghost-bg-hover);
    color: var(--btn-ghost-color-hover);
}

/* Upvote — split pill: only this side turns green when active */
.feed-card__action--upvote.active {
    background: var(--vote-active-bg);
    color: var(--vote-active-color);
    border-radius: var(--feed-card-action-radius);
    outline: 3px solid var(--vote-active-bg);
    position: relative;
    z-index: 1;
}

/* Downvote — split pill: only this side turns green when active */
.feed-card__action--downvote.active {
    background: var(--vote-active-bg);
    color: var(--vote-active-color);
    border-radius: var(--feed-card-action-radius);
    outline: 3px solid var(--vote-active-bg);
    position: relative;
    z-index: 1;
}

/* Share — pushed right, ghost style */
.feed-card__action--share {
    margin-left: auto;
    background: var(--btn-ghost-bg);
    color: var(--btn-ghost-color);
    border: 1px solid var(--border-default);
    border-radius: var(--feed-card-action-radius);
    height: 36px;
    align-items: center;
    box-sizing: border-box;
    transition: background var(--duration-fast), color var(--duration-fast);
}
.feed-card__action--share:hover {
    background: var(--btn-ghost-bg-hover);
    color: var(--btn-ghost-color-hover);
}

/* Vote score inside feed-card actions — inherit action styling */
.feed-card__vote-score,
.feed-card__actions .vote-score {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

/* Reply (inline threaded comment) */
.feed-card__reply {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: var(--surface-secondary);
    border-radius: var(--radius-md);
    margin-top: 8px;
}
.feed-card__reply-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 1px;
}
.feed-card__reply-name {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}
.feed-card__reply-text {
    font-size: var(--feed-card-channel-size);
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Comment form */
.feed-card__comment-form {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border-default);
}

.feed-card__comment-form.hidden {
    display: none;
}

.feed-card__comment-input {
    flex: 1;
    background: var(--surface-secondary);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 16px;
    outline: none;
}
.feed-card__comment-input:focus {
    border-color: var(--accent-primary);
}

.feed-card__comment-btn {
    background: var(--accent-primary);
    border: none;
    color: var(--surface-app);
    width: var(--size-8);
    height: var(--size-8);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-card__comment-btn i {
    width: 0.875rem;
    height: 0.875rem;
}

/* Legacy engagement row (kept for backward compat with _cards.html macro) */
.feed-card__engagement {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--border-default);
}

.feed-card__engagement-btn {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--text-sm);
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast);
}

.feed-card__engagement-btn:hover {
    color: var(--accent-primary);
    background: var(--interactive-hover);
}

.feed-card__engagement-btn svg {
    width: 16px;
    height: 16px;
}

/* =============================================================================
   CARD GRID LAYOUTS
   ============================================================================= */

/* Default card grid (quest, service, shop) */
.card-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
}

/* Pack card grid (portrait orientation, smaller) */
.pack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-4);
}

/* Shop card grid */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-4);
}

/* Feed cards stack vertically */
.feed-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 767px) {
    .card-grid-v2 {
        grid-template-columns: 1fr;
    }

    .pack-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: var(--space-3);
    }

    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }

    .shop-card-v2__image {
        height: 100px;
    }

    /* Quest card V2 responsive: full-width on mobile */
    .quest-card-v2 {
        width: 100%;
        max-width: 100%;
    }
}

/* =============================================================================
   LUMINA PACK CARDS (for Houses to buy Lumina)
   ============================================================================= */
.lumina-pack-card {
    background: linear-gradient(145deg, var(--surface-secondary), var(--surface-primary));
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    text-align: center;
    transition: transform var(--duration-normal), box-shadow var(--duration-normal);
}

.lumina-pack-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 243, 255, 0.15);
    border-color: var(--accent-primary);
}

.lumina-pack-card__name {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.lumina-pack-card__price {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.lumina-pack-card__amount {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--accent-primary);
    margin-bottom: var(--space-1);
}

.lumina-pack-card__bonus {
    font-size: var(--text-xs);
    color: var(--status-success);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-3);
}

.lumina-pack-card__buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-4);
    background: var(--accent-primary);
    color: var(--color-dark-900);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    cursor: pointer;
    width: 100%;
    transition: all var(--duration-fast);
}

.lumina-pack-card__buy-btn:hover {
    filter: brightness(1.1);
}


/* ========== EVOLVE FEED CARD ========== */

.feed-card--evolve {
    display: block;
    border: 1px solid var(--border-default);
    cursor: pointer;
    overflow: hidden;
    transition: transform var(--duration-fast);
    box-shadow: none !important;
    background: var(--surface-primary);
}

.feed-card--evolve:hover {
    transform: translateY(-1px);
    box-shadow: none !important;
}

/* Orange EVOLVE pill — top-left */
.feed-card__evolve-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--color-orange-500, #f97316);
    color: var(--text-inverse);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1;
}

/* Hero image area */
.evo-feed__hero {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 6px 6px 0 0;
    margin: -6px -8px 8px -8px;
    width: calc(100% + 16px);
}

.evo-feed__hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.evo-feed__hero-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, var(--surface-primary, var(--bg-card)));
}

/* Green reward badge — top-right of hero */
.evo-feed__reward-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    padding: 3px 10px;
    background: rgba(22, 163, 74, 0.9);
    color: var(--color-black);
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    line-height: 1;
    white-space: nowrap;
}

/* Inline reward badge for cards without hero */
.evo-feed__reward-row {
    padding: 4px 0 2px;
}

.evo-feed__reward-badge--inline {
    position: static;
    display: inline-block;
}

/* Info row: icon + title + description */
.evo-feed__info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 2px 0;
}

.evo-feed__icon {
    flex-shrink: 0;
    width: var(--size-10);
    height: var(--size-10);
    border-radius: var(--radius-lg);
    background: var(--accent-secondary-subtle, rgba(249, 115, 22, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-orange-500, #f97316);
}

.evo-feed__icon i {
    width: 20px;
    height: 20px;
}

.evo-feed__text {
    min-width: 0;
    flex: 1;
}

.evo-feed__name {
    font-size: 15px;
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    line-height: 1.3;
}

.evo-feed__desc {
    font-size: var(--feed-card-channel-size);
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 2px;
}

/* =============================================================================
   ZINE CARD — .zine-card
   Tall portrait magazine cover card with scrim-overlaid info strip.
   BEM: .zine-card, __cover-link, __cover, __scrim, __content, __brand,
        __title, __subtitle, __engagement, __staging-row
   ============================================================================= */

.zine-card {
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* Cover link — full-bleed, 8:9 aspect (3/4 of original 2:3 height) */
.zine-card__cover-link {
    display: block;
    position: relative;
    aspect-ratio: 8 / 9;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

/* Cover image — fills the link, pinned top so masthead isn't cropped */
.zine-card__cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform var(--transition-slow);
}

.zine-card__cover-link:hover .zine-card__cover {
    transform: scale(1.03);
}

/* Scrim gradient — bottom 40% for text legibility */
.zine-card__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0.35) 30%,
        transparent 55%
    );
    pointer-events: none;
}

/* Content strip — sits at the bottom over the scrim */
.zine-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-4) var(--space-4) var(--space-5);
    z-index: 1;
}

/* Brand eyebrow */
.zine-card__brand {
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    line-height: var(--leading-tight);
}

/* Article title */
.zine-card__title {
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
    color: var(--text-inverse);
    margin: var(--space-1) 0 0;
    line-height: var(--leading-snug);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Article subtitle */
.zine-card__subtitle {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.7);
    margin: var(--space-1) 0 0;
    line-height: var(--leading-normal);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Engagement row — reuses feed-card action classes */
.zine-card__engagement {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--border-default);
}

/* Comment form */
.zine-card__comment-form {
    padding: 0 var(--space-4) var(--space-4);
}

/* Staging row */
.zine-card__staging-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--surface-secondary);
    border-top: 1px dashed var(--border-strong);
}

.zine-card__staging-info {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
}

.zine-card__staging-avatar {
    width: var(--space-8);
    height: var(--space-8);
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.zine-card__staging-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Staging modifier — dashed border */
.zine-card--staging {
    border-style: dashed;
    border-color: var(--border-strong);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .zine-card__title {
        font-size: var(--text-lg);
    }
    .zine-card__subtitle {
        font-size: var(--text-xs);
    }
}

/* =============================================================================
   CRUSH STAMP OVERLAY — I Have a Crush app
   Shows a crush stamp on image posts from the crush app in the feed
   ============================================================================= */
.feed-card__crush-stamp {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    width: 72px;
    height: 72px;
    pointer-events: none;
    z-index: 5;
    filter: drop-shadow(1px 2px 4px rgba(0, 0, 0, 0.3));
}
