* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: url("../img/mouse.png"), auto;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(1200px 800px at 50% 20%, #ffe4f1 0%, #ffd0e6 40%, #ffc0dd 70%, #ffb3d8 100%);
}

@media (pointer: coarse) {
    * {
        cursor: auto !important;
    }
}

#container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#canvas {
    display: block;
    border: 2px solid rgba(255, 105, 180, 0.45);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(255, 105, 180, 0.25);
    touch-action: none;
}

#overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#overlay button {
    pointer-events: auto;
    min-width: 120px;
    min-height: 44px;
    font-size: 16px;
}

.overlay-prompt {
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px;
}

.overlay-prompt-card {
    pointer-events: none;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    border: 2px solid rgba(255, 105, 180, 0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: rgba(0, 0, 0, 0.78);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.5px;
}

.overlay-modal {
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px;
}

.overlay-modal-card {
    pointer-events: auto;
    width: min(320px, 86%);
    padding: 16px 16px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 2px solid rgba(255, 105, 180, 0.25);
    box-shadow: 0 18px 40px rgba(255, 105, 180, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.overlay-modal-title {
    font-size: 20px;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.82);
    margin-bottom: 8px;
}

.overlay-modal-score {
    font-size: 16px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.72);
    margin-bottom: 10px;
}

.overlay-input {
    width: 100%;
    height: 42px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 2px solid rgba(255, 105, 180, 0.25);
    outline: none;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.95);
    margin-bottom: 12px;
}

.overlay-btn {
    width: 100%;
}

.role-select {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.role-card {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    border: 2px solid rgba(255, 105, 180, 0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.role-img {
    width: 92px;
    height: 92px;
    object-fit: contain;
    image-rendering: auto;
}

.btn {
    background: linear-gradient(180deg, #ff6eb4 0%, #ff4aa6 100%) !important;
    color: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.25) !important;
    box-shadow: 0 10px 18px rgba(255, 74, 166, 0.35);
}

.btn:active {
    transform: translateY(1px);
}

@media (orientation: portrait) {
    .role-select {
        flex-direction: column;
        gap: 14px;
    }
}
