/* Diving Board — Modern Minimalist Stylesheet */

:root {
  --bg-main: #0f1115;
  --card-bg: #15171d;
  --card-hover: #1a1d25;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text-main: #e1e4ea;
  --text-muted: #8b92a5;
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  
  /* User-customizable defaults */
  --favicon-size: 50px;
  --cell-min-width: 150px;
  --card-ratio: 1.618 / 1;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Prevent child flickering during drag */
body.is-dragging .card * {
  pointer-events: none !important;
}

/* Custom Scrollbar for macOS Trackpads */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Top Navigation */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(15, 17, 21, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.brand-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #f3f4f6;
}

/* Category Pill Container */
.category-pill-container {
  display: flex;
  align-items: center;
  background: #181a20;
  padding: 4px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

.cat-pill {
  padding: 5px 18px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cat-pill:hover {
  color: #fff;
}

.cat-pill.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cat-badge {
  font-size: 10px;
  font-family: monospace;
  opacity: 0.7;
}

.btn-add-cat {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-add-cat:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* Buttons */
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
}

.btn-primary {
  background: var(--accent-blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-blue-hover);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
}

.btn-icon {
  padding: 7px;
  background: #181a20;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 8px;
}

.btn-icon:hover {
  color: #fff;
  border-color: var(--border-hover);
}

.icon-svg {
  width: 14px;
  height: 14px;
}

/* Search Box */
.main-container {
  flex: 1;
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 64px 24px;
}

.search-wrapper {
  max-width: 440px;
  margin: 0 auto 32px auto;
}

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

.search-icon {
  position: absolute;
  left: 12px;
  width: 14px;
  height: 14px;
  color: #6b7280;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  background: #14161c;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 9px 40px 9px 34px;
  font-size: 12px;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.search-box input:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.search-box input:focus {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.search-shortcut {
  position: absolute;
  right: 12px;
  font-size: 10px;
  font-family: monospace;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 5px;
  border-radius: 4px;
  color: #9ca3af;
  pointer-events: none;
}

/* Bookmark Grid */
.bookmark-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(var(--cell-min-width), 1fr));
  position: relative;
  min-height: 200px;
}

/* Speed Dial Cards */
.card {
  position: relative;
  aspect-ratio: var(--card-ratio);
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.15s,
              border-color 0.15s,
              box-shadow 0.18s;
}

.card:active {
  cursor: grabbing;
}

.card:hover {
  background: var(--card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.5);
}

/* Dynamic Spotlight Sheen */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: radial-gradient(
    220px circle at var(--mouse-x, -200px) var(--mouse-y, -200px),
    rgba(255, 255, 255, 0.09),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

/* Ambient Brand Glow */
.card-glow {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.card:hover .card-glow {
  opacity: 1;
}

/* Favicon Container */
.card-favicon {
  width: var(--favicon-size);
  height: var(--favicon-size);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  pointer-events: none;
}

.card-favicon svg,
.card-favicon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card:hover .card-favicon {
  transform: scale(1.05);
}

/* Title Label */
.card-label-box {
  margin-top: 8px;
  width: 100%;
  text-align: center;
  padding: 0 4px;
  z-index: 10;
}

.card-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #cbd5e1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.card:hover .card-label {
  color: #fff;
}

.card-input-inline {
  width: 100%;
  background: #111317;
  border: 1px solid var(--accent-blue);
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 11px;
  color: #fff;
  text-align: center;
  outline: none;
}

/* Notification Badge (Dual Action) */
.badge-bubble {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 20;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: var(--accent-blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 9999px;
  border: 1px solid rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.badge-bubble:hover {
  background: #60a5fa;
  transform: scale(1.15);
}

.badge-bubble:active {
  transform: scale(0.92);
}

/* Hover Actions (Edit & Delete) */
.card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0;
  transition: opacity 0.15s;
}

.card:hover .card-actions {
  opacity: 1;
}

.card-action-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #9ca3af;
  border-radius: 4px;
  width: 20px;
  height: 20px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.card-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.card-action-btn.del:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

/* --- Drag & Drop Haptic Feedback and Insertion Indicators --- */
.card.dragging {
  opacity: 0.3 !important;
  transform: scale(0.94) !important;
  border: 1px dashed var(--accent-blue) !important;
  box-shadow: none !important;
}

/* Glowing Neon Vertical Insertion Beam between cards */
.card.drop-before::after,
.card.drop-after::after {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 4px;
  background: var(--accent-blue);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.9), 0 0 3px #93c5fd;
  pointer-events: none;
  z-index: 40;
  animation: beam-pulse 0.6s ease-in-out infinite alternate;
}

/* Placed right in the middle of the 14px grid gutter */
.card.drop-before::after {
  left: -9px;
}

.card.drop-after::after {
  right: -9px;
}

@keyframes beam-pulse {
  from { opacity: 0.75; transform: scaleY(0.94); }
  to { opacity: 1; transform: scaleY(1.02); }
}

/* Subtle tactile shift on target card to reveal slot */
.card.drop-before {
  transform: translateX(4px);
  border-color: rgba(59, 130, 246, 0.4);
}

.card.drop-after {
  transform: translateX(-4px);
  border-color: rgba(59, 130, 246, 0.4);
}

/* Settings Drawer (Scroll-Safe) */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100%;
  background: rgba(21, 23, 30, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid var(--border-subtle);
  z-index: 50;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer.hidden {
  display: none;
}

.drawer-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-title h2 {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.btn-close {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}

.btn-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.setting-label-row label,
.setting-label {
  font-size: 12px;
  font-weight: 500;
  color: #d1d5db;
}

.val-badge {
  font-size: 11px;
  font-family: monospace;
  color: var(--accent-blue);
}

/* Sliders */
input[type=range] {
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-blue);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.6);
}

/* Button Groups */
.button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.grp-btn {
  padding: 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #12141a;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.grp-btn:hover {
  color: #fff;
}

.grp-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.setting-info-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  padding: 10px;
  font-size: 11px;
}

.setting-info-box h4 {
  font-weight: 600;
  color: #93c5fd;
  margin-bottom: 4px;
}

.setting-info-box p {
  color: #cbd5e1;
  line-height: 1.5;
}

.border-top {
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

.drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  background: #111317;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #6b7280;
}

.link-btn {
  background: transparent;
  border: none;
  color: var(--accent-blue);
  font-size: 11px;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 64px 0;
  color: #6b7280;
  font-size: 12px;
}

.empty-state.hidden {
  display: none;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background: #181a20;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 22px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  background: #111317;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: #fff;
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent-blue);
}

.input-hint {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  transition: all 0.2s ease;
}

.input-hint.detecting {
  color: #38bdf8;
}

.input-hint.detected {
  color: #34d399;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 70;
  background: #1c1f26;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.toast-indicator {
  color: #34d399;
  font-weight: bold;
}

.hidden {
  display: none !important;
}

.full-width {
  width: 100%;
}

.text-center {
  text-align: center;
}

.cursor-pointer {
  cursor: pointer;
}

/* Card Custom Context Menu */
.context-menu {
  position: fixed;
  z-index: 100;
  background: rgba(21, 23, 30, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 5px;
  min-width: 175px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: context-pop 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes context-pop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #e2e8f0;
  border-radius: 7px;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: all 0.12s;
}

.context-menu-item:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #fff;
}

.context-menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.context-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 3px 0;
}

/* Mode Switcher Group in Header */
.mode-switcher-group {
  display: flex;
  align-items: center;
  background: #14161d;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  margin-left: 12px;
}

.mode-pill {
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-pill:hover {
  color: #fff;
}

.mode-pill.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Front Page 3-Column Studio Layout */
body.fp-active,
body:has(.frontpage-container:not(.hidden)) {
  overflow: hidden;
  height: 100vh;
}

.frontpage-container {
  flex: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 24px 0 24px;
  display: grid;
  grid-template-columns: 290px minmax(480px, 1fr) 330px;
  gap: 20px;
  height: calc(100vh - 59px);
  max-height: calc(100vh - 59px);
  overflow: hidden;
  align-items: stretch;
}

@media (max-width: 1200px) {
  .frontpage-container {
    grid-template-columns: 250px 1fr 290px;
    gap: 16px;
    padding: 12px 16px 0 16px;
  }
}

/* Desktop: Track is display: contents so 3-column grid works natively */
@media (min-width: 1024px) {
  .fp-carousel-track {
    display: contents;
  }
  .fp-mobile-bottom-nav {
    display: none !important;
  }
}

/* Mobile & Tablet: 3-Panel Swipeable Carousel with One-Hand Ergonomics */
@media (max-width: 1023px) {
  body.fp-active,
  body:has(.frontpage-container:not(.hidden)) {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
  }

  .frontpage-container {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
    max-height: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
    position: relative;
  }

  .fp-carousel-track {
    display: flex;
    width: 300%;
    height: 100%;
    transform: translateX(-33.333333%); /* Panel 1 (Feed) active by default */
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
  }

  .fp-left-rail,
  .fp-center-stream,
  .fp-right-rail {
    width: 33.333333%;
    height: 100%;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 14px 130px 14px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
  }

  /* One-Hand Ergonomics: Panel 0 with generous bottom clearance & smooth scrolling */
  .fp-left-rail {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 12px 14px 160px 14px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .fp-left-rail .fp-box:has(#fp-channel-list),
  .fp-left-rail #fp-channels-box {
    order: 3;
    margin-bottom: 24px;
  }
  .fp-left-rail .fp-box:has(#fp-mini-launch-grid) {
    order: 2;
  }
  .fp-left-rail .fp-box:has(#fp-steering-box) {
    order: 1;
  }

  /* One-Hand Ergonomics: Sticky Reddit Toolbar in lower thumb reach */
  .fp-reddit-toolbar {
    position: sticky;
    bottom: 0;
    z-index: 25;
    background: rgba(16, 22, 38, 0.95);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    margin: 8px 0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  }

  /* One-Hand Ergonomics: Scratchpad in Panel 2 with generous bottom clearance */
  .fp-right-rail {
    display: flex;
    flex-direction: column;
    padding: 12px 14px 150px 14px !important;
  }
  .fp-right-rail #fp-dev-widgets {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: min-content;
    padding-bottom: 30px;
  }
  .fp-right-rail .fp-box:has(#fp-scratchpad),
  .fp-right-rail #fp-scratchpad-box {
    order: 10;
    margin-top: auto;
    margin-bottom: 24px;
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
  }

  /* Mobile Bottom Navigation Bar */
  .fp-mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding-bottom: env(safe-area-inset-bottom, 8px);
    background: rgba(13, 17, 26, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid #1f293d;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
  }

  .fp-mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 16px;
    border-radius: 14px;
    transition: all 0.2s ease;
  }

  .fp-mobile-nav-btn.active {
    color: #818cf8;
    background: rgba(99, 102, 241, 0.16);
  }

  .fp-mobile-nav-btn svg {
    width: 20px;
    height: 20px;
  }

  /* Stream header scrolls naturally with the feed on mobile instead of blocking view */
  .fp-stream-header {
    position: static !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding-top: 4px;
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
  }

  /* Mobile Top Navigation adjustments - Spacious 2-Row Hierarchy */
  .top-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    height: auto;
    min-height: 50px;
    padding: 8px 12px 8px;
    gap: 8px 0;
  }

  .nav-left {
    order: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
  }

  /* Hide redundant icon badge on mobile so mode switcher gets focus */
  .brand-badge {
    display: none;
  }

  .brand-title {
    display: none;
  }

  .mode-switcher-group {
    background: #14171f;
    padding: 3px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 2px;
  }

  .top-nav .mode-pill {
    padding: 5px 11px;
    font-size: 11.5px;
    font-weight: 500;
    border-radius: 9999px;
  }

  .nav-right {
    order: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
  }

  .top-nav #btn-launch-all {
    display: none;
  }

  .nav-right .btn-primary {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
  }

  .nav-right .btn-icon {
    width: 32px;
    height: 32px;
  }

  /* Category Slider takes full 100% width on Row 2 in Launchpad mode */
  .category-pill-container {
    order: 3;
    width: 100%;
    flex: 1 0 100%;
    max-width: 100%;
    margin-top: 4px;
    padding: 4px 6px;
    background: #14171f;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .category-pill-container::-webkit-scrollbar {
    display: none;
  }

  .cat-pill {
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
    border-radius: 9999px;
  }

  .cat-badge {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
  }

  .btn-add-cat {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    font-size: 14px;
    color: #9ca3af;
  }

  /* In Front Page mode on mobile, hide the bookmark category bar so top row is single-line & sleek */
  body.fp-active .category-pill-container {
    display: none !important;
  }

  body.fp-active .top-nav {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
  }

  /* Mobile speed dial adjustments */
  .main-container {
    padding: 16px 12px 64px;
  }

  .search-wrapper {
    margin: 0 auto 16px auto;
  }
}

.fp-title-link {
  color: inherit;
  text-decoration: none;
  display: block;
}
.fp-title-link:hover,
.fp-title-link:focus {
  color: #818cf8;
}

/* 3 Individually Scrolling Columns */
.fp-left-rail,
.fp-center-stream,
.fp-right-rail {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  padding-bottom: 48px;
  -webkit-overflow-scrolling: touch;
}

/* Subtle, sleek column scrollbars */
.fp-left-rail::-webkit-scrollbar,
.fp-center-stream::-webkit-scrollbar,
.fp-right-rail::-webkit-scrollbar {
  width: 5px;
}
.fp-left-rail::-webkit-scrollbar-track,
.fp-center-stream::-webkit-scrollbar-track,
.fp-right-rail::-webkit-scrollbar-track {
  background: transparent;
}
.fp-left-rail::-webkit-scrollbar-thumb,
.fp-center-stream::-webkit-scrollbar-thumb,
.fp-right-rail::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
}
.fp-left-rail::-webkit-scrollbar-thumb:hover,
.fp-center-stream::-webkit-scrollbar-thumb:hover,
.fp-right-rail::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Front Page Boxes & Rails */
.fp-box {
  background: #13161c;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s;
}

.fp-box:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.fp-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 12px;
}

.fp-badge-subtle {
  font-size: 10px;
  color: #64748b;
  text-transform: none;
  font-weight: 500;
  letter-spacing: normal;
}

.fp-badge-purple {
  font-size: 9px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #c084fc;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}

.fp-channel-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fp-channel-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.fp-channel-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
}

.fp-channel-btn.active {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.25);
}

.fp-channel-btn .channel-icon {
  margin-right: 8px;
  font-size: 13px;
}

.fp-channel-btn .channel-name {
  flex: 1;
}

.fp-channel-btn .channel-count {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 999px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.fp-channel-btn.active .channel-count {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

.fp-channel-btn .channel-count.amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

/* Quick Launch Tray in Left Rail */
.fp-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.fp-mini-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  background: #181b22;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  color: #94a3b8;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
}

.fp-mini-tile:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  color: #fff;
}

.fp-mini-tile .mini-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.fp-mini-tile .mini-icon svg {
  width: 18px;
  height: 18px;
}

.fp-mini-tile .mini-label {
  font-size: 9px;
  font-weight: 500;
  max-width: 54px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* AI Steering Box */
.fp-steering-box {
  background: linear-gradient(180deg, #171622 0%, #12141c 100%);
  border-color: rgba(168, 85, 247, 0.2);
}

.fp-hint-text {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 8px;
}

.steering-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
  max-height: 140px;
  overflow-y: auto;
  padding-right: 2px;
}

.steering-tags-container::-webkit-scrollbar {
  width: 4px;
}
.steering-tags-container::-webkit-scrollbar-track {
  background: transparent;
}
.steering-tags-container::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.25);
  border-radius: 9999px;
}

/* Inline Quick Add Steering Bar */
.steering-add-bar {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 10px;
  animation: fadeIn 0.15s ease-out;
}

.steering-add-bar.hidden {
  display: none;
}

.steering-input-wrapper {
  margin-bottom: 6px;
}

.steering-topic-input {
  width: 100%;
  background: #11141a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
  color: #fff;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}

.steering-topic-input:focus {
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.15);
}

.steering-btn-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-steer-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-steer-action.boost {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
}
.btn-steer-action.boost:hover {
  background: rgba(168, 85, 247, 0.35);
  color: #fff;
}

.btn-steer-action.penalty {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
.btn-steer-action.penalty:hover {
  background: rgba(239, 68, 68, 0.28);
  color: #fff;
}

.btn-steer-action.cancel {
  flex: 0 0 auto;
  padding: 4px 8px;
  background: transparent;
  color: #64748b;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.btn-steer-action.cancel:hover {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
}

.steering-tag-add {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(168, 85, 247, 0.4);
  color: #c084fc;
  cursor: pointer;
  transition: all 0.15s ease;
}

.steering-tag-add:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.6);
  color: #fff;
}

.steering-tag {
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.steering-tag.boost {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.28);
  color: #d8b4fe;
}

.steering-tag.penalty {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #fca5a5;
}

.steering-tag .tag-remove {
  cursor: pointer;
  opacity: 0.6;
  font-weight: bold;
}
.steering-tag .tag-remove:hover {
  opacity: 1;
}

.steering-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
}

/* Center Stream */
.fp-center-stream {
  min-width: 0;
}

.fp-stream-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 17, 21, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.fp-stream-title {
  font-size: 16px;
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.fp-stream-subtitle {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.fp-articles-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fp-article-card {
  background: #13161c;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px 18px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.fp-article-card:hover {
  background: #171a22;
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.fp-article-card.high-match {
  border-color: rgba(168, 85, 247, 0.25);
}

.fp-article-card.high-match:hover {
  border-color: rgba(168, 85, 247, 0.45);
}

.fp-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  margin-bottom: 6px;
}

.fp-source-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.fp-source-badge.arxiv {
  background: rgba(185, 28, 28, 0.2);
  border: 1px solid rgba(185, 28, 28, 0.35);
  color: #f87171;
}

.fp-source-badge.reddit {
  background: rgba(234, 88, 12, 0.2);
  border: 1px solid rgba(234, 88, 12, 0.35);
  color: #fb923c;
}

.fp-source-badge.marktechpost {
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(37, 99, 235, 0.35);
  color: #60a5fa;
}

.fp-source-badge.hackernews {
  background: rgba(217, 119, 6, 0.2);
  border: 1px solid rgba(217, 119, 6, 0.35);
  color: #fbbf24;
}

/* Reddit Feed Specific Badges */
.fp-reddit-score {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: normal;
}

.fp-reddit-score.score-hot {
  background: rgba(249, 115, 22, 0.22);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.4);
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.15);
}

.fp-reddit-score.score-warm {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.fp-reddit-score.score-low {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.fp-reddit-comments {
  font-size: 10px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.fp-reddit-flair {
  font-size: 9px;
  font-weight: 500;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fp-reddit-domain {
  font-size: 10px;
  color: #38bdf8;
  text-decoration: none;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
}

.fp-reddit-domain:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
}

/* Reddit Channel Sub-Toolbar */
.fp-reddit-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  animation: fadeIn 0.15s ease-out;
}

.reddit-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.reddit-pill-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reddit-pill-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.reddit-pill-btn.active {
  background: rgba(249, 115, 22, 0.18);
  border-color: rgba(249, 115, 22, 0.4);
  color: #fdba74;
}

.reddit-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.reddit-toggle-label input[type="checkbox"] {
  accent-color: #f97316;
  cursor: pointer;
}

.fp-card-time {
  color: #64748b;
  font-size: 11px;
}

.fp-match-badge {
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #c084fc;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.fp-article-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.4;
  margin-bottom: 6px;
  cursor: pointer;
  transition: color 0.15s;
}

.fp-article-title:hover {
  color: #60a5fa;
}

.fp-article-snippet {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.fp-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 10px;
  margin-top: 6px;
}

.fp-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.fp-action-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.15);
}

.fp-action-btn.obsidian:hover {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.08);
}

.fp-action-btn.saved,
.fp-action-btn.save:hover {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}

.fp-steer-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.fp-steer-label {
  font-size: 10px;
  color: #64748b;
  margin-right: 2px;
}

.fp-steer-btn {
  background: transparent;
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 12px;
  transition: transform 0.12s, background 0.12s;
}

.fp-steer-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.15);
}

/* Right Rail Contextual Widgets */
.fp-right-rail {
  min-width: 0;
}

.fp-textarea {
  width: 100%;
  background: #171a22;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  font-family: inherit;
  color: #e2e8f0;
  resize: vertical;
  outline: none;
  line-height: 1.45;
  transition: border-color 0.2s;
}

.fp-textarea:focus {
  border-color: rgba(59, 130, 246, 0.5);
}

.fp-scratchpad-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

/* Kanban Board in Right Rail */
.kanban-columns-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kanban-col-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kanban-col-header {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-count {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 999px;
  color: #94a3b8;
}

.kanban-task-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kanban-card {
  background: #171b23;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11.5px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.kanban-card:hover {
  background: #1c202a;
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(2px);
}

.kanban-tag {
  font-size: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 1px 5px;
  border-radius: 4px;
}

.kanban-tag.dev {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.kanban-tag.ml {
  background: rgba(168, 85, 247, 0.15);
  color: #d8b4fe;
}

.kanban-tag.agent {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.kanban-card-delete {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.15s;
}

.kanban-card:hover .kanban-card-delete {
  opacity: 1;
}

.kanban-card-delete:hover {
  color: #ef4444;
}

/* Local Health Check */
.health-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.health-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.health-name {
  color: #94a3b8;
}

.health-status {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  color: #34d399;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.health-status.offline {
  color: #ef4444;
}

.health-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* D2L Brightspace Radar */
.d2l-assignments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.d2l-due-group-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 4px;
  margin-bottom: 2px;
}

.d2l-due-group-title.urgent {
  color: #f87171;
}

.d2l-due-group-title.upcoming {
  color: #94a3b8;
}

.d2l-card {
  background: #171b23;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 8px 10px;
  transition: all 0.15s ease;
}

.d2l-card.urgent {
  background: #1a151b;
  border-color: rgba(239, 68, 68, 0.3);
}

.d2l-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.d2l-card-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.35;
}

.d2l-card-urgency {
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.d2l-card.urgent .d2l-card-urgency {
  color: #f87171;
}

.d2l-card-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #64748b;
}

/* Settings inputs */
.setting-text-input {
  width: 100%;
  background: #111317;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  color: #fff;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}

.setting-text-input:focus {
  border-color: var(--accent-blue);
}

.setting-hint {
  display: block;
  font-size: 10px;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.4;
}

/* Inline Card Dispatch Panel (Obsidian Agent Bridge) */
.fp-dispatch-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: dispatch-slide-down 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dispatch-slide-down {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fp-dispatch-panel.hidden {
  display: none;
}

.fp-dispatch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  color: #94a3b8;
}

.fp-dispatch-header .panel-title {
  font-weight: 600;
  color: #34d399;
  display: flex;
  align-items: center;
  gap: 4px;
}

.fp-tag-chips-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.fp-tag-chip {
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.12s;
  user-select: none;
}

.fp-tag-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

.fp-tag-chip.selected {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.45);
  color: #d8b4fe;
  font-weight: 600;
}

.fp-dispatch-input {
  width: 100%;
  background: #101217;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11.5px;
  font-family: inherit;
  color: #f1f5f9;
  resize: vertical;
  min-height: 52px;
  outline: none;
  line-height: 1.4;
  transition: border-color 0.15s;
}

.fp-dispatch-input:focus {
  border-color: rgba(52, 211, 153, 0.5);
}

.fp-dispatch-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fp-dispatch-actions-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fp-shortcut-hint {
  font-size: 10px;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.fp-btn-dispatch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #34d399;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.fp-btn-dispatch:hover {
  background: rgba(52, 211, 153, 0.25);
  border-color: rgba(52, 211, 153, 0.5);
  color: #fff;
}

.fp-btn-cancel-foldout {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
}

.fp-btn-cancel-foldout:hover {
  color: #94a3b8;
}

/* Feed Management Modal */
.feed-modal-card {
  max-width: 680px;
  width: 92%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.feed-modal-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-tab-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
}

.modal-tab-btn.active {
  background: rgba(168, 85, 247, 0.15);
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.35);
}

.modal-tab-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.feed-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.feed-search-input {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: #f1f5f9;
  flex: 1;
  max-width: 280px;
  outline: none;
}

.feed-search-input:focus {
  border-color: rgba(168, 85, 247, 0.5);
}

.feed-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.active-feeds-scroll {
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.active-feeds-scroll::-webkit-scrollbar {
  width: 5px;
}

.active-feeds-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.feed-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  gap: 10px;
  transition: all 0.15s ease;
}

.feed-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.feed-row.disabled {
  opacity: 0.5;
}

.feed-row-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.feed-row-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feed-row-title {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.feed-badge.ai { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.feed-badge.research { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.feed-badge.dev { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.feed-badge.news { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.feed-badge.reddit { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.feed-row-url {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.feed-row-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.feed-toggle-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #94a3b8;
  cursor: pointer;
}

.feed-toggle-label input[type="checkbox"] {
  cursor: pointer;
  accent-color: #a855f7;
}

.btn-delete-feed {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-delete-feed:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.checkbox-group {
  margin-top: 4px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #f1f5f9;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  cursor: pointer;
  accent-color: #10b981;
}
