/* ==========================================================================
   RunVoice AI - Modern Tech Minimalist Design System
   Sleek Square-Tech Geometry (Subtle Rounded Corners), Clean Spacing
   ========================================================================== */

:root {
  --bg-app: #080c14;
  --bg-card: #0e1526;
  --bg-card-subtle: #131d33;
  --bg-card-hover: #182542;
  --bg-input: #10192e;
  --bg-modal: #0d1629;
  --bg-overlay: rgba(4, 7, 14, 0.85);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(0, 240, 255, 0.4);

  --accent-cyan: #00f0ff;
  --accent-emerald: #10b981;
  --volt-primary: #00ff87;
  --accent-amber: #f59e0b;
  --accent-purple: #a855f7;
  --accent-rose: #f43f5e;
  --accent-blue: #3b82f6;

  --accent-gradient: linear-gradient(135deg, #00f0ff 0%, #10b981 100%);
  --rec-gradient: linear-gradient(135deg, #ff3366 0%, #ff6b4a 100%);

  --text-pure: #ffffff;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-sans: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;

  /* Modern Square-Tech Geometry Tokens (6px ~ 10px subtle roundness) */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-card: 10px;
  --radius-full: 6px; /* Replacing pill shapes with clean tech rectangle */

  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(0, 240, 255, 0.25);
  --shadow-rec: 0 0 30px rgba(255, 51, 102, 0.45);

  --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(0, 240, 255, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.04) 0%, transparent 45%);
}

.app-layout {
  width: 100%;
  max-width: 860px;
  min-height: 100vh;
  padding: 1.5rem 1.5rem 4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem; /* Generous breathing room between sections */
  margin: 0 auto;
}

/* ==========================================================================
   Header (Clean & Compact Tech Style)
   ========================================================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0 1.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
  gap: 1rem;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.logo-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #06090f;
  font-size: 1.2rem;
  box-shadow: 0 4px 14px rgba(0, 240, 255, 0.25);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-pure);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  background: rgba(0, 240, 255, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.25);
  text-transform: uppercase;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.ai-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 38px;
  padding: 0 0.85rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  box-sizing: border-box;
  cursor: pointer;
  transition: var(--transition);
}

.ai-status-pill:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  color: var(--text-main);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--text-dim);
  flex-shrink: 0;
}

.status-dot.ready {
  background: var(--accent-emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: pulse-dot 2.5s infinite ease-in-out;
}

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

.pill-arrow {
  font-size: 0.65rem;
  opacity: 0.6;
  flex-shrink: 0;
}

.btn-lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 38px;
  padding: 0 0.75rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  box-sizing: border-box;
  cursor: pointer;
  transition: var(--transition);
}

.btn-lang-pill:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-trial-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 38px;
  padding: 0 0.8rem;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: var(--radius-sm);
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  box-sizing: border-box;
  cursor: pointer;
  transition: var(--transition);
}

.btn-trial-pill:hover {
  background: rgba(0, 240, 255, 0.16);
  border-color: var(--accent-cyan);
}

.btn-pro-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 38px;
  padding: 0 0.85rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-sm);
  color: #fbbf24;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  box-sizing: border-box;
  cursor: pointer;
  transition: var(--transition);
}

.btn-pro-pill:hover {
  background: rgba(245, 158, 11, 0.25);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.auth-area {
  display: flex;
  align-items: center;
}

.btn-auth-subtle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 38px;
  padding: 0 0.85rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  box-sizing: border-box;
  cursor: pointer;
  transition: var(--transition);
}

.btn-auth-subtle:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-accent);
}

.user-profile-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  height: 38px;
  padding: 0 0.65rem 0 0.45rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  box-sizing: border-box;
  white-space: nowrap;
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  object-fit: cover;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-trial-badge {
  font-size: 0.72rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
  margin-left: 0.2rem;
  font-weight: 700;
}

.btn-menu-drawer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  font-size: 1.05rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-menu-drawer:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* ==========================================================================
   Slide-out Settings & Tools Drawer (Option 1: Linear / Notion Standard)
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99990;
  transition: opacity 0.3s ease;
}

.menu-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 380px;
  height: 100vh;
  background: #090e17;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
  z-index: 99995;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  box-sizing: border-box;
}

.menu-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.drawer-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.drawer-logo-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #3b82f6 100%);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.drawer-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.drawer-subtitle {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.btn-drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-drawer-close:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: var(--accent-rose);
}

.drawer-content {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}

/* Tactile 54px+ Drawer Cards */
.drawer-menu-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-menu-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(0, 240, 255, 0.35);
  transform: translateX(-2px);
}

.menu-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.menu-card-icon.cyan {
  background: rgba(0, 240, 255, 0.12);
  color: var(--accent-cyan);
}

.menu-card-icon.amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.menu-card-icon.purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

.menu-card-body {
  flex: 1;
  min-width: 0;
}

.menu-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.menu-card-title-row strong {
  font-size: 0.88rem;
  color: #fff;
  font-weight: 600;
}

.badge-status-ready {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-weight: 700;
}

.badge-tag-hot {
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  font-weight: 700;
}

.badge-tag-sync {
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  font-weight: 700;
}

.menu-card-desc {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.35;
}

.menu-card-arrow {
  color: var(--text-dim);
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.drawer-menu-card:hover .menu-card-arrow {
  color: var(--accent-cyan);
  transform: translateX(2px);
}

/* Pro Plan Banner in Drawer */
.drawer-pro-card {
  padding: 1.1rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.06) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pro-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pro-card-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fbbf24;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.pro-card-discount {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}

.pro-card-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: #fff;
}

.pro-card-desc {
  font-size: 0.78rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.4;
}

.btn-drawer-pro {
  margin-top: 0.3rem;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
  border: none;
  color: #000;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.btn-drawer-pro:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
}

/* Settings Toggles Group */
.drawer-toggles-group {
  margin-top: 0.4rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drawer-group-heading {
  font-size: 0.74rem;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  font-weight: 700;
  margin: 0 0 0.1rem 0;
}

.toggle-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.toggle-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
}

.toggle-info strong {
  display: block;
  font-size: 0.84rem;
  color: #fff;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.toggle-info p {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.3;
}

.toggle-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

/* iOS/Android Style Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-cyan);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.drawer-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Pricing Modal Grid & Cards */
.modal-dialog-wide {
  max-width: 680px;
}

.pricing-tiers-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .pricing-tiers-grid {
    grid-template-columns: 1fr;
  }
}

.pricing-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

.free-tier-card {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border-subtle);
}

.pro-tier-card {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.06) 0%, rgba(16, 185, 129, 0.04) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.08);
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-xs);
  width: fit-content;
  margin-bottom: 0.6rem;
}

.free-badge {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.pro-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.tier-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.popular-pill {
  background: var(--accent-gradient);
  color: #06090f;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
}

.tier-price-box {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.price-amount {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-pure);
}

.price-period {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.tier-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.tier-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.8rem;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.tier-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.35;
}

.tier-features-list li i {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: var(--accent-cyan);
}

.tier-features-list li.disabled {
  color: var(--text-dim);
  opacity: 0.6;
}

.tier-features-list li.disabled i {
  color: var(--text-dim);
}

.current-tier-chip {
  margin-top: auto;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.45rem;
  border-radius: var(--radius-xs);
}

/* Plan Selector Tab */
.plan-selector-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.plan-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  color: inherit;
  text-align: left;
}

.plan-tab:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.05);
}

.plan-tab.active {
  border-color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.plan-tab-main {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.plan-tab-main strong {
  font-size: 0.85rem;
  color: var(--text-pure);
}

.discount-badge {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-xs);
}

.cancel-badge {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-xs);
}

.plan-tab-price {
  text-align: right;
}

.tab-price-curr {
  font-size: 1rem;
  font-weight: 800;
  color: #fbbf24;
}

.tab-price-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.selected-plan-summary {
  font-size: 0.78rem;
  color: #fbbf24;
  font-weight: 600;
  text-align: center;
  background: rgba(245, 158, 11, 0.08);
  padding: 0.4rem;
  border-radius: var(--radius-xs);
  margin-bottom: 0.75rem;
}

.paypal-container-box {
  margin-top: 0.5rem;
  min-height: 120px;
}

.btn-icon-subtle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.btn-icon-subtle:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-icon-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-card);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
}

.btn-icon-toggle:hover {
  color: var(--text-main);
  border-color: var(--border-card);
}

.btn-icon-toggle.active {
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.3);
}

/* AI Popover */
.ai-popover {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6);
  animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.popover-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.engine-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-input);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent-emerald);
}

.engine-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.engine-name {
  font-size: 0.85rem;
  color: var(--text-pure);
}

.engine-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.badge-mini, .badge-free {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  font-weight: 600;
}

.badge-mini {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.badge-free {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.icon-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
}

/* ==========================================================================
   Voice Recorder Card (Generous Padding & Tech Geometry)
   ========================================================================== */
.recorder-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem 1.75rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card); /* 10px clean tech card */
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Standardized Pill & Filter Tab Chips (100% Unified Design System)
   ========================================================================== */
.pace-chips {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.pace-pill,
.tab-chip {
  height: 38px;
  padding: 0 1.05rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  box-sizing: border-box;
}

.pace-pill:hover,
.tab-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}

.pace-pill.active,
.tab-chip.active {
  background: rgba(0, 240, 255, 0.12) !important;
  border: 1.5px solid #00f0ff !important;
  color: #00f0ff !important;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25) !important;
  font-weight: 700 !important;
}

.record-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.record-hub {
  position: relative;
  width: 100%;
  max-width: 380px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#waveformCanvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 70px;
  pointer-events: none;
  z-index: 1;
}

.record-circle-btn {
  position: relative;
  z-index: 2;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md); /* Modern squircle/tech round */
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.record-circle-btn:active {
  transform: scale(0.92);
}

.btn-glow-ring {
  position: absolute;
  inset: -6px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  opacity: 0.35;
  filter: blur(8px);
  transition: opacity 0.3s ease;
}

.btn-core {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #06090f;
  font-size: 1.7rem;
  box-shadow: var(--shadow-glow);
  transition: var(--transition);
}

.record-hub.recording .btn-glow-ring {
  background: var(--rec-gradient);
  opacity: 0.85;
  filter: blur(12px);
  animation: pulse-ring-anim 1.2s infinite ease-in-out;
}

.record-hub.recording .btn-core {
  background: var(--rec-gradient);
  box-shadow: var(--shadow-rec);
  color: #ffffff;
}

.record-hub.processing .btn-core {
  background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
  color: #ffffff;
}

@keyframes pulse-ring-anim {
  0% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.18); opacity: 0.4; }
  100% { transform: scale(1); opacity: 0.85; }
}

.record-status-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  min-height: 44px;
}

.live-rec-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-xs);
  background: rgba(255, 51, 102, 0.15);
  border: 1px solid rgba(255, 51, 102, 0.3);
  color: #ff3366;
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rec-pulsing-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #ff3366;
  animation: blink-rec 0.9s infinite alternate;
}

@keyframes blink-rec {
  from { opacity: 1; }
  to { opacity: 0.2; }
}

.record-action-hint {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
}

.recorder-sub-actions {
  margin-top: 0.85rem;
}

.btn-text-link {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}

.btn-text-link:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
}

/* ==========================================================================
   Latest Transcribed Memo Highlight
   ========================================================================== */
.latest-memo-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  animation: fadeInUp 0.3s ease;
}

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

.latest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.latest-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   Feed Section: Toolbar, Filter Tabs & Compact Stats
   ========================================================================== */
.feed-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem; /* Generous breathing room */
  padding-top: 0.5rem;
}

.feed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.feed-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tab-count {
  font-size: 0.74rem;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
}

.search-and-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-ico {
  position: absolute;
  left: 0.75rem;
  color: var(--text-dim);
  font-size: 0.8rem;
}

#memoSearchInput {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm); /* Clean 6px rectangle */
  padding: 0.45rem 1.8rem 0.45rem 2rem;
  color: var(--text-main);
  font-size: 0.84rem;
  width: 150px;
  transition: width 0.25s ease, border-color 0.2s ease;
}

#memoSearchInput:focus {
  outline: none;
  border-color: var(--accent-cyan);
  width: 210px;
}

.btn-clear {
  position: absolute;
  right: 0.6rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.75rem;
}

.sort-dropdown {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm); /* Clean 6px rectangle */
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}

.sort-dropdown:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

/* Compact Stats Strip */
.stats-compact-strip {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 0.25rem 0.5rem;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-card-subtle);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
}

.stat-pill-label {
  color: var(--text-dim);
}

.stat-pill-val {
  color: var(--text-main);
  font-weight: 600;
}

.stat-sep {
  opacity: 0.3;
}

/* ==========================================================================
   Memo Cards List & Design (Modern Tech Card Style)
   ========================================================================== */
.memos-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem; /* Better breathing room between memo cards */
}

.loading-state, .empty-feed {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1rem;
  color: var(--text-muted);
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
}

.loading-state i {
  font-size: 1.6rem;
  color: var(--accent-cyan);
}

.empty-feed i {
  font-size: 2.2rem;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

.memo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card); /* 10px clean tech card */
  padding: 1.35rem 1.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.memo-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
}

.memo-card.just-created {
  animation: card-pop 0.6s cubic-bezier(0.16, 1, 0.3, 1), card-glow 3s ease-out;
  border-color: var(--accent-cyan) !important;
}

@keyframes card-pop {
  0% { opacity: 0; transform: translateY(-12px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes card-glow {
  0% { box-shadow: 0 0 25px rgba(0, 240, 255, 0.4); }
  100% { box-shadow: 0 0 0 transparent; }
}

/* Card Header */
.memo-header {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
}

.memo-header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.memo-meta-chips {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.cat-chip {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs); /* 4px rectangular badge */
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.cat-chip.idea { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.cat-chip.work { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.cat-chip.run { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.cat-chip.todo { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

.memo-actions-top {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.memo-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-pure);
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
  margin: 0;
  width: 100%;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  transition: var(--transition);
}

.icon-btn:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
  border-color: var(--border-card);
}

.icon-btn.fav.active {
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.35);
}

.icon-btn.delete:hover {
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.35);
}

/* Card Summary Box */
.memo-summary-box {
  background: rgba(0, 240, 255, 0.04);
  border-left: 3px solid var(--accent-cyan);
  padding: 0.65rem 0.95rem;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  font-size: 0.9rem;
  color: var(--text-main);
  font-weight: 500;
  line-height: 1.5;
}

/* Card Refined Note */
.memo-refined-box {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.refined-note-body {
  font-size: 0.9rem;
  color: #cbd5e1;
  white-space: pre-wrap;
  line-height: 1.6;
}

/* Action Items Checklist */
.action-items-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.025);
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-top: 0.35rem;
}

.action-item-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.action-item-checkbox {
  accent-color: var(--accent-cyan);
  cursor: pointer;
  width: 15px;
  height: 15px;
}

/* Collapsible Raw Voice Accordion */
.raw-speech-accordion {
  border-top: 1px dashed var(--border-subtle);
  padding-top: 0.5rem;
}

.raw-speech-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0;
  transition: var(--transition);
}

.raw-speech-toggle-btn:hover {
  color: var(--text-muted);
}

.raw-speech-content {
  display: none;
  font-size: 0.82rem;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-xs);
  margin-top: 0.45rem;
  line-height: 1.5;
}

.raw-speech-content.open {
  display: block;
}

/* Audio Player */
.memo-audio-player {
  width: 100%;
  height: 34px;
  border-radius: var(--radius-xs);
  margin-top: 0.25rem;
}

/* Card Footer */
.memo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.memo-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.tag-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  color: var(--text-dim);
  font-size: 0.75rem;
}

.memo-bottom-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-card-action {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.btn-card-action:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-card);
}

.btn-card-action.refine:hover {
  color: var(--accent-purple);
  border-color: var(--accent-purple);
}

/* ==========================================================================
   Modals & Dialogs (Fixed Overlays & Tech Geometry)
   ========================================================================== */
.modals-layer {
  position: relative;
  z-index: 99999;
}

.modal-backdrop,
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: var(--bg-overlay) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.25rem;
  z-index: 99999 !important;
}

.modal-backdrop.open,
.modal-overlay.open {
  display: flex !important;
}

.modal-dialog,
.modal-card {
  background: var(--bg-modal);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card); /* 10px clean tech dialog */
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.75);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.35rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-heading,
.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-pure);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close,
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.15rem;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover,
.modal-close-btn:hover {
  color: var(--text-pure);
}

.modal-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.modal-subtext,
.modal-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.preset-group,
.scenario-presets {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.preset-label,
.form-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
}

.preset-chips,
.preset-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.preset-pill,
.preset-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs); /* Clean 4px rectangle */
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 0.55rem 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.preset-pill:hover,
.preset-btn:hover {
  background: var(--bg-card-hover);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.form-row,
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.field-input, .field-select, .field-textarea, .field-file,
.form-input, .form-select, .form-textarea, .form-file-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs); /* Clean 4px rectangle */
  padding: 0.6rem 0.85rem;
  color: var(--text-pure);
  font-family: inherit;
  font-size: 0.88rem;
  transition: border-color 0.2s ease;
}

.field-input:focus, .field-select:focus, .field-textarea:focus,
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.export-options-grid,
.export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.export-tile,
.export-card-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); /* Clean 6px rectangle */
  padding: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  color: inherit;
}

.export-tile i,
.export-card-btn i {
  font-size: 1.3rem;
  color: var(--accent-cyan);
  margin-top: 0.15rem;
}

.export-tile-info strong,
.export-card-btn strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text-pure);
  margin-bottom: 0.2rem;
}

.export-tile-info span,
.export-card-btn span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.export-tile:hover,
.export-card-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
}

.export-tile.highlight {
  border-color: rgba(0, 240, 255, 0.35);
  background: rgba(0, 240, 255, 0.05);
}

.export-tile.highlight:hover {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--accent-cyan);
}

.modal-footer {
  padding: 1rem 1.35rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

.btn-secondary,
.btn-cancel {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.84rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover,
.btn-cancel:hover {
  background: var(--bg-card-hover);
  color: var(--text-pure);
}

.btn-primary {
  background: var(--accent-gradient);
  border: none;
  color: #06090f;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-primary:active {
  transform: scale(0.97);
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: rgba(13, 21, 39, 0.95);
  border: 1px solid var(--border-accent);
  backdrop-filter: blur(10px);
  color: var(--text-pure);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-xs);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.25s ease;
  pointer-events: auto;
}

.toast.error {
  border-color: rgba(244, 63, 94, 0.5);
  color: #fecdd3;
}

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

/* Shortcuts Pill in Header */
.btn-shortcuts-pill {
  height: 38px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0 0.85rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  box-sizing: border-box;
  transition: var(--transition);
}

.btn-shortcuts-pill:hover {
  background: rgba(0, 240, 255, 0.16);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.25);
}

/* Modal Large */
.modal-dialog.modal-lg {
  max-width: 620px;
}

/* Shortcuts Modal Tabbed Guide */
.shortcut-tabs {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-input);
  padding: 0.35rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
}

.shortcut-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 0.55rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: var(--transition);
}

.shortcut-tab-btn:hover {
  color: var(--text-main);
}

.shortcut-tab-btn.active {
  background: var(--bg-card-hover);
  color: var(--accent-cyan);
  border: 1px solid var(--border-accent);
  box-shadow: var(--shadow-sm);
}

.shortcut-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.shortcut-guide-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.05rem;
}

.step-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #06090f;
  font-size: 0.82rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.guide-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.guide-content strong {
  font-size: 0.88rem;
  color: var(--text-pure);
}

.guide-content p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.guide-content code {
  background: rgba(0, 0, 0, 0.4);
  color: var(--accent-cyan);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.76rem;
}

.url-copy-box {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.4rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.3rem 0.4rem 0.3rem 0.75rem;
}

.url-input {
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  font-family: monospace;
  font-size: 0.78rem;
  flex: 1;
  outline: none;
}

.btn-copy-url {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-pure);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition);
}

.btn-copy-url:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Notion Webhook Sync Card */
.webhook-sync-card {
  margin-top: 0.95rem;
  background: rgba(16, 185, 129, 0.04);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.webhook-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.webhook-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--text-pure);
}

.webhook-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
}

.webhook-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
}

.webhook-input-row {
  display: flex;
  gap: 0.45rem;
}

.btn-save-webhook {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-pure);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0 0.85rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-save-webhook:hover {
  background: var(--bg-card-hover);
  border-color: #34d399;
  color: #34d399;
}

.btn-webhook-dispatch {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: var(--transition);
}

.btn-webhook-dispatch:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.25);
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 1.75rem 0 0.5rem 0;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Interactive Action Items */
.action-items-container {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.action-item-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.84rem;
  color: var(--text-main);
  line-height: 1.45;
}

.action-item-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-cyan);
  cursor: pointer;
  margin-top: 0.12rem;
  flex-shrink: 0;
}

/* Category Badge Distinct Colors */
.cat-chip.cat-running {
  background: rgba(0, 240, 255, 0.12) !important;
  color: #00f0ff !important;
  border: 1px solid rgba(0, 240, 255, 0.3) !important;
}

.cat-chip.cat-idea {
  background: rgba(245, 158, 11, 0.14) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

.cat-chip.cat-work {
  background: rgba(129, 140, 248, 0.14) !important;
  color: #a5b4fc !important;
  border: 1px solid rgba(129, 140, 248, 0.35) !important;
}

/* Category Badge Distinct Colors */
.cat-chip.cat-running {
  background: rgba(0, 240, 255, 0.12) !important;
  color: #00f0ff !important;
  border: 1px solid rgba(0, 240, 255, 0.3) !important;
}

.cat-chip.cat-idea {
  background: rgba(245, 158, 11, 0.14) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

.cat-chip.cat-work {
  background: rgba(129, 140, 248, 0.14) !important;
  color: #a5b4fc !important;
  border: 1px solid rgba(129, 140, 248, 0.35) !important;
}

.cat-chip.cat-todo {
  background: rgba(244, 63, 94, 0.14) !important;
  color: #fda4af !important;
  border: 1px solid rgba(244, 63, 94, 0.35) !important;
}

/* ==========================================================================
   Mobile Ergonomics & 2-Row Grid Optimizations (100% At a Glance)
   ========================================================================== */
@media (max-width: 680px) {
  .app-layout {
    padding: 0.65rem 0.65rem 3rem 0.65rem;
    gap: 1.1rem;
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-header {
    padding: 0.6rem 0.5rem;
    gap: 0.5rem;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .logo-badge {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }

  .brand-pill {
    display: none;
  }

  .header-right {
    gap: 0.3rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .header-right::-webkit-scrollbar {
    display: none;
  }

  .ai-status-pill {
    height: 32px;
    padding: 0 0.55rem;
    font-size: 0.72rem;
  }

  .btn-lang-pill,
  .btn-trial-pill,
  .btn-shortcuts-pill,
  .btn-pro-pill,
  .btn-auth-subtle,
  .user-profile-chip {
    height: 32px;
    padding: 0 0.55rem;
    font-size: 0.74rem;
  }

  .btn-icon-subtle,
  .btn-icon-toggle {
    width: 32px;
    height: 32px;
    font-size: 0.82rem;
  }

  /* Hero Recording Hub Section (Main Top Card) */
  .recorder-section {
    padding: 1.25rem 0.95rem 1.15rem 0.95rem;
    border-radius: var(--radius-card);
    width: 100%;
    box-sizing: border-box;
  }

  /* 2x2 Grid for Pace Selection (All 4 Visible in 2 Rows) */
  .pace-chips {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
    width: 100% !important;
    max-width: 440px !important;
    margin: 0 auto !important;
  }

  .pace-pill {
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
    padding: 0.65rem 0.4rem !important;
    font-size: 0.86rem !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
  }

  .record-circle-btn {
    width: 74px;
    height: 74px;
  }

  .btn-core {
    width: 66px;
    height: 66px;
    font-size: 1.55rem;
  }

  /* 3x2 Grid for Feed Filter Tabs (All 6 Visible in 2 Rows) */
  .feed-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.45rem !important;
    width: 100% !important;
  }

  .tab-chip {
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
    padding: 0.55rem 0.25rem !important;
    font-size: 0.8rem !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
  }

  .feed-toolbar {
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
  }

  .search-and-stats {
    display: flex;
    gap: 0.45rem;
    width: 100%;
  }

  .search-input-wrapper {
    flex: 1;
    min-width: 0;
  }

  #memoSearchInput {
    width: 100%;
    box-sizing: border-box;
  }

  .sort-dropdown {
    flex-shrink: 0;
    min-width: 85px;
  }

  .stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    width: 100%;
  }

  .stat-pill {
    padding: 0.45rem 0.3rem;
    font-size: 0.72rem;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
  }

  /* Memo Cards Mobile Optimization (Unified Height & Full-Width No Clipping) */
  .memos-feed {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    width: 100%;
  }

  .memo-card {
    padding: 1.1rem 1.15rem;
    border-radius: 14px;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: break-word;
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.95) 0%, rgba(10, 15, 30, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .memo-header {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
  }

  .memo-header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
  }

  .memo-meta-chips {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
  }

  .memo-actions-top {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
  }

  .memo-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: #ffffff;
    width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .memo-summary-box {
    font-size: 0.86rem;
    padding: 0.65rem 0.85rem;
    line-height: 1.45;
    background: rgba(0, 240, 255, 0.05);
    border-left: 3px solid var(--accent-cyan);
    border-radius: 4px;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .refined-note-body {
    font-size: 0.86rem;
    line-height: 1.55;
    color: #cbd5e1;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .memo-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    width: 100%;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border-subtle);
  }

  .memo-tags {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    width: 100%;
  }

  .memo-bottom-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
  }

  .btn-card-action {
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
    min-height: 36px;
  }

  .export-options-grid,
  .export-grid {
    grid-template-columns: 1fr;
  }
}
