html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    background-color: #1a1b1c;
    color: #f3f4f6;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sketch-splash {
    height: 100vh;
    width: 100vw;
    background-color: #1a1b1c;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}

.sketch-shell {
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sketch-workspace {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sketch-toolbar {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: #232425;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 10;
}

.sketch-toolbar-left,
.sketch-toolbar-right,
.sketch-draft-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sketch-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    margin-right: 8px;
}

.sketch-brand:hover {
    color: #ffffff;
    opacity: 0.9;
}

.sketch-phase-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(252, 73, 19, 0.18);
    color: #ff7a52;
    border: 1px solid rgba(252, 73, 19, 0.4);
}

.sketch-select {
    background: #1a1b1c;
    color: #f3f4f6;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    min-height: 36px;
    max-width: 220px;
}

.sketch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2e3032;
    color: #f3f4f6;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    min-height: 36px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.sketch-btn:hover:not(:disabled) {
    background: #3b3d40;
    border-color: rgba(255, 255, 255, 0.24);
}

.sketch-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sketch-btn-danger:hover:not(:disabled) {
    background: rgba(220, 53, 69, 0.25);
    border-color: rgba(220, 53, 69, 0.6);
    color: #ff8b94;
}

.sketch-btn-accent {
    background-color: #fc4913;
    border: none;
    color: #ffffff;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
}

.sketch-diagnostics {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 8px;
    background: #1a1b1c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
    font-variant-numeric: tabular-nums;
}

.sketch-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
}

.sketch-status.saved {
    background: rgba(34, 197, 94, 0.16);
    color: #86efac;
}

.sketch-status.saving {
    background: rgba(252, 73, 19, 0.2);
    color: #fdba74;
}

.sketch-status.error {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.sketch-error-banner {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(220, 38, 38, 0.22);
    border-bottom: 1px solid rgba(239, 68, 68, 0.45);
    color: #fecaca;
    font-size: 13px;
}

.sketch-error-dismiss {
    background: transparent;
    border: none;
    color: #fecaca;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.sketch-stage {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #141516;
    overflow: hidden;
    touch-action: none;
}

.sketch-paper-frame {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
}

.sketch-canvas {
    width: 100%;
    height: 100%;
    max-width: 1200px;
    max-height: 900px;
    aspect-ratio: 4 / 3;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    cursor: crosshair;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

@media (pointer: coarse) {
    .sketch-btn,
    .sketch-select {
        min-height: 44px;
    }
}
