:root {
  --bg: #060a10; --bg2: #0c1218; --bg3: #141c26; --bg4: #1c2836;
  --fg: #c0daf0; --fg2: #6a8ca8; --fg3: #3a5a72;
  --accent: #00e5ff; --accent2: #00b8d4; --green: #00e676; --red: #ff3d5a;
  --yellow: #ffab00; --purple: #b388ff; --orange: #ff9100;
  --border: #1a2e40; --radius: 10px;
  --primary: #00e5ff; --bg1: #0c1218;
  --glow-accent: rgba(0, 229, 255, 0.4);
  --glow-accent-subtle: rgba(0, 229, 255, 0.12);
  --bg-recessed: #040810;
  --bg-elevated: #0e1620;
  --border-glow: rgba(0, 229, 255, 0.15);
  --border-recessed: #0e1a28;
  --border-elevated: rgba(0, 229, 255, 0.25);
  --scanline: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 229, 255, 0.015) 2px,
    rgba(0, 229, 255, 0.015) 4px
  );
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', 'Courier New', monospace;
  background: var(--bg); color: var(--fg); line-height: 1.5; min-height: 100vh;
  background-image: var(--scanline); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-shadow: 0 0 8px var(--glow-accent); }
button { font-family: inherit; cursor: pointer; border: 1px solid var(--border);
  background: var(--bg3); color: var(--fg); padding: 6px 14px; border-radius: var(--radius);
  font-size: 13px; transition: all 0.2s; text-transform: uppercase; letter-spacing: 0.5px; }
button:hover { background: var(--bg4); border-color: var(--accent); box-shadow: 0 0 8px rgba(0, 229, 255, 0.15), inset 0 0 8px rgba(0, 229, 255, 0.05); }
button.primary { background: rgba(0, 229, 255, 0.15); border-color: var(--accent); color: var(--accent);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.2), inset 0 0 6px rgba(0, 229, 255, 0.05); }
button.primary:hover { background: rgba(0, 229, 255, 0.25); box-shadow: 0 0 12px rgba(0, 229, 255, 0.35), inset 0 0 12px rgba(0, 229, 255, 0.1); }
button.danger { background: rgba(255, 61, 90, 0.15); border-color: var(--red); color: var(--red);
  box-shadow: 0 0 6px rgba(255, 61, 90, 0.15); }
button.danger:hover { background: rgba(255, 61, 90, 0.25); box-shadow: 0 0 12px rgba(255, 61, 90, 0.3); }
button.sm { padding: 3px 8px; font-size: 11px; letter-spacing: 0.3px; }
input, textarea, select {
  font-family: 'Inter', monospace; background: var(--bg); color: var(--fg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 10px; font-size: 13px; width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.2), inset 0 0 4px rgba(0, 229, 255, 0.05); }
/* Custom checkbox styling */
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg);
  cursor: pointer; padding: 6px 12px; border-radius: var(--radius); background: var(--bg2);
  border: 1px solid var(--border); transition: all 0.2s; user-select: none; }
.checkbox-label:hover { background: var(--bg3); border-color: var(--accent); box-shadow: 0 0 6px rgba(0, 229, 255, 0.1); }
.checkbox-label input[type="checkbox"] { appearance: none; width: 18px; height: 18px; border: 2px solid var(--border);
  border-radius: 2px; cursor: pointer; position: relative; transition: all 0.2s; flex-shrink: 0;
  background: var(--bg); }
.checkbox-label input[type="checkbox"]:hover { border-color: var(--accent); box-shadow: 0 0 4px rgba(0, 229, 255, 0.2); }
.checkbox-label input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.4); }
.checkbox-label input[type="checkbox"]:checked::after { content: '✓'; position: absolute; top: 50%;
  left: 50%; transform: translate(-50%, -50%); color: var(--bg); font-size: 12px; font-weight: bold; }
.checkbox-label.subtle { background: transparent; border: none; padding: 4px 6px; font-size: 12px;
  color: var(--fg2); gap: 5px; }
.checkbox-label.subtle:hover { background: transparent; border: none; color: var(--fg); }
.checkbox-label.subtle input[type="checkbox"] { width: 14px; height: 14px; border-width: 1.5px; }
.checkbox-label.subtle input[type="checkbox"]:checked::after { font-size: 10px; }
button.icon-btn { padding: 3px 6px; font-size: 16px; line-height: 1; border: none; background: transparent;
  color: var(--fg2); cursor: pointer; border-radius: var(--radius); text-transform: none; letter-spacing: 0; }
button.icon-btn:hover { background: var(--bg3); color: var(--accent); text-shadow: 0 0 6px var(--glow-accent); }
.add-task-btn { display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;margin-left:10px;padding:0;
  border:1.5px solid var(--border);border-radius:4px;background:transparent;color:var(--fg2);cursor:pointer;
  overflow:visible;transition:all .2s ease; }
.add-task-btn svg { display:block;flex-shrink:0; }
.add-task-btn:hover { background:rgba(0, 229, 255, 0.15);border-color:var(--accent);color:var(--accent);transform:scale(1.08);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.3); }
.add-task-btn:active { transform:scale(0.95); }
.like-btn { background: none; border: none; cursor: pointer; padding: 4px; display: flex; align-items: center; flex-shrink: 0; }
.like-btn:disabled { cursor: default; opacity: 0.7; }
.hp-add-btn { opacity: 0.3; transition: opacity 0.15s; }
.hp-add-btn:hover { opacity: 0.7; }
@keyframes like-btn-spin { to { transform: rotate(360deg); } }
.like-btn .spin-icon { animation: like-btn-spin 0.7s linear infinite; }

/* Pill toggle styling */
.pill-container { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-toggle { display: inline-flex; align-items: center; padding: 0 6px; border-radius: 4px;
  font-size: 11px; line-height: 18px; height: 22px; cursor: pointer; user-select: none; transition: all 0.2s;
  background: transparent; border: 1px solid var(--border); color: var(--fg2); text-transform: uppercase; letter-spacing: 0.3px; }
.pill-toggle:hover { background: var(--bg2); border-color: var(--fg3); }
.pill-toggle.selected { background: rgba(0, 229, 255, 0.1); border-color: var(--accent); color: var(--accent); font-weight: 500;
  box-shadow: 0 0 4px rgba(0, 229, 255, 0.15); }
.pill-toggle.selected:hover { background: rgba(0, 229, 255, 0.15); }
textarea { resize: vertical; min-height: 80px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236a8ca8' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
label { font-size: 12px; color: var(--fg2); display: block; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.row { display: flex; gap: 10px; align-items: center; }
.col { display: flex; flex-direction: column; gap: 8px; }
.gap-sm { gap: 6px; }
.flex-1 { flex: 1; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--fg2); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-accent { color: var(--accent); }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.p-3 { padding: 12px; }
.hidden { display: none !important; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px; }
.badge-green { background: rgba(0, 230, 118, 0.12); color: var(--green); border: 1px solid rgba(0, 230, 118, 0.2); }
.badge-yellow { background: rgba(255, 171, 0, 0.12); color: var(--yellow); border: 1px solid rgba(255, 171, 0, 0.2); }
.badge-blue { background: rgba(0, 229, 255, 0.12); color: var(--accent); border: 1px solid rgba(0, 229, 255, 0.2); }
.card { background: linear-gradient(135deg, var(--bg2) 0%, color-mix(in srgb, var(--bg2) 85%, var(--bg3)) 100%);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent); border-radius: 12px; padding: 16px;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.05); transition: all 0.2s; }
.card:hover { border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 8px rgba(0, 229, 255, 0.08); }

/* Research tab */
.research-card { background: linear-gradient(135deg, var(--bg2) 0%, color-mix(in srgb, var(--bg2) 85%, var(--bg3)) 100%);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent); border-radius: var(--radius);
  padding: 12px 14px; cursor: pointer; transition: all 0.2s; margin-bottom: 6px; }
.research-card:hover { border-color: var(--accent); background: var(--bg3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 8px rgba(0, 229, 255, 0.1); }
.research-card.selected { border-color: var(--accent); background: rgba(0, 229, 255, 0.06);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.15); }
.individual-day-card { cursor: pointer; transition: border-color 0.2s, background 0.2s, box-shadow 0.2s; }
.individual-day-card:hover { border-color: var(--accent); background: var(--bg3);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.1); }
.individual-day-card.selected { border-color: var(--accent); background: rgba(0, 229, 255, 0.06);
  border-top: 2px solid var(--accent); box-shadow: 0 0 12px rgba(0, 229, 255, 0.15); }
.research-card .rc-name { font-size: 13px; font-weight: 600; color: var(--fg); margin-bottom: 4px; }
.research-card .rc-meta { font-size: 11px; color: var(--fg2); display: flex; flex-wrap: wrap; gap: 8px; }
.research-card .rc-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.research-card .rc-pill { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 10px;
  background: rgba(0, 229, 255, 0.08); color: var(--accent); border: 1px solid rgba(0, 229, 255, 0.2);
  text-transform: uppercase; letter-spacing: 0.3px; }
.research-detail-meta { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px; margin: 0 0 8px 0;
  background: var(--bg); border-radius: var(--radius); font-size: 11px; color: var(--fg2);
  border: 1px solid var(--border); }
.research-detail-meta span { display: flex; align-items: center; gap: 4px; }
button[title="Research"] { padding: 8px 6px; }

/* Per-task token badge */
.task-token-badge { font-family: 'Oxanium', monospace; font-size: 11px; color: var(--yellow); font-weight: 600;
  white-space: nowrap; letter-spacing: 0.03em; padding: 1px 6px; background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.2); border-radius: 8px; flex-shrink: 0; }

.task-token-badge.earned { color: var(--green); background: rgba(76, 175, 80, 0.08);
  border-color: rgba(76, 175, 80, 0.2); }

/* Per-task score points badge */
.task-score-area { display: flex; align-items: center; justify-content: flex-end; width: 40px; flex-shrink: 0; }
.task-score-badge { font-family: 'Oxanium', monospace; font-size: 12px; color: var(--yellow); font-weight: 700;
  white-space: nowrap; letter-spacing: 0.04em; padding: 2px 8px; background: rgba(255, 215, 0, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.18); border-radius: 10px; flex-shrink: 0;
  opacity: 0; transition: opacity 0.15s; }
.task-item:hover .task-score-badge { opacity: 1; }
.task-score-badge.earned { color: var(--green); background: rgba(76, 175, 80, 0.10);
  border-color: rgba(76, 175, 80, 0.25); text-decoration: none; }
.task-score-badge.earned.partial { color: var(--yellow); background: rgba(255, 215, 0, 0.10);
  border-color: rgba(255, 215, 0, 0.22); }

/* Schedule header score total */
.schedule-score-total { font-family: 'Oxanium', monospace; font-size: 14px; color: var(--fg3);
  margin-left: 10px; font-weight: 600; letter-spacing: 0.03em; }
.schedule-score-total.mid { color: var(--yellow); }
.schedule-score-total.high { color: var(--green); }
.schedule-score-possible { font-weight: 400; opacity: 0.5; font-size: 12px; }

/* Tagged friend badges on task cards */
.task-friends-group { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; margin-left: 2px; }
.task-friend-tag { width: 18px; height: 18px; border-radius: 50%; background: rgba(100, 180, 255, 0.15);
  border: 1px solid rgba(100, 180, 255, 0.3); color: var(--accent); font-size: 10px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.task-split-label { font-family: 'Oxanium', monospace; font-size: 9px; color: var(--fg3);
  margin-left: 2px; white-space: nowrap; }

/* Quick-add task popover */
.quick-add-popover {
  position: absolute; z-index: 100; top: 100%; right: 0; margin-top: 4px;
  background: var(--bg2); border: 1px solid var(--border-elevated); border-radius: var(--radius);
  padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: calc(100% - 16px); left: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 8px var(--glow-accent-subtle);
}
.quick-add-popover input[type="text"], .quick-add-popover input:not([type]) {
  flex: 2; min-width: 0; font-size: 13px;
  padding: 6px 10px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; color: var(--fg);
}
.quick-add-popover input[type="date"] {
  font-size: 12px; padding: 5px 6px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; color: var(--fg); width: 130px;
}

/* Inline task action buttons (edit/delete) — visible on hover */
.task-item-actions { display: flex; gap: 2px; flex-shrink: 0; opacity: 0; transition: opacity 0.15s; }
.task-item:hover .task-item-actions { opacity: 1; }
.task-action-btn { background: none; border: none; cursor: pointer; color: var(--fg3); padding: 2px 4px;
  border-radius: 4px; transition: all 0.15s; display: flex; align-items: center; }
.task-action-btn:hover { color: var(--fg); background: var(--bg2); }
.task-action-btn.task-action-delete:hover { color: var(--red); }

.postpone-popup { z-index: 9999; background: var(--bg1); border: 1px solid var(--bg3); border-radius: 8px; padding: 4px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.postpone-popup button { background: none; border: none; color: var(--fg); padding: 6px 14px; cursor: pointer; border-radius: 6px; font-size: 12px; text-align: left; white-space: nowrap; }
.postpone-popup button:hover { background: var(--bg2); }

/* Complete check button — hidden until hover, shown in task actions row */
.task-complete-check { width: 18px; height: 18px; min-width: 18px; border: 2px solid var(--border); border-radius: 5px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer;
  transition: all 0.2s ease; opacity: 0; }
.task-complete-check svg { opacity: 0; transition: opacity 0.15s; }
.task-item:hover .task-complete-check { opacity: 1; }
.task-complete-check:hover { border-color: var(--green); background: rgba(0, 230, 118, 0.1); box-shadow: 0 0 6px rgba(0, 230, 118, 0.15); }
.task-complete-check:hover svg { opacity: 0.4; }
.task-complete-check.checked { opacity: 1; background: var(--green); border-color: var(--green); box-shadow: 0 0 6px rgba(0, 230, 118, 0.3); }
.task-complete-check.checked svg { opacity: 1; color: var(--bg); }
.task-complete-check.small { width: 16px; height: 16px; min-width: 16px; border-width: 1.5px; border-radius: 4px; }
.task-complete-check.small svg { width: 10px; height: 10px; }

/* Loading overlay */
#loadingOverlay {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  opacity: 1; transition: opacity 0.5s ease;
}
#loadingOverlay.fade-out { opacity: 0; pointer-events: none; }
.loading-content {
  display: flex; flex-direction: column; align-items: center; gap: 32px;
}
.loading-orbit-wrap {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
}
.loading-brand-bottom {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  position: relative; z-index: 1;
}
.loading-orbit {
  position: absolute; bottom: -8px; left: 0; right: 0; height: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.loading-orbit::after {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 40%; height: 100%;
  background: rgba(255, 255, 255, 0.6);
  animation: loadingSlide 1.4s ease-in-out infinite;
}
@keyframes loadingSlide {
  0% { left: 0; }
  50% { left: 60%; }
  100% { left: 0; }
}
/* Header avatar (2-letter initials) */
.header-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-family: 'Oxanium', monospace;
  font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
  color: #fff;
  text-transform: uppercase;
  transition: border-color 0.2s, background 0.2s;
}
.header-avatar:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
}
.header-avatar-sm {
  width: 24px; height: 24px; font-size: 9px;
}
.header-avatar.refreshing {
  animation: spin 1.2s linear infinite;
  border-color: var(--accent, #4a9eff);
}
.schedule-menu-item.refreshing-content .refresh-content-icon {
  animation: spin 1s linear infinite;
}
.schedule-menu-item.refreshing-content { opacity: 0.6; cursor: default; }
.daybook-refresh-btn:hover { color: var(--fg) !important; }
.daybook-refresh-btn.refreshing-content .refresh-content-icon { animation: spin 1s linear infinite; }
.daybook-refresh-btn.refreshing-content { opacity: 0.6; cursor: default; }

/* Auth */
#authPage { display: flex; align-items: center; justify-content: center; height: 100vh; position: relative; overflow: hidden; }
#authPage canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.auth-box { position: relative; z-index: 1; }
.auth-box { width: 360px; border: 1px solid var(--border); box-shadow: 0 0 30px rgba(0, 229, 255, 0.1), 0 0 60px rgba(0, 229, 255, 0.03); }
.auth-box h1 { font-family: 'Oxanium', monospace; font-size: 28px; margin-bottom: 4px; text-align: center;
  text-shadow: 0 0 10px var(--glow-accent); }
.auth-box p { color: var(--fg2); text-align: center; margin-bottom: 24px; font-size: 13px;
  text-transform: uppercase; letter-spacing: 1px; }
.auth-box .col { gap: 12px; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 20px; }
.auth-tabs button { flex: 1; border-radius: 0; border-bottom: 2px solid var(--border); background: transparent; padding: 10px; }
.auth-tabs button.active { border-bottom-color: var(--accent); color: var(--accent);
  text-shadow: 0 0 8px var(--glow-accent); }
#authError { color: var(--red); font-size: 12px; min-height: 18px; text-align: center;
  text-shadow: 0 0 6px rgba(255, 61, 90, 0.3); }

/* App Layout */
#appPage { display: none; flex-direction: column; height: 100vh; overflow: hidden; position: relative; }
#appParticles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: 0.4; }
#appPage > *:not(#appParticles):not(.app-header) { position: relative; z-index: 1; }
#appPage > .app-header { position: relative; z-index: 10; }
.app-header { background: linear-gradient(180deg, #0a1420 0%, var(--bg2) 100%);
  border-bottom: 1px solid var(--border-elevated); padding: 8px 20px;
  display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 100;
  box-shadow: 0 1px 6px rgba(0, 229, 255, 0.05); }
.app-header .left { display: flex; align-items: center; gap: 8px; }
.header-center { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; }
/* Chart header group */
.chart-header-group { display: flex; align-items: center; gap: 4px; user-select: none; -webkit-user-select: none; }
.chart-toggle-btn { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 6px 10px;
  border-radius: var(--radius); transition: all 0.2s; border: 1px solid transparent; }
.chart-toggle-btn:hover { background: var(--bg3); border-color: var(--border);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.1); }
.chart-toggle-icon { color: var(--fg3); transition: color 0.2s; }
.chart-toggle-btn:hover .chart-toggle-icon { color: var(--accent); }
.chart-toggle-caret { font-size: 11px; color: var(--fg3); transition: transform 0.2s, color 0.2s; display: inline-block; }
.chart-toggle-btn:hover .chart-toggle-caret { color: var(--accent); }
.app-header .logo { font-family: 'Oxanium', monospace; font-size: 18px; font-weight: 700; color: var(--accent); }
.app-header .user-info { font-size: 13px; color: var(--fg2); }
.app-header .right { display: flex; align-items: center; gap: 12px; }
.token-badge { display: flex; align-items: center; gap: 4px; padding: 4px 12px;
  background: rgba(255, 171, 0, 0.1); border: 1px solid rgba(255, 171, 0, 0.2); border-radius: 4px;
  font-size: 13px; font-weight: 600; color: var(--yellow); cursor: pointer;
  box-shadow: 0 0 6px rgba(255, 171, 0, 0.1); font-family: 'Oxanium', monospace; }
.readiness-badge { padding: 4px 12px; border-radius: 4px; font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: 'Oxanium', monospace; }

/* User Menu */
.user-menu { position: relative; }
.user-menu .header-sphere-wrap { cursor: pointer; }
.user-dropdown { position: absolute; top: calc(100% + 4px); right: 0; background: var(--bg2);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; min-width: 160px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4); opacity: 0; visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s; z-index: 200; pointer-events: none; }
.user-dropdown::before { content: ''; position: absolute; top: -8px; right: 0; left: 0; height: 8px; }
.user-menu:hover .user-dropdown { opacity: 1; visibility: visible; pointer-events: auto; }
.user-dropdown-header { padding: 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 2px; }
.user-dropdown-username { font-family: 'Oxanium', monospace; font-size: 13px; font-weight: 600; color: var(--fg); }
.user-dropdown-item { padding: 7px 10px; cursor: pointer; border-radius: var(--radius); font-size: 13px;
  display: flex; align-items: center; gap: 8px; transition: background 0.15s; color: var(--fg2); }
.user-dropdown-item svg { color: var(--fg3); flex-shrink: 0; }
.user-dropdown-item:hover { background: var(--bg3); }
.user-dropdown-item:hover svg { color: var(--fg2); }


/* Auth page brand */
.auth-brand {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
  margin: 0 auto 4px;
}
.auth-brand-main {
  font-family: 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 200;
  letter-spacing: 5px;
  text-transform: lowercase;
  color: #4a4a4a;
}

.app-header { flex-shrink: 0; }

/* Main content */
.main { padding: 0 8px 0; max-width: 100%; margin: 0; width: 100%; box-sizing: border-box;
  display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
/* Plan tab is always active — single view */
#tab-plan { display: flex; flex-direction: column; overflow: hidden; flex: 1; min-height: 0; position: relative; }

/* Main layout — column: panels row fills available space */
#mainLayout { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; padding: 0 2px; }
#panelsRow { display: flex; gap: 4px; flex: 1; min-height: 0; overflow: hidden; }
#tabContentColumn { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-recessed); border-right: 1px solid rgba(255,255,255,0.35); position: relative;
  --fg: #e0e0e0; --fg2: #999; --fg3: #666;
  --bg: #000; --bg1: #000; --bg2: #050505; --bg3: #0a0a0a; --bg4: #0f0f0f;
  --bg-elevated: #000; --bg-recessed: #000;
  --border: #252525; --border-recessed: #1a1a1a;
  --border-elevated: rgba(255,255,255,0.08); --border-glow: rgba(255,255,255,0.05);
  --accent: #00e5ff; --accent2: #00b8d4; --primary: #00e5ff;
  --green: #00e676; --red: #ff3d5a; --yellow: #ffab00;
}
#tabContentColumn::after { content: ''; position: absolute; top: 0; bottom: 0; right: -1px; width: 1px;
  background: rgba(255,255,255,0.35); pointer-events: none; z-index: 3; }

/* ═══ Schedule panel — editorial style ═══ */
#tab-plan .detail-header {
  background: #000;
  border-bottom: none;
  box-shadow: none;
  overflow: visible;
}
#tab-plan .detail-header::before { content: ''; position: absolute; bottom: 0; left: 0; right: 4px;
  height: 1px; background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 30%, rgba(255,255,255,0.6) 70%, transparent 100%); }
#tab-plan .detail-header::after { display: none; }
#tab-plan .task-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 14px;
  color: #fff;
  letter-spacing: 0.04em;
  font-weight: 700;
  text-transform: uppercase;
  background: none;
  border: none;
  border-top: 1px solid #2a2a2a;
  border-radius: 0;
  padding: 14px 4px 8px;
  margin: 0;
}
#tab-plan .task-section-title:first-child { border-top: none; }
#tab-plan .task-section-title:hover {
  color: #fff; background: none; border-color: #333; text-shadow: none;
}
#tab-plan .task-section-title .collapse-icon { color: #555; }
#tab-plan .goal-section-header {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 14px;
  color: #fff;
  letter-spacing: 0.04em;
  font-weight: 700;
  text-transform: uppercase;
  background: none;
  border: none;
  border-top: 1px solid #2a2a2a;
  border-radius: 0;
  padding: 14px 4px 8px;
  margin: 0;
}
#tab-plan .goal-section-header:first-child { border-top: none; }
#tab-plan .task-item {
  background: linear-gradient(135deg, rgba(255,255,255,0.015) 0%, transparent 100%);
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  border-radius: 6px;
  padding: 10px 8px 10px 10px;
  margin-bottom: 2px;
  border-left: 3px solid rgba(0, 229, 255, 0.3);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
#tab-plan .task-item.done, #tab-plan .task-item.cal-past {
  border-left-color: rgba(255,255,255,0.05);
  opacity: 0.3;
  background: transparent;
}
#tab-plan .task-item:last-child { border-bottom: none; }
#tab-plan .task-item:hover {
  border-color: rgba(255,255,255,0.04);
  border-left-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.05);
  transform: none;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.03) 0%, rgba(255,255,255,0.02) 100%);
}
#tab-plan .task-item.active {
  border-left-color: rgba(0, 229, 255, 0.6);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.06);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.04) 0%, rgba(255,255,255,0.02) 100%);
}
#tab-plan .task-meta-row {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 11px;
  color: #666;
  gap: 8px;
}
#tab-plan .task-title-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}
#tab-plan .task-title-desc .name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 13.5px;
  font-weight: 400;
  color: #eaeaea;
  display: inline;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  letter-spacing: 0.01em;
}
#tab-plan .task-desc {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 12.5px;
  color: #666;
  font-weight: 300;
}
#tab-plan .task-item.done .name { color: #555; }
#tab-plan .task-item.done .task-desc { color: #444; }
#tab-plan .task-item .meta { color: #666; font-family: 'Source Serif 4', Georgia, serif; }
#tab-plan .task-item .tokens { color: #777; text-shadow: none; }
#tab-plan .task-item .check { border-color: #333; border-radius: 4px; }
#tab-plan .task-token-badge {
  background: rgba(255,215,0,0.04); border-color: rgba(255,215,0,0.12);
  font-family: 'Source Serif 4', Georgia, serif; font-weight: 400;
}
#tab-plan .task-score-badge {
  font-family: 'Source Serif 4', Georgia, serif; font-weight: 500;
}
#tab-plan .left-panel-tabs {
  display: none;
}
#tab-plan .dvt-btn.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
#tab-plan .now-marker-time { font-family: 'Source Serif 4', Georgia, serif; }
#tab-plan .timeline-hour-label { font-family: 'Source Serif 4', Georgia, serif; }
#tab-plan .task-section-content.drag-over {
  background: rgba(255,255,255,0.02); border-radius: 0;
  outline-color: #555;
}

#rightColumn { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; margin: 0 8px 0 0; }
#workspacePanel { flex: 1; display: flex; flex-direction: column; border: 1px solid var(--border-elevated);
  border-left: none; border-top: none; position: relative;
  border-radius: 0 14px 14px 0; background: var(--bg-elevated); overflow: hidden; min-width: 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  z-index: 2;
  /* Cyan accent matching schedule panel */
  --accent: #00e5ff; --accent2: #00b8d4; --primary: #00e5ff;
  --fg: #e0e0e0; --fg2: #999; --fg3: #666;
  --bg: #000; --bg1: #000; --bg2: #050505; --bg3: #0a0a0a; --bg4: #0f0f0f;
  --bg-elevated: #000; --bg-recessed: #000;
  --border: #252525; --border-recessed: #1a1a1a;
  --border-elevated: rgba(255, 255, 255, 0.08); --border-glow: rgba(255, 255, 255, 0.05);
  --glow-accent: rgba(0, 229, 255, 0.3); --glow-accent-subtle: rgba(0, 229, 255, 0.12);
}
.workspace-header { padding: 14px 16px; height: 46px;
  border-bottom: none;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  position: relative;
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.09) 0%, rgba(0, 229, 255, 0.02) 100%);
  box-shadow: 0 2px 12px rgba(0,0,0,0.7);
  z-index: 10; }
.workspace-header::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 229, 255, 0.3) 30%, rgba(0, 229, 255, 0.3) 70%, transparent 100%); }
/* Settings modal */
.settings-modal { background: var(--bg2); border: 1px solid var(--border-elevated); border-radius: var(--radius);
  width: min(92vw, 780px); height: 85vh; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.08), 0 8px 40px rgba(0,0,0,0.5); }
.settings-modal-header { display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border-elevated); flex-shrink: 0;
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.03) 0%, transparent 100%); }
.settings-modal-body { flex: 1; overflow-y: auto; padding: 16px 20px; }

/* Tasks list (plan tab content) */
.tasks-layout { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: row; }
.tasks-list-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; padding-left: 12px; padding-right: 12px; background: var(--bg-recessed); }
#taskList { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; padding-right: 4px; scroll-behavior: smooth;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent; }
#taskList::-webkit-scrollbar { width: 3px; }
#taskList::-webkit-scrollbar-track { background: transparent; }
#taskList::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
#taskList::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* Task item inner layout */
.task-item-inner { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; width: 0; overflow: hidden; cursor: pointer; }
.task-item-row { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; }
.task-note-text { font-size: 11px; color: var(--fg2); padding: 4px 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; min-width: 0; width: 100%; }
.task-url-text { font-size: 11px; padding: 2px 0; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; width: 100%; }

/* Left panel filter tabs (mirrors right-panel-tabs) */
.left-panel-tabs {
  display: flex;
  flex-direction: column;
  width: 36px;
  flex-shrink: 0;
  border-right: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  background: var(--bg);
  padding: 6px 2px;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  border-radius: 12px 0 0 12px;
}
.left-panel-tabs::-webkit-scrollbar { display: none; }
.left-panel-tabs .lpt-btn {
  width: 32px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg3);
  position: relative;
  transition: all 0.15s;
  flex-shrink: 0;
  border-radius: 8px;
  padding: 0;
  text-transform: none;
  letter-spacing: 0;
}
.left-panel-tabs .lpt-btn svg { display: block; }
.left-panel-tabs .lpt-btn:hover {
  color: var(--fg);
  background: var(--bg2);
}
.left-panel-tabs .lpt-btn.active {
  color: var(--accent);
  background: rgba(0, 229, 255, 0.08);
  box-shadow: inset -2px 0 0 var(--accent);
}
.left-panel-tabs .lpt-sep {
  height: 1px;
  margin: 4px 7px;
  background: var(--border);
  flex-shrink: 0;
}

/* Threads layout (workspace content + filter tabs) */
.threads-layout {
  flex: 1;
  display: flex;
  flex-direction: row;
  min-height: 0;
  overflow: hidden;
}
.threads-filter-tabs {
  display: flex;
  flex-direction: column;
  width: 36px;
  flex-shrink: 0;
  padding: 8px 2px;
  align-items: center;
  gap: 2px;
  overflow-y: auto;
  scrollbar-width: none;
}
.threads-filter-tabs::-webkit-scrollbar { display: none; }
.threads-filter-tabs .nft-btn {
  width: 32px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg3);
  position: relative;
  transition: all 0.15s;
  flex-shrink: 0;
  border-radius: 8px;
  padding: 0;
  text-transform: none;
  letter-spacing: 0;
}
.threads-filter-tabs .nft-btn svg { display: block; }
.threads-filter-tabs .nft-btn:hover {
  color: var(--fg);
  background: var(--bg2);
}
.threads-filter-tabs .nft-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 2px 0 0 #fff;
}
.threads-filter-tabs .nft-btn.dvt.active {
  color: var(--fg);
  background: var(--bg2);
  box-shadow: none;
}
.threads-filter-tabs .nft-sep {
  height: 1px;
  margin: 4px 7px;
  background: var(--border);
  flex-shrink: 0;
}

/* Right sidebar column (filter tabs + user menu) */
.threads-sidebar-col {
  display: flex; flex-direction: column; width: 52px; flex-shrink: 0;
}
.threads-sidebar-col .threads-filter-tabs {
  flex: 1; width: 100%;
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 0; gap: 2px;
  border-left: 1px solid var(--border);
}
.dv-sidebar-btn {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border: none; border-radius: 8px;
  background: transparent; color: #bbb;
  cursor: pointer; transition: background 0.15s, color 0.15s;
}
.dv-sidebar-btn svg { width: 28px; height: 28px; stroke-width: 1.8; }
.dv-sidebar-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
.dv-sidebar-btn.active { background: rgba(255,255,255,0.12); color: #fff; }
.dv-sidebar-sep {
  width: 24px; height: 1px;
  background: var(--border); margin: 6px 0;
}

/* Sidebar user menu (bottom of left panel) */
.sidebar-user-menu {
  position: absolute; bottom: 0; left: 0;
  display: flex; align-items: center;
  padding: 4px;
  z-index: 10;
}
.sidebar-avatar-wrap { position: relative; }
.sidebar-avatar-wrap .header-avatar { width: 40px; height: 40px; font-size: 14px; }
.sidebar-user-dropdown {
  position: absolute; bottom: calc(100% + 6px); left: 0;
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 4px; min-width: 160px; box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  opacity: 0; visibility: hidden; transition: opacity 0.15s, visibility 0.15s;
  z-index: 200; pointer-events: none;
}
.sidebar-user-dropdown::after {
  content: ''; position: absolute; bottom: -8px; right: 0; left: 0; height: 8px;
}
.sidebar-avatar-wrap:hover .sidebar-user-dropdown { opacity: 1; visibility: visible; pointer-events: auto; }

.rpt-tooltip {
  position: fixed;
  pointer-events: none;
  background: var(--bg2);
  color: var(--fg);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 9999;
}
.rpt-tooltip.visible { opacity: 1; }

/* Friends split layout */
.friends-layout { display: flex; gap: 0; }
.friends-list-pane { flex: 1; min-width: 0; padding-right: 0; }
.friends-layout.detail-open .friends-list-pane { flex: 1.4; padding-right: 16px; }
.friends-layout.detail-open #activityDetail { display: flex; flex: 0.8; }

/* Task List */
.task-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding-top: 6px; }
.task-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px;
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  background: linear-gradient(135deg, var(--bg2) 0%, color-mix(in srgb, var(--bg2) 85%, var(--bg3)) 100%);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-radius: 12px;
  margin-bottom: 6px; transition: all 0.2s; overflow: hidden; }
.task-item:hover { border-color: var(--task-hover-color, var(--accent));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 8px rgba(0, 229, 255, 0.06);
  transform: translateY(-1px); }
.task-item.active { border-color: var(--task-hover-color, var(--accent));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 12px rgba(0, 229, 255, 0.1); }
.task-item .check { margin-top: 2px; }
.task-item.done, .task-item.cal-past { opacity: 0.4; }
.task-item .check { width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer;
  transition: all 0.2s ease; }
.task-item.done .check, .task-item.completing .check { background: var(--green); border-color: var(--green);
  box-shadow: 0 0 6px rgba(0, 230, 118, 0.3); }
.task-item .check::after { content: ''; transition: transform 0.2s ease, opacity 0.2s ease; transform: scale(0); opacity: 0; }
.task-item.done .check::after, .task-item.completing .check::after { content: '\2713'; color: var(--bg); font-size: 12px; transform: scale(1); opacity: 1; }
.task-item.completing { transition: opacity 0.3s ease 0.35s; opacity: 0.5; }
.task-item.deleting { transition: opacity 0.2s ease, transform 0.2s ease; opacity: 0; transform: translateX(30px); pointer-events: none; }
.task-item .info { flex: 1; min-width: 0; }
.task-item .name { font-size: 13.5px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.01em; }
.task-item.done .name { text-decoration: line-through; color: var(--fg3); }
.task-item .meta { font-size: 11px; color: var(--fg2); font-weight: 200; display: flex; gap: 8px; flex-wrap: wrap; }
.task-item .tokens { font-family: 'Oxanium', monospace; font-size: 11px; color: var(--yellow); font-weight: 300; white-space: nowrap; letter-spacing: 0.03em;
  text-shadow: 0 0 4px rgba(255, 171, 0, 0.2); }
.task-section-title { font-family: 'Oxanium', monospace; font-size: 11px; color: var(--fg2); text-transform: uppercase; letter-spacing: 2px; font-weight: 700;
  margin: 20px 0 10px; padding: 8px 12px; border-bottom: none;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.04) 0%, transparent 100%);
  border-radius: 10px; border: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  cursor: pointer; user-select: none; display: flex; align-items: center; gap: 8px; transition: all 0.2s; overflow: visible; }
.task-section-title:first-child { margin-top: 6px; }
.task-section-title:hover { color: var(--accent); background: linear-gradient(135deg, rgba(0, 229, 255, 0.08) 0%, transparent 100%);
  border-color: rgba(0, 229, 255, 0.15); text-shadow: 0 0 6px var(--glow-accent-subtle); }
.task-section-title .collapse-icon { font-size: 10px; transition: transform 0.2s; color: var(--fg3); }
.task-section-title.collapsed .collapse-icon { transform: rotate(-90deg); }
.task-section-content { overflow: hidden; transition: max-height 0.3s ease-out, opacity 0.2s ease-out; }
.task-section-content.collapsed { max-height: 0 !important; opacity: 0; }
.goal-section-header { font-family: 'Oxanium', monospace; font-size: 11px; color: var(--fg2); text-transform: uppercase; letter-spacing: 2px; font-weight: 700;
  margin: 20px 0 6px; padding: 8px 12px; display: flex; align-items: center; gap: 8px; }
.goal-section-header:first-child { margin-top: 6px; }
.now-marker { display: flex; align-items: center; margin: 4px 0; gap: 8px; }
.now-marker::before { content: ''; flex: 1; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent); opacity: 0.6; }
.now-marker-time { font-family: 'Oxanium', monospace; font-size: 10px; color: var(--accent); opacity: 0.8; font-weight: 400; letter-spacing: 1px; white-space: nowrap;
  text-shadow: 0 0 6px var(--glow-accent); }
.task-item[draggable="true"] { cursor: grab; }
.task-item.dragging { opacity: 0.4; }
.task-section-content.drag-over { background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 12px; outline: 2px dashed var(--accent); outline-offset: -2px; }

/* Timeline view */
.timeline-container { display: flex; flex-direction: column; }
.timeline-unscheduled { margin-bottom: 8px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.timeline-hour {
  display: flex; align-items: flex-start; min-height: 48px; position: relative;
  border-top: 1px solid rgba(255,255,255,0.03);
}
.timeline-hour-empty { min-height: 32px; }
.timeline-hour-current {
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.06) 0%, rgba(0, 229, 255, 0.02) 100%);
  border-left: 2px solid rgba(0, 229, 255, 0.5);
}
.timeline-hour-current .timeline-hour-label { color: var(--accent); font-weight: 600; text-shadow: 0 0 8px rgba(0, 229, 255, 0.3); }
.timeline-hour-label {
  font-family: 'Oxanium', monospace;
  width: 44px; flex-shrink: 0; font-size: 10px; color: var(--fg3); font-weight: 400;
  letter-spacing: 0.05em; padding: 4px 8px 0 0; text-align: right; user-select: none;
}
.timeline-hour-tasks { flex: 1; min-height: 24px; padding: 2px 0; }
.timeline-hour.drag-over { background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 12px; outline: 2px dashed var(--accent); outline-offset: -2px; }
.timeline-now-marker {
  position: absolute; left: 44px; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 60%, transparent 100%);
  opacity: 0.7; pointer-events: none; z-index: 2;
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.3);
}
.timeline-now-marker .now-marker-time {
  font-family: 'Oxanium', monospace;
  position: absolute; top: -8px; right: 4px;
  font-size: 9px; color: var(--accent); opacity: 0.9; font-weight: 400; letter-spacing: 1px;
  text-shadow: 0 0 4px var(--glow-accent);
}
/* Schedule inline meetup/news items */
.schedule-item-meetup { border-left: 3px solid rgba(249,115,22,0.5); }
.schedule-item-news { border-left: 3px solid rgba(56,189,248,0.4); }

.subtask-children { overflow: hidden; transition: max-height 0.25s ease-out, opacity 0.2s ease-out; }
.subtask-children.collapsed { max-height: 0 !important; opacity: 0; }
.subtask-toggle { background:var(--bg2);border:1px solid var(--border);border-radius:8px;padding:2px 8px 2px 4px;cursor:pointer;line-height:1;display:inline-flex;align-items:center;gap:3px;font-size:10px;color:var(--fg2);white-space:nowrap; }
.subtask-toggle:hover { background:var(--bg3);color:var(--accent);border-color:var(--accent); }
.subtask-toggle svg { transition:transform 0.2s; }
.subtask-toggle.collapsed svg { transform: rotate(-90deg); }
.collapsible-header { cursor: pointer; user-select: none; display: flex; align-items: center; gap: 8px; }
.collapsible-header .collapse-icon { font-size: 10px; transition: transform 0.2s; color: var(--fg3); }
.collapsible-header.collapsed .collapse-icon { transform: rotate(-90deg); }
.advanced-section { background: rgba(0, 229, 255, 0.02); border: 1px solid var(--border); border-radius: var(--radius); padding: 0; margin-bottom: 10px; }
.advanced-section:first-child { padding-top: 0; }
.advanced-section:last-child { margin-bottom: 0; }
.advanced-section .collapsible-header { padding: 14px 18px; border-radius: var(--radius); transition: background 0.2s; }
.advanced-section .collapsible-header:hover { background: rgba(0, 229, 255, 0.04); }
.advanced-section .collapsible-content { padding: 0 18px 14px; }


/* ═══ Context Feed Type Filter Pills ═══ */
.cf-type-bar {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  flex-wrap: wrap;
}
.cf-type-pill {
  font-family: 'Oxanium', monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg3);
  cursor: pointer;
  transition: all 0.15s;
}
.cf-type-pill:hover {
  color: var(--pill-color, var(--accent));
  border-color: var(--pill-color, var(--accent));
}
.cf-type-pill.active {
  color: var(--pill-color, var(--accent));
  border-color: var(--pill-color, var(--accent));
  background: rgba(0, 229, 255, 0.08);
  text-shadow: 0 0 6px var(--glow-accent-subtle);
}

/* ═══ Feed Story Cards (Instagram/TikTok style) ═══ */
.feed-story-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  min-height: 340px;
  background-color: var(--bg2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.feed-story-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 229, 255, 0.08);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}
.feed-story-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 32px rgba(0, 229, 255, 0.15);
}
/* Ken Burns animated background image layer */
.feed-story-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
}
.feed-story-bg.kenburns-0 { animation: kenburns-a 21.5s ease-in-out infinite; }
.feed-story-bg.kenburns-1 { animation: kenburns-b 25.5s ease-in-out infinite; }
.feed-story-bg.kenburns-2 { animation: kenburns-c 19s ease-in-out infinite; }
@keyframes kenburns-a {
  0%   { transform: scale(1) translate(0, 0); }
  50%  { transform: scale(1.08) translate(-1%, -0.5%); }
  100% { transform: scale(1) translate(0, 0); }
}
@keyframes kenburns-b {
  0%   { transform: scale(1.05) translate(1%, 0.5%); }
  50%  { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.05) translate(1%, 0.5%); }
}
@keyframes kenburns-c {
  0%   { transform: scale(1) translate(0, 0); }
  50%  { transform: scale(1.06) translate(0.5%, -1%); }
  100% { transform: scale(1) translate(0, 0); }
}
.feed-story-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13, 17, 23, 0.15) 0%,
    rgba(13, 17, 23, 0.3) 30%,
    rgba(13, 17, 23, 0.75) 60%,
    rgba(13, 17, 23, 0.95) 100%
  );
  pointer-events: none;
}
.feed-story-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: 20px;
}
.feed-story-content.has-image {
  color: #e6edf3;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.feed-story-date {
  font-family: 'Oxanium', monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.7;
}
.feed-story-content.has-image .feed-story-date {
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.feed-story-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 8px 0;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.feed-story-content.has-image .feed-story-title {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.feed-story-narrative {
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 12px 0;
  letter-spacing: -0.01em;
}
.feed-story-content.has-image .feed-story-narrative {
  color: rgba(255, 255, 255, 0.92);
}
.feed-story-insight {
  margin: 0 0 14px 0;
  padding: 10px 0;
  border-top: 2px solid var(--accent);
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.85;
}
.feed-story-content.has-image .feed-story-insight {
  border-top-color: rgba(0, 229, 255, 0.6);
  color: rgba(255, 255, 255, 0.8);
}
.feed-story-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.feed-story-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  background: color-mix(in srgb, var(--pill-color) 12%, transparent);
  color: var(--pill-color);
  border: 1px solid color-mix(in srgb, var(--pill-color) 25%, transparent);
  backdrop-filter: blur(4px);
}
.feed-story-metrics {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.feed-story-card:not(:has(.feed-story-bg)) .feed-story-metrics {
  border-top-color: var(--border);
}
.feed-story-metric {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  opacity: 0.7;
}
.feed-story-toggle {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font-size: 12px;
}
.feed-story-content.has-image .feed-story-toggle {
  text-shadow: none;
}
.feed-story-tasks {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.feed-story-card:not(:has(.feed-story-bg)) .feed-story-tasks {
  border-top-color: var(--border);
}
.feed-story-task {
  padding: 5px 0;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.feed-story-task-link {
  cursor: pointer;
}
.feed-story-task-link span {
  text-decoration: underline;
  text-decoration-color: rgba(0,229,255,0.4);
  text-underline-offset: 2px;
}
.feed-story-task-link:hover span {
  text-decoration-color: var(--accent);
  color: var(--accent) !important;
  opacity: 1 !important;
}

/* Feed masthead banner */
.feed-masthead {
  width: 100%;
  height: 120px;
  border-radius: 12px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.feed-masthead-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
  animation: kenburns-a 28.5s ease-in-out infinite;
}
.feed-masthead.feed-masthead-no-image {
  height: auto;
  min-height: 32px;
  background: var(--bg2, #161b22);
}
.feed-masthead.feed-masthead-no-image::before { display: none; }
.feed-masthead.feed-masthead-no-image .feed-masthead-overlay {
  position: relative;
  padding: 6px 12px;
}
.feed-masthead.feed-masthead-no-image .feed-masthead-updated {
  position: relative;
  bottom: auto;
  left: auto;
  padding: 4px 12px 6px;
  text-shadow: none;
  color: var(--fg3, #666);
}
.feed-masthead::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13, 17, 23, 0.55) 0%,
    rgba(13, 17, 23, 0.1) 60%,
    rgba(13, 17, 23, 0.25) 100%
  );
  z-index: 1;
}
.feed-masthead-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 16px;
}
.feed-masthead-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.feed-masthead-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.feed-masthead-nav .mh-arrow {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 16px;
  line-height: 1;
}
.feed-masthead-nav .mh-arrow:hover { color: #fff; }
.feed-masthead-nav .mh-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.2s;
}
.feed-masthead-nav .mh-dot.active {
  background: #fff;
}
.feed-masthead-updated {
  position: absolute;
  bottom: 6px;
  left: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: rgba(255,255,255,0.55);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  letter-spacing: 0.02em;
}
.feed-masthead-updated:hover { color: rgba(255,255,255,0.85); }
.feed-masthead-refresh-btn {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.feed-masthead-refresh-btn:hover { color: #fff; }
.feed-masthead-refresh-btn.refreshing svg { animation: spin 1s linear infinite; }

/* Feed sections (multi-select right panel) */
.feed-section { }
.feed-section + .feed-section { border-top: 2px solid var(--border); }
.feed-section-header {
  font-family: 'Oxanium', monospace;
  font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase;
  letter-spacing: 1.5px; padding: 10px 16px 4px; background: var(--bg);
  text-shadow: 0 0 6px var(--glow-accent-subtle);
}
.feed-sub-header {
  font-family: 'Oxanium', monospace;
  font-size: 12px; font-weight: 600; color: var(--fg2); padding: 12px 16px 4px;
  margin: 0; text-transform: uppercase; letter-spacing: 1px;
}

/* Panel collapse button */
.panel-collapse-btn { background: none; border: none; color: var(--fg3);
  padding: 2px; display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all 0.2s; border-radius: 4px; text-transform: none; letter-spacing: 0; }
.panel-collapse-btn:hover { color: var(--accent); background: rgba(0, 229, 255, 0.08);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.1); }

/* Header add (+) button — sits inline next to panel titles */
.header-add-btn { background: none; border: 1px solid var(--border); color: var(--fg2);
  width: 22px; height: 22px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 5px; cursor: pointer; transition: all 0.2s;
  text-transform: none; letter-spacing: 0; flex-shrink: 0; }
.header-add-btn:hover { color: var(--accent); border-color: var(--accent);
  background: rgba(0, 229, 255, 0.12);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.25); }

/* Note/Agent mode picker */
.chat-mode-picker { position: relative; flex-shrink: 0; }
.chat-mode-trigger { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px 4px 6px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--bg2);
  color: var(--fg2); font-size: 11px; cursor: pointer; white-space: nowrap;
  transition: all 0.2s; text-transform: none; letter-spacing: 0; box-sizing: border-box; height: 28px; }
.chat-mode-trigger:hover { border-color: var(--accent); color: var(--fg);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.12); }
.chat-mode-trigger.active { border-color: var(--accent); color: var(--accent);
  background: rgba(0, 229, 255, 0.08); box-shadow: 0 0 8px rgba(0, 229, 255, 0.15); }
.chat-mode-icon { font-size: 13px; line-height: 1; display: inline-flex; align-items: center; }
.chat-mode-icon svg, .mode-opt-icon svg { display: block; }
.chat-mode-label { max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
.chat-mode-caret { transition: transform 0.2s; flex-shrink: 0; opacity: 0.5; }
.chat-mode-trigger.active .chat-mode-caret { transform: rotate(180deg); opacity: 1; }
.chat-mode-dropdown { position: absolute; bottom: calc(100% + 6px); left: 0; min-width: 180px;
  background: var(--bg2); border: 1px solid var(--border-elevated); border-radius: var(--radius);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.5), 0 0 12px rgba(0, 229, 255, 0.06);
  z-index: 50; max-height: 240px; overflow-y: auto; padding: 4px 0; }
.chat-mode-dropdown .mode-group-label { font-family: 'Oxanium', monospace; padding: 4px 10px 2px;
  font-size: 9px; color: var(--accent); text-transform: uppercase; letter-spacing: 1.2px; opacity: 0.7; }
.chat-mode-dropdown .mode-option { display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; cursor: pointer; font-size: 12px; color: var(--fg2);
  transition: all 0.15s; border-left: 2px solid transparent; }
.chat-mode-dropdown .mode-option:hover { background: var(--bg3); color: var(--fg);
  border-left-color: var(--accent); }
.chat-mode-dropdown .mode-option.selected { color: var(--accent); background: rgba(0, 229, 255, 0.06);
  border-left-color: var(--accent); }
.chat-mode-dropdown .mode-option .mode-opt-icon { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.chat-mode-dropdown .mode-option .mode-opt-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Agent checklist in room creation popover */
.agent-checklist { display: flex; flex-wrap: wrap; gap: 4px; max-height: 140px; overflow-y: auto;
  padding: 4px 0; width: 100%; }
.agent-checklist label { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--fg2);
  cursor: pointer; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); white-space: nowrap; transition: all 0.2s; user-select: none; }
.agent-checklist label:hover { border-color: var(--fg3); color: var(--fg);
  background: var(--bg2); }
.agent-checklist label.checked { border-color: var(--accent); color: var(--accent);
  background: rgba(0, 229, 255, 0.08); box-shadow: 0 0 6px rgba(0, 229, 255, 0.12); }
.agent-checklist input[type="checkbox"] { appearance: none; width: 12px; height: 12px; border: 1.5px solid var(--border);
  border-radius: 2px; cursor: pointer; position: relative; transition: all 0.2s;
  background: var(--bg); flex-shrink: 0; margin: 0; }
.agent-checklist input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 4px rgba(0, 229, 255, 0.4); }
.agent-checklist input[type="checkbox"]:checked::after { content: '✓'; position: absolute; top: 50%;
  left: 50%; transform: translate(-50%, -50%); color: var(--bg); font-size: 8px; font-weight: bold; }

/* Left panel (Day Plan) — collapsible */
#tabContentColumn { transition: flex 0.2s ease, min-width 0.2s ease, opacity 0.2s ease; }
#tabContentColumn.collapsed { flex: 0; min-width: 0; max-width: 0; opacity: 0; border: none; overflow: hidden; margin: 0; padding: 0; }
#tabContentColumn.collapsed::after { display: none; }

/* Goals column (right panel) — collapsible */
#goalsColumn { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-recessed); border-left: 1px solid rgba(255,255,255,0.35); position: relative;
  --fg: #e0e0e0; --fg2: #999; --fg3: #666;
  --bg: #000; --bg1: #000; --bg2: #050505; --bg3: #0a0a0a; --bg4: #0f0f0f;
  --bg-elevated: #000; --bg-recessed: #000;
  --border: #252525; --border-recessed: #1a1a1a;
  --border-elevated: rgba(255,255,255,0.08); --border-glow: rgba(255,255,255,0.05);
  --accent: #00e5ff; --accent2: #00b8d4; --primary: #00e5ff;
  --green: #00e676; --red: #ff3d5a; --yellow: #ffab00;
  transition: flex 0.2s ease, min-width 0.2s ease, opacity 0.2s ease;
}
#goalsColumn::before { content: ''; position: absolute; top: 0; bottom: 0; left: -1px; width: 1px;
  background: rgba(255,255,255,0.35); pointer-events: none; z-index: 3; }
#goalsColumn.collapsed { flex: 0; min-width: 0; max-width: 0; opacity: 0; border: none; overflow: hidden; margin: 0; padding: 0; }
#goalsColumn.collapsed::before { display: none; }
.goals-header {
  background: #000;
  border-bottom: none;
  box-shadow: none;
  overflow: visible;
}
.goals-header::before { content: ''; position: absolute; bottom: 0; left: 4px; right: 0;
  height: 1px; background: #fff; }
.goals-header::after { display: none; }
.rp-dynamic-controls {
  display: flex;
  gap: 14px;
  padding: 6px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}
.rp-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.rp-toggle input { display: none; }
.rp-toggle-slider {
  width: 28px;
  height: 14px;
  background: var(--bg3);
  border-radius: 7px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.rp-toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  background: var(--fg2);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.rp-toggle input:checked + .rp-toggle-slider {
  background: rgba(0,229,255,0.3);
}
.rp-toggle input:checked + .rp-toggle-slider::after {
  transform: translateX(14px);
  background: var(--cyan, #00e5ff);
}
.rp-toggle-label {
  font-size: 11px;
  color: var(--fg2);
  letter-spacing: 0.02em;
}
#rightPanelChat .chat-msg { font-size: 13px; }
#rightPanelChat .chat-input-row { background: var(--bg2); }
#rightPanelChat .chat-input-row textarea { font-size: 13px; background: var(--bg); color: var(--fg); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; }
#rightPanelChat .chat-mode-picker { flex-shrink: 0; }

/* Activity Detail */
#activityDetail { display: none; flex: 1; min-width: 0;
  background: var(--bg2); border: 1px solid var(--border-elevated); border-radius: 14px;
  flex-direction: column; overflow: hidden; height: 100%;
  box-shadow: 0 0 12px var(--glow-accent-subtle); }

.detail-header { padding: 14px 16px; height: 46px;
  display: flex; align-items: center; justify-content: center; position: relative;
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.06) 0%, rgba(0, 229, 255, 0.015) 100%);
  border-bottom: 1px solid #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  z-index: 1; }
.detail-header.schedule-header::after { display: none; }
.detail-header::after { content: ''; position: absolute; bottom: 0; left: 36px; top: 0;
  border-right: 1px solid color-mix(in srgb, var(--border) 50%, transparent); }
/* Schedule hamburger menu */
.schedule-menu-dropdown {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: #111; border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
  padding: 8px; min-width: 180px; z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}
.schedule-menu-dropdown.hidden { display: none; }
.schedule-menu-section { padding: 4px 0; }
.schedule-menu-label {
  font-family: 'Oxanium', monospace; font-size: 10px; color: #666;
  text-transform: uppercase; letter-spacing: 1px; padding: 0 8px 4px; display: block;
}
.schedule-menu-row { display: flex; align-items: center; gap: 2px; padding: 0 4px; }
.schedule-menu-row .lpt-btn {
  width: 30px; height: 26px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: var(--fg3);
  position: relative; transition: all 0.15s; flex-shrink: 0; border-radius: 6px;
  padding: 0; text-transform: none; letter-spacing: 0;
}
.schedule-menu-row .lpt-btn svg { display: block; }
.schedule-menu-row .lpt-btn:hover { color: var(--fg); background: rgba(255,255,255,0.08); }
.schedule-menu-row .lpt-btn.active { color: #fff; background: rgba(255,255,255,0.1); }
.schedule-menu-row .lpt-sep { width: 1px; height: 16px; margin: 0 3px; background: rgba(255,255,255,0.1); flex-shrink: 0; }
.schedule-menu-row .dvt-btn { border-radius: 6px; }
.schedule-menu-row .dvt-btn.active { color: #fff; background: rgba(255,255,255,0.1); }
.schedule-menu-sep { height: 1px; background: rgba(255,255,255,0.08); margin: 4px 8px; }
.schedule-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px;
  background: none; border: none; color: var(--fg3); font-size: 12px; cursor: pointer;
  border-radius: 6px; transition: all 0.15s; text-transform: none; letter-spacing: 0;
}
.schedule-menu-item:hover { color: var(--fg); background: rgba(255,255,255,0.08); }
.detail-body { flex: 1; overflow: hidden; padding: 16px; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.detail-body:has(.daybook-columns) { padding: 4px 0 0; }
.detail-body:has(.hp-container) { padding: 4px 0 0; }
.detail-body:has(.hp-stories-wrap) { padding: 0; }
.detail-body .chat-messages:has(.hp-stories-wrap) { margin-bottom: 0; gap: 0; overflow: hidden; }
.detail-body:has(.longform-stream) { padding: 0; }
.detail-body .section { margin-bottom: 16px; flex-shrink: 0; }
.detail-body .section-title { font-family: 'Oxanium', monospace; font-size: 11px; color: var(--fg2); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 6px; }
.detail-body .chat-messages { flex: 1; min-height: 0; overflow-y: auto; margin-bottom: 24px; }
.detail-body .chat-messages:has(.daybook-columns) { margin-bottom: 0; }
.detail-body .chat-messages:has(.hp-container) { margin-bottom: 0; }
.detail-body .chat-input-row { flex-shrink: 0; }

/* Chat */
.chat-messages { display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto; position: relative; }
.chat-msg { max-width: 85%; padding: 7px 16px; border-radius: var(--radius); font-size: 13px; line-height: 1.5; position: relative; }
.chat-msg.user { align-self: flex-end; background: rgba(0, 229, 255, 0.15); color: var(--fg);
  border: 1px solid rgba(0, 229, 255, 0.25); border-bottom-right-radius: 0; }
.chat-msg.assistant { align-self: flex-start; background: var(--bg3); border: 1px solid var(--border);
  border-bottom-left-radius: 0; }
.chat-msg .speaker { font-family: 'Oxanium', monospace; font-size: 10px; color: var(--fg3); margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: 0.5px; }
.chat-msg .tool-status { font-size: 11px; color: var(--accent); padding: 4px 0; opacity: 0.85; }
.chat-msg .tool-status::before { content: '\25CF '; font-size: 8px; animation: tool-pulse 1.2s ease-in-out infinite; }
@keyframes tool-pulse { 0%,100% { opacity: .4; } 50% { opacity: 1; } }
.chat-msg.note { align-self: stretch; color: #b0dce6; font-style: normal; max-width: 100%;
  border: 1px solid rgba(0, 229, 255, 0.15); border-radius: 8px;
  border-top: 2px solid rgba(0, 229, 255, 0.35);
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.08) 0%, rgba(0, 229, 255, 0.03) 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
#chatMessages img:not(.book-entry-img):not(.picturebook-img):not(.comicbook-img) { max-height: 150px; width: auto; border-radius: var(--radius); cursor: pointer; }
.chat-msg.friend { align-self: flex-start; background: rgba(0, 230, 118, 0.08); color: #b0e0d0;
  border: 1px solid rgba(0, 230, 118, 0.15); border-bottom-left-radius: 0;
  border-top: 2px solid rgba(0, 230, 118, 0.4); }
.chat-msg.friend .speaker { font-size: 10px; color: var(--green); margin-bottom: 4px; font-weight: 600; }
/* System notification messages (invites, confirmations) */
.chat-msg-system { text-align: center; font-size: 11px; color: var(--fg3); padding: 6px 12px; margin: 4px 0;
  font-family: 'Oxanium', monospace; letter-spacing: 0.03em; }
.chat-msg-system .system-detail { color: var(--yellow); margin-left: 6px; }
.chat-msg-system.error { color: var(--red, #e57373); }
.chat-msg.note .note-label { font-family: 'Oxanium', monospace; font-size: 10px; color: rgba(0, 229, 255, 0.7); margin-bottom: 6px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; }
.chat-msg.note .note-label::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: rgba(0, 229, 255, 0.5); margin-right: 6px; flex-shrink: 0; }
.chat-ts { font-size: 10px; color: var(--fg3); font-weight: normal; margin-left: 6px; letter-spacing: 0; text-transform: none; }
.note-delete, .note-edit { background: none; border: none; color: rgba(0, 229, 255, 0.5); cursor: pointer; font-size: 14px; line-height: 1; padding: 2px 6px; opacity: 0; transition: opacity .15s; }
.chat-msg.note:hover .note-delete, .chat-msg.note:hover .note-edit { opacity: 1; }
.note-delete:hover, .note-edit:hover { color: var(--yellow); }
.item-delete { background: none; border: none; color: var(--fg3); cursor: pointer; font-size: 13px; line-height: 1; padding: 0 2px; opacity: 0; transition: opacity .15s; position: absolute; top: 10px; right: 10px; }
.chat-msg:hover .item-delete, .conversation-card:hover .item-delete { opacity: 1; }
.item-delete:hover { color: var(--red); text-shadow: 0 0 4px rgba(255, 61, 90, 0.3); }
.conversation-card { align-self: stretch; max-width: 100%; background: var(--bg3); border: 1px solid rgba(0, 229, 255, 0.4);
  border-top: 2px solid var(--accent); border-radius: var(--radius); padding: 13px 18px 9px; cursor: pointer; transition: all 0.2s; position: relative;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.06); min-height: 250px; }
.conversation-card:hover { background: var(--bg4); border-color: var(--accent);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.12); }
.conversation-card .conv-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.conversation-card .conv-icon { font-size: 16px; }
.conversation-card .conv-agent { font-family: 'Oxanium', monospace; font-size: 11px; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.5px; }
.conversation-card .conv-title { font-size: 13px; color: var(--fg); font-weight: 500; line-height: 1.4;
  margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.conversation-card .conv-header-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 11px; color: var(--fg3); margin-bottom: 2px; }
.conversation-card .conv-header-meta .conv-meta-agent { display: inline-flex; align-items: center; gap: 3px; }
.conversation-card .conv-header-meta .conv-meta-badge { font-size: 10px; background: var(--accent); color: #fff;
  padding: 1px 5px; border-radius: 8px; }
.conversation-card .conv-header-meta .conv-meta-friends { color: var(--fg2); }
.conversation-card .conv-question { font-size: 13px; color: var(--fg); line-height: 1.5; display: flex; align-items: center; gap: 4px; }
.conversation-card .conv-question-text { flex: 1; min-width: 0; }
.conv-question-edit { background: none; border: none; color: var(--fg3); cursor: pointer; font-size: 12px; padding: 0 2px; opacity: 0; transition: opacity .15s; flex-shrink: 0; }
.conversation-card:hover .conv-question-edit { opacity: 1; }
.conv-question-edit:hover { color: var(--accent); }
.conversation-card .conv-summary { font-size: 13px; color: var(--fg2); line-height: 1.55; margin-top: 10px;
  display: -webkit-box; -webkit-line-clamp: 12; -webkit-box-orient: vertical; overflow: hidden; }
.conversation-card .conv-meta { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 11px; color: var(--fg3); }
.conversation-card .conv-meta .conv-msg-count { font-family: 'Oxanium', monospace; letter-spacing: 0.3px; }
.conversation-card .conv-preview { font-size: 13px; color: var(--fg3); margin-top: 10px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.date-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center; min-height: 120px; position: relative;
}
.date-card-dow {
  font-family: 'Oxanium', monospace; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 3px; color: #999; margin-bottom: 4px;
}
.date-card-day {
  font-family: 'Oxanium', monospace; font-size: 36px; font-weight: 700;
  color: #fff; line-height: 1.1; margin-bottom: 4px;
}
.date-card-monthyear {
  font-family: 'Oxanium', monospace; font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 2px; color: #777;
}
.date-card-today {
  display: inline-block; margin-top: 10px; padding: 2px 10px; border-radius: 10px;
  font-family: 'Oxanium', monospace; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  background: rgba(255, 255, 255, 0.08); color: #ccc;
}

/* Threads grid layout (legacy, kept for non-book fallback) */
.threads-grid-inner { width: 100%; }
.grid-pad { visibility: hidden; }
.threads-grid-inner .conversation-card,
.threads-grid-inner .chat-msg,
.threads-grid-inner .date-card,
.threads-grid-inner .grid-pad { max-width: 100%; overflow: hidden;
  height: var(--thread-row-h); max-height: var(--thread-row-h); }
.threads-grid-inner.threads-layout-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.threads-grid-inner.threads-layout-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.threads-grid-inner.threads-layout-single { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* ── Book layout (two-column flex) ── */
.daybook-columns {
  display: flex;
  gap: 0;
  padding: 4px 12px 0;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.daybook-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}
.daybook-col:first-child { padding-right: 10px; }
.daybook-col:last-child { padding-left: 10px; }
.daybook-col > .book-entry { flex: 1; }
.daybook-divider {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
}

/* Long form loading */
.lf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 80px 20px;
  gap: 16px;
}
.lf-loading-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 15px;
  font-weight: 400;
  font-style: italic;
  color: #555;
  letter-spacing: 0.02em;
}
.lf-loading-view-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 11px;
  font-weight: 600;
  color: #444;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 8px;
  animation: book-label-in 0.4s ease both;
}
.lf-loading-bar {
  width: 48px;
  height: 2px;
  background: #222;
  border-radius: 1px;
  position: relative;
  overflow: hidden;
}
.lf-loading-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #666;
  animation: lf-loading-slide 1.2s ease-in-out infinite;
}
@keyframes lf-loading-slide {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* Long form streaming — editorial newspaper */
.detail-body .chat-messages:has(.longform-stream) { margin-bottom: 0; gap: 0; overflow-y: auto; }
.longform-stream {
  background: #000;
  padding: 0 16px 24px;
  min-height: 100%;
}
.lf-masthead {
  padding: 0;
  text-align: center;
  position: relative;
}
.lf-masthead-rule {
  height: 1px;
  background: #333;
}
.lf-masthead-rule.thick {
  height: 3px;
  background: #fff;
  margin-top: 2px;
}
.lf-masthead-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0;
}
.lf-masthead-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lf-masthead-date {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 11px;
  font-weight: 400;
  color: #666;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.schedule-view-caret {
  margin-left: 5px;
  vertical-align: middle;
  opacity: 0.5;
  transition: opacity 0.15s;
}
#leftPanelTitle:hover .schedule-view-caret {
  opacity: 1;
}
.schedule-view-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 4px;
  background: var(--bg2, #1a1a2e);
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  padding: 4px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  min-width: 120px;
}
.schedule-view-option {
  display: block;
  width: 100%;
  padding: 6px 12px;
  background: none;
  border: none;
  color: var(--fg3, #888);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.1s, color 0.1s;
}
.schedule-view-option:hover {
  background: var(--bg3, #252540);
  color: var(--fg);
}
.schedule-view-option.active {
  color: var(--fg);
  font-weight: 600;
}
.inline-metrics-pane {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
}
/* View label after "Book" in header */
.book-view-label {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.7rem;
  font-weight: 400;
  color: #555;
  letter-spacing: 0.03em;
  text-transform: none;
  margin-left: 6px;
  animation: book-label-in 0.3s ease both;
}
@keyframes book-label-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
/* Content fade on view switch */
.chat-messages.view-switching {
  opacity: 0.3;
  transition: opacity 0.15s ease;
}
.lf-masthead-left, .lf-masthead-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lf-masthead-left { min-width: 0; }
.lf-masthead-right { min-width: 0; }
.lf-voice-select {
  background: #111;
  border: 1px solid #333;
  border-radius: 4px;
  color: #888;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 11px;
  padding: 3px 6px;
  cursor: pointer;
  outline: none;
  transition: color 0.15s, border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='8' height='5' viewBox='0 0 8 5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l3 3 3-3' stroke='%23666' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  padding-right: 20px;
}
.lf-voice-select:hover { color: #fff; border-color: #666; }
.lf-voice-select option { background: #1a1a1a; color: #ccc; }
.lf-refresh-btn {
  background: none;
  border: 1px solid #333;
  border-radius: 4px;
  color: #555;
  cursor: pointer;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  transition: color 0.15s, border-color 0.15s;
  text-transform: none;
  letter-spacing: 0;
}
.lf-refresh-btn:hover { color: #fff; border-color: #666; }
.lf-refresh-btn.spinning svg { animation: spin 1s linear infinite; }
.lf-refresh-btn.spinning { pointer-events: none; opacity: 0.5; }
.longform-stream.streaming .lf-refresh-btn { display: none; }
.longform-stream.streaming .lf-voice-select { pointer-events: none; opacity: 0.5; }
.lf-generate-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 60px 0;
}
.lf-generate-wrap .lf-voice-generate {
  font-size: 13px;
  padding: 8px 24px 8px 10px;
  border-radius: 6px;
}
.lf-generate-btn {
  background: none;
  border: 1px solid #333;
  border-radius: 6px;
  color: #888;
  cursor: pointer;
  padding: 10px 24px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s, border-color 0.15s;
}
.lf-generate-btn:hover { color: #fff; border-color: #666; }
.lf-generate-btn.spinning svg { animation: spin 1s linear infinite; }
.lf-generate-btn.spinning { pointer-events: none; opacity: 0.5; }
.lf-generate-btn.spinning span { display: none; }
.lf-generate-btn.spinning::after { content: 'Generating\2026'; }
/* Search report view */
.search-report-input-wrap {
  display: flex;
  gap: 8px;
  padding: 16px 20px 0;
  align-items: center;
}
.search-report-input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--bg4);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--fg);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.search-report-input:focus { border-color: var(--accent2); }
.search-report-input::placeholder { color: var(--fg3); }
.search-report-go-btn {
  background: none;
  border: 1px solid var(--fg3);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--fg2);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color 0.2s, border-color 0.2s;
}
.search-report-go-btn:hover { color: var(--fg); border-color: var(--fg2); }
.search-report-go-btn.spinning svg { animation: spin 1s linear infinite; }
.search-report-go-btn.spinning { pointer-events: none; opacity: 0.5; }
.search-report-content { padding: 0 6px; }
.longform-columns {
  display: flex;
  gap: 0;
  padding-top: 16px;
}
.longform-col {
  flex: 1;
  min-width: 0;
}
.longform-col:first-child { padding-right: 14px; }
.longform-col:last-child { padding-left: 14px; }
.longform-divider {
  width: 1px;
  background: #2a2a2a;
  flex-shrink: 0;
}
.longform-section { margin-bottom: 18px; overflow: hidden; }
.longform-stream:not(.streaming) .longform-section { animation: longform-fadein 0.35s ease both; }
.longform-heading {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 19px;
  font-weight: 700;
  color: #ccc;
  margin: 0 0 4px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.longform-byline {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 11px;
  font-style: italic;
  color: #666;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}
.lf-voice-hint {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 13px;
  color: #666;
}
.longform-body {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.75;
  color: #999;
}
.longform-body p { margin: 0 0 10px; }
.longform-body p:last-child { margin-bottom: 0; }
.longform-body strong { color: #e0e0e0; font-weight: 600; }
.longform-body em {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  color: #bbb;
}
.longform-entry-link {
  color: #ccc;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid #444;
  transition: color 0.15s, border-color 0.15s;
}
.longform-entry-link:hover { color: #fff; border-color: #777; }

/* Longform images — varied shapes */
.lf-img, .lf-img-ph {
  display: block;
  margin: 10px auto;
  object-fit: cover;
  background: #111;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.lf-img.loaded, .lf-img-ph { opacity: 1; }
.lf-img-ph {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lf-img-ph.lf-img-failed { display: none; }
.lf-img-spinner {
  width: 14px;
  height: 14px;
  border: 1.5px solid #333;
  border-top-color: #888;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spin-animation { animation: spin 1s linear infinite; }

.regen-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.65); z-index: 100;
  display: flex; align-items: center; justify-content: center;
  border-radius: inherit; backdrop-filter: blur(2px);
}
.regen-overlay-content {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.regen-spinner {
  width: 32px; height: 32px; border: 3px solid rgba(255,255,255,0.2);
  border-top-color: var(--accent, #f0a050); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.regen-status {
  color: #fff; font-size: 13px; font-weight: 500; letter-spacing: 0.5px;
  text-transform: uppercase; opacity: 0.9;
}

.lf-img-circle, .lf-img-ph.lf-img-circle {
  width: 90px; height: 90px; border-radius: 50%;
  float: left; margin: 2px 12px 6px 0;
}
.lf-img-tall, .lf-img-ph.lf-img-tall {
  width: 70px; height: 110px; border-radius: 8px;
  float: right; margin: 2px 0 6px 12px;
}
.lf-img-wide, .lf-img-ph.lf-img-wide {
  width: 100%; max-width: 220px; height: 72px; border-radius: 10px;
  float: left; margin: 2px 12px 6px 0;
}
.lf-img-square, .lf-img-ph.lf-img-square {
  width: 80px; height: 80px; border-radius: 6px;
  float: right; margin: 2px 0 6px 12px;
}
.lf-img-rounded, .lf-img-ph.lf-img-rounded {
  width: 100px; height: 70px; border-radius: 35px;
  float: left; margin: 2px 12px 6px 0;
}

/* Image wrapper for credit overlay */
.lf-img-wrap {
  position: relative;
  display: block;
}
.lf-img-wrap.lf-img-circle { float: left; margin: 2px 12px 6px 0; width: 90px; }
.lf-img-wrap.lf-img-tall { float: right; margin: 2px 0 6px 12px; width: 70px; }
.lf-img-wrap.lf-img-wide { float: left; margin: 2px 12px 6px 0; width: 100%; max-width: 220px; }
.lf-img-wrap.lf-img-square { float: right; margin: 2px 0 6px 12px; width: 80px; }
.lf-img-wrap.lf-img-rounded { float: left; margin: 2px 12px 6px 0; width: 100px; }
.lf-img-wrap > .lf-img,
.lf-img-wrap > .lf-img-ph {
  float: none !important;
  margin: 0 !important;
  width: 100% !important;
}
.lf-img-credit {
  display: block;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 9px;
  font-style: italic;
  color: #555;
  text-align: center;
  margin-top: 2px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes longform-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Picture book view ── */
.picturebook-artist {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 11px;
  font-style: italic;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.3px;
  text-align: right;
}

/* ── Card refresh button spin ── */
.hp-refresh-btn.spinning svg {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Homepage art reference overlay ── */
.hp-art-reference {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: right;
  padding: 8px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 11px;
  font-style: italic;
  color: rgba(255,255,255,0.75);
  z-index: 5;
  pointer-events: none;
}

/* ── Comic book / Picture book views ── */
.detail-body:has(.comicbook-view),
.detail-body:has(.picturebook-view) { padding: 0; }
.detail-body .chat-messages:has(.comicbook-view),
.detail-body .chat-messages:has(.picturebook-view) { margin-bottom: 0; gap: 0; overflow: hidden; }
.comicbook-view, .picturebook-view {
  position: absolute;
  inset: 0;
  padding: 0 !important;
  background: #000;
  min-height: auto !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.comicbook-frame, .picturebook-frame {
  position: relative;
  width: 100%;
  height: 100%;
}
.comicbook-img, .picturebook-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.comicbook-img.loaded, .picturebook-img.loaded {
  opacity: 1;
}
.picturebook-img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.daybook-columns.turn-out-left {
  opacity: 0;
  transform: translateX(-40px);
  pointer-events: none;
}
.daybook-columns.turn-out-right {
  opacity: 0;
  transform: translateX(40px);
  pointer-events: none;
}
.daybook-columns.turn-in-left {
  opacity: 0;
  transform: translateX(40px);
}
.daybook-columns.turn-in-right {
  opacity: 0;
  transform: translateX(-40px);
}
.daybook-page-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  position: absolute;
  right: 2px;
}
.sf-page-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}
.book-nav-btn.sm {
  width: 24px;
  height: 22px;
  border-radius: 4px;
}
.book-nav-btn {
  background: var(--bg3);
  border: 1px solid var(--border-elevated);
  color: var(--fg);
  width: 32px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s;
  text-transform: none;
  letter-spacing: 0;
}
.book-nav-btn:hover:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0, 229, 255, 0.08);
}
.book-nav-btn:disabled {
  opacity: 0.25;
  cursor: default;
}
.book-page-indicator {
  font-family: 'Oxanium', monospace;
  font-size: 11px;
  color: var(--fg3);
  letter-spacing: 0.5px;
  min-width: 56px;
  text-align: center;
}
.book-entry {
  position: relative;
  padding: 0;
  overflow: hidden;
}
.book-entry::after {
  content: '...';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: linear-gradient(transparent, var(--bg));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--fg3);
  pointer-events: none;
}
.book-entry-hide {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  color: var(--fg3);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  opacity: 0;
  transition: opacity 0.15s;
}
.book-entry:hover .book-entry-hide { opacity: 1; }
.book-entry-hide:hover { color: var(--red, #e55); }
a.book-entry-title, div.book-entry-title {
  font-family: 'Oxanium', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.35;
  margin-bottom: 14px;
  margin-top: 6px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
}
.daybook-col > .book-entry:first-child a.book-entry-title,
.daybook-col > .book-entry:first-child div.book-entry-title {
  margin-top: 0;
}
a.book-entry-title { cursor: pointer; }
a.book-entry-title:hover { color: var(--fg2); text-decoration: none; }
.book-entry-time {
  font-size: 10px;
  font-weight: 400;
  color: var(--fg3);
  white-space: nowrap;
  flex-shrink: 0;
}
.book-entry-body {
  font-size: 12.5px;
  color: var(--fg2);
  line-height: 1.7;
  overflow: hidden;
}
.book-entry-body p { margin: 0 0 4px; }
.book-entry-body p:last-child { margin-bottom: 0; }
.book-entry-body ul, .book-entry-body ol { margin: 2px 0; padding-left: 18px; }
.book-entry-body li { margin-bottom: 1px; }
.book-entry-body strong { color: var(--fg); font-weight: 600; }
.daybook-task-link {
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(0,229,255,0.3);
  text-underline-offset: 2px;
}
.daybook-task-link:hover {
  text-decoration-color: var(--accent);
}
.book-entry-body em { color: color-mix(in srgb, var(--fg) 80%, var(--fg2)); }
.book-entry-body code { font-size: 11px; background: var(--bg3); padding: 1px 4px; border-radius: 3px; }
.book-date-heading {
  font-family: 'Oxanium', monospace;
  font-size: 10px;
  color: var(--fg3);
  letter-spacing: 0.5px;
  padding: 0 0 2px;
  margin-bottom: 0;
  font-weight: 300;
  text-transform: uppercase;
}
.book-entry.note-entry .book-entry-title {
  color: var(--fg2);
}
.book-page-empty {
  display: flex; align-items: center; justify-content: center;
  min-height: 200px;
  color: var(--fg3);
  font-size: 14px;
  font-style: italic;
  width: 100%;
  opacity: 0.4;
  letter-spacing: 0.03em;
  column-span: all;
}
.book-entry-img {
  object-fit: cover;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.book-entry-img.loaded { opacity: 0.85; }
.book-entry-img.book-svg-art { opacity: 0.85; overflow: hidden; }
.picturebook-svg { width: 100%; }
.picturebook-svg svg { display: block; }
.hp-story-bg.svg-bg { display: flex; align-items: center; justify-content: center; }
.hp-story-bg.svg-bg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.book-img-placeholder {
  border-radius: 6px;
  background: linear-gradient(110deg, var(--bg3) 30%, color-mix(in srgb, var(--bg3) 70%, var(--fg3)) 50%, var(--bg3) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.book-entry-img.layout-left,
.book-img-placeholder.layout-left {
  float: left;
  width: 100px;
  min-height: 50px;
  height: 100px;
  margin: 2px 12px 6px 0;
}
.book-entry-img.layout-right,
.book-img-placeholder.layout-right {
  float: right;
  width: 100px;
  min-height: 50px;
  height: 100px;
  margin: 2px 0 6px 12px;
}
.book-img-placeholder .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--fg3);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ── Schedule view toggle (left panel) ── */
.daybook-view-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg2);
  border-radius: 6px;
  padding: 2px;
}
.dvt-btn {
  width: 28px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg3);
  border-radius: 4px;
  padding: 0;
  transition: all 0.15s;
  text-transform: none;
  letter-spacing: 0;
}
.dvt-btn:hover { color: var(--fg); background: var(--bg3); }
.dvt-btn.active {
  color: var(--accent);
  background: rgba(0, 229, 255, 0.1);
}

/* ── Skeleton loading for daybook layout ── */
.skeleton-text {
  display: block;
  height: 10px;
  margin: 6px 0;
  border-radius: 4px;
  background: linear-gradient(110deg, var(--bg3) 30%, color-mix(in srgb, var(--bg3) 70%, var(--fg3)) 50%, var(--bg3) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  width: 80%;
}
.skeleton-text + .skeleton-text { width: 60%; }

/* ── Daybook view toggle ── */

/* ── Short form grid ── */
.shortform-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  padding: 8px 10px;
  height: 100%;
  box-sizing: border-box;
}
.shortform-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--fg3);
  font-size: 12px;
  font-style: italic;
  opacity: 0.5;
}
.sf-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
  background-size: cover;
  background-position: center;
}
.sf-card.sf-has-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  border-radius: inherit;
  z-index: 0;
  transition: background 0.15s;
}
.sf-card.sf-has-img:hover::before {
  background: rgba(0, 0, 0, 0.55);
}
.sf-card.sf-has-img > * {
  position: relative;
  z-index: 1;
}
.sf-card.sf-has-img .sf-card-title,
.sf-card.sf-has-img .sf-card-icon,
.sf-card.sf-has-img .sf-card-preview,
.sf-card.sf-has-img .sf-card-preview strong,
.sf-card.sf-has-img .sf-card-preview h1,
.sf-card.sf-has-img .sf-card-preview h2,
.sf-card.sf-has-img .sf-card-preview h3,
.sf-card.sf-has-img .sf-card-preview h4 {
  color: #fff;
}
.sf-card.sf-has-img .sf-card-time {
  color: rgba(255, 255, 255, 0.6);
}
.sf-card:hover {
  border-color: var(--accent);
  background-color: rgba(0, 229, 255, 0.04);
}
.sf-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sf-card-icon {
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}
.sf-card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.sf-card-badges {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.sf-card-preview {
  font-size: 11px;
  color: var(--fg2);
  line-height: 1.4;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}
.sf-card-preview p { margin: 0 0 2px; }
.sf-card-preview p:last-child { margin-bottom: 0; }
.sf-card-preview ul, .sf-card-preview ol { margin: 2px 0; padding-left: 14px; }
.sf-card-preview li { margin-bottom: 0; }
.sf-card-preview strong { color: var(--fg); font-weight: 600; }
.sf-card-preview code { font-size: 10px; background: var(--bg3); padding: 0 3px; border-radius: 2px; }
.sf-card-preview h1, .sf-card-preview h2, .sf-card-preview h3, .sf-card-preview h4 {
  font-size: 11px; margin: 0 0 2px; color: var(--fg);
}
.sf-card-time {
  font-family: 'Oxanium', monospace;
  font-size: 10px;
  color: var(--fg3);
  margin-top: auto;
  flex-shrink: 0;
}
.sf-card-badge {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent);
  font-weight: 600;
}
.sf-card.sf-note {
  border-left: 2px solid var(--yellow);
}
.sf-card.sf-note .sf-card-title { color: var(--yellow); }
.sf-card.sf-has-img.sf-note .sf-card-title { color: var(--yellow); }
.sf-card-date {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.sf-card-date .sf-date-dow {
  font-family: 'Oxanium', monospace;
  font-size: 14px;
  color: var(--fg3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.sf-card-date .sf-date-day {
  font-family: 'Oxanium', monospace;
  font-size: 36px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.2;
}
.sf-card-date .sf-date-month {
  font-family: 'Oxanium', monospace;
  font-size: 14px;
  color: var(--fg3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Drawing view */
.detail-body:has(.drawing-view-wrap) { padding: 0; }
.detail-body .chat-messages:has(.drawing-view-wrap) { margin-bottom: 0; gap: 0; }
.drawing-view-wrap {
  width: 100%;
  height: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.drawing-view-wrap > svg {
  width: 100%;
  height: 100%;
  display: block;
}
.drawing-view-wrap [data-entry] { transition: opacity 0.15s; }
.drawing-view-wrap [data-entry]:hover { opacity: 0.75; }
.drawing-view-wrap [data-entry][style*="cursor"] text { cursor: pointer; }
.drawing-view-wrap.drawing-loading { opacity: 0.6; }

/* Friend unread badge on thread tiles */
.conv-meta-badge.friend-badge { background: rgba(0, 230, 118, 0.85); color: #111;
  font-weight: 700; font-size: 10px; padding: 1px 6px; border-radius: 8px; min-width: 16px; text-align: center; }

/* Shared room styles */
.shared-room-header { display: flex; align-items: center; gap: 12px; padding: 10px 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.shared-room-header .back-btn { background: none; border: 1px solid var(--border); color: var(--fg2); padding: 4px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.shared-room-header .back-btn:hover { background: var(--bg2); }
.shared-room-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.shared-room-title .conv-meta-friends { font-size: 12px; font-weight: 400; color: var(--fg3); }
.shared-room-messages { display: flex; flex-direction: column; gap: 10px; }

/* Chat loading indicator */
.chat-loading .typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}

.chat-loading .typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.3;
  animation: typing-bounce 1.4s infinite;
}

.chat-loading .typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-loading .typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing-bounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.3;
  }
  30% {
    transform: translateY(-8px);
    opacity: 1;
    box-shadow: 0 0 6px var(--glow-accent);
  }
}

.task-sticky-note { display: inline-block; font-size: 11px; background: var(--bg3); color: var(--fg2); border-top: 1px solid var(--border); padding: 3px 10px; border-radius: 8px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Chat Suggestion Bubbles */
.chat-suggestions { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; padding: 8px 0 12px; mask-image: linear-gradient(to right, black 85%, transparent 100%); -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%); }
.chat-suggestions::-webkit-scrollbar { display: none; }
.chat-suggestions:empty { display: none; }
.chat-suggestion-bubble { flex-shrink: 0; max-width: 340px; padding: 5px 12px; font-size: 11px; line-height: 1.3; color: #8a9199; background: rgba(255, 255, 255, 0.05); border: 1.5px solid rgba(255, 255, 255, 0.3); border-radius: 10px; cursor: pointer; transition: all 0.15s; white-space: normal; text-align: left; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chat-suggestion-bubble:hover { color: var(--accent); border-color: var(--accent); background: rgba(0, 229, 255, 0.06); box-shadow: 0 0 6px var(--glow-accent-subtle); }
.chat-suggestion-bubble.hint-pill { border: 1.5px solid rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.05); color: #8a9199; }
.chat-suggestion-bubble.hint-pill:hover { border-color: rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.1); color: #b0b8c0; }

/* Home chat button (square, left of suggestion bubbles) */
@keyframes fab-glow {
  0%, 100% { box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
  50% { box-shadow: 0 2px 12px rgba(0,229,255,0.15), 0 0 20px rgba(0,229,255,0.08); }
}
.home-chat-fab { position: absolute; bottom: 16px; right: 16px; z-index: 20; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.08); color: #c8cfd7; cursor: pointer; transition: all 0.15s; padding: 0; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fab-glow 3s ease-in-out infinite; }
.home-chat-fab:hover { color: var(--accent); border-color: var(--accent); background: rgba(0, 229, 255, 0.1); box-shadow: 0 2px 12px rgba(0,229,255,0.15); animation: none; }

/* Home chat popover */
.home-chat-popover { position: absolute; bottom: 64px; right: 14px; left: 14px; background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; min-width: 0; box-shadow: 0 8px 24px rgba(0,0,0,0.4); z-index: 100; }
.home-chat-action-btn { padding: 5px 14px; font-size: 12px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--fg2); cursor: pointer; transition: all 0.15s; font-weight: 500; }
.home-chat-action-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(0, 229, 255, 0.08); }
.home-chat-action-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(0, 229, 255, 0.12); font-weight: 600; }
.home-chat-pill-group { display: flex; gap: 2px; background: rgba(255,255,255,0.04); border-radius: 8px; padding: 2px; }
.home-chat-pill { padding: 3px 10px; font-size: 11px; border-radius: 6px; border: none; background: transparent; color: var(--fg3); cursor: pointer; transition: all 0.15s; font-weight: 500; }
.home-chat-pill.active { background: var(--accent); color: var(--bg); font-weight: 600; }
.home-chat-pill:hover:not(.active) { color: var(--fg); background: rgba(255,255,255,0.06); }

/* Global chat bar — beneath workspace panel in right column */
#globalChatBar {
  flex-shrink: 0;
  padding: 12px 14px 14px;
  background: transparent;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 3;
}
#globalChatBar .chat-suggestions { padding: 6px 0 10px; }
.rp-starters { overflow-x: auto; white-space: nowrap; flex-wrap: nowrap; scrollbar-width: none; -ms-overflow-style: none; mask-image: linear-gradient(to right, black 85%, transparent 100%); -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%); }
.rp-starters::-webkit-scrollbar { display: none; }
#goalsColumnContent .chat-suggestions { flex-wrap: wrap; overflow-x: visible; mask-image: none; -webkit-mask-image: none; border-top: 1px solid var(--border); flex-shrink: 0; }
#goalsColumnContent .chat-suggestions .chat-suggestion-bubble { max-width: 100%; flex-shrink: 1; }
#globalChatBar .chat-input-row textarea { max-height: 120px; min-height: 32px; }
#globalChatBar .mention-dropdown { bottom: calc(100% + 4px); }

/* In-room: chat bar inside workspace panel */
#workspacePanel > #globalChatBar {
  border-top: 1px solid var(--border-elevated);
  border-radius: 0 0 14px 0;
  padding: 12px 14px 14px;
}


/* Inline action status indicator (e.g. "Creating task...") */
.conv-action-status {
  align-self: flex-start;
  animation: fadeSlideIn 0.2s ease-out;
}
.conv-action-status .typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}
.conv-action-status .typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.3;
  animation: typing-bounce 1.4s infinite;
}
.conv-action-status .typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.conv-action-status .typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Inline hint pills rendered inside chat messages area */
.chat-hints-inline {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 0 4px;
  align-self: stretch;
}

.chat-input-row { display: flex; gap: 6px; }
.chat-input-row input, .chat-input-row textarea { flex: 1; }
.chat-input-row textarea { font-family: inherit; font-size: inherit; line-height: 1.4; max-height: 120px; overflow-y: auto; min-height: 32px; padding: 4px 10px; border-color: rgba(255, 255, 255, 0.4); }
.chat-input-row textarea:focus { border-color: rgba(255, 255, 255, 0.6); box-shadow: none; }
.chat-input-row .primary.sm { padding: 4px 8px; height: 32px; box-sizing: border-box; border-color: rgba(255, 255, 255, 0.4); color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.05); }
.chat-input-row .primary.sm:hover { border-color: rgba(255, 255, 255, 0.6); color: #fff; }
.chat-plus-wrapper { position: relative; }
.chat-plus-menu { position: absolute; bottom: calc(100% + 6px); left: 0; background: var(--bg2); border: 1px solid var(--border-elevated); border-radius: var(--radius); box-shadow: 0 2px 12px rgba(0,0,0,.4), 0 0 8px rgba(0, 229, 255, 0.06); z-index: 20; min-width: 140px; padding: 4px 0; }
.chat-plus-menu button { display: block; width: 100%; text-align: left; padding: 6px 12px; font-size: 12px; background: none; border: none; color: var(--fg); cursor: pointer; white-space: nowrap; text-transform: none; letter-spacing: 0; }
.chat-plus-menu button:hover { background: var(--bg3); color: var(--accent); }

/* Chat Participants */
.participant-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 4px; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.3px; }
.participant-tag .remove { cursor: pointer; margin-left: 2px; color: var(--fg2); font-weight: bold; }
.participant-tag .remove:hover { color: var(--red); }
.participant-dropdown-item { padding: 6px 12px; cursor: pointer; font-size: 12px;
  display: flex; align-items: center; gap: 6px; }
.participant-dropdown-item:hover { background: var(--bg3); color: var(--accent); }

/* @ Mention Dropdown */
.mention-dropdown { position: absolute; bottom: calc(100% + 4px); left: 0; right: 0;
  background: var(--bg2); border: 1px solid var(--border-elevated); border-radius: var(--radius);
  box-shadow: 0 -2px 12px rgba(0,0,0,.4), 0 0 8px rgba(0, 229, 255, 0.06); z-index: 30; max-height: 220px; overflow-y: auto; }
.mention-dropdown .mention-group-label { font-family: 'Oxanium', monospace; padding: 4px 10px; font-size: 10px; color: var(--accent);
  text-transform: uppercase; letter-spacing: 1px; background: var(--bg3); }
.mention-dropdown .mention-item { padding: 6px 12px; cursor: pointer; font-size: 12px;
  display: flex; align-items: center; gap: 6px; transition: all 0.15s; }
.mention-dropdown .mention-item:hover,
.mention-dropdown .mention-item.active { background: var(--bg3); color: var(--accent); }
.mention-tag { display: inline; color: var(--accent); font-weight: 600;
  text-shadow: 0 0 4px var(--glow-accent-subtle); }


/* Charts */
.chart-container { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px; }
.chart-container svg { width: 100%; height: auto; }

/* Friends */
.leaderboard { width: 100%; border-collapse: collapse; }
.leaderboard th { text-align: left; padding: 8px 12px; font-family: 'Oxanium', monospace; font-size: 12px; color: var(--fg2);
  border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: 1px; }
.leaderboard td { padding: 8px 12px; font-size: 13px; border-bottom: 1px solid var(--border); }
.leaderboard tr:hover { background: var(--bg3); }
.leaderboard tr.me { background: rgba(0, 229, 255, 0.06); }
.friend-detail { background: var(--bg2); border: 1px solid var(--border-elevated); border-radius: var(--radius);
  padding: 16px; margin-top: 16px; box-shadow: 0 0 8px rgba(0, 229, 255, 0.05); }

/* Friend Activity Feed */
.activity-feed-scroll {
  max-height: 600px;
  overflow-y: auto;
  padding: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.activity-item {
  background: linear-gradient(135deg, var(--bg3) 0%, color-mix(in srgb, var(--bg3) 85%, var(--bg4)) 100%);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
  transition: all 0.2s;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.04);
}
.activity-item:hover {
  background: var(--bg4);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3), 0 0 10px rgba(0, 229, 255, 0.12);
}
.activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.activity-user {
  font-family: 'Oxanium', monospace;
  font-weight: 600;
  font-size: 13px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.activity-time {
  font-family: 'Oxanium', monospace;
  font-size: 11px;
  color: var(--fg3);
  letter-spacing: 0.5px;
}
.activity-action {
  font-size: 12px;
  color: var(--fg2);
  margin-bottom: 4px;
}
.activity-task {
  font-size: 13px;
  color: var(--fg);
  font-weight: 500;
}
.activity-tokens {
  display: inline-block;
  font-family: 'Oxanium', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
}

/* Settings */
.setting-group { margin-bottom: 20px; background: rgba(0, 229, 255, 0.02); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.setting-group h3 { font-family: 'Oxanium', monospace; font-size: 14px; margin-bottom: 10px; color: var(--fg);
  text-transform: uppercase; letter-spacing: 1px; }
.settings-tabs { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 20px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 3px; }
.settings-tabs button { flex: 1; background: transparent; border: none; white-space: nowrap;
  padding: 9px 10px; font-size: 12px; color: var(--fg2); transition: all 0.2s; cursor: pointer; border-radius: var(--radius);
  text-transform: uppercase; letter-spacing: 0.3px; }
.settings-tabs button:hover { background: var(--bg3); color: var(--fg); }
.settings-tabs button.active { color: var(--accent); background: rgba(0, 229, 255, 0.1); border: 1px solid rgba(0, 229, 255, 0.2);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.1); }
.settings-tab-content { display: none; }
.settings-tab-content.active { display: block; }
.charity-sub-tabs { display: inline-flex; gap: 0; margin-bottom: 16px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 3px; }
.charity-sub-tabs button { background: transparent; border: none;
  padding: 8px 16px; font-size: 13px; color: var(--fg2); transition: all 0.2s; cursor: pointer; border-radius: var(--radius);
  text-transform: uppercase; letter-spacing: 0.5px; }
.charity-sub-tabs button:hover { background: var(--bg3); color: var(--fg); }
.charity-sub-tabs button.active { color: var(--accent); background: rgba(0, 229, 255, 0.1); border: 1px solid rgba(0, 229, 255, 0.2);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.1); }
.charity-sub-content { display: none; }
.charity-sub-content.active { display: block; }
.individual-sub-content { display: none; }
.individual-sub-content.active { display: block; }
.community-sub-content { display: none; }
.community-sub-content.active { display: block; }
.global-sub-content { display: none; }
.global-sub-content.active { display: block; }

/* Settings UI Facelift */
#tab-settings input[type="text"], #tab-settings input[type="number"], #tab-settings input[type="url"],
#tab-settings input[type="email"], #tab-settings input[type="password"], #tab-settings select, #tab-settings textarea {
  background: var(--bg); border: 1px solid var(--border); transition: border-color 0.2s, box-shadow 0.2s;
}
#tab-settings input:focus, #tab-settings select:focus, #tab-settings textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 8px rgba(0, 229, 255, 0.15); outline: none;
}
#tab-settings button.primary, #tab-settings button[style*="accent"] {
  border: 1px solid var(--accent); transition: all 0.2s;
}
#tab-settings button.primary:hover { transform: translateY(-1px); box-shadow: 0 2px 12px rgba(0, 229, 255, 0.2); }
#tab-settings button.sm { background: var(--bg3); border: 1px solid var(--border); }
#tab-settings button.sm:hover { background: var(--bg4); border-color: var(--accent); }
#tab-settings button.sm.danger, #tab-settings button.danger {
  background: transparent; border: 1px solid var(--red); color: var(--red);
}
#tab-settings button.sm.danger:hover, #tab-settings button.danger:hover { background: rgba(255, 61, 90, 0.08);
  box-shadow: 0 0 8px rgba(255, 61, 90, 0.15); }
.settings-category-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px;
  transition: all 0.2s;
}
.settings-category-card:hover { border-color: var(--fg3); box-shadow: 0 0 8px rgba(0, 229, 255, 0.05); }
.settings-category-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: var(--bg); border-radius: var(--radius); transition: all 0.2s;
  border: 1px solid transparent;
}
.settings-category-item:hover { background: var(--bg3); border-color: var(--border); }
.stg-expand-btn {
  background: none; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2px 8px; font-size: 11px; color: var(--fg2); cursor: pointer; transition: all 0.2s;
}
.stg-expand-btn:hover { background: var(--bg3); border-color: var(--accent); color: var(--accent); }
.settings-category-card .checkbox-label { background: transparent; }
.learning-subject-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 8px; transition: all 0.2s;
}
.learning-subject-card:hover { border-color: var(--fg3); box-shadow: 0 0 8px rgba(0, 229, 255, 0.05); }
input[type="range"] {
  -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px;
  background: var(--bg3); border: 1px solid var(--border); outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 3px;
  background: var(--accent); border: none; cursor: pointer;
  box-shadow: 0 0 6px var(--glow-accent);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 3px;
  background: var(--accent); border: none; cursor: pointer;
  box-shadow: 0 0 6px var(--glow-accent);
}
.toggle-switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-switch .toggle-track { position: absolute; inset: 0; border-radius: 2px;
  background: var(--bg3); border: 1px solid var(--border); transition: all 0.2s; cursor: pointer; }
.toggle-switch .toggle-track::after { content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 2px; background: var(--fg3);
  transition: transform 0.2s, background 0.2s; }
.toggle-switch input:checked + .toggle-track { background: rgba(0, 229, 255, 0.15); border-color: var(--accent);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.2); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(18px); background: var(--accent);
  box-shadow: 0 0 4px var(--glow-accent); }
#settingsFriendsList .card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
}
#tab-settings .pill-toggle {
  min-height: 30px; font-size: 12px; padding: 4px 12px;
}
#tab-settings .pill-toggle.selected {
  background: rgba(0, 229, 255, 0.1); border-color: var(--accent);
  box-shadow: 0 0 4px rgba(0, 229, 255, 0.1);
}
#tab-settings .goal-item {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg2);
  border: 1px solid var(--border-elevated);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 12px rgba(0, 229, 255, 0.06);
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 200px;
  animation: slideIn 0.3s ease-out;
  font-family: 'Oxanium', monospace;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px;
}
.toast.success { border-top: 2px solid var(--green); box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 12px rgba(0, 230, 118, 0.15); }
.toast.error { border-top: 2px solid var(--red); box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 12px rgba(255, 61, 90, 0.15); }
.toast.info { border-top: 2px solid var(--accent); box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 12px rgba(0, 229, 255, 0.15); }
@keyframes slideIn {
  from { transform: translateX(400px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 300;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px); }
.modal { background: var(--bg2); border: 1px solid var(--border-elevated); border-radius: var(--radius);
  width: 460px; max-height: 80vh; overflow-y: auto; padding: 20px;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.08), 0 8px 40px rgba(0,0,0,0.5); }
.modal h2 { font-family: 'Oxanium', monospace; font-size: 18px; margin-bottom: 16px;
  text-transform: uppercase; letter-spacing: 1px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.image-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 400;
  display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.image-lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain;
  border-radius: var(--radius); box-shadow: 0 0 40px rgba(0,0,0,0.5); }
.image-lightbox.hidden { display: none; }

/* Calendar export timeline */
.cal-timeline { position: relative; margin: 0; padding: 0; }
.cal-hour-row { display: flex; align-items: flex-start; min-height: 48px; position: relative; }
.cal-hour-label { font-family: 'Oxanium', monospace; width: 54px; flex-shrink: 0; font-size: 11px; color: var(--fg3); text-align: right;
  padding-right: 10px; padding-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.cal-hour-slot { flex: 1; min-height: 48px; border-top: 1px solid var(--border); position: relative;
  transition: background 0.15s; }
.cal-hour-slot.cal-slot-over { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.cal-event { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin: 2px 0;
  background: var(--bg2); border: 1px solid var(--border); border-top: 2px solid var(--accent);
  border-radius: var(--radius); cursor: grab; user-select: none; transition: all 0.2s; }
.cal-event:active { cursor: grabbing; }
.cal-event.cal-dragging { opacity: 0.3; }
.cal-event-time { font-family: 'Oxanium', monospace; font-size: 11px; font-weight: 600; color: var(--accent); min-width: 46px; letter-spacing: 0.5px; }
.cal-event-name { flex: 1; font-size: 13px; color: var(--fg); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.cal-event-del { color: var(--fg3); font-size: 16px; cursor: pointer; flex-shrink: 0;
  padding: 0 2px; line-height: 1; border-radius: var(--radius); }
.cal-event-del:hover { color: var(--red); background: rgba(255, 61, 90, 0.1); }

/* Leaderboard */
.leaderboard-table { width: 100%; border-collapse: collapse; }
.leaderboard-table th { font-family: 'Oxanium', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--fg3);
  padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--border); font-weight: 600; }
.leaderboard-table th:last-child, .leaderboard-table td:last-child { text-align: right; }
.leaderboard-table td { padding: 10px; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.leaderboard-table tr:last-child td { border-bottom: none; }
.leaderboard-table tbody tr { transition: all 0.2s; }
.leaderboard-table tbody tr:hover { background: var(--bg3); }
.lb-rank { font-family: 'Oxanium', monospace; font-weight: 700; font-size: 14px; width: 36px; text-align: center; }
.lb-rank-1 { color: #ffd700; text-shadow: 0 0 6px rgba(255, 215, 0, 0.3); }
.lb-rank-2 { color: #c0c0c0; text-shadow: 0 0 6px rgba(192, 192, 192, 0.2); }
.lb-rank-3 { color: #cd7f32; text-shadow: 0 0 6px rgba(205, 127, 50, 0.2); }
.lb-name { font-weight: 600; color: var(--fg); }
.lb-desc { font-size: 11px; color: var(--fg3); margin-top: 2px; line-height: 1.4; }
.lb-score { font-family: 'Oxanium', monospace; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 4px var(--glow-accent-subtle); }
.lb-tokens { font-family: 'Oxanium', monospace; font-size: 11px; color: var(--fg3); margin-top: 2px; }
.lb-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.lb-tab { font-family: 'Oxanium', monospace; padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--fg3); cursor: pointer;
  border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; background: none; border-top: none; border-left: none; border-right: none;
  text-transform: uppercase; letter-spacing: 0.5px; }
.lb-tab:hover { color: var(--fg); }
.lb-tab.active { color: var(--accent); border-bottom-color: var(--accent);
  text-shadow: 0 0 6px var(--glow-accent-subtle); }
.leaderboard-layout { display: flex; gap: 24px; }
.leaderboard-pane { flex: 1; min-width: 0; background: linear-gradient(135deg, var(--bg2) 0%, color-mix(in srgb, var(--bg2) 85%, var(--bg3)) 100%);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent); border-radius: var(--radius); padding: 20px;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.05); }
@media (max-width: 700px) { .leaderboard-layout { flex-direction: column; } }

/* Goals section */
.goals-section-label { font-family: 'Oxanium', monospace; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--accent); margin-bottom: 16px; }
.goals-system-group { margin-bottom: 28px; }
.goals-system-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.goals-system-header .system-name { font-family: 'Oxanium', monospace; font-size: 15px; font-weight: 600; color: var(--fg);
  text-transform: uppercase; letter-spacing: 0.5px; }
.goals-system-header .system-badge { font-family: 'Oxanium', monospace; font-size: 11px; color: var(--fg3); background: var(--bg3);
  padding: 2px 10px; border-radius: 4px; border: 1px solid var(--border);
  text-transform: uppercase; letter-spacing: 0.5px; }
.goal-item { padding: 16px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 8px; transition: all 0.2s; }
.goal-item:hover { border-color: var(--accent); box-shadow: 0 0 8px rgba(0, 229, 255, 0.08); }
.goal-item .goal-name { font-family: 'Oxanium', monospace; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.goal-item .goal-name:not(:last-child) { margin-bottom: 6px; }
.goal-item .goal-description { font-size: 12px; color: var(--fg2);
  line-height: 1.6; }
.goals-empty { text-align: center; padding: 48px 24px; }
.goals-empty-icon { font-size: 32px; margin-bottom: 12px; opacity: 0.4; }
.goals-empty p { color: var(--fg2); font-size: 13px; margin-bottom: 6px; }
.goals-empty p:last-child { color: var(--fg3); font-size: 12px; }

/* Token history */
.token-entry { display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.token-entry .amount.earn { color: var(--green); text-shadow: 0 0 4px rgba(0, 230, 118, 0.2); }
.token-entry .amount.spend { color: var(--red); text-shadow: 0 0 4px rgba(255, 61, 90, 0.2); }
.token-entry .reason { color: var(--fg2); flex: 1; margin: 0 8px; }

/* Agent list */
.agent-item { display: flex; align-items: center; gap: 10px; padding: 10px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 6px;
  transition: all 0.2s; }
.agent-item:hover { border-color: var(--accent); box-shadow: 0 0 6px rgba(0, 229, 255, 0.08); }
.agent-item .icon { font-size: 24px; }
.agent-item .info { flex: 1; }
.agent-item .name { font-family: 'Oxanium', monospace; font-weight: 600; font-size: 14px;
  text-transform: uppercase; letter-spacing: 0.5px; }
.agent-item .prompt-preview { font-size: 11px; color: var(--fg2); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.agent-tools { margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px; }
.tool-tag { display: inline-block; background: rgba(0, 229, 255, 0.15); color: var(--accent); font-size: 10px;
  padding: 1px 6px; border-radius: 4px; font-weight: 600; border: 1px solid rgba(0, 229, 255, 0.2);
  text-transform: uppercase; letter-spacing: 0.3px; }
.tool-checkboxes { display: flex; flex-direction: column; gap: 6px; }
.tool-checkbox { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.tool-checkbox input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }

/* Email confirmation cards */
.email-confirm-card { margin-top: 8px; padding: 10px; background: var(--bg2); border: 1px solid var(--border-elevated);
  border-radius: var(--radius); border-top: 2px solid var(--accent);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.05); }
/* Calendar add cards */
.calendar-add-card { margin-top: 8px; padding: 10px; background: var(--bg2); border: 1px solid var(--border-elevated);
  border-radius: var(--radius); border-top: 2px solid var(--green);
  box-shadow: 0 0 8px rgba(0, 200, 83, 0.08); }
.calendar-add-card a { color: var(--accent); text-decoration: none; }
.calendar-add-card a:hover { text-decoration: underline; }
/* Markdown in chat messages */
.chat-msg p { margin: 0 0 6px 0; }
.chat-msg p:last-child { margin-bottom: 0; }
.chat-msg strong { font-weight: 700; }
.chat-msg em { font-style: italic; }
.chat-msg code { background: rgba(0, 229, 255, 0.08); padding: 1px 4px; border-radius: 2px; font-size: 12px;
  font-family: 'SF Mono', 'Fira Code', monospace; color: var(--accent); }
.chat-msg pre { background: rgba(0,0,0,.4); padding: 8px; border-radius: var(--radius); overflow-x: auto; margin: 4px 0;
  border: 1px solid var(--border); }
.chat-msg pre code { background: none; padding: 0; color: var(--fg); }
.chat-msg ul, .chat-msg ol { margin: 6px 0; padding-left: 18px; }
.chat-msg li { margin-bottom: 3px; }
.chat-msg blockquote { border-left: 3px solid var(--accent); padding-left: 8px; margin: 4px 0; color: var(--fg2); }
.chat-msg h1, .chat-msg h2, .chat-msg h3, .chat-msg h4 { font-family: 'Oxanium', monospace; margin: 6px 0 4px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.chat-msg h1 { font-size: 16px; }
.chat-msg h2 { font-size: 15px; }
.chat-msg h3 { font-size: 14px; }
.chat-msg a { color: inherit; text-decoration: underline; }
.chat-msg.user a { color: var(--accent); }
.chat-msg hr { border: none; border-top: 1px solid var(--border); margin: 6px 0; }
.chat-msg table { border-collapse: collapse; margin: 4px 0; font-size: 12px; }
.chat-msg th, .chat-msg td { border: 1px solid var(--border); padding: 3px 6px; }
.chat-msg th { background: var(--bg3); }
.context-feed-item { transition: all 0.2s; cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3), 0 0 6px rgba(0, 229, 255, 0.04); }
.context-feed-item:hover { border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 12px rgba(0, 229, 255, 0.1);
  transform: translateY(-1px); }

/* Add to Chat dropdown */
.add-to-chat-dropdown { position: absolute; top: calc(100% + 6px); right: 0; min-width: 160px;
  background: var(--bg2); border: 1px solid var(--border-elevated); border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 12px rgba(0, 229, 255, 0.06);
  z-index: 50; max-height: 200px; overflow-y: auto; padding: 4px 0; }
.add-to-chat-dropdown.hidden { display: none; }
.add-to-chat-dropdown .atc-label { font-family: 'Oxanium', monospace; padding: 4px 10px 2px;
  font-size: 9px; color: var(--accent); text-transform: uppercase; letter-spacing: 1.2px; opacity: 0.7; }
.add-to-chat-dropdown .atc-option { display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; cursor: pointer; font-size: 12px; color: var(--fg2);
  transition: all 0.15s; border-left: 2px solid transparent; }
.add-to-chat-dropdown .atc-option:hover { background: var(--bg3); color: var(--fg);
  border-left-color: var(--accent); }
.add-to-chat-dropdown .atc-option.already-added { opacity: 0.4; pointer-events: none; }
.add-to-chat-dropdown .atc-empty { padding: 10px 12px; font-size: 11px; color: var(--fg3); text-align: center; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--fg3); }

/* Schedule note items */
.schedule-note-item {
  padding: 6px 10px;
  margin: 2px 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.schedule-note-item:hover { background: var(--bg2); }
.schedule-note-item:hover .item-delete { opacity: 1; }
.schedule-note-row1 {
  display: flex;
  align-items: center;
  gap: 6px;
}
.schedule-note-time { font-size: 11px; color: var(--fg2); white-space: nowrap; }
.schedule-note-icon { color: var(--fg3); flex-shrink: 0; }
.schedule-note-row2 {
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}
.schedule-note-title { color: var(--fg); font-weight: 500; display: block; margin-bottom: 6px; }
.schedule-note-desc { color: var(--fg3); }
.highlight-flash {
  animation: noteFlash 1.5s ease-out;
}
@keyframes noteFlash {
  0% { background: rgba(232, 184, 73, 0.3); }
  100% { background: transparent; }
}

/* Rundown view — two-column: title+time left, summary right */
.rundown-container { padding: 20px 24px; }
.rd-header { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.rd-header-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem; font-weight: 600; color: var(--fg);
  letter-spacing: 0.02em;
}
.rd-header-stats {
  display: flex; gap: 12px; margin-top: 4px;
  font-size: 11px; color: var(--fg2);
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* Two-column flowing text */
.rd-journal { column-count: 2; column-gap: 28px; column-rule: 1px solid rgba(26, 46, 64, 0.3); }

.rd-entry {
  font-size: 13px; color: var(--fg2); line-height: 1.65;
  margin: 0 0 8px; break-inside: avoid;
}
.rd-title { font-weight: 600; color: var(--fg); }
.rd-desc { font-size: 11px; color: var(--fg3); }
.rd-desc a { color: var(--fg3); }
.rd-clickable { cursor: pointer; transition: color 0.15s; }
.rd-clickable:hover { color: var(--accent); }
.rd-time {
  font-size: 11px; color: var(--fg3);
  font-variant-numeric: tabular-nums;
}

/* Done state */
.rd-done { opacity: 0.4; }
.rd-done .rd-title { text-decoration: line-through; }

/* Future state */
.rd-future { opacity: 0.55; }

/* Coming Up inline marker */
.rd-divider-inline {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent); font-weight: 600;
  margin: 12px 0 6px; break-inside: avoid;
  border-top: 1px solid var(--accent); padding-top: 6px;
}

.rd-empty {
  text-align: center; color: var(--fg3); font-size: 13px;
  padding: 40px 20px; column-span: all;
}

/* Home Page view */
.hp-container { padding: 10px 24px 20px; }

/* ── Stories view (Instagram/TikTok style) ── */
.hp-stories-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.hp-stories-scroll {
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.hp-stories-scroll::-webkit-scrollbar { display: none; }
.hp-stories-scroll { -ms-overflow-style: none; scrollbar-width: none; }
.hp-story-card {
  height: 100%;
  min-height: 100%;
  scroll-snap-align: start;
  position: relative;
  background: #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hp-story-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
}
.hp-story-bg.kenburns-0 { animation: kenburns-a 21.5s ease-in-out infinite; }
.hp-story-bg.kenburns-1 { animation: kenburns-b 25.5s ease-in-out infinite; }
.hp-story-bg.kenburns-2 { animation: kenburns-c 19s ease-in-out infinite; }
.card-loading {
  position: absolute;
  z-index: 3;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 12px;
  animation: card-loading-pulse 1.5s ease-in-out infinite;
}
.card-loading-summary {
  top: 44px;
  right: 12px;
  background: rgba(0,229,255,0.15);
  color: rgba(0,229,255,0.9);
  border: 1px solid rgba(0,229,255,0.3);
}
.card-loading-image {
  bottom: 12px;
  right: 12px;
  background: rgba(255,171,0,0.15);
  color: rgba(255,171,0,0.9);
  border: 1px solid rgba(255,171,0,0.3);
}
@keyframes card-loading-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
/* Story card body shimmer while summary is updating */
.hp-story-body.summarizing .slide-bullets li,
.hp-story-body.summarizing {
  position: relative;
  overflow: hidden;
}
.hp-story-body.summarizing .slide-bullets li::after,
.hp-story-body.summarizing:empty::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 200%; height: 100%;
  background: linear-gradient(90deg, transparent 25%, rgba(0,229,255,0.08) 50%, transparent 75%);
  animation: card-shimmer 1.8s ease-in-out infinite;
}
.hp-story-body.summarizing .slide-bullets li {
  opacity: 0.5;
  transition: opacity 0.3s;
}
@keyframes card-shimmer {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(50%); }
}
/* Fade in new summary content */
.hp-story-body.summary-fresh .slide-bullets li {
  animation: summary-fade-in 0.5s ease-out both;
}
.hp-story-body.summary-fresh .slide-bullets li:nth-child(1) { animation-delay: 0s; }
.hp-story-body.summary-fresh .slide-bullets li:nth-child(2) { animation-delay: 0.08s; }
.hp-story-body.summary-fresh .slide-bullets li:nth-child(3) { animation-delay: 0.16s; }
.hp-story-body.summary-fresh .slide-bullets li:nth-child(4) { animation-delay: 0.24s; }
.hp-story-body.summary-fresh .slide-bullets li:nth-child(5) { animation-delay: 0.32s; }
@keyframes summary-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.hp-story-highlight {
  outline: 2px solid var(--cyan, #00e5ff);
  outline-offset: -2px;
  animation: hp-highlight-pulse 1.5s ease-out;
}
@keyframes hp-highlight-pulse {
  0% { outline-color: rgba(0,229,255,0.9); }
  100% { outline-color: transparent; }
}
.hp-story-gradient {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  z-index: 1;
}
.hp-story-header {
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 70%, transparent 100%);
  padding: 16px 100px 20px 20px;
  flex-shrink: 0;
}
/* Score points on story cards */
.hp-story-score-wrap { margin-top: 10px; }
.hp-story-score-bar {
  height: 6px; border-radius: 3px; background: rgba(255,255,255,0.15);
  overflow: hidden;
}
.hp-story-score-bar-fill {
  height: 100%; border-radius: 3px; background: rgba(255,255,255,0.5);
  transition: width 0.4s ease;
}
.hp-story-score-bar-fill.mid { background: rgba(255, 215, 0, 0.8); }
.hp-story-score-bar-fill.partial { background: rgba(255, 215, 0, 0.8); }
.hp-story-score-bar-fill.high { background: rgba(76, 175, 80, 0.85); }
.hp-story-score-label {
  font-family: 'Oxanium', monospace; font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.45); letter-spacing: 0.05em; margin-top: 4px;
}
.hp-story-score-label.mid { color: rgba(255, 215, 0, 0.7); }
.hp-story-score-label.partial { color: rgba(255, 215, 0, 0.7); }
.hp-story-score-label.high { color: rgba(76, 175, 80, 0.75); }
.hp-story-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
}
.hp-story-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.hp-story-time {
  font-family: 'Oxanium', monospace;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.05em;
  margin-top: 3px;
}
.hp-story-body-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hp-story-body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.5) 15%, rgba(0,0,0,0.75) 100%);
  padding: 32px 28px 28px;
  max-height: 140px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 50%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 50%, transparent 100%);
  cursor: pointer;
  transition: max-height 0.3s ease;
}
.hp-story-body.expanded {
  max-height: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 10%);
}
.hp-story-body strong, .hp-story-body b { color: rgba(255,255,255,0.95); font-weight: 600; }
.hp-story-body em, .hp-story-body i { color: rgba(255,255,255,0.7); }
.hp-story-body a { color: rgba(255,255,255,0.9); text-decoration: underline; text-underline-offset: 2px; }
.hp-story-body a:hover { color: #fff; }
.hp-story-body p { margin: 0 0 8px; }
.hp-story-body p:last-child { margin-bottom: 0; }
.hp-story-body img { display: none; }

/* Slide / PowerPoint style for story cards */
.slide-category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
}
.slide-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}
.slide-bullets li {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  line-height: 1.4;
  padding: 6px 0 6px 20px;
  position: relative;
}
.slide-bullets li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: rgba(255,255,255,0.5);
  font-size: 22px;
  line-height: 1.3;
}
.slide-meta {
  font-family: 'Oxanium', monospace;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 8px;
}
.slide-link {
  margin-top: 8px;
}
.slide-link a {
  color: rgba(0,229,255,0.9);
  font-size: 12px;
  text-decoration: none;
}
.slide-link a:hover {
  color: #fff;
}
.hp-story-btn-bar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  gap: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
}
.hp-story-btn-bar > .hp-story-bar-btn:first-child { border-radius: 7px 0 0 7px; }
.hp-story-btn-bar > .hp-story-bar-btn:last-child { border-radius: 0 7px 7px 0; }
.hp-story-btn-bar > .hp-story-bar-btn:only-child { border-radius: 7px; }
.hp-story-btn-bar > .hp-card-mode-dropdown:first-child .hp-mode-trigger { border-radius: 7px 0 0 7px; }
.hp-story-btn-bar > .hp-card-mode-dropdown:last-child .hp-mode-trigger,
.hp-story-btn-bar > .hp-card-mode-dropdown:only-child .hp-mode-trigger { border-radius: 0 7px 7px 0; }
.hp-story-bar-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  transition: background 0.15s, color 0.15s;
}
.hp-story-bar-btn:hover { background: rgba(255,255,255,0.22); color: #fff; }
.hp-story-bar-btn.active { color: var(--accent, #4a9eff); }
.hp-story-bar-btn + .hp-story-bar-btn { border-left: 1px solid rgba(255,255,255,0.12); }
.hp-card-mode-dropdown { position: relative; }
.hp-mode-trigger { display: flex; align-items: center; gap: 3px; }
.hp-mode-icon { display: flex; align-items: center; }
.hp-mode-caret { opacity: 0.5; margin-left: 1px; }
.hp-mode-menu {
  position: absolute; top: 100%; right: 0; margin-top: 4px;
  background: rgba(20,20,28,0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 8px;
  overflow: hidden; min-width: 120px; z-index: 10;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.hp-mode-menu.hidden { display: none; }
.hp-mode-option {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: none; color: rgba(255,255,255,0.7);
  padding: 8px 12px; cursor: pointer; font-size: 12px;
  transition: background 0.12s;
}
.hp-mode-option:hover { background: rgba(255,255,255,0.1); color: #fff; }
.hp-mode-option.active { color: var(--accent, #4a9eff); }
.hp-mode-option + .hp-mode-option { border-top: 1px solid rgba(255,255,255,0.06); }
.hp-story-bg.svg-bg { animation: none !important; }
.hp-story-bg.svg-bg svg { opacity: 0.7; }
.hp-story-bg.svg-bg svg > *:nth-child(odd) { animation: svg-drift-a 18s ease-in-out infinite; }
.hp-story-bg.svg-bg svg > *:nth-child(even) { animation: svg-drift-b 22s ease-in-out infinite; }
.hp-story-bg.svg-bg svg > *:nth-child(3n) { animation: svg-drift-c 26s ease-in-out infinite; }

/* Mind map / Knowledge graph: no animations, fully opaque, interactive */
/* Card chat overlay */
.card-chat-overlay {
  position: absolute;
  inset: 0;
  z-index: 15;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
}
.card-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.card-chat-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.card-chat-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}
.card-chat-close:hover { color: #fff; }
.card-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  min-height: 0;
}
.card-chat-messages .chat-msg { color: rgba(255,255,255,0.85); }
.card-chat-messages .chat-msg.user { background: rgba(255,255,255,0.08); }
.card-chat-messages .chat-msg.assistant { background: rgba(0,229,255,0.06); }
.card-chat-messages .chat-msg.note { background: rgba(255,255,255,0.05); }
.card-chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.card-chat-input {
  flex: 1;
  resize: none;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: #fff;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
}
.card-chat-input::placeholder { color: rgba(255,255,255,0.35); }
.card-chat-input:focus { outline: none; border-color: rgba(0,229,255,0.4); }
.card-chat-mode-picker { flex-shrink: 0; }

/* Knowledge graph D3 styles */
.kg-frame { width: 100%; height: 100%; min-height: 500px; background: transparent; }
.kg-node circle { transition: fill-opacity 0.2s, r 0.2s, filter 0.2s; }
.kg-node text { pointer-events: none; user-select: none; transition: opacity 0.2s; }
.kg-links path { pointer-events: none; }
.kg-edge-labels text { pointer-events: none; user-select: none; opacity: 0; transition: opacity 0.3s; }
.kg-node:hover ~ .kg-edge-labels text { opacity: 1; }
@keyframes kg-pulse {
  0%, 100% { filter: drop-shadow(0 0 4px var(--kg-glow)); }
  50% { filter: drop-shadow(0 0 10px var(--kg-glow)); }
}
@keyframes svg-drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(8px, -6px) scale(1.03); }
  66% { transform: translate(-5px, 4px) scale(0.98); }
}
@keyframes svg-drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-6px, 8px) scale(1.02); }
  75% { transform: translate(4px, -5px) scale(0.97); }
}
@keyframes svg-drift-c {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(6px, 3px) rotate(2deg); }
}
.hp-story-actions {
  margin-top: 0;
  padding: 4px 28px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.75);
}
.hp-story-ts {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.03em;
  margin-left: auto;
}
.hp-story-task-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0;
  padding: 0 28px 8px;
  background: rgba(0,0,0,0.75);
}
.hp-story-task-links:empty { display: none; }
.hp-story-task-link {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s, color 0.15s;
}
.hp-story-task-link:hover { background: rgba(255,255,255,0.2); color: #fff; }
.hp-story-task-link svg { flex-shrink: 0; }
.hp-story-updated {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hp-story-updated span {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.03em;
}
.hp-story-refresh-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.hp-story-refresh-btn:hover { color: rgba(255,255,255,0.7); }
.hp-story-refresh-btn.refreshing svg { animation: spin 1s linear infinite; }
.hp-stories-dots {
  display: none;
}
.hp-stories-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.hp-stories-dot.active {
  background: #fff;
  transform: scale(1.3);
}
.hp-stories-dot-gap {
  width: 7px;
  height: 6px;
}
.hp-columns { display: flex; gap: 0; }
.hp-col { flex: 1; min-width: 0; }
.hp-columns { position: relative; align-items: flex-start; }
.hp-section { margin-bottom: 20px; }
.hp-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--fg3); margin-bottom: 8px;
  padding-bottom: 4px; border-bottom: 1px solid var(--border);
}
#hp-rotator-title { font-size: 16px; color: var(--fg); }
#hp-news-meetups-rotator > .hp-section > .hp-section-title { border-bottom: none; padding-bottom: 0; margin-bottom: 4px; }
.hp-section-chat { opacity: 0.3; transition: opacity 0.15s; }
.hp-section-title:hover .hp-section-chat { opacity: 0.8; }
.hp-item {
  font-size: 13px; color: var(--fg); padding: 4px 0;
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
.hp-item-name { flex: 1; min-width: 0; }
.hp-clickable { cursor: pointer; }
.hp-clickable:hover .hp-item-name { color: var(--accent); }
.hp-item[onclick] { cursor: pointer; }
.hp-item[onclick]:hover .hp-item-name { color: var(--accent); }
.hp-done { opacity: 0.4; }
.hp-done .hp-item-name { text-decoration: line-through; }
.hp-time { font-size: 11px; color: var(--fg3); min-width: 42px; flex-shrink: 0; }
.hp-tokens {
  font-size: 10px; color: var(--accent); background: rgba(99,102,241,0.12);
  padding: 1px 5px; border-radius: 8px; flex-shrink: 0;
}
.hp-badge {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  background: rgba(59,130,246,0.15); color: #60a5fa;
  padding: 1px 5px; border-radius: 4px; flex-shrink: 0;
}
.hp-check { color: var(--accent); font-size: 12px; }
.hp-meta { font-size: 11px; color: var(--fg3); flex-shrink: 0; }
.hp-loc { font-size: 11px; color: var(--fg3); }
.hp-preview {
  width: 100%; font-size: 11px; color: var(--fg3); line-height: 1.4;
  margin-top: 2px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.hp-status-row {
  display: flex; gap: 16px; font-size: 12px; color: var(--fg2);
}
.hp-empty {
  text-align: center; color: var(--fg3); font-size: 13px; padding: 40px 20px;
}
.hp-empty-inline { color: var(--fg3); font-size: 12px; padding: 4px 0; }
.hp-goal { margin-bottom: 10px; display: flex; gap: 10px; align-items: flex-start; }
.hp-goal:last-child { margin-bottom: 0; }
.hp-goal-thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex-shrink: 0; margin-top: 1px; }
.hp-goal-thumb-placeholder { width: 40px; height: 40px; border-radius: 6px; flex-shrink: 0; margin-top: 1px; background: var(--bg2, #161b22); }
.hp-goal-body { flex: 1; min-width: 0; }
.hp-goal-title {
  font-size: 13px; font-weight: 600; color: var(--fg); margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
.hp-goal-task { padding-left: 10px; font-size: 12px; color: var(--fg2); font-weight: 400; }
.hp-section-chevron { font-size: 9px; margin-right: 4px; display: inline-block; transition: transform 0.15s; }
.hp-section-hidden { display: none; }
.hp-section-collapsible:hover { color: var(--fg2); }
.hp-right-list { display: flex; flex-direction: column; gap: 2px; }
.hp-right-list-item { padding: 5px 0; border-bottom: 1px solid var(--border, #333); }
.hp-right-list-item:last-child { border-bottom: none; }
.hp-right-list-item[onclick]:hover .hp-right-list-name { color: var(--accent); }
.hp-right-list-name { font-size: 12px; font-weight: 500; color: var(--fg); line-height: 1.3; }
.hp-right-list-meta { font-size: 11px; color: var(--fg3); margin-top: 1px; }
.hp-news-item { padding: 6px 0; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; }
.hp-news-item:hover .hp-news-headline { color: var(--accent); }
.hp-news-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 4px; flex-shrink: 0; margin-top: 2px; }
.hp-news-headline { font-size: 13px; font-weight: 600; color: var(--fg); line-height: 1.3; }
.hp-news-desc { font-size: 11px; color: var(--fg3); line-height: 1.4; margin-top: 2px; }
.hp-news-narrative { font-size: 13px; color: var(--fg2); line-height: 1.6; column-count: 2; column-gap: 28px; column-rule: 1px solid var(--border, #333); }
.hp-news-narrative-img { width: 110px; height: 74px; object-fit: cover; border-radius: 5px; }
.hp-news-narrative-img.img-left { float: left; margin: 2px 10px 6px 0; }
.hp-news-narrative-img.img-right { float: right; margin: 2px 0 6px 10px; }
.hp-news-narrative a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,0.35); text-underline-offset: 2px; font-weight: 600; }
.hp-news-narrative a:hover { text-decoration-color: #fff; }
.hp-news-narrative strong { color: var(--fg); }
.hp-news-narrative p { margin: 0 0 6px 0; }
.hp-narrative-heading { font-size: 16px; font-weight: 700; color: var(--fg); margin: 10px 0 2px; letter-spacing: 0.3px; clear: both; display: flex; align-items: center; gap: 6px; }
.hp-narrative-chat-btn { opacity: 0.3; transition: opacity 0.15s; flex-shrink: 0; }
.hp-narrative-chat-btn:hover { opacity: 0.8; }
.hp-wx-hero { float: left; margin: 2px 12px 8px 0; width: 130px; border-radius: 8px; background: var(--bg2, #161b22); display: flex; flex-direction: column; flex-shrink: 0; padding: 8px 10px; gap: 0; }
.hp-wx-hero-today { display: flex; align-items: center; gap: 6px; }
.hp-wx-hero-icon { font-size: 38px; line-height: 1; }
.hp-wx-hero-info { display: flex; flex-direction: column; }
.hp-wx-hero-temp { font-size: 22px; font-weight: 700; color: var(--fg); line-height: 1.1; }
.hp-wx-hero-hilo { font-size: 11px; color: var(--fg3, #8b949e); font-weight: 500; }
.hp-wx-hero-days { border-top: 1px solid var(--border, #30363d); margin-top: 6px; padding-top: 5px; display: flex; flex-direction: column; gap: 3px; }
.hp-wx-hero-day { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--fg2, #c9d1d9); }
.hp-wx-hero-day-label { width: 32px; font-weight: 600; font-size: 10px; color: var(--fg3, #8b949e); text-transform: uppercase; }
.hp-wx-hero-day-icon { font-size: 14px; line-height: 1; }
.hp-wx-hero-day-range { font-size: 11px; font-weight: 500; }
#hp-rotator-content { transition: opacity 0.3s ease; }
.hp-rotator-nav { display: flex; align-items: center; gap: 6px; }
.hp-rotator-arrow { background: none; border: none; color: var(--fg3); cursor: pointer; padding: 4px 10px; font-size: 18px; line-height: 1; }
.hp-rotator-arrow:hover { color: var(--fg); }
.hp-rotator-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--fg3); opacity: 0.35; border: none; padding: 0; cursor: pointer; transition: opacity 0.2s; }
.hp-rotator-dot.active { opacity: 1; background: var(--fg); }
#hp-rotator-dots { display: flex; align-items: center; gap: 6px; }
.hp-score-wx-row { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.hp-score-section { flex: 1; min-width: 0; padding-right: 32px; }
.hp-efficiency-row { display: flex; align-items: flex-start; gap: 48px; }
.hp-efficiency-col { flex: 1; min-width: 0; }
.hp-efficiency-col .hp-section-title { margin-bottom: 4px; }
.hp-score-body { }
.hp-score-number {
  float: left; font-size: 54px; font-weight: 700; color: var(--fg); line-height: 1;
  margin: 0 14px 4px 0;
}
.hp-score-number.hp-friend-score { color: #555; }
.hp-score-text { font-size: 11px; color: var(--fg3); line-height: 1.4; }
.hp-friend-list { margin-top: 4px; }
.hp-wx-current {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px;
}
.hp-wx-icon { font-size: 18px; }
.hp-wx-temp { font-size: 20px; font-weight: 700; color: var(--fg); }
.hp-wx-label { font-size: 13px; color: var(--fg2); }
.hp-wx-range { font-size: 11px; color: var(--fg3); }
.hp-wx-details { font-size: 11px; color: var(--fg3); margin-bottom: 8px; }
.hp-wx-summary { font-size: 11px; color: var(--fg3); line-height: 1.4; margin-top: 8px; }
#hp-weather-section { min-width: 0; max-width: 200px; }
.hp-wx-forecast { display: flex; gap: 12px; margin-top: 6px; }
.hp-wx-fc-block {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; color: var(--fg2);
}
.hp-wx-fc-time { font-size: 10px; color: var(--fg3); }
.hp-wx-fc-temp { font-weight: 600; color: var(--fg); }
.hp-section-divider { height: 1px; background: var(--border); margin: 24px 0 20px; }
.score-narrative p { margin: 0 0 10px; font-style: italic; color: var(--fg); }
.score-narrative strong { color: #fff; font-weight: 600; }
.score-narrative ul { margin: 4px 0 0; padding-left: 20px; font-style: normal; font-size: 13px; }
.score-narrative li { margin-bottom: 6px; color: var(--fg2); }
.score-narrative li strong { color: #fff; }
.score-narrative li:first-child strong { color: #fff; }
.score-narrative li:not(:first-child) strong { color: var(--fg2); }
.score-narrative-card {
  margin: 12px 8px 0; padding: 10px 14px;
  border-left: 3px solid rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.03);
  border-radius: 0 6px 6px 0;
  font-size: 13px; line-height: 1.6; color: var(--fg2); font-style: italic; text-align: left;
}
.score-narrative-card p { margin: 0 0 8px; }
.score-narrative-card p:last-child { margin-bottom: 0; }
.score-narrative-card strong { color: #fff; font-weight: 600; }
.score-narrative-card ul { margin: 4px 0 0; padding-left: 20px; font-style: normal; font-size: 13px; }
.score-narrative-card li { margin-bottom: 6px; color: var(--fg2); }
.score-narrative-card li strong { color: #fff; }
.hp-journal-section { }
.hp-journal-heading {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--fg3); margin-bottom: 12px;
}
.hp-journal-generate {
  text-align: center; padding: 20px 0;
}

/* Meeting history hint & results */
.meeting-history-hint {
  margin-top: 8px; padding: 8px 12px; background: var(--bg3); border-radius: var(--radius);
  font-size: 12px; color: var(--primary); cursor: pointer; display: flex; align-items: center; gap: 6px;
  transition: background 0.15s;
}
.meeting-history-hint:hover { background: var(--bg4, var(--bg3)); filter: brightness(1.15); }
.meeting-history-results { margin-top: 8px; }
.meeting-history-item {
  padding: 8px 10px; background: var(--bg3); border-radius: var(--radius);
  margin-bottom: 4px; border-left: 2px solid var(--accent);
}

/* Knowledge graph focus ring animation */
@keyframes kg-focus-spin { to { stroke-dashoffset: -14; } }
.kg-focus-ring {
  animation: kg-focus-spin 1.2s linear infinite;
}

