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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    min-height: 100vh;
    padding: 1.5rem;
    color: #2d3748;
}

nav {
    margin-bottom: 1.5rem;
}

nav a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
}

nav a:hover {
    text-decoration: underline;
}

main {
    max-width: 640px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2rem;
    font-weight: 300;
    color: #4a5568;
    margin-bottom: 0.3rem;
}

.subtitle {
    color: #718096;
    font-size: 1rem;
}

/* Warning */
.warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.warning code {
    background: rgba(0,0,0,0.08);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0;
}

.tab {
    background: none;
    border: none;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    color: #718096;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    border-radius: 4px 4px 0 0;
}

.tab:hover {
    color: #667eea;
}

.tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 500;
}

/* Tab panels */
.tab-panel.hidden {
    display: none;
}

/* Card */
.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Voice row */
.voice-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.voice-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    flex-shrink: 0;
}

.voice-btn:hover {
    background: #5a67d8;
}

.voice-btn.listening {
    background: #e53e3e;
    animation: pulse 1.2s infinite;
}

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

.voice-hint {
    color: #a0aec0;
    font-size: 0.85rem;
}

/* Textarea */
textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s;
    color: #2d3748;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* Tags */
.tags-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tags-row label {
    font-size: 0.85rem;
    color: #718096;
    white-space: nowrap;
}

.tags-row input {
    flex: 1;
    min-width: 160px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    font-family: inherit;
}

.tags-row input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.tag-hint {
    color: #a0aec0;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Time grid */
.time-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 480px) {
    .time-grid {
        grid-template-columns: 1fr 1fr;
    }
    .time-grid .field:first-child {
        grid-column: 1 / -1;
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.field label {
    font-size: 0.8rem;
    color: #718096;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.field input {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: #2d3748;
}

.field input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* Submit button */
.submit-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
    align-self: flex-start;
}

.submit-btn:hover {
    background: #5a67d8;
}

.submit-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

/* Status messages */
.status {
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.status.success {
    background: #c6f6d5;
    color: #276749;
}

.status.error {
    background: #fed7d7;
    color: #9b2c2c;
}

.hidden {
    display: none !important;
}
