/* VM Notes — Matrix / Retro Terminal themed PWA */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Rajdhani:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --bg: #0D0208;
    --surface: #0F1A0F;
    --surface-hover: #162016;
    --surface-border: #1A3A1A;
    --green: #00FF41;
    --green-glow: rgba(0, 255, 65, 0.25);
    --green-soft: rgba(0, 255, 65, 0.08);
    --green-mid: #00CC33;
    --green-dim: #006B1D;
    --amber: #FFB000;
    --text: #C8E6C8;
    --text-muted: #5A8A5A;
    --text-dim: #2D5A2D;
    --coral: #FF4444;
    --success: #00FF41;
    --radius: 4px;
    --radius-sm: 2px;

    /* Category colors */
    --cat-work: #00FF41;
    --cat-technical: #00BFFF;
    --cat-business: #FFB000;
    --cat-meeting: #8B5CF6;
    --cat-ideas: #FF69B4;
    --cat-research: #06B6D4;
    --cat-project: #F59E0B;
    --cat-personal: #EC4899;
    --cat-general: #5A8A5A;
    --cat-error: #FF4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
}

/* ── Matrix Rain Canvas ──────────────────────────────────── */

#matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ── Login Screen ────────────────────────────────────────── */

.login-screen {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    background: transparent;
}

.login-screen.hidden {
    display: none;
}

.login-card {
    width: 100%;
    max-width: 340px;
    text-align: center;
    position: relative;
    z-index: 2;
    background: rgba(13, 2, 8, 0.75);
    padding: 32px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--surface-border);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.login-logo {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: 56px;
    letter-spacing: 8px;
    color: var(--green);
    text-shadow: 0 0 20px var(--green-glow), 0 0 40px rgba(0, 255, 65, 0.15);
    margin-bottom: 4px;
}

.login-logo span {
    color: var(--amber);
    font-size: 20px;
    vertical-align: super;
    margin-left: 2px;
    text-shadow: 0 0 10px rgba(255, 176, 0, 0.4);
}

.login-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 32px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-input {
    width: 100%;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--surface-border);
    background: var(--surface);
    color: var(--green);
    font-size: 16px;
    font-family: 'Share Tech Mono', monospace;
    outline: none;
    text-align: center;
    transition: border-color 0.2s;
}

.login-input:focus {
    border-color: var(--green);
    box-shadow: 0 0 8px var(--green-glow);
}

.login-input::placeholder {
    color: var(--text-dim);
}

.login-error {
    margin-top: 12px;
    font-size: 13px;
    color: var(--coral);
    min-height: 20px;
    font-family: 'Share Tech Mono', monospace;
}

/* ── App Shell ────────────────────────────────────────────── */

#app {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 480px;
    margin: 0 auto;
}

/* ── Header ───────────────────────────────────────────────── */

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--surface-border);
}

.logo {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: 28px;
    letter-spacing: 4px;
    color: var(--green);
    text-shadow: 0 0 10px var(--green-glow);
}

.logo span {
    color: var(--amber);
    font-size: 14px;
    vertical-align: super;
    margin-left: 2px;
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.4);
}

.header-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--surface-border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover, .icon-btn.active {
    background: var(--green-soft);
    color: var(--green);
    border-color: var(--green-dim);
}

/* ── Navigation Tabs ──────────────────────────────────────── */

nav {
    display: flex;
    gap: 0;
    padding: 0 20px 12px;
    flex-shrink: 0;
    padding-top: 8px;
}

nav button {
    flex: 1;
    padding: 10px 0;
    border: 1px solid var(--surface-border);
    background: transparent;
    color: var(--text-muted);
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav button:first-child {
    border-radius: var(--radius) 0 0 var(--radius);
}

nav button:last-child {
    border-radius: 0 var(--radius) var(--radius) 0;
}

nav button:not(:first-child) {
    border-left: none;
}

nav button.active {
    background: var(--green-soft);
    color: var(--green);
    border-color: var(--green-dim);
}

nav button:hover:not(.active) {
    color: var(--text);
}

/* ── Screens ──────────────────────────────────────────────── */

.screen {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 100px;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* ── Record Screen ────────────────────────────────────────── */

#screen-record {
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding-bottom: 60px;
}

.record-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    color: var(--text-muted);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.record-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid var(--green);
    background: var(--surface);
    color: var(--green);
    font-size: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    position: relative;
    box-shadow: 0 0 20px var(--green-glow), inset 0 0 20px rgba(0, 255, 65, 0.05);
}

.record-btn::before {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 65, 0.1);
    animation: none;
}

.record-btn.recording {
    background: rgba(0, 255, 65, 0.15);
    color: var(--green);
    border-color: var(--green);
    box-shadow: 0 0 40px var(--green-glow), 0 0 80px var(--green-glow), inset 0 0 30px rgba(0, 255, 65, 0.1);
}

.record-btn.recording::before {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 0; }
}

.record-timer {
    font-family: 'Share Tech Mono', monospace;
    font-size: 48px;
    color: var(--green);
    letter-spacing: 4px;
    opacity: 0;
    transition: opacity 0.3s;
    text-shadow: 0 0 10px var(--green-glow);
}

.record-timer.visible {
    opacity: 1;
}

.record-hint {
    color: var(--text-dim);
    font-size: 13px;
    text-align: center;
    transition: all 0.4s ease;
    max-width: 340px;
    font-family: 'Share Tech Mono', monospace;
}

.record-hint.memory-active {
    color: var(--text);
    font-size: 13px;
    line-height: 1.6;
    padding: 12px 20px;
    border-radius: var(--radius);
    background: var(--surface);
    max-height: 160px;
    overflow-y: auto;
    text-align: left;
    border-left: 2px solid var(--green);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.05);
}

/* ── Processing overlay ───────────────────────────────────── */

.processing-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(13, 2, 8, 0.95);
    z-index: 100;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 24px;
}

.processing-overlay.active {
    display: flex;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 2px solid var(--surface-border);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.processing-text {
    font-family: 'Share Tech Mono', monospace;
    color: var(--text-muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ── Notes List Screen ────────────────────────────────────── */

.filter-bar {
    display: flex;
    gap: 8px;
    padding-bottom: 16px;
    overflow-x: auto;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-chip {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--surface-border);
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-family: 'Share Tech Mono', monospace;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-transform: uppercase;
}

.filter-chip.active {
    border-color: var(--green-dim);
    background: var(--green-soft);
    color: var(--green);
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.note-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--surface-border);
    border-left: 3px solid var(--cat-general);
    animation: slideIn 0.3s ease-out;
}

.note-card:hover {
    background: var(--surface-hover);
    border-color: var(--green-dim);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.note-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.note-category {
    font-size: 10px;
    font-family: 'Share Tech Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background: var(--green-soft);
    color: var(--green);
}

.note-date {
    font-size: 11px;
    color: var(--text-dim);
    font-family: 'Share Tech Mono', monospace;
}

.note-title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
    line-height: 1.3;
    color: var(--text);
}

.note-preview {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-meta {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-dim);
    font-family: 'Share Tech Mono', monospace;
}

/* ── Note Detail Screen ───────────────────────────────────── */

#screen-detail {
    padding-top: 0;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 16px;
    flex-shrink: 0;
}

.back-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    border: 1px solid var(--surface-border);
    background: var(--surface);
    color: var(--green);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 22px;
    flex: 1;
    line-height: 1.2;
}

.detail-actions {
    display: flex;
    gap: 8px;
}

.detail-meta {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--surface-border);
    border-bottom: 1px solid var(--surface-border);
    margin-bottom: 20px;
    flex-shrink: 0;
}

.detail-meta-item {
    font-size: 13px;
    color: var(--text-muted);
    font-family: 'Share Tech Mono', monospace;
}

.detail-meta-item strong {
    color: var(--text);
}

.detail-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    flex-shrink: 0;
}

.detail-content .caps-section {
    margin-bottom: 20px;
}

.detail-content .caps-header {
    color: var(--green);
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--surface-border);
}

.detail-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-content li {
    padding-left: 20px;
    position: relative;
    color: var(--text);
    line-height: 1.6;
}

.detail-content li::before {
    content: '>';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--green);
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
}

.detail-content li.indent {
    padding-left: 36px;
}

.detail-content li.indent::before {
    left: 16px;
    color: var(--text-dim);
}

.detail-content li.checkbox {
    padding-left: 36px;
}

.detail-content li.checkbox::before {
    content: '[ ]';
    left: 0;
    top: 0;
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    border: none;
    color: var(--green);
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
}

.detail-content p {
    margin: 0 0 6px;
    color: var(--text-muted);
    line-height: 1.6;
}

.detail-transcript {
    margin-top: 24px;
    background: var(--surface);
    border-radius: var(--radius);
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--surface-border);
}

.detail-transcript-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.detail-transcript-label {
    font-size: 11px;
    font-family: 'Share Tech Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
}

.detail-transcript-arrow {
    font-size: 12px;
    color: var(--text-dim);
    transition: transform 0.2s;
}

.detail-transcript.open .detail-transcript-arrow {
    transform: rotate(180deg);
}

.detail-transcript-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.detail-transcript.open .detail-transcript-body {
    max-height: 150px;
    overflow-y: auto;
}

.detail-transcript-text {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    font-style: italic;
    padding: 0 16px 12px;
}

/* ── Ask Screen ───────────────────────────────────────────── */

#screen-ask {
    padding-bottom: 80px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 16px;
}

.chat-bubble {
    max-width: 90%;
    padding: 14px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.6;
    animation: slideIn 0.3s ease-out;
}

.chat-bubble.user {
    align-self: flex-end;
    background: rgba(0, 255, 65, 0.1);
    color: var(--green);
    border: 1px solid var(--green-dim);
}

.chat-bubble.assistant {
    align-self: flex-start;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--surface-border);
    white-space: pre-wrap;
}

.chat-input-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 20px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--bg);
    border-top: 1px solid var(--surface-border);
    display: flex;
    gap: 8px;
    max-width: 480px;
    margin: 0 auto;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--surface-border);
    background: var(--surface);
    color: var(--green);
    font-size: 15px;
    font-family: 'Share Tech Mono', monospace;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--green-dim);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.1);
}

.chat-input::placeholder {
    color: var(--text-dim);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    border: 1px solid var(--green-dim);
    background: var(--green-soft);
    color: var(--green);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

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

/* ── Settings Screen ──────────────────────────────────────── */

#screen-settings {
    gap: 16px;
}

.settings-group {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--surface-border);
}

.settings-group h3 {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    margin-bottom: 12px;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-field {
    margin-bottom: 16px;
}

.settings-field:last-child {
    margin-bottom: 0;
}

.settings-field label {
    display: block;
    font-size: 11px;
    font-family: 'Share Tech Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.settings-field input {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--surface-border);
    background: var(--bg);
    color: var(--green);
    font-size: 14px;
    font-family: 'Share Tech Mono', monospace;
    outline: none;
}

.settings-field input:focus {
    border-color: var(--green-dim);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.1);
}

/* ── Collapsible settings group ──────────────────────────── */

.settings-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.settings-group-toggle .toggle-arrow {
    font-size: 12px;
    color: var(--text-dim);
    transition: transform 0.2s;
}

.settings-group.collapsed .settings-group-body {
    display: none;
}

.settings-group.collapsed .toggle-arrow {
    transform: rotate(-90deg);
}

/* ── Reminders list ─────────────────────────────────────── */

.reminders-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reminder-item {
    padding: 10px 12px;
    border-radius: var(--radius);
    background: var(--green-soft);
    border-left: 2px solid var(--green);
}

.reminder-item.sent {
    opacity: 0.5;
    border-left-color: var(--text-dim);
    background: var(--bg);
}

.reminder-message {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.reminder-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: var(--text-dim);
    flex-wrap: wrap;
    font-family: 'Share Tech Mono', monospace;
}

.reminder-status {
    font-weight: 700;
    color: var(--green);
}

.reminder-item.sent .reminder-status {
    color: var(--text-dim);
}

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
    padding: 12px 24px;
    border-radius: var(--radius);
    border: none;
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-pink {
    background: var(--green-soft);
    color: var(--green);
    border: 1px solid var(--green-dim);
}

.btn-pink:hover {
    box-shadow: 0 0 20px var(--green-glow);
    background: rgba(0, 255, 65, 0.15);
}

.btn-outline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--surface-border);
}

.btn-outline:hover {
    border-color: var(--green-dim);
    color: var(--green);
}

.btn-danger {
    background: transparent;
    color: var(--coral);
    border: 1px solid var(--coral);
}

.btn-block {
    width: 100%;
}

/* ── Record Mascot (SVG) ─────────────────────────────────── */

.record-mascot-svg {
    width: 140px;
    height: 140px;
    margin-bottom: -8px;
    filter: drop-shadow(0 0 16px var(--green-glow));
}

/* ── Terminal Block (empty states) ───────────────────────── */

.terminal-block {
    width: 220px;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    background: rgba(15, 26, 15, 0.6);
    overflow: hidden;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.terminal-bar {
    display: flex;
    gap: 5px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--surface-border);
}

.terminal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green-dim);
    opacity: 0.5;
}

.terminal-body {
    padding: 12px 14px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    line-height: 1.8;
}

.terminal-line {
    color: var(--green);
    white-space: nowrap;
}

.terminal-line.dim {
    color: var(--text-dim);
}

.terminal-prompt {
    color: var(--green);
    margin-right: 4px;
}

.terminal-cursor {
    display: inline-block;
    color: var(--green);
    animation: blink 1s step-end infinite;
}

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

/* ── Empty State ──────────────────────────────────────────── */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    gap: 12px;
}

.empty-img {
    width: 180px;
    height: 180px;
    border-radius: var(--radius);
    object-fit: cover;
    filter: drop-shadow(0 0 16px var(--green-glow));
}

.empty-icon {
    font-size: 56px;
    opacity: 0.3;
}

.empty-text {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: var(--text-muted);
}

.empty-hint {
    font-size: 13px;
    color: var(--text-dim);
    font-family: 'Share Tech Mono', monospace;
}

/* ── Toast ────────────────────────────────────────────────── */

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    padding: 12px 24px;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--green);
    font-size: 13px;
    font-family: 'Share Tech Mono', monospace;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    z-index: 200;
    transition: transform 0.3s ease-out;
    white-space: nowrap;
    border: 1px solid var(--surface-border);
}

.toast.visible {
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    border-color: var(--coral);
    color: var(--coral);
}

.toast.success {
    border-color: var(--green-dim);
    color: var(--green);
}

/* ── Install Banner ───────────────────────────────────────── */

.install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 20px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    border-top: 1px solid var(--green-dim);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 150;
    max-width: 480px;
    margin: 0 auto;
    animation: slideIn 0.3s ease-out;
}

.install-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.install-text strong {
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    color: var(--green);
}

.install-text span {
    font-size: 12px;
    color: var(--text-muted);
}

.install-dismiss {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--text-dim);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Scrollbar ────────────────────────────────────────────── */

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--surface-border);
    border-radius: 2px;
}

/* ── Responsive safe area ─────────────────────────────────── */

@supports (padding: env(safe-area-inset-bottom)) {
    #app {
        padding-bottom: env(safe-area-inset-bottom);
    }
}
