
#wrapper { z-index: 99; position: relative; }

/* Override global 9/16 aspect-ratio (both desktop and mobile specificity) */
#wrapper.windowed,
body.windowed-mode #wrapper.windowed {
    aspect-ratio: 1 / 1;
}

/* Keep square on mobile too */
@media (max-width: 800px) {
    body.windowed-mode #wrapper.windowed {
        aspect-ratio: 1 / 1;
    }
}

/* ── UI overlay: card link + resize button ────────────────────────── */
#ui {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

#arcana-link {
    color: rgba(255,255,255,0.75);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-decoration: none;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    padding: 6px 12px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

#arcana-link:hover {
    color: white;
    border-color: rgba(255,255,255,0.7);
}

#arcana-link:empty { display: none; }

#resize-btn {
    background: rgba(0,0,0,0.5);
    border: 1px solid white;
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    outline: none;
    transition: background 0.2s;
}

#resize-btn:hover { background: rgba(0,0,0,0.8); }

/* ── Arcana carousel ──────────────────────────────────────────────── */
#arcana-carousel {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    scrollbar-width: none;
    box-sizing: border-box;
    /* Match the square canvas width (height: 733px, aspect-ratio: 1/1) */
    width: 733px;
    max-width: 100%;
    margin: 0 auto;
}

@media (max-width: 800px) {
    #arcana-carousel {
        width: 100%;
        max-width: 440px;
    }
}

#arcana-carousel::-webkit-scrollbar { display: none; }

.arcana-item {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.55);
    border-radius: 20px;
    padding: 5px 13px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    line-height: 1.2;
}

.arcana-item:hover {
    border-color: rgba(255, 255, 255, 0.6);
    color: rgba(255, 255, 255, 0.9);
}

.arcana-item.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: white;
    color: white;
}

.arcana-roman {
    font-size: 9px;
    letter-spacing: 0.08em;
    opacity: 0.65;
}

.arcana-item.active .arcana-roman { opacity: 1; }

.arcana-name {
    font-size: 11px;
    letter-spacing: 0.03em;
}
