/* ============ Reset & Base ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --accent: #6C8EEF;
  --accent-glow: rgba(108,142,239,0.25);
  --accent-soft: rgba(108,142,239,0.12);
  --blue: #6C8EEF;
  --red: #EF6C6C; --green: #5ECB8B; --orange: #E8A55A;
  --purple: #A78BFA;
  --bg: #08090c; --bg-card: #12141a; --bg-input: #1a1d26;
  --bg-elevated: #1e2130;
  --text: #e8eaf0; --text2: #6b7084; --sep: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.08);
  --glass: rgba(18,20,26,0.85);
  --tabbar: rgba(12,13,18,0.92);
  --radius: 14px; --radius-sm: 10px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --shadow: 0 2px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
}
html, body {
  height: 100%; font-family: -apple-system, 'SF Pro Display', 'Inter', system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; overscroll-behavior: none;
  -webkit-user-select: none; user-select: none;
  letter-spacing: -0.01em;
}

/* ============ Auth Screen ============ */
.screen {
  position: fixed; inset: 0; display: flex; align-items: center;
  justify-content: center; background: var(--bg); z-index: 100;
}
.auth-box { text-align: center; padding: 32px 24px; width: 100%; max-width: 340px; }
.auth-logo {
  width: 72px; height: 72px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(108,142,239,0.2);
  border-radius: 20px;
}
.auth-box h1 { font-size: 26px; font-weight: 700; margin: 0 0 6px; color: var(--text); letter-spacing: -0.02em; }
.auth-box p { color: var(--text2); margin-bottom: 24px; font-size: 15px; }
.err { color: var(--red); font-size: 13px; margin-top: 12px; }

/* ============ Header ============ */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: calc(var(--safe-top) + 10px) 16px 10px;
  background: var(--tabbar);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--sep);
}
header h1 { font-size: 17px; font-weight: 600; color: var(--text); letter-spacing: -0.02em; }

/* ============ Main Content ============ */
main {
  padding-top: calc(var(--safe-top) + 52px);
  padding-bottom: calc(var(--safe-bottom) + 68px);
  min-height: 100vh;
}
.tab-panel { display: none; padding: 14px 16px; }
.tab-panel.active { display: block; }

/* ============ Tab Bar ============ */
nav.tab-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; padding-bottom: var(--safe-bottom);
  background: var(--tabbar);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--sep);
}
.tab-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 8px 0 6px; background: none; border: none;
  color: var(--text2); font-size: 10px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: color 0.2s;
}
.tab-btn.active { color: var(--accent); }
.tab-svg {
  width: 22px; height: 22px; margin-bottom: 2px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.tab-icon { font-size: 22px; line-height: 1; margin-bottom: 1px; display: block; }
.tab-label { font-size: 10px; font-weight: 500; }

/* Legacy tab-item support */
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 6px 0 4px; background: none; border: none;
  color: var(--text2); font-size: 10px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; text-decoration: none;
}
.tab-item.active { color: var(--accent); }

/* ============ Inputs & Buttons ============ */
.input {
  width: 100%; padding: 12px 14px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 15px;
  font-family: inherit; outline: none; -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
textarea.input { resize: vertical; min-height: 100px; line-height: 1.5; }

.btn {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--accent), #5a7de8);
  color: #fff; border: none; border-radius: var(--radius-sm); font-size: 16px;
  font-weight: 600; font-family: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s, opacity 0.1s;
}
.btn:active { transform: scale(0.97); opacity: 0.9; }
.btn:disabled { opacity: 0.4; }

.btn-save { margin-top: 8px; padding: 16px; font-size: 17px; }
.btn-primary {
  padding: 14px; background: linear-gradient(135deg, var(--accent), #5a7de8);
  color: #fff; border: none; border-radius: var(--radius-sm); font-size: 16px;
  font-weight: 600; font-family: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: transform 0.1s;
}
.btn-primary:active { transform: scale(0.97); opacity: 0.9; }
.btn-primary.btn-save { width: 100%; margin-top: 12px; padding: 16px; font-size: 17px; }

.btn-icon {
  width: 36px; height: 36px; display: flex; align-items: center;
  justify-content: center; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 50%; font-size: 20px; color: var(--text); cursor: pointer;
}
.btn-sm {
  padding: 8px 16px; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: transform 0.1s, opacity 0.1s;
}
.btn-sm:active { transform: scale(0.95); opacity: 0.9; }
.btn-sm.btn-ai { background: var(--purple); }
.btn-sm.btn-full { width: 100%; padding: 13px; font-size: 14px; }
.btn-sm.btn-accent-green { background: var(--green); }
.btn-sm.btn-accent-purple { background: var(--purple); }
.btn-ghost {
  padding: 8px 16px; background: transparent; color: var(--text2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; cursor: pointer;
}
.btn-ghost:active { background: var(--bg-input); }
.btn-small {
  padding: 8px 14px; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
  cursor: pointer; flex-shrink: 0; transition: transform 0.1s;
}
.btn-small:active { transform: scale(0.95); }
.btn-danger {
  width: 100%; padding: 14px; background: none; color: var(--red);
  border: 1px solid rgba(239,108,108,0.3); border-radius: var(--radius);
  font-size: 15px; font-weight: 500; cursor: pointer; font-family: inherit;
  transition: background 0.15s;
}
.btn-danger:active { background: rgba(239,108,108,0.08); }

/* ============ Date Nav ============ */
.date-nav {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin-bottom: 16px;
}
.date-btn {
  padding: 6px 16px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; font-size: 15px; font-weight: 500; color: var(--text);
  cursor: pointer; min-width: 140px; text-align: center;
}
.nav-btn {
  width: 38px; height: 38px; display: flex; align-items: center;
  justify-content: center; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 50%; font-size: 14px; color: var(--text2); cursor: pointer;
  transition: background 0.15s;
}
.nav-btn:active { background: var(--bg-input); }
.date-display {
  font-size: 16px; font-weight: 600; min-width: 160px; text-align: center;
  letter-spacing: -0.01em;
}

/* ============ Form Groups ============ */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 600; color: var(--text2);
  text-transform: uppercase; margin-bottom: 6px; padding-left: 4px;
  letter-spacing: 0.04em;
}

/* ============ Chips ============ */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 14px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 24px; font-size: 14px; color: var(--text); cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: all 0.15s;
}
.chip.on { background: var(--accent-soft); color: var(--accent); border-color: rgba(108,142,239,0.3); }

/* ============ Tags ============ */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
  background: var(--accent-soft); color: var(--accent); border-radius: 24px; font-size: 13px;
}
.tag-x { cursor: pointer; font-size: 15px; opacity: 0.7; }
.suggestions {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); max-height: 150px; overflow-y: auto;
  z-index: 10; box-shadow: var(--shadow-lg);
}
.sug-item {
  padding: 10px 14px; font-size: 14px; cursor: pointer;
  border-bottom: 1px solid var(--sep); color: var(--text);
}
.sug-item:last-child { border-bottom: none; }

/* ============ Input Hub ============ */
.input-hub {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  margin-bottom: 14px; box-shadow: var(--shadow);
}
.main-input {
  width: 100%; padding: 12px 14px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 15px;
  font-family: inherit; outline: none; -webkit-appearance: none;
  resize: none; line-height: 1.55; min-height: 80px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.main-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.input-actions {
  display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap;
}
.action-btn {
  width: 46px; height: 46px; display: flex; align-items: center;
  justify-content: center; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text2); cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: all 0.15s;
}
.action-btn svg { width: 20px; height: 20px; }
.action-btn:active { transform: scale(0.9); background: var(--bg-elevated); }
.action-btn.active { background: var(--accent-soft); border-color: rgba(108,142,239,0.3); color: var(--accent); }
.preview-area {
  margin-top: 10px; padding: 10px; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.tag-input-area { margin-top: 12px; }
.tag-input {
  width: 100%; padding: 10px 12px; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text);
  font-size: 14px; font-family: inherit; outline: none; -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.tag-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* ============ Todo Section ============ */
.todo-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.todo-input-row { display: flex; gap: 8px; margin-bottom: 10px; }
.todo-input {
  flex: 1; padding: 10px 12px; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text);
  font-size: 15px; font-family: inherit; outline: none; -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.todo-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.todo-list { display: flex; flex-direction: column; gap: 6px; }
.todo-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-input); border-radius: var(--radius-sm);
  padding: 12px; border-left: 3px solid var(--accent);
  transition: background 0.15s;
}
.todo-item.priority-high { border-left-color: var(--red); }
.todo-item.priority-low { border-left-color: var(--green); }
.todo-item.done .todo-text { text-decoration: line-through; color: var(--text2); }
.todo-check {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border);
  background: none; cursor: pointer; flex-shrink: 0; display: flex;
  align-items: center; justify-content: center; font-size: 14px;
  transition: all 0.15s;
}
.todo-check.checked { background: var(--accent); border-color: var(--accent); color: #fff; }
.todo-text { flex: 1; font-size: 15px; color: var(--text); }
.todo-meta { font-size: 11px; color: var(--text2); }
.todo-bell {
  background: none; border: none; font-size: 18px; cursor: pointer;
  padding: 4px; -webkit-tap-highlight-color: transparent; color: var(--text2);
}
.todo-bell.has-reminder { color: var(--orange); }
.todo-delete {
  background: none; border: none; cursor: pointer; padding: 4px;
  -webkit-tap-highlight-color: transparent; color: var(--text2); opacity: 0.5;
}
.todo-delete:hover { opacity: 1; color: #e74c3c; }
.todo-section-title { font-size: 14px; font-weight: 600; color: var(--accent); margin: 14px 0 8px; letter-spacing: -0.01em; }

/* ============ Feed Cards ============ */
.feed-cards { display: flex; flex-direction: column; gap: 6px; }
.feed-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer;
  transition: transform 0.1s;
}
.feed-card:active { transform: scale(0.98); }
.card-voice { border-left: 3px solid var(--accent); }
.card-image { border-left: 3px solid var(--green); }
.card-url { border-left: 3px solid var(--orange); }
.card-memo { border-left: 3px solid var(--text2); }
.card-todo { border-left: 3px solid var(--red); }
.card-header {
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.card-icon { display: inline-flex; align-items: center; color: var(--text2); flex-shrink: 0; line-height: 1; }
.card-icon svg { width: 14px; height: 14px; }
.card-type-label { font-size: 11px; color: var(--text2); flex-shrink: 0; }
.card-time { font-size: 12px; color: var(--text2); }
.card-type {
  font-size: 11px; color: var(--text2); background: var(--bg-input);
  padding: 3px 9px; border-radius: 6px; margin-left: auto; font-weight: 500;
}
.badge {
  padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent);
}
.badge.ok { background: rgba(94,203,139,0.12); color: var(--green); }
.badge.err { background: rgba(239,108,108,0.12); color: var(--red); }
.badge-muted { background: var(--bg-input); color: var(--text2); }
.card-body { font-size: 15px; line-height: 1.45; color: var(--text); margin-bottom: 4px; }
.card-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.card-tags .tag, .card-tag {
  font-size: 11px; padding: 3px 8px; background: var(--bg-input);
  border-radius: 6px; color: var(--text2); font-weight: 500;
}
.card-tag-editor {
  padding: 10px 0; border-top: 1px solid var(--border); margin-top: 8px;
}
.tag-editor-label {
  font-size: 11px; color: var(--text2); margin-bottom: 6px; font-weight: 600;
}
.tag-editor-chips {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
}
.tag-chip {
  font-size: 12px; padding: 4px 10px; border-radius: 14px; cursor: pointer;
  user-select: none; transition: all .15s;
}
.tag-chip-active {
  background: var(--accent); color: #fff;
}
.tag-chip-active .tag-remove {
  margin-left: 4px; font-weight: bold; opacity: .7;
}
.tag-chip-active .tag-remove:hover { opacity: 1; }
.tag-chip-suggestion {
  background: var(--bg-input); color: var(--text2); border: 1px dashed var(--border);
}
.tag-chip-suggestion:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.tag-editor-input-row {
  display: flex; gap: 8px; align-items: center;
}
.tag-manual-input {
  flex: 1; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-input); color: var(--text); font-size: 13px;
}

/* ============ Search Tab ============ */
.search-bar {
  display: flex; gap: 8px; margin-bottom: 10px; align-items: center;
}
.search-input {
  flex: 1; padding: 10px 14px; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text);
  font-size: 15px; font-family: inherit; outline: none; -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-filters { display: flex; gap: 8px; margin-bottom: 12px; }
.filter-select {
  flex: 1; padding: 9px 12px; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text);
  font-size: 13px; font-family: inherit; outline: none; -webkit-appearance: none;
}
.search-results { display: flex; flex-direction: column; gap: 6px; }
.search-result-item {
  background: var(--bg-card); border-radius: var(--radius-sm);
  padding: 10px 12px; cursor: pointer; border: 1px solid var(--border);
  transition: transform 0.1s;
}
.search-result-item:active { transform: scale(0.98); }
.search-result-date { font-size: 15px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.search-result-header {
  display: flex; align-items: center; gap: 6px; margin-bottom: 2px;
}
.search-result-title {
  flex: 1; font-size: 15px; font-weight: 500; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.search-result-header .card-time { font-size: 12px; color: var(--text2); flex-shrink: 0; min-width: 80px; text-align: right; }
.search-result-header .card-icon { flex-shrink: 0; }
.search-result-match {
  font-size: 15px; color: var(--text); line-height: 1.45;
  border-left: 2px solid var(--accent); padding-left: 8px; margin-top: 4px;
}
.search-result-match mark {
  background: var(--accent-soft); color: var(--text);
  border-radius: 2px; padding: 0 3px;
}
.search-summary { font-size: 13px; color: var(--text2); margin-bottom: 8px; }

/* ============ Vault Browser ============ */
.vault-stats-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.vault-stats-toggle span:first-child {
  font-size: 16px; font-weight: 600; color: var(--text);
}
.vault-stats-arrow {
  font-size: 10px; color: var(--text2); transition: transform 0.2s;
}
.vault-stats-arrow.open { transform: rotate(180deg); }
.vault-stats { margin-bottom: 12px; }
.vault-stat-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px; font-size: 13px;
}
.vault-stat-icon { width: 24px; display: flex; align-items: center; justify-content: center; }
.vault-stat-label { width: 56px; color: var(--text2); font-size: 12px; }
.vault-stat-bar {
  flex: 1; height: 6px; background: var(--bg-input);
  border-radius: 3px; overflow: hidden;
}
.vault-stat-fill {
  height: 100%; background: var(--accent);
  border-radius: 3px; transition: width 0.3s;
}
.vault-stat-count { width: 28px; text-align: right; color: var(--text2); font-size: 11px; }
.chip-row {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip-row:empty { display: none; }
#vault-tag-chips {
  display: flex; flex-wrap: wrap; overflow-x: visible;
}
.chip {
  flex-shrink: 0; padding: 5px 12px; border-radius: 16px;
  font-size: 12px; cursor: pointer; white-space: nowrap;
  background: var(--bg-input); color: var(--text2); border: none;
  transition: all 0.15s; -webkit-tap-highlight-color: transparent;
  display: inline-flex; align-items: center; gap: 4px;
}
.chip svg { vertical-align: middle; }
.chip.active {
  background: var(--accent); color: #fff;
}
.chip.active svg { stroke: #fff; }
.chip-count { font-size: 10px; opacity: 0.7; }
.chip-more {
  background: var(--bg-elevated); color: var(--accent);
  font-weight: 500;
}
.tag-hidden { display: none; }
.vault-list { display: flex; flex-direction: column; gap: 6px; }
.vault-item {
  background: var(--bg-card); border-radius: var(--radius-sm);
  padding: 10px 12px; cursor: pointer; border: 1px solid var(--border);
  transition: transform 0.1s;
}
.vault-item:active { transform: scale(0.98); }
.vault-item-header {
  display: flex; align-items: center; gap: 6px; margin-bottom: 2px;
}
.vault-item-title {
  flex: 1; font-size: 15px; font-weight: 500; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vault-item-header .card-time { font-size: 12px; color: var(--text2); flex-shrink: 0; min-width: 80px; text-align: right; }
.vault-item-preview {
  font-size: 15px; color: var(--text); line-height: 1.45;
}

/* Legacy search wrap */
.search-wrap { display: flex; gap: 6px; margin-bottom: 12px; align-items: center; }
.search-mic-btn {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 18px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; color: var(--text);
}
.search-mic-btn.recording { background: var(--red); border-color: var(--red); color: #fff; animation: mic-pulse 1.2s infinite; }
.search-go-btn {
  padding: 10px 14px; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm); font-size: 14px;
  font-weight: 600; cursor: pointer; flex-shrink: 0;
}

/* ============ Save Feedback ============ */
.feedback {
  text-align: center; padding: 12px; margin-top: 8px;
  border-radius: var(--radius); font-size: 15px; font-weight: 500;
}
.feedback.ok { background: rgba(94,203,139,0.1); color: var(--green); }
.feedback.fail { background: rgba(239,108,108,0.1); color: var(--red); }

/* ============ Note Content ============ */
.note-content {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 18px; line-height: 1.6; font-size: 15px; word-break: break-word;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.note-content h1 { font-size: 22px; margin-bottom: 12px; }
.note-content h2 { font-size: 18px; font-weight: 600; margin-top: 16px; margin-bottom: 8px; color: var(--accent); }
.note-content li { margin-bottom: 4px; }
.empty { text-align: center; color: var(--text2); padding: 40px 20px; font-size: 15px; }

/* ============ History / Hist Items ============ */
.hist-item {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 14px; margin-bottom: 8px; cursor: pointer;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.hist-item:active { transform: scale(0.98); }
.hist-date { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.hist-preview {
  color: var(--text2); font-size: 13px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.overlay {
  position: fixed; inset: 0; background: var(--bg); z-index: 60;
  padding: calc(var(--safe-top) + 16px) 16px calc(var(--safe-bottom) + 16px);
  overflow-y: auto;
}
.close-btn {
  position: absolute; top: calc(var(--safe-top) + 8px); right: 12px;
  font-size: 28px; background: none; border: none; color: var(--text);
  cursor: pointer; z-index: 61;
}

/* ============ Note Detail Overlay (swipeable card) ============ */
.note-overlay-bg {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
}
.note-detail-card {
  background: var(--bg-card); border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  width: 100%; max-width: 480px;
  max-height: 80vh; overflow-y: auto;
  padding: 20px; position: relative;
  user-select: text; touch-action: pan-y;
  will-change: transform, opacity;
}
.note-detail-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.note-detail-header .card-time { flex: 1; text-align: center; }
.card-indicator {
  font-size: 12px; color: var(--text2);
  background: var(--bg-input); border-radius: 10px;
  padding: 2px 8px;
}
.note-nav-btn {
  background: none; border: none; color: var(--text2);
  font-size: 28px; line-height: 1; padding: 4px 8px;
  cursor: pointer; border-radius: 8px; flex-shrink: 0;
}
.note-nav-btn:hover { background: var(--bg-input); color: var(--text); }
.note-nav-btn:disabled { opacity: 0.2; pointer-events: none; }
.note-close-btn {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 80; width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff; font-size: 28px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: background 0.2s;
}
.note-close-btn:hover { background: rgba(255,80,80,0.4); }
.note-detail-body {
  color: var(--text); font-size: 15px; line-height: 1.7;
  word-break: break-word;
}
.note-detail-body h2 {
  font-size: 16px; font-weight: 700; color: var(--accent);
  margin: 20px 0 10px 0;
}
.note-detail-body h2:first-child { margin-top: 0; }
.note-detail-body details {
  margin-top: 16px; background: var(--bg-input);
  border-radius: var(--radius); padding: 12px;
  border: 1px solid var(--border);
}
.note-detail-body details summary {
  cursor: pointer; color: var(--text2); font-size: 13px;
  font-weight: 600;
}
.note-detail-body details[open] summary { margin-bottom: 12px; }

/* ============ Markdown Table → Cards ============ */
.md-table-cards { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.md-table-card {
  background: rgba(108,142,239,0.05); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
}
.md-table-card-title {
  font-weight: 700; color: var(--accent); font-size: 14px; margin-bottom: 4px;
}
.md-table-card-meta {
  display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text2); line-height: 1.6;
}
.md-table-card-field { display: inline-block; }
.md-table-card-label { color: var(--text2); opacity: 0.6; font-size: 11px; }

/* ============ Processing Queue ============ */
.proc-queue {
  position: fixed; bottom: calc(56px + var(--safe-bottom)); left: 0; right: 0;
  z-index: 49; padding: 6px 12px;
  background: var(--tabbar); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--sep);
  max-height: 140px; overflow-y: auto;
}
.proc-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 13px; color: var(--text2);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.proc-item:last-child { border-bottom: none; }
.proc-icon { font-size: 16px; flex-shrink: 0; }
.proc-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proc-status { font-size: 11px; padding: 2px 8px; border-radius: 10px; flex-shrink: 0; }
.proc-status.uploading { background: rgba(108,142,239,0.2); color: var(--accent); }
.proc-status.processing { background: rgba(255,180,0,0.15); color: #ffb400; }
.proc-status.done { background: rgba(0,200,100,0.15); color: #00c864; }
.proc-status.error { background: rgba(255,60,60,0.15); color: #ff3c3c; }
@keyframes proc-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
.proc-status.uploading, .proc-status.processing { animation: proc-pulse 1.5s infinite; }

/* ============ Settings ============ */
.s-group {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 18px; margin-bottom: 14px; border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.s-group h2 {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  color: var(--text2); margin-bottom: 14px; letter-spacing: 0.06em;
}
.s-desc { font-size: 13px; color: var(--text2); margin-bottom: 10px; line-height: 1.4; }
.s-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 6px 0;
}
.s-val { font-size: 13px; color: var(--text2); text-align: right; word-break: break-all; max-width: 200px; }
.ver { text-align: center; color: var(--text2); font-size: 12px; margin-top: 24px; opacity: 0.6; }
.vault-icon { margin-bottom: 16px; }

/* Toggle Switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 12px; transition: .3s;
}
.toggle-slider:before {
  position: absolute; content: "";
  height: 18px; width: 18px; left: 2px; bottom: 2px;
  background: var(--text2); border-radius: 50%; transition: .3s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); background: #fff; }

/* ============ Voice Recognition Status ============ */
#voice-status {
  position: fixed; top: calc(var(--safe-top) + 60px); left: 50%;
  transform: translateX(-50%); padding: 10px 20px; border-radius: 25px;
  font-size: 14px; font-weight: 500; z-index: 9999; display: none;
  max-width: 85%; text-align: center; box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px); transition: all 0.3s ease;
  animation: voiceStatusSlide 0.3s ease;
}
@keyframes voiceStatusSlide {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
#voice-status.listening { background: linear-gradient(135deg, #6C8EEF 0%, #5a7de8 100%); color: white; }
#voice-status.success { background: linear-gradient(135deg, #5ECB8B 0%, #4ab877 100%); color: white; }
#voice-status.error { background: linear-gradient(135deg, #EF6C6C 0%, #d95555 100%); color: white; }
#voice-status.warning { background: linear-gradient(135deg, #E8A55A 0%, #d99544 100%); color: white; }
#voice-status .duration { font-size: 11px; opacity: 0.8; margin-left: 8px; }

/* ============ Recording / Glow ============ */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 5px var(--accent-glow); }
  50% { box-shadow: 0 0 16px var(--accent-glow), 0 0 32px rgba(108,142,239,0.15); }
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,108,108,0.5); }
  50% { box-shadow: 0 0 0 10px rgba(239,108,108,0); }
}
.recording { animation: glow-pulse 2s ease-in-out infinite; }
.mic-btn {
  position: relative; bottom: auto; right: auto;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 20px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent; transition: all 0.2s; color: var(--text);
}
.mic-btn.recording { background: var(--red); border-color: var(--red); color: #fff; animation: mic-pulse 1.2s infinite; }
.memo-input-wrap { position: relative; }
.memo-btns {
  position: absolute; bottom: 10px; right: 10px;
  display: flex; gap: 6px; align-items: center;
}
.memo-tool-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 18px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent; color: var(--text);
}
.memo-tool-btn:active { transform: scale(0.9); }

/* ============ Image Attachments ============ */
.image-attach-row { display: flex; gap: 8px; margin-bottom: 8px; }
.image-pick-btn { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.image-preview-list { display: flex; gap: 8px; flex-wrap: wrap; }
.image-thumb {
  position: relative; width: 72px; height: 72px; border-radius: var(--radius-sm);
  overflow: hidden; border: 1px solid var(--border);
}
.image-thumb img { width: 100%; height: 100%; object-fit: cover; }
.image-thumb-remove {
  position: absolute; top: 2px; right: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,0.7); color: #fff; border: none;
  font-size: 14px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.image-scan-btn {
  position: absolute; bottom: 2px; right: 2px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; border: none;
  font-size: 14px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3); z-index: 5;
}

/* ============ Audio Recording ============ */
.audio-attach-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.audio-rec-btn { transition: all 0.2s; }
.audio-rec-btn.recording { background: var(--red); border-color: var(--red); color: #fff; animation: mic-pulse 1.2s infinite; }
.audio-rec-status { font-size: 13px; color: var(--text2); font-variant-numeric: tabular-nums; }
.audio-preview-list { display: flex; flex-direction: column; gap: 8px; }
.audio-preview-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px;
}
.audio-preview-item audio { flex: 1; height: 36px; }
.audio-preview-item .audio-remove {
  width: 28px; height: 28px; border-radius: 50%;
  background: none; border: 1px solid var(--border);
  color: var(--red); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.audio-preview-item .audio-remove:active { background: rgba(239,108,108,0.08); }

/* ============ Card Actions (tab-bar minimal style) ============ */
.card-actions {
  display: flex; gap: 0; padding: 0;
  border-top: 1px solid var(--sep); margin-top: 12px;
}
.card-action-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: 0;
  padding: 6px 0; cursor: pointer; color: var(--text2);
  transition: color 0.15s; -webkit-tap-highlight-color: transparent;
}
.card-action-btn svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.card-action-btn:active { color: var(--accent); }
.card-action-delete { color: var(--text2); }
.card-action-delete:active { color: var(--red); }
.card-summary {
  margin-top: 8px; padding: 10px 12px; background: var(--bg-elevated);
  border-radius: 8px; font-size: 13px; color: var(--text2); line-height: 1.5;
}
.card-comment-input { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.card-comment-input textarea {
  width: 100%; border: 1px solid var(--sep); border-radius: 8px; padding: 8px;
  font-size: 13px; resize: none; background: var(--bg); color: var(--text);
  font-family: inherit; outline: none; -webkit-appearance: none;
  transition: border-color 0.2s;
}
.card-comment-input textarea:focus { border-color: var(--accent); }

/* ============ Related Notes ============ */
.related-notes {
  margin-top: 8px; padding: 8px; background: var(--bg-elevated);
  border-radius: 8px; font-size: 12px;
}
.related-label {
  display: block; font-weight: 600; color: var(--text2); margin-bottom: 4px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
}
.related-link {
  display: inline-block; background: var(--bg); border: 1px solid var(--sep);
  border-radius: 6px; padding: 4px 8px; margin: 2px; font-size: 12px;
  color: var(--accent); cursor: pointer; text-decoration: none;
}

/* ============ Jarvis Onboarding ============ */
.jarvis-onboarding { padding: 16px; text-align: center; }
.onboarding-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.onboarding-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.onboarding-btn {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 16px; font-size: 13px; cursor: pointer; color: var(--text);
  transition: all 0.2s; white-space: nowrap; font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.onboarding-btn:active { background: var(--bg-elevated); transform: scale(0.97); }

/* ============ Reminders ============ */
.reminder-banner {
  position: fixed; top: calc(var(--safe-top) + 44px); left: 8px; right: 8px;
  z-index: 55; background: linear-gradient(135deg, var(--accent), #5a7de8);
  color: #fff; border-radius: var(--radius); padding: 14px 40px 14px 14px;
  font-size: 14px; font-weight: 500; animation: slide-down 0.3s ease;
  box-shadow: var(--shadow-lg);
}
@keyframes slide-down {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.reminder-banner-close {
  position: absolute; top: 8px; right: 10px;
  background: none; border: none; color: #fff; font-size: 22px; cursor: pointer;
}
.reminder-dialog-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.75); display: flex;
  align-items: center; justify-content: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.reminder-dialog {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; width: 90%; max-width: 320px;
  box-shadow: var(--shadow-lg);
}
.reminder-dialog h3 { font-size: 17px; margin-bottom: 4px; color: var(--text); }
.reminder-list { display: flex; flex-direction: column; gap: 6px; }
.reminder-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px; background: var(--bg-input); border-radius: var(--radius-sm); font-size: 13px;
}
.reminder-item-text { flex: 1; color: var(--text); }
.reminder-item-time { color: var(--text2); font-size: 11px; margin-left: 8px; }
.reminder-item-del { background: none; border: none; color: var(--red); font-size: 16px; cursor: pointer; padding: 4px; }

/* ============ Calendar Event Detection ============ */
.event-detect-banner {
  margin: 10px 0; padding: 14px;
  background: var(--bg-card); border: 1px solid rgba(108,142,239,0.2);
  border-radius: var(--radius); animation: slide-down 0.3s ease;
  box-shadow: 0 0 16px rgba(108,142,239,0.06);
}
.event-detect-content { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.event-detect-icon { flex-shrink: 0; display: flex; align-items: center; }
.event-detect-info { flex: 1; }
.event-detect-title { font-size: 15px; font-weight: 600; color: var(--text); }
.event-detect-detail { font-size: 13px; color: var(--text2); margin-top: 2px; }
.event-detect-actions { display: flex; gap: 8px; }
.event-detect-actions .btn-sm { flex: 1; padding: 9px; font-size: 13px; border-radius: var(--radius-sm); cursor: pointer; }

/* ============ Jarvis FAB & Overlay ============ */
.jarvis-fab { display: none; }
.jarvis-overlay { display: none; }
.jarvis-container {
  display: flex; flex-direction: column;
  height: 100%; max-width: 600px; width: 100%; margin: 0 auto;
}
.jarvis-embedded {
  height: calc(100vh - var(--safe-top, 0px) - 48px - 60px);
}
.jarvis-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--sep);
}
.jarvis-header-left { display: flex; align-items: center; gap: 10px; }
.jarvis-header-right { display: flex; align-items: center; gap: 6px; }
.jarvis-title { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.jarvis-status { font-size: 12px; color: var(--text2); }
.jarvis-header-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid var(--sep);
  color: var(--text2); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent; transition: background 0.15s;
}
.jarvis-header-btn:active { background: rgba(255,255,255,0.12); }
.jarvis-header-btn svg { flex-shrink: 0; }
.jarvis-chat {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  -webkit-overflow-scrolling: touch;
}
.jarvis-welcome {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 48px 20px; gap: 14px;
}
.jarvis-welcome-icon {
  width: 64px; height: 64px; display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); border: 1px solid rgba(108,142,239,0.2);
  border-radius: 18px;
}
.jarvis-welcome-text { color: rgba(255,255,255,0.7); font-size: 16px; line-height: 1.5; }
.jarvis-welcome-hints { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.jarvis-hint {
  padding: 8px 16px; border-radius: 20px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--sep);
  color: rgba(255,255,255,0.7); font-size: 13px; font-weight: 500; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background 0.15s;
}
.jarvis-hint:active { background: rgba(255,255,255,0.12); }
.jarvis-bubble {
  max-width: 85%; padding: 12px 16px; border-radius: 18px;
  font-size: 15px; line-height: 1.6; word-break: break-word;
  animation: jarvis-bubble-in 0.2s ease;
}
@keyframes jarvis-bubble-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.jarvis-bubble-user {
  align-self: flex-end; background: linear-gradient(135deg, var(--accent), #5a7de8);
  color: #fff; border-radius: 18px 18px 4px 18px;
}
.jarvis-bubble-bot {
  align-self: flex-start; background: rgba(255,255,255,0.08); color: #fff;
  border-radius: 18px 18px 18px 4px; cursor: pointer; border: 1px solid var(--sep);
}
.jarvis-bubble-bot strong { color: #8BABF1; }
.jarvis-bubble-bot code { background: rgba(0,0,0,0.3); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.jarvis-bubble-bot li { margin-left: 16px; margin-bottom: 2px; }
.jarvis-bubble-error {
  align-self: flex-start; background: rgba(239,108,108,0.1); color: var(--red);
  border-radius: 18px 18px 18px 4px; border: 1px solid rgba(239,108,108,0.2);
}
.jarvis-typing {
  align-self: flex-start; display: flex; align-items: center; gap: 6px;
  padding: 12px 16px; border-radius: 18px 18px 18px 4px;
  background: rgba(255,255,255,0.05); color: var(--text2);
  font-size: 13px; animation: jarvis-bubble-in 0.2s ease;
}
.jarvis-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text2); animation: jarvis-dot 1.2s infinite;
}
.jarvis-typing span:nth-child(2) { animation-delay: 0.2s; }
.jarvis-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes jarvis-dot {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1.2); }
}
.jarvis-note-link {
  color: var(--accent); text-decoration: underline; cursor: pointer;
  word-break: break-all;
}
.jarvis-input-area {
  padding: 12px 16px calc(var(--safe-bottom, 0px) + 8px);
  display: flex; gap: 8px; align-items: center;
  border-top: 1px solid var(--sep);
}
.jarvis-input {
  flex: 1; padding: 12px 16px; border-radius: 24px;
  border: 1px solid var(--sep);
  font-size: 15px; font-family: inherit;
  background: rgba(255,255,255,0.06); color: #fff;
  outline: none; -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.jarvis-input::placeholder { color: var(--text2); }
.jarvis-input:focus { border-color: rgba(108,142,239,0.4); box-shadow: 0 0 0 3px rgba(108,142,239,0.12); }
.jarvis-send-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #5a7de8);
  border: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent; transition: transform 0.1s; flex-shrink: 0;
}
.jarvis-send-btn:active { transform: scale(0.9); }
.jarvis-cancel-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--red, #e74c3c); border: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent; transition: transform 0.1s; flex-shrink: 0;
}
.jarvis-cancel-btn:active { transform: scale(0.9); }
.jarvis-mic-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid var(--sep);
  color: var(--text2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent; transition: all 0.2s; flex-shrink: 0;
}
.jarvis-mic-btn:disabled { opacity: 0.3; cursor: default; }
.jarvis-mic-btn.recording { background: var(--red); border-color: var(--red); color: #fff; animation: mic-pulse 1.2s infinite; }

/* ============ Toast ============ */
.vv-toast {
  position: fixed; top: calc(var(--safe-top) + 52px); left: 50%;
  transform: translateX(-50%); z-index: 500;
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; max-width: 90%;
  text-align: center; pointer-events: none;
  animation: toast-in 0.3s ease, toast-out 0.3s ease 2.7s forwards;
  box-shadow: var(--shadow-lg);
}
.vv-toast.info { background: var(--accent); color: #fff; }
.vv-toast.warn { background: var(--orange); color: #fff; }
.vv-toast.error { background: var(--red); color: #fff; }
.vv-toast.success { background: var(--green); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateX(-50%) translateY(-16px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; } }

/* ============ Smart Scan Overlay ============ */
#scan-overlay {
  flex-direction: column;
  background: var(--bg);
}

/* ============ Feature Help ============ */
.help-list { display: flex; flex-direction: column; gap: 2px; }
.help-item { padding: 12px 0; border-bottom: 1px solid var(--sep); }
.help-item:last-child { border-bottom: none; }
.help-item strong { display: block; font-size: 14px; color: var(--text); margin-bottom: 4px; font-weight: 600; }
.help-item p { font-size: 13px; color: var(--text2); line-height: 1.55; margin: 0; }

/* ============ Mobile Responsive ============ */
@media (max-width: 480px) {
  .jarvis-bubble { max-width: 90%; }
  .jarvis-input { padding: 10px 14px; font-size: 15px; }
  .jarvis-send-btn, .jarvis-mic-btn, .jarvis-cancel-btn { width: 40px; height: 40px; }
  .jarvis-send-btn svg, .jarvis-mic-btn svg, .jarvis-cancel-btn svg { width: 16px; height: 16px; }
}
