/* ========================================
   PrimOrcs — Dark Fantasy War Banner
   Primates x MidEvils collab
   ======================================== */

*,*::before,*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Orc steel & fire */
    --gold: #D4A017;
    --gold-dim: #8a6a3a;
    --gold-glow: rgba(212, 160, 23, 0.15);
    --ember: #c4712a;
    /* Primate violet */
    --violet: #7b68ee;
    --violet-dim: #5a4cc0;
    --violet-glow: rgba(123, 104, 238, 0.12);
    /* Neutrals */
    --bg: #0e0f0c;
    --bg-card: #16181210;
    --surface: rgba(255,255,255,0.03);
    --border: rgba(212, 160, 23, 0.12);
    --border-violet: rgba(123, 104, 238, 0.12);
    --text: #e8dcc8;
    --text-dim: #d4c8b0;
    --text-faint: #5a5244;
    --eligible: #4caf50;
    --denied: #c05040;
    /* Type */
    --font-display: 'Cinzel Decorative', 'Cinzel', serif;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Cormorant Garamond', 'Georgia', serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 32px;
    --space-xl: 56px;
    --space-2xl: 80px;
}

/* --- Skip link --- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 10000;
    padding: 12px 24px;
    background: var(--gold);
    color: var(--bg);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-decoration: none;
    letter-spacing: 1px;
}

.skip-link:focus {
    left: 16px;
    top: 16px;
    width: auto;
    height: auto;
}

/* --- Base --- */
body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    line-height: 1.65;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* --- Grain overlay --- */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px;
}

/* --- Ambient orbs --- */
.ambient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    animation: drift 20s ease-in-out infinite alternate;
}

.ambient-orb--gold {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.08), transparent 70%);
    top: -10%;
    right: -15%;
}

.ambient-orb--violet {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(123, 104, 238, 0.06), transparent 70%);
    bottom: -15%;
    left: -20%;
    animation-delay: -10s;
}

@keyframes drift {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(30px, -20px); }
}

/* --- Page wrapper --- */
.page-wrapper {
    position: relative;
    z-index: 1;
    max-width: 580px;
    margin: 0 auto;
    padding: var(--space-2xl) 24px var(--space-xl);
    min-height: 100vh;
}

/* --- Header --- */
.header {
    text-align: center;
    margin-bottom: var(--space-xl);
    animation: fadeUp 0.8s ease both;
}

.sigil {
    margin-bottom: var(--space-lg);
}

.sigil-img {
    width: 80px;
    height: 80px;
    opacity: 0.85;
    animation: sigil-rotate 30s linear infinite;
    filter: drop-shadow(0 0 20px rgba(212, 160, 23, 0.2));
}

@keyframes sigil-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.collab-badge {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--violet);
    border: 1px solid var(--border-violet);
    padding: 5px 20px;
    border-radius: 0;
    margin-bottom: var(--space-lg);
    position: relative;
}

.collab-badge::before,
.collab-badge::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border: 1px solid var(--violet-dim);
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.collab-badge::before { left: -4px; }
.collab-badge::after  { right: -4px; }

.title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 4.5rem);
    font-weight: 700;
    letter-spacing: 8px;
    color: var(--text);
    line-height: 1;
    position: relative;
}

.title .accent {
    background: linear-gradient(135deg, var(--gold) 0%, var(--ember) 50%, var(--violet) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle-line {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
    justify-content: center;
}

.rule {
    flex: 1;
    max-width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.subtitle-text {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.x-mark {
    color: var(--violet);
    font-weight: 700;
    padding: 0 2px;
}

.tagline {
    font-family: var(--font-body);
    font-style: italic;
    color: var(--text-dim);
    margin-top: var(--space-lg);
    font-size: 1.15rem;
}

.piece-count {
    margin-top: var(--space-lg);
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--space-sm);
}

.piece-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--gold);
    line-height: 1;
    text-shadow: 0 0 40px var(--gold-glow);
}

.piece-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* --- Hero image --- */
.hero-frame {
    position: relative;
    margin: 0 -24px;
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    animation: fadeUp 0.8s ease both;
    animation-delay: 0.1s;
}

.hero-img {
    display: block;
    width: 100%;
    height: auto;
    filter: saturate(0.9) brightness(0.95);
    transition: filter 600ms ease;
}

.hero-frame:hover .hero-img {
    filter: saturate(1) brightness(1);
}

.hero-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(14, 15, 12, 0.3) 0%,
        transparent 20%,
        transparent 70%,
        rgba(14, 15, 12, 0.6) 100%
    );
    pointer-events: none;
}

/* --- Scroll hint --- */
.scroll-hint {
    text-align: center;
    margin-top: var(--space-md);
    color: var(--text-dim);
    font-size: 1.2rem;
    animation: pulse 2s ease-in-out infinite;
}

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

/* --- Ornamental divider --- */
.hero-frame + .divider {
    margin: var(--space-lg) 0;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin: var(--space-xl) 0;
    animation: fadeUp 0.8s ease both;
    animation-delay: 0.15s;
}

.divider-wing {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dim) 50%, transparent);
}

.divider-diamond {
    width: 8px;
    height: 8px;
    border: 1px solid var(--gold-dim);
    transform: rotate(45deg);
    flex-shrink: 0;
}

/* --- Info section --- */
.info-section {
    animation: fadeUp 0.8s ease both;
    animation-delay: 0.2s;
}

.steps {
    display: flex;
    flex-direction: column;
}

.step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.step-num {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--gold);
    border: 1px solid var(--gold-dim);
    border-radius: 50%;
}

.step-line {
    width: 1px;
    height: 24px;
    background: linear-gradient(180deg, var(--gold-dim), transparent);
}

.step-text {
    font-size: 1rem;
    color: var(--text-dim);
    line-height: 1.5;
    padding-top: 5px;
    padding-bottom: 20px;
}

.step:last-child .step-text {
    padding-bottom: 0;
}

.step-text strong {
    color: var(--text);
    font-weight: 600;
}

.artist-credit {
    text-align: center;
    margin-top: var(--space-lg);
    font-size: 0.85rem;
    color: var(--text-faint);
    letter-spacing: 0.5px;
}

.artist-credit a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 200ms ease;
}

.artist-credit a:hover {
    color: var(--gold);
}

.artist-credit strong {
    font-weight: 600;
}

/* --- Sneak peek --- */
.peek-section {
    margin-top: var(--space-xl);
    text-align: center;
    animation: fadeUp 0.8s ease both;
    animation-delay: 0.25s;
}

.peek-label {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold-dim);
    margin-bottom: var(--space-md);
}

.peek-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
}

.peek-frame {
    position: relative;
    max-width: 280px;
    margin: 0 auto;
    flex: 1 1 240px;
    overflow: hidden;
}


.peek-img {
    display: block;
    width: 100%;
    height: auto;
    mask-image: radial-gradient(ellipse 60% 55% at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 55% at center, black 30%, transparent 70%);
    filter: saturate(0.9) brightness(0.95);
}

/* Blurred teaser — overrides base .peek-img filter and mask */
.peek-img--blur {
    mask-image: none;
    -webkit-mask-image: none;
    filter: blur(7px) saturate(1.1);
    transform: scale(1.06);
}

.peek-fade {
    display: none;
}

/* --- Connect section --- */
.connect-section {
    animation: fadeUp 0.8s ease both;
    animation-delay: 0.35s;
}

.connect-card {
    background: linear-gradient(180deg, rgba(22, 24, 18, 0.6), rgba(14, 15, 12, 0.9));
    border: 1px solid var(--border);
    padding: 40px 28px;
    text-align: center;
    position: relative;
}

/* Corner ornaments */
.connect-card::before,
.connect-card::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: var(--gold-dim);
    border-style: solid;
}

.connect-card::before {
    top: -1px;
    left: -1px;
    border-width: 1px 0 0 1px;
}

.connect-card::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 1px 1px 0;
}

.safety-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    background: rgba(212, 160, 23, 0.04);
    border: 1px solid var(--border);
    border-left: 2px solid var(--violet-dim);
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 28px;
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.55;
}

.safety-notice strong {
    color: var(--text);
}

.shield-icon {
    flex-shrink: 0;
    color: var(--violet);
    margin-top: 1px;
}

/* --- Connect button --- */
.connect-btn {
    position: relative;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bg);
    background-color: var(--gold);
    background: linear-gradient(135deg, var(--gold), var(--ember));
    border: none;
    border-radius: 2px;
    padding: 16px 48px;
    cursor: pointer;
    letter-spacing: 2px;
    text-transform: uppercase;
    overflow: hidden;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gold), var(--violet));
    opacity: 0;
    transition: opacity 400ms ease;
}

.connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(212, 160, 23, 0.25), 0 0 0 1px rgba(212, 160, 23, 0.3);
}

.connect-btn:hover .btn-glow {
    opacity: 1;
}

.connect-btn:active {
    transform: translateY(0);
}

/* --- States --- */
.hidden {
    display: none !important;
}

/* Spinner */
.spinner {
    width: 48px;
    height: 48px;
    position: relative;
    margin: 0 auto var(--space-md);
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-ring--inner {
    inset: 6px;
    border-top-color: var(--violet);
    animation-direction: reverse;
    animation-duration: 1.5s;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.checking-text {
    color: var(--text-dim);
    font-size: 1rem;
    font-style: italic;
}

/* --- Results --- */
.result-sigil {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-md);
    animation: resultPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.result-sigil svg {
    width: 100%;
    height: 100%;
}

@keyframes resultPop {
    0%   { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.result-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

.eligible-title {
    color: var(--eligible);
}

.not-eligible-title {
    color: var(--denied);
}

.result-text {
    color: var(--text);
    font-size: 1rem;
    margin-bottom: var(--space-sm);
}

.result-text.dim {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.result-text code {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2px 8px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    word-break: break-all;
}

/* Holdings summary */
.holdings-summary {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.holdings-summary .holding {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.holdings-summary .count {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--gold);
    line-height: 1;
    text-shadow: 0 0 30px var(--gold-glow);
}

.holdings-summary .holding span:last-child {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* Disconnect / secondary button */
.disconnect-btn {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
    background: none;
    border: 1px solid var(--border);
    padding: 10px 24px;
    cursor: pointer;
    margin-top: 24px;
    transition: border-color 200ms ease, color 200ms ease;
}

.disconnect-btn:hover {
    border-color: var(--text-faint);
    color: var(--text);
}

.connect-error {
    text-align: center;
    color: var(--denied);
    font-size: 0.85rem;
    margin-top: var(--space-md);
    min-height: 20px;
}

.error-text {
    color: var(--denied);
    font-size: 1rem;
    margin-bottom: var(--space-md);
}

/* --- Participants --- */
.participants-section {
    margin-top: var(--space-xl);
    animation: fadeUp 0.8s ease both;
    animation-delay: 0.5s;
}

.participants-header {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.participants-title {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-dim);
}

.entry-count {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    color: var(--text-faint);
    letter-spacing: 1px;
}

.participants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.participant-tag {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 5px 12px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    transition: border-color 200ms ease;
}

.participant-tag:hover {
    border-color: var(--gold-dim);
}

.tier-block {
    margin-top: var(--space-lg);
}
.tier-block:first-of-type {
    margin-top: var(--space-md);
}

.tier-subtitle {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-faint);
    margin: -6px 0 10px;
    letter-spacing: 0.3px;
}

.tier-reward {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold-dim);
    border: 1px solid var(--border);
}

.tier-badge {
    display: inline-block;
    padding: 3px 10px;
    margin-right: 10px;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid var(--gold-dim);
}

/* --- Countdown --- */
.countdown {
    text-align: center;
    padding: 10px 12px;
    margin-bottom: var(--space-md);
    border: 1px solid var(--border);
    background: var(--surface);
}

.countdown-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 4px;
}

.countdown-time {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    letter-spacing: 3px;
    color: var(--gold);
    font-weight: 600;
}

.countdown.ended {
    border-color: var(--gold-dim);
}

.countdown.ended .countdown-label {
    color: var(--gold-dim);
}

.countdown.ended .countdown-time {
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 4px;
    color: var(--gold);
}

.connect-btn:disabled,
.connect-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Rules --- */
.rules-section {
    margin-top: var(--space-xl);
    padding: var(--space-lg) var(--space-md);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.rules-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold-dim);
    text-align: center;
    margin-bottom: var(--space-md);
}

.rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.rules-list li {
    position: relative;
    padding: 8px 0 8px 22px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.rules-list li:last-child {
    border-bottom: none;
}

.rules-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 18px;
    width: 6px;
    height: 6px;
    background: var(--gold-dim);
    transform: rotate(45deg);
}

/* --- Footer --- */
.footer {
    text-align: center;
    margin-top: var(--space-2xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.footer-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.footer-logo-link {
    display: flex;
    align-items: center;
    opacity: 0.6;
    transition: opacity 300ms ease;
}

.footer-logo-link:hover {
    opacity: 1;
}

.footer-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.footer-logo--midevils {
    height: 36px;
}

.footer-logo--primates {
    height: 32px;
}

.footer-x {
    font-size: 1.2rem;
    color: var(--text-faint);
    font-weight: 300;
}

.footer-credit {
    color: var(--text-dim);
    font-size: 0.75rem;
    letter-spacing: 1px;
    margin-top: 12px;
    text-transform: uppercase;
    font-family: var(--font-heading);
}

/* --- Winners --- */
.winners-section {
    margin-top: var(--space-xl);
    animation: fadeUp 0.8s ease both;
    animation-delay: 0.4s;
}

.winners-heading {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-align: center;
    color: var(--gold);
    margin-bottom: var(--space-lg);
    text-shadow: 0 0 40px var(--gold-glow);
}

.winner-tag {
    border-color: var(--gold-dim) !important;
    background: rgba(212, 160, 23, 0.06) !important;
    color: var(--gold) !important;
}

/* --- Gallery --- */
.gallery-section {
    margin-top: var(--space-xl);
    animation: fadeUp 0.8s ease both;
    animation-delay: 0.45s;
}

.gallery-heading {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-align: center;
    color: var(--gold);
    text-shadow: 0 0 40px var(--gold-glow);
    margin-bottom: 6px;
}

.gallery-subtitle {
    text-align: center;
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-dim);
    margin-bottom: var(--space-lg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.gallery-item {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    cursor: zoom-in;
    transition: transform 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
    outline: none;
}

.gallery-item:hover,
.gallery-item:focus-visible {
    transform: translateY(-2px);
    border-color: var(--gold-dim);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 160, 23, 0.2);
}

.gallery-item img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    filter: saturate(0.95) brightness(0.95);
    transition: filter 300ms ease, transform 500ms ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
    filter: saturate(1.05) brightness(1);
    transform: scale(1.03);
}

.gallery-item figcaption {
    padding: 6px 6px 8px;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-dim);
    text-align: center;
    line-height: 1.3;
    border-top: 1px solid var(--border);
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(5, 5, 4, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    animation: fadeIn 200ms ease;
}

.lightbox[hidden] { display: none; }

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lightbox-img {
    max-width: min(92vw, 900px);
    max-height: 80vh;
    object-fit: contain;
    border: 1px solid var(--gold-dim);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8);
}

.lightbox-caption {
    margin-top: var(--space-md);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.8rem;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 200ms ease, color 200ms ease;
}

.lightbox-close:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* --- Raffle status --- */
.raffle-status {
    color: var(--gold);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: var(--space-md);
    font-family: var(--font-heading);
}

/* --- Entrance animation --- */
@keyframes fadeUp {
    0%   { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* --- Wallet modal overrides --- */
.wallet-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.wallet-modal-card {
    background: #161812;
    border: 1px solid var(--border);
    padding: 28px;
    min-width: 280px;
    max-width: 360px;
    position: relative;
}

.wallet-modal-card::before,
.wallet-modal-card::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: var(--gold-dim);
    border-style: solid;
}

.wallet-modal-card::before {
    top: -1px;
    left: -1px;
    border-width: 1px 0 0 1px;
}

.wallet-modal-card::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 1px 1px 0;
}

.wallet-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
}

.wallet-modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.wallet-modal-close:hover {
    color: var(--text);
}

.wallet-modal-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wallet-modal-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 200ms ease, background 200ms ease;
}

.wallet-modal-option:hover {
    border-color: var(--gold-dim);
    background: rgba(212, 160, 23, 0.04);
}

.wallet-modal-icon {
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

/* --- Mobile wallet prompt --- */
.mobile-wallet-prompt {
    text-align: center;
}

.mobile-wallet-prompt p {
    margin-bottom: var(--space-md);
    color: var(--text-dim);
}

.mobile-wallet-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-wallet-btn {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-align: center;
}

.phantom-btn {
    background: #ab9ff2;
    color: #0e0f0c;
}

.solflare-btn {
    background: #fc822b;
    color: #0e0f0c;
}

/* --- Tablet --- */
@media (max-width: 768px) {
    .page-wrapper {
        padding: 60px 16px 40px;
    }

    .title {
        font-size: clamp(2.5rem, 8vw, 3.8rem);
    }

}

/* --- Mobile --- */
@media (max-width: 520px) {
    .page-wrapper {
        padding: 40px 16px 32px;
    }

    .title {
        letter-spacing: 4px;
    }


    .connect-card {
        padding: 28px 18px;
    }

    .safety-notice {
        flex-direction: column;
        gap: 8px;
    }

    .shield-icon {
        display: none;
    }

    .holdings-summary {
        gap: var(--space-lg);
    }

    .ambient-orb {
        display: none;
    }

    .hero-frame {
        margin: 0 -16px;
    }

    .piece-number {
        font-size: 2rem;
    }
}
