/* =============================================================================
   PACK PAGE - Tabbed Inventory Layout
   Toolkit bar, tabs, wallet, effects, tool cards
   ============================================================================= */

/* --- Page Layout --- */
.pack-page {
    padding: var(--space-4);
}

/* --- Page Header --- */
.pack-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: var(--space-3);
}

.pack-header__title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin: 0;
    text-align: left;
}

.pack-header__coiny {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--accent-primary);
    text-decoration: none;
    flex-shrink: 0;
    margin-left: auto;
    transition: all var(--duration-fast);
}

.pack-header__coiny:hover {
    background: rgba(0, 243, 255, 0.18);
    border-color: var(--accent-primary);
}

/* --- Combined XP + Toolkit Row --- */
.pack-header-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.pack-header-row__xp {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.pack-header-row__xp .pack-xp-bar__label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-yellow-400);
    white-space: nowrap;
}

.pack-header-row__xp .pack-xp-bar__streak {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

.pack-header-row__toolkit {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
}

.pack-header-row__toolkit .toolkit {
    margin-bottom: 0;
    padding: var(--space-1) 0;
    background: transparent;
    border: none;
    border-radius: 0;
    gap: var(--space-1);
}

.pack-header-row__toolkit .toolkit__label {
    display: none;
}

.pack-header-row__toolkit .toolkit__slots {
    gap: 6px;
}

.pack-header-row__toolkit .toolkit__slot {
    width: 28px;
    height: 28px;
}

.pack-header-row__toolkit .toolkit__slot--empty {
    border-width: 1.5px;
    border-style: dashed;
    opacity: 0.4;
}

.pack-header-row__toolkit .toolkit__slot svg,
.pack-header-row__toolkit .toolkit__slot [data-lucide] {
    width: 14px;
    height: 14px;
}

/* =============================================================================
   TOOLKIT BAR
   ============================================================================= */
.toolkit {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--surface-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
}

.toolkit__label {
    font-size: 11px;
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    flex-shrink: 0;
}

.toolkit__slots {
    display: flex;
    gap: var(--space-2);
    flex: 1;
}

.toolkit__slot {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast);
    flex-shrink: 0;
}

.toolkit__slot--empty {
    border: 2px dashed var(--border-default);
    background: transparent;
}

.toolkit__slot--filled {
    border: 2px solid var(--accent-primary);
    background: rgba(0, 243, 255, 0.08);
    cursor: pointer;
    color: var(--accent-primary);
}

.toolkit__slot--filled:hover {
    background: rgba(0, 243, 255, 0.15);
    box-shadow: 0 0 12px rgba(0, 243, 255, 0.2);
    transform: scale(1.08);
}

.toolkit__slot--filled:active {
    transform: scale(0.95);
}

.toolkit__slot svg,
.toolkit__slot [data-lucide] {
    width: 18px;
    height: 18px;
}

.toolkit__slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.toolkit__balance {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--accent-primary);
    flex-shrink: 0;
}

/* =============================================================================
   COMPACT XP BAR
   ============================================================================= */
.pack-xp-bar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
    background: var(--surface-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
}

.pack-xp-bar__label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-yellow-400);
    white-space: nowrap;
    flex-shrink: 0;
}

.pack-xp-bar__track {
    flex: 1;
    height: 6px;
    background: var(--surface-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.pack-xp-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-yellow-400), var(--accent-primary));
    border-radius: var(--radius-full);
    transition: width var(--duration-slow);
}

.pack-xp-bar__streak {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* =============================================================================
   TABS
   ============================================================================= */
.pack-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.pack-tabs::-webkit-scrollbar { display: none; }

.pack-tab {
    padding: var(--space-2) var(--space-4);
    background: var(--surface-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--duration-fast);
}

.pack-tab:hover {
    color: var(--text-secondary);
    border-color: var(--text-secondary);
}

.pack-tab--active {
    color: var(--accent-primary);
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--accent-primary);
}

/* Toolkit inlined in pack header */
.pack-header__toolkit {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.pack-header__toolkit .toolkit {
    margin-bottom: 0;
    padding: var(--space-1) 0;
    background: transparent;
    border: none;
    border-radius: 0;
    gap: var(--space-1);
}
.pack-header__toolkit .toolkit__label {
    display: none;
}
.pack-header__toolkit .toolkit__slots {
    gap: 6px;
}
.pack-header__toolkit .toolkit__slot {
    width: 28px;
    height: 28px;
}
.pack-header__toolkit .toolkit__slot--empty {
    border-width: 1.5px;
    border-style: dashed;
    opacity: 0.4;
}
.pack-header__toolkit .toolkit__slot svg,
.pack-header__toolkit .toolkit__slot [data-lucide] {
    width: 14px;
    height: 14px;
}

/* Tab Panels */
.pack-tab-panel {
    display: none;
}

.pack-tab-panel--active {
    display: block;
}

/* All Tab - Section Titles */
.pack-all-section-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: var(--space-4) 0 var(--space-2) 0;
}

.pack-all-section-title:first-child {
    margin-top: 0;
}

/* =============================================================================
   PACK CARD FOOTER (shared by tools, effects, services)
   Full-width bar at bottom of card with action buttons / toggles / status
   ============================================================================= */
.pack-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border-top: 1px solid var(--border-default);
    margin-top: auto;
}

.pack-card__footer-btn {
    padding: 4px var(--space-2);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: var(--font-bold);
    cursor: pointer;
    transition: all var(--duration-fast);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pack-card__footer-btn--use {
    background: var(--accent-primary);
    color: var(--color-dark-900);
}

.pack-card__footer-btn--use:hover {
    filter: brightness(1.1);
}

.pack-card__footer-btn--equip {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-default);
}

.pack-card__footer-btn--equip:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.pack-card__footer-btn--equipped {
    background: rgba(0, 243, 255, 0.12);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.pack-card__footer-label {
    font-size: 11px;
    font-weight: var(--font-semibold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Status badge (for services) */
.pack-card__status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: var(--font-semibold);
    color: var(--text-muted);
}

.pack-card__status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
}

.pack-card__status--active .pack-card__status-dot {
    background: var(--status-success);
}

.pack-card__status--active {
    color: var(--status-success);
}

.pack-card__status--expired .pack-card__status-dot {
    background: var(--text-muted);
}

/* Toggle switch (for effects in card footer) */
.pack-card__toggle {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.pack-card__toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pack-card__toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--surface-tertiary);
    border-radius: var(--radius-full);
    transition: background var(--duration-fast);
}

.pack-card__toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform var(--duration-fast), background var(--duration-fast);
}

.pack-card__toggle-input:checked + .pack-card__toggle-slider {
    background: rgba(0, 243, 255, 0.3);
}

.pack-card__toggle-input:checked + .pack-card__toggle-slider::before {
    transform: translateX(16px);
    background: var(--accent-primary);
}

/* =============================================================================
   COLLAPSIBLE SECTIONS (kept for legacy compatibility)
   ============================================================================= */
.pack-section {
    margin-bottom: var(--space-3);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--surface-primary);
    overflow: hidden;
}

.pack-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    transition: background var(--duration-fast);
}

.pack-section__header:hover {
    background: var(--surface-secondary);
}

.pack-section__header-left {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.pack-section__chevron {
    transition: transform var(--duration-normal) var(--ease-default);
    flex-shrink: 0;
    color: var(--text-muted);
}

.pack-section__header[aria-expanded="false"] .pack-section__chevron {
    transform: rotate(-90deg);
}

.pack-section__icon {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.pack-section__title {
    color: var(--text-primary);
}

.pack-section__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--surface-tertiary);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: var(--font-semibold);
    color: var(--text-muted);
}

.pack-section__content {
    padding: 0 var(--space-4) var(--space-4);
    transition: max-height var(--duration-normal) var(--ease-default),
                padding var(--duration-normal) var(--ease-default),
                opacity var(--duration-normal);
    max-height: 2000px;
    opacity: 1;
    overflow: hidden;
}

.pack-section__content--collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.pack-section__empty {
    text-align: center;
    padding: var(--space-6) 0;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.pack-section__empty a {
    color: var(--accent-primary);
    text-decoration: none;
}

.pack-section__empty a:hover {
    text-decoration: underline;
}

/* =============================================================================
   SERVICES LIST (in Pack)
   ============================================================================= */
.pack-services-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.pack-service-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3);
    background: var(--surface-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
}

.pack-service-row__left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.pack-service-row__icon {
    font-size: var(--text-xl);
}

.pack-service-row__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pack-service-row__name {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

.pack-service-row__status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
    color: var(--text-muted);
}

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

.pack-service-row__status--active .pack-service-row__status-dot {
    background: var(--status-success);
}

.pack-service-row__status--expired .pack-service-row__status-dot {
    background: var(--text-muted);
}

.pack-service-row__stars-text {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

/* =============================================================================
   PURCHASES LIST
   ============================================================================= */
.pack-purchases-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.pack-purchase-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: var(--surface-secondary);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
}

.pack-purchase-row__icon {
    font-size: var(--text-base);
}

.pack-purchase-row__name {
    flex: 1;
    color: var(--text-primary);
    font-weight: var(--font-medium);
}

.pack-purchase-row__price {
    color: var(--accent-primary);
    font-weight: var(--font-semibold);
    font-size: var(--text-xs);
}

.pack-purchase-row__date {
    color: var(--text-muted);
    font-size: var(--text-xs);
}

/* =============================================================================
   EFFECTS LIST
   ============================================================================= */
.effects-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.effects-list__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3);
    background: var(--surface-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
}

.effects-list__item-left {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.effects-list__item-icon {
    font-size: var(--text-lg);
}

.effects-list__item-name {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

.effects-list__item-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.effects-list__item-timer {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* Toggle switch */
.effects-list__toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    cursor: pointer;
}

.effects-list__toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.effects-list__toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--surface-tertiary);
    border-radius: var(--radius-full);
    transition: background var(--duration-fast);
}

.effects-list__toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform var(--duration-fast), background var(--duration-fast);
}

.effects-list__toggle-input:checked + .effects-list__toggle-slider {
    background: rgba(0, 243, 255, 0.3);
}

.effects-list__toggle-input:checked + .effects-list__toggle-slider::before {
    transform: translateX(16px);
    background: var(--accent-primary);
}

.effects-list__empty {
    text-align: center;
    padding: var(--space-4) 0;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.effects-list__empty a {
    color: var(--accent-primary);
    text-decoration: none;
}

/* =============================================================================
   WALLET
   ============================================================================= */
.wallet__balances {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.wallet__balance-card {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--surface-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
}

.wallet__balance-icon {
    font-size: var(--text-xl);
}

.wallet__balance-icon--lumina { color: var(--accent-primary); }
.wallet__balance-icon--xp { color: var(--color-yellow-400); }

.wallet__balance-info {
    display: flex;
    flex-direction: column;
}

.wallet__balance-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.wallet__balance-value {
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--text-primary);
}

.wallet__balance-value--lumina { color: var(--accent-primary); }
.wallet__balance-value--xp { color: var(--color-yellow-400); }

.wallet__transactions-title {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-2) 0;
}

.wallet__empty {
    text-align: center;
    padding: var(--space-4);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* Bank statement ledger */
.wallet__ledger {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.wallet__ledger-header {
    display: flex;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    background: var(--surface-tertiary);
    font-size: 10px;
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.wallet__ledger-row {
    display: flex;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    border-top: 1px solid var(--border-default);
    font-size: var(--text-sm);
    transition: background var(--duration-fast);
}

.wallet__ledger-row:hover {
    background: var(--surface-secondary);
}

.wallet__ledger-col--date {
    width: 60px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.wallet__ledger-col--desc {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.wallet__ledger-icon {
    font-size: var(--text-sm);
    flex-shrink: 0;
}

.wallet__ledger-col--amount {
    width: 70px;
    flex-shrink: 0;
    text-align: right;
    font-weight: var(--font-bold);
    font-size: var(--text-sm);
    font-variant-numeric: tabular-nums;
}

.wallet__ledger-amount--in {
    color: var(--status-success);
}

.wallet__ledger-amount--out {
    color: var(--status-error);
}

/* =============================================================================
   PACK CARD VARIANTS (tool, effect, service)
   ============================================================================= */
.pack-card--tool,
.pack-card--effect,
.pack-card--service {
    cursor: default;
    display: flex;
    flex-direction: column;
}

.pack-card--tool:hover,
.pack-card--effect:hover,
.pack-card--service:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 16px rgba(0, 243, 255, 0.15);
}

/* =============================================================================
   PACK APP CARD — full-bleed image, edge-to-edge
   ============================================================================= */
.pack-card--app {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    min-height: 220px;
    /* Ensure overlay + footer hug the bottom with no exposed bg strip */
    justify-content: flex-end;
}
.pack-card--app:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 16px rgba(0, 243, 255, 0.15);
}

/* ── Event / Ticket card variant (event/booking/experience/overnight) ── */
.pack-card--event.nf-scroll-card {
    width: 280px;
    min-height: 260px;
    border-radius: 16px;
    mask-image:
        radial-gradient(circle 20px at 0   50%, transparent 20px, black 20.5px),
        radial-gradient(circle 20px at 100% 50%, transparent 20px, black 20.5px);
    mask-composite: intersect;
    -webkit-mask-image:
        radial-gradient(circle 20px at 0   50%, transparent 20px, black 20.5px),
        radial-gradient(circle 20px at 100% 50%, transparent 20px, black 20.5px);
    -webkit-mask-composite: source-in;
    /* drop-shadow works with mask (box-shadow gets clipped) */
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}
.pack-card--event .pack-card__overlay {
    bottom: 80px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
}
.pack-card--event .pack-card__bg img {
    object-position: center 30%;
}
.pack-card--event .pack-card__footer {
    padding: 8px 12px 10px;
}
.pack-card__type-label--event {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.35);
}
.pack-card__event-meta {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.pack-card__event-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    white-space: nowrap;
}
.pack-card__event-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.pack-card__capacity {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.pack-card__capacity-bar {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.1);
    overflow: hidden;
}
.pack-card__capacity-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: width 0.3s ease;
}
.pack-card__capacity-text {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
}
.pack-card--event .pack-card__event-footer .pack-card__footer-btn--equip {
    width: auto;
    flex-shrink: 0;
    padding: 6px 14px;
}

/* Full-bleed background image */
.pack-card--app .pack-card__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.pack-card--app .pack-card__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pack-card--app .pack-card__bg--fallback {
    background: linear-gradient(160deg, rgba(139,92,246,0.12), rgba(6,182,212,0.08));
    display: flex;
    align-items: center;
    justify-content: center;
}
.pack-card--app .pack-card__bg--fallback i {
    width: 48px;
    height: 48px;
    color: rgba(255,255,255,0.2);
}

/* Top bar: "APP" label left, house icon pinned to right corner */
.pack-card--app .pack-card__top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px 10px;
}
.pack-card--app .pack-card__type-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 4px;
    padding: 3px 8px;
    background: rgba(0,0,0,0.6);
}
.pack-card--app .pack-card__house-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(0,0,0,0.45);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Bottom gradient overlay with text — pinned to bottom above footer */
.pack-card--app .pack-card__overlay {
    position: absolute;
    bottom: 42px;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 32px 12px 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
}
.pack-card--app .pack-card__overlay-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.pack-card--app .pack-card__overlay-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}

/* Footer: Equip button — pinned to bottom, sits over the overlay gradient */
.pack-card--app .pack-card__footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    padding: 8px 10px;
}
.pack-card--app .pack-card__footer-btn--equip {
    width: 100%;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    background: rgba(0, 243, 255, 0.15);
    border: 1px solid rgba(0, 243, 255, 0.4);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.pack-card--app .pack-card__footer-btn--equip:hover {
    background: rgba(0, 243, 255, 0.25);
    border-color: rgba(0, 243, 255, 0.7);
    color: #00f3ff;
}

/* =============================================================================
   VOICE RECORDING OVERLAY
   ============================================================================= */
.voice-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
}

.voice-overlay__card {
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    width: 90%;
    max-width: 420px;
    text-align: center;
}

.voice-overlay__indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--status-error);
    margin-bottom: var(--space-4);
}

.voice-overlay__dot {
    width: 10px;
    height: 10px;
    background: var(--status-error);
    border-radius: 50%;
}
.voice-overlay.active .voice-overlay__dot {
    animation: voice-pulse 1s infinite;
}

@keyframes voice-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.voice-overlay__transcript {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    min-height: 60px;
    margin-bottom: var(--space-4);
    padding: var(--space-3);
    background: var(--surface-secondary);
    border-radius: var(--radius-md);
}

.voice-overlay__actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

.voice-overlay__save {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-5);
    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;
}

.voice-overlay__cancel {
    padding: var(--space-2) var(--space-5);
    background: var(--surface-tertiary);
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    cursor: pointer;
}

/* =============================================================================
   HERO'S LOG (shared styles for log page)
   ============================================================================= */
.heros-log__day-header {
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-primary);
    padding: var(--space-3) 0 var(--space-2);
    border-bottom: 1px solid var(--border-default);
    margin-bottom: var(--space-2);
}

.heros-log__day-header:not(:first-child) {
    margin-top: var(--space-4);
}

.heros-log__entry {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--surface-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2);
}

.heros-log__entry-icon {
    flex-shrink: 0;
    font-size: var(--text-base);
    padding-top: 2px;
}

.heros-log__entry-time {
    font-size: var(--text-xs);
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 70px;
    padding-top: 2px;
}

.heros-log__entry-body {
    flex: 1;
    min-width: 0;
}

.heros-log__entry-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-1);
}

.heros-log__entry-meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.heros-log__entry-duration {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-family: var(--font-mono, monospace);
}

.heros-log__entry-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    transition: all var(--duration-fast);
}

.heros-log__entry-delete:hover {
    color: var(--status-error);
    background: rgba(239, 68, 68, 0.1);
}

.heros-log__empty {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.heros-log__empty p {
    margin: var(--space-2) 0 0;
}

/* =============================================================================
   LOG PAGE
   ============================================================================= */
.log-page {
    padding: var(--space-4);
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.log-header__left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.log-header__back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--surface-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration-fast);
    text-decoration: none;
}

.log-header__back:hover {
    background: var(--surface-tertiary);
    color: var(--text-primary);
}

.log-header__back svg {
    width: 18px;
    height: 18px;
}

.log-header__title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.log-tabs {
    display: flex;
    gap: var(--space-1);
    margin-bottom: var(--space-4);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid var(--border-default);
}

.log-tabs::-webkit-scrollbar { display: none; }

.log-tab {
    padding: var(--space-2) var(--space-3);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--duration-fast);
    margin-bottom: -1px;
}

.log-tab:hover {
    color: var(--text-secondary);
}

.log-tab--active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.log-tab-panel {
    display: none;
}

.log-tab-panel--active {
    display: block;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 767px) {
    .pack-page {
        padding: var(--space-3);
    }

    .pack-header {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        gap: var(--space-2);
    }

    .toolkit {
        flex-wrap: wrap;
        gap: var(--space-2);
        padding: var(--space-2) var(--space-3);
    }

    .toolkit__slot {
        width: 36px;
        height: 36px;
    }

    .pack-tabs {
        gap: var(--space-2);
    }

    .wallet__balances {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }

    .wallet__balance-card {
        padding: var(--space-2);
    }

    .pack-purchase-row {
        flex-wrap: wrap;
        gap: var(--space-1);
    }

    .pack-purchase-row__date {
        width: 100%;
        text-align: right;
    }

    .log-page {
        padding: var(--space-3);
    }
}
