/* =============================================================================
   DESIGN SYSTEM — Production Component Library
   Extracted from templates/design_system/standalone.html
   Source of truth for all ds-* component classes.
   ============================================================================= */

/* ========== BUTTONS (all values via --btn-* tokens) ========== */
.ds-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--btn-gap);
    padding: var(--btn-padding);
    font-family: var(--btn-font);
    font-size: var(--btn-font-size);
    font-weight: var(--btn-font-weight);
    border-radius: var(--btn-radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--btn-transition);
    text-decoration: none;
    white-space: nowrap;
}
.ds-btn--primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-color);
    border-color: var(--btn-primary-border);
}
.ds-btn--primary:hover { background: var(--btn-primary-bg-hover); color: var(--btn-primary-color-hover); box-shadow: var(--btn-primary-glow); border-color: var(--btn-primary-bg-hover); }
.ds-btn--secondary {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-color);
    border-color: var(--btn-secondary-border);
}
.ds-btn--secondary:hover { border-color: var(--btn-secondary-border-hover); background: var(--btn-secondary-bg-hover); }
.ds-btn--ghost {
    background: var(--btn-ghost-bg);
    color: var(--btn-ghost-color);
    border-color: transparent;
}
.ds-btn--ghost:hover { color: var(--btn-ghost-color-hover); background: var(--btn-ghost-bg-hover); }
.ds-btn--danger {
    background: var(--btn-danger-bg);
    color: var(--btn-danger-color);
    border-color: var(--btn-danger-border);
}
.ds-btn--danger:hover { background: var(--btn-danger-bg-hover); color: var(--btn-danger-color-hover); }
.ds-btn--success {
    background: var(--btn-success-bg);
    color: var(--btn-success-color);
    border-color: var(--btn-success-border);
}
.ds-btn--success:hover { background: var(--btn-success-bg-hover); color: var(--btn-success-color-hover); }
/* Dark: Slate solid */
.ds-btn--dark {
    background: var(--btn-dark-bg);
    color: var(--btn-dark-color);
    border-color: var(--btn-dark-border);
}
.ds-btn--dark:hover { background: var(--btn-dark-bg-hover); color: var(--btn-dark-color-hover); border-color: var(--btn-dark-bg-hover); }
/* Yellow: Highlight CTA */
.ds-btn--yellow {
    background: var(--btn-yellow-bg);
    color: var(--btn-yellow-color);
    border-color: var(--btn-yellow-border);
}
.ds-btn--yellow:hover { background: var(--btn-yellow-bg-hover); color: var(--btn-yellow-color-hover); border-color: var(--btn-yellow-bg-hover); }
/* Glass: Frosted white tint for dark backgrounds */
.ds-btn--glass {
    background: var(--btn-glass-bg);
    color: var(--btn-glass-color);
    border-color: var(--btn-glass-border);
    backdrop-filter: blur(var(--btn-glass-blur));
    -webkit-backdrop-filter: blur(var(--btn-glass-blur));
}
.ds-btn--glass:hover { background: var(--btn-glass-bg-hover); border-color: var(--btn-glass-border-hover); }
/* Sizes */
.ds-btn--sm { padding: var(--btn-sm-padding); font-size: var(--btn-sm-font-size); }
.ds-btn--lg { padding: var(--btn-lg-padding); font-size: var(--btn-lg-font-size); }
/* States */
.ds-btn:disabled, .ds-btn--disabled { opacity: var(--btn-disabled-opacity); pointer-events: none; }
.ds-btn--loading { position: relative; color: transparent; pointer-events: none; }
.ds-btn--loading::after {
    content: ''; position: absolute; width: 16px; height: 16px;
    border: 2px solid rgba(0,0,0,0.15); border-top-color: var(--text-primary);
    border-radius: 50%; animation: ds-spin 0.6s linear infinite;
}
@keyframes ds-spin { to { transform: rotate(360deg); } }

/* ========== INPUTS ========== */
.ds-input {
    width: 100%;
    padding: 10px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    border-radius: 999px;
    outline: none;
    transition: all 0.2s ease;
}
.ds-input:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--accent-primary-subtle); }
.ds-input--error { border-color: var(--status-error); }
.ds-input--error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.1); }
.ds-input--success { border-color: var(--status-success); }

.ds-select {
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.ds-textarea {
    min-height: 100px;
    resize: vertical;
    border-radius: var(--radius-md, 24px);
}

/* ========== TOGGLE & CHECKBOX ========== */
.ds-toggle {
    position: relative; width: 44px; height: 24px;
    background: var(--border-default); border-radius: var(--radius-full, 999px);
    cursor: pointer; transition: background 0.2s;
    border: none;
}
.ds-toggle::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 18px; height: 18px; background: var(--surface-primary);
    border-radius: 50%; transition: transform 0.2s;
}
.ds-toggle--on { background: var(--accent-primary); }
.ds-toggle--on::after { transform: translateX(20px); }

.ds-checkbox {
    width: 20px; height: 20px; border-radius: var(--radius-sm, 6px);
    border: 1.5px solid var(--border-strong);
    background: transparent; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s ease; flex-shrink: 0;
}
.ds-checkbox--checked {
    background: var(--accent-primary); border-color: var(--accent-primary);
}
.ds-checkbox--checked::after {
    content: ''; width: 6px; height: 10px;
    border: solid var(--text-inverse); border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}

.ds-radio {
    width: 20px; height: 20px; border-radius: 50%;
    border: 1.5px solid var(--border-strong);
    background: transparent; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s ease; flex-shrink: 0;
}
.ds-radio--selected { border-color: var(--accent-primary); }
.ds-radio--selected::after {
    content: ''; width: 10px; height: 10px;
    background: var(--accent-primary); border-radius: 50%;
}

/* ========== CARDS ========== */
.ds-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md, 24px);
    padding: var(--space-6, 24px);
    transition: all 0.25s ease;
}
.ds-card:hover {
    border-color: var(--accent-primary-subtle);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}
.ds-card__header {
    display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.ds-card__icon {
    width: 40px; height: 40px; border-radius: var(--radius-md, 24px);
    background: var(--accent-primary-subtle);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.ds-card__title { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.ds-card__desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.ds-card__footer { margin-top: 16px; display: flex; align-items: center; gap: 8px; }

.ds-card--elevated {
    background: var(--surface-elevated);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-default);
}
.ds-card--orange { border-left: 3px solid var(--color-orange-500, #F26A2C); }
.ds-card--cyan { border-left: 3px solid var(--accent-primary); }
.ds-card--glass {
    background: rgba(255,255,255,0.7);
    border-color: var(--border-subtle);
}

/* ========== SHOP GRID (responsive card grid for shop sections) ========== */
.ds-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--shop-grid-min-col), 1fr));
    gap: var(--shop-grid-gap);
    padding: var(--space-2) var(--space-4) var(--space-4);
}
/* Variant: events (wider min) */
.ds-shop-grid--events {
    grid-template-columns: repeat(auto-fill, minmax(var(--shop-card-event-min-w), 1fr));
}
/* Variant: apps (portrait cards, tighter min) */
.ds-shop-grid--apps {
    grid-template-columns: repeat(auto-fill, minmax(var(--shop-card-app-min-w), 1fr));
}
/* Variant: quests */
.ds-shop-grid--quests {
    grid-template-columns: repeat(auto-fill, minmax(var(--shop-card-quest-min-w), 1fr));
}
/* Variant: effects + coiny (compact cards) */
.ds-shop-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(var(--shop-card-effect-min-w), 1fr));
}
@media (max-width: 767px) {
    .ds-shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(var(--shop-grid-min-col-mobile), 1fr));
        gap: var(--shop-grid-gap-mobile);
        padding: var(--space-2) var(--space-3) var(--space-3);
    }
    .ds-shop-grid--events {
        grid-template-columns: repeat(auto-fill, minmax(var(--shop-card-event-min-w-mobile), 1fr));
    }
    .ds-shop-grid--apps {
        grid-template-columns: repeat(auto-fill, minmax(var(--shop-card-app-min-w-mobile), 1fr));
    }
    .ds-shop-grid--quests {
        grid-template-columns: repeat(auto-fill, minmax(var(--shop-card-quest-min-w-mobile), 1fr));
    }
    .ds-shop-grid--compact {
        grid-template-columns: repeat(auto-fill, minmax(var(--shop-card-effect-min-w-mobile), 1fr));
    }
}

/* ========== ALERTS ========== */
.ds-alert {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 18px; border-radius: var(--radius-md, 24px);
    font-size: 13px; line-height: 1.5;
    border: 1px solid transparent;
}
.ds-alert__icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.ds-alert--info { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.15); color: var(--color-blue-600, #2563eb); }
.ds-alert--success { background: rgba(34,197,94,0.08); border-color: rgba(34,197,94,0.15); color: var(--status-success-dark, #16a34a); }
.ds-alert--warning { background: rgba(249,115,22,0.08); border-color: rgba(249,115,22,0.15); color: var(--color-orange-600, #ea580c); }
.ds-alert--error { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.15); color: var(--status-error-dark, #dc2626); }
.ds-alert[hidden] { display: none; }

/* ========== TOAST ========== */
.ds-toast {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 18px; border-radius: var(--radius-md, 24px);
    background: var(--surface-elevated); border: 1px solid var(--border-default);
    box-shadow: var(--shadow-lg);
    font-size: 13px; color: var(--text-primary);
    min-width: 260px;
}
.ds-toast__bar { width: 3px; height: 20px; border-radius: 2px; flex-shrink: 0; }
.ds-toast__bar--info { background: var(--color-blue-500); }
.ds-toast__bar--success { background: var(--status-success); }
.ds-toast__bar--error { background: var(--status-error); }
.ds-toast[hidden] { display: none; }

/* ========== BADGES / TAGS ========== */
.ds-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 600;
    letter-spacing: 0.3px;
}
.ds-badge--cyan { background: var(--accent-primary-subtle); color: var(--text-accent); }
.ds-badge--orange { background: rgba(242,106,44,0.12); color: var(--color-orange-700, #D4581F); }
.ds-badge--green { background: rgba(34,197,94,0.12); color: var(--status-success-dark, #16a34a); }
.ds-badge--red { background: rgba(239,68,68,0.12); color: var(--status-error-dark, #dc2626); }
.ds-badge--neutral { background: rgba(0,0,0,0.05); color: var(--text-secondary); }

/* ========== HIGHLIGHTS (text background accents) ========== */
/* Brand rule: highlight wraps the text with even padding top and bottom. */
.ds-highlight { display: inline; padding: 2px 8px; line-height: 1; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.ds-highlight--yellow { background: var(--highlight-yellow); color: #000; }
.ds-highlight--purple { background: var(--highlight-purple); color: #fff; }
.ds-highlight--neon { background: var(--highlight-neon); color: #000; }
.ds-highlight--blue { background: var(--highlight-blue); color: #fff; }
.ds-highlight--black { background: #000; color: #fff; }

/* ========== STRIPS (full-width color sections) ========== */
.ds-strip { width: 100%; }
.ds-strip--neon { background: var(--highlight-neon); color: #000; }
.ds-strip--blue { background: var(--highlight-blue); color: #fff; }
.ds-strip--purple { background: var(--highlight-purple); color: #fff; }
.ds-strip--black { background: #000; color: #fff; }
.ds-strip--yellow { background: var(--highlight-yellow); color: #000; }

/* ========== TEXT COLORS ========== */
.ds-text--green { color: var(--text-accent); }
.ds-text--blue { color: var(--accent-secondary); }
.ds-text--dark { color: var(--accent-dark); }
.ds-text--purple { color: var(--accent-tertiary); }
.ds-text--bold { color: #000; font-weight: 700; }

/* ========== TAGS (inline highlight labels) ========== */
.ds-tag {
    display: inline;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    padding: 0 4px;
    text-decoration: none;
    vertical-align: baseline;
}
.ds-tag--blue { background: var(--accent-secondary); color: #fff; }
.ds-tag--green { background: var(--accent-primary); color: #000; }
.ds-tag--purple { background: var(--accent-tertiary); color: #fff; }
.ds-tag--yellow { background: var(--highlight-yellow); color: #000; }
.ds-tag--dark { background: var(--accent-dark); color: #fff; }

/* ========== PILLS (section badges) ========== */
.ds-pill {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: #000;
    padding: 5px 14px;
    border-radius: 9999px;
}

/* ========== QUEST CARD (ds-quest-card) ========== */
/* DS alias — use .ds-quest-card or .quest-card-v2 (defined in pages/cards.css) */
.ds-quest-card { /* alias — styles live in pages/cards.css as .quest-card-v2 */ }

/* ========== TICKETS (dark-side app/event embeds) ========== */
/* Mirrors .app-ticket from shop.css — canonical ds-* version, uses --ticket-* tokens */
.ds-ticket {
    display: flex;
    width: 100%;
    max-width: var(--ticket-max-width);
    min-height: var(--ticket-min-height);
    border-radius: var(--ticket-radius);
    overflow: hidden;
    background: var(--ticket-bg);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}
.ds-ticket:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.ds-ticket__body {
    flex: 1;
    min-width: 0;
    padding: var(--ticket-body-padding);
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 2;
}
.ds-ticket__eyebrow {
    font-size: var(--ticket-eyebrow-size);
    font-weight: var(--ticket-eyebrow-weight);
    text-transform: uppercase;
    letter-spacing: var(--ticket-eyebrow-tracking);
    color: var(--ticket-eyebrow-color);
}
.ds-ticket__title {
    font-family: var(--font-heading);
    font-size: var(--ticket-title-size);
    font-weight: var(--ticket-title-weight);
    color: #fff;
    line-height: 1.15;
    margin: 2px 0 4px;
}
.ds-ticket__sub {
    font-size: 13px;
    color: var(--ticket-sub-color);
    line-height: 1.3;
}
.ds-ticket__image {
    width: var(--ticket-image-width);
    min-width: var(--ticket-image-width);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.ds-ticket__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ds-ticket__notch {
    position: absolute;
    right: var(--ticket-image-width);
    transform: translateX(50%);
    width: var(--ticket-notch-size);
    height: var(--ticket-notch-size);
    border-radius: 50%;
    background: var(--ticket-notch-bg);
    z-index: 3;
}
.ds-ticket__notch--top { top: -10px; }
.ds-ticket__notch--bottom { bottom: -10px; }

/* ========== PROGRESS ========== */
.ds-progress { height: 6px; background: var(--surface-tertiary); border-radius: 3px; overflow: hidden; }
.ds-progress__bar { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.ds-progress__bar--cyan { background: linear-gradient(90deg, var(--accent-primary), var(--accent-primary-hover, #1A8F80)); }
.ds-progress__bar--orange { background: linear-gradient(90deg, var(--color-orange-500, #F26A2C), var(--color-yellow-400)); }

/* ========== SKELETON ========== */
.ds-skeleton {
    background: linear-gradient(90deg, rgba(0,0,0,0.04) 25%, rgba(0,0,0,0.07) 50%, rgba(0,0,0,0.04) 75%);
    background-size: 200% 100%;
    animation: ds-shimmer 1.5s ease infinite;
    border-radius: var(--radius-md, 24px);
}
@keyframes ds-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ========== AVATAR ========== */
.ds-avatar {
    border-radius: 50%; object-fit: cover;
    border: 2px solid var(--border-subtle);
}
.ds-avatar--xs { width: 24px; height: 24px; }
.ds-avatar--sm { width: 32px; height: 32px; }
.ds-avatar--md { width: 40px; height: 40px; }
.ds-avatar--lg { width: 48px; height: 48px; }
.ds-avatar--xl { width: 64px; height: 64px; }
.ds-avatar--ring { border-color: var(--accent-primary); box-shadow: 0 0 8px rgba(26,143,128,0.3); }

.ds-avatar-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-primary-subtle); color: var(--text-accent);
    font-weight: 600; border-radius: 50%;
}

/* ========== TABLE ========== */
.ds-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ds-table th {
    text-align: left; padding: 10px 16px;
    font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
    color: var(--text-muted); border-bottom: 1px solid var(--border-default);
}
.ds-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); }
.ds-table tr:hover td { background: var(--interactive-hover); }

/* ========== LIST ITEM ========== */
.ds-list-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: var(--radius-md, 24px);
    transition: background 0.15s ease; cursor: pointer;
}
.ds-list-item:hover { background: var(--interactive-hover); }
.ds-list-item__icon { width: 36px; height: 36px; border-radius: var(--radius-md, 24px); background: var(--accent-primary-subtle); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.ds-list-item__text { flex: 1; }
.ds-list-item__title { font-size: 14px; color: var(--text-primary); font-weight: 500; }
.ds-list-item__subtitle { font-size: 12px; color: var(--text-muted); }
.ds-list-item__action { color: var(--text-muted); font-size: 14px; }

/* ========== STAT ========== */
.ds-stat { text-align: center; }
.ds-stat__value { font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif); font-size: 36px; color: var(--text-primary); line-height: 1; }
.ds-stat__label { font-size: 12px; color: var(--text-muted); margin-top: 4px; letter-spacing: 0.5px; }
.ds-stat--cyan .ds-stat__value { color: var(--text-accent); }
.ds-stat--orange .ds-stat__value { color: var(--color-orange-500, #F26A2C); }

/* ========== TABS ========== */
.ds-tabs { display: flex; gap: 4px; padding: 4px; background: rgba(0,0,0,0.04); border-radius: var(--radius-md, 24px); }
.ds-tab {
    padding: 8px 16px; border-radius: var(--radius-md, 24px);
    font-size: 13px; font-weight: 500; color: var(--text-muted);
    cursor: pointer; transition: all 0.15s ease; border: none; background: none;
}
.ds-tab:hover { color: var(--text-secondary); }
.ds-tab--active { background: var(--accent-primary-subtle); color: var(--text-accent); }

/* ========== PACK CARDS ========== */
.ds-pack-card {
    background: var(--surface-primary);
    border: none;
    border-radius: var(--radius-md, 24px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 200px;
    transition: all 0.25s ease;
    position: relative;
}
.ds-pack-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.ds-pack-card__rarity {
    padding: 8px 12px;
    width: 100%;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}
.ds-pack-card--common .ds-pack-card__rarity { background: rgba(0,0,0,0.03); color: var(--text-muted); }
.ds-pack-card--limited { border: 2px solid var(--color-blue-500); box-shadow: 0 0 12px rgba(59,130,246,0.15); }
.ds-pack-card--limited .ds-pack-card__rarity { background: rgba(59,130,246,0.08); color: var(--color-blue-600, #2563eb); }
.ds-pack-card--limited:hover { box-shadow: 0 0 20px rgba(59,130,246,0.2), var(--shadow-lg); }
.ds-pack-card--unique { border: 2px solid var(--color-yellow-500, #eab308); box-shadow: 0 0 12px rgba(234,179,8,0.15); }
.ds-pack-card--unique .ds-pack-card__rarity { background: rgba(234,179,8,0.08); color: var(--color-yellow-600, #ca8a04); }
.ds-pack-card--unique:hover { box-shadow: 0 0 20px rgba(234,179,8,0.25), var(--shadow-lg); }
.ds-pack-card--unique::after {
    content: ''; position: absolute; inset: 0; border-radius: var(--radius-md, 24px);
    background: linear-gradient(135deg, rgba(234,179,8,0.06), transparent, rgba(234,179,8,0.04));
    background-size: 200% 200%;
    animation: ds-pack-shimmer 3s ease-in-out infinite;
    pointer-events: none;
}
@keyframes ds-pack-shimmer { 0%{background-position:200% 200%} 100%{background-position:-200% -200%} }
.ds-pack-card__icon {
    width: 80px; height: 80px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; margin: 12px 0;
    color: var(--text-secondary);
}
.ds-pack-card__name { font-size: 13px; font-weight: 600; color: var(--text-primary); padding: 0 12px; }
.ds-pack-card__desc { font-size: 11px; color: var(--text-muted); padding: 4px 12px 8px; line-height: 1.4; flex: 1; }
.ds-pack-card__footer {
    width: 100%; padding: 8px 10px;
    display: flex; gap: 6px;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}
.ds-pack-btn {
    flex: 1; padding: 6px 8px; border-radius: var(--radius-md, 24px);
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; border: 1px solid transparent;
    cursor: pointer; transition: all 0.15s ease;
    text-align: center;
}
.ds-pack-btn--use { background: var(--accent-primary); color: #000; border-color: var(--accent-primary); }
.ds-pack-btn--use:hover { background: var(--accent-primary-hover); color: #000; }
.ds-pack-btn--equip { background: transparent; color: var(--text-secondary); border-color: var(--border-default); }
.ds-pack-btn--equip:hover { border-color: var(--accent-primary); color: var(--text-accent); }
.ds-pack-btn--equipped { background: var(--accent-primary-subtle); color: var(--text-accent); border-color: var(--accent-primary-subtle); }
.ds-pack-btn--owned { background: rgba(34,197,94,0.1); color: var(--status-success-dark, #16a34a); border-color: rgba(34,197,94,0.2); pointer-events: none; }

/* ========== SHOP CARDS ========== */
.ds-shop-card {
    background: var(--surface-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md, 24px);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}
.ds-shop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1), 0 0 30px rgba(242,106,44,0.08);
    border-color: rgba(242,106,44,0.4);
}
.ds-shop-card:hover .ds-shop-card__image img { transform: scale(1.05); }
.ds-shop-card__image {
    position: relative; width: 100%; height: 160px; overflow: hidden;
    background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(6,182,212,0.08));
    display: flex; align-items: center; justify-content: center;
}
.ds-shop-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.ds-shop-card__image-icon { font-size: 48px; opacity: 0.5; }
.ds-shop-card__badge {
    position: absolute; top: 12px; right: 12px;
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--color-orange-500, #F26A2C), var(--color-orange-700, #D4581F));
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(242,106,44,0.4);
    font-size: 16px; color: var(--text-inverse);
}
.ds-shop-card__body { padding: 16px; }
.ds-shop-card__house {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--color-purple-600, #7c3aed); margin-bottom: 4px;
}
.ds-shop-card__name { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.ds-shop-card__desc {
    font-size: 12px; color: var(--text-muted); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 12px;
}
.ds-shop-card__meta { display: flex; gap: 8px; margin-bottom: 12px; }
.ds-shop-card__tag {
    font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-full, 999px);
    background: rgba(0,0,0,0.04); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
}
.ds-shop-card__footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-top: 1px solid var(--border-subtle);
}
.ds-shop-card__price {
    display: flex; align-items: center; gap: 6px;
    font-size: 14px; font-weight: 600; color: var(--text-primary);
}
.ds-shop-card__price svg { flex-shrink: 0; }
.ds-shop-card__cta {
    padding: 7px 18px; border-radius: var(--radius-md, 24px);
    font-size: 13px; font-weight: 600; border: none;
    cursor: pointer; transition: all 0.2s ease;
}
.ds-shop-card__cta--get { background: linear-gradient(135deg, var(--color-purple-500, #8b5cf6), var(--color-indigo-500, #6366f1)); color: var(--text-inverse); }
.ds-shop-card__cta--get:hover { box-shadow: 0 0 16px rgba(139,92,246,0.4); }
.ds-shop-card__cta--open { background: rgba(16,185,129,0.12); color: var(--color-emerald-500, #10b981); }
.ds-shop-card__cta--buy { background: var(--accent-primary); color: #000; }
.ds-shop-card__cta--buy:hover { background: var(--accent-primary-hover); color: #000; }
.ds-shop-card__cta--owned { background: rgba(34,197,94,0.1); color: var(--status-success-dark, #16a34a); pointer-events: none; }

/* ========== APP CARDS ========== */
.ds-app-card {
    background: var(--surface-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md, 24px);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex; flex-direction: column;
}
.ds-app-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}
.ds-app-card__hero {
    position: relative; height: 180px; overflow: hidden;
    background: linear-gradient(160deg, rgba(139,92,246,0.08), rgba(6,182,212,0.06));
    display: flex; align-items: center; justify-content: center;
}
.ds-app-card__hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 50% 60%, rgba(139,92,246,0.06) 0%, transparent 70%);
}
.ds-app-card__hero img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1;
}
.ds-app-card__hero-icon {
    font-size: 48px; opacity: 0.4; z-index: 0;
}
.ds-app-card__price {
    position: absolute; bottom: 10px; right: 10px;
    padding: 4px 12px; border-radius: var(--radius-full, 999px);
    font-size: 12px; font-weight: 700;
    z-index: 2;
}
.ds-app-card__price--paid {
    background: rgba(34,197,94,0.12); color: var(--status-success-dark, #16a34a);
    border: 1px solid rgba(34,197,94,0.2);
}
.ds-app-card__price--free {
    background: rgba(16,185,129,0.12); color: var(--color-emerald-500, #10b981);
    border: 1px solid rgba(16,185,129,0.2);
}
.ds-app-card__info {
    padding: 14px 16px 16px;
    display: flex; align-items: center; gap: 10px;
}
.ds-app-card__app-icon {
    width: 38px; height: 38px; border-radius: var(--radius-md, 24px);
    background: rgba(139,92,246,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: var(--color-purple-600, #7c3aed); flex-shrink: 0;
}
.ds-app-card__meta { flex: 1; min-width: 0; }
.ds-app-card__name {
    font-size: 14px; font-weight: 600; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ds-app-card__type { font-size: 11px; color: var(--text-muted); text-transform: capitalize; }
.ds-app-card__action {
    padding: 6px 16px; border-radius: var(--radius-full, 999px);
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.3px; border: none; cursor: pointer;
    flex-shrink: 0; transition: opacity 0.15s;
}
.ds-app-card__action--get {
    background: linear-gradient(135deg, var(--color-purple-500, #8b5cf6), var(--color-indigo-500, #6366f1)); color: var(--text-inverse);
}
.ds-app-card__action--open {
    background: rgba(16,185,129,0.12); color: var(--color-emerald-500, #10b981);
}
.ds-app-card__action:hover { opacity: 0.85; }

/* ========== UNIFIED CARD ========== */
.ds-ucard {
    background: var(--surface-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md, 24px);
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}
.ds-ucard:hover {
    border-color: var(--accent-primary-subtle);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.ds-ucard__image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(6,182,212,0.06));
}
.ds-ucard__image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s ease;
}
.ds-ucard:hover .ds-ucard__image img { transform: scale(1.03); }
.ds-ucard__image--sm { height: 120px; }
.ds-ucard__image--md { height: 160px; }
.ds-ucard__image--lg { height: 200px; }
.ds-ucard__image-placeholder {
    display: flex; align-items: center; justify-content: center;
    font-size: 40px; opacity: 0.35;
    width: 100%; height: 100%;
}
.ds-ucard__image-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(transparent 50%, rgba(0,0,0,0.15));
}
.ds-ucard__badge-row {
    position: absolute; top: 10px; left: 10px; right: 10px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 2;
}
.ds-ucard__body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.ds-ucard__eyebrow {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 4px;
}
.ds-ucard__title {
    font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ds-ucard__desc {
    font-size: 13px; color: var(--text-secondary); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    flex: 1;
}
.ds-ucard__footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}
.ds-ucard__social {
    display: flex; align-items: center; gap: 8px;
}
.ds-ucard__avatar-stack {
    display: flex;
}
.ds-ucard__avatar-stack > * {
    width: 24px; height: 24px; border-radius: 50%;
    border: 2px solid var(--surface-primary);
    margin-left: -8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 600;
}
.ds-ucard__avatar-stack > *:first-child { margin-left: 0; }
.ds-ucard__social-text {
    font-size: 11px; color: var(--text-muted);
}

/* ========== APP TOPBAR ========== */
.app-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--surface-primary);
    border-bottom: 1px solid var(--border-default);
}
.app-topbar__left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.app-topbar__icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--color-purple-500), var(--color-blue-600));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    color: var(--text-inverse);
    overflow: hidden;
}
.app-topbar__icon i,
.app-topbar__icon svg {
    width: 18px;
    height: 18px;
    color: var(--text-inverse);
}
.app-topbar__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}
.app-topbar__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.app-topbar__house,
.app-topbar__sub {
    font-size: 12px;
    color: var(--text-muted);
}
.app-topbar__close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: var(--surface-secondary);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.app-topbar__close:hover {
    background: var(--status-error-subtle);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--status-error);
}
.app-topbar__close i,
.app-topbar__close svg {
    width: 18px;
    height: 18px;
}

/* ========== APP FRAME — Desktop "iPad mode" card container ========== */
/* Add class="app-frame" to <body> on standalone app pages. */
@media (min-width: 768px) {
    html:has(body.app-frame) {
        background: var(--surface-secondary, #f0f0f0);
    }
    body.app-frame {
        max-width: 430px;
        margin: 24px auto;
        min-height: calc(100vh - 48px);
        border: 1px solid var(--border-default);
        border-radius: 16px;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
        position: relative;
    }
    body.app-frame .app-topbar {
        position: sticky;
        top: 0;
        border-radius: 16px 16px 0 0;
    }
}

/* ========== COINY ICON (inline) ========== */
.ds-coiny { display: inline-flex; align-items: center; gap: 4px; }
.ds-coiny svg { width: 16px; height: 16px; vertical-align: middle; }

/* ========== DESIGN CARD (Design Review Tool) ========== */
/* Feed card variant for presenting design artifacts for review.
   Supports multiple images (gallery/stacked) + full-screen white overlay with HTML content area.
   Used in /design channel (Tahn Design page). */

.ds-design-card {
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-card);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ds-design-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-subtle);
}

/* Image Gallery (top section) */
.ds-design-card__images {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border-default);
}
.ds-design-card__image {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: var(--surface-secondary);
    overflow: hidden;
}
.ds-design-card__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.ds-design-card:hover .ds-design-card__image img {
    transform: scale(1.02);
}

/* Card Body */
.ds-design-card__body {
    padding: var(--space-4);
}
.ds-design-card__title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}
.ds-design-card__desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

/* Pin Badge */
.ds-design-card__pin {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-inverse);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
}
.ds-design-card__pin i {
    font-size: 12px;
}

/* Full Screen Overlay */
.ds-design-card-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--surface-primary); /* White background for design review */
    z-index: var(--z-spectacle);
    overflow-y: auto;
    padding: var(--space-8);
    animation: ds-design-card-fadein 0.2s ease;
}
@keyframes ds-design-card-fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Close Button */
.ds-design-card-overlay__close {
    position: fixed;
    top: var(--space-4);
    right: var(--space-4);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    z-index: 10;
}
.ds-design-card-overlay__close:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--status-error);
}
.ds-design-card-overlay__close i {
    font-size: 18px;
}

/* Pin Toggle Button */
.ds-design-card-overlay__pin-toggle {
    position: fixed;
    top: var(--space-4);
    right: calc(var(--space-4) + 52px);
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    z-index: 10;
}
.ds-design-card-overlay__pin-toggle:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}
.ds-design-card-overlay__pin-toggle--active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--color-black);
}
.ds-design-card-overlay__pin-toggle--active:hover {
    background: var(--color-teal-700);
    border-color: var(--color-teal-700);
}

/* Content Container */
.ds-design-card-overlay__content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Image Gallery in Overlay */
.ds-design-card-overlay__images {
    margin-bottom: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}
.ds-design-card-overlay__image {
    width: 100%;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.ds-design-card-overlay__image img {
    width: 100%;
    height: auto;
    display: block;
}

/* HTML Content Panel */
.ds-design-card-overlay__html {
    background: var(--surface-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-card);
    padding: var(--space-6);
    margin-top: var(--space-8);
}
.ds-design-card-overlay__html-title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

/* Responsive: Mobile */
@media (max-width: 767px) {
    .ds-design-card-overlay {
        padding: var(--space-4);
    }
    .ds-design-card-overlay__close {
        width: 36px;
        height: 36px;
    }
    .ds-design-card-overlay__pin-toggle {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: var(--space-4);
        width: 100%;
        justify-content: center;
    }
    .ds-design-card-overlay__html {
        padding: var(--space-4);
    }
}

/* ============================================================
   DS Tooltip — data-tooltip attribute + CSS pseudo-elements
   Usage: <element class="ds-tooltip" data-tooltip="Label">
   Variants: ds-tooltip--right (default), ds-tooltip--top, ds-tooltip--bottom
   ============================================================ */

.ds-tooltip {
    position: relative;
}

.ds-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    padding: var(--ds-tooltip-padding);
    background: var(--ds-tooltip-bg);
    color: var(--ds-tooltip-color);
    font-family: var(--font-heading);
    font-size: var(--ds-tooltip-font-size);
    font-weight: var(--ds-tooltip-font-weight);
    white-space: nowrap;
    border-radius: var(--ds-tooltip-radius);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-fab);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-normal) var(--ease-default),
                visibility var(--duration-normal) var(--ease-default),
                transform var(--duration-normal) var(--ease-default);
    pointer-events: none;
}

/* Arrow */
.ds-tooltip::before {
    content: '';
    position: absolute;
    border: 6px solid transparent;
    z-index: var(--z-fab-above);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-normal) var(--ease-default),
                visibility var(--duration-normal) var(--ease-default);
    pointer-events: none;
}

/* Show on hover */
.ds-tooltip:hover::after,
.ds-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* --- Placement: right (default) --- */
.ds-tooltip::after,
.ds-tooltip--right::after {
    left: calc(100% + var(--space-3));
    top: 50%;
    transform: translateY(-50%);
}

.ds-tooltip:hover::after,
.ds-tooltip--right:hover::after {
    transform: translateY(-50%) translateX(4px);
}

.ds-tooltip::before,
.ds-tooltip--right::before {
    left: calc(100% + 2px);
    top: 50%;
    transform: translateY(-50%);
    border-right-color: var(--ds-tooltip-bg);
}

/* --- Placement: top --- */
.ds-tooltip--top::after {
    left: 50%;
    top: auto;
    bottom: calc(100% + var(--space-3));
    transform: translateX(-50%);
}

.ds-tooltip--top:hover::after {
    transform: translateX(-50%) translateY(-4px);
}

.ds-tooltip--top::before {
    left: 50%;
    top: auto;
    bottom: calc(100% + 2px);
    transform: translateX(-50%);
    border-top-color: var(--ds-tooltip-bg);
    border-right-color: transparent;
}

/* --- Placement: bottom --- */
.ds-tooltip--bottom::after {
    left: 50%;
    top: calc(100% + var(--space-3));
    bottom: auto;
    transform: translateX(-50%);
}

.ds-tooltip--bottom:hover::after {
    transform: translateX(-50%) translateY(4px);
}

.ds-tooltip--bottom::before {
    left: 50%;
    top: calc(100% + 2px);
    bottom: auto;
    transform: translateX(-50%);
    border-bottom-color: var(--ds-tooltip-bg);
    border-right-color: transparent;
}

/* --- Glow variant (used by rail tooltips) --- */
.ds-tooltip--glow::after {
    box-shadow: var(--shadow-lg), 0 0 20px var(--ds-tooltip-glow);
}

/* ============================================================
   DS Tooltip Element — JS-positioned tooltip (fixed positioning)
   Usage: create a div.ds-tooltip-el + div.ds-tooltip-el__arrow,
   toggle .is-visible, and set left/top via JS.
   ============================================================ */

.ds-tooltip-el {
    position: fixed;
    background: var(--ds-tooltip-bg);
    color: var(--ds-tooltip-color);
    font-family: var(--font-heading);
    font-size: var(--ds-tooltip-font-size);
    font-weight: var(--ds-tooltip-font-weight);
    padding: var(--ds-tooltip-padding);
    border-radius: var(--ds-tooltip-radius);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-normal) var(--ease-default);
    z-index: var(--z-fab);
    transform: translateY(-50%);
    box-shadow: var(--shadow-lg);
}

.ds-tooltip-el.is-visible {
    opacity: 1;
}

.ds-tooltip-el__arrow {
    position: fixed;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-right-color: var(--ds-tooltip-bg);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-normal) var(--ease-default);
    z-index: var(--z-fab-above);
}

.ds-tooltip-el__arrow.is-visible {
    opacity: 1;
}

/* =============================================================================
   DS CARD COMPONENTS — House Result · Passport · Profile · House Info
   All values wired through component tokens in tokens.css.
   ============================================================================= */

/* ── House Result Card ── */
.ds-result-card {
    width: 100%;
    max-width: 520px;
    border-radius: var(--result-card-radius);
    background: var(--result-card-bg);
    border: var(--result-card-border);
    box-shadow: var(--result-card-shadow);
    overflow: hidden;
    position: relative;
    text-align: center;
}
.ds-result-card__edge {
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--result-card-edge);
    border-radius: 2px;
    z-index: var(--z-base);
}
.ds-result-card__body {
    padding: var(--result-card-padding);
}
.ds-result-card__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--result-badge-padding);
    font-family: var(--result-badge-font);
    font-size: var(--result-badge-size);
    font-weight: var(--result-badge-weight);
    letter-spacing: var(--result-badge-tracking);
    text-transform: uppercase;
    color: var(--result-badge-color);
    background: var(--result-badge-bg);
    border: var(--result-badge-border);
    border-radius: var(--result-badge-radius);
    margin-bottom: var(--space-8);
}
.ds-result-card__label {
    font-size: var(--result-label-size);
    font-weight: var(--result-label-weight);
    color: var(--result-label-color);
    margin-bottom: var(--space-1);
    letter-spacing: 0.03em;
}
.ds-result-card__identity {
    font-family: var(--result-identity-font);
    font-size: var(--result-identity-size);
    font-weight: var(--result-identity-weight);
    letter-spacing: var(--result-identity-tracking);
    text-transform: uppercase;
    color: var(--result-identity-color);
    margin-bottom: var(--space-8);
}
.ds-result-card__logo {
    display: block;
    width: var(--result-logo-width);
    margin: var(--result-logo-margin);
}
.ds-result-card__logo img {
    width: 100%;
    height: auto;
    display: block;
}
.ds-result-card__value {
    font-family: var(--result-value-font);
    font-size: var(--result-value-size);
    font-weight: var(--result-value-weight);
    line-height: 1.1;
    padding-bottom: 0.05em;
    background: var(--result-value-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--result-value-color);
    margin-bottom: var(--space-2);
    overflow-wrap: break-word;
}
.ds-result-card__divider {
    width: var(--result-divider-width);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--result-divider-color), transparent);
    margin: 0 auto var(--space-2);
}
.ds-result-card__text {
    font-size: var(--result-body-size);
    font-weight: var(--result-body-weight);
    color: var(--result-body-color);
    line-height: var(--result-body-leading);
    text-align: left;
    margin-bottom: var(--space-6);
}
.ds-result-card__quote {
    font-size: var(--result-quote-size);
    font-weight: var(--result-quote-weight);
    color: var(--result-quote-color);
    font-style: italic;
    line-height: 1.7;
    text-align: left;
    margin-bottom: 0;
}

/* House bar at bottom */
.ds-result-card__bar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: var(--result-bar-padding);
    background: var(--result-bar-bg);
    border-top: var(--result-bar-border);
    text-align: left;
}
.ds-result-card__bar-logo {
    width: var(--result-bar-logo-size);
    height: var(--result-bar-logo-size);
    border-radius: var(--result-bar-logo-radius);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-dark-600);
}
.ds-result-card__bar-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.ds-result-card__bar-text {
    flex: 1;
    min-width: 0;
}
.ds-result-card__bar-name {
    font-family: var(--result-bar-name-font);
    font-size: var(--result-bar-name-size);
    font-weight: var(--font-medium);
    color: var(--result-bar-name-color);
    line-height: 1.2;
}
.ds-result-card__bar-role {
    font-size: var(--result-bar-role-size);
    color: var(--result-bar-role-color);
    margin-top: var(--space-1);
}

/* Action strip */
.ds-result-card__actions {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: var(--result-bar-bg);
    border-top: var(--result-bar-border);
}
.ds-result-card__actions .ds-btn {
    flex: 1;
    font-family: var(--result-action-font);
    font-size: var(--result-action-size);
    font-weight: var(--result-action-weight);
    letter-spacing: var(--result-action-tracking);
    text-transform: uppercase;
    color: var(--result-action-color);
    background: var(--result-action-bg);
    border: var(--result-action-border);
    border-radius: var(--result-action-radius);
    transition: all var(--duration-normal) var(--ease-default);
}
.ds-result-card__actions .ds-btn:hover {
    background: var(--result-action-hover-bg);
    color: var(--result-action-hover-color);
    border: var(--result-action-hover-border);
}
.ds-result-card__actions .ds-btn--result-primary {
    background: var(--result-action-primary-bg);
    color: var(--result-action-primary-color);
    border: var(--result-action-primary-border);
}
.ds-result-card__actions .ds-btn--result-primary:hover {
    background: var(--result-action-hover-bg);
    color: var(--result-action-hover-color);
    border: var(--result-action-hover-border);
}

/* ── Result Card — "You've been sorted" / "Why this house?" heading ── */
.ds-result-card__sorted-heading {
    font-family: var(--font-serif);
    font-size: clamp(24px, 5vw, 36px);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--space-4);
}
.ds-result-card__sorted-heading--sub {
    color: var(--text-primary);
}

/* ── Result Card — Logo text ── */
.ds-result-card__logo-text {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}
.ds-result-card__logo-text--light {
    color: var(--color-gray-400);
}

/* ── Result Card — Light (Sorted) variant ── */
.ds-result-card--light {
    background: var(--result-light-bg);
    border: var(--result-light-border);
    box-shadow: var(--result-light-shadow);
}
.ds-result-card--light .ds-result-card__edge {
    background: var(--result-light-edge);
}
.ds-result-card--light .ds-result-card__label {
    color: var(--result-light-label-color);
}
.ds-result-card__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--result-light-header-padding);
    z-index: 2;
}
.ds-result-card__header .ds-result-card__logo {
    width: var(--result-light-header-logo-size);
    margin: 0;
}
.ds-result-card__header .ds-result-card__logo-text {
    margin-bottom: 0;
    font-size: var(--result-light-header-text-size);
}
.ds-result-card--light .ds-result-card__header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}
.ds-result-card__header--dark .ds-result-card__logo-text {
    color: var(--color-gray-400);
}
.ds-result-card--light .ds-result-card__crest {
    width: 100%;
    overflow: hidden;
    border-radius: var(--result-card-radius) var(--result-card-radius) 0 0;
}
.ds-result-card--light .ds-result-card__crest img {
    width: 100%;
    height: auto;
    display: block;
}
.ds-result-card--light .ds-result-card__body--bottom {
    text-align: left;
    padding: var(--result-light-bottom-padding);
}
.ds-result-card--light .ds-result-card__house-name {
    font-family: var(--font-heading);
    font-size: var(--result-light-house-name-size);
    font-weight: var(--font-bold);
    color: var(--result-light-house-name-color);
    margin-bottom: var(--space-2);
}
.ds-result-card--light .ds-result-card__archetypes {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: var(--font-normal);
    font-style: italic;
    color: var(--result-light-belief-color);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-3);
}
.ds-result-card--light .ds-result-card__belief {
    font-family: var(--font-serif);
    font-size: var(--result-light-belief-size);
    color: var(--result-light-belief-color);
    line-height: var(--leading-relaxed);
}

/* ── Result Card — Goal & Vision (inside card body) ── */
.ds-result-card__goal-block {
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-subtle);
}
.ds-result-card__goal-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: var(--space-2);
}
.ds-result-card__goal-text {
    font-size: var(--text-base);
    color: var(--text-primary);
    line-height: var(--leading-relaxed);
}
.ds-result-card__vision-block {
    margin-top: var(--space-3);
}
.ds-result-card__vision-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: var(--space-1);
}
.ds-result-card__vision-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-normal);
}

/* ── Result Card — Action bar (passport-style) ── */
.ds-result-card__action-bar {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-top: var(--result-light-border);
}
.ds-result-card__action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-3);
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-right: var(--result-light-border);
    cursor: pointer;
    transition: color var(--duration-normal) var(--ease-default);
    text-decoration: none;
}
.ds-result-card__action:last-child {
    border-right: none;
}
.ds-result-card__action:hover {
    color: var(--highlight-purple);
}
.ds-result-card__action svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}
.ds-result-card__action-icon {
    width: 16px;
    height: 16px;
}
/* Dark card variant of action bar */
.ds-result-card:not(.ds-result-card--light) .ds-result-card__action-bar {
    border-top: var(--result-bar-border);
}
.ds-result-card:not(.ds-result-card--light) .ds-result-card__action {
    color: var(--color-white);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.ds-result-card:not(.ds-result-card--light) .ds-result-card__action:hover {
    color: var(--accent-neon);
}

/* ── Result Card — "You are a" seer label ── */
.ds-result-card__seer {
    font-size: var(--result-seer-size);
    font-weight: var(--result-seer-weight);
    color: var(--result-seer-color);
    letter-spacing: var(--result-seer-tracking);
    margin-bottom: var(--space-1);
}

/* ── Result Card — Flip variant ── */
.ds-result-card--flip {
    overflow: visible;
    background: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
}
.ds-result-card--flip.is-3d {
    perspective: var(--result-flip-perspective);
}
.ds-result-card--flip .ds-result-card__flip-inner {
    position: relative;
    width: 100%;
    transition: transform var(--result-flip-duration) var(--result-flip-easing);
}
.ds-result-card--flip.is-3d .ds-result-card__flip-inner {
    transform-style: preserve-3d;
}
.ds-result-card--flip.is-flipped .ds-result-card__flip-inner {
    transform: rotateY(180deg);
}

/* Front + Back shared */
.ds-result-card__front,
.ds-result-card__back {
    width: 100%;
    border-radius: var(--result-card-radius);
    overflow: hidden;
    background: var(--result-card-bg);
    border: var(--result-card-border);
    box-shadow: var(--result-card-shadow);
}
.ds-result-card--flip.is-3d .ds-result-card__front,
.ds-result-card--flip.is-3d .ds-result-card__back {
    backface-visibility: hidden;
}

/* Front */
.ds-result-card__front {
    position: relative;
}
.ds-result-card__front .ds-result-card__edge {
    z-index: 1;
}

/* Back */
.ds-result-card__back {
    position: absolute;
    top: 0;
    left: 0;
    display: none;
}
.ds-result-card--flip.is-3d .ds-result-card__back {
    display: block;
    transform: rotateY(180deg);
}

/* Bar as flip-trigger button */
.ds-result-card__bar--flip {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: var(--result-bar-padding);
    background: var(--result-bar-bg);
    border: none;
    border-top: var(--result-bar-border);
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-default);
    text-align: left;
    color: inherit;
    font-family: inherit;
}
.ds-result-card__bar--flip:hover {
    background: rgba(0, 0, 0, 0.35);
}
.ds-result-card__bar-btn {
    font-family: var(--result-bar-btn-font);
    font-size: var(--result-bar-btn-size);
    font-weight: var(--result-bar-btn-weight);
    letter-spacing: var(--result-bar-btn-tracking);
    text-transform: uppercase;
    color: var(--result-bar-btn-color);
    background: var(--result-bar-btn-bg);
    border: var(--result-bar-btn-border);
    border-radius: var(--result-bar-btn-radius);
    padding: var(--result-bar-btn-padding);
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.25s ease;
    pointer-events: none;
}
.ds-result-card__bar--flip:hover .ds-result-card__bar-btn {
    background: var(--result-bar-btn-hover-bg);
    border-color: rgba(0, 243, 255, 0.35);
    box-shadow: var(--result-bar-btn-hover-shadow);
}

/* Back body */
.ds-result-card__back-body {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.ds-result-card__back-content {
    padding: 0 var(--space-9) var(--space-9);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Back hero image */
.ds-result-card__back-hero {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: var(--result-back-hero-bg);
    margin-bottom: var(--space-5);
}
.ds-result-card__back-hero img {
    width: 100%;
    aspect-ratio: var(--result-back-hero-aspect);
    object-fit: cover;
    display: block;
}
.ds-result-card__back-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65%;
    background: var(--result-back-hero-gradient);
    pointer-events: none;
}

/* Back house name over hero */
.ds-result-card__back-house-name {
    position: absolute;
    bottom: var(--space-5);
    left: 0;
    right: 0;
    z-index: 2;
    font-family: var(--result-back-house-font);
    font-size: var(--result-back-house-size);
    font-weight: var(--result-back-house-weight);
    text-transform: uppercase;
    letter-spacing: var(--result-back-house-tracking);
    line-height: 1.1;
    color: var(--result-back-house-color);
    padding: 0 var(--space-9);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* Back motto */
.ds-result-card__back-motto {
    font-size: var(--result-back-motto-size);
    font-style: italic;
    color: var(--result-back-motto-color);
    opacity: 0.85;
    margin-bottom: var(--space-8);
    line-height: 1.5;
}

/* Back section label */
.ds-result-card__back-section-label {
    font-family: var(--result-back-section-font);
    font-size: var(--result-back-section-size);
    font-weight: var(--result-back-section-weight);
    letter-spacing: var(--result-back-section-tracking);
    text-transform: uppercase;
    color: var(--result-back-section-color);
    margin-bottom: var(--space-2);
}

/* Back goal */
.ds-result-card__back-goal {
    font-size: var(--result-back-goal-size);
    font-weight: var(--result-back-goal-weight);
    color: var(--result-back-goal-color);
    line-height: var(--result-back-goal-leading);
    margin-bottom: var(--space-8);
    max-width: 400px;
}

/* Back CTA */
.ds-result-card__back-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--result-back-cta-padding);
    font-family: var(--result-back-cta-font);
    font-size: var(--result-back-cta-size);
    font-weight: var(--result-back-cta-weight);
    letter-spacing: var(--result-back-cta-tracking);
    text-transform: uppercase;
    color: var(--result-back-cta-color);
    background: var(--result-back-cta-bg);
    border: none;
    border-radius: var(--result-back-cta-radius);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
    width: 100%;
    justify-content: center;
}
.ds-result-card__back-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--result-back-cta-hover-shadow);
}
.ds-result-card__back-cta svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Flip-back button */
.ds-result-card__flipback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-4) var(--space-9);
    font-family: var(--result-back-flipback-font);
    font-size: var(--result-back-flipback-size);
    font-weight: var(--result-back-flipback-weight);
    letter-spacing: var(--result-back-flipback-tracking);
    text-transform: uppercase;
    color: var(--result-back-flipback-color);
    background: none;
    border: none;
    border-top: var(--result-back-flipback-border);
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-default);
}
.ds-result-card__flipback:hover {
    background: var(--result-back-flipback-hover-bg);
}
.ds-result-card__flipback svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

/* ── Result Strip (sticky action bar) ── */
.ds-result-strip {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--result-strip-z);
    display: flex;
    gap: var(--result-strip-gap);
    padding: var(--result-strip-padding);
    padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
    background: var(--result-strip-bg);
    border-top: var(--result-strip-border);
}
.ds-result-strip__btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--result-strip-btn-padding);
    font-family: var(--result-strip-btn-font);
    font-size: var(--result-strip-btn-size);
    font-weight: var(--result-strip-btn-weight);
    letter-spacing: var(--result-strip-btn-tracking);
    text-transform: uppercase;
    border-radius: var(--result-strip-btn-radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.ds-result-strip__btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.ds-result-strip__btn--share {
    color: var(--result-strip-share-color);
    background: var(--result-strip-share-bg);
    border: var(--result-strip-share-border);
    box-shadow: var(--result-strip-share-shadow);
}
.ds-result-strip__btn--share:hover {
    color: var(--color-dark-900);
    border-color: rgba(0, 0, 0, 0.18);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.ds-result-strip__btn--share.is-generating {
    pointer-events: none;
    opacity: 0.6;
}
.ds-result-strip__btn--cta {
    color: var(--result-strip-cta-color);
    background: var(--result-strip-cta-bg);
    box-shadow: var(--result-strip-cta-shadow);
}
.ds-result-strip__btn--cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 195, 210, 0.35);
}

/* ── Passport / Onboarding Card (DS preview) ── */
.ds-passport-card {
    width: 100%;
    max-width: 520px;
    border-radius: var(--passport-card-radius);
    background: var(--passport-card-bg);
    border: var(--passport-card-border);
    box-shadow: var(--passport-card-shadow);
    overflow: visible;
    position: relative;
}
.ds-passport-card__edge {
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--passport-card-edge);
    border-radius: 2px;
    z-index: var(--z-base);
}
.ds-passport-card__edge--bottom {
    top: auto;
    bottom: 0;
}
/* Corner accents */
.ds-passport-card::before,
.ds-passport-card::after {
    content: '';
    position: absolute;
    width: var(--passport-card-corner-size);
    height: var(--passport-card-corner-size);
    border-color: var(--passport-card-corner-color);
    border-style: solid;
    z-index: 4;
    pointer-events: none;
}
.ds-passport-card::before {
    top: var(--space-3);
    left: var(--space-3);
    border-width: 2px 0 0 2px;
    border-radius: 4px 0 0 0;
}
.ds-passport-card::after {
    top: var(--space-3);
    right: var(--space-3);
    border-width: 2px 2px 0 0;
    border-radius: 0 4px 0 0;
}
.ds-passport-card__inner {
    border-radius: var(--passport-card-radius);
    overflow: hidden;
}
.ds-passport-card__banner {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-dark-600), var(--color-dark-500));
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: var(--passport-banner-min-h);
    padding-bottom: var(--space-5);
}
/* Background: user avatar (blurred + darkened) */
.ds-passport-card__banner-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.7);
    transform: scale(1.05);
}
.ds-passport-card__banner-overlay {
    position: absolute;
    inset: 0;
    background: var(--passport-banner-gradient);
    pointer-events: none;
}
/* "PASSPORT" document header at very top */
.ds-passport-card__banner-label {
    position: relative;
    text-align: center;
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    z-index: 3;
    padding-top: var(--space-8);
    margin-bottom: var(--space-2);
}
/* User name + handle row — inline on same line */
.ds-passport-card__user-row {
    position: relative;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    z-index: 3;
    padding: 0 var(--space-6);
}
/* User display name — large, prominent */
.ds-passport-card__user-name {
    font-family: var(--passport-handle-font);
    font-size: var(--passport-handle-size);
    font-weight: var(--passport-handle-weight);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--passport-handle-color);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7);
    line-height: var(--leading-tight);
}
/* @handle — inline right of name, muted */
.ds-passport-card__user-handle {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: var(--font-normal);
    color: var(--color-gray-400);
    letter-spacing: 0.02em;
}
/* "Who You Are" three-words — black highlight marker effect, green text */
.ds-passport-card__three-words {
    position: relative;
    text-align: center;
    font-size: var(--passport-three-words-size);
    font-weight: var(--font-bold);
    color: var(--accent-primary);
    letter-spacing: var(--passport-three-words-tracking);
    text-transform: uppercase;
    z-index: 3;
    margin-top: var(--space-3);
    padding: 0 var(--space-6);
}
.ds-passport-card__three-words span {
    background: var(--color-black);
    padding: var(--space-1) var(--space-2);
    display: inline;
    line-height: 2;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
/* House info section — bottom of the banner */
.ds-passport-card__house-section {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: 0 var(--space-6);
    position: relative;
    z-index: 5;
    margin-top: auto;
    margin-bottom: var(--space-4);
}
/* House logo circle (replaces user avatar circle) */
.ds-passport-card__house-logo {
    width: var(--passport-house-logo-size);
    height: var(--passport-house-logo-size);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}
.ds-passport-card__house-logo-ring {
    display: none;
}
.ds-passport-card__house-logo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid var(--color-dark-800);
}
/* House name + motto text next to logo */
.ds-passport-card__house-info {
    flex: 1;
    min-width: 0;
}
.ds-passport-card__house-name {
    font-family: var(--passport-handle-font);
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: var(--leading-tight);
}
.ds-passport-card__house-motto {
    font-family: var(--font-serif);
    font-size: var(--text-xs);
    font-weight: var(--font-normal);
    color: var(--color-gray-400);
    font-style: italic;
    margin-top: var(--space-1);
    letter-spacing: 0.02em;
}
.ds-passport-card__values {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--space-1);
    padding: 0 var(--space-6);
    position: relative;
    z-index: 5;
    overflow: hidden;
}
.ds-passport-card__pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--passport-pill-color);
    background: var(--passport-pill-bg);
    border: var(--passport-pill-border);
    border-radius: var(--radius-sm);
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}
.ds-passport-card__pill--primary {
    color: var(--passport-pill-primary-color);
    background: var(--passport-pill-primary-bg);
    border-color: rgba(0, 243, 255, 0.25);
}
/* Brand footer — BoH logo + text below value tags */
.ds-passport-card__brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6) 0;
    position: relative;
    z-index: 5;
}
.ds-passport-card__brand img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.6;
}
.ds-passport-card__brand span {
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-white);
    opacity: 0.45;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.ds-passport-card__action-bar {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: var(--space-2);
}
.ds-passport-card__action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-5) var(--space-2);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--passport-action-color);
    background: none;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: color var(--duration-normal) var(--ease-default);
    text-decoration: none;
}
.ds-passport-card__action:last-child {
    border-right: none;
}
.ds-passport-card__action:hover {
    color: var(--passport-action-hover);
}
.ds-passport-card__action svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* ── Profile Card (light theme) ── */
.ds-profile-card {
    width: 100%;
    max-width: 520px;
    background: var(--profile-card-bg);
    border-radius: var(--profile-card-radius);
    box-shadow: var(--profile-card-shadow);
    border: var(--profile-card-border);
    overflow: hidden;
    text-align: center;
}
.ds-profile-card__header {
    padding: var(--space-8) var(--profile-card-padding) var(--space-4);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.ds-profile-card__avatar {
    width: var(--profile-card-avatar-size);
    height: var(--profile-card-avatar-size);
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-default);
    margin-bottom: var(--space-4);
}
.ds-profile-card__name {
    font-family: var(--profile-card-name-font);
    font-size: var(--profile-card-name-size);
    font-weight: var(--profile-card-name-weight);
    color: var(--profile-card-name-color);
    margin-bottom: var(--space-1);
}
.ds-profile-card__handle {
    font-size: var(--profile-card-handle-size);
    color: var(--profile-card-handle-color);
    margin-bottom: var(--space-3);
}
.ds-profile-card__house-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--accent-primary);
    background: var(--accent-primary-subtle);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
}
.ds-profile-card__bio {
    font-size: var(--profile-card-bio-size);
    color: var(--profile-card-bio-color);
    line-height: var(--profile-card-bio-leading);
    padding: 0 var(--profile-card-padding);
    margin-bottom: var(--space-6);
}
.ds-profile-card__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border-default);
}
.ds-profile-card__stat {
    padding: var(--space-4) var(--space-2);
    text-align: center;
    border-right: 1px solid var(--border-default);
}
.ds-profile-card__stat:last-child {
    border-right: none;
}
.ds-profile-card__stat-value {
    font-family: var(--profile-card-stat-value-font);
    font-size: var(--profile-card-stat-value-size);
    font-weight: var(--profile-card-stat-value-weight);
    color: var(--profile-card-stat-value-color);
    line-height: 1;
    margin-bottom: var(--space-1);
}
.ds-profile-card__stat-label {
    font-size: var(--profile-card-stat-label-size);
    color: var(--profile-card-stat-label-color);
    text-transform: uppercase;
    letter-spacing: var(--profile-card-stat-label-tracking);
    font-weight: var(--font-medium);
}
.ds-profile-card__actions {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4) var(--profile-card-padding);
    border-top: 1px solid var(--border-default);
}
.ds-profile-card__actions .ds-btn {
    flex: 1;
}

/* ── House Info Card (light theme) ── */
.ds-house-info-card {
    width: 100%;
    max-width: 520px;
    background: var(--house-info-card-bg);
    border-radius: var(--house-info-card-radius);
    box-shadow: var(--house-info-card-shadow);
    border: var(--house-info-card-border);
    overflow: hidden;
}
.ds-house-info-card__banner {
    width: 100%;
    height: var(--house-info-card-banner-h);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-dark-600), var(--color-dark-500));
}
.ds-house-info-card__banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ds-house-info-card__banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 60%);
    pointer-events: none;
}
.ds-house-info-card__body {
    padding: var(--house-info-card-padding);
}
.ds-house-info-card__logo {
    width: var(--size-16);
    height: var(--size-16);
    border-radius: var(--radius-lg);
    object-fit: contain;
    border: 3px solid var(--surface-primary);
    margin-top: calc(-1 * var(--space-10));
    position: relative;
    z-index: 1;
    background: var(--surface-primary);
    margin-bottom: var(--space-3);
}
.ds-house-info-card__name {
    font-family: var(--house-info-card-name-font);
    font-size: var(--house-info-card-name-size);
    font-weight: var(--house-info-card-name-weight);
    color: var(--house-info-card-name-color);
    margin-bottom: var(--space-2);
}
.ds-house-info-card__motto {
    font-family: var(--house-info-card-motto-font);
    font-size: var(--house-info-card-motto-size);
    color: var(--house-info-card-motto-color);
    font-style: italic;
    margin-bottom: var(--space-4);
    line-height: var(--leading-relaxed);
}
.ds-house-info-card__desc {
    font-size: var(--house-info-card-desc-size);
    color: var(--house-info-card-desc-color);
    line-height: var(--house-info-card-desc-leading);
    margin-bottom: var(--space-6);
}
.ds-house-info-card__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}
.ds-house-info-card__stat {
    text-align: center;
    padding: var(--house-info-card-stat-padding);
    background: var(--house-info-card-stat-bg);
    border-radius: var(--house-info-card-stat-radius);
}
.ds-house-info-card__stat-value {
    font-family: var(--house-info-card-stat-value-font);
    font-size: var(--house-info-card-stat-value-size);
    font-weight: var(--house-info-card-stat-value-weight);
    color: var(--house-info-card-stat-value-color);
    line-height: 1;
    margin-bottom: var(--space-1);
}
.ds-house-info-card__stat-label {
    font-size: var(--house-info-card-stat-label-size);
    color: var(--house-info-card-stat-label-color);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: var(--font-medium);
}
.ds-house-info-card__actions {
    display: flex;
    gap: var(--space-3);
}
.ds-house-info-card__actions .ds-btn {
    flex: 1;
}

/* ── Responsive (all DS cards) ── */
@media (max-width: 480px) {
    .ds-result-card__body {
        padding: var(--space-8) var(--space-5) var(--space-5);
    }
    .ds-passport-card__house-section {
        padding: 0 var(--space-5);
        gap: var(--space-3);
    }
    .ds-passport-card__house-logo {
        width: 60px;
        height: 60px;
    }
    .ds-passport-card__values {
        padding: 0 var(--space-5);
    }
    .ds-passport-card__action {
        padding: var(--space-5) var(--space-1);
        font-size: var(--text-xs);
    }
    .ds-passport-card__user-row {
        padding: 0 var(--space-5);
    }
    .ds-passport-card__three-words {
        padding: 0 var(--space-5);
    }
    .ds-passport-card__brand {
        padding: var(--space-4) var(--space-5) 0;
    }
    .ds-result-card__back-content {
        padding: 0 var(--space-6) var(--space-6);
    }
    .ds-result-card__back-house-name {
        padding: 0 var(--space-6);
    }
    .ds-result-card__bar--flip {
        padding: var(--space-3) var(--space-4);
        gap: var(--space-3);
    }
    .ds-result-card__bar-btn {
        font-size: 11px;
        padding: var(--space-2) var(--space-3);
    }
    .ds-result-strip {
        gap: var(--space-2);
        padding: var(--space-3) var(--space-4);
    }
    .ds-result-strip__btn {
        font-size: 12px;
        padding: var(--space-3) var(--space-4);
        letter-spacing: 0.06em;
    }
}

/* ═══════════════════════════════════════════════════════════════
   LOCKUP — Logo Mark + Wordmark
   HARD RULE: mark visual height == text visual height (single-line).
   Two-line: mark spans both text lines.
   ═══════════════════════════════════════════════════════════════ */

/* ── Base lockup container ──────────────────────────────────── */
.ds-lockup {
    display: inline-flex;
    align-items: center;
    gap: var(--lockup-gap);
}

.ds-lockup__mark {
    flex-shrink: 0;
    width: var(--lockup-mark-size);
    height: var(--lockup-mark-size);
}

.ds-lockup__text {
    font-family: var(--lockup-font);
    font-weight: var(--lockup-font-weight);
    font-size: var(--lockup-text-size);
    letter-spacing: var(--lockup-tracking);
    text-transform: uppercase;
    line-height: 1;
}

/* ── Single-line: Light ─────────────────────────────────────── */
.ds-lockup--light .ds-lockup__mark { color: var(--lockup-mark-fill-light); }
.ds-lockup--light .ds-lockup__text { color: var(--lockup-text-color-light); }

/* ── Single-line: Dark ──────────────────────────────────────── */
.ds-lockup--dark .ds-lockup__mark { color: var(--lockup-mark-fill-dark); }
.ds-lockup--dark .ds-lockup__text { color: var(--lockup-text-color-dark); }

/* ═══════════════════════════════════════════════════════════════
   TWO-LINE LOCKUP — Mark + Brand + Tagline
   ═══════════════════════════════════════════════════════════════ */
.ds-lockup-2l {
    display: inline-flex;
    align-items: center;
    gap: var(--lockup-2l-gap);
}

.ds-lockup-2l__mark {
    flex-shrink: 0;
    width: var(--lockup-2l-mark-size);
    height: var(--lockup-2l-mark-size);
}

.ds-lockup-2l__lines {
    display: flex;
    flex-direction: column;
    gap: var(--lockup-2l-line-gap);
}

.ds-lockup-2l__brand {
    font-family: var(--lockup-font);
    font-weight: var(--lockup-font-weight);
    font-size: var(--lockup-2l-brand-size);
    letter-spacing: var(--lockup-tracking);
    text-transform: uppercase;
    line-height: 1;
}

.ds-lockup-2l__tagline {
    font-family: var(--lockup-2l-tagline-font);
    font-weight: var(--lockup-2l-tagline-weight);
    font-size: var(--lockup-2l-tagline-size);
    font-style: italic;
    letter-spacing: var(--lockup-tracking);
    text-transform: uppercase;
    line-height: 1;
}

/* ── Two-line: Light ────────────────────────────────────────── */
.ds-lockup-2l--light .ds-lockup-2l__mark { color: var(--lockup-mark-fill-light); }
.ds-lockup-2l--light .ds-lockup-2l__brand { color: var(--lockup-text-color-light); }
.ds-lockup-2l--light .ds-lockup-2l__tagline { color: var(--lockup-2l-tagline-color-light); }

/* ── Two-line: Dark ─────────────────────────────────────────── */
.ds-lockup-2l--dark .ds-lockup-2l__mark { color: var(--lockup-mark-fill-dark); }
.ds-lockup-2l--dark .ds-lockup-2l__brand { color: var(--lockup-text-color-dark); }
.ds-lockup-2l--dark .ds-lockup-2l__tagline { color: var(--lockup-2l-tagline-color-dark); }

/* ═══════════════════════════════════════════════════════════════
   HINT BLOCK
   Purple left-bar callout for contextual guidance text.
   Tokens: --hint-border, --hint-bg, --hint-radius, --hint-padding
   ═══════════════════════════════════════════════════════════════ */
.ds-hint {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    padding: var(--hint-padding);
    background: var(--hint-bg);
    border-left: var(--hint-border);
    border-radius: 0 var(--hint-radius) var(--hint-radius) 0;
}
