:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --border: #e2e8f0;
    --accent: #2563eb;
    --danger: #dc2626;
    --text: #0f172a;
    --text-muted: #64748b;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow: hidden; 
    user-select: none;
    font-size: 13px;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

header h1 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.header-sync-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.status {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.canvas-container {
    flex: 1;
    background: #e2e8f0;
    position: relative;
    overflow: hidden;
}

#plan-canvas {
    max-width: 100%;
    max-height: 100%;
    touch-action: none;
}

.instruction-overlay {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.9);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    border: 1px solid var(--border);
}

.controls {
    padding: 12px;
    background: var(--panel);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.session-input {
    width: 100%;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    outline: none;
}

.record-btn {
    background: var(--danger);
    border: none;
    border-radius: 6px;
    padding: 10px;
    color: white;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    touch-action: none; 
}

.record-btn.disabled {
    background: #cbd5e1;
    color: #64748b;
}

.record-btn.recording {
    background: #ef4444;
    animation: flash 1s infinite;
}

@keyframes flash {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.action-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.mini-fab {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: white;
    border: 1px solid var(--border);
    padding: 8px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
