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

:root {
  --bg: #121214;
  --surface: #1a1a1e;
  --surface-hover: #222226;
  --surface-raised: #25252a;
  --white: #f2f2f0;
  --text: #e8e8e6;
  --text-secondary: #a0a0a0;
  --text-muted: #666668;
  --border: #2a2a2e;
  --border-light: #333338;
  --accent: #4361ee;
  --accent-bright: #6b8cff;
  --accent-surface: rgba(67,97,238,0.12);
  --red: #e63946;
  --red-surface: rgba(230,57,70,0.1);
  --orange: #d4840a;
  --orange-surface: rgba(212,132,10,0.1);
  --green: #2d6a4f;
  --green-bright: #40916c;
  --green-surface: rgba(45,106,79,0.12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 4px;
  --radius-md: 6px;
  --shadow: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --transition: 0.15s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-bright); text-decoration: none; }
a:hover { color: var(--white); }

/* Header */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.logo {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.logo span { color: var(--white); }

nav { display: flex; gap: 2px; }

nav a {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: all var(--transition);
}

nav a:hover { color: var(--text); background: var(--surface-hover); text-decoration: none; }
nav a.active { color: var(--white); background: var(--surface-raised); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 2rem 3rem;
}

/* Stats bar */
.stats { display: flex; gap: 0.75rem; margin-bottom: 1.25rem; }

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  flex: 1;
  text-align: center;
}

.stat-number {
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-number.red { color: var(--red); }
.stat-number.orange { color: var(--orange); }
.stat-number.accent { color: var(--accent-bright); }

.stat-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 0.15rem;
}

/* Search */
.search-bar { margin-bottom: 1.25rem; }

.search-bar input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}

.search-bar input:focus { border-color: var(--accent); }
.search-bar input::placeholder { color: var(--text-muted); }

/* Filter bar */
.filter-bar { display: flex; gap: 0.35rem; margin-bottom: 1rem; }

.filter-chip {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-chip:hover { border-color: var(--border-light); color: var(--text); }

.filter-chip.active {
  background: var(--accent-surface);
  border-color: var(--accent);
  color: var(--accent-bright);
}

/* Task cards */
.task-list { display: flex; flex-direction: column; gap: 2px; }

.task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}

.task-card:hover { border-color: var(--border-light); }
.task-card.expanded { border-color: var(--accent); }

.task-header {
  padding: 0.7rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  user-select: none;
  transition: background var(--transition);
  min-height: 42px;
}

.task-header:hover { background: var(--surface-hover); }

.task-name-block { flex: 1; min-width: 0; }

.task-context {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.005em;
}

/* Spec badge (parsed from task name) */
.spec-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  background: var(--accent-surface);
  color: var(--accent-bright);
  flex-shrink: 0;
  text-transform: uppercase;
}

.task-due {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.task-due.overdue { background: var(--red-surface); color: var(--red); }
.task-due.today { background: var(--orange-surface); color: var(--orange); }
.task-due.upcoming { background: var(--accent-surface); color: var(--accent-bright); }
.task-due.none { color: var(--text-muted); }
.task-due.completed { background: var(--green-surface); color: var(--green-bright); }

.expand-icon {
  font-size: 9px;
  color: var(--text-muted);
  transition: transform 0.2s, color 0.2s;
  flex-shrink: 0;
}

.task-card.expanded .expand-icon { transform: rotate(90deg); color: var(--accent-bright); }

/* Task detail */
.task-detail {
  display: none;
  padding: 0 1rem 0.85rem;
  border-top: 1px solid var(--border);
}

.task-card.expanded .task-detail { display: block; }

/* Parent context block */
.parent-context {
  background: var(--bg);
  border: 1px solid var(--accent);
  border-left: 3px solid var(--accent-bright);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 0.65rem 0;
}

.parent-header { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.parent-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
  background: var(--accent-surface);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  flex-shrink: 0;
}

.parent-name { font-size: 13px; font-weight: 600; color: var(--white); flex: 1; }

.parent-link {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-bright);
  flex-shrink: 0;
}

.parent-notes {
  margin-top: 0.5rem;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.parent-attachments { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }

.parent-attachment {
  font-size: 11px;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}

.parent-attachment:hover { border-color: var(--accent); color: var(--white); text-decoration: none; }

.parent-comments-toggle { margin-top: 0.5rem; }

.parent-comments-toggle summary {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem 0;
}

.parent-comments-toggle summary:hover { color: var(--text); }

.parent-comments-list { border-top: 1px solid var(--border); margin-top: 0.3rem; }
.parent-comments-list .comment { font-size: 12px; }

.task-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.65rem 0; }

.meta-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.task-notes {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin: 0.65rem 0;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  position: relative;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.task-notes:empty { display: none; }

.task-notes .copy-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: var(--font);
  transition: all var(--transition);
}

.task-notes .copy-btn:hover { color: var(--white); border-color: var(--border-light); }

/* Comments */
.comments-section { margin-top: 0.65rem; }

.comments-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 0.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.comment { padding: 0.55rem 0; border-bottom: 1px solid var(--border); font-size: 13px; line-height: 1.6; }
.comment:last-child { border-bottom: none; }
.comment-author { font-weight: 600; color: var(--white); font-size: 12px; }
.comment-date { font-size: 10px; color: var(--text-muted); margin-left: 0.4rem; }
.comment-text { margin-top: 0.2rem; color: var(--text-secondary); white-space: pre-wrap; word-break: break-word; }
.comment-text a { color: var(--accent-bright); }

/* Section headers */
.section-header {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 1rem 0 0.4rem;
}

/* =============================================
   COPY BRIDGE
   ============================================= */

.copy-bridge {
  background: var(--bg);
  border: 1px solid var(--green);
  border-left: 3px solid var(--green-bright);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 0.65rem 0;
}

.copy-bridge-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.copy-bridge-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-bright);
  background: var(--green-surface);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

.copy-bridge-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.copy-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.copy-item:last-child { border-bottom: none; }

.copy-item-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.2rem;
}

.copy-item-status {
  display: inline-block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.copy-item-status.done { background: var(--green-surface); color: var(--green-bright); }
.copy-item-status.pending { background: var(--orange-surface); color: var(--orange); }

.copy-item-text {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
}

/* =============================================
   ASSET MATRIX
   ============================================= */

.asset-matrix {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin: 0.65rem 0;
}

.asset-matrix-header {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.asset-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.asset-row:last-child { border-bottom: none; }

.asset-check {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1.5px solid var(--border-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}

.asset-check.done { background: var(--green); border-color: var(--green); color: var(--white); }
.asset-check.current { background: var(--accent); border-color: var(--accent); color: var(--white); }

.asset-name { flex: 1; color: var(--text-secondary); }
.asset-name.current { color: var(--white); font-weight: 600; }
.asset-name.done { color: var(--text-muted); text-decoration: line-through; }

.asset-assignee {
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* =============================================
   DESIGN BRIEF PANEL
   ============================================= */

.brief-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  margin-top: 0.65rem;
}

.brief-panel-toggle {
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-bright);
  list-style: none;
  user-select: none;
}

.brief-panel-toggle::-webkit-details-marker { display: none; }

.brief-panel-toggle::before {
  content: '\25B8';
  margin-right: 0.5rem;
  font-size: 8px;
  transition: transform 0.15s;
}

.brief-panel[open] > .brief-panel-toggle::before { transform: rotate(90deg); }

.brief-panel-body {
  padding: 0 0.85rem 0.75rem;
  border-top: 1px solid var(--border);
}

.brief-context-wrap {
  display: flex;
  gap: 0.4rem;
  margin: 0.5rem 0;
  align-items: flex-end;
}

.brief-context-input {
  flex: 1;
  font-family: var(--font);
  font-size: 12px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.65rem;
  resize: vertical;
  outline: none;
}

.brief-context-input:focus { border-color: var(--accent); }
.brief-context-input::placeholder { color: var(--text-muted); font-size: 11px; }

.brief-content {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  min-height: 120px;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-secondary);
  max-height: 50vh;
  overflow-y: auto;
}

.brief-content.loading-brief {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brief-content.loading-brief::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--border);
  border-top-color: var(--accent-bright);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 0.5rem;
}

.brief-actions { display: flex; gap: 0.35rem; margin-top: 0.5rem; }

/* =============================================
   DESIGN NOTES
   ============================================= */

.notes-section {
  margin-top: 0.65rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.notes-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.notes-status {
  font-size: 10px;
  color: var(--text-muted);
}

.design-notes-input {
  width: 100%;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  resize: vertical;
  min-height: 120px;
  outline: none;
  transition: border-color var(--transition);
}

.design-notes-input:focus { border-color: var(--accent); }
.design-notes-input::placeholder { color: var(--text-muted); }

.notes-actions { display: flex; gap: 0.35rem; margin-top: 0.5rem; }

/* Figma link input */
.figma-wrap {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
  align-items: center;
}

.figma-input {
  flex: 1;
  font-family: var(--font);
  font-size: 12px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.65rem;
  outline: none;
}

.figma-input:focus { border-color: var(--accent); }
.figma-input::placeholder { color: var(--text-muted); font-size: 11px; }

/* =============================================
   BUTTONS
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn:hover { border-color: var(--border-light); color: var(--white); background: var(--surface-hover); text-decoration: none; }

.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-bright); border-color: var(--accent-bright); color: var(--white); }

.btn-brief { border-color: var(--accent); color: var(--accent-bright); }
.btn-brief:hover { background: var(--accent-surface); color: var(--white); }

.btn-figma { border-color: #a259ff; color: #a259ff; }
.btn-figma:hover { background: rgba(162,89,255,0.12); color: #b87aff; border-color: #b87aff; }

.btn-success { background: var(--green) !important; border-color: var(--green) !important; color: var(--white) !important; }

/* =============================================
   BRAND KIT SIDEBAR
   ============================================= */

.brand-kit-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--accent-bright);
  color: var(--white);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(67,97,238,0.5);
  transition: all var(--transition);
  z-index: 9999;
}

.brand-kit-fab:hover { background: var(--accent-bright); transform: scale(1.05); }

.brand-kit-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
}

.brand-kit-overlay.open { display: block; }

.brand-kit {
  position: fixed;
  top: 0;
  right: -360px;
  width: 340px;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 301;
  transition: right 0.25s ease;
  overflow-y: auto;
}

.brand-kit.open { right: 0; }

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

.brand-kit-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
}

.brand-kit-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 0 0.25rem;
}

.brand-kit-close:hover { color: var(--white); }

.brand-kit-body { padding: 1rem 1.25rem; }

.bk-section { margin-bottom: 1.5rem; }

.bk-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 0.5rem;
}

.bk-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.2rem;
}

.bk-swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.bk-swatch {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.25rem;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.bk-swatch:hover { transform: scale(1.08); border-color: var(--white); }

.bk-swatch span {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

.bk-specs { display: flex; flex-direction: column; gap: 0.3rem; }

.bk-spec {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.bk-spec:hover { border-color: var(--accent); color: var(--white); }

.bk-spec span {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-bright);
  font-variant-numeric: tabular-nums;
}

/* Loading / Empty */
.loading, .empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loading::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--border);
  border-top-color: var(--accent-bright);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 0.5rem;
  vertical-align: middle;
}

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

.error {
  background: var(--red-surface);
  border: 1px solid rgba(230,57,70,0.25);
  color: var(--red);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  font-size: 12px;
  margin-bottom: 0.75rem;
}

/* =============================================
   FEEDBACK FAB + TOUR FAB
   ============================================= */

.feedback-fab {
  position: fixed;
  bottom: 2rem;
  right: 5.5rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #d4840a;
  border: 2px solid #e8a020;
  color: var(--white);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(212,132,10,0.4);
  transition: all var(--transition);
  z-index: 9999;
}

.feedback-fab:hover { background: #e8a020; transform: scale(1.05); }

/* When tour is playing, ? button gets a pulsing ring */
.feedback-fab.tour-active {
  background: var(--accent);
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 0 rgba(67,97,238,0.6);
  animation: fab-pulse 2s ease-in-out infinite;
}

.feedback-fab.tour-active:hover { background: var(--accent-bright); }

@keyframes fab-pulse {
  0% { box-shadow: 0 0 0 0 rgba(67,97,238,0.6); }
  50% { box-shadow: 0 0 0 10px rgba(67,97,238,0); }
  100% { box-shadow: 0 0 0 0 rgba(67,97,238,0); }
}

.tour-fab {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 9999;
}

.tour-fab:hover { border-color: var(--accent); color: var(--accent-bright); }

/* =============================================
   VOICE TOUR — HIGHLIGHTS ONLY (NO BAR)
   ============================================= */

/* Tour start prompt (shown when autoplay is blocked) */
.tour-prompt {
  position: fixed;
  bottom: 5rem;
  right: 2rem;
  z-index: 10000;
  cursor: pointer;
  animation: prompt-in 0.4s ease;
}

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

.tour-prompt-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 28px;
  padding: 0.6rem 1.25rem 0.6rem 0.75rem;
  box-shadow: 0 4px 24px rgba(67,97,238,0.3);
  transition: all var(--transition);
}

.tour-prompt:hover .tour-prompt-inner {
  border-color: var(--accent-bright);
  box-shadow: 0 4px 30px rgba(67,97,238,0.5);
}

.tour-prompt-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.tour-prompt-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
}

/* Tour highlight effect on page elements */
.tour-highlight {
  position: relative;
  box-shadow: 0 0 0 2px var(--accent-bright), 0 0 20px rgba(67,97,238,0.3) !important;
  border-radius: var(--radius-md);
  transition: box-shadow 0.3s ease;
  z-index: 10;
}

.tour-highlight::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid var(--accent-bright);
  border-radius: 8px;
  opacity: 0;
  animation: tour-pulse 1.5s ease-in-out infinite;
  pointer-events: none;
}

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

/* Tour callout card (for features inside task detail) */
.tour-callout {
  display: none;
  position: fixed;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 1.5rem 2rem;
  z-index: 10001;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 30px rgba(67,97,238,0.15);
  width: 320px;
  max-width: 80vw;
  animation: callout-in 0.3s ease;
}

.tour-callout.show { display: block; }

@keyframes callout-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.tour-callout-icon {
  font-size: 28px;
  margin-bottom: 0.5rem;
}

.tour-callout-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.3rem;
}

.tour-callout-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* =============================================
   FEEDBACK MODAL
   ============================================= */

.feedback-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.feedback-overlay.open { display: flex; }

.feedback-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 440px;
  max-width: 90vw;
  overflow: hidden;
}

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

.feedback-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
}

.feedback-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

.feedback-close:hover { color: var(--white); }

.feedback-body { padding: 1.25rem; }

.feedback-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.feedback-type {
  width: 100%;
  font-family: var(--font);
  font-size: 13px;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  margin-bottom: 0.75rem;
  outline: none;
}

.feedback-type:focus { border-color: var(--accent); }

.feedback-input {
  width: 100%;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.6;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  resize: vertical;
  outline: none;
  margin-bottom: 0.75rem;
}

.feedback-input:focus { border-color: var(--accent); }
.feedback-input::placeholder { color: var(--text-muted); }

.feedback-submit-btn {
  width: 100%;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  padding: 0.75rem;
  border-radius: var(--radius);
  background: #d4840a;
  border: none;
  color: var(--white);
  cursor: pointer;
  transition: all var(--transition);
}

.feedback-submit-btn:hover { background: #e8a020; }
.feedback-submit-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.feedback-success {
  display: none;
  text-align: center;
  padding: 0.75rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--green-bright);
  margin-top: 0.5rem;
}

.feedback-success.show { display: block; }

/* Responsive */
@media (max-width: 640px) {
  .header { padding: 0 1rem; }
  .container { padding: 1rem; }
  .stats { flex-wrap: wrap; }
  .stat { min-width: calc(33% - 0.5rem); }
  .task-header { padding: 0.65rem 0.75rem; }
  .task-detail { padding: 0 0.75rem 0.75rem; }
  .brand-kit { width: 100%; right: -100%; }
  .tour-modal { padding: 1.5rem 1.25rem 1.25rem; }
  .feedback-fab { right: 4.5rem; width: 44px; height: 44px; font-size: 15px; }
}
