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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #1a1a1a;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 640px;
    padding: 1.5rem;
}

/* PIN screen */
.pin-screen {
    text-align: center;
}

.pin-screen h1 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.pin-screen input {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 0 auto 1rem;
    padding: 0.75rem;
    font-size: 1.5rem;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    letter-spacing: 0.3em;
}

.pin-screen input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.pin-screen button {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.error {
    color: #e74c3c;
    margin-bottom: 1rem;
}

/* Drawing screen */
.drawing-screen h1 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.location {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.canvas-wrapper {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    touch-action: none;
    margin-bottom: 1rem;
}

canvas {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    cursor: crosshair;
}

.tools {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.brush-sizes,
.colours,
.actions {
    display: flex;
    gap: 0.375rem;
}

.size-btn {
    width: 2rem;
    height: 2rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
}

.size-btn.active {
    border-color: #1a1a1a;
    background: #f0f0f0;
}

.colour-btn {
    width: 2rem;
    height: 2rem;
    border: 2px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
}

.colour-btn.active {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1a1a1a;
}

.actions button {
    padding: 0.375rem 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.8125rem;
}

#drawing-form input[type="text"] {
    display: block;
    width: 100%;
    padding: 0.625rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

#drawing-form input[type="text"]:focus {
    outline: none;
    border-color: #1a1a1a;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.submit-btn:active {
    background: #333;
}

/* Success screen */
.success {
    text-align: center;
}

.success h1 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.success a {
    color: #1a1a1a;
    font-weight: 600;
}
