:root {
    --gold: #C9A84C;
    --gold-light: #E8C97A;
    --gold-pale: #F5E6BC;
    --gold-dim: #7A6128;
    --obsidian: #080808;
    --deep: #0E0C0A;
    --surface: #131109;
    --surface2: #1A1710;
    --border: rgba(201, 168, 76, 0.22);
    --border-dim: rgba(201, 168, 76, 0.09);
    --text-bright: #F2EAD3;
    --text-mid: #AFA08A;
    --text-dim: #5C5244;
    --red: #8B1A1A;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background: var(--obsidian);
    color: var(--text-bright);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 17px;
    line-height: 1.7;
    cursor: default;
}

/* ── NOISE TEXTURE ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    opacity: .5;
}

/* ── SCREEN SYSTEM ── */
#app {
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    /* transition handled by JS adding classes */
    opacity: 0;
    pointer-events: none;
    transition: opacity .5s ease, transform .5s cubic-bezier(.4, 0, .2, 1);
    transform: translateY(20px);
}

.screen.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.screen.exit-up {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

/* ── SCREEN BACKGROUNDS ── */
.screen-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity .8s ease;
}

.screen-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
    width: 3px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gold-dim);
    border-radius: 2px;
}

/* ── TYPOGRAPHY ── */
.t-hero {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(36px, 7vw, 80px);
    font-weight: 900;
    color: var(--gold);
    letter-spacing: .08em;
    line-height: 1.0;
    text-shadow: 0 0 60px rgba(201, 168, 76, .4), 0 0 120px rgba(201, 168, 76, .2);
}

.t-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(22px, 4vw, 40px);
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: .06em;
}

.t-label {
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: .35em;
    text-transform: uppercase;
    color: var(--gold-dim);
}

.t-body {
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    font-weight: 300;
    color: var(--text-mid);
    line-height: 1.8;
}

/* ── BACK BUTTON ── */
.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 50;
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: .2em;
    color: var(--gold-light);
    background: rgba(0, 0, 0, .72);
    border: 1px solid var(--gold-dim);
    padding: 9px 17px;
    cursor: pointer;
    transition:
        color .3s,
        border-color .3s,
        background .3s,
        box-shadow .3s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 0 12px rgba(201, 168, 76, .08);
}

.back-btn:hover {
    color: var(--gold-pale);
    border-color: var(--gold);
    background: rgba(0, 0, 0, .86);
    box-shadow: 0 0 18px rgba(201, 168, 76, .18);
}

/* ── GOLD DIVIDER ── */
.gold-rule {
    width: 80px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    margin: 16px auto;
}

.gold-rule-full {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, var(--gold-dim) 30%, var(--gold) 50%, var(--gold-dim) 70%, transparent 100%);
}

/* ── EYEBROW ── */
.eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 20px;
}

.eyebrow::before,
.eyebrow::after {
    content: '';
    display: block;
    width: 32px;
    height: 1px;
    background: var(--gold-dim);
}

/* ── BUTTONS ── */
.btn-primary {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--obsidian);
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    padding: 14px 40px;
    border: none;
    cursor: pointer;
    clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
    transition: box-shadow .4s, transform .2s;
}

.btn-primary:hover {
    box-shadow: 0 0 40px rgba(201, 168, 76, .5), 0 0 80px rgba(201, 168, 76, .2);
    transform: translateY(-2px);
}

.btn-secondary {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--gold);
    background: transparent;
    border: 1px solid var(--gold-dim);
    padding: 13px 40px;
    cursor: pointer;
    clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
    transition: all .3s;
}

.btn-secondary:hover {
    border-color: var(--gold);
    color: var(--gold-light);
    transform: translateY(-2px);
}

/* ── NAV MENU ITEMS ── */
.nav-item {
    width: 100%;
    max-width: 540px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border: none;
    cursor: pointer;
    transition: box-shadow .35s, transform .2s;
    clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
    position: relative;
    overflow: hidden;
}

.nav-item:nth-child(even) {
    background: transparent;
    border: 1px solid var(--gold-dim);
    clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
}

.nav-item:hover {
    box-shadow: 0 0 42px rgba(201, 168, 76, .55), 0 0 80px rgba(201, 168, 76, .22);
    transform: translateY(-3px) scale(1.025);
}

.nav-item.fade-up:hover {
    transform: scale(1.025) translateY(-3px) !important;
}

.nav-item:nth-child(even):hover {
    border-color: var(--gold);
    box-shadow: 0 0 28px rgba(201, 168, 76, .28), 0 0 55px rgba(201, 168, 76, .12);
}

.nav-item-text {
    flex: 1;
}

.nav-item-label {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--obsidian);
    display: block;
    margin-bottom: 2px;
}

.nav-item:nth-child(even) .nav-item-label {
    color: var(--gold);
}

.nav-item-desc {
    font-family: 'Cormorant Garamond', serif;
    font-size: 13px;
    color: rgba(0, 0, 0, .55);
}

.nav-item:nth-child(even) .nav-item-desc {
    color: var(--text-dim);
}

.nav-item-icon {
    display: none;
}

.nav-item-arrow {
    display: none;
}

/* ── SECTION HEADER ── */
.section-header {
    text-align: center;
    margin-bottom: 0;
}

/* ── SCROLL CONTAINER ── */
.scroll-area {
    width: 100%;
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 40px;
    position: relative;
    z-index: 2;
}

.scroll-area::-webkit-scrollbar {
    width: 3px;
}

/* The menu needs its own scrollable region because the application screens are fixed. */
.menu-scroll-area {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 60px 24px 40px;
    position: relative;
    z-index: 2;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-gutter: stable;
}

.menu-content {
    width: 100%;
    max-width: 540px;
    min-height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.menu-scroll-area::-webkit-scrollbar {
    width: 3px;
}

/* ── LORE PANELS ── */
.lore-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    max-width: 900px;
    margin: 0 auto;
}

.lore-panel {
    padding: 36px 32px;
    border: 1px solid var(--border-dim);
    background: linear-gradient(135deg, rgba(201, 168, 76, .04) 0%, transparent 60%);
    position: relative;
    transition: border-color .4s;
}

.lore-panel:hover {
    border-color: var(--border);
}

.lore-panel-num {
    font-family: 'Cinzel Decorative', serif;
    font-size: 56px;
    font-weight: 900;
    color: rgba(201, 168, 76, .06);
    position: absolute;
    top: 8px;
    right: 16px;
    line-height: 1;
    user-select: none;
    transition: color .4s;
}

.lore-panel:hover .lore-panel-num {
    color: rgba(201, 168, 76, .12);
}

.lore-panel-icon {
    font-size: 24px;
    margin-bottom: 14px;
    display: block;
}

.lore-panel-title {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    letter-spacing: .15em;
    color: var(--gold);
    margin-bottom: 12px;
}

/* ── HOW TO PLAY STEPS ── */
.steps {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.steps-line {
    position: absolute;
    left: 22px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--gold-dim) 15%, var(--gold-dim) 85%, transparent);
}

.step {
    display: flex;
    gap: 32px;
    margin-bottom: 44px;
    padding-left: 64px;
    position: relative;
    opacity: 0;
    transform: translateX(-16px);
    transition: opacity .5s, transform .5s;
}

.step.vis {
    opacity: 1;
    transform: translateX(0);
}

.step-num {
    position: absolute;
    left: 0;
    top: 0;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 1px solid var(--gold-dim);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel Decorative', serif;
    font-size: 15px;
    color: var(--gold);
}

.step-title {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    letter-spacing: .1em;
    color: var(--gold-light);
    margin-bottom: 8px;
}

/* ── TU'UL LOGO ANIMATION ── */
#tuul-logo-animation {
    display: block;
    height: 190px;
    width: auto;
    max-width: min(90vw, 600px);
    margin: 0 auto;
    object-fit: contain;
    background: transparent;
}

/* ── CARD EXPLORER ── */
.race-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.race-tab {
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: .18em;
    text-transform: uppercase;
    padding: 7px 14px;
    border: 1px solid var(--gold-dim);
    background: transparent;
    color: var(--text-mid);
    cursor: pointer;
    transition: all .25s;
}

.race-tab:hover {
    border-color: var(--gold-dim);
    color: var(--gold);
}

.race-tab.active {
    border-color: var(--gold);
    color: var(--gold-pale);
    box-shadow:
        0 0 12px rgba(201, 168, 76, .20),
        inset 0 0 10px rgba(201, 168, 76, .05);
    background: rgba(201, 168, 76, .08);
}

.type-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 16px;
}

.filter-btn {
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: .18em;
    text-transform: uppercase;
    padding: 6px 14px;
    border: 1px solid var(--gold-dim);
    background: transparent;
    color: var(--text-mid);
    cursor: pointer;
    transition: all .25s;
}

.filter-btn.active {
    border-color: var(--gold);
    color: var(--gold-pale);
    background: rgba(201, 168, 76, .08);
    box-shadow:
        0 0 12px rgba(201, 168, 76, .20),
        inset 0 0 10px rgba(201, 168, 76, .05);
}

.filter-btn:hover {
    border-color: var(--gold);
    color: var(--gold-light);
}

.search-wrap {
    position: relative;
    max-width: 400px;
    margin: 0 auto 20px;
}

.search-wrap input {
    width: 100%;
    background: rgba(201, 168, 76, .06);
    border: 1px solid var(--gold-dim);
    color: var(--text-bright);
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    padding: 10px 16px 10px 40px;
    outline: none;
    transition: all .3s;
    box-shadow: 0 0 12px rgba(201, 168, 76, .06);
}

.search-wrap input:focus {
    border-color: var(--gold-dim);
}

.search-wrap input::placeholder {
    color: var(--text-mid);
    opacity: .9;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    width: 12px;
    height: 12px;
    border: 1.5px solid var(--gold-dim);
    border-radius: 50%;
    transform: translateY(-55%);
    pointer-events: none;
    box-sizing: border-box;
    box-shadow: 0 0 5px rgba(201,168,76,.15);
}

.search-icon::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 1.5px;
    background: var(--gold-dim);
    right: -5px;
    bottom: -2px;
    transform: rotate(45deg);
    transform-origin: left center;
}

.cards-count {
    text-align: center;
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: .2em;
    color: var(--text-mid);
    margin-bottom: 16px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
}

.card-item {
    position: relative;
    cursor: pointer;
}

.card-item-inner {
    border: 1px solid var(--border-dim);
    background: var(--surface2);
    transition: border-color .3s;
    position: relative;
    overflow: visible;
}

.card-item:hover .card-item-inner {
    border-color: var(--gold-dim);
}

.card-placeholder {
    aspect-ratio: 63/88;
    background: linear-gradient(160deg, var(--surface2) 0%, var(--surface) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 12px;
    border-bottom: 2px solid var(--rc-border, rgba(201, 168, 76, .12));
    position: relative;
}

.card-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, var(--rc-glow, rgba(201, 168, 76, .05)) 0%, transparent 70%);
}

.card-ph-num {
    font-family: 'Cinzel', serif;
    font-size: 8px;
    color: var(--text-dim);
    letter-spacing: .15em;
}

.card-ph-name {
    font-family: 'Cinzel', serif;
    font-size: 9px;
    color: var(--rc-text, var(--gold-dim));
    letter-spacing: .06em;
    text-align: center;
    line-height: 1.4;
}

.card-ph-type {
    font-family: 'Cinzel', serif;
    font-size: 7px;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.card-ph-stats {
    display: flex;
    gap: 6px;
    font-family: 'Cinzel', serif;
    font-size: 8px;
    color: var(--gold-dim);
}

.card-item img {
    width: 100%;
    display: block;
    aspect-ratio: 63/88;
    object-fit: cover;
}

.card-item:not(.card-commander):hover img {
    transform: scale(1.03);
    transition: transform .4s;
}

.card-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
}

.card-item:hover .card-shine {
    opacity: 1;
}

.card-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-family: 'Cinzel', serif;
    font-size: 7px;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 2px 6px;
    background: rgba(201, 168, 76, .12);
    border: 1px solid var(--gold-dim);
    color: var(--gold-dim);
    pointer-events: none;
}

.card-badge.holo {
    background: linear-gradient(135deg, rgba(124, 92, 255, .2), rgba(201, 168, 76, .2));
    border-color: rgba(124, 92, 255, .5);
    color: #b8a0ff;
}

.card-label {
    padding: 8px 10px;
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: .1em;
    color: var(--text-mid);
    border-top: 1px solid var(--border-dim);
    background: rgba(0, 0, 0, .4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cards-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 20px;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: .2em;
    color: var(--text-dim);
}

/* ── BUY SECTION ── */
.buy-frame {
    max-width: 560px;
    margin: 0 auto;
    border: 1px solid var(--border);
    padding: 56px 48px;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, rgba(201, 168, 76, .04) 0%, transparent 70%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.buy-frame::before,
.buy-frame::after {
    content: '✦';
    position: absolute;
    color: var(--gold-dim);
    font-size: 14px;
}

.buy-frame::before {
    top: 14px;
    left: 18px;
}

.buy-frame::after {
    bottom: 14px;
    right: 18px;
}

.buy-price {
    font-family: 'Cinzel Decorative', serif;
    font-size: 52px;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 40px rgba(201, 168, 76, .3);
    margin: 24px 0 6px;
}

.buy-features {
    list-style: none;
    margin: 0 0 36px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.buy-features li {
    font-size: 16px;
    font-weight: 300;
    color: var(--text-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.buy-features li::before {
    content: '✦';
    color: var(--gold-dim);
    font-size: 9px;
}

/* ── COMIC READER ── */
.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.comic-thumb {
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border-dim);
    background: var(--surface2);
    overflow: hidden;
    transition: border-color .3s, transform .3s;
    aspect-ratio: 3/4;
}

.comic-thumb:hover {
    border-color: var(--gold-dim);
    transform: translateY(-4px);
}

.comic-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comic-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, var(--surface2), var(--surface));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.comic-chapter-num {
    font-family: 'Cinzel Decorative', serif;
    font-size: 28px;
    color: var(--gold-dim);
}

.comic-chapter-label {
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: .2em;
    color: var(--text-dim);
}

.comic-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .7) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
}

.comic-title {
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: .1em;
    color: var(--gold);
}

/* ── CONTADOR DE PÁGINA ── */
.comic-page-counter {
    display: none; 
    margin-top: 16px;
    text-align: center;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: .15em;
    color: var(--gold-light);
    padding: 6px 16px;
    background: rgba(8, 8, 8, 0.65);
    border: 1px solid var(--border);
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.comic-page-counter.is-visible {
    display: inline-block;
    align-self: center;
}

@media (max-width: 768px) {
    .comic-page-counter {
        margin-top: 8px;
        font-size: 11px;
        padding: 5px 12px;
    }
    
}

/* ── COMIC READER VIEW ── */

.comic-reader-view {
    display: flex;
    flex-direction: column;
    /* Usamos min-height para dar flexibilidad y svh para móviles */
    min-height: calc(100svh - 80px);
    width: 100%;
    position: relative;
    padding: 10px;
    box-sizing: border-box;
}

.comic-book-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;

    /* Ancho adaptativo según la pantalla */
    width: 100%;
    max-width: 100%;
    
    height: auto;
    max-height: 85vh; 
    margin: 0 auto;
}

.comic-book {
    background: transparent;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}


.comic-book img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Evita que la imagen se deforme */
}

.comic-reader-error {
    color: var(--text-dim);
    text-align: center;
    padding: 20px;
    font-family: 'Cinzel', serif;
    font-size: clamp(12px, 2vw, 14px); /* Texto escalable */
}

/* ── REGLAS RESPONSIVAS (MEDIA QUERIES) ── */

/* Pantallas grandes (Escritorio) */
@media (min-width: 1024px) {
    .comic-book-wrapper {
        max-width: 1100px;   
        max-height: 820px;
    }
}

/* Dispositivos móviles (Celulares) */
@media (max-width: 768px) {
    .comic-reader-view {
        min-height: calc(100svh - 60px);
        padding: 5px;
    }

    .comic-book-wrapper {
        max-height: 90vh; 
    }
}


/* ── TUTORIAL ITEMS ── */
.tutorial-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid var(--border-dim);
    background: rgba(0, 0, 0, .4);
    cursor: pointer;
    transition: border-color .3s, background .3s;
    max-width: 700px;
    margin: 0 auto 10px;
    backdrop-filter: blur(4px);
}

.tutorial-item:hover {
    border-color: var(--gold-dim);
    background: rgba(201, 168, 76, .04);
}

.tutorial-thumb {
    width: 80px;
    height: 52px;
    flex-shrink: 0;
    background: var(--surface2);
    border: 1px solid var(--border-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    position: relative;
    overflow: hidden;
}

.tutorial-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .4);
    font-size: 20px;
}

.tutorial-info {
    flex: 1;
}

.tutorial-title {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: .08em;
    color: var(--text-bright);
    margin-bottom: 4px;
}

.tutorial-desc {
    font-size: 13px;
    color: var(--text-dim);
}

.tutorial-duration {
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: .15em;
    color: var(--gold-dim);
}

/* ── LIGHTBOX ── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, .92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.lightbox.open {
    display: flex;
}

.lightbox-inner {
    max-width: min(520px, 90vw);
    position: relative;
    animation: lbIn .35s cubic-bezier(.16, 1, .3, 1);
}

@keyframes lbIn {
    from {
        opacity: 0;
        transform: scale(.85) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.lightbox-inner img {
    width: 100%;
    display: block;
    border: 1px solid var(--border);
    box-shadow: 0 0 80px rgba(201, 168, 76, .25), 0 0 160px rgba(201, 168, 76, .1);
}

#holoCanvas {
    width: 100%;
    border: 1px solid rgba(201, 168, 76, .3);
    box-shadow: 0 0 80px rgba(201, 168, 76, .25), 0 0 160px rgba(201, 168, 76, .1);
    display: none;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

#holoCanvas:active {
    cursor: grabbing;
}

.lightbox-meta {
    padding: 12px 0 0;
    background: transparent;
    border: none;
    text-align: center;
}

#lbFlipBtn {
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: .2em;
    text-transform: uppercase;

    padding: 9px 18px;

    border: 1px solid var(--gold-dim);
    background: rgba(0,0,0,.35);

    color: var(--gold);

    cursor: pointer;

    transition: all .3s ease;
}

#lbFlipBtn:hover {
    background: rgba(201,168,76,.08);
    border-color: var(--gold);
    color: #fff;
}

.lightbox-name {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: .15em;
    color: var(--gold);
    margin-bottom: 8px;
}

.lightbox-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.lb-tag {
    font-family: 'Cinzel', serif;
    font-size: 8px;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 3px 8px;
    border: 1px solid var(--border-dim);
    color: var(--text-dim);
}

.holo-hint {
    text-align: center;
    padding: 7px;
    font-family: 'Cinzel', serif;
    font-size: 8px;
    letter-spacing: .2em;
    color: var(--text);
    opacity: .65;
    border-top: 1px solid var(--border-dim);
    background: rgba(0, 0, 0, .4);
    display: none;
}

.lightbox-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 32px;
    height: 32px;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--gold);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .3s;
    z-index: 6;
}

.lightbox-close:hover {
    background: var(--red);
    color: #fff;
}

/* ── LIGHTBOX NAV (prev/next) ──  */
.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 64px;
    background: rgba(0, 0, 0, .55);
    border: 1px solid var(--border-dim);
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .25s;
    z-index: 5;
    user-select: none;
}

.lb-nav:hover {
    border-color: var(--gold);
    background: rgba(201, 168, 76, .18);
    color: var(--gold-light);
}

.lb-nav-prev {
    left: -52px;
}

.lb-nav-next {
    right: -52px;
}

@media(max-width:600px) {
    .lb-nav-prev {
        left: 6px;
    }

    .lb-nav-next {
        right: 6px;
    }

    .lb-nav {
        width: 34px;
        height: 52px;
        font-size: 22px;
    }
}

/* ── ANIMATIONS ── */
@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {

    0%,
    100% {
        opacity: .3;
    }

    50% {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-down {
    animation: fadeDown .7s ease-out both;
}

.fade-up {
    animation: fadeUp .6s ease-out both;
}

.float {
    animation: float 5s ease-in-out infinite;
}

.delay-1 {
    animation-delay: .1s;
}

.delay-2 {
    animation-delay: .2s;
}

.delay-3 {
    animation-delay: .3s;
}

.delay-4 {
    animation-delay: .4s;
}

.delay-5 {
    animation-delay: .5s;
}

.delay-6 {
    animation-delay: .6s;
}

/* ── AUDIO CONTROL ── */

#audio-control {
    position: fixed;
    bottom: 26px;
    right: 24px;
    z-index: 100;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Panel volumen */
#volume-panel {
    width: 46px;
    height: 145px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;

    background: rgba(0, 0, 0, .72);
    border: 1px solid var(--border-dim);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);

    transition:
        opacity .25s ease,
        transform .25s ease,
        visibility .25s;
}

/* Mostrar volumen al pasar el mouse */
#audio-control:hover #volume-panel,
#audio-control:focus-within #volume-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Slider vertical */
#volume-slider {
    width: 90px;
    height: 18px;

    transform: rotate(-90deg);

    cursor: pointer;
    accent-color: var(--gold);
}

/* Porcentaje */
#volume-value {
    font-family: 'Cinzel', serif;
    font-size: 8px;
    letter-spacing: .08em;
    color: var(--gold-dim);
}

/* Botón circular actual */
#audio-btn {
    width: 52px;
    height: 52px;

    background: rgba(8, 8, 8, .88);
    border: 1px solid rgba(201, 168, 76, .65);
    color: var(--gold);

    font-size: 20px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    box-shadow:
        0 0 10px rgba(201, 168, 76, .18),
        inset 0 0 10px rgba(201, 168, 76, .05);

    transition:
        transform .2s ease,
        border-color .3s,
        box-shadow .3s,
        background .3s;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#audio-btn:hover {
    transform: scale(1.08);
    background: rgba(15, 13, 8, .95);
    border-color: var(--gold-light);

    box-shadow:
        0 0 18px rgba(201, 168, 76, .4),
        0 0 35px rgba(201, 168, 76, .15);
}

#audio-btn.playing {
    border-color: var(--gold-dim);
    color: var(--gold);
}

/* ── RACE/TYPE ICONS ── */
.race-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.type-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

/* ── EN EL HORIZONTE ── */

/* Hero */
.horizonte-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 420px;
    max-width: 1200px;
    margin: 0 auto 0;
    padding: 40px 40px 60px;
    gap: 40px;
    align-items: center;
}

.horizonte-hero-content {
    position: relative;
    z-index: 2;
}

.horizonte-hero-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(32px, 5vw, 64px);
    font-weight: 900;
    color: var(--gold-light);
    line-height: 1.05;
    letter-spacing: .04em;
    margin-bottom: 20px;
    text-shadow: 0 0 40px rgba(201, 168, 76, .3);
}

.horizonte-hero-desc {
    font-size: 17px;
    font-weight: 300;
    font-style: italic;
    color: var(--text-mid);
    line-height: 1.8;
    max-width: 460px;
    margin-bottom: 28px;
}

.horizonte-hero-fecha {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.horizonte-fecha-val {
    font-family: 'Cinzel Decorative', serif;
    font-size: 28px;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(201, 168, 76, .4);
}

.horizonte-hero-img {
    display: flex;
    align-items: center;
    justify-content: center;
}

.horizonte-hero-img img {
    width: 100%;
    max-width: 480px;
    height: auto;
    filter: drop-shadow(0 0 40px rgba(201, 168, 76, .2));
}

/* Cards carousel section */
.horizonte-cards-section {
    padding: 60px 0 70px;
    width: 100%;
}

.hcr-outer {
    position: relative;
    width: 100%;
}

/* Fade edges */
.hcr-outer::before,
.hcr-outer::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.hcr-outer::before {
    left: 0;
    background: linear-gradient(to right, var(--obsidian), transparent);
}

.hcr-outer::after {
    right: 0;
    background: linear-gradient(to left, var(--obsidian), transparent);
}

/* Scroll track */
.hcr-track {
    display: flex;
    gap: 0px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-behavior: smooth;
    padding: 24px 40px 40px;
    scrollbar-width: none;
    align-items: flex-start;
}

.hcr-track::-webkit-scrollbar {
    display: none;
}

/* Each card slot */
.hcr-slot {
    flex-shrink: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 14px;
}

.hcr-slot canvas {
    display: block;
    filter: drop-shadow(0 12px 40px rgba(0, 0, 0, .85));
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.hcr-slot canvas:active {
    cursor: grabbing;
}

.hcr-slot-name {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: .12em;
    margin-top: 14px;
    text-align: center;
    transition: color .3s;
}

/* Arrow buttons */
.hcr-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, .7);
    border: 1px solid var(--border-dim);
    color: var(--gold-dim);
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all .2s;
    backdrop-filter: blur(6px);
    user-select: none;
}

.hcr-arrow:hover {
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 16px rgba(201, 168, 76, .3);
}

.hcr-prev {
    left: 8px;
}

.hcr-next {
    right: 8px;
}

.hcr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 380px;
}

/* Products rows */
.horizonte-productos-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px 80px;
}

.hprod-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 48px 0;
}

.hprod-row--reverse {
    direction: rtl;
}

.hprod-row--reverse>* {
    direction: ltr;
}

.hprod-img-wrap {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--surface2);
}

.hprod-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.hprod-row:hover .hprod-img-wrap img {
    transform: scale(1.03);
}

.hprod-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(160deg, var(--surface2), var(--surface));
}

.hprod-tipo {
    position: absolute;
    top: 12px;
    left: 12px;
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: .2em;
    text-transform: uppercase;
    padding: 4px 12px;
    background: rgba(0, 0, 0, .75);
    border: 1px solid var(--gold-dim);
    color: var(--gold);
    backdrop-filter: blur(4px);
}

.hprod-info {
    padding: 8px 0;
}

.hprod-nombre {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    letter-spacing: .08em;
    color: var(--gold-light);
    margin-bottom: 16px;
    line-height: 1.3;
}

.hprod-desc {
    font-size: 16px;
    font-weight: 300;
    color: var(--text-mid);
    line-height: 1.8;
    margin-bottom: 24px;
}

.hprod-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hprod-fecha {
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: .2em;
    color: var(--gold-dim);
}

.hprod-btn {
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: .2em;
    text-transform: uppercase;
    padding: 10px 24px;
    background: transparent;
    border: 1px solid var(--gold-dim);
    color: var(--gold);
    cursor: pointer;
    transition: all .3s;
    clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}

.hprod-btn:hover {
    background: rgba(201, 168, 76, .1);
    border-color: var(--gold);
    box-shadow: 0 0 16px rgba(201, 168, 76, .2);
}

/* Responsive */
@media(max-width:768px) {
    .horizonte-hero {
        grid-template-columns: 1fr;
        padding: 32px 20px 40px;
    }

    .horizonte-hero-img {
        display: none;
    }

    .hprod-row {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hprod-row--reverse {
        direction: ltr;
    }

    .hcr-wrap {
        gap: 12px;
    }

    .hcr-arrow {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }
}

.zona-section {
    border: 1px solid var(--border-dim);
}

.zona-header {
    width: 100%;
    padding: 18px 22px;
    background: rgba(0, 0, 0, .5);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(6px);
    transition: background .3s;
}

.zona-header:hover {
    background: color-mix(in srgb, var(--zc, var(--gold)) 6%, rgba(0, 0, 0, .6));
}

.zona-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.zona-nombre {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    letter-spacing: .15em;
    color: var(--text-bright);
}

.zona-count {
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: .15em;
    color: var(--text-dim);
    margin-left: 4px;
}

.zona-arrow {
    font-size: 12px;
    color: var(--text-dim);
    transition: transform .3s, color .3s;
}

.zona-body {
    background: rgba(0, 0, 0, .3);
}

.ciudad-block {
    padding: 20px 22px;
    border-top: 1px solid var(--border-dim);
}

.ciudad-nombre {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--text-mid);
    margin-bottom: 14px;
}

.tiendas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.tienda-card {
    padding: 16px;
    border: 1px solid var(--border-dim);
    background: rgba(0, 0, 0, .3);
    transition: border-color .3s;
}

.tienda-card:hover {
    border-color: var(--gold-dim);
}

.tienda-nombre {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: .08em;
    color: var(--gold);
    margin-bottom: 10px;
}

.tienda-dato {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 4px;
    line-height: 1.5;
}

.tienda-btn {
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: .15em;
    text-transform: uppercase;
    padding: 5px 12px;
    border: 1px solid var(--border-dim);
    color: var(--text-mid);
    text-decoration: none;
    transition: all .25s;
    display: inline-block;
}

.tienda-btn:hover {
    border-color: var(--gold-dim);
    color: var(--gold);
}

/* ── RESPONSIVE horizonte ── */
@media(max-width:600px) {
    .horizonte-grid {
        grid-template-columns: 1fr;
    }

    .tiendas-grid {
        grid-template-columns: 1fr;
    }
}

.card-item {
    perspective: 700px;
}

/* The flip wrapper — sits inside card-item-inner, holds both faces */
.card-flip-inner {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    transition: transform .55s cubic-bezier(.4, 0, .2, 1);
}

.card-flip-inner.flipped {
    transform: rotateY(180deg);
}

/* Front face — normal flow, gives height to the container */
.card-face {
    width: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
}

/* Back face — absolutely on top of front, rotated 180° */
.card-face-back {
    position: absolute;
    inset: 0;
    transform: rotateY(180deg);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
    background: var(--surface2);
}

.card-face img,
.card-face-back img {
    width: 100%;
    display: block;
    aspect-ratio: 63/88;
    object-fit: cover;
}

.cmd-flip-btn {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    background: rgba(0, 0, 0, .65);
    border: 1px solid var(--gold-dim);
    color: var(--text-dim);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: border-color .25s, color .25s;
    z-index: 3;
}

.cmd-flip-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 10px rgba(201, 168, 76, .3);
}

/* ── RESPONSIVE ── */
@media(max-width:600px) {
    .lore-grid {
        grid-template-columns: 1fr;
    }

    .steps-line {
        display: none;
    }

    .step {
        padding-left: 56px;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }

    .buy-frame {
        padding: 36px 24px;
    }

    .comic-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}