:root {
  /* Surfaces — Spotify-inspired elevation */
  --bg: #111111;           /* matches canvas gradient edge */
  --panel: #1a1a1a;        /* elevated surface */
  --panel2: #242424;       /* higher elevation — cards, inputs */
  --border: #2e2e2e;       /* visible borders */

  /* Text — MDS hierarchy */
  --text: #e2e2e2;         /* high emphasis */
  --text-muted: #a0a0a0;   /* medium emphasis */
  --text-dim: #6a6a6a;     /* low emphasis */

  /* Accent — pitch green (lighter, softer than Spotify) */
  --accent: #34D399;       /* emerald — fresh, football-pitch feel */
  --accent-hover: #2BC486; /* darker for hover */
  --accent-subtle: rgba(52, 211, 153, 0.12); /* tinted backgrounds */

  /* Semantic surface tokens */
  --surface-hover: rgba(255,255,255,0.07);
  --surface-active: rgba(255,255,255,0.12);

  /* Arrow colours from kit */
  --col-run:  #F59E0B;
  --col-pass: #4ADE80;
  --col-line: #f94f4f;

  /* Kit team colours */
  --team-a: #8B5CF6;
  --team-b: #FBBF24;
  --gk-a:   #a8f0d0;
  --gk-b:   #f4cca8;

  /* Spacing scale — 4px base */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;

  /* Radius scale */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Layout */
  --toolbar-w: 210px;
  --panel-w: 320px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Manrope', 'Poppins', sans-serif;
  background: var(--bg); color: var(--text);
  height: 100vh; display: flex; overflow: hidden; user-select: none;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── Toolbar ── Full-height panel, seated below topbar (Figma/Linear pattern) */
#toolbar {
  width: 210px; min-width: 210px;
  background: var(--panel);
  border: none;
  border-right: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  display: flex; flex-direction: column;
  padding: 0; gap: 0; z-index: 150; overflow: visible; position: relative;
  margin: 52px 0 0 0; /* sits below fixed 52px topbar */
  align-self: stretch;
  height: calc(100vh - 52px);
  max-height: calc(100vh - 52px);
}
.toolbar-scroll {
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: visible;
  flex: 1; min-height: 0;
  scrollbar-width: thin;
  padding: 0;
}
.toolbar-scroll::-webkit-scrollbar { width: 3px; }
.toolbar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* Toolbar collapse toggle */
.toolbar-toggle {
  position: fixed; left: var(--toolbar-w); top: 50%; transform: translateY(-50%);
  width: 14px; height: 48px; z-index: 160;
  background: rgba(26, 26, 30, 0.85); border: 1px solid rgba(255,255,255,0.1);
  border-left: none; border-radius: 0 8px 8px 0;
  color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, background 0.15s, left 0.3s ease;
  padding: 0;
}
.toolbar-toggle:hover { color: var(--text); background: rgba(26, 26, 30, 1); }
.toolbar-toggle svg { transition: transform 0.3s ease; }

/* Toolbar collapse/expand */
#toolbar { transition: width 0.3s ease, min-width 0.3s ease, opacity 0.3s ease, border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease; }
#toolbar .toolbar-scroll,
#toolbar .tool-group-save,
#toolbar .tool-group-account,
#toolbar .sidebar-terms-link { transition: opacity 0.2s ease; }
#toolbar.collapsed { width: 0 !important; min-width: 0 !important; padding: 0; border-color: transparent; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; overflow: hidden; }
#toolbar.collapsed .toolbar-scroll,
#toolbar.collapsed .tool-group-save,
#toolbar.collapsed .tool-group-account,
#toolbar.collapsed .sidebar-terms-link { opacity: 0; pointer-events: none; }
.toolbar-toggle.collapsed { left: 0; }
.toolbar-toggle.collapsed svg { transform: rotate(180deg); }
.tool-logo {
  position: fixed; top: 14px; left: 25px; z-index: 200;
  font-family: 'Outfit', sans-serif;
  font-size: 16px; font-weight: 800; letter-spacing: 3px;
  color: var(--text); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.beta-badge {
  display: inline-block; font-family: 'Manrope', sans-serif;
  font-size: 8px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--accent); border: 1px solid var(--accent);
  padding: 2px 5px; border-radius: 3px;
  opacity: 0.8;
}
.tool-sep { display: none; }

/* Tool groups — panel sections with 2-column grid */
.tool-group {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
}
.tool-group:last-child { border-bottom: none; }
.tool-group-title {
  grid-column: 1 / -1; /* span full width */
  font-size: 9px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-dim);
  margin: 0 0 2px; padding: 0;
}
.tool-group-save {
  grid-template-columns: 1fr; margin-top: auto;
  border-top: 1px solid var(--border);
  border-bottom: none;
}
.sidebar-terms-link {
  display: flex; align-items: center; justify-content: center;
  min-height: 28px;
  text-align: center; padding: 10px 0 12px;
  font-size: 10px; color: rgba(255,255,255,0.2); text-decoration: none;
  transition: color 0.15s;
}
.sidebar-terms-link:hover { color: rgba(255,255,255,0.45); }
.rondos-brand {
  display: flex; flex-direction: row; align-items: center;
  gap: 6px; position: fixed; bottom: 20px; left: 20px;
  opacity: 0.4; z-index: 50;
}
/* Prototype: inside full-height toolbar, show Rondos inside sidebar footer */
body:not(.mobile-layout) .rondos-brand { display: none; }
.rondos-brand:hover { opacity: 0.7; }
.rondos-logo {
  filter: grayscale(1) brightness(1.5);
  opacity: 0.6;
}
.rondos-powered {
  font-family: 'Manrope', sans-serif; font-size: 11px;
  color: rgba(255,255,255,0.6); letter-spacing: 0.3px;
}
.rondos-name {
  font-family: 'Manrope', sans-serif; font-size: 11px;
  font-weight: 700; color: rgba(255,255,255,0.7);
  letter-spacing: 3px;
}
.tool-btn {
  width: 100%; height: 48px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: transparent;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; transition: all 0.15s; color: var(--text-muted); position: relative;
}
.tool-btn svg { flex-shrink: 0; }
.tool-label {
  font-size: 9px; font-weight: 600; letter-spacing: 0.02em;
  line-height: 1; opacity: 0.6; white-space: nowrap;
}
.tool-btn:hover { background: var(--surface-hover); color: var(--text); }
.tool-btn:hover .tool-label { opacity: 1; }
.tool-btn.active { background: var(--surface-active); color: var(--text); border-color: rgba(255,255,255,0.15); }
.tool-btn.active .tool-label { opacity: 1; color: var(--text); }
.tool-btn.danger { color: #F87171; }
.tool-btn.danger:hover { background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.2); }
.tool-btn.danger .tool-label { color: #F87171; }

/* ─── Reusable "New" badge — add class .has-badge to any .tool-btn ─── */
.badge-new {
  position: absolute; top: 2px; right: 2px;
  font-size: 7px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  color: #fff; background: linear-gradient(135deg, #f43f5e, #e11d48);
  padding: 1.5px 4px; border-radius: 4px; line-height: 1.1;
  box-shadow: 0 1px 4px rgba(228,30,72,0.4);
  pointer-events: none; z-index: 2;
  animation: badge-pulse 2.5s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.7; }
}

/* ─── Reusable Feature Announcement Tooltip ─── */
.feature-announce {
  position: fixed; z-index: 10001;
  width: 280px; background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  overflow: hidden;
  animation: announce-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes announce-in {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.feature-announce-img {
  width: 100%; height: 140px; object-fit: cover;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: block;
}
.feature-announce-body { padding: 16px 18px 14px; }
.feature-announce-badge {
  display: inline-block; font-size: 9px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; color: #fff;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  padding: 3px 7px; border-radius: 5px; margin-bottom: 8px;
}
.feature-announce-title {
  font-size: 15px; font-weight: 700; color: #fff;
  margin-bottom: 6px; line-height: 1.3;
}
.feature-announce-text {
  font-size: 12px; color: rgba(255,255,255,0.55); line-height: 1.5;
  margin-bottom: 14px;
}
.feature-announce-cta {
  display: inline-block; padding: 7px 18px;
  background: var(--accent); color: #000;
  font-size: 12px; font-weight: 700; border-radius: 20px;
  border: none; cursor: pointer; transition: background 0.15s;
}
.feature-announce-cta:hover { background: var(--accent-hover); }
.feature-announce-close {
  position: absolute; top: 8px; right: 8px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,0.5); border: none; cursor: pointer;
  color: rgba(255,255,255,0.6); font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.feature-announce-close:hover { background: rgba(0,0,0,0.8); color: #fff; }
/* Arrow pointer on left side (default: position right) */
.feature-announce::before {
  content: ''; position: absolute;
  left: -7px; top: 20px;
  width: 14px; height: 14px;
  background: var(--panel2); border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}
/* Arrow pointer on bottom (position above) */
.feature-announce--above::before {
  left: 50%; top: auto; bottom: -7px;
  margin-left: -7px;
  border-left: none; border-bottom: none;
  border-right: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transform: rotate(-45deg);
}
/* Arrow pointer on top (position below) */
.feature-announce--below::before {
  left: 50%; top: -7px; bottom: auto;
  margin-left: -7px;
  border-left: 1px solid var(--border); border-bottom: none;
  border-right: none;
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
}

/* Tool bundles (flyout sub-options) */
.tool-bundle { position: relative; }
/* Small triangle indicator in bottom-right corner */
.tool-bundle > .tool-btn::after {
  content: ''; position: absolute; bottom: 4px; right: 4px;
  width: 0; height: 0;
  border: 3.5px solid transparent;
  border-bottom-color: rgba(255,255,255,0.3);
  border-right-color: rgba(255,255,255,0.3);
}
.bundle-menu {
  display: none; position: absolute; left: calc(100% + 10px); top: 0;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--space-1); z-index: 300; min-width: 155px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.tool-bundle.open .bundle-menu { display: block; }
.tool-bundle.open > .tool-btn { background: var(--surface-active); border-color: rgba(255,255,255,0.15); }
.bundle-option {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px; border: none; background: transparent;
  color: var(--text-muted); font-family: 'Manrope', sans-serif;
  font-size: 12px; font-weight: 500; border-radius: 8px;
  cursor: pointer; transition: all 0.12s; white-space: nowrap;
}
.bundle-option:hover { background: var(--surface-hover); color: var(--text); }
.bundle-option svg { flex-shrink: 0; }

/* Save button — prominent gold */
.tool-btn.save-btn {
  width: 100%; height: 42px; border-radius: 20px;
  background: #fff; color: #000;
  border-color: transparent;
  flex-direction: row; gap: 6px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15);
}
.tool-btn.save-btn:hover { background: #e0e0e0; color: #000; box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2); }
.save-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  line-height: 1;
}
.tool-tooltip { display: none; }

/* (arrow sub-buttons removed — arrows now use .tool-btn) */
.arrow-sub-btn .tool-tooltip { display: none; }

/* ── Top Bar with Mode Tabs ── */
#mode-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 52px; z-index: 100;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.mode-tab-group {
  display: inline-flex; gap: 2px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 3px;
  height: 36px;
  align-items: center;
}
.mode-tab {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 0 12px; height: 100%;
  min-width: 145px;
  border-radius: 7px;
  border: 1px solid transparent;
  font-family: 'Manrope', sans-serif; font-size: 12.5px; font-weight: 500;
  color: var(--text-dim); background: transparent;
  cursor: pointer; transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.mode-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}
.mode-tab.active {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.mode-tab.active:hover {
  background: rgba(255, 255, 255, 0.11);
}
.mode-tab svg { opacity: 0.55; transition: opacity 0.15s; }
.mode-tab.active svg { opacity: 1; }

/* ── Zoom Controls ── */
.zoom-controls {
  position: absolute; bottom: 20px; right: 20px;
  display: flex; align-items: center; gap: 2px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 3px;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.zoom-btn {
  width: 30px; height: 30px; border-radius: 6px;
  border: none; background: transparent; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.12s;
}
.zoom-btn:hover { background: var(--panel2); color: var(--text); }
.zoom-level {
  font-family: 'Manrope', sans-serif; font-size: 11px; font-weight: 600;
  color: var(--text-dim); min-width: 38px; text-align: center;
  user-select: none;
}
@media (max-width: 768px) {
  .zoom-controls { display: none !important; }
}

/* ── Notes Panel ── */
.notes-panel {
  position: fixed; right: calc(var(--panel-w) + 16px); top: 64px;
  width: 220px; height: 260px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; flex-direction: column;
  z-index: 50;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  animation: dashFadeIn 0.15s ease;
}
.notes-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 700;
  color: var(--text); letter-spacing: 0.3px;
  flex-shrink: 0;
}
.notes-header svg { color: var(--text-muted); }
.notes-save-status {
  margin-left: auto;
  font-family: 'Manrope', sans-serif; font-size: 10px; font-weight: 500;
  color: var(--accent); opacity: 0; transition: opacity 0.3s;
}
.notes-save-status.visible { opacity: 1; }
.notes-minimize-btn {
  width: 24px; height: 24px; border-radius: 6px;
  border: none; background: transparent; color: var(--text-dim);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.12s; flex-shrink: 0;
}
.notes-minimize-btn:hover { background: var(--panel2); color: var(--text); }
.notes-textarea {
  flex: 1; resize: none;
  padding: 12px 14px;
  background: transparent; border: none; outline: none;
  font-family: 'Manrope', sans-serif; font-size: 12px; line-height: 1.7;
  color: var(--text-muted);
}
.notes-textarea::placeholder { color: var(--text-dim); }
.notes-toggle-btn {
  position: fixed; right: calc(var(--panel-w) + 16px); top: 64px;
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--panel);
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 50; transition: all 0.15s;
}
.notes-toggle-btn:hover { border-color: #444; color: var(--text); background: var(--panel2); }
.notes-toggle-btn.has-notes { color: var(--accent); border-color: rgba(30,215,96,0.3); }
.notes-toggle-btn.announce-highlight {
  color: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 0 rgba(30,215,96,0.45);
  animation: notes-pulse 1.8s ease-in-out 3;
}
@keyframes notes-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(30,215,96,0.45); }
  50%  { box-shadow: 0 0 0 8px rgba(30,215,96,0); }
  100% { box-shadow: 0 0 0 0 rgba(30,215,96,0); }
}
@media (max-width: 768px) {
  .notes-panel { display: none !important; }
  .notes-toggle-btn { display: none !important; }
}

/* ── Canvas ── */
#canvas-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 64px 20px 20px; position: relative; overflow: hidden;
  background: var(--bg);
}
#canvas-wrap::after {
  display: none;
}
#pitch-wrap {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  min-width: 0; min-height: 0; width: 100%; height: 100%;
  max-width: 100%; max-height: 100%;
}
#pitch-container {
  position: relative; border-radius: 8px; overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 80px rgba(0,0,0,0.3);
}
#pitch-svg { display: block; }

/* ── Spotlight ── */
.spotlight-beam { mix-blend-mode: screen; }
.spotlight-glow { mix-blend-mode: screen; }

/* ── Right panel ── Full-height, seated below topbar (Figma/Linear pattern) */
#side-panel {
  width: var(--panel-w); background: var(--panel);
  border: none;
  border-left: 1px solid var(--border);
  border-radius: 0;
  display: flex; flex-direction: column;
  padding: 0; gap: 0; z-index: 10; overflow-y: auto;
  box-shadow: none;
  margin: 52px 0 0 0;
  height: calc(100vh - 52px);
  max-height: calc(100vh - 52px);
  align-self: stretch;
}
.panel-section {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}
.panel-section:last-child { border-bottom: none; }
.panel-section h3 {
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px;
}

/* ─── Collapsible sections ─── */
.panel-section h3.collapsible {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  margin-bottom: 0;
  padding: 2px 0;
  transition: color 0.15s;
}
.panel-section h3.collapsible:hover { color: var(--text-secondary); }
.panel-section h3.collapsible::after {
  content: '';
  width: 12px; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23888' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E") center/contain no-repeat;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.panel-section h3.collapsible.collapsed::after {
  transform: rotate(-90deg);
}
.panel-section .collapsible-body {
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin 0.25s ease;
  max-height: 800px;
  opacity: 1;
  margin-top: 10px;
}
.panel-section .collapsible-body.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}
.panel-section.inactive { opacity: 0.35; pointer-events: none; }
.panel-section.inactive h3::after { content: ' · select a player first'; font-weight:400; text-transform:none; letter-spacing:0; font-size:9px; }
#formation-section.inactive h3::after { content: ' · pick Team A or B tool'; }

/* Team pills */
.team-row {
  display: flex; gap: 0; background: var(--panel2); border-radius: 16px;
  border: 1px solid var(--border); padding: 3px; margin-bottom: 2px;
}
.team-pill {
  flex: 1; height: 28px; border-radius: 14px;
  font-size: 12px; font-weight: 500; cursor: pointer;
  border: none; background: transparent;
  transition: all 0.15s; display: flex; align-items: center; gap: 5px; justify-content: center;
  color: var(--text-dim);
}
.team-pill:hover { color: var(--text); }
.team-pill.active { color: var(--text); background: var(--surface-active); font-weight: 600; }
.team-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Preset team colors */
.kit-tabs { display: flex; gap: 0; margin-bottom: 8px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.kit-tab { flex: 1; padding: 5px 0; font-size: 10px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; border: none; cursor: pointer; background: var(--panel2); color: var(--text-muted); transition: all 0.15s; font-family: 'Manrope', sans-serif; }
.kit-tab.active { background: var(--text); color: var(--bg); font-weight: 700; }
.kit-tab:hover:not(.active) { color: var(--text); }
#kit-search, #kit-search-national { width: 100%; padding: 7px 10px; font-size: 12px; background: var(--bg); border: 1.5px solid rgba(255,255,255,0.15); color: var(--text); border-radius: 8px; outline: none; font-family: 'Manrope', sans-serif; }
#kit-search:focus, #kit-search-national:focus { border-color: var(--accent); background: var(--panel2); }
#kit-search::placeholder, #kit-search-national::placeholder { color: var(--text-dim); }
.kit-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; padding: 2px; max-height: 520px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent; justify-items: center; }
.kit-grid::-webkit-scrollbar { width: 4px; }
.kit-grid::-webkit-scrollbar-track { background: transparent; }
.kit-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
.kit-group-label { grid-column: 1 / -1; font-size: 8px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); margin-top: 6px; font-family: 'Manrope', sans-serif; justify-self: stretch; }
.kit-group-label:first-child { margin-top: 0; }
.kit-btn {
  width: 28px; height: 28px; cursor: pointer;
  border: none; transition: transform 0.1s;
  position: relative; overflow: hidden;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.kit-btn:hover { transform: scale(1.1); }
.kit-btn.selected { outline: 2px solid var(--text); outline-offset: 1px; }
.kit-btn .kit-label {
  font-size: 6px; font-weight: 700; text-align: center;
  color: #fff; text-transform: uppercase; letter-spacing: 0.3px;
}
.kit-riv-preview {
  background: linear-gradient(135deg, #fff 35%, #cd1e2b 35%, #cd1e2b 65%, #fff 65%);
}
.kit-riv-preview .kit-label {
  color: #fff !important;
}
.kit-boc-preview {
  background: linear-gradient(to bottom, #003da5 33%, #fde100 33%, #fde100 67%, #003da5 67%);
}
.kit-boc-preview .kit-label { color: #0a0a0a; }
.kit-ars-preview {
  background: linear-gradient(to right, #fff 0 16%, #EF0107 16% 84%, #fff 84% 100%);
}
.kit-ars-preview .kit-label { color: #fff; text-shadow: 0 0 3px #EF0107, 0 0 3px #EF0107; }
.kit-psg-preview {
  background: linear-gradient(to right,
    #004170 0 40%, #fff 40% 44%, #DA291C 44% 56%, #fff 56% 60%, #004170 60% 100%);
}
.kit-psg-preview .kit-label { color: #fff; text-shadow: 0 0 3px #004170, 0 0 3px #004170; }

/* ── Kit hover tooltip ── */
.kit-tooltip {
  position: fixed; display: none;
  padding: 5px 9px;
  background: #0b0b0b; color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 11px; font-weight: 500; letter-spacing: 0.01em;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  white-space: nowrap;
  pointer-events: none; z-index: 500;
  opacity: 0; transform: translateY(2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.kit-tooltip.show {
  opacity: 1; transform: translateY(0);
}
.kit-tooltip::after {
  content: ''; position: absolute;
  left: 50%; bottom: -4px; transform: translateX(-50%) rotate(45deg);
  width: 7px; height: 7px;
  background: #0b0b0b;
  border-right: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Arrow style buttons */
.style-btn-row { display: flex; gap: 6px; }
.style-btn {
  flex: 1; height: 34px;
  border: 1px solid var(--border); background: transparent;
  border-radius: var(--radius-sm);
  font-family: 'Manrope', sans-serif; font-size: 11px; font-weight: 500;
  color: var(--text-muted); cursor: pointer; text-align: center;
  transition: all 0.15s; white-space: nowrap; padding: 0 4px;
}
.style-btn:hover { border-color: var(--text-dim); color: var(--text); }
.style-btn.active { border-color: rgba(255,255,255,0.3); color: var(--text); background: var(--surface-active); }

/* Zone panel fill-style buttons use the same lime-outline highlight as Purpose */
#zone-edit-section .style-btn.active {
  background: rgba(216,255,60,0.08);
  border-color: #D8FF3C;
  color: #D8FF3C;
  font-weight: 600;
}

/* ── Unified Zone Panel ───────────────────────────────────────────────────── */
/* Element icon in selection header */
.el-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.zone-panel-group {
  margin-bottom: 14px;
}
.zone-panel-heading {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

/* Purpose preset buttons */
.purpose-row { display: flex; gap: 4px; flex-wrap: nowrap; }
.purpose-btn {
  height: 28px; padding: 0 8px; flex: 1; min-width: 0;
  border: 1px solid var(--border); background: transparent;
  border-radius: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: 'Manrope', sans-serif; font-size: 10.5px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  transition: all 0.15s;
}
.purpose-btn:hover { border-color: var(--text-dim); color: var(--text); }
.purpose-btn.active {
  background: rgba(216,255,60,0.08);
  border-color: #D8FF3C;
  color: #D8FF3C;
  font-weight: 600;
}

/* Shape card selector */
.shape-card-row { display: flex; gap: 6px; }
.shape-card {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 10px 4px;
  border: 1px solid var(--border); background: transparent;
  border-radius: var(--radius-sm);
  font-family: 'Manrope', sans-serif; font-size: 10px; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: all 0.15s;
}
.shape-card:hover { border-color: var(--text-dim); color: var(--text); }
.shape-card.active {
  border-color: rgba(216,255,60,0.5); color: var(--text);
  background: rgba(216,255,60,0.06);
}
.shape-card.sm { padding: 8px 4px; }

/* Round colour swatches (legacy class — now all mini swatches are round) */
.color-swatch.mini.round.active {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px currentColor;
}
/* Auto (A) swatch — text-based, no background fill */
.auto-text-swatch, .auto-border-swatch {
  background: var(--surface-active) !important;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed var(--border);
}
.auto-text-swatch.active, .auto-border-swatch.active {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent);
}

/* Advanced accordion */
.zone-advanced-toggle {
  font-size: 11px; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  padding: 8px 0; text-align: center;
  transition: color 0.15s;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.zone-advanced-toggle:hover { color: var(--text); }
#zone-adv-arrow { display: inline-block; transition: transform 0.2s; font-size: 10px; }
.zone-advanced-open #zone-adv-arrow { transform: rotate(90deg); }

/* Label visibility toggle */
.zone-toggle { position: relative; display: inline-block; width: 36px; height: 20px; }
.zone-toggle input { opacity: 0; width: 0; height: 0; }
.zone-toggle-track {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--surface-active); border-radius: 10px;
  transition: background 0.2s;
}
.zone-toggle-track::before {
  content: ''; position: absolute;
  width: 16px; height: 16px; left: 2px; top: 2px;
  background: var(--text-muted); border-radius: 50%;
  transition: all 0.2s;
}
.zone-toggle input:checked + .zone-toggle-track { background: #D8FF3C; }
.zone-toggle input:checked + .zone-toggle-track::before {
  transform: translateX(16px); background: #0d0d0d;
}

/* Swatches */
.name-color-row { display: flex; gap: 6px; flex-wrap: wrap; }
.picker-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 2px 3px; }
.color-swatch.mini { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.no-bg-swatch {
  background: transparent !important;
  border: 1.5px solid var(--text-muted) !important;
  position: relative;
  overflow: hidden;
}
.no-bg-swatch::after {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 140%;
  height: 2px;
  background: var(--text-muted);
  transform: rotate(45deg);
  transform-origin: top left;
}
.color-swatch.checkerboard {
  background: conic-gradient(#808080 0.25turn, #c0c0c0 0.25turn, #c0c0c0 0.5turn, #808080 0.5turn, #808080 0.75turn, #c0c0c0 0.75turn) top left / 8px 8px repeat;
  border: 1.5px solid var(--border);
  border-radius: 50%;
}
.color-picker-btn {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px solid var(--border); background: transparent;
  color: var(--text-dim); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; padding: 0; line-height: 1;
}
.color-picker-btn:hover { border-color: var(--accent); color: var(--text); }
.jersey-style-row { gap: 8px; }
.jersey-style-btn {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px solid var(--border); background: transparent;
  cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, transform 0.1s;
}
.jersey-style-btn:hover { transform: scale(1.08); border-color: var(--accent); }
.jersey-style-btn.selected { border-color: var(--accent); }
.jersey-style-btn svg { display: block; }
.field-group.field-row-inline {
  display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px;
}
.field-group.field-row-inline .field-label { margin-bottom: 0; }
.number-stepper {
  display: inline-flex; align-items: center; gap: 0;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--input-bg, transparent);
  overflow: hidden;
}
.number-stepper input {
  width: 36px; text-align: center;
  border: none; background: transparent; outline: none;
  color: var(--text); font: inherit; font-size: 12px; font-weight: 600;
  padding: 6px 0; -moz-appearance: textfield;
}
.number-stepper input::-webkit-outer-spin-button,
.number-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-btn {
  width: 28px; height: 30px; padding: 0;
  border: none; background: rgba(255,255,255,0.06);
  color: var(--text-muted); font-size: 14px; line-height: 1; font-weight: 500;
  cursor: pointer; transition: color 0.15s, background 0.15s;
  display: inline-flex; align-items: center; justify-content: center;
}
.stepper-btn:hover { color: var(--text); background: rgba(255,255,255,0.12); }
.stepper-btn:active { background: rgba(255,255,255,0.18); }
.color-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.custom-color-strip { display: flex; gap: 6px; }
.custom-swatch {
  width: 28px; height: 28px; cursor: pointer;
  border-radius: 50%;
  border: 2px solid transparent; transition: transform 0.1s, border-color 0.1s;
  flex-shrink: 0;
}
.custom-swatch:hover { transform: scale(1.1); }
.custom-swatch.selected { border-color: var(--accent); }
.color-swatch {
  width: 100%; aspect-ratio: 1;
  cursor: pointer; border: 2px solid transparent;
  transition: transform 0.1s, border-color 0.1s;
}
.color-swatch:hover { transform: scale(1.08); }
.color-swatch.selected { border-color: var(--accent); }

/* Compact add players section */
.compact-add { display: flex; flex-direction: column; gap: 0; }
.compact-add .collapsible-body { display: flex; flex-direction: column; gap: 10px; }
.add-row { display: flex; align-items: center; gap: 10px; }
.add-row-label {
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  min-width: 76px; flex-shrink: 0;
}
#formation-section { display: block; }
.single-player-btn {
  flex: 1; height: 32px; border-radius: 16px;
  border: 1px solid var(--border); background: transparent;
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 500;
  color: var(--text-muted); cursor: pointer; transition: all 0.15s; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.single-player-btn:hover { border-color: var(--text-dim); color: var(--text); background: var(--surface-hover); }
.formation-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; flex: 1; }
.formation-btn {
  height: 32px; border-radius: 16px;
  border: 1px solid var(--border); background: transparent;
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 500;
  color: var(--text-muted); cursor: pointer; text-align: center; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.formation-btn:hover { border-color: var(--text-dim); color: var(--text); background: var(--surface-hover); }
.formation-btn.active { border-color: rgba(255,255,255,0.3); color: var(--text); background: var(--surface-active); font-weight: 600; }

/* Player section */
#number-section { display: block; }
.field-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.field-group:last-child { margin-bottom: 0; }
.field-label { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none;
}
.toggle-label { font-size: 12px; color: var(--text); }
.toggle-row input { display: none; }
.toggle-switch {
  width: 32px; height: 18px; background: rgba(255,255,255,0.12);
  border-radius: 9px; position: relative; transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(255,255,255,0.5); transition: transform 0.2s, background 0.2s;
}
.toggle-row input:checked + .toggle-switch { background: var(--accent); }
.toggle-row input:checked + .toggle-switch::after {
  transform: translateX(14px); background: #fff;
}
/* Large toggle variant */
.toggle-switch-lg {
  width: 42px; height: 24px; border-radius: 12px;
}
.toggle-switch-lg::after {
  width: 18px; height: 18px; top: 3px; left: 3px;
}
.toggle-row input:checked + .toggle-switch-lg::after {
  transform: translateX(18px);
}
.arms-toggle-row {
  padding: 6px 0;
}
.field-row { display: flex; gap: 8px; }
.field-row input[type=text] {
  flex: 1; min-width: 0; padding: 8px 12px; height: 36px;
  border: 1px solid var(--border); background: var(--surface-active);
  border-radius: var(--radius-sm);
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 500;
  color: var(--text); outline: none; transition: border-color 0.15s;
}
.field-row input[type=text]:focus { border-color: var(--accent); }
.field-row textarea {
  flex: 1; min-width: 0; padding: 8px 12px;
  border: 1px solid var(--border); background: transparent; border-radius: 0;
  font-family: 'Manrope', sans-serif; font-size: 11px; font-weight: 500;
  color: var(--text); outline: none; transition: border-color 0.15s;
}
.field-row textarea:focus { border-color: var(--accent); }
.apply-btn {
  width: 36px; height: 36px;
  border: none; background: var(--accent);
  font-size: 14px; color: var(--panel); cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.apply-btn:hover { opacity: 0.85; }

/* Sliders */
.slider-wrap { display: flex; flex-direction: column; gap: 6px; }
.slider-label { display: flex; justify-content: space-between; font-size: 11px; font-weight: 500; color: var(--text-muted); }
input[type=range] {
  -webkit-appearance: none; width: 100%; height: 3px; border-radius: 2px;
  background: var(--border); outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
}

/* Selection info */
#selection-info { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
#selection-info strong { color: var(--text); font-weight: 600; font-size: 14px; }

.action-btn {
  width: 100%; height: 36px;
  border: 1px solid var(--border); background: transparent;
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 500;
  color: var(--text-muted); cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.action-btn:hover { border-color: #444; color: var(--text); }
.action-btn.danger { border-color: #3A1520; color: #F87171; }
.action-btn.danger:hover { background: #3A1520; }

/* Layer order buttons (inline compact) */
#layer-controls-inline {
  display: flex; gap: 3px; margin-top: 8px;
}
.layer-inline-btn {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 24px;
  border: 1px solid var(--border); background: var(--panel2);
  border-radius: 5px; cursor: pointer; transition: all 0.15s;
  color: var(--text-muted); padding: 0;
}
.layer-inline-btn:hover { border-color: #444; color: var(--text); background: #1a1a1a; }
.layer-inline-btn:active { background: #222; }
.layer-inline-btn-danger { color: #F87171; border-color: #3A1520; }
.layer-inline-btn-danger:hover { background: #3A1520; color: #FCA5A5; border-color: #5A1F2F; }

/* Custom tooltip for inline buttons (data-tooltip).
   Position BELOW the button to avoid clipping when the panel scrolls,
   and anchor to the left edge of the button so it extends rightward
   into the panel (never off the left edge). */
.layer-inline-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; top: calc(100% + 6px); left: 0; transform: none;
  background: #0b0b0b; color: var(--text);
  border: 1px solid #2a2a2a;
  padding: 5px 8px; border-radius: 5px;
  font-size: 11px; font-weight: 500; white-space: nowrap;
  pointer-events: none; opacity: 0;
  transition: opacity 0.12s ease 0.3s;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.layer-inline-btn[data-tooltip]:hover::after { opacity: 1; }
/* Anchor the danger button's tooltip to its right edge so it extends
   leftward (avoids overflowing past the panel's right edge). */
.layer-inline-btn-danger[data-tooltip]::after { left: auto; right: 0; }

/* Legacy layer buttons (zone Advanced panel) */
.layer-btn-row {
  display: flex; gap: 4px;
}
.layer-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 2px; border: 1px solid var(--border); background: var(--panel2);
  border-radius: 6px; cursor: pointer; transition: all 0.15s;
  color: var(--text-muted); font-family: 'Manrope', sans-serif;
}
.layer-btn span { font-size: 9px; font-weight: 500; }
.layer-btn:hover { border-color: #444; color: var(--text); background: #1a1a1a; }
.layer-btn:active { background: #222; }

/* Export modal */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); z-index: 300;
  align-items: center; justify-content: center;
}
.modal-box {
  background: var(--panel); border: 1px solid var(--border);
  padding: 24px; width: 280px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-title { font-size: 14px; font-weight: 600; color: var(--text); }
.export-format-btn {
  width: 100%; padding: 10px 12px; text-align: left;
  border: 1px solid var(--border); background: transparent;
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 500;
  color: var(--text-muted); cursor: pointer; transition: all 0.15s;
}
.export-format-btn:hover { border-color: #444; color: var(--text); }
.export-format-btn.active { border-color: var(--accent); color: var(--text); }
.modal-row { display: flex; gap: 8px; }
.modal-btn {
  flex: 1; padding: 9px;
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
}
.modal-btn.cancel { border: 1px solid var(--border); background: transparent; color: var(--text-muted); }
.modal-btn.confirm { border: none; background: var(--accent); color: var(--panel); font-weight: 600; }
.modal-btn:hover { opacity: 0.85; }
.color-picker-save-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0 4px;
  font-size: 12px; color: var(--text);
  cursor: pointer;
  user-select: none;
}
.color-picker-save-row input[type="checkbox"] {
  width: 14px; height: 14px;
  accent-color: var(--accent);
  cursor: pointer;
}
.color-picker-save-row .color-picker-save-hint {
  font-size: 10px; color: var(--text-dim); margin-left: auto;
}
.size-apply-all-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 6px 8px;
  background: rgba(52,211,153,0.06);
  border: 1px solid rgba(52,211,153,0.18);
  border-radius: 6px;
  font-size: 11px; color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.size-apply-all-row input[type="checkbox"] { width: 13px; height: 13px; accent-color: var(--accent); cursor: pointer; }
.size-apply-all-row span span { color: var(--text); font-weight: 600; }

/* Review Modal */
.review-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px 28px 24px; width: 340px;
  text-align: center; position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  font-family: 'Manrope', sans-serif;
  animation: reviewSlideIn 0.35s ease-out;
}
@keyframes reviewSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.review-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; color: var(--text-dim);
  font-size: 20px; cursor: pointer; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; transition: all 0.15s;
}
.review-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.review-emoji { font-size: 36px; margin-bottom: 8px; }
.review-title {
  font-size: 18px; font-weight: 700; color: var(--text);
  margin: 0 0 4px; letter-spacing: -0.01em;
}
.review-subtitle {
  font-size: 13px; color: var(--text-muted); margin: 0 0 20px;
}
.review-stars {
  display: flex; justify-content: center; gap: 8px; margin-bottom: 20px;
}
.review-star {
  font-size: 32px; color: var(--text-dim); cursor: pointer;
  transition: color 0.15s, transform 0.15s; user-select: none;
}
.review-star:hover { transform: scale(1.15); }
.review-star.lit { color: #FBBF24; }
.review-star.hovered { color: #FDE68A; }
#review-text {
  width: 100%; padding: 10px 12px; font-size: 13px;
  background: var(--bg); border: 1.5px solid var(--border);
  color: var(--text); border-radius: 8px; resize: none;
  font-family: 'Manrope', sans-serif; outline: none;
  margin-bottom: 8px; transition: border-color 0.15s;
}
#review-text:focus { border-color: var(--accent); }
#review-text::placeholder { color: var(--text-dim); }
.review-prompt {
  font-size: 13px; color: var(--text); margin: 0 0 10px;
  font-weight: 500; line-height: 1.4;
}
.review-consent {
  font-size: 10px; color: var(--text-dim); margin: 0 0 12px;
  font-style: italic;
}
.review-submit {
  width: 100%; padding: 10px; border: none; border-radius: 8px;
  background: var(--accent); color: var(--panel); font-size: 13px;
  font-weight: 600; font-family: 'Manrope', sans-serif;
  cursor: pointer; transition: opacity 0.15s;
}
.review-submit:hover { opacity: 0.85; }
.review-submit:disabled { opacity: 0.5; cursor: default; }
.review-skip {
  display: block; margin: 12px auto 0; padding: 6px 16px;
  background: none; border: none; color: var(--text-dim);
  font-size: 12px; font-family: 'Manrope', sans-serif;
  cursor: pointer; transition: color 0.15s;
}
.review-skip:hover { color: var(--text-muted); }
#review-status {
  margin-top: 12px; font-size: 12px; padding: 8px;
  border-radius: 6px;
}
#review-status.success { color: var(--accent); background: var(--accent-subtle); }
#review-status.error { color: #F87171; background: rgba(248,113,113,0.1); }
#review-comment-section {
  animation: reviewFadeIn 0.25s ease-out;
}
@keyframes reviewFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Panel close button — hidden on desktop, shown on mobile */
.panel-close-btn { display: none; }

/* Tabs */
.panel-tabs {
  display: flex; gap: 0; padding: var(--space-1) var(--space-4) 0;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: sticky; top: 0; z-index: 5;
}
.panel-tab {
  flex: 1; height: 38px; border: none; background: transparent;
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 500;
  color: var(--text-dim); cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.panel-tab:hover { color: var(--text); }
.panel-tab.active { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.panel-tab svg { width: 14px; height: 14px; flex-shrink: 0; }
.tab-pane { display: flex; flex-direction: column; gap: 0; padding-bottom: 10px; }
.sub-label {
  font-size: 9px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px;
}

/* ── Pitch Toggle Buttons ── */
.pitch-toggle-row {
  display: flex; gap: 4px;
}
.pitch-opt {
  flex: 1; padding: 7px 0; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: transparent;
  color: var(--text-dim); font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
}
.pitch-opt:hover { border-color: var(--text-dim); color: var(--text-muted); }
.pitch-opt.active {
  background: var(--text); border-color: transparent;
  color: var(--bg); font-weight: 600;
}

/* ── Pitch Visual Grid (size + orientation thumbnails) ── */
.pitch-visual-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.pitch-visual-btn {
  display: flex; align-items: center; justify-content: center;
  padding: 8px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
  aspect-ratio: 1;
}
.pitch-visual-btn:hover {
  border-color: var(--text-dim);
  color: var(--text-muted);
  background: var(--surface-hover);
}
.pitch-visual-btn.active {
  background: var(--surface-hover);
  border-color: var(--text);
  color: var(--text);
}
.pitch-thumb {
  width: 100%;
  height: 100%;
  max-width: 48px;
  max-height: 48px;
}

/* ── Pitch Flip Button ── */
.pitch-flip-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 8px; padding: 6px 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-dim);
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
}
.pitch-flip-btn:hover { border-color: var(--text-dim); color: var(--text-muted); background: var(--surface-hover); }
.pitch-flip-btn.active { background: var(--surface-hover); border-color: var(--text); color: var(--text); }

/* ── Pitch Switch Rows (checkbox toggles) ── */
.pitch-switch-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; cursor: pointer;
  font-family: 'Manrope', sans-serif; font-size: 12px; color: var(--text-muted);
}
.pitch-switch-row input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 34px; height: 18px; border-radius: 9px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  position: relative; cursor: pointer; transition: all 0.2s; flex-shrink: 0;
}
.pitch-switch-row input[type="checkbox"]::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,0.4); transition: all 0.2s;
}
.pitch-switch-row input[type="checkbox"]:checked {
  background: rgba(30,215,96,0.3); border-color: rgba(30,215,96,0.5);
}
.pitch-switch-row input[type="checkbox"]:checked::after {
  left: 18px; background: var(--accent);
}
.pitch-switch-label { user-select: none; }

/* ── Pitch Color Dots ── */
.pitch-color-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pitch-color-dot, .pitch-line-dot, .mp-color-dot, .mp-line-dot {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: transform 0.1s, border-color 0.1s;
  flex-shrink: 0;
}
.pitch-color-dot:hover, .pitch-line-dot:hover, .mp-color-dot:hover, .mp-line-dot:hover { transform: scale(1.1); }
.pitch-color-dot.selected, .pitch-line-dot.selected, .mp-color-dot.selected, .mp-line-dot.selected { border-color: var(--accent); }

/* ── Upgrade overlay ── */
.upgrade-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.55); z-index: 9999;
  align-items: center; justify-content: center;
}
.upgrade-overlay.visible { display: flex; }
.upgrade-card {
  background: var(--panel, #1e1e1e); border-radius: 14px;
  padding: 32px 28px 24px; text-align: center;
  max-width: 340px; width: 90%; position: relative;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.upgrade-icon { margin-bottom: 12px; }
.upgrade-title { font-size: 18px; font-weight: 700; color: #fff; margin: 0 0 8px; }
.upgrade-desc { font-size: 13px; color: rgba(255,255,255,0.6); margin: 0 0 20px; line-height: 1.45; }
.upgrade-feature-name { color: #F59E0B; font-weight: 600; }
.upgrade-pricing {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 16px;
}
.upgrade-plan-btn {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-radius: 10px; cursor: pointer;
  font-family: inherit; font-size: 14px; transition: all 0.15s;
  border: 1.5px solid transparent;
}
.upgrade-plan-primary {
  background: #F59E0B; color: #000; border-color: #F59E0B;
}
.upgrade-plan-primary:hover { background: #d97706; border-color: #d97706; }
.upgrade-plan-secondary {
  background: transparent; color: #fff;
  border-color: rgba(255,255,255,0.2);
}
.upgrade-plan-secondary:hover { border-color: #F59E0B; }
.upgrade-plan-label { font-weight: 600; }
.upgrade-plan-price { font-weight: 700; }
.upgrade-save-badge {
  font-size: 10px; font-weight: 700; background: #34d399;
  color: #000; padding: 2px 6px; border-radius: 4px;
  margin-left: 6px; text-transform: uppercase; letter-spacing: 0.03em;
}
.upgrade-fine-print {
  font-size: 11px; color: rgba(255,255,255,0.35);
  margin: 0; line-height: 1.4;
}
.upgrade-close {
  position: absolute; top: 10px; right: 14px;
  background: none; border: none; color: rgba(255,255,255,0.4);
  font-size: 20px; cursor: pointer; line-height: 1;
}
.upgrade-close:hover { color: #fff; }

/* Upgrade menu item accent */
.app-menu-upgrade { color: #F59E0B !important; }
.app-menu-upgrade svg { stroke: #F59E0B; }

/* Cursor states */
body.tool-select #pitch-svg { cursor: default; }
body.tool-player #pitch-svg { cursor: crosshair; }
body.tool-arrow  #pitch-svg { cursor: crosshair; }
body.tool-ball   #pitch-svg { cursor: crosshair; }
body.tool-shadow #pitch-svg { cursor: crosshair; }
body.tool-cone   #pitch-svg { cursor: crosshair; }
body.tool-textbox #pitch-svg { cursor: text; }
body.tool-spotlight #pitch-svg { cursor: crosshair; }
body.tool-freeform #pitch-svg { cursor: crosshair; }
body.tool-motion #pitch-svg { cursor: crosshair; }
body.tool-net-zone #pitch-svg { cursor: crosshair; }

/* Step animation controls — below pitch.
   flex-wrap + flex-basis 100% on step-bar puts cards on row 1 and the action
   buttons on row 2 so wider cards don't squeeze the controls into wrapped text.
   width:100% caps the container at its parent (pitch-wrap) so step-bar can
   actually overflow + scroll instead of growing motion-controls indefinitely. */
#motion-controls {
  display: none; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 0 0;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}
#motion-play-btn, #motion-reset-btn, #motion-export-btn, #motion-export-video-btn, #motion-clear-btn {
  display: none; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 8px;
  background: rgba(15,15,15,0.85); backdrop-filter: blur(12px);
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  white-space: nowrap; flex-shrink: 0;
}
#motion-play-btn {
  border: 1px solid rgba(30,215,96,0.4); color: var(--accent);
}
#motion-export-btn, #motion-export-video-btn {
  border: 1px solid rgba(255,255,255,0.15); color: var(--text-muted);
}
#motion-reset-btn {
  border: 1px solid rgba(255,255,255,0.15); color: #fff;
}
#motion-clear-btn {
  border: 1px solid rgba(239,68,68,0.3); color: rgba(239,68,68,0.7);
}
/* Wrap step-bar with scroll arrows so users can navigate past 8-10 frames
   without losing access to the controls below. */
#motion-controls .step-bar-wrap {
  flex-basis: 100%;
  display: flex; align-items: stretch; gap: 4px;
  min-width: 0;
}
#motion-controls #step-bar {
  display: flex; gap: 4px;
  flex: 1; min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
  scroll-behavior: smooth;
  justify-content: flex-start;
}
#motion-controls #step-bar::before,
#motion-controls #step-bar::after {
  content: ''; flex: 1; min-width: 0;
}
.step-scroll {
  flex-shrink: 0;
  width: 28px; height: 84.5px;
  display: none; align-items: center; justify-content: center;
  background: rgba(15,15,15,0.85); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 7px;
  color: rgba(255,255,255,0.7);
  cursor: pointer; transition: all 0.15s;
}
.step-scroll:hover { color: #d8ff3c; border-color: #d8ff3c; }
.step-scroll.visible { display: inline-flex; }
.step-scroll[disabled] { opacity: 0.3; cursor: default; pointer-events: none; }
.step-card {
  position: relative;
  width: 120px; height: 84.5px;
  flex-shrink: 0;
  padding: 6px 6px 4px 6px;
  border-radius: 7px;
  background: #0f1013;
  border: 1px solid #2d3038;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  font-family: 'Manrope', sans-serif;
  transition: border-color 0.15s, transform 0.15s;
}
.step-card:hover { border-color: rgba(216,255,60,0.4); }
.step-card.active { border-color: #d8ff3c; }
.step-card.active .step-card-num { color: #d8ff3c; }
.step-card-num {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  pointer-events: none;
}
.step-card-thumb {
  flex: 1; min-height: 0;
  border-radius: 3px;
  overflow: hidden;
  pointer-events: none;
}
.step-card-thumb svg { display: block; width: 100%; height: 100%; }
.step-card-remove {
  position: absolute; top: 4px; right: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1; font-weight: 700;
  color: rgba(239,68,68,0.85);
  background: rgba(239,68,68,0.18);
  cursor: pointer; transition: all 0.15s;
}
.step-card:hover .step-card-remove { display: inline-flex; }
.step-card-remove:hover { background: rgba(239,68,68,0.32); color: #fff; }
/* Add-step action button — sibling of step-bar so it's always visible
   regardless of how far the cards are scrolled. */
#step-add-btn {
  display: none; align-items: center; gap: 5px;
  padding: 7px 12px; border-radius: 8px;
  background: rgba(15,15,15,0.85); backdrop-filter: blur(12px);
  border: 1px solid rgba(216,255,60,0.4);
  color: #d8ff3c;
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  white-space: nowrap; flex-shrink: 0;
}
#step-add-btn:hover { background: rgba(216,255,60,0.12); border-color: #d8ff3c; }

/* Motion playback buttons */
#motion-play-btn:hover {
  background: rgba(30,215,96,0.2);
  border-color: var(--accent);
}
#motion-reset-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.3);
}
#motion-export-btn:hover, #motion-export-video-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.3);
  color: var(--text);
}
#motion-clear-btn:hover {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.5);
  color: rgba(239,68,68,0.9);
}

/* ── Feedback Widget ─────────────────────────────────────────────────────── */
#feedback-bubble {
  position: fixed; bottom: 20px; right: 20px; z-index: 500;
  padding: 8px 16px; border-radius: 20px;
  background: var(--panel2); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.2s; box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
#feedback-bubble .feedback-short { display: none; }
#feedback-bubble:hover { transform: scale(1.04); color: var(--text); border-color: rgba(255,255,255,0.2); }

#feedback-panel {
  position: fixed; bottom: 74px; right: 20px; z-index: 501;
  width: 320px; background: var(--panel2); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  overflow: hidden; animation: fbSlideUp 0.2s ease;
}
@keyframes fbSlideUp { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0); } }

.fb-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.fb-title { font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 600; color: var(--text); }
.fb-close {
  background: none; border: none; color: var(--text-dim); font-size: 18px;
  cursor: pointer; padding: 0 4px; line-height: 1;
}
.fb-close:hover { color: var(--text); }

.fb-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }

.fb-type-row { display: flex; gap: 8px; }
.fb-type-btn {
  flex: 1; padding: 8px 0; border-radius: 6px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-dim); font-family: 'Manrope', sans-serif;
  font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.15s;
}
.fb-type-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(30,215,96,0.08); }
.fb-type-btn:hover { border-color: #444; }

.fb-email-input {
  width: 100%; padding: 8px 12px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-family: 'Manrope', sans-serif; font-size: 12px;
  outline: none; box-sizing: border-box;
}
.fb-email-input:focus { border-color: var(--accent); }
.fb-email-input::placeholder { color: var(--text-dim); }
#fb-message {
  width: 100%; padding: 10px 12px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-family: 'Manrope', sans-serif; font-size: 12px;
  resize: vertical; outline: none; min-height: 80px;
}
#fb-message:focus { border-color: var(--accent); }
#fb-message::placeholder { color: var(--text-dim); }

.fb-upload-area { display: flex; }
.fb-upload-label {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 6px; width: 100%;
  border: 1px dashed var(--border); background: transparent;
  font-family: 'Manrope', sans-serif; font-size: 11px;
  color: var(--text-dim); cursor: pointer; transition: all 0.15s;
}
.fb-upload-label:hover { border-color: #444; color: var(--text-muted); }
.fb-upload-label.has-file { border-color: var(--accent); color: var(--accent); border-style: solid; }

#fb-submit {
  width: 100%; padding: 10px 0; border-radius: 6px;
  border: none; background: var(--accent); color: #0F0F0F;
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 700;
  letter-spacing: 0.5px; cursor: pointer; transition: opacity 0.15s;
}
#fb-submit:hover { opacity: 0.85; }
#fb-submit:disabled { opacity: 0.4; cursor: not-allowed; }

#fb-status {
  font-family: 'Manrope', sans-serif; font-size: 11px;
  text-align: center; padding: 4px 0;
}
#fb-status.success { color: #4ADE80; }
#fb-status.error { color: #F87171; }

/* ── Image Upload Overlay (on canvas area) ── */
#image-upload-overlay {
  display: none;
  align-items: center; justify-content: center;
  width: 100%; min-height: 480px;
  padding: 40px;
}
#image-upload-overlay.visible { display: flex !important; }
.upload-dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 48px 40px;
  border: 2px dashed var(--border); border-radius: 16px;
  background: rgba(255,255,255,0.02);
  max-width: 420px; width: 100%;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.upload-dropzone.dragover {
  border-color: var(--accent); background: rgba(76,175,80,0.06);
}
.upload-dropzone-title {
  font-size: 18px; font-weight: 700; color: var(--text);
  margin: 4px 0 0;
}
.upload-dropzone-sub {
  font-size: 13px; color: var(--text-muted); text-align: center;
  line-height: 1.5; margin: 0;
}
.upload-dropzone-btn {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px; padding: 10px 24px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--accent); color: #0A0A0A;
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.upload-dropzone-btn:hover { opacity: 0.9; }
.upload-dropzone-btn svg { stroke: #0A0A0A; }

/* ── Mini Pitch Grid (image mode sidebar) ── */
.mini-pitch-grid {
  grid-template-columns: repeat(4, 1fr) !important;
}
.mini-pitch-grid .pitch-visual-btn {
  padding: 6px 3px;
}
#mini-pitch-wrap {
  flex-shrink: 0;
  border-radius: 6px;
  overflow: visible;
}
#mini-pitch-wrap svg { cursor: crosshair; }
#mini-pitch-wrap svg [data-type] { cursor: move; }

/* ── Image Mode (canvas/layout only — panel visibility handled by mode-registry.js) ── */
body.image-mode #pitch-container { overflow: visible; box-shadow: none; }
body.image-mode #pitch-container #pitch-svg { flex-shrink: 1; }
body.image-mode #pitch-wrap { overflow-x: auto; overflow-y: hidden; cursor: grab; }
body.image-mode #pitch-wrap:active { cursor: grabbing; }
body.image-mode #pitch-wrap::-webkit-scrollbar { height: 6px; }
body.image-mode #pitch-wrap::-webkit-scrollbar-track { background: transparent; }
body.image-mode #pitch-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
body.image-mode #pitch-wrap::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }
/* Mode tab button styling handled by .mode-tab / .mode-tab.active classes */

/* ── Mobile Mode Dropdown ── */
#mode-dropdown {
  display: none; /* hidden on desktop, shown on mobile */
}
#mode-dropdown-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; height: 30px;
  border-radius: 6px; border: 1px solid var(--border);
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 600;
  color: var(--accent); background: var(--panel2);
  cursor: pointer; white-space: nowrap;
}
#mode-dropdown-btn svg { opacity: 0.7; }
#mode-dropdown-menu {
  position: absolute; top: 100%; left: 0; right: 0;
  margin-top: 4px;
  background: var(--panel2); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.mode-dropdown-option {
  display: block; width: 100%; padding: 10px 14px;
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 500;
  color: var(--text-muted); background: transparent;
  border: none; text-align: left; cursor: pointer;
}
.mode-dropdown-option:hover, .mode-dropdown-option.active {
  background: rgba(30,215,96,0.15); color: var(--accent);
}

/* ── Mobile Context Bar (appears above toolbar when element selected) ── */
#mobile-context-bar {
  display: none; /* hidden everywhere by default */
}
.ctx-label {
  font-family: 'Manrope', sans-serif; font-size: 11px; font-weight: 600;
  color: var(--text); white-space: nowrap; margin-right: auto;
  letter-spacing: 0.5px;
}
.ctx-btn {
  height: 30px; padding: 0 10px; border-radius: 6px;
  border: 1px solid var(--border); background: transparent;
  font-family: 'Manrope', sans-serif; font-size: 11px; font-weight: 500;
  color: var(--text-muted); cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 4px;
  transition: all 0.15s;
}
.ctx-btn:hover { border-color: #444; color: var(--text); }
.ctx-btn.ctx-props {
  border-color: var(--text-muted); color: var(--text);
  background: rgba(255,255,255,0.06);
}
.ctx-btn.ctx-delete {
  border-color: #3A1520; color: #F87171;
}
.ctx-btn.ctx-delete:hover { background: #3A1520; }

/* ── Mobile panel toggle button ── */
/* right: 100px sits clear of the top-right CTA group (Share + Export, ~88px wide) */
#mobile-panel-toggle {
  display: none;
  position: fixed; top: 10px; right: 100px; z-index: 400;
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--panel2); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  align-items: center; justify-content: center;
}
#mobile-panel-toggle:hover { color: var(--text); }

/* ── Responsive: Tablet (≤1024px) ── */
@media (max-width: 1024px) {
  :root { --panel-w: 280px; }
}

/* ── Responsive: Mobile (≤768px) ── */
@media (max-width: 768px) {
  body {
    flex-direction: column;
    height: 100vh; height: 100dvh;
    overflow: hidden;
  }

  /* Logo — stacked on mobile: TÁCTICA over BETA, vertically centered with top bar */
  .tool-logo {
    position: fixed; top: 50%; left: 12px; z-index: 200;
    font-size: 11px; letter-spacing: 2px;
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    line-height: 1;
    /* vertically center with the app-menu-btn (top:10px, h:36px → center at 28px) */
    top: 28px; transform: translateY(-50%);
  }
  .beta-badge {
    font-size: 6px; padding: 1px 4px;
  }

  /* Toolbar → horizontal bottom bar */
  #toolbar {
    width: 100%; height: 64px;
    flex-direction: row; order: 3;
    align-items: center;
    padding: 0 10px; gap: 6px;
    border-right: none; border-top: 1px solid var(--border);
    overflow-x: auto; overflow-y: visible;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-height: none;
  }
  #toolbar::-webkit-scrollbar { display: none; }
  .toolbar-scroll {
    display: contents; /* flatten on mobile — let toolbar handle horizontal scroll */
    overflow: visible;
  }
  /* Scroll fade hint on right edge */
  #toolbar::after {
    content: '';
    position: sticky; right: 0; top: 0;
    min-width: 28px; height: 100%; flex-shrink: 0;
    background: linear-gradient(to right, transparent, var(--panel) 80%);
    pointer-events: none;
  }
  .tool-group { display: contents; }
  .tool-group-save { display: contents; }
  .tool-group-account { display: contents; padding: 0; border-top: none; }
  .tool-label { display: none; }
  .tool-group-title { display: none; }
  .tool-bundle > .tool-btn::after { display: none; }
  .bundle-menu {
    position: fixed; bottom: 72px; left: auto;
    top: auto;
  }
  #toolbar .tool-sep {
    width: 1px; height: 32px; margin: 0 4px; flex-shrink: 0;
  }
  #toolbar .tool-btn {
    width: 52px; height: 52px; flex-shrink: 0;
    flex-direction: column; border-radius: 12px;
    background: rgba(255,255,255,0.04);
  }
  #toolbar .tool-btn svg { width: 22px; height: 22px; }
  #toolbar .tool-btn.active {
    background: rgba(255,255,255,0.1);
  }
  #toolbar .tool-btn.save-btn {
    width: 52px; height: 52px;
    order: -1; flex-direction: column;
    border-radius: 12px;
    background: var(--accent); color: #1a1a1a;
  }
  #toolbar .tool-btn.save-btn svg { width: 22px; height: 22px; }
  #toolbar .tool-btn.danger { margin-left: auto; margin-top: 0; }

  /* Toolbar → fixed at bottom */
  #toolbar {
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* Context bar → floating above toolbar */
  #mobile-context-bar.show {
    display: flex;
    position: fixed; bottom: 72px; left: 10px; right: 10px;
    z-index: 199;
    height: 44px; padding: 0 14px;
    background: var(--panel2); border: 1px solid var(--border);
    border-radius: 12px;
    align-items: center; gap: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    animation: ctxBarIn 0.2s ease;
  }
  @keyframes ctxBarIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Canvas takes remaining space */
  #canvas-wrap {
    flex: 1; order: 2;
    padding: 50px 4px 70px;
    min-height: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  /* Make pitch SVG responsive — fill available space */
  #pitch-wrap { width: 100%; }
  #pitch-container {
    width: 100%; max-width: 100%;
    max-height: 100%;
    display: flex;
  }
  #pitch-svg {
    width: 100% !important;
    height: 100% !important;
    max-height: calc(100dvh - 120px);
  }

  /* Side panel → slide-over from right */
  #side-panel {
    position: fixed; top: 0; right: 0; bottom: 64px;
    width: 280px; z-index: 300;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    border: none; border-left: 1px solid var(--border);
    border-radius: 0; margin: 0;
    max-height: none; align-self: stretch;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    background: rgba(20, 20, 30, 0.92);
    box-shadow: -4px 0 24px rgba(0,0,0,0.5);
  }
  #side-panel.open {
    transform: translateX(0);
  }
  .panel-tabs {
    border-radius: 0;
    padding-top: 6px;
    padding-right: 44px; /* leave room for close button */
  }

  /* Close button inside panel */
  .panel-close-btn {
    display: flex !important;
    position: absolute; top: 6px; right: 8px; z-index: 10;
    width: 32px; height: 32px; border-radius: 8px;
    border: none; background: rgba(255,255,255,0.06);
    color: var(--text-muted); cursor: pointer;
    align-items: center; justify-content: center;
  }
  .panel-close-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }

  /* Hide desktop toolbar toggle on mobile */
  .toolbar-toggle { display: none !important; }

  /* Panel toggle button visible */
  #mobile-panel-toggle {
    display: flex;
  }
  /* Hide toggle when panel is open (set via JS) */
  #mobile-panel-toggle.hidden { display: none !important; }

  /* Mobile panel backdrop */
  #mobile-backdrop {
    display: none; position: fixed; inset: 0; bottom: 64px;
    background: rgba(0,0,0,0.5); z-index: 299;
  }
  #mobile-backdrop.show { display: block; }

  /* Feedback button — compact on mobile, higher above toolbar */
  #feedback-bubble {
    bottom: 84px; right: 12px;
    padding: 10px 14px; font-size: 11px;
  }
  #feedback-bubble .feedback-full { display: none; }
  #feedback-bubble .feedback-short { display: inline; }
  #feedback-panel {
    bottom: 130px; right: 8px; width: calc(100vw - 16px); max-width: 320px;
  }

  /* Rondos brand — hide on mobile to save space */
  .rondos-brand {
    display: none;
  }

  /* Mode bar → hide tab bar, show dropdown */
  #mode-bar { display: none !important; }
  #mode-tabs-bar { display: none !important; }
  #mode-dropdown {
    display: block;
    position: absolute; top: 28px; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
  }

  /* Save wrapper reorder on mobile */
  .save-wrapper { order: -1; margin-right: 6px; }

  /* Terms link — separate from last toolbar button */
  .sidebar-terms-link { padding-left: 12px; }

  /* Analyses dashboard — full mobile */
  .analyses-header { padding: 16px 16px; }
  .analyses-title { font-size: 15px; }
  .analyses-grid { padding: 16px 16px; }
  .analyses-card-grid, .folder-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }
  .analyses-new-btn { padding: 8px 14px; font-size: 12px; }
  .analyses-folder-btn { padding: 8px 12px; font-size: 12px; }
  .analyses-header-right { gap: 6px; }
  .analysis-card-info { padding: 10px 12px; }
  .analysis-card-name { font-size: 12px; }

  /* Current analysis bar — hidden on mobile */
  .current-analysis-bar { display: none !important; }
}

/* ── Top Notification Bar ── */
.notif-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: #f7f5fb;
  border-bottom: 3px solid #5b3ea8;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}
.notif-bar.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.notif-content {
  display: flex; align-items: center; gap: 12px;
}
.notif-icon {
  flex-shrink: 0; color: #5b3ea8;
}
.notif-message {
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 500;
  color: #3a3a4a; letter-spacing: 0.2px;
}
.notif-close {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  border: none; background: #5b3ea8;
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.notif-close:hover { background: #4a3090; }

/* Notification variants */
.notif-bar.notif-success { background: #e8f5ed; border-bottom-color: #34a853; }
.notif-bar.notif-success .notif-icon { color: #34a853; }
.notif-bar.notif-success .notif-close { background: #34a853; }
.notif-bar.notif-success .notif-close:hover { background: #2d8f47; }

.notif-bar.notif-error { background: #f5e8e8; border-bottom-color: #d93025; }
.notif-bar.notif-error .notif-icon { color: #d93025; }
.notif-bar.notif-error .notif-close { background: #d93025; }
.notif-bar.notif-error .notif-close:hover { background: #b8271e; }

.notif-bar.notif-info { background: #f7f5fb; border-bottom-color: #5b3ea8; }
.notif-bar.notif-info .notif-icon { color: #5b3ea8; }
.notif-bar.notif-info .notif-close { background: #5b3ea8; }
.notif-bar.notif-info .notif-close:hover { background: #4a3090; }

/* ── App Menu (bottom of sidebar) ── */
.app-menu-wrapper {
  position: relative;
  width: 100%;
}
.app-menu-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 44px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text); cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: left;
}
.app-menu-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
.app-menu-avatar-slot {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 30, 40, 0.6);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.app-menu-btn:hover .app-menu-avatar-slot {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
}
.app-menu-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.app-menu-avatar-initials {
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 700;
  color: var(--accent);
}
.app-menu-labels {
  display: flex; flex-direction: column; align-items: flex-start;
  flex: 1 1 auto; min-width: 0;
  line-height: 1.25;
  overflow: hidden;
}
.app-menu-label-primary {
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 600;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.app-menu-label-secondary {
  font-family: 'Manrope', sans-serif; font-size: 11px; font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
  margin-top: 1px;
}
/* Opens upward + to the right since the button is bottom-left of the sidebar */
.app-menu-dropdown {
  position: absolute; bottom: 44px; left: 0; width: 220px;
  background: rgba(26, 26, 34, 0.95);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  padding: 6px 0; z-index: 300;
  animation: menuFadeInUp 0.15s ease;
}
@keyframes menuFadeInUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.tool-group-account {
  grid-template-columns: 1fr;
  margin-top: auto;
  padding: 10px var(--space-3);
  border-top: 1px solid var(--border);
  border-bottom: none;
}

/* ── Top-right: Sign-in link + Export CTA ── */
.topbar-right {
  position: fixed; top: 10px; right: 16px; z-index: 300;
  display: flex; align-items: center; gap: 14px;
}
.topbar-signin-link {
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 500;
  color: var(--text-muted); cursor: pointer; text-decoration: none;
  padding: 6px 2px; transition: color 0.15s;
}
.topbar-signin-link:hover { color: var(--text); }
.topbar-export-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0 16px; height: 36px;
  background: #B8E022; color: #0a0b0c;
  border: none; border-radius: 10px;
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(184, 224, 34, 0.2);
}
.topbar-export-btn:hover { background: #a7cc1e; box-shadow: 0 4px 22px rgba(184, 224, 34, 0.3); }
.topbar-export-btn svg { stroke: #0a0b0c; }

.topbar-share-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0 14px; height: 36px;
  background: rgba(30, 30, 40, 0.6); color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.topbar-share-btn:hover { background: rgba(45, 45, 58, 0.75); border-color: rgba(255, 255, 255, 0.2); color: var(--text); }
.topbar-share-btn svg { stroke: currentColor; opacity: 0.9; }
@keyframes menuFadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.app-menu-user-info { padding: 10px 14px; }
.app-menu-user-name { display: block; font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 600; color: var(--text); }
.app-menu-user-email { display: block; font-family: 'Manrope', sans-serif; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.app-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }
.app-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 14px; background: none; border: none;
  color: var(--text); font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 500;
  cursor: pointer; text-align: left; transition: background 0.1s;
}
.app-menu-item:hover { background: rgba(255,255,255,0.05); }
.app-menu-item svg { opacity: 0.5; }
.app-menu-item:hover svg { opacity: 0.8; }
.app-menu-signout { color: #f87171; }
.app-menu-signout:hover { background: rgba(248,113,113,0.1); }

/* ── Save Menu Dropdown ── */
.save-wrapper {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.save-menu {
  position: fixed;
  width: 190px;
  background: var(--panel2); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
  z-index: 500;
  animation: saveMenuIn 0.15s ease;
}
@keyframes saveMenuIn { from { opacity:0; transform: translateX(-4px); } to { opacity:1; transform: translateX(0); } }

/* Cursor for marker tool — crosshair conveys "place me here" instead of grab */
body.tool-marker #pitch-svg { cursor: crosshair; }
/* Image tool — crosshair while waiting for a click to place */
body.tool-image #pitch-svg { cursor: crosshair; }
.save-menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 11px 14px;
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 500;
  color: var(--text-muted); background: transparent;
  border: none; text-align: left; cursor: pointer;
  transition: all 0.12s;
}
.save-menu-item:hover { background: rgba(30,215,96,0.1); color: var(--text); }
.save-menu-item svg { flex-shrink: 0; opacity: 0.6; }
.save-menu-item:hover svg { opacity: 1; }
.pro-badge {
  margin-left: auto;
  font-size: 8px; font-weight: 700; letter-spacing: 0.5px;
  padding: 1px 5px; border-radius: 3px;
  background: linear-gradient(135deg, #f6c343, #d4a017);
  color: #1a1a1a;
  line-height: 1.4;
}
.new-badge-inline {
  margin-left: auto;
  font-size: 8px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 1.5px 5px; border-radius: 4px;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #fff;
  line-height: 1.4;
  box-shadow: 0 1px 4px rgba(228,30,72,0.4);
  animation: badge-pulse 2.5s ease-in-out infinite;
}
.save-menu-sep {
  height: 1px; background: var(--border); margin: 0;
}

/* ── Shared View ── */
body.shared-view #toolbar,
body.shared-view #side-panel,
body.shared-view .toolbar-toggle,
body.shared-view .tool-logo,
body.shared-view #mode-tabs-bar,
body.shared-view .rondos-brand,
body.shared-view #motion-controls,
body.shared-view .fb-bubble,
body.shared-view .save-wrap,
body.shared-view #analysis-name-input,
body.shared-view #app-menu-btn,
body.shared-view #mode-dropdown,
body.shared-view #mode-bar { display: none !important; }
body.shared-view #canvas-wrap {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
  margin-top: 56px;
}
body.shared-view #pitch {
  pointer-events: none;
}
.shared-play-btn {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 18px;
  border-radius: 20px;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.15s;
}
.shared-play-btn:hover {
  background: rgba(52,211,153,0.25);
  border-color: var(--accent);
  color: var(--accent);
}
body.shared-view #canvas-wrap {
  position: relative;
}
.shared-watermark {
  display: block;
  position: absolute;
  bottom: 12px;
  right: 14px;
  z-index: 50;
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.8px;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  background: rgba(0,0,0,0.35);
  padding: 6px 14px;
  border-radius: 6px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.06);
  text-transform: uppercase;
}

#share-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  background: var(--panel); border-bottom: 1px solid var(--border);
  padding: 12px 24px;
}
.share-banner-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto;
}
.share-banner-info {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 500;
  color: var(--text-muted);
}
.share-banner-actions { display: flex; gap: 8px; }
.share-banner-btn {
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 600;
  padding: 8px 18px; border-radius: 20px; border: none; cursor: pointer;
  transition: all 0.15s; display: flex; align-items: center; gap: 6px;
}
.share-banner-signup {
  background: var(--accent); color: #000;
  box-shadow: 0 2px 12px rgba(52,211,153,0.3);
}
.share-banner-signup:hover { background: var(--accent-hover); }
.share-banner-signin {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border);
}
.share-banner-signin:hover { border-color: var(--text-dim); color: var(--text); }
.share-banner-copy {
  background: #fff; color: #000;
  box-shadow: 0 2px 12px rgba(255,255,255,0.15);
}
.share-banner-copy:hover { background: #e0e0e0; }

/* ── Share Modals ── */
.share-confirm-modal {
  z-index: 800;
  backdrop-filter: blur(6px);
  background: rgba(0,0,0,0.65);
}
.share-modal-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.share-modal-icon {
  width: 52px; height: 52px;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.15);
}
.share-modal-title {
  font-family: 'Manrope', sans-serif;
  font-size: 16px; font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.share-modal-desc {
  font-family: 'Manrope', sans-serif;
  font-size: 13px; line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.share-modal-actions {
  display: flex; gap: 10px; justify-content: center;
}
.share-modal-btn {
  font-family: 'Manrope', sans-serif;
  font-size: 13px; font-weight: 600;
  padding: 10px 22px; border-radius: 10px;
  border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s;
}
.share-modal-btn.cancel {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.share-modal-btn.cancel:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}
.share-modal-btn.confirm {
  background: var(--accent); color: #000;
  box-shadow: 0 2px 12px rgba(52,211,153,0.3);
}
.share-modal-btn.confirm:hover {
  background: var(--accent-hover);
}
.share-modal-btn.confirm.danger {
  background: #EF4444;
  box-shadow: 0 2px 12px rgba(239,68,68,0.3);
}
.share-modal-btn.confirm.danger:hover {
  background: #DC2626;
}
.share-modal-icon.danger {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.15);
}
.share-link-wrap {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 8px;
}
.share-link-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-family: 'Manrope', sans-serif;
  outline: none;
}
.share-link-input:focus { border-color: var(--accent); }
.share-modal-btn.copy {
  white-space: nowrap;
  border-radius: 10px;
  padding: 10px 16px;
}
.share-modal-close {
  margin-top: 12px;
  background: none; border: none;
  color: var(--text-muted);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  transition: color 0.15s;
}
.share-modal-close:hover { color: var(--text); }
.confirm-modal-checkbox {
  display: flex; align-items: center; gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
  font-family: 'Manrope', sans-serif;
  font-size: 12px; color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.confirm-modal-checkbox input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  border-radius: 4px;
}
.confirm-modal-extra-wrap {
  margin-bottom: 20px;
}
.confirm-modal-name-input {
  width: 100%;
  margin-top: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-family: 'Manrope', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}
.confirm-modal-name-input:focus {
  border-color: var(--accent);
}
.confirm-modal-name-input::placeholder {
  color: var(--text-dim);
}

@media (max-width: 600px) {
  #share-banner { padding: 10px 14px; }
  .share-banner-inner {
    flex-direction: column; gap: 8px; align-items: stretch;
  }
  .share-banner-info { justify-content: center; font-size: 12px; }
  .share-banner-actions { justify-content: center; }
  .share-banner-btn { font-size: 11px; padding: 7px 14px; }
  body.shared-view #canvas-wrap {
    margin-top: 80px;
    min-height: auto;
    align-items: flex-start;
    padding-top: 8px !important;
  }
  body.shared-view #pitch-wrap {
    overflow: visible;
  }
}

/* ── Analyses Dashboard ── */
#analyses-dashboard {
  position: fixed; inset: 0; z-index: 600;
  background: var(--bg);
  display: flex; flex-direction: column;
  animation: dashFadeIn 0.2s ease;
}
@keyframes dashFadeIn { from { opacity:0; } to { opacity:1; } }

.analyses-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.analyses-header-left {
  display: flex; align-items: center; gap: 12px;
}
.analyses-back-btn {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.analyses-back-btn:hover { border-color: #444; color: var(--text); background: var(--panel2); }
.analyses-title {
  font-family: 'Manrope', sans-serif; font-size: 18px; font-weight: 700;
  color: var(--text); letter-spacing: -0.3px;
}
.analyses-count {
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 600;
  color: var(--text-dim); background: var(--panel2);
  padding: 3px 10px; border-radius: 12px;
}
.analyses-new-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 8px;
  border: none; background: var(--accent); color: #0F0F0F;
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 700;
  letter-spacing: 0.3px; cursor: pointer;
  transition: all 0.15s;
}
.analyses-new-btn:hover { opacity: 0.85; transform: translateY(-1px); }

.analyses-grid {
  flex: 1; overflow-y: auto;
  padding: 28px 40px;
}

.analyses-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; padding: 40px;
  color: var(--text-dim);
}
.analyses-empty p {
  font-family: 'Manrope', sans-serif; font-size: 15px; font-weight: 600;
  color: var(--text-muted); margin: 8px 0 0;
}
.analyses-empty span {
  font-family: 'Manrope', sans-serif; font-size: 12px; color: var(--text-dim);
}

/* ── Analysis Card ── */
.analysis-card {
  background: transparent; border: none;
  border-radius: 12px; overflow: visible; cursor: pointer;
  transition: all 0.2s;
  display: flex; flex-direction: column;
  position: relative;
}
.analysis-card:hover .analysis-card-thumb {
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  transform: scale(1.02);
}
.analysis-card.current .analysis-card-thumb {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.analysis-card-thumb {
  width: 100%; aspect-ratio: 1/1;
  background: var(--panel2);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: all 0.25s ease;
  position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04);
}
.analysis-card-thumb img {
  width: 130%; height: 130%; object-fit: cover;
  object-position: center center;
  border-radius: 12px;
}
.analysis-card-thumb .no-thumb {
  color: var(--text-dim); font-size: 11px;
  font-family: 'Manrope', sans-serif;
}
/* Hover actions overlay on thumbnail */
.analysis-card-actions {
  position: absolute; top: 8px; right: 8px;
  display: flex; gap: 4px;
  opacity: 0; transition: opacity 0.15s;
  z-index: 2;
}
.analysis-card:hover .analysis-card-actions { opacity: 1; }
.analysis-card-action {
  width: 30px; height: 30px; border-radius: 8px;
  border: none; background: rgba(20,20,20,0.8); color: #ddd;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.12s;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.analysis-card-action:hover { background: rgba(30,30,30,0.95); color: #fff; }
.analysis-card-action.delete:hover { background: rgba(180,40,40,0.85); color: #fff; }

.analysis-card-info {
  padding: 10px 4px 4px;
  display: flex; flex-direction: column; gap: 2px;
}
.analysis-card-name {
  font-family: 'Manrope', sans-serif; font-size: 14px; font-weight: 600;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.analysis-card-meta {
  display: flex; align-items: center; justify-content: flex-start;
}
.analysis-card-date {
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 400;
  color: var(--text-muted);
}

/* ── Drag and Drop ── */
.analysis-card[draggable] { cursor: grab; }
.analysis-card.dragging { opacity: 0.35; transform: scale(0.95); }
.drag-active .folder-header {
  border: 1.5px dashed rgba(30,215,96,0.35);
  border-radius: 8px;
  transition: all 0.15s;
}
.folder-header.drag-over {
  border-color: var(--accent) !important;
  background: rgba(30,215,96,0.08) !important;
}
.unfiled-divider.drag-over {
  background: rgba(30,215,96,0.08);
  border-radius: 6px;
}

/* ── Folders ── */
.folder-section {
  margin-bottom: 8px;
}
.folder-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
  border: 1.5px solid transparent;
}
.folder-header:hover { background: var(--panel2); }
.folder-header-left {
  display: flex; align-items: center; gap: 8px;
}
.folder-chevron {
  transition: transform 0.2s;
  color: var(--text-dim);
  flex-shrink: 0;
}
.folder-chevron.open { transform: rotate(90deg); }
.folder-icon { color: var(--text-muted); flex-shrink: 0; }
.folder-name {
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 600;
  color: var(--text);
}
.folder-count {
  font-family: 'Manrope', sans-serif; font-size: 11px; font-weight: 600;
  color: var(--text-dim); background: var(--panel2);
  padding: 1px 7px; border-radius: 8px;
  min-width: 18px; text-align: center;
}
.folder-actions {
  display: flex; gap: 2px;
}
.folder-action-btn {
  width: 26px; height: 26px; border-radius: 6px;
  border: none; background: transparent; color: var(--text-dim);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.12s;
}
.folder-action-btn:hover { background: var(--panel); color: var(--text); }
.folder-action-btn.delete:hover { background: #3A1520; color: #F87171; }

.folder-body { padding: 8px 0 4px 0; }
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  gap: 20px;
  padding: 0 8px;
}

.folder-rename-input {
  background: var(--panel2); border: 1px solid var(--accent);
  border-radius: 4px; padding: 2px 8px;
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 600;
  color: var(--text); outline: none;
  width: 160px;
}

.unfiled-divider {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px; margin: 12px 0 8px;
  transition: background 0.12s;
}
.unfiled-divider span {
  font-family: 'Manrope', sans-serif; font-size: 11px; font-weight: 600;
  color: var(--text-dim); letter-spacing: 0.5px; text-transform: uppercase;
}
.unfiled-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.analyses-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  gap: 20px;
}

/* ── New Folder Button ── */
.analyses-header-right {
  display: flex; align-items: center; gap: 8px;
}
.analyses-folder-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 8px;
  border: 1px solid var(--border); background: transparent; color: var(--text-muted);
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.analyses-folder-btn:hover { border-color: #444; color: var(--text); background: var(--panel2); }

/* ── Move Menu ── */
.move-menu {
  position: fixed; z-index: 800;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px;
  min-width: 170px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: dashFadeIn 0.12s ease;
}
.move-menu-title {
  font-family: 'Manrope', sans-serif; font-size: 10px; font-weight: 700;
  color: var(--text-dim); letter-spacing: 0.5px; text-transform: uppercase;
  padding: 6px 10px 4px;
}
.move-menu-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 7px 10px; border-radius: 6px;
  border: none; background: transparent; color: var(--text-muted);
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 500;
  cursor: pointer; text-align: left;
  transition: all 0.1s;
}
.move-menu-item:hover { background: var(--panel2); color: var(--text); }
.move-menu-item.active { color: var(--accent); font-weight: 600; }
.move-menu-item.active svg { color: var(--accent); }

/* ── Folder Empty State ── */
.folder-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 20px;
  font-family: 'Manrope', sans-serif; font-size: 12px;
  color: var(--text-dim);
  border: 1.5px dashed var(--border); border-radius: 8px;
}

/* ── Save Toast ── */
.save-toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  padding: 10px 24px; border-radius: 8px;
  background: var(--panel2); border: 1px solid var(--accent);
  color: var(--accent); font-family: 'Manrope', sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
  z-index: 700; opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.save-toast.show {
  opacity: 1; pointer-events: auto;
  transform: translateX(-50%) translateY(-4px);
}

/* ── Current Analysis Indicator (shown inline in mode bar) ── */
.current-analysis-bar {
  display: none;
  align-items: center; gap: 6px;
  padding: 0 8px; height: 52px;
  position: absolute; left: 220px;
}
.current-analysis-bar.show { display: flex; }
.analysis-name-input {
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 500;
  color: var(--text-muted); letter-spacing: 0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 200px; max-width: 280px; width: 240px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 5px;
  padding: 4px 12px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.analysis-name-input:hover {
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.06);
}
.analysis-name-input:focus {
  border-color: rgba(30,215,96,0.6);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  cursor: text;
}

/* ── Responsive: Small phones (≤480px) ── */
@media (max-width: 480px) {
  #canvas-wrap { padding: 50px 4px 70px; }

  #side-panel { width: 100%; }

  #toolbar { gap: 3px; padding: 0 6px; }
  #toolbar .tool-btn { width: 46px; height: 46px; }
  #toolbar .tool-btn.save-btn { width: 46px; height: 46px; }

  .auth-modal-box { width: 92vw !important; padding: 24px 20px !important; }
}

/* ─── Landing Gate ──────────────────────────────────────────────────────── */
.landing-gate {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

/* ── Split layout ── */
.landing-split {
  display: flex; align-items: center;
  width: 100%; max-width: 1200px;
  padding: 0 64px; gap: 64px;
  position: relative; z-index: 1;
}
.landing-left {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  align-items: flex-start;
}
.landing-right {
  flex: 1; min-width: 0;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}

/* Alpha badge */
.landing-alpha-badge {
  display: inline-block;
  font-family: 'Manrope', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent); border: 1px solid rgba(30,215,96,0.4);
  padding: 4px 12px; border-radius: 20px;
  margin-bottom: 24px;
  background: rgba(30,215,96,0.06);
}

/* Headline */
.landing-headline {
  font-family: 'Outfit', sans-serif;
  font-size: 72px; font-weight: 900;
  color: var(--text); line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 20px;
}

.landing-sub {
  font-family: 'Manrope', sans-serif;
  font-size: 16px; font-weight: 400;
  color: var(--text-muted); margin-bottom: 36px;
  line-height: 1.65; max-width: 420px;
}

/* CTAs */
.landing-actions {
  display: flex; gap: 12px; margin-bottom: 0;
}
.landing-btn {
  padding: 14px 32px; border-radius: 24px;
  font-family: 'Manrope', sans-serif; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
  letter-spacing: 0.3px;
}
.landing-btn-primary {
  border: none; background: var(--accent); color: #000;
  box-shadow: 0 4px 16px rgba(30,215,96,0.25);
}
.landing-btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(30,215,96,0.4); }
.landing-btn-secondary {
  border: 1px solid rgba(255,255,255,0.25); background: transparent;
  color: var(--text);
}
.landing-btn-secondary:hover { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.06); }
.landing-terms-link {
  display: inline-block; margin-top: 20px; font-size: 12px;
  color: rgba(255,255,255,0.35); text-decoration: none; transition: color 0.15s;
}
.landing-terms-link:hover { color: rgba(255,255,255,0.6); }

/* Golden glow behind mockup */
.landing-glow {
  position: absolute;
  width: 140%; height: 140%;
  top: -20%; left: -20%;
  background: radial-gradient(ellipse at center, rgba(30,215,96,0.22) 0%, rgba(30,215,96,0.10) 35%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(50px);
}

/* Product mockup */
.landing-mockup {
  position: relative;
  width: 100%; max-width: 520px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.06);
  background: #1a2e16;
}
.landing-pitch-svg {
  display: block; width: 100%; height: auto;
}

/* Player drift animations */
.lp { transition: all 0.3s; }
.lp-a1  { animation: drift1 8s ease-in-out infinite; }
.lp-a2  { animation: drift2 7s ease-in-out infinite 0.5s; }
.lp-a3  { animation: drift3 9s ease-in-out infinite 1s; }
.lp-a4  { animation: drift1 8s ease-in-out infinite 1.5s; }
.lp-a5  { animation: drift2 7s ease-in-out infinite 0.3s; }
.lp-a6  { animation: drift4 10s ease-in-out infinite 0.8s; }
.lp-a7  { animation: drift3 8s ease-in-out infinite 2s; }
.lp-a8  { animation: drift1 9s ease-in-out infinite 0.6s; }
.lp-a9  { animation: drift5 7s ease-in-out infinite 1.2s; }
.lp-a10 { animation: drift4 8s ease-in-out infinite 0.4s; }
.lp-a11 { animation: drift2 9s ease-in-out infinite 1.8s; }
.lp-b1  { animation: drift1 8s ease-in-out infinite 0.7s; }
.lp-b2  { animation: drift3 7s ease-in-out infinite 1.1s; }
.lp-b3  { animation: drift2 9s ease-in-out infinite 0.2s; }
.lp-b4  { animation: drift4 8s ease-in-out infinite 1.6s; }
.lp-b5  { animation: drift1 7s ease-in-out infinite 0.9s; }
.lp-b6  { animation: drift5 10s ease-in-out infinite 0.3s; }
.lp-b7  { animation: drift3 8s ease-in-out infinite 1.4s; }
.lp-b8  { animation: drift2 9s ease-in-out infinite 2.1s; }
.lp-b9  { animation: drift4 7s ease-in-out infinite 0.5s; }
.lp-b10 { animation: drift5 8s ease-in-out infinite 1.3s; }
.lp-b11 { animation: drift1 9s ease-in-out infinite 0.8s; }

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(12px, -8px); }
  50% { transform: translate(6px, 10px); }
  75% { transform: translate(-8px, 4px); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-10px, 6px); }
  50% { transform: translate(8px, -12px); }
  75% { transform: translate(4px, 8px); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(14px, 6px); }
  66% { transform: translate(-6px, -10px); }
}
@keyframes drift4 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-8px, -12px); }
  50% { transform: translate(10px, 4px); }
  75% { transform: translate(-4px, 14px); }
}
@keyframes drift5 {
  0%, 100% { transform: translate(0, 0); }
  30% { transform: translate(8px, 12px); }
  60% { transform: translate(-12px, -4px); }
}

/* Arrow dash animation */
.landing-arrow {
  stroke-dashoffset: 0;
  animation: arrowFlow 3s linear infinite;
}
.la-1 { animation-delay: 0s; }
.la-2 { animation-delay: 1s; }
.la-3 { animation-delay: 2s; }
@keyframes arrowFlow {
  to { stroke-dashoffset: -30; }
}


/* ── Landing responsive (mobile) ── */
@media (max-width: 860px) {
  .landing-split {
    flex-direction: column; padding: 48px 24px; gap: 40px;
    text-align: center;
  }
  .landing-left { align-items: center; }
  .landing-headline { font-size: 48px; letter-spacing: -1px; }
  .landing-sub { max-width: 100%; }
  .landing-actions { justify-content: center; }
  .landing-mockup { max-width: 400px; }
}

/* ─── Auth Modal ────────────────────────────────────────────────────────── */
#auth-modal { z-index: 2100; }
.auth-modal-box {
  background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px; padding: 32px 28px; width: 380px; max-width: 95vw;
  position: relative; text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px; border-radius: 6px;
  border: none; background: transparent;
  color: var(--text-dim); font-size: 20px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.auth-logo {
  font-family: 'Outfit', sans-serif; font-size: 26px; font-weight: 900;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
}
.auth-tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.auth-tab {
  flex: 1; padding: 10px; background: none; border: none;
  color: var(--text-muted); font-family: 'Manrope', sans-serif;
  font-size: 13px; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; transition: all 0.2s;
}
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.auth-tab:hover { color: var(--text); }

.auth-google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 10px; border-radius: 8px;
  background: #fff; border: 1px solid #ddd; color: #333;
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
}
.auth-google-btn:hover { background: #f5f5f5; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0; color: var(--text-dim); font-size: 11px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-input {
  width: 100%; padding: 10px 12px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-family: 'Manrope', sans-serif; font-size: 13px;
  outline: none; box-sizing: border-box;
}
.auth-input:focus { border-color: var(--accent); }
.auth-input::placeholder { color: var(--text-dim); }

.auth-submit-btn {
  width: 100%; padding: 10px; border-radius: 8px; border: none;
  background: var(--accent); color: #1a1a2e;
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: opacity 0.2s;
}
.auth-submit-btn:hover { opacity: 0.85; }
.auth-submit-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.auth-link {
  background: none; border: none; color: var(--text-muted);
  font-family: 'Manrope', sans-serif; font-size: 12px;
  cursor: pointer; padding: 4px 0;
}
.auth-link:hover { color: var(--accent); }

.auth-forgot-text { color: var(--text-muted); font-size: 12px; margin: 0 0 4px; }

.auth-message {
  margin-top: 12px; padding: 8px 12px; border-radius: 6px;
  font-size: 12px; font-family: 'Manrope', sans-serif;
}
.auth-message.error { background: rgba(248,113,113,0.15); color: #f87171; }
.auth-message.success { background: rgba(74,222,128,0.15); color: #4ade80; }

/* ── Mobile Hint Modal ──────────────────────────────────────────────────── */
.mobile-hint-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.mobile-hint-modal {
  background: var(--panel2); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px 28px; max-width: 340px;
  text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.mobile-hint-icon { font-size: 40px; margin-bottom: 12px; }
.mobile-hint-modal h2 {
  font-family: 'Manrope', sans-serif; font-size: 20px; font-weight: 700;
  color: var(--text); margin: 0 0 10px;
}
.mobile-hint-modal p {
  font-family: 'Manrope', sans-serif; font-size: 14px; line-height: 1.5;
  color: var(--text-muted); margin: 0 0 24px;
}
.mobile-hint-btn {
  width: 100%; padding: 14px 0; border: none; border-radius: 12px;
  background: var(--accent); color: #0A0A0A; font-family: 'Manrope', sans-serif;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: opacity 0.15s;
}
.mobile-hint-btn:hover { opacity: 0.9; }

/* ─── Mobile topbar compaction (appended so it wins the cascade) ─────────── */
@media (max-width: 768px) {
  .topbar-right { top: 10px; right: 10px; gap: 6px; }
  .topbar-signin-link { display: none; }
  .topbar-share-btn span,
  .topbar-export-btn span { display: none; }
  .topbar-share-btn,
  .topbar-export-btn {
    width: 36px; height: 36px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }
}
