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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #c9b1ff, #f0c6ff);
    color: #333;
    min-height: 100vh;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- Choice Screen --- */
#choice-view {
    text-align: center;
    padding-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#choice-view h1 {
    color: #7b2d8e;
    font-size: 2.5em;
    margin-bottom: 40px;
}

.choice-container {
    display: flex;
    gap: 60px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
}

.choice-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    cursor: pointer;
    width: 220px;
}

.choice-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.choice-emoji {
    font-size: 5em;
    line-height: 1.2;
    text-align: center;
    margin: 20px 0;
}

.choice-btn {
    background: #d946a8;
    color: #fff;
    border: 3px solid #b03090;
    border-radius: 20px;
    padding: 15px 30px;
    font-size: 1.3em;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s;
    align-self: center;
    white-space: nowrap;
}

.choice-btn:hover {
    transform: scale(1.05);
    background: #e055b8;
}

/* --- Paint Layout --- */
#draw-view {
    max-width: 440px;
    margin: 0 auto;
}

.paint-titlebar {
    background: #7b2d8e;
    color: #fff;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 6px 6px 0 0;
    font-size: 0.95em;
}

.paint-title {
    font-weight: bold;
}

.back-btn {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 3px;
    padding: 2px 10px;
    font-family: inherit;
    font-size: 0.85em;
    cursor: pointer;
}

.back-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* --- Toolbar --- */
.paint-toolbar {
    background: #e0d0f0;
    border: 2px solid #9b59b6;
    border-top: none;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.toolbar-section {
    display: flex;
    align-items: center;
    gap: 3px;
}

.toolbar-sep {
    width: 1px;
    height: 24px;
    background: #9b59b6;
    margin: 0 4px;
}

.tool-btn {
    background: #f0e6fa;
    border: 1px solid #b89fd4;
    border-radius: 3px;
    padding: 4px 7px;
    font-size: 1.1em;
    cursor: pointer;
    line-height: 1;
}

.tool-btn.active {
    background: #d946a8;
    border-color: #b03090;
    color: #fff;
}

.tool-btn:hover {
    background: #dcc8f0;
}

.tool-btn.active:hover {
    background: #d946a8;
}

/* --- Sizes --- */
.size-btn {
    background: #f0e6fa;
    border: 1px solid #b89fd4;
    border-radius: 3px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.size-btn.active {
    background: #d946a8;
    border-color: #b03090;
}

.size-dot {
    background: #333;
    display: inline-block;
}

.size-btn.active .size-dot {
    background: #fff;
}

/* --- Color Section --- */
.color-section {
    display: flex;
    align-items: center;
    gap: 6px;
}

#current-color-swatch {
    width: 28px;
    height: 28px;
    border: 2px solid #7b2d8e;
    border-radius: 3px;
    flex-shrink: 0;
}

#color-palette {
    display: grid;
    grid-template-columns: repeat(18, 12px);
    gap: 1px;
}

.palette-swatch {
    width: 12px;
    height: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
}

.palette-swatch:hover {
    border-color: #333;
    outline: 1px solid #333;
    z-index: 1;
}

/* --- Canvas --- */
.paint-canvas-area {
    background: #888;
    border: 2px solid #9b59b6;
    border-top: none;
    padding: 10px;
    display: flex;
    justify-content: center;
    min-height: 300px;
}

.canvas-container {
    position: relative;
    display: inline-block;
}

#draw-canvas {
    background: repeating-conic-gradient(#ddd 0% 25%, #fff 0% 50%) 50% / 20px 20px;
    border: 1px solid #555;
    cursor: none;
    width: 400px;
    height: 400px;
    touch-action: none;
}

#brush-cursor {
    position: absolute;
    pointer-events: none;
    border: 1px solid rgba(0,0,0,0.5);
    transform: translate(-50%, -50%);
    display: none;
    z-index: 10;
}

/* --- Bottom Bar --- */
.paint-bottombar {
    background: #e0d0f0;
    border: 2px solid #9b59b6;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.paint-bottombar label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8em;
    font-weight: bold;
    color: #7b2d8e;
}

.paint-bottombar input,
.paint-bottombar select {
    padding: 3px 6px;
    background: #fff;
    border: 1px solid #b89fd4;
    border-radius: 3px;
    color: #333;
    font-family: inherit;
    font-size: 0.85em;
    flex: 1;
}

.paint-bottombar input { width: auto; }

.paint-bottombar input:focus,
.paint-bottombar select:focus {
    outline: none;
    border-color: #7b2d8e;
}

.submit-btn {
    background: #d946a8;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 18px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9em;
    font-weight: bold;
    width: 100%;
}

.submit-btn:hover {
    background: #e055b8;
}

/* --- Pending View --- */
.pending-message {
    text-align: center;
    padding-top: 100px;
}

.pending-message h2 {
    color: #7b2d8e;
    font-size: 2em;
    margin-bottom: 15px;
}

.pending-message p {
    color: #555;
    font-size: 1.2em;
}

.pending-sub {
    margin-top: 10px;
    font-size: 0.9em !important;
    color: #888 !important;
}

/* --- Responsive / Mobile --- */
@media (max-width: 768px) {
    #app {
        padding: 10px;
    }

    #choice-view h1 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    .choice-container {
        gap: 30px;
    }

    .choice-icon {
        width: 140px;
        height: 140px;
    }

    .choice-icon svg {
        width: 80px;
        height: 112px;
    }

    .prop-emoji {
        font-size: 1.8em;
    }

    .choice-btn {
        font-size: 1.1em;
        padding: 12px 24px;
    }

    #draw-canvas {
        width: calc(100vw - 50px);
        height: calc(100vw - 50px);
        max-width: 400px;
        max-height: 400px;
    }

    #color-palette {
        grid-template-columns: repeat(18, 10px);
    }

    .palette-swatch {
        width: 10px;
        height: 10px;
    }

    .paint-bottombar {
        gap: 6px;
    }

    .paint-bottombar input { width: auto; }

    .pending-message {
        padding-top: 60px;
    }
}
