/* Base Reset */
* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: #0b0d12;
    color: #0b0d12;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    overflow: hidden;
}


#app {
    position: fixed;
    inset: 0;
}

#ui-root {
    position: fixed;
    inset: 0;
    pointer-events: none;
}


/* Fade overlay */
#fade-overlay {
    position: fixed;
    inset: 0;
    background: #0b0d12;
    opacity: 0;
    transition: opacity 600ms ease;
    pointer-events: none;
    z-index: 30;
}

#fade-overlay.show {
    opacity: 1;
}

#fade-overlay.hidden {
    display: none;
}


/* Splash UI (full image) */
.splash {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: auto;
    z-index: 10;
    height: 100%;
    width: 100%;
}

.splash-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
}


/* Character Select UI */
.select {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 12;
    pointer-events: auto;
}

.select.white {
    background: #ffffff;
}

.select .panel {
    width: min(960px, 92vw);
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 20px;
    color: #0b0d12;
}

.select h2 {
    margin: 0 0 12px;
    font-size: clamp(22px, 4vw, 36px);
}

.select .grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-btn {
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    text-align: center;
    padding: 0;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    outline: none;
}

.card-btn:focus-visible {
    outline: 2px solid #6ab0ff;
}

.avatar {
    aspect-ratio: 1 / 1;
    width: 100%;
    display: grid;
    place-items: center;
    background: #ffffff;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
}

.avatar span {
    font-size: 18px;
    opacity: 0.9;
    margin: 10px 12px;
    display: block;
}


.choose-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.btn {
    pointer-events: auto;
    cursor: pointer;
    border: 0;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
}

.btn.primary {
    background: #0b0d12;
    color: #ffffff;
}

.btn.ghost {
    background: transparent;
    color: #0b0d12;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}